wine/include/gameux.idl
2010-06-08 16:35:22 +02:00

176 lines
4.8 KiB
Plaintext

/*
* Defines the COM interfaces of Game Explorer
*
* Copyright (C) 2008 Alistair Leslie-Hughes
* Copyright (C) 2010 Mariusz Pluciński
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
import "oaidl.idl";
import "ocidl.idl";
import "shobjidl.idl";
[
uuid(1DE6CE3D-EA69-4671-941F-26F789F39C5B),
version(1.0),
helpstring("gameux public 1.0 Type Library")
]
library gameuxLib
{
importlib("stdole2.tlb");
typedef enum
{
GIS_NOT_INSTALLED = 1,
GIS_CURRENT_USER = 2,
GIS_ALL_USERS = 3
} GAME_INSTALL_SCOPE;
typedef enum
{
GAMESTATS_OPEN_OPENORCREATE = 0,
GAMESTATS_OPEN_OPENONLY = 1
} GAMESTATS_OPEN_TYPE;
typedef enum
{
GAMESTATS_OPEN_CREATED = 0,
GAMESTATS_OPEN_OPENED = 1
} GAMESTATS_OPEN_RESULT;
[
object,
uuid(E7B2FB72-D728-49B3-A5F2-18EBF5F1349E)
]
interface IGameExplorer : IUnknown
{
HRESULT AddGame([in] BSTR sGDFBinaryPath,
[in] BSTR sInstallDirectory,
[in] GAME_INSTALL_SCOPE installScope,
[in, out] GUID* pguidInstanceID);
HRESULT RemoveGame([in] GUID instanceID);
HRESULT UpdateGame([in] GUID instanceID);
HRESULT VerifyAccess([in] BSTR sGDFBinaryPath,
[out] BOOL* pHasAccess);
};
[
object,
uuid(3887C9CA-04A0-42ae-BC4C-5FA6C7721145)
]
interface IGameStatistics : IUnknown
{
HRESULT GetMaxCategoryLength(
[retval, out] UINT* cch);
HRESULT GetMaxNameLength(
[retval, out] UINT* cch);
HRESULT GetMaxValueLength(
[retval, out] UINT* cch);
HRESULT GetMaxCategories(
[retval, out] WORD* pMax);
HRESULT GetMaxStatsPerCategory(
[retval, out] WORD* pMax);
HRESULT SetCategoryTitle(
[in] WORD categoryIndex,
[string, in] LPCWSTR title);
HRESULT GetCategoryTitle(
[in] WORD categoryIndex,
[retval, string, out] LPWSTR* pTitle);
HRESULT GetStatistic(
[in] WORD categoryIndex,
[in] WORD statIndex,
[string, unique, out, in] LPWSTR* pName,
[string, unique, out, in] LPWSTR* pValue);
HRESULT SetStatistic(
[in] WORD categoryIndex,
[in] WORD statIndex,
[string, in] LPCWSTR name,
[string, in] LPCWSTR value);
HRESULT Save(
[in] BOOL trackChanges);
HRESULT SetLastPlayedCategory(
[in] UINT categoryIndex);
HRESULT GetLastPlayedCategory(
[retval, out] UINT* pCategoryIndex);
};
[
object,
uuid(AFF3EA11-E70E-407d-95DD-35E612C41CE2)
]
interface IGameStatisticsMgr : IUnknown
{
HRESULT GetGameStatistics(
[string, in] LPCWSTR GDFBinaryPath,
[in] GAMESTATS_OPEN_TYPE openType,
[out] GAMESTATS_OPEN_RESULT* pOpenResult,
[retval, out] IGameStatistics** ppiStats);
HRESULT RemoveGameStatistics(
[string, in] LPCWSTR GDFBinaryPath);
};
[
object,
uuid(86874AA7-A1ED-450d-A7EB-B89E20B2FFF3)
]
interface IGameExplorer2 : IUnknown
{
HRESULT InstallGame(
[string, in] LPCWSTR binaryGDFPath,
[unique, in] LPCWSTR installDirectory,
[in] GAME_INSTALL_SCOPE installScope);
HRESULT UninstallGame(
[string, in] LPCWSTR binaryGDFPath);
HRESULT CheckAccess(
[string, in] LPCWSTR binaryGDFPath,
[retval, out] BOOL* pHasAccess);
}
[
uuid(9A5EA990-3034-4D6F-9128-01F3C61022BC)
]
coclass GameExplorer
{
[default] interface IGameExplorer;
};
[
uuid(DBC85A2C-C0DC-4961-B6E2-D28B62C11AD4)
]
coclass GameStatistics
{
[default] interface IGameStatistics;
};
}