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.

125 lines
4.2 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(IsTrusted)( /*[in]*/ BSTR bstrURL, /*[out, retval]*/ VARIANT_BOOL *pfTrusted );
  44. STDMETHOD(Utility )( /*[in]*/ BSTR bstrSKU, /*[in]*/ long lLCID, /*[out]*/ IPCHUtility* *pVal );
  45. STDMETHOD(RemoteHelpContents)( /*[in]*/ BSTR bstrSKU, /*[in]*/ long lLCID, /*[out]*/ IPCHRemoteHelpContents* *pVal );
  46. STDMETHOD(RegisterHost )( /*[in]*/ BSTR bstrID , /*[in ]*/ IUnknown* pObj );
  47. STDMETHOD(CreateScriptWrapper)( /*[in]*/ REFCLSID rclsid, /*[in]*/ BSTR bstrCode, /*[in]*/ BSTR bstrURL, /*[out]*/ IUnknown* *ppObj );
  48. STDMETHOD(TriggerScheduledDataCollection)( /*[in]*/ VARIANT_BOOL fStart );
  49. STDMETHOD(PrepareForShutdown )( );
  50. STDMETHOD(ForceSystemRestore)( );
  51. STDMETHOD(UpgradeDetected )( );
  52. STDMETHOD(MUI_Install )( /*[in]*/ long LCID, /*[in]*/ BSTR bstrFile );
  53. STDMETHOD(MUI_Uninstall )( /*[in]*/ long LCID );
  54. STDMETHOD(RemoteConnectionParms)( /*[in ]*/ BSTR bstrUserName ,
  55. /*[in ]*/ BSTR bstrDomainName ,
  56. /*[in ]*/ long lSessionID ,
  57. /*[in ]*/ BSTR bstrUserHelpBlob ,
  58. /*[out]*/ BSTR *pbstrConnectionString );
  59. STDMETHOD(RemoteUserSessionInfo)( /*[out]*/ IPCHCollection* *pVal );
  60. };
  61. ////////////////////////////////////////////////////////////////////////////////
  62. class ATL_NO_VTABLE CPCHRemoteHelpContents :
  63. public CComObjectRootEx<MPC::CComSafeMultiThreadModel>,
  64. public IDispatchImpl<IPCHRemoteHelpContents, &IID_IPCHRemoteHelpContents, &LIBID_HelpServiceTypeLib>
  65. {
  66. Taxonomy::Instance m_data;
  67. Taxonomy::Settings m_ts;
  68. MPC::wstring m_strDir;
  69. Taxonomy::Updater m_updater;
  70. JetBlue::SessionHandle m_handle;
  71. JetBlue::Database* m_db;
  72. HRESULT AttachToDatabase ();
  73. void DetachFromDatabase();
  74. public:
  75. BEGIN_COM_MAP(CPCHRemoteHelpContents)
  76. COM_INTERFACE_ENTRY(IDispatch)
  77. COM_INTERFACE_ENTRY(IPCHRemoteHelpContents)
  78. END_COM_MAP()
  79. CPCHRemoteHelpContents();
  80. virtual ~CPCHRemoteHelpContents();
  81. HRESULT Init( /*[in]*/ const Taxonomy::Instance& data );
  82. // IPCHRemoteHelpContents
  83. STDMETHOD(get_SKU )( /*[out, retval]*/ BSTR *pVal );
  84. STDMETHOD(get_Language )( /*[out, retval]*/ long *pVal );
  85. STDMETHOD(get_ListOfFiles)( /*[out, retval]*/ VARIANT *pVal );
  86. STDMETHOD(GetDatabase)( /*[out, retval]*/ IUnknown* *pVal );
  87. STDMETHOD(GetFile )( /*[in]*/ BSTR bstrFileName, /*[out, retval]*/ IUnknown* *pVal );
  88. };
  89. /////////////////////////////////////////////////////////////////////////////
  90. #endif // !defined(__INCLUDED___PCH___SERVICE_H___)