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.

126 lines
4.4 KiB

  1. /******************************************************************************
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. Service.h
  5. Abstract:
  6. This file contains the declaration of the CPCHService class.
  7. Revision History:
  8. Davide Massarenti (Dmassare) 03/14/2000
  9. created
  10. Kalyani Narlanka (kalyanin) 10/20/2000
  11. Additions for Unsolicited Remote Control
  12. ******************************************************************************/
  13. #if !defined(__INCLUDED___PCH___SERVICE_H___)
  14. #define __INCLUDED___PCH___SERVICE_H___
  15. //
  16. // From HelpServiceTypeLib.idl
  17. //
  18. #include <HelpServiceTypeLib.h>
  19. #include <ContentStoreMgr.h>
  20. #include <TaxonomyDatabase.h>
  21. //
  22. // From SessMgr.idl
  23. //
  24. #include <sessmgr.h>
  25. class ATL_NO_VTABLE CPCHService :
  26. public CComObjectRootEx<MPC::CComSafeMultiThreadModel>,
  27. public CComCoClass<CPCHService, &CLSID_PCHService>,
  28. public IDispatchImpl<IPCHService, &IID_IPCHService, &LIBID_HelpServiceTypeLib>
  29. {
  30. bool m_fVerified;
  31. public:
  32. DECLARE_NO_REGISTRY()
  33. DECLARE_NOT_AGGREGATABLE(CPCHService)
  34. DECLARE_PROTECT_FINAL_CONSTRUCT()
  35. BEGIN_COM_MAP(CPCHService)
  36. COM_INTERFACE_ENTRY(IDispatch)
  37. COM_INTERFACE_ENTRY(IPCHService)
  38. END_COM_MAP()
  39. CPCHService();
  40. virtual ~CPCHService();
  41. // IPCHService
  42. STDMETHOD(get_RemoteSKUs)( /*[out, retval]*/ IPCHCollection* *pVal );
  43. STDMETHOD(get_RemoteModemConnected)( /*[out, retval]*/ VARIANT_BOOL *pVal );
  44. STDMETHOD(IsTrusted)( /*[in]*/ BSTR bstrURL, /*[out, retval]*/ VARIANT_BOOL *pfTrusted );
  45. STDMETHOD(Utility )( /*[in]*/ BSTR bstrSKU, /*[in]*/ long lLCID, /*[out]*/ IPCHUtility* *pVal );
  46. STDMETHOD(RemoteHelpContents)( /*[in]*/ BSTR bstrSKU, /*[in]*/ long lLCID, /*[out]*/ IPCHRemoteHelpContents* *pVal );
  47. STDMETHOD(RegisterHost )( /*[in]*/ BSTR bstrID , /*[in ]*/ IUnknown* pObj );
  48. STDMETHOD(CreateScriptWrapper)( /*[in]*/ REFCLSID rclsid, /*[in]*/ BSTR bstrCode, /*[in]*/ BSTR bstrURL, /*[out]*/ IUnknown* *ppObj );
  49. STDMETHOD(TriggerScheduledDataCollection)( /*[in]*/ VARIANT_BOOL fStart );
  50. STDMETHOD(PrepareForShutdown )( );
  51. STDMETHOD(ForceSystemRestore)( );
  52. STDMETHOD(UpgradeDetected )( );
  53. STDMETHOD(MUI_Install )( /*[in]*/ long LCID, /*[in]*/ BSTR bstrFile );
  54. STDMETHOD(MUI_Uninstall )( /*[in]*/ long LCID );
  55. STDMETHOD(RemoteConnectionParms)( /*[in ]*/ BSTR bstrUserName ,
  56. /*[in ]*/ BSTR bstrDomainName ,
  57. /*[in ]*/ long lSessionID ,
  58. /*[in ]*/ BSTR bstrUserHelpBlob ,
  59. /*[out]*/ BSTR *pbstrConnectionString );
  60. STDMETHOD(RemoteUserSessionInfo)( /*[out]*/ IPCHCollection* *pVal );
  61. };
  62. ////////////////////////////////////////////////////////////////////////////////
  63. class ATL_NO_VTABLE CPCHRemoteHelpContents :
  64. public CComObjectRootEx<MPC::CComSafeMultiThreadModel>,
  65. public IDispatchImpl<IPCHRemoteHelpContents, &IID_IPCHRemoteHelpContents, &LIBID_HelpServiceTypeLib>
  66. {
  67. Taxonomy::Instance m_data;
  68. Taxonomy::Settings m_ts;
  69. MPC::wstring m_strDir;
  70. Taxonomy::Updater m_updater;
  71. JetBlue::SessionHandle m_handle;
  72. JetBlue::Database* m_db;
  73. HRESULT AttachToDatabase ();
  74. void DetachFromDatabase();
  75. public:
  76. BEGIN_COM_MAP(CPCHRemoteHelpContents)
  77. COM_INTERFACE_ENTRY(IDispatch)
  78. COM_INTERFACE_ENTRY(IPCHRemoteHelpContents)
  79. END_COM_MAP()
  80. CPCHRemoteHelpContents();
  81. virtual ~CPCHRemoteHelpContents();
  82. HRESULT Init( /*[in]*/ const Taxonomy::Instance& data );
  83. // IPCHRemoteHelpContents
  84. STDMETHOD(get_SKU )( /*[out, retval]*/ BSTR *pVal );
  85. STDMETHOD(get_Language )( /*[out, retval]*/ long *pVal );
  86. STDMETHOD(get_ListOfFiles)( /*[out, retval]*/ VARIANT *pVal );
  87. STDMETHOD(GetDatabase)( /*[out, retval]*/ IUnknown* *pVal );
  88. STDMETHOD(GetFile )( /*[in]*/ BSTR bstrFileName, /*[out, retval]*/ IUnknown* *pVal );
  89. };
  90. /////////////////////////////////////////////////////////////////////////////
  91. #endif // !defined(__INCLUDED___PCH___SERVICE_H___)