Source code of Windows XP (NT5)
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.

60 lines
2.6 KiB

  1. // --------------------------------------------------------------------------
  2. // Module Name: ThemeManagerSessionData.h
  3. //
  4. // Copyright (c) 2000, Microsoft Corporation
  5. //
  6. // This file contains a class that implements information the encapsulates a
  7. // client TS session for the theme server.
  8. //
  9. // History: 2000-10-10 vtan created
  10. // 2000-11-29 vtan moved to separate file
  11. // --------------------------------------------------------------------------
  12. #ifndef _ThemeManagerSessionData_
  13. #define _ThemeManagerSessionData_
  14. #include "APIConnection.h"
  15. // --------------------------------------------------------------------------
  16. // CThemeManagerSessionData
  17. //
  18. // Purpose: This class encapsulates all the information that the theme
  19. // manager needs to maintain a client session.
  20. //
  21. // History: 2000-11-17 vtan created
  22. // 2000-11-29 vtan moved to separate file
  23. // --------------------------------------------------------------------------
  24. class CThemeManagerSessionData : public CCountedObject
  25. {
  26. private:
  27. CThemeManagerSessionData (void);
  28. public:
  29. CThemeManagerSessionData (DWORD dwSessionID);
  30. ~CThemeManagerSessionData (void);
  31. void* GetData (void) const;
  32. bool EqualSessionID (DWORD dwSessionID) const;
  33. NTSTATUS Allocate (HANDLE hProcessClient, DWORD dwServerChangeNumber, void *pfnRegister, void *pfnUnregister, void *pfnClearStockObjects, DWORD dwStackSizeReserve, DWORD dwStackSizeCommit);
  34. NTSTATUS Cleanup (void);
  35. NTSTATUS UserLogon (HANDLE hToken);
  36. NTSTATUS UserLogoff (void);
  37. static void SetAPIConnection (CAPIConnection *pAPIConnection);
  38. static void ReleaseAPIConnection (void);
  39. private:
  40. void SessionTermination (void);
  41. static void CALLBACK CB_SessionTermination (void *pParameter, BOOLEAN TimerOrWaitFired);
  42. static DWORD WINAPI CB_UnregisterWait (void *pParameter);
  43. private:
  44. DWORD _dwSessionID;
  45. void* _pvThemeLoaderData;
  46. HANDLE _hToken;
  47. HANDLE _hProcessClient;
  48. HANDLE _hWait;
  49. static CAPIConnection* s_pAPIConnection;
  50. };
  51. #endif /* _ThemeManagerSessionData_ */