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.

114 lines
4.2 KiB

  1. /*****************************************************************************
  2. * (C) COPYRIGHT MICROSOFT CORPORATION, 2002
  3. *
  4. * AUTHOR: ByronC
  5. *
  6. * DATE: 4/13/2002
  7. *
  8. * @doc INTERNAL
  9. *
  10. * @module StiEventHandlerInfo.h - Definitions for <c StiEventHandlerInfo> |
  11. *
  12. * This file contains the class definition for <c StiEventHandlerInfo>.
  13. *
  14. *****************************************************************************/
  15. //
  16. // Defines
  17. //
  18. #define StiEventHandlerInfo_UNINIT_SIG 0x55497645
  19. #define StiEventHandlerInfo_INIT_SIG 0x49497645
  20. #define StiEventHandlerInfo_TERM_SIG 0x54497645
  21. #define StiEventHandlerInfo_DEL_SIG 0x44497645
  22. #define STI_DEVICE_TOKEN L"%1"
  23. #define STI_EVENT_TOKEN L"%2"
  24. /*****************************************************************************
  25. *
  26. * @doc INTERNAL
  27. *
  28. * @class StiEventHandlerInfo | Information pertaining to a STI persistent event handler
  29. *
  30. * @comm
  31. * This class contians the all information relating to a particular
  32. * STI persistent event handler. This information is typically used to
  33. * launch the handler itsself, although a list of these may be presented for
  34. * the user to choose which handler to launch via the STI Event prompt.
  35. *
  36. *****************************************************************************/
  37. class StiEventHandlerInfo
  38. {
  39. //@access Public members
  40. public:
  41. // @cmember Constructor
  42. StiEventHandlerInfo(const CSimpleStringWide &cswAppName, const CSimpleStringWide &cswCommandline);
  43. // @cmember Destructor
  44. virtual ~StiEventHandlerInfo();
  45. // @cmember Increment reference count
  46. virtual ULONG __stdcall AddRef();
  47. // @cmember Decrement reference count
  48. virtual ULONG __stdcall Release();
  49. // @cmember Accessor method for the application name
  50. CSimpleStringWide getAppName();
  51. // @cmember Accessor method for the commandline the application registered
  52. CSimpleStringWide getCommandline();
  53. // @cmember The commandline used to start the application, after substituting DeviceID and event parameters
  54. CSimpleStringWide getPreparedCommandline(const CSimpleStringWide &cswDeviceID, const CSimpleStringWide &cswEventGuid);
  55. // @cmember The commandline used to start the application, after substituting DeviceID and event parameters
  56. CSimpleStringWide getPreparedCommandline(const CSimpleStringWide &cswDeviceID, const GUID &guidEvent);
  57. // @cmember Dumps the object info to the trace log
  58. VOID Dump();
  59. //@access Private members
  60. private:
  61. CSimpleStringWide ExpandTokenIntoString(const CSimpleStringWide &cswInput,
  62. const CSimpleStringWide &cswToken,
  63. const CSimpleStringWide &cswTokenValue);
  64. // @cmember Signature of class
  65. ULONG m_ulSig;
  66. // @cmember Ref count
  67. ULONG m_cRef;
  68. // @cmember The STI handler name
  69. CSimpleStringWide m_cswAppName;
  70. // @cmember The STI handler commandline
  71. CSimpleStringWide m_cswCommandline;
  72. //
  73. // Comments for member variables
  74. //
  75. // @mdata ULONG | StiEventHandlerInfo | m_ulSig |
  76. // The signature for this class, used for debugging purposes.
  77. // Doing a <nl>"db [addr_of_class]"<nl> would yield one of the following
  78. // signatures for this class:
  79. // @flag StiEventHandlerInfo_UNINIT_SIG | 'EvIU' - Object has not been successfully
  80. // initialized
  81. // @flag StiEventHandlerInfo_INIT_SIG | 'EvII' - Object has been successfully
  82. // initialized
  83. // @flag StiEventHandlerInfo_TERM_SIG | 'EvIT' - Object is in the process of
  84. // terminating.
  85. // @flag StiEventHandlerInfo_INIT_SIG | 'EvID' - Object has been deleted
  86. // (destructor was called)
  87. //
  88. //
  89. // @mdata ULONG | StiEventHandlerInfo | m_cRef |
  90. // The reference count for this class. Used for lifetime
  91. // management.
  92. //
  93. // @mdata CSimpleStringWide | StiEventHandlerInfo | m_cswAppName |
  94. // The application name of this STI event handler.
  95. //
  96. // @mdata CSimpleStringWide | StiEventHandlerInfo | m_cswCommandline |
  97. // The STI handler's commandline, used to launch the handler.
  98. //
  99. };