ReactOS 0.4.15-dev-8093-g3285f69
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{
52};
53
54inline BOOL
56{
57 return (x >= ENUM_AVAILABLE_MIN && x <= ENUM_AVAILABLE_MAX);
58}
59
60inline BOOL
62{
63 return (x >= ENUM_INSTALLED_MIN && x <= ENUM_INSTALLED_MAX);
64}
65
67{
68 UCF_NONE = 0x00,
69 UCF_MODIFY = 0x01,
70 UCF_SILENT = 0x02,
71};
72
74{
76 INSTALLER_GENERATE, // .zip file automatically converted to installer by rapps
77};
78
79#define DB_VERSION L"Version"
80#define DB_CATEGORY L"Category"
81#define DB_PUBLISHER L"Publisher"
82#define DB_REGNAME L"RegName"
83#define DB_INSTALLER L"Installer"
84#define DB_SCOPE L"Scope" // User or Machine
85
86#define DB_GENINSTSECTION L"Generate"
87#define GENERATE_ARPSUBKEY L"RApps" // Our uninstall data is stored here
88
89class CAppRichEdit;
90class CConfigParser;
91
93{
94 public:
96 virtual ~CAppInfo();
97
98 const CStringW szIdentifier; // PkgName or KeyName
100
105
106 virtual BOOL
107 Valid() const = 0;
108 virtual BOOL
110 virtual BOOL
112 virtual BOOL
114 virtual VOID
115 ShowAppInfo(CAppRichEdit *RichEdit) = 0;
116 virtual VOID
117 GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const = 0;
118 virtual VOID
119 GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) = 0;
120 virtual InstallerType
122 virtual BOOL
124};
125
127{
136
137 VOID
139 VOID
141 VOID
145
146 public:
148 CConfigParser *Parser,
149 const CStringW &PkgName,
150 AppsCategories Category,
151 const CPathW &BasePath);
153
155 GetConfigParser() const { return m_Parser; }
156
157 virtual BOOL
158 Valid() const override;
159 virtual BOOL
160 CanModify() override;
161 virtual BOOL
162 RetrieveIcon(CStringW &Path) const override;
163 virtual BOOL
165 virtual VOID
166 ShowAppInfo(CAppRichEdit *RichEdit) override;
167 virtual VOID
168 GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override;
169 virtual VOID
170 GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override;
171 virtual InstallerType
172 GetInstallerType() const override;
173 virtual BOOL
175};
176
178{
183
184 BOOL
186 BOOL
187 GetApplicationRegDword(LPCWSTR lpKeyName, DWORD *lpValue);
188 VOID
189 AddApplicationRegString(CAppRichEdit *RichEdit, UINT StringID, const CStringW &String, DWORD TextFlags);
190
191 VOID
193 VOID
195
196 public:
200
201 CRegKey& GetRegKey() { return m_hKey; }
202
203 virtual BOOL
204 Valid() const override;
205 virtual BOOL
206 CanModify() override;
207 virtual BOOL
208 RetrieveIcon(CStringW &Path) const override;
209 virtual BOOL
211 virtual VOID
212 ShowAppInfo(CAppRichEdit *RichEdit) override;
213 virtual VOID
214 GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override;
215 virtual VOID
216 GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override;
217 virtual InstallerType
218 GetInstallerType() const override;
219 virtual BOOL
221};
222
223BOOL
225BOOL
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:652
BOOL IsAvailableEnum(INT x)
Definition: appinfo.h:55
BOOL IsInstalledEnum(INT x)
Definition: appinfo.h:61
BOOL IsKnownLicenseType(INT x)
Definition: appinfo.h:19
UninstallCommandFlags
Definition: appinfo.h:67
@ UCF_NONE
Definition: appinfo.h:68
@ UCF_SILENT
Definition: appinfo.h:70
@ UCF_MODIFY
Definition: appinfo.h:69
InstallerType
Definition: appinfo.h:74
@ INSTALLER_UNKNOWN
Definition: appinfo.h:75
@ INSTALLER_GENERATE
Definition: appinfo.h:76
BOOL UninstallGenerated(CInstalledApplicationInfo &AppInfo, UninstallCommandFlags Flags)
Definition: geninst.cpp:812
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:46
@ ENUM_AVAILABLE_MAX
Definition: appinfo.h:51
@ 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:49
@ ENUM_INSTALLED_MIN
Definition: appinfo.h:48
@ ENUM_INSTALLED_APPLICATIONS
Definition: appinfo.h:45
@ ENUM_CAT_GRAPHICS
Definition: appinfo.h:29
@ ENUM_CAT_DEVEL
Definition: appinfo.h:33
@ ENUM_INVALID
Definition: appinfo.h:47
@ ENUM_CAT_DRIVERS
Definition: appinfo.h:39
@ ENUM_ALL_INSTALLED
Definition: appinfo.h:44
@ ENUM_CAT_SCIENCE
Definition: appinfo.h:37
@ ENUM_AVAILABLE_MIN
Definition: appinfo.h:50
@ 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:104
virtual VOID ShowAppInfo(CAppRichEdit *RichEdit)=0
CStringW szDisplayIcon
Definition: appinfo.h:101
virtual BOOL CanModify()=0
virtual InstallerType GetInstallerType() const
Definition: appinfo.h:121
CStringW szDisplayName
Definition: appinfo.h:102
virtual VOID GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload)=0
virtual BOOL Valid() const =0
CStringW szDisplayVersion
Definition: appinfo.h:103
virtual BOOL RetrieveScreenshot(CStringW &Path)=0
virtual ~CAppInfo()
Definition: appinfo.cpp:18
const AppsCategories iCategory
Definition: appinfo.h:99
const CStringW szIdentifier
Definition: appinfo.h:98
virtual InstallerType GetInstallerType() const override
Definition: appinfo.cpp:371
CSimpleArray< LCID > m_LanguageLCIDs
Definition: appinfo.h:134
CConfigParser * GetConfigParser() const
Definition: appinfo.h:155
virtual VOID GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override
Definition: appinfo.cpp:362
virtual BOOL RetrieveScreenshot(CStringW &Path) override
Definition: appinfo.cpp:311
virtual VOID GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override
Definition: appinfo.cpp:345
virtual BOOL CanModify() override
Definition: appinfo.cpp:297
virtual BOOL Valid() const override
Definition: appinfo.cpp:291
virtual BOOL UninstallApplication(UninstallCommandFlags Flags) override
Definition: appinfo.cpp:382
VOID InsertLanguageInfo(CAppRichEdit *RichEdit)
Definition: appinfo.cpp:201
CConfigParser * m_Parser
Definition: appinfo.h:128
virtual BOOL RetrieveIcon(CStringW &Path) const override
Definition: appinfo.cpp:303
CSimpleArray< CStringW > m_szScrnshotLocation
Definition: appinfo.h:129
virtual VOID ShowAppInfo(CAppRichEdit *RichEdit) override
Definition: appinfo.cpp:70
VOID InsertVersionInfo(CAppRichEdit *RichEdit)
Definition: appinfo.cpp:116
CRegKey & GetRegKey()
Definition: appinfo.h:201
virtual VOID ShowAppInfo(CAppRichEdit *RichEdit) override
Definition: appinfo.cpp:421
virtual BOOL RetrieveScreenshot(CStringW &Path) override
Definition: appinfo.cpp:560
BOOL GetApplicationRegDword(LPCWSTR lpKeyName, DWORD *lpValue)
Definition: appinfo.cpp:676
CStringW m_szUninstallString
Definition: appinfo.h:181
virtual BOOL Valid() const override
Definition: appinfo.cpp:536
virtual BOOL RetrieveIcon(CStringW &Path) const override
Definition: appinfo.cpp:553
BOOL GetApplicationRegString(LPCWSTR lpKeyName, CStringW &String)
Definition: appinfo.cpp:630
VOID AddApplicationRegString(CAppRichEdit *RichEdit, UINT StringID, const CStringW &String, DWORD TextFlags)
Definition: appinfo.cpp:407
virtual VOID GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override
Definition: appinfo.cpp:572
virtual BOOL CanModify() override
Definition: appinfo.cpp:542
virtual InstallerType GetInstallerType() const override
Definition: appinfo.cpp:578
virtual BOOL UninstallApplication(UninstallCommandFlags Flags) override
Definition: appinfo.cpp:589
virtual VOID GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override
Definition: appinfo.cpp:566
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
unsigned int UINT
Definition: ndis.h:50
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