1 | /*
|
---|
2 | * Defines the COM interfaces of Game Explorer
|
---|
3 | *
|
---|
4 | * Copyright (C) 2008 Alistair Leslie-Hughes
|
---|
5 | * Copyright (C) 2010 Mariusz Pluciński
|
---|
6 | *
|
---|
7 | * This library is free software; you can redistribute it and/or
|
---|
8 | * modify it under the terms of the GNU Lesser General Public
|
---|
9 | * License as published by the Free Software Foundation; either
|
---|
10 | * version 2.1 of the License, or (at your option) any later version.
|
---|
11 | *
|
---|
12 | * This library is distributed in the hope that it will be useful,
|
---|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
15 | * Lesser General Public License for more details.
|
---|
16 | *
|
---|
17 | * You should have received a copy of the GNU Lesser General Public
|
---|
18 | * License along with this library; if not, write to the Free Software
|
---|
19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
20 | */
|
---|
21 |
|
---|
22 | /*
|
---|
23 | * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
24 | * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
|
---|
25 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
26 | * a choice of LGPL license versions is made available with the language indicating
|
---|
27 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
28 | * of the LGPL is applied is otherwise unspecified.
|
---|
29 | */
|
---|
30 |
|
---|
31 | import "oaidl.idl";
|
---|
32 | import "ocidl.idl";
|
---|
33 | import "shobjidl.idl";
|
---|
34 |
|
---|
35 | #ifndef __WIDL__
|
---|
36 | #define threading(model)
|
---|
37 | #define progid(str)
|
---|
38 | #define vi_progid(str)
|
---|
39 | #endif
|
---|
40 |
|
---|
41 | [
|
---|
42 | uuid(4F48A59C-942D-4F3C-83C9-4EFFE84E4959),
|
---|
43 | version(1.0),
|
---|
44 | helpstring("gameux public 1.0 Type Library")
|
---|
45 | ]
|
---|
46 | library gameuxLib
|
---|
47 | {
|
---|
48 | importlib("stdole2.tlb");
|
---|
49 |
|
---|
50 | cpp_quote("#define ID_GDF_XML __GDF_XML")
|
---|
51 | cpp_quote("#define ID_GDF_THUMBNAIL __GDF_THUMBNAIL")
|
---|
52 | cpp_quote("#define ID_ICON_ICO __ICON_ICO")
|
---|
53 |
|
---|
54 | cpp_quote("#if defined(__GNUC__)")
|
---|
55 | cpp_quote("#define ID_GDF_XML_STR (const WCHAR[]){'_','_','G','D','F','_','X','M','L',0}")
|
---|
56 | cpp_quote("#define ID_GDF_THUMBNAIL_STR (const WCHAR[]){'_','_','G','D','F','_','T','H','U','M','B','N','A','I','L',0}")
|
---|
57 | cpp_quote("#elif defined(_MSC_VER)")
|
---|
58 | cpp_quote("#define ID_GDF_XML_STR L\"__GDF_XML\"")
|
---|
59 | cpp_quote("#define ID_GDF_THUMBNAIL_STR L\"__GDF_THUMBNAIL\"")
|
---|
60 | cpp_quote("#endif")
|
---|
61 |
|
---|
62 | typedef enum
|
---|
63 | {
|
---|
64 | GIS_NOT_INSTALLED = 1,
|
---|
65 | GIS_CURRENT_USER = 2,
|
---|
66 | GIS_ALL_USERS = 3
|
---|
67 | } GAME_INSTALL_SCOPE;
|
---|
68 |
|
---|
69 | typedef enum
|
---|
70 | {
|
---|
71 | GAMESTATS_OPEN_OPENORCREATE = 0,
|
---|
72 | GAMESTATS_OPEN_OPENONLY = 1
|
---|
73 | } GAMESTATS_OPEN_TYPE;
|
---|
74 |
|
---|
75 | typedef enum
|
---|
76 | {
|
---|
77 | GAMESTATS_OPEN_CREATED = 0,
|
---|
78 | GAMESTATS_OPEN_OPENED = 1
|
---|
79 | } GAMESTATS_OPEN_RESULT;
|
---|
80 |
|
---|
81 | [
|
---|
82 | object,
|
---|
83 | uuid(E7B2FB72-D728-49B3-A5F2-18EBF5F1349E)
|
---|
84 | ]
|
---|
85 | interface IGameExplorer : IUnknown
|
---|
86 | {
|
---|
87 | HRESULT AddGame([in] BSTR sGDFBinaryPath,
|
---|
88 | [in] BSTR sInstallDirectory,
|
---|
89 | [in] GAME_INSTALL_SCOPE installScope,
|
---|
90 | [in, out] GUID* pguidInstanceID);
|
---|
91 |
|
---|
92 | HRESULT RemoveGame([in] GUID instanceID);
|
---|
93 |
|
---|
94 | HRESULT UpdateGame([in] GUID instanceID);
|
---|
95 |
|
---|
96 | HRESULT VerifyAccess([in] BSTR sGDFBinaryPath,
|
---|
97 | [out] BOOL* pHasAccess);
|
---|
98 | };
|
---|
99 |
|
---|
100 | [
|
---|
101 | object,
|
---|
102 | uuid(3887C9CA-04A0-42ae-BC4C-5FA6C7721145)
|
---|
103 | ]
|
---|
104 | interface IGameStatistics : IUnknown
|
---|
105 | {
|
---|
106 | HRESULT GetMaxCategoryLength(
|
---|
107 | [retval, out] UINT* cch);
|
---|
108 |
|
---|
109 | HRESULT GetMaxNameLength(
|
---|
110 | [retval, out] UINT* cch);
|
---|
111 |
|
---|
112 | HRESULT GetMaxValueLength(
|
---|
113 | [retval, out] UINT* cch);
|
---|
114 |
|
---|
115 | HRESULT GetMaxCategories(
|
---|
116 | [retval, out] WORD* pMax);
|
---|
117 |
|
---|
118 | HRESULT GetMaxStatsPerCategory(
|
---|
119 | [retval, out] WORD* pMax);
|
---|
120 |
|
---|
121 | HRESULT SetCategoryTitle(
|
---|
122 | [in] WORD categoryIndex,
|
---|
123 | [string, in] LPCWSTR title);
|
---|
124 |
|
---|
125 | HRESULT GetCategoryTitle(
|
---|
126 | [in] WORD categoryIndex,
|
---|
127 | [retval, string, out] LPWSTR* pTitle);
|
---|
128 |
|
---|
129 | HRESULT GetStatistic(
|
---|
130 | [in] WORD categoryIndex,
|
---|
131 | [in] WORD statIndex,
|
---|
132 | [string, unique, out, in] LPWSTR* pName,
|
---|
133 | [string, unique, out, in] LPWSTR* pValue);
|
---|
134 |
|
---|
135 | HRESULT SetStatistic(
|
---|
136 | [in] WORD categoryIndex,
|
---|
137 | [in] WORD statIndex,
|
---|
138 | [string, in] LPCWSTR name,
|
---|
139 | [string, in] LPCWSTR value);
|
---|
140 |
|
---|
141 | HRESULT Save(
|
---|
142 | [in] BOOL trackChanges);
|
---|
143 |
|
---|
144 | HRESULT SetLastPlayedCategory(
|
---|
145 | [in] UINT categoryIndex);
|
---|
146 |
|
---|
147 | HRESULT GetLastPlayedCategory(
|
---|
148 | [retval, out] UINT* pCategoryIndex);
|
---|
149 | };
|
---|
150 |
|
---|
151 | [
|
---|
152 | object,
|
---|
153 | uuid(AFF3EA11-E70E-407d-95DD-35E612C41CE2)
|
---|
154 | ]
|
---|
155 | interface IGameStatisticsMgr : IUnknown
|
---|
156 | {
|
---|
157 | HRESULT GetGameStatistics(
|
---|
158 | [string, in] LPCWSTR GDFBinaryPath,
|
---|
159 | [in] GAMESTATS_OPEN_TYPE openType,
|
---|
160 | [out] GAMESTATS_OPEN_RESULT* pOpenResult,
|
---|
161 | [retval, out] IGameStatistics** ppiStats);
|
---|
162 |
|
---|
163 | HRESULT RemoveGameStatistics(
|
---|
164 | [string, in] LPCWSTR GDFBinaryPath);
|
---|
165 | };
|
---|
166 |
|
---|
167 | [
|
---|
168 | object,
|
---|
169 | uuid(86874AA7-A1ED-450d-A7EB-B89E20B2FFF3)
|
---|
170 | ]
|
---|
171 | interface IGameExplorer2 : IUnknown
|
---|
172 | {
|
---|
173 | HRESULT InstallGame(
|
---|
174 | [string, in] LPCWSTR binaryGDFPath,
|
---|
175 | [unique, in] LPCWSTR installDirectory,
|
---|
176 | [in] GAME_INSTALL_SCOPE installScope);
|
---|
177 |
|
---|
178 | HRESULT UninstallGame(
|
---|
179 | [string, in] LPCWSTR binaryGDFPath);
|
---|
180 |
|
---|
181 | HRESULT CheckAccess(
|
---|
182 | [string, in] LPCWSTR binaryGDFPath,
|
---|
183 | [retval, out] BOOL* pHasAccess);
|
---|
184 |
|
---|
185 | }
|
---|
186 |
|
---|
187 | [
|
---|
188 | helpstring("GameExplorer Class"),
|
---|
189 | threading(both),
|
---|
190 | progid("gameux.GameExplorer.1"),
|
---|
191 | vi_progid("gameux.GameExplorer"),
|
---|
192 | uuid(9A5EA990-3034-4D6F-9128-01F3C61022BC)
|
---|
193 | ]
|
---|
194 | coclass GameExplorer
|
---|
195 | {
|
---|
196 | [default] interface IGameExplorer;
|
---|
197 | };
|
---|
198 |
|
---|
199 | [
|
---|
200 | helpstring("GameStatistics Class"),
|
---|
201 | threading(apartment),
|
---|
202 | progid("gameux.GameStatistics.1"),
|
---|
203 | vi_progid("gameux.GameStatistics"),
|
---|
204 | uuid(DBC85A2C-C0DC-4961-B6E2-D28B62C11AD4)
|
---|
205 | ]
|
---|
206 | coclass GameStatistics
|
---|
207 | {
|
---|
208 | [default] interface IGameStatistics;
|
---|
209 | };
|
---|
210 | }
|
---|