xref: /reactos/base/services/browser/rpcserver.c (revision ede7a20a)
1 /*
2  * PROJECT:     ReactOS Browser Service
3  * LICENSE:     GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4  * PURPOSE:     Browser service RPC server
5  * COPYRIGHT:   Eric Kohl 2020 <eric.kohl@reactos.org>
6  */
7 
8 /* INCLUDES *****************************************************************/
9 
10 #include "precomp.h"
11 
12 //#include "lmerr.h"
13 
14 WINE_DEFAULT_DEBUG_CHANNEL(browser);
15 
16 /* FUNCTIONS *****************************************************************/
17 
18 DWORD
19 WINAPI
20 RpcThreadRoutine(
21     LPVOID lpParameter)
22 {
23     RPC_STATUS Status;
24 
25     Status = RpcServerUseProtseqEpW(L"ncacn_np", 20, L"\\pipe\\browser", NULL);
26     if (Status != RPC_S_OK)
27     {
28         ERR("RpcServerUseProtseqEpW() failed (Status %lx)\n", Status);
29         return 0;
30     }
31 
32     Status = RpcServerRegisterIf(browser_v0_0_s_ifspec, NULL, NULL);
33     if (Status != RPC_S_OK)
34     {
35         ERR("RpcServerRegisterIf() failed (Status %lx)\n", Status);
36         return 0;
37     }
38 
39     Status = RpcServerListen(1, RPC_C_LISTEN_MAX_CALLS_DEFAULT, FALSE);
40     if (Status != RPC_S_OK)
41     {
42         ERR("RpcServerListen() failed (Status %lx)\n", Status);
43     }
44 
45     return 0;
46 }
47 
48 
49 void __RPC_FAR * __RPC_USER midl_user_allocate(SIZE_T len)
50 {
51     return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
52 }
53 
54 
55 void __RPC_USER midl_user_free(void __RPC_FAR * ptr)
56 {
57     HeapFree(GetProcessHeap(), 0, ptr);
58 }
59 
60 
61 /* Function 0 */
62 NET_API_STATUS
63 __stdcall
64 I_BrowserrServerEnum(
65     BROWSER_IDENTIFY_HANDLE ServerName,
66     LPWSTR Transport,
67     LPWSTR ClientName,
68     LPSERVER_ENUM_STRUCT EnumStruct,
69     DWORD PreferedMaximumLength,
70     LPDWORD TotalEntries,
71     DWORD ServerType,
72     LPWSTR Domain,
73     LPDWORD ResumeHandle)
74 {
75     UNIMPLEMENTED;
76     return 0;
77 }
78 
79 
80 /* Function 1 (BrowserrDebugCall) */
81 NET_API_STATUS
82 __stdcall
83 BrowserOpnum1NotUsedOnWire(VOID)
84 {
85     UNIMPLEMENTED;
86     return 0;
87 }
88 
89 
90 /* Function 2 */
91 NET_API_STATUS
92 __stdcall
93 I_BrowserrQueryOtherDomains(
94     BROWSER_IDENTIFY_HANDLE ServerName,
95     LPSERVER_ENUM_STRUCT EnumStruct,
96     LPDWORD TotalEntries)
97 {
98     UNIMPLEMENTED;
99     return 0;
100 }
101 
102 
103 /* Function 3 */
104 NET_API_STATUS
105 __stdcall
106 I_BrowserrResetNetlogonState(
107     BROWSER_IDENTIFY_HANDLE ServerName)
108 {
109     UNIMPLEMENTED;
110     return 0;
111 }
112 
113 
114 /* Function 4 */
115 NET_API_STATUS
116 __stdcall
117 I_BrowserrDebugTrace(
118     BROWSER_IDENTIFY_HANDLE ServerName,
119     LPSTR String)
120 {
121     UNIMPLEMENTED;
122     return 0;
123 }
124 
125 
126 /* Function 5 */
127 NET_API_STATUS
128 __stdcall
129 I_BrowserrQueryStatistics(
130     BROWSER_IDENTIFY_HANDLE ServerName,
131     LPBROWSER_STATISTICS *Statistics)
132 {
133     UNIMPLEMENTED;
134     return 0;
135 }
136 
137 
138 /* Function 6 */
139 NET_API_STATUS
140 __stdcall
141 I_BrowserrResetStatistics(
142     BROWSER_IDENTIFY_HANDLE ServerName)
143 {
144     UNIMPLEMENTED;
145     return 0;
146 }
147 
148 
149 /* Function 7 - Not used on wire */
150 NET_API_STATUS
151 __stdcall
152 NetrBrowserStatisticsClear(
153     BROWSER_IDENTIFY_HANDLE ServerName)
154 {
155     UNIMPLEMENTED;
156     return 0;
157 }
158 
159 
160 /* Function 8 */
161 NET_API_STATUS
162 __stdcall
163 NetrBrowserStatisticsGet(
164     BROWSER_IDENTIFY_HANDLE ServerName,
165     DWORD Level,
166     LPBROWSER_STATISTICS_STRUCT StatisticsStruct)
167 {
168     UNIMPLEMENTED;
169     return 0;
170 }
171 
172 
173 /* Function 9 */
174 NET_API_STATUS
175 __stdcall
176 I_BrowserrSetNetlogonState(
177     BROWSER_IDENTIFY_HANDLE ServerName,
178     LPWSTR DomainName,
179     LPWSTR EmulatedComputerName,
180     DWORD Role)
181 {
182     UNIMPLEMENTED;
183     return 0;
184 }
185 
186 
187 /* Function 10 */
188 NET_API_STATUS
189 __stdcall
190 I_BrowserrQueryEmulatedDomains(
191     BROWSER_IDENTIFY_HANDLE ServerName,
192     PBROWSER_EMULATED_DOMAIN_CONTAINER EmulatedDomains)
193 {
194     UNIMPLEMENTED;
195     return 0;
196 }
197 
198 
199 /* Function 11 (BrowserrServerEnumEx) */
200 NET_API_STATUS
201 __stdcall
202 BrowserOpnum11NotUsedOnWire(void)
203 {
204     UNIMPLEMENTED;
205     return 0;
206 }
207 
208 /* EOF */
209