wmiutils: Introduce memory allocation helpers.
[wine] / include / wmiutils.idl
1 /*
2  * Copyright 2012 Hans Leidekker for CodeWeavers
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18
19 import "oaidl.idl";
20
21 interface IWbemPath;
22 interface IWbemPathKeyList;
23
24 typedef [v1_enum] enum tag_WBEM_PATH_CREATE_FLAG
25 {
26     WBEMPATH_CREATE_ACCEPT_RELATIVE     = 0x1,
27     WBEMPATH_CREATE_ACCEPT_ABSOLUTE     = 0x2,
28     WBEMPATH_CREATE_ACCEPT_ALL          = 0x4,
29     WBEMPATH_TREAT_SINGLE_IDENT_AS_NS   = 0x8
30 } tag_WBEM_PATH_CREATE_FLAG;
31
32 typedef [v1_enum] enum tag_WBEM_GET_TEXT_FLAGS
33 {
34     WBEMPATH_COMPRESSED                     = 0x1,
35     WBEMPATH_GET_RELATIVE_ONLY              = 0x2,
36     WBEMPATH_GET_SERVER_TOO                 = 0x4,
37     WBEMPATH_GET_SERVER_AND_NAMESPACE_ONLY  = 0x8,
38     WBEMPATH_GET_NAMESPACE_ONLY             = 0x10,
39     WBEMPATH_GET_ORIGINAL                   = 0x20
40 } tag_WBEM_GET_TEXT_FLAGS;
41
42 [
43     local,
44     object,
45     uuid(9ae62877-7544-4bb0-aa26-a13824659ed6)
46 ]
47 interface IWbemPathKeyList : IUnknown
48 {
49     HRESULT GetCount(
50         [out] ULONG *puKeyCount);
51
52     HRESULT SetKey(
53         [in,string] LPCWSTR wszName,
54         [in] ULONG uFlags,
55         [in] ULONG uCimType,
56         [in] LPVOID pKeyVal);
57
58     HRESULT SetKey2(
59         [in,string] LPCWSTR wszName,
60         [in] ULONG uFlags,
61         [in] ULONG uCimType,
62         [in] VARIANT *pKeyVal);
63
64     HRESULT GetKey(
65         [in] ULONG uKeyIx,
66         [in] ULONG uFlags,
67         [in,out] ULONG *puNameBufSize,
68         [in,out] LPWSTR pszKeyName,
69         [in,out] ULONG *puKeyValBufSize,
70         [in,out] LPVOID pKeyVal,
71         [out] ULONG *puApparentCimType);
72
73     HRESULT GetKey2(
74         [in] ULONG uKeyIx,
75         [in] ULONG uFlags,
76         [in,out] ULONG *puNameBufSize,
77         [in,out] LPWSTR pszKeyName,
78         [in,out] VARIANT *pKeyValue,
79         [out] ULONG *puApparentCimType);
80
81     HRESULT RemoveKey(
82         [in,string] LPCWSTR wszName,
83         [in] ULONG uFlags);
84
85     HRESULT RemoveAllKeys(
86         [in] ULONG uFlags);
87
88     HRESULT MakeSingleton([in] boolean bSet);
89
90     HRESULT GetInfo(
91         [in] ULONG uRequestedInfo,
92         [out] ULONGLONG *puResponse);
93
94     HRESULT GetText(
95         [in] long lFlags,
96         [in,out] ULONG *puBuffLength,
97         [in,out,string] LPWSTR pszText);
98 };
99
100 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
101 cpp_quote("#undef GetClassName")
102 cpp_quote("#endif")
103
104 [
105     local,
106     object,
107     uuid(3bc15af2-736c-477e-9e51-238af8667dcc)
108 ]
109 interface IWbemPath : IUnknown
110 {
111     HRESULT SetText(
112         [in] ULONG uMode,
113         [in] LPCWSTR pszPath);
114
115     HRESULT GetText(
116         [in] long lFlags,
117         [in,out] ULONG *puBuffLength,
118         [in,out,string] LPWSTR pszText);
119
120     HRESULT GetInfo(
121         [in] ULONG uRequestedInfo,
122         [out] ULONGLONG *puResponse);
123
124     HRESULT SetServer(
125         [in,string] LPCWSTR Name);
126
127     HRESULT GetServer(
128         [in,out] ULONG *puNameBufLength,
129         [in,out,string] LPWSTR pName);
130
131     HRESULT GetNamespaceCount(
132         [out] ULONG *puCount);
133
134     HRESULT SetNamespaceAt(
135         [in] ULONG uIndex,
136         [in,string] LPCWSTR pszName);
137
138     HRESULT GetNamespaceAt(
139         [in] ULONG uIndex,
140         [in,out] ULONG *puNameBufLength,
141         [in,out,string] LPWSTR pName);
142
143     HRESULT RemoveNamespaceAt(
144         [in] ULONG uIndex);
145
146     HRESULT RemoveAllNamespaces();
147
148     HRESULT GetScopeCount(
149         [out] ULONG *puCount);
150
151     HRESULT SetScope(
152         [in] ULONG uIndex,
153         [in] LPWSTR pszClass);
154
155     HRESULT SetScopeFromText(
156         [in] ULONG uIndex,
157         [in] LPWSTR pszText);
158
159     HRESULT GetScope(
160         [in] ULONG uIndex,
161         [in,out] ULONG *puClassNameBufSize,
162         [in,out] LPWSTR pszClass,
163         [out] IWbemPathKeyList **pKeyList);
164
165     HRESULT GetScopeAsText(
166         [in] ULONG uIndex,
167         [in,out] ULONG *puTextBufSize,
168         [in,out] LPWSTR pszText);
169
170     HRESULT RemoveScope(
171         [in] ULONG uIndex);
172
173     HRESULT RemoveAllScopes();
174
175     HRESULT SetClassName(
176         [in,string] LPCWSTR Name);
177
178     HRESULT GetClassName(
179         [in,out] ULONG *puBuffLength,
180         [in,out,string] LPWSTR pszName);
181
182     HRESULT GetKeyList(
183         [out] IWbemPathKeyList **pOut);
184
185     HRESULT CreateClassPart(
186         [in] long lFlags,
187         [in,string] LPCWSTR Name);
188
189     HRESULT DeleteClassPart(
190         [in] long lFlags);
191
192     BOOL IsRelative(
193         [in,string] LPWSTR wszMachine,
194         [in,string] LPWSTR wszNamespace);
195
196     BOOL IsRelativeOrChild(
197         [in,string] LPWSTR wszMachine,
198         [in,string] LPWSTR wszNamespace,
199         [in] long lFlags);
200
201     BOOL IsLocal(
202         [in,string] LPCWSTR wszMachine);
203
204     BOOL IsSameClassName(
205         [in,string] LPCWSTR wszClass);
206 };
207
208 [
209     uuid(cf4cc405-e2c5-4ddd-b3ce-5e7582d8c9fa)
210 ]
211 coclass WbemDefPath
212 {
213     interface IWbemPath;
214 };