xref: /reactos/dll/win32/wlanapi/profile.c (revision 9393fc32)
1*c2c66affSColin Finck /*
2*c2c66affSColin Finck  * Wireless LAN API (wlanapi.dll)
3*c2c66affSColin Finck  *
4*c2c66affSColin Finck  * Copyright 2009 Christoph von Wittich (Christoph@ApiViewer.de)
5*c2c66affSColin Finck  *
6*c2c66affSColin Finck  * This library is free software; you can redistribute it and/or
7*c2c66affSColin Finck  * modify it under the terms of the GNU Lesser General Public
8*c2c66affSColin Finck  * License as published by the Free Software Foundation; either
9*c2c66affSColin Finck  * version 2.1 of the License, or (at your option) any later version.
10*c2c66affSColin Finck  *
11*c2c66affSColin Finck  * This library is distributed in the hope that it will be useful,
12*c2c66affSColin Finck  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13*c2c66affSColin Finck  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14*c2c66affSColin Finck  * Lesser General Public License for more details.
15*c2c66affSColin Finck  *
16*c2c66affSColin Finck  * You should have received a copy of the GNU Lesser General Public
17*c2c66affSColin Finck  * License along with this library; if not, write to the Free Software
18*c2c66affSColin Finck  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
19*c2c66affSColin Finck  */
20*c2c66affSColin Finck 
21*c2c66affSColin Finck 
22*c2c66affSColin Finck /* INCLUDES ****************************************************************/
23*c2c66affSColin Finck #define WIN32_NO_STATUS
24*c2c66affSColin Finck #define _INC_WINDOWS
25*c2c66affSColin Finck #define COM_NO_WINDOWS_H
26*c2c66affSColin Finck #include <stdarg.h>
27*c2c66affSColin Finck #include <windef.h>
28*c2c66affSColin Finck #include <winbase.h>
29*c2c66affSColin Finck #include <wlansvc_c.h>
30*c2c66affSColin Finck 
31*c2c66affSColin Finck #include <wine/debug.h>
32*c2c66affSColin Finck 
33*c2c66affSColin Finck WINE_DEFAULT_DEBUG_CHANNEL(wlanapi);
34*c2c66affSColin Finck 
35*c2c66affSColin Finck DWORD
36*c2c66affSColin Finck WINAPI
WlanDeleteProfile(IN HANDLE hClientHandle,IN const GUID * pInterfaceGuid,IN LPCWSTR strProfileName,PVOID pReserved)37*c2c66affSColin Finck WlanDeleteProfile(IN HANDLE hClientHandle,
38*c2c66affSColin Finck                   IN const GUID *pInterfaceGuid,
39*c2c66affSColin Finck                   IN LPCWSTR strProfileName,
40*c2c66affSColin Finck                   PVOID pReserved)
41*c2c66affSColin Finck {
42*c2c66affSColin Finck     DWORD dwResult = ERROR_SUCCESS;
43*c2c66affSColin Finck 
44*c2c66affSColin Finck     if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) || (strProfileName == NULL))
45*c2c66affSColin Finck         return ERROR_INVALID_PARAMETER;
46*c2c66affSColin Finck 
47*c2c66affSColin Finck     RpcTryExcept
48*c2c66affSColin Finck     {
49*c2c66affSColin Finck         dwResult = _RpcDeleteProfile(hClientHandle, pInterfaceGuid, strProfileName);
50*c2c66affSColin Finck     }
51*c2c66affSColin Finck     RpcExcept(EXCEPTION_EXECUTE_HANDLER)
52*c2c66affSColin Finck     {
53*c2c66affSColin Finck         dwResult = RpcExceptionCode();
54*c2c66affSColin Finck     }
55*c2c66affSColin Finck     RpcEndExcept;
56*c2c66affSColin Finck 
57*c2c66affSColin Finck     return dwResult;
58*c2c66affSColin Finck }
59*c2c66affSColin Finck 
60*c2c66affSColin Finck DWORD
61*c2c66affSColin Finck WINAPI
WlanRenameProfile(IN HANDLE hClientHandle,IN const GUID * pInterfaceGuid,IN LPCWSTR strOldProfileName,IN LPCWSTR strNewProfileName,PVOID pReserved)62*c2c66affSColin Finck WlanRenameProfile(IN HANDLE hClientHandle,
63*c2c66affSColin Finck                   IN const GUID *pInterfaceGuid,
64*c2c66affSColin Finck                   IN LPCWSTR strOldProfileName,
65*c2c66affSColin Finck                   IN LPCWSTR strNewProfileName,
66*c2c66affSColin Finck                   PVOID pReserved)
67*c2c66affSColin Finck {
68*c2c66affSColin Finck     DWORD dwResult = ERROR_SUCCESS;
69*c2c66affSColin Finck 
70*c2c66affSColin Finck     if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) || (strOldProfileName == NULL) || (strNewProfileName == NULL))
71*c2c66affSColin Finck         return ERROR_INVALID_PARAMETER;
72*c2c66affSColin Finck 
73*c2c66affSColin Finck     RpcTryExcept
74*c2c66affSColin Finck     {
75*c2c66affSColin Finck         dwResult = _RpcRenameProfile(hClientHandle, pInterfaceGuid, strOldProfileName, strNewProfileName);
76*c2c66affSColin Finck     }
77*c2c66affSColin Finck     RpcExcept(EXCEPTION_EXECUTE_HANDLER)
78*c2c66affSColin Finck     {
79*c2c66affSColin Finck         dwResult = RpcExceptionCode();
80*c2c66affSColin Finck     }
81*c2c66affSColin Finck     RpcEndExcept;
82*c2c66affSColin Finck 
83*c2c66affSColin Finck     return dwResult;
84*c2c66affSColin Finck }
85*c2c66affSColin Finck 
86*c2c66affSColin Finck DWORD
87*c2c66affSColin Finck WINAPI
WlanGetProfile(IN HANDLE hClientHandle,IN const GUID * pInterfaceGuid,IN LPCWSTR strProfileName,PVOID pReserved,OUT LPWSTR * pstrProfileXml,DWORD * pdwFlags,PDWORD pdwGrantedAccess)88*c2c66affSColin Finck WlanGetProfile(IN HANDLE hClientHandle,
89*c2c66affSColin Finck                IN const GUID *pInterfaceGuid,
90*c2c66affSColin Finck                IN LPCWSTR strProfileName,
91*c2c66affSColin Finck                PVOID pReserved,
92*c2c66affSColin Finck                OUT LPWSTR *pstrProfileXml,
93*c2c66affSColin Finck                DWORD *pdwFlags,
94*c2c66affSColin Finck                PDWORD pdwGrantedAccess)
95*c2c66affSColin Finck {
96*c2c66affSColin Finck     if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) || (pstrProfileXml  == NULL))
97*c2c66affSColin Finck         return ERROR_INVALID_PARAMETER;
98*c2c66affSColin Finck 
99*c2c66affSColin Finck     UNIMPLEMENTED;
100*c2c66affSColin Finck     return ERROR_SUCCESS;
101*c2c66affSColin Finck }
102*c2c66affSColin Finck 
103*c2c66affSColin Finck DWORD
104*c2c66affSColin Finck WINAPI
WlanSetProfile(IN HANDLE hClientHandle,IN const GUID * pInterfaceGuid,IN DWORD dwFlags,IN LPCWSTR strProfileXml,LPCWSTR strAllUserProfileSecurity,IN BOOL bOverwrite,PVOID pReserved,OUT DWORD * pdwReasonCode)105*c2c66affSColin Finck WlanSetProfile(IN HANDLE hClientHandle,
106*c2c66affSColin Finck                IN const GUID *pInterfaceGuid,
107*c2c66affSColin Finck                IN DWORD dwFlags,
108*c2c66affSColin Finck                IN LPCWSTR strProfileXml,
109*c2c66affSColin Finck                LPCWSTR strAllUserProfileSecurity,
110*c2c66affSColin Finck                IN BOOL bOverwrite,
111*c2c66affSColin Finck                PVOID pReserved,
112*c2c66affSColin Finck                OUT DWORD *pdwReasonCode)
113*c2c66affSColin Finck {
114*c2c66affSColin Finck     if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) || (strProfileXml == NULL) || (pdwReasonCode == NULL))
115*c2c66affSColin Finck         return ERROR_INVALID_PARAMETER;
116*c2c66affSColin Finck 
117*c2c66affSColin Finck     UNIMPLEMENTED;
118*c2c66affSColin Finck     return ERROR_SUCCESS;
119*c2c66affSColin Finck }
120*c2c66affSColin Finck 
121*c2c66affSColin Finck DWORD
122*c2c66affSColin Finck WINAPI
WlanGetProfileCustomUserData(IN HANDLE hClientHandle,IN const GUID * pInterfaceGuid,IN LPCWSTR strProfileName,PVOID pReserved,OUT DWORD * pdwDataSize,OUT PBYTE * ppData)123*c2c66affSColin Finck WlanGetProfileCustomUserData(IN HANDLE hClientHandle,
124*c2c66affSColin Finck                              IN const GUID *pInterfaceGuid,
125*c2c66affSColin Finck                              IN LPCWSTR strProfileName,
126*c2c66affSColin Finck                              PVOID pReserved,
127*c2c66affSColin Finck                              OUT DWORD *pdwDataSize,
128*c2c66affSColin Finck                              OUT PBYTE *ppData)
129*c2c66affSColin Finck {
130*c2c66affSColin Finck     if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) || (strProfileName == NULL))
131*c2c66affSColin Finck         return ERROR_INVALID_PARAMETER;
132*c2c66affSColin Finck 
133*c2c66affSColin Finck     UNIMPLEMENTED;
134*c2c66affSColin Finck     return ERROR_SUCCESS;
135*c2c66affSColin Finck }
136*c2c66affSColin Finck 
137*c2c66affSColin Finck DWORD
138*c2c66affSColin Finck WINAPI
WlanSetProfileCustomUserData(IN HANDLE hClientHandle,IN const GUID * pInterfaceGuid,IN LPCWSTR strProfileName,IN DWORD dwDataSize,IN const PBYTE pData,PVOID pReserved)139*c2c66affSColin Finck WlanSetProfileCustomUserData(IN HANDLE hClientHandle,
140*c2c66affSColin Finck                              IN const GUID *pInterfaceGuid,
141*c2c66affSColin Finck                              IN LPCWSTR strProfileName,
142*c2c66affSColin Finck                              IN DWORD dwDataSize,
143*c2c66affSColin Finck                              IN const PBYTE pData,
144*c2c66affSColin Finck                              PVOID pReserved)
145*c2c66affSColin Finck {
146*c2c66affSColin Finck     if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) || (strProfileName == NULL))
147*c2c66affSColin Finck         return ERROR_INVALID_PARAMETER;
148*c2c66affSColin Finck 
149*c2c66affSColin Finck     if ((dwDataSize != 0) && (pData == NULL))
150*c2c66affSColin Finck         return ERROR_INVALID_PARAMETER;
151*c2c66affSColin Finck 
152*c2c66affSColin Finck     UNIMPLEMENTED;
153*c2c66affSColin Finck     return ERROR_SUCCESS;
154*c2c66affSColin Finck }
155*c2c66affSColin Finck 
156*c2c66affSColin Finck DWORD
157*c2c66affSColin Finck WINAPI
WlanGetProfileList(IN HANDLE hClientHandle,IN const GUID * pInterfaceGuid,PVOID pReserved,OUT PWLAN_PROFILE_INFO_LIST * ppProfileList)158*c2c66affSColin Finck WlanGetProfileList(IN HANDLE hClientHandle,
159*c2c66affSColin Finck                    IN const GUID *pInterfaceGuid,
160*c2c66affSColin Finck                    PVOID pReserved,
161*c2c66affSColin Finck                    OUT PWLAN_PROFILE_INFO_LIST *ppProfileList)
162*c2c66affSColin Finck {
163*c2c66affSColin Finck     if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) || (ppProfileList  == NULL))
164*c2c66affSColin Finck         return ERROR_INVALID_PARAMETER;
165*c2c66affSColin Finck 
166*c2c66affSColin Finck     UNIMPLEMENTED;
167*c2c66affSColin Finck     return ERROR_SUCCESS;
168*c2c66affSColin Finck }
169*c2c66affSColin Finck 
170*c2c66affSColin Finck DWORD
171*c2c66affSColin Finck WINAPI
WlanSetProfileList(IN HANDLE hClientHandle,IN const GUID * pInterfaceGuid,DWORD dwItems,IN LPCWSTR * strProfileNames,PVOID pReserved)172*c2c66affSColin Finck WlanSetProfileList(IN HANDLE hClientHandle,
173*c2c66affSColin Finck                    IN const GUID *pInterfaceGuid,
174*c2c66affSColin Finck                    DWORD dwItems,
175*c2c66affSColin Finck                    IN LPCWSTR *strProfileNames,
176*c2c66affSColin Finck                    PVOID pReserved)
177*c2c66affSColin Finck {
178*c2c66affSColin Finck     if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) || (strProfileNames  == NULL) || (dwItems == 0))
179*c2c66affSColin Finck         return ERROR_INVALID_PARAMETER;
180*c2c66affSColin Finck 
181*c2c66affSColin Finck     UNIMPLEMENTED;
182*c2c66affSColin Finck     return ERROR_SUCCESS;
183*c2c66affSColin Finck }
184