Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenrpc_server.h
Go to the documentation of this file.
00001 /* 00002 * RPC server API 00003 * 00004 * Copyright 2001 Ove Kåven, TransGaming Technologies 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00019 */ 00020 00021 #ifndef __WINE_RPC_SERVER_H 00022 #define __WINE_RPC_SERVER_H 00023 00024 #include "rpc_binding.h" 00025 #include "wine/list.h" 00026 00027 struct protseq_ops; 00028 00029 typedef struct _RpcServerProtseq 00030 { 00031 const struct protseq_ops *ops; /* RO */ 00032 struct list entry; /* CS ::server_cs */ 00033 LPSTR Protseq; /* RO */ 00034 UINT MaxCalls; /* RO */ 00035 /* list of listening connections */ 00036 RpcConnection* conn; /* CS cs */ 00037 CRITICAL_SECTION cs; 00038 00039 /* is the server currently listening? */ 00040 BOOL is_listening; /* CS ::listen_cs */ 00041 /* mutex for ensuring only one thread can change state at a time */ 00042 HANDLE mgr_mutex; 00043 /* set when server thread has finished opening connections */ 00044 HANDLE server_ready_event; 00045 } RpcServerProtseq; 00046 00047 struct protseq_ops 00048 { 00049 const char *name; 00050 RpcServerProtseq *(*alloc)(void); 00051 void (*signal_state_changed)(RpcServerProtseq *protseq); 00052 /* previous array is passed in to allow reuse of memory */ 00053 void *(*get_wait_array)(RpcServerProtseq *protseq, void *prev_array, unsigned int *count); 00054 void (*free_wait_array)(RpcServerProtseq *protseq, void *array); 00055 /* returns -1 for failure, 0 for server state changed and 1 to indicate a 00056 * new connection was established */ 00057 int (*wait_for_new_connection)(RpcServerProtseq *protseq, unsigned int count, void *wait_array); 00058 /* opens the endpoint and optionally begins listening */ 00059 RPC_STATUS (*open_endpoint)(RpcServerProtseq *protseq, const char *endpoint); 00060 }; 00061 00062 typedef struct _RpcServerInterface 00063 { 00064 struct list entry; 00065 RPC_SERVER_INTERFACE* If; 00066 UUID MgrTypeUuid; 00067 RPC_MGR_EPV* MgrEpv; 00068 UINT Flags; 00069 UINT MaxCalls; 00070 UINT MaxRpcSize; 00071 RPC_IF_CALLBACK_FN* IfCallbackFn; 00072 LONG CurrentCalls; /* number of calls currently executing */ 00073 /* set when unregistering interface to let the caller of 00074 * RpcServerUnregisterIf* know that all calls have finished */ 00075 HANDLE CallsCompletedEvent; 00076 BOOL Delete; /* delete when the last call finishes */ 00077 } RpcServerInterface; 00078 00079 void RPCRT4_new_client(RpcConnection* conn) DECLSPEC_HIDDEN; 00080 const struct protseq_ops *rpcrt4_get_protseq_ops(const char *protseq) DECLSPEC_HIDDEN; 00081 00082 void RPCRT4_destroy_all_protseqs(void) DECLSPEC_HIDDEN; 00083 void RPCRT4_ServerFreeAllRegisteredAuthInfo(void) DECLSPEC_HIDDEN; 00084 00085 #endif /* __WINE_RPC_SERVER_H */ Generated on Mon May 28 2012 04:25:43 for ReactOS by
1.7.6.1
|