ReactOS  0.4.12-dev-43-g63b00d8
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 
11 {
18 };
19 
21 {
22  return (x >= LICENSE_MIN && x <= LICENSE_MAX);
23 }
24 
26 {
40 
41  // Caching mechanism related entries
44 
45  // Optional integrity checks (SHA-1 digests are 160 bit = 40 characters in hex string form)
48 
49  // Create an object from file
50  CAvailableApplicationInfo(const ATL::CStringW& sFileNameParam);
51 
52  // Load all info from the file
54  BOOL HasLanguageInfo() const;
55  BOOL HasNativeLanguage() const;
56  BOOL HasEnglishLanguage() const;
57  BOOL IsInstalled() const;
58  BOOL HasInstalledVersion() const;
59  BOOL HasUpdate() const;
60 
61  // Set a timestamp
63 
64 private:
69 
70  inline BOOL GetString(LPCWSTR lpKeyName, ATL::CStringW& ReturnedString);
71 
72  // Lazily load general info from the file
79  inline BOOL FindInLanguages(LCID what) const;
80 };
81 
83 
85 {
92 
94 };
95 
97 {
100 
101 public:
102  CAvailableApps();
103 
104  static BOOL UpdateAppsDB();
105  static BOOL ForceUpdateAppsDB();
106  static VOID DeleteCurrentAppsDB();
107 
108  VOID FreeCachedEntries();
109  BOOL Enum(INT EnumType, AVAILENUMPROC lpEnumProc);
110 
111  CAvailableApplicationInfo* FindInfo(const ATL::CStringW& szAppName) const;
114 
115  const ATL::CStringW& GetFolderPath() const;
116  const ATL::CStringW& GetAppPath() const;
117  const ATL::CStringW& GetCabPath() const;
118 };
ATL::CStringW m_szRegName
Definition: available.h:31
BOOL HasNativeLanguage() const
Definition: available.cpp:186
ATL::CStringW m_szName
Definition: available.h:30
#define CALLBACK
Definition: compat.h:27
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
ATL::CStringW m_szVersion
Definition: available.h:32
DWORD LCID
Definition: nls.h:13
LicenseType m_LicenseType
Definition: available.h:29
BOOL IsLicenseType(INT x)
Definition: available.h:20
int32_t INT
Definition: typedefs.h:56
struct TraceInfo Info
ATL::CStringW m_szLicense
Definition: available.h:33
ATL::CStringW szCabPath
Definition: available.h:87
ATL::CStringW m_szDesc
Definition: available.h:34
BOOL(CALLBACK * AVAILENUMPROC)(CAvailableApplicationInfo *Info, LPCWSTR szFolderPath)
Definition: available.h:82
unsigned int BOOL
Definition: ntddk_ex.h:94
static AvailableStrings m_Strings
Definition: available.h:98
ATL::CStringW m_sFileName
Definition: available.h:42
ATL::CStringW m_szUrlDownload
Definition: available.h:37
MIXER_STATUS Enum(IN PVOID EnumContext, IN ULONG DeviceIndex, OUT LPWSTR *DeviceName, OUT PHANDLE OutHandle, OUT PHANDLE OutKey)
Definition: mmixer.c:225
ATL::CStringW m_szSHA1
Definition: available.h:46
LicenseType
Definition: available.h:10
ATL::CStringW szCabDir
Definition: available.h:91
TCHAR szAppName[128]
Definition: solitaire.cpp:16
ATL::CAtlList< CAvailableApplicationInfo * > m_InfoList
Definition: available.h:99
INT x
Definition: msvc.h:62
VOID SetLastWriteTime(FILETIME *ftTime)
Definition: available.cpp:211
ATL::CStringW szPath
Definition: available.h:86
BOOL HasLanguageInfo() const
Definition: available.cpp:181
BOOL HasInstalledVersion() const
Definition: available.cpp:201
ATL::CStringW m_szUrlSite
Definition: available.h:36
ATL::CStringW szAppsPath
Definition: available.h:88
ATL::CStringW m_szCDPath
Definition: available.h:38
CAvailableApplicationInfo(const ATL::CStringW &sFileNameParam)
Definition: available.cpp:21
BOOL FindInLanguages(LCID what) const
Definition: available.cpp:161
BOOL HasEnglishLanguage() const
Definition: available.cpp:191
ATL::CSimpleArray< LCID > m_LanguageLCIDs
Definition: available.h:39
ATL::CStringW m_szSize
Definition: available.h:35
BOOL GetString(LPCWSTR lpKeyName, ATL::CStringW &ReturnedString)
Definition: available.cpp:216
CConfigParser * m_Parser
Definition: available.h:68
ATL::CStringW szSearchPath
Definition: available.h:89
#define BOOL
Definition: msvc.h:23
ATL::CStringW szCabName
Definition: available.h:90
ATL::CStringW m_szInstalledVersion
Definition: available.h:47