Create the AHCI branch for Aman's work
[reactos.git] / base / services / schedsvc / rpcserver.c
1 /*
2 * ReactOS Services
3 * Copyright (C) 2015 ReactOS Team
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19 /*
20 * COPYRIGHT: See COPYING in the top level directory
21 * PROJECT: ReactOS Services
22 * FILE: base/services/schedsvc/rpcserver.c
23 * PURPOSE: Scheduler service
24 * PROGRAMMER: Eric Kohl
25 */
26
27 /* INCLUDES *****************************************************************/
28
29 #include "precomp.h"
30
31 #include "lmerr.h"
32
33 WINE_DEFAULT_DEBUG_CHANNEL(schedsvc);
34
35 /* FUNCTIONS *****************************************************************/
36
37 DWORD
38 WINAPI
39 RpcThreadRoutine(
40 LPVOID lpParameter)
41 {
42 RPC_STATUS Status;
43
44 Status = RpcServerUseProtseqEpW(L"ncacn_np", 20, L"\\pipe\\atsvc", NULL);
45 if (Status != RPC_S_OK)
46 {
47 ERR("RpcServerUseProtseqEpW() failed (Status %lx)\n", Status);
48 return 0;
49 }
50
51 Status = RpcServerRegisterIf(atsvc_v1_0_s_ifspec, NULL, NULL);
52 if (Status != RPC_S_OK)
53 {
54 ERR("RpcServerRegisterIf() failed (Status %lx)\n", Status);
55 return 0;
56 }
57
58 Status = RpcServerListen(1, RPC_C_LISTEN_MAX_CALLS_DEFAULT, FALSE);
59 if (Status != RPC_S_OK)
60 {
61 ERR("RpcServerListen() failed (Status %lx)\n", Status);
62 }
63
64 return 0;
65 }
66
67
68 void __RPC_FAR * __RPC_USER midl_user_allocate(SIZE_T len)
69 {
70 return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
71 }
72
73
74 void __RPC_USER midl_user_free(void __RPC_FAR * ptr)
75 {
76 HeapFree(GetProcessHeap(), 0, ptr);
77 }
78
79
80 /* Function 0 */
81 NET_API_STATUS
82 WINAPI
83 NetrJobAdd(
84 ATSVC_HANDLE ServerName,
85 LPAT_INFO pAtInfo,
86 LPDWORD pJobId)
87 {
88 return ERROR_SUCCESS;
89 }
90
91
92 /* Function 1 */
93 NET_API_STATUS
94 WINAPI
95 NetrJobDel(
96 ATSVC_HANDLE ServerName,
97 DWORD MinJobId,
98 DWORD MaxJobId)
99 {
100 return ERROR_SUCCESS;
101 }
102
103
104 /* Function 2 */
105 NET_API_STATUS
106 __stdcall
107 NetrJobEnum(
108 ATSVC_HANDLE ServerName,
109 LPAT_ENUM_CONTAINER pEnumContainer,
110 DWORD PreferedMaximumLength,
111 LPDWORD pTotalEntries,
112 LPDWORD pResumeHandle)
113 {
114 return ERROR_SUCCESS;
115 }
116
117
118 /* Function 3 */
119 NET_API_STATUS
120 WINAPI
121 NetrJobGetInfo(
122 ATSVC_HANDLE ServerName,
123 DWORD JobId,
124 LPAT_INFO *ppAtInfo)
125 {
126 return ERROR_SUCCESS;
127 }
128
129 /* EOF */