Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
2.4 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. //
  4. // File: aqrpcsvr.h
  5. //
  6. // Description: Header file for AQueue server-side RPC implementations.
  7. // Contains per-instance initialization functions.
  8. //
  9. // Author: Mike Swafford (MikeSwa)
  10. //
  11. // History:
  12. // 6/5/99 - MikeSwa Created
  13. //
  14. // Copyright (C) 1999 Microsoft Corporation
  15. //
  16. //-----------------------------------------------------------------------------
  17. #ifndef __AQRPCSVR_H__
  18. #define __AQRPCSVR_H__
  19. #include <aqincs.h>
  20. #include <rwnew.h>
  21. #include <baseobj.h>
  22. #include <shutdown.h>
  23. #include <mailmsg.h>
  24. class CAQSvrInst;
  25. #define CAQRpcSvrInst_Sig 'cpRQ'
  26. #define CAQRpcSvrInst_SigFree 'cpR!'
  27. //---[ CAQRpcSvrInst ]---------------------------------------------------------
  28. //
  29. //
  30. // Description:
  31. // Per-instance RPC class. Handles RPC details and shutdown timing
  32. // Hungarian:
  33. // aqrpc, paqrpc
  34. //
  35. //-----------------------------------------------------------------------------
  36. class CAQRpcSvrInst :
  37. public CBaseObject,
  38. public CSyncShutdown
  39. {
  40. private:
  41. static CShareLockNH s_slPrivateData;
  42. static LIST_ENTRY s_liInstancesHead;
  43. static RPC_BINDING_VECTOR *s_pRpcBindingVector;
  44. static BOOL s_fEndpointsRegistered;
  45. protected:
  46. DWORD m_dwSignature;
  47. LIST_ENTRY m_liInstances;
  48. CAQSvrInst *m_paqinst;
  49. DWORD m_dwVirtualServerID;
  50. ISMTPServer *m_pISMTPServer;
  51. public:
  52. CAQRpcSvrInst(CAQSvrInst *paqinst, DWORD dwVirtualServerID,
  53. ISMTPServer *pISMTPServer);
  54. ~CAQRpcSvrInst();
  55. CAQSvrInst *paqinstGetAQ() {return m_paqinst;};
  56. static CAQRpcSvrInst *paqrpcGetRpcSvrInstance(DWORD dwVirtualServerID);
  57. BOOL fAccessCheck(BOOL fReadOnly);
  58. public: //static functions
  59. static HRESULT HrInitializeAQRpc();
  60. static HRESULT HrDeinitializeAQRpc();
  61. static HRESULT HrInitializeAQServerInstanceRPC(CAQSvrInst *paqinst,
  62. DWORD dwVirtualServerID,
  63. ISMTPServer *pISMTPServer);
  64. static HRESULT HrDeinitializeAQServerInstanceRPC(CAQSvrInst *paqinst,
  65. DWORD dwVirtualServerID);
  66. };
  67. #endif //__AQRPCSVR_H__