ReactOS 0.4.16-dev-1025-gd3456f5
appinfo.h
Go to the documentation of this file.
1#pragma once
2
3#include <atlstr.h>
4#include <atlpath.h>
5#include <atlsimpcoll.h>
6
7
9{
16};
17
18inline BOOL
20{
21 return (x > LICENSE_NONE && x <= LICENSE_MAX);
22}
23
25{
53};
54
55inline BOOL
57{
63
64 return (x >= ENUM_AVAILABLE_MIN && x <= ENUM_AVAILABLE_MAX);
65}
66
67inline BOOL
69{
70 return (x >= ENUM_INSTALLED_MIN && x <= ENUM_INSTALLED_MAX);
71}
72
74{
75 UCF_NONE = 0x00,
76 UCF_MODIFY = 0x01,
77 UCF_SILENT = 0x02,
79};
81
83{
85 INSTALLER_GENERATE, // .zip file automatically converted to installer by rapps
86};
87
88#define DB_VERSION L"Version"
89#define DB_CATEGORY L"Category"
90#define DB_PUBLISHER L"Publisher"
91#define DB_REGNAME L"RegName"
92#define DB_INSTALLER L"Installer"
93#define DB_SCOPE L"Scope" // User or Machine
94#define DB_SAVEAS L"SaveAs"
95
96#define DB_GENINSTSECTION L"Generate"
97#define GENERATE_ARPSUBKEY L"RApps" // Our uninstall data is stored here
98
99class CAppRichEdit;
100class CConfigParser;
101
103{
104 public:
105 CAppInfo(const CStringW &Identifier, AppsCategories Category);
106 virtual ~CAppInfo();
107
108 const CStringW szIdentifier; // PkgName or KeyName
110
115
116 virtual BOOL
117 Valid() const = 0;
118 virtual BOOL
120 virtual BOOL
122 virtual BOOL
124 virtual VOID
125 ShowAppInfo(CAppRichEdit *RichEdit) = 0;
126 virtual VOID
127 GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const = 0;
128 virtual VOID
129 GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) = 0;
130 virtual InstallerType
132 virtual BOOL
134};
135
137{
146
147 VOID
149 VOID
151 VOID
155
156 public:
158 CConfigParser *Parser,
159 const CStringW &PkgName,
160 AppsCategories Category,
161 const CPathW &BasePath);
163
165 GetConfigParser() const { return m_Parser; }
166
167 virtual BOOL
168 Valid() const override;
169 virtual BOOL
170 CanModify() override;
171 virtual BOOL
172 RetrieveIcon(CStringW &Path) const override;
173 virtual BOOL
175 virtual VOID
176 ShowAppInfo(CAppRichEdit *RichEdit) override;
177 virtual VOID
178 GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override;
179 virtual VOID
180 GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override;
181 virtual InstallerType
182 GetInstallerType() const override;
183 virtual BOOL
185};
186
188{
193
194 BOOL
196 BOOL
197 GetApplicationRegDword(LPCWSTR lpKeyName, DWORD *lpValue);
198 VOID
199 AddApplicationRegString(CAppRichEdit *RichEdit, UINT StringID, const CStringW &String, DWORD TextFlags);
200
201 VOID
203 VOID
205
206 public:
210
211 CRegKey& GetRegKey() { return m_hKey; }
212
213 virtual BOOL
214 Valid() const override;
215 virtual BOOL
216 CanModify() override;
217 virtual BOOL
218 RetrieveIcon(CStringW &Path) const override;
219 virtual BOOL
221 virtual VOID
222 ShowAppInfo(CAppRichEdit *RichEdit) override;
223 virtual VOID
224 GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override;
225 virtual VOID
226 GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override;
227 virtual InstallerType
228 GetInstallerType() const override;
229 virtual BOOL
231};
232
233BOOL
235BOOL
PRTL_UNICODE_STRING_BUFFER Path
LicenseType
Definition: appinfo.h:9
@ LICENSE_NONE
Definition: appinfo.h:10
@ LICENSE_OPENSOURCE
Definition: appinfo.h:11
@ LICENSE_MIN
Definition: appinfo.h:14
@ LICENSE_MAX
Definition: appinfo.h:15
@ LICENSE_TRIAL
Definition: appinfo.h:13
@ LICENSE_FREEWARE
Definition: appinfo.h:12
BOOL ExtractAndRunGeneratedInstaller(const CAvailableApplicationInfo &AppInfo, LPCWSTR Archive)
Definition: geninst.cpp:672
BOOL IsAvailableEnum(INT x)
Definition: appinfo.h:56
BOOL IsInstalledEnum(INT x)
Definition: appinfo.h:68
BOOL IsKnownLicenseType(INT x)
Definition: appinfo.h:19
UninstallCommandFlags
Definition: appinfo.h:74
@ UCF_NONE
Definition: appinfo.h:75
@ UCF_SILENT
Definition: appinfo.h:77
@ UCF_SAMEPROCESS
Definition: appinfo.h:78
@ UCF_MODIFY
Definition: appinfo.h:76
InstallerType
Definition: appinfo.h:83
@ INSTALLER_UNKNOWN
Definition: appinfo.h:84
@ INSTALLER_GENERATE
Definition: appinfo.h:85
BOOL UninstallGenerated(CInstalledApplicationInfo &AppInfo, UninstallCommandFlags Flags)
Definition: geninst.cpp:832
AppsCategories
Definition: appinfo.h:25
@ ENUM_CAT_LIBS
Definition: appinfo.h:40
@ ENUM_CAT_ENGINEER
Definition: appinfo.h:35
@ ENUM_CAT_VIDEO
Definition: appinfo.h:28
@ ENUM_CAT_FINANCE
Definition: appinfo.h:36
@ ENUM_CAT_OFFICE
Definition: appinfo.h:32
@ ENUM_CAT_EDU
Definition: appinfo.h:34
@ ENUM_CAT_AUDIO
Definition: appinfo.h:27
@ ENUM_CAT_TOOLS
Definition: appinfo.h:38
@ ENUM_UPDATES
Definition: appinfo.h:47
@ ENUM_AVAILABLE_MAX
Definition: appinfo.h:52
@ ENUM_CAT_SELECTED
Definition: appinfo.h:43
@ ENUM_ALL_AVAILABLE
Definition: appinfo.h:26
@ ENUM_CAT_INTERNET
Definition: appinfo.h:31
@ ENUM_CAT_GAMES
Definition: appinfo.h:30
@ ENUM_CAT_THEMES
Definition: appinfo.h:41
@ ENUM_INSTALLED_MAX
Definition: appinfo.h:50
@ ENUM_LASTCATEGORY
Definition: appinfo.h:44
@ ENUM_INSTALLED_MIN
Definition: appinfo.h:49
@ ENUM_INSTALLED_APPLICATIONS
Definition: appinfo.h:46
@ ENUM_CAT_GRAPHICS
Definition: appinfo.h:29
@ ENUM_CAT_DEVEL
Definition: appinfo.h:33
@ ENUM_INVALID
Definition: appinfo.h:48
@ ENUM_CAT_DRIVERS
Definition: appinfo.h:39
@ ENUM_ALL_INSTALLED
Definition: appinfo.h:45
@ ENUM_CAT_SCIENCE
Definition: appinfo.h:37
@ ENUM_AVAILABLE_MIN
Definition: appinfo.h:51
@ ENUM_CAT_OTHER
Definition: appinfo.h:42
@ Identifier
Definition: asmpp.cpp:95
virtual BOOL UninstallApplication(UninstallCommandFlags Flags)=0
virtual BOOL RetrieveIcon(CStringW &Path) const =0
virtual VOID GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const =0
CStringW szComments
Definition: appinfo.h:114
virtual VOID ShowAppInfo(CAppRichEdit *RichEdit)=0
CStringW szDisplayIcon
Definition: appinfo.h:111
virtual BOOL CanModify()=0
virtual InstallerType GetInstallerType() const
Definition: appinfo.h:131
CStringW szDisplayName
Definition: appinfo.h:112
virtual VOID GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload)=0
virtual BOOL Valid() const =0
CStringW szDisplayVersion
Definition: appinfo.h:113
virtual BOOL RetrieveScreenshot(CStringW &Path)=0
virtual ~CAppInfo()
Definition: appinfo.cpp:26
const AppsCategories iCategory
Definition: appinfo.h:109
const CStringW szIdentifier
Definition: appinfo.h:108
virtual InstallerType GetInstallerType() const override
Definition: appinfo.cpp:379
CSimpleArray< LCID > m_LanguageLCIDs
Definition: appinfo.h:144
CConfigParser * GetConfigParser() const
Definition: appinfo.h:165
virtual VOID GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override
Definition: appinfo.cpp:370
virtual BOOL RetrieveScreenshot(CStringW &Path) override
Definition: appinfo.cpp:319
virtual VOID GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override
Definition: appinfo.cpp:353
virtual BOOL CanModify() override
Definition: appinfo.cpp:305
virtual BOOL Valid() const override
Definition: appinfo.cpp:299
virtual BOOL UninstallApplication(UninstallCommandFlags Flags) override
Definition: appinfo.cpp:390
VOID InsertLanguageInfo(CAppRichEdit *RichEdit)
Definition: appinfo.cpp:209
CConfigParser * m_Parser
Definition: appinfo.h:138
virtual BOOL RetrieveIcon(CStringW &Path) const override
Definition: appinfo.cpp:311
CSimpleArray< CStringW > m_szScrnshotLocation
Definition: appinfo.h:139
virtual VOID ShowAppInfo(CAppRichEdit *RichEdit) override
Definition: appinfo.cpp:78
VOID InsertVersionInfo(CAppRichEdit *RichEdit)
Definition: appinfo.cpp:124
CRegKey & GetRegKey()
Definition: appinfo.h:211
virtual VOID ShowAppInfo(CAppRichEdit *RichEdit) override
Definition: appinfo.cpp:429
virtual BOOL RetrieveScreenshot(CStringW &Path) override
Definition: appinfo.cpp:568
BOOL GetApplicationRegDword(LPCWSTR lpKeyName, DWORD *lpValue)
Definition: appinfo.cpp:684
CStringW m_szUninstallString
Definition: appinfo.h:191
virtual BOOL Valid() const override
Definition: appinfo.cpp:544
virtual BOOL RetrieveIcon(CStringW &Path) const override
Definition: appinfo.cpp:561
BOOL GetApplicationRegString(LPCWSTR lpKeyName, CStringW &String)
Definition: appinfo.cpp:638
VOID AddApplicationRegString(CAppRichEdit *RichEdit, UINT StringID, const CStringW &String, DWORD TextFlags)
Definition: appinfo.cpp:415
virtual VOID GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override
Definition: appinfo.cpp:580
virtual BOOL CanModify() override
Definition: appinfo.cpp:550
virtual InstallerType GetInstallerType() const override
Definition: appinfo.cpp:586
virtual BOOL UninstallApplication(UninstallCommandFlags Flags) override
Definition: appinfo.cpp:597
virtual VOID GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override
Definition: appinfo.cpp:574
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define C_ASSERT(e)
Definition: intsafe.h:73
unsigned int UINT
Definition: ndis.h:50
#define DEFINE_ENUM_FLAG_OPERATORS(_ENUMTYPE)
Definition: ntbasedef.h:737
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
Definition: wdfdevice.h:2699
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2433
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185