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.

105 lines
3.4 KiB

  1. //****************************************************************************
  2. //
  3. // Module: ULS.DLL
  4. // File: localprt.h
  5. // Content: This file contains the LocalProtocol object definition.
  6. // History:
  7. // Wed 17-Apr-1996 11:18:47 -by- Viroon Touranachun [viroont]
  8. //
  9. // Copyright (c) Microsoft Corporation 1996-1997
  10. //
  11. //****************************************************************************
  12. #ifndef _CLOCALPROT_H_
  13. #define _CLOCALPROT_H_
  14. #include "connpt.h"
  15. //****************************************************************************
  16. // Enumeration type
  17. //****************************************************************************
  18. //
  19. typedef enum {
  20. ILS_PROT_SET_ATTRIBUTES,
  21. ILS_PROT_REMOVE_ATTRIBUTES,
  22. } PROT_CHANGE_ATTRS;
  23. //****************************************************************************
  24. // CIls definition
  25. //****************************************************************************
  26. //
  27. class CLocalProt : public IIlsProtocol,
  28. public IConnectionPointContainer
  29. {
  30. private:
  31. LONG m_cRef;
  32. BOOL m_fReadonly;
  33. HANDLE m_hProt;
  34. LPTSTR m_pszUser;
  35. LPTSTR m_pszApp;
  36. LPTSTR m_szName;
  37. ULONG m_uPort;
  38. LPTSTR m_szMimeType;
  39. CAttributes *m_pAttrs;
  40. CConnectionPoint *m_pConnPt;
  41. // server object
  42. CIlsServer *m_pIlsServer;
  43. // Private method
  44. //
  45. STDMETHODIMP NotifySink (void *pv, CONN_NOTIFYPROC pfn);
  46. public:
  47. // Constructor and destructor
  48. CLocalProt (void);
  49. ~CLocalProt (void);
  50. STDMETHODIMP Init (BSTR bstrName, ULONG uPort, BSTR bstrMimeType);
  51. STDMETHODIMP Init (CIlsServer *pIlsServer,
  52. LPTSTR szUserName,
  53. LPTSTR szAppName,
  54. PLDAP_PROTINFO ppi);
  55. // Internal methods
  56. STDMETHODIMP IsSameAs (CLocalProt *pProtocol);
  57. STDMETHODIMP GetProtocolInfo (PLDAP_PROTINFO *ppProtInfo);
  58. VOID SetProviderHandle ( HANDLE hProt ) { m_hProt = hProt; };
  59. HANDLE GetProviderHandle ( VOID ) { return m_hProt; };
  60. // Asynchronous response handler
  61. //
  62. // IUnknown
  63. STDMETHODIMP QueryInterface (REFIID iid, void **ppv);
  64. STDMETHODIMP_(ULONG) AddRef (void);
  65. STDMETHODIMP_(ULONG) Release (void);
  66. // IIlsLocalProtocol
  67. STDMETHODIMP IsWritable(
  68. BOOL *pValue);
  69. STDMETHODIMP GetPortNumber(ULONG *pulPortNumber);
  70. STDMETHODIMP GetStandardAttribute(
  71. ILS_STD_ATTR_NAME enumUlsStdAttr,
  72. BSTR *pbstrName);
  73. STDMETHODIMP SetStandardAttribute(
  74. ILS_STD_ATTR_NAME enumUlsStdAttr,
  75. BSTR pbstrName);
  76. STDMETHODIMP Update ( ULONG *puReqID );
  77. STDMETHODIMP GetExtendedAttribute ( BSTR bstrName, BSTR *pbstrValue );
  78. STDMETHODIMP SetExtendedAttribute ( BSTR bstrName, BSTR bstrValue );
  79. STDMETHODIMP RemoveExtendedAttribute ( BSTR bstrName );
  80. STDMETHODIMP GetAllExtendedAttributes ( IIlsAttributes **ppAttributes );
  81. // IConnectionPointContainer
  82. STDMETHODIMP EnumConnectionPoints(IEnumConnectionPoints **ppEnum);
  83. STDMETHODIMP FindConnectionPoint(REFIID riid,
  84. IConnectionPoint **ppcp);
  85. };
  86. #endif //_CLOCALPROT_H_