Release 1.2-rc6.
[wine/gsoc-2012-control.git] / include / gameux.idl
blobf9ec1e5b67b87a9ae7ecb2da84abc5d0899e33ad
1 /*
2 * Defines the COM interfaces of Game Explorer
4 * Copyright (C) 2008 Alistair Leslie-Hughes
5 * Copyright (C) 2010 Mariusz PluciƄski
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.
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.
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
22 import "oaidl.idl";
23 import "ocidl.idl";
24 import "shobjidl.idl";
27 uuid(1DE6CE3D-EA69-4671-941F-26F789F39C5B),
28 version(1.0),
29 helpstring("gameux public 1.0 Type Library")
31 library gameuxLib
33 importlib("stdole2.tlb");
35 typedef enum
37 GIS_NOT_INSTALLED = 1,
38 GIS_CURRENT_USER = 2,
39 GIS_ALL_USERS = 3
40 } GAME_INSTALL_SCOPE;
42 typedef enum
44 GAMESTATS_OPEN_OPENORCREATE = 0,
45 GAMESTATS_OPEN_OPENONLY = 1
46 } GAMESTATS_OPEN_TYPE;
48 typedef enum
50 GAMESTATS_OPEN_CREATED = 0,
51 GAMESTATS_OPEN_OPENED = 1
52 } GAMESTATS_OPEN_RESULT;
55 object,
56 uuid(E7B2FB72-D728-49B3-A5F2-18EBF5F1349E)
58 interface IGameExplorer : IUnknown
60 HRESULT AddGame([in] BSTR sGDFBinaryPath,
61 [in] BSTR sInstallDirectory,
62 [in] GAME_INSTALL_SCOPE installScope,
63 [in, out] GUID* pguidInstanceID);
65 HRESULT RemoveGame([in] GUID instanceID);
67 HRESULT UpdateGame([in] GUID instanceID);
69 HRESULT VerifyAccess([in] BSTR sGDFBinaryPath,
70 [out] BOOL* pHasAccess);
74 object,
75 uuid(3887C9CA-04A0-42ae-BC4C-5FA6C7721145)
77 interface IGameStatistics : IUnknown
79 HRESULT GetMaxCategoryLength(
80 [retval, out] UINT* cch);
82 HRESULT GetMaxNameLength(
83 [retval, out] UINT* cch);
85 HRESULT GetMaxValueLength(
86 [retval, out] UINT* cch);
88 HRESULT GetMaxCategories(
89 [retval, out] WORD* pMax);
91 HRESULT GetMaxStatsPerCategory(
92 [retval, out] WORD* pMax);
94 HRESULT SetCategoryTitle(
95 [in] WORD categoryIndex,
96 [string, in] LPCWSTR title);
98 HRESULT GetCategoryTitle(
99 [in] WORD categoryIndex,
100 [retval, string, out] LPWSTR* pTitle);
102 HRESULT GetStatistic(
103 [in] WORD categoryIndex,
104 [in] WORD statIndex,
105 [string, unique, out, in] LPWSTR* pName,
106 [string, unique, out, in] LPWSTR* pValue);
108 HRESULT SetStatistic(
109 [in] WORD categoryIndex,
110 [in] WORD statIndex,
111 [string, in] LPCWSTR name,
112 [string, in] LPCWSTR value);
114 HRESULT Save(
115 [in] BOOL trackChanges);
117 HRESULT SetLastPlayedCategory(
118 [in] UINT categoryIndex);
120 HRESULT GetLastPlayedCategory(
121 [retval, out] UINT* pCategoryIndex);
125 object,
126 uuid(AFF3EA11-E70E-407d-95DD-35E612C41CE2)
128 interface IGameStatisticsMgr : IUnknown
130 HRESULT GetGameStatistics(
131 [string, in] LPCWSTR GDFBinaryPath,
132 [in] GAMESTATS_OPEN_TYPE openType,
133 [out] GAMESTATS_OPEN_RESULT* pOpenResult,
134 [retval, out] IGameStatistics** ppiStats);
136 HRESULT RemoveGameStatistics(
137 [string, in] LPCWSTR GDFBinaryPath);
141 object,
142 uuid(86874AA7-A1ED-450d-A7EB-B89E20B2FFF3)
144 interface IGameExplorer2 : IUnknown
146 HRESULT InstallGame(
147 [string, in] LPCWSTR binaryGDFPath,
148 [unique, in] LPCWSTR installDirectory,
149 [in] GAME_INSTALL_SCOPE installScope);
151 HRESULT UninstallGame(
152 [string, in] LPCWSTR binaryGDFPath);
154 HRESULT CheckAccess(
155 [string, in] LPCWSTR binaryGDFPath,
156 [retval, out] BOOL* pHasAccess);
161 uuid(9A5EA990-3034-4D6F-9128-01F3C61022BC)
163 coclass GameExplorer
165 [default] interface IGameExplorer;
169 uuid(DBC85A2C-C0DC-4961-B6E2-D28B62C11AD4)
171 coclass GameStatistics
173 [default] interface IGameStatistics;