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.

108 lines
3.7 KiB

  1. /****************************************************************************/
  2. // tssdsql.h
  3. //
  4. // Terminal Server Session Directory Interface SQL provider header.
  5. //
  6. // Copyright (C) 2000 Microsoft Corporation
  7. /****************************************************************************/
  8. #ifndef __TSSDSQL_H
  9. #define __TSSDSQL_H
  10. #include <tchar.h>
  11. #include "tssd.h"
  12. #include "srvsetex.h"
  13. /****************************************************************************/
  14. // Defines
  15. /****************************************************************************/
  16. /****************************************************************************/
  17. // Types
  18. /****************************************************************************/
  19. // CTSSessionDirectory
  20. //
  21. // C++ class instantiation of ITSSessionDirectory.
  22. class CTSSessionDirectory : public ITSSessionDirectory , public IExtendServerSettings
  23. {
  24. long m_RefCount;
  25. BSTR m_DBConnectStr;
  26. BSTR m_DBPwdStr;
  27. BSTR m_DBUserStr;
  28. ADOConnection *m_pConnection;
  29. DWORD m_ServerID;
  30. DWORD m_ClusterID;
  31. WCHAR m_LocalServerAddress[64];
  32. WCHAR m_ClusterName[64];
  33. // Private data for UI menus
  34. // WCHAR m_szDisableEnable[ 64 ];
  35. BOOL m_fEnabled;
  36. // Private utility functions.
  37. HRESULT AddADOInputDWORDParam(DWORD, PWSTR, ADOCommand *, ADOParameters *);
  38. HRESULT AddADOInputStringParam(PWSTR, PWSTR, ADOCommand *,
  39. ADOParameters *, BOOL = TRUE);
  40. HRESULT CreateADOStoredProcCommand(PWSTR, ADOCommand **, ADOParameters **);
  41. HRESULT ExecServerOnline();
  42. HRESULT ExecServerOffline();
  43. HRESULT OpenConnection();
  44. public:
  45. CTSSessionDirectory();
  46. ~CTSSessionDirectory();
  47. // Standard COM methods
  48. HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, void **);
  49. ULONG STDMETHODCALLTYPE AddRef();
  50. ULONG STDMETHODCALLTYPE Release();
  51. // ITSSessionDirectory COM interface
  52. HRESULT STDMETHODCALLTYPE Initialize(LPWSTR, LPWSTR, LPWSTR, LPWSTR,
  53. DWORD, DWORD (*)(), DWORD (*)(DWORD));
  54. HRESULT STDMETHODCALLTYPE Update(LPWSTR, LPWSTR, LPWSTR, LPWSTR, DWORD, BOOL);
  55. HRESULT STDMETHODCALLTYPE GetUserDisconnectedSessions(LPWSTR, LPWSTR,
  56. DWORD __RPC_FAR *, TSSD_DisconnectedSessionInfo __RPC_FAR
  57. [TSSD_MaxDisconnectedSessions]);
  58. HRESULT STDMETHODCALLTYPE NotifyCreateLocalSession(
  59. TSSD_CreateSessionInfo __RPC_FAR *);
  60. HRESULT STDMETHODCALLTYPE NotifyDestroyLocalSession(DWORD);
  61. HRESULT STDMETHODCALLTYPE NotifyDisconnectLocalSession(DWORD, FILETIME);
  62. HRESULT STDMETHODCALLTYPE NotifyReconnectLocalSession(
  63. TSSD_ReconnectSessionInfo __RPC_FAR *);
  64. HRESULT STDMETHODCALLTYPE NotifyReconnectPending(WCHAR *);
  65. HRESULT STDMETHODCALLTYPE Repopulate(DWORD, TSSD_RepopulateSessionInfo *);
  66. HRESULT STDMETHODCALLTYPE PingSD(PWCHAR pszServerName);
  67. HRESULT STDMETHODCALLTYPE WaitForRepopulate(DWORD dwTimeOut) { return E_NOTIMPL; }
  68. // IExtendServerSettings COM interface
  69. STDMETHOD( GetAttributeName )( /* out */ WCHAR * pwszAttribName );
  70. STDMETHOD( GetDisplayableValueName )( /* out */WCHAR * pwszAttribValueName );
  71. STDMETHOD( InvokeUI )( /* in */ HWND hParent , /* out */ PDWORD pdwStatus );
  72. STDMETHOD( GetMenuItems )( /* out */ int * pcbItems , /* out */ PMENUEXTENSION *pMex );
  73. STDMETHOD( ExecMenuCmd )( /* in */ UINT cmd , /* in */ HWND hParent , /* out */ PDWORD pdwStatus );
  74. STDMETHOD( OnHelp )( /* out */ int *piRet );
  75. BOOL IsSessionDirectoryEnabled( );
  76. DWORD SetSessionDirectoryState( BOOL );
  77. void ErrorMessage( HWND hwnd , UINT res , DWORD );
  78. public:
  79. LPTSTR m_pszOpaqueString;
  80. };
  81. #endif // __TSSDSQL_H