ReactOS 0.4.15-dev-7108-g1cf6ce6
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
66class CAppRichEdit;
67
69{
70 public:
72 virtual ~CAppInfo();
73
74 const CStringW szIdentifier; // PkgName or KeyName
76
81
82 virtual BOOL
83 Valid() const = 0;
84 virtual BOOL
85 CanModify() = 0;
86 virtual BOOL
88 virtual BOOL
90 virtual VOID
91 ShowAppInfo(CAppRichEdit *RichEdit) = 0;
92 virtual VOID
93 GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const = 0;
94 virtual VOID
95 GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) = 0;
96 virtual BOOL
98};
99
101{
110
111 VOID
113 VOID
115 VOID
119
120 public:
122 CConfigParser *Parser,
123 const CStringW &PkgName,
124 AppsCategories Category,
125 const CPathW &BasePath);
127
128 virtual BOOL
129 Valid() const override;
130 virtual BOOL
131 CanModify() override;
132 virtual BOOL
133 RetrieveIcon(CStringW &Path) const override;
134 virtual BOOL
136 virtual VOID
137 ShowAppInfo(CAppRichEdit *RichEdit) override;
138 virtual VOID
139 GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override;
140 virtual VOID
141 GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override;
142 virtual BOOL
143 UninstallApplication(BOOL bModify) override;
144};
145
147{
152
153 BOOL
155 BOOL
156 GetApplicationRegDword(LPCWSTR lpKeyName, DWORD *lpValue);
157 VOID
158 AddApplicationRegString(CAppRichEdit *RichEdit, UINT StringID, const CStringW &String, DWORD TextFlags);
159
160 VOID
162 VOID
164
165 public:
166 const int iKeyIndex;
167 CInstalledApplicationInfo(HKEY Key, const CStringW &KeyName, AppsCategories Category, int KeyIndex);
169
170 virtual BOOL
171 Valid() const override;
172 virtual BOOL
173 CanModify() override;
174 virtual BOOL
175 RetrieveIcon(CStringW &Path) const override;
176 virtual BOOL
178 virtual VOID
179 ShowAppInfo(CAppRichEdit *RichEdit) override;
180 virtual VOID
181 GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override;
182 virtual VOID
183 GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override;
184 virtual BOOL
185 UninstallApplication(BOOL bModify) override;
186};
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 IsAvailableEnum(INT x)
Definition: appinfo.h:55
BOOL IsInstalledEnum(INT x)
Definition: appinfo.h:61
BOOL IsKnownLicenseType(INT x)
Definition: appinfo.h:19
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 RetrieveIcon(CStringW &Path) const =0
virtual VOID GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const =0
CStringW szComments
Definition: appinfo.h:80
virtual VOID ShowAppInfo(CAppRichEdit *RichEdit)=0
CStringW szDisplayIcon
Definition: appinfo.h:77
virtual BOOL CanModify()=0
virtual BOOL UninstallApplication(BOOL bModify)=0
CStringW szDisplayName
Definition: appinfo.h:78
virtual VOID GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload)=0
virtual BOOL Valid() const =0
CStringW szDisplayVersion
Definition: appinfo.h:79
virtual BOOL RetrieveScreenshot(CStringW &Path)=0
virtual ~CAppInfo()
Definition: appinfo.cpp:18
const AppsCategories iCategory
Definition: appinfo.h:75
const CStringW szIdentifier
Definition: appinfo.h:74
CSimpleArray< LCID > m_LanguageLCIDs
Definition: appinfo.h:108
virtual VOID GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override
Definition: appinfo.cpp:359
virtual BOOL RetrieveScreenshot(CStringW &Path) override
Definition: appinfo.cpp:308
virtual BOOL UninstallApplication(BOOL bModify) override
Definition: appinfo.cpp:368
virtual VOID GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override
Definition: appinfo.cpp:342
virtual BOOL CanModify() override
Definition: appinfo.cpp:294
virtual BOOL Valid() const override
Definition: appinfo.cpp:288
VOID InsertLanguageInfo(CAppRichEdit *RichEdit)
Definition: appinfo.cpp:198
virtual BOOL RetrieveIcon(CStringW &Path) const override
Definition: appinfo.cpp:300
CSimpleArray< CStringW > m_szScrnshotLocation
Definition: appinfo.h:103
class CConfigParser * m_Parser
Definition: appinfo.h:102
virtual VOID ShowAppInfo(CAppRichEdit *RichEdit) override
Definition: appinfo.cpp:70
VOID InsertVersionInfo(CAppRichEdit *RichEdit)
Definition: appinfo.cpp:116
virtual VOID ShowAppInfo(CAppRichEdit *RichEdit) override
Definition: appinfo.cpp:408
virtual BOOL RetrieveScreenshot(CStringW &Path) override
Definition: appinfo.cpp:547
BOOL GetApplicationRegDword(LPCWSTR lpKeyName, DWORD *lpValue)
Definition: appinfo.cpp:627
CStringW m_szUninstallString
Definition: appinfo.h:150
virtual BOOL Valid() const override
Definition: appinfo.cpp:523
virtual BOOL RetrieveIcon(CStringW &Path) const override
Definition: appinfo.cpp:540
BOOL GetApplicationRegString(LPCWSTR lpKeyName, CStringW &String)
Definition: appinfo.cpp:581
virtual BOOL UninstallApplication(BOOL bModify) override
Definition: appinfo.cpp:565
VOID AddApplicationRegString(CAppRichEdit *RichEdit, UINT StringID, const CStringW &String, DWORD TextFlags)
Definition: appinfo.cpp:394
virtual VOID GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override
Definition: appinfo.cpp:559
virtual BOOL CanModify() override
Definition: appinfo.cpp:529
virtual VOID GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override
Definition: appinfo.cpp:553
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
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185