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.

130 lines
5.0 KiB

  1. /********************************************************************
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. Incident.h
  5. Abstract:
  6. Declaration of the CSAFIncident class.
  7. Revision History:
  8. DerekM created 07/21/99
  9. ********************************************************************/
  10. #if !defined(AFX_INCIDENT_H__C5610F60_3F0C_11D3_80CE_00C04F688C0B__INCLUDED_)
  11. #define AFX_INCIDENT_H__C5610F60_3F0C_11D3_80CE_00C04F688C0B__INCLUDED_
  12. /////////////////////////////////////////////////////////////////////////////
  13. // structures, etc
  14. #include <MPC_utils.h>
  15. #include <MPC_xml.h>
  16. #include <MPC_security.h>
  17. #include "msscript.h"
  18. struct SHelpSessionItem
  19. {
  20. CComBSTR bstrURL;
  21. CComBSTR bstrTitle;
  22. DATE dtLastVisited;
  23. DATE dtDuration;
  24. long cHits;
  25. };
  26. /////////////////////////////////////////////////////////////////////////////
  27. // CSAFIncident
  28. class CSAFIncident :
  29. public CComObjectRootEx<MPC::CComSafeMultiThreadModel>,
  30. public IDispatchImpl<ISAFIncident, &IID_ISAFIncident, &LIBID_HelpServiceTypeLib>
  31. {
  32. private:
  33. MPC::Impersonation m_imp;
  34. SHelpSessionItem* m_rghsi;
  35. EUploadType m_eut;
  36. CComPtr<IDictionary> m_pDict;
  37. CComBSTR m_bstrUser;
  38. CComBSTR m_bstrID;
  39. CComBSTR m_bstrName;
  40. CComBSTR m_bstrProb;
  41. CComBSTR m_bstrSnapshot;
  42. CComBSTR m_bstrHistory;
  43. CComBSTR m_bstrXSL;
  44. CComBSTR m_bstrRCTicket;
  45. long m_chsi;
  46. VARIANT_BOOL m_fRCRequested;
  47. VARIANT_BOOL m_fRCTicketEncrypted;
  48. CComBSTR m_bstrStartPg;
  49. void Cleanup(void);
  50. HRESULT InitDictionary();
  51. HRESULT DoSave( IStream *pStm );
  52. HRESULT DoXML ( IStream *pStm );
  53. HRESULT LoadFromXMLObject( /*[in]*/ MPC::XmlUtil& xmldocIncident );
  54. public:
  55. CSAFIncident();
  56. ~CSAFIncident();
  57. BEGIN_COM_MAP(CSAFIncident)
  58. COM_INTERFACE_ENTRY(IDispatch)
  59. COM_INTERFACE_ENTRY(ISAFIncident)
  60. END_COM_MAP()
  61. DECLARE_NO_REGISTRY()
  62. DECLARE_NOT_AGGREGATABLE(CSAFIncident)
  63. public:
  64. // ISAFIncident
  65. STDMETHOD(get_Misc )( /*[out, retval]*/ IDispatch* *ppdispDict );
  66. STDMETHOD(put_SelfHelpTrace )( /*[in ]*/ IUnknown* punkStr );
  67. STDMETHOD(put_MachineHistory )( /*[in ]*/ IUnknown* punkStm );
  68. STDMETHOD(put_MachineSnapshot )( /*[in ]*/ IUnknown* punkStm );
  69. STDMETHOD(get_ProblemDescription)( /*[out, retval]*/ BSTR *pbstrVal );
  70. STDMETHOD(put_ProblemDescription)( /*[in ]*/ BSTR bstrVal );
  71. STDMETHOD(get_ProductName )( /*[out, retval]*/ BSTR *pbstrVal );
  72. STDMETHOD(put_ProductName )( /*[in ]*/ BSTR bstrVal );
  73. STDMETHOD(get_ProductID )( /*[out, retval]*/ BSTR *pbstrVal );
  74. STDMETHOD(put_ProductID )( /*[in ]*/ BSTR bstrVal );
  75. STDMETHOD(get_UserName )( /*[out, retval]*/ BSTR *pbstrVal );
  76. STDMETHOD(put_UserName )( /*[in ]*/ BSTR bstrVal );
  77. STDMETHOD(get_UploadType )( /*[out, retval]*/ EUploadType *peut );
  78. STDMETHOD(put_UploadType )( /*[in ]*/ EUploadType eut );
  79. STDMETHOD(get_IncidentXSL )( /*[out, retval]*/ BSTR *pbstrVal );
  80. STDMETHOD(put_IncidentXSL )( /*[in ]*/ BSTR bstrVal );
  81. // Salem Changes
  82. STDMETHOD(get_RCRequested )( /*[out, retval]*/ VARIANT_BOOL *pVal );
  83. STDMETHOD(put_RCRequested )( /*[in] */ VARIANT_BOOL Val );
  84. STDMETHOD(get_RCTicketEncrypted )( /*[out, retval]*/ VARIANT_BOOL *pVal );
  85. STDMETHOD(put_RCTicketEncrypted )( /*[in] */ VARIANT_BOOL Val );
  86. STDMETHOD(get_RCTicket )( /*[out, retval]*/ BSTR *pbstrVal );
  87. STDMETHOD(put_RCTicket )( /*[in] */ BSTR bstrVal );
  88. STDMETHOD(get_StartPage )( /*[out, retval]*/ BSTR *pbstrVal );
  89. STDMETHOD(put_StartPage )( /*[in] */ BSTR bstrVal );
  90. STDMETHOD(LoadFromStream)( /*[in ]*/ IUnknown* punkStm );
  91. STDMETHOD(SaveToStream )( /*[out, retval]*/ IUnknown* *ppunkStm );
  92. STDMETHOD(Load )( /*[in ]*/ BSTR bstrFileName );
  93. STDMETHOD(Save )( /*[in ]*/ BSTR bstrFileName );
  94. STDMETHOD(GetXMLAsStream)( /*[out, retval]*/ IUnknown* *ppunkStm );
  95. STDMETHOD(GetXML )( /*[in ]*/ BSTR bstrFileName );
  96. STDMETHOD(LoadFromXMLStream)( /*[in] */ IUnknown* punkStm );
  97. STDMETHOD(LoadFromXMLFile )( /*[in] */ BSTR bstrFileName );
  98. STDMETHOD(LoadFromXMLString)( /*[in] */ BSTR bstrIncidentXML );
  99. STDMETHOD(CloseRemoteAssistanceIncident) ();
  100. };
  101. #endif // !defined(AFX_INCIDENT_H__C5610F60_3F0C_11D3_80CE_00C04F688C0B__INCLUDED_)