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.

88 lines
4.5 KiB

  1. // --------------------------------------------------------------------------
  2. // Module Name: ThemeManagerAPIRequest.h
  3. //
  4. // Copyright (c) 2000, Microsoft Corporation
  5. //
  6. // This file contains a class that implements the work for the theme server.
  7. //
  8. // History: 2000-10-10 vtan created
  9. // 2000-11-29 vtan moved to separate file
  10. // --------------------------------------------------------------------------
  11. #ifndef _ThemeManagerAPIRequest_
  12. #define _ThemeManagerAPIRequest_
  13. #include "APIRequest.h"
  14. #include "DynamicArray.h"
  15. #include "ThemeManagerSessionData.h"
  16. // --------------------------------------------------------------------------
  17. // CThemeManagerAPIRequest
  18. //
  19. // Purpose: This is an intermediate class that contains a common method
  20. // that can be used by sub-classes.
  21. //
  22. // History: 2000-10-10 vtan created
  23. // 2000-11-29 vtan moved to separate file
  24. // 2002-03-21 scotthan add Execute_ProcessLoadTheme, Execute_ProcessAssignSection.
  25. // 2002-03-24 scotthan propagate DispatchSync to API request instance.
  26. // --------------------------------------------------------------------------
  27. class CThemeManagerAPIRequest : public CAPIRequest
  28. {
  29. private:
  30. CThemeManagerAPIRequest (void);
  31. public:
  32. CThemeManagerAPIRequest (CAPIDispatcher* pAPIDispatcher);
  33. CThemeManagerAPIRequest (CAPIDispatcher* pAPIDispatcher, const CPortMessage& portMessage);
  34. virtual ~CThemeManagerAPIRequest (void);
  35. virtual NTSTATUS Execute (CAPIDispatchSync* pAPIDispatchSync);
  36. static NTSTATUS SessionDestroy (DWORD dwSessionID);
  37. static NTSTATUS InitializeServerChangeNumber (void);
  38. static NTSTATUS StaticInitialize (void);
  39. static NTSTATUS StaticTerminate (void);
  40. static NTSTATUS ArrayInitialize (void);
  41. static NTSTATUS ArrayTerminate (void);
  42. private:
  43. NTSTATUS ImpersonateClientIfRequired (void);
  44. NTSTATUS ClientHasTcbPrivilege (void);
  45. static int FindIndexSessionData (DWORD dwSessionID);
  46. NTSTATUS GetClientSessionData (void);
  47. NTSTATUS Execute_ThemeHooksOn (void);
  48. NTSTATUS Execute_ThemeHooksOff (void);
  49. NTSTATUS Execute_GetStatusFlags (void);
  50. NTSTATUS Execute_GetCurrentChangeNumber (void);
  51. NTSTATUS Execute_GetNewChangeNumber (void);
  52. NTSTATUS Execute_SetGlobalTheme (void);
  53. NTSTATUS Execute_MarkSection (void);
  54. NTSTATUS Execute_GetGlobalTheme (void);
  55. NTSTATUS Execute_CheckThemeSignature (void);
  56. NTSTATUS Execute_LoadTheme (void);
  57. NTSTATUS Execute_ProcessLoadTheme (CAPIDispatchSync* pAPIDispatchSync);
  58. NTSTATUS Execute_ProcessAssignSection (void);
  59. // These are internal and typically require SE_TCB_PRIVILEGE to execute.
  60. NTSTATUS Execute_UserLogon (void);
  61. NTSTATUS Execute_UserLogoff (void);
  62. NTSTATUS Execute_SessionCreate (void);
  63. NTSTATUS Execute_SessionDestroy (void);
  64. NTSTATUS Execute_Ping (void);
  65. private:
  66. HANDLE _hToken;
  67. CThemeManagerSessionData* _pSessionData;
  68. static CDynamicCountedObjectArray* s_pSessionData;
  69. static CCriticalSection* s_pLock;
  70. static DWORD s_dwServerChangeNumber;
  71. static const TCHAR s_szServerChangeNumberValue[];
  72. };
  73. #endif /* _ThemeManagerAPIRequest_ */