ReactOS  0.4.15-dev-3324-gda4e15f
available.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <windef.h>
4 #include <atlstr.h>
5 #include <atlsimpcoll.h>
6 #include <atlcoll.h>
7 
8 #include "misc.h"
9 #include "configparser.h"
10 
11 
12 #define MAX_SCRNSHOT_NUM 16
13 
15 {
22 };
23 
25 {
26  return (x >= LICENSE_MIN && x <= LICENSE_MAX);
27 }
28 
30 {
37 
39 };
40 
42 {
43 public:
45  //BOOL m_IsSelected;
47  ATL::CStringW m_szName; // software's display name.
58  ATL::CStringW m_szPkgName; // software's package name.
59 
61 
62  // Caching mechanism related entries
65 
66  // Optional integrity checks (SHA-1 digests are 160 bit = 40 characters in hex string form)
69 
70  // Create an object from file
71  CAvailableApplicationInfo(const ATL::CStringW& sFileNameParam, AvailableStrings& m_Strings);
72 
73  // Load all info from the file
75  BOOL HasLanguageInfo() const;
76  BOOL HasNativeLanguage() const;
77  BOOL HasEnglishLanguage() const;
78  BOOL IsInstalled() const;
79  BOOL HasInstalledVersion() const;
80  BOOL HasUpdate() const;
81  BOOL RetrieveScrnshot(UINT Index, ATL::CStringW& ScrnshotLocation) const;
83  // Set a timestamp
85 
86 private:
91 
92  inline BOOL GetString(LPCWSTR lpKeyName, ATL::CStringW& ReturnedString);
93 
94  // Lazily load general info from the file
100  VOID RetrieveSize();
101  inline BOOL FindInLanguages(LCID what) const;
102 };
103 
105 
107 {
110 
111 public:
113 
114  CAvailableApps();
115 
116  static BOOL UpdateAppsDB();
117  static BOOL ForceUpdateAppsDB();
118  static VOID DeleteCurrentAppsDB();
119 
121  BOOL Enum(INT EnumType, AVAILENUMPROC lpEnumProc, PVOID param);
122 
125 
127  int GetSelectedCount();
128 
131  //ATL::CSimpleArray<CAvailableApplicationInfo> GetSelected() const;
132 
133  const ATL::CStringW& GetFolderPath() const;
134  const ATL::CStringW& GetAppPath() const;
135  const ATL::CStringW& GetCabPath() const;
136 };
VOID RetrieveGeneralInfo(AvailableStrings &m_Strings)
Definition: available.cpp:35
ATL::CStringW m_sFileName
Definition: available.h:63
const ATL::CStringW & GetAppPath() const
Definition: available.cpp:622
ATL::CStringW m_szPkgName
Definition: available.h:58
ATL::CStringW m_szLicense
Definition: available.h:50
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
VOID RemoveAllSelected()
Definition: available.cpp:571
ATL::CSimpleArray< ATL::CStringW > m_szScrnshotLocation
Definition: available.h:56
#define CALLBACK
Definition: compat.h:35
BOOL HasInstalledVersion() const
Definition: available.cpp:269
ATL::CStringW m_szUrlSite
Definition: available.h:53
VOID SetLastWriteTime(FILETIME *ftTime)
Definition: available.cpp:299
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
DWORD LCID
Definition: nls.h:13
CAvailableApplicationInfo * FindAppByPkgName(const ATL::CStringW &szPkgName) const
Definition: available.cpp:582
BOOL IsLicenseType(INT x)
Definition: available.h:24
static BOOL UpdateAppsDB()
Definition: available.cpp:409
#define BOOL
Definition: nt_native.h:43
int32_t INT
Definition: typedefs.h:58
BOOL GetString(LPCWSTR lpKeyName, ATL::CStringW &ReturnedString)
Definition: available.cpp:304
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:683
ATL::CStringW m_szDesc
Definition: available.h:51
ATL::CStringW szCabPath
Definition: available.h:32
ATL::CStringW m_szUrlDownload
Definition: available.h:54
unsigned int BOOL
Definition: ntddk_ex.h:94
ATL::CStringW m_szSize
Definition: available.h:52
VOID FreeCachedEntries()
Definition: available.cpp:345
BOOL FindInLanguages(LCID what) const
Definition: available.cpp:229
ATL::CSimpleArray< CAvailableApplicationInfo > FindAppsByPkgNameList(const ATL::CSimpleArray< ATL::CStringW > &arrAppsNames) const
Definition: available.cpp:603
const ATL::CStringW & GetFolderPath() const
Definition: available.cpp:617
BOOL HasEnglishLanguage() const
Definition: available.cpp:259
ATL::CSimpleArray< LCID > m_LanguageLCIDs
Definition: available.h:55
BOOL Enum(INT EnumType, AVAILENUMPROC lpEnumProc, PVOID param)
Definition: available.cpp:448
static AvailableStrings m_Strings
Definition: available.h:112
_In_ WDFCOLLECTION _In_ ULONG Index
ATL::CStringW m_szVersion
Definition: available.h:49
GLfloat param
Definition: glext.h:5796
ATL::CStringW m_szInstalledVersion
Definition: available.h:68
static VOID DeleteCurrentAppsDB()
Definition: available.cpp:386
VOID RefreshAppInfo(AvailableStrings &m_Strings)
Definition: available.cpp:26
ATL::CStringW m_szRegName
Definition: available.h:48
int GetSelectedCount()
Definition: available.cpp:577
BOOL AddSelected(CAvailableApplicationInfo *AvlbInfo)
Definition: available.cpp:555
BOOL HasLanguageInfo() const
Definition: available.cpp:249
ATL::CStringW m_szName
Definition: available.h:47
BOOL(CALLBACK * AVAILENUMPROC)(CAvailableApplicationInfo *Info, BOOL bInitialCheckState, PVOID param)
Definition: available.h:104
LicenseType
Definition: available.h:14
static BOOL ForceUpdateAppsDB()
Definition: available.cpp:442
ATL::CStringW szCabDir
Definition: available.h:36
ATL::CAtlList< CAvailableApplicationInfo * > m_SelectedList
Definition: available.h:109
ATL::CAtlList< CAvailableApplicationInfo * > m_InfoList
Definition: available.h:108
ATL::CStringW szPath
Definition: available.h:31
BOOL RetrieveIcon(ATL::CStringW &IconLocation) const
Definition: available.cpp:289
CConfigParser * m_Parser
Definition: available.h:90
ATL::CStringW m_szIconLocation
Definition: available.h:57
unsigned int UINT
Definition: ndis.h:50
ATL::CStringW szAppsPath
Definition: available.h:33
unsigned int ULONG
Definition: retypes.h:1
LicenseType m_LicenseType
Definition: available.h:46
const ATL::CStringW & GetCabPath() const
Definition: available.cpp:627
ATL::CStringW m_szSHA1
Definition: available.h:67
ATL::CStringW szSearchPath
Definition: available.h:34
ATL::CStringW szCabName
Definition: available.h:35
BOOL RemoveSelected(CAvailableApplicationInfo *AvlbInfo)
Definition: available.cpp:560
BOOL RetrieveScrnshot(UINT Index, ATL::CStringW &ScrnshotLocation) const
Definition: available.cpp:279
BOOL HasNativeLanguage() const
Definition: available.cpp:254
CAvailableApplicationInfo(const ATL::CStringW &sFileNameParam, AvailableStrings &m_Strings)
Definition: available.cpp:19