chxclientenginemanager.h
上传用户:dangjiwu
上传日期:2013-07-19
资源大小:42019k
文件大小:2k
源码类别:

Symbian

开发平台:

Visual C++

  1. /*============================================================================*
  2.  *
  3.  * (c) 1995-2002 RealNetworks, Inc. Patents pending. All rights reserved.
  4.  *
  5.  *============================================================================*/
  6. #if !defined(CHXCLIENTCORE_INCLUDED__)
  7. #define CHXCLIENTCORE_INCLUDED__
  8. // forward decl
  9. #include "chxliteprefs.h"
  10. #include "hxcore.h"
  11. #include "chxbody.h"
  12. #include "hxccf.h"
  13. struct IHXClientEngine;
  14. class DLLAccess;
  15. // inclueds
  16. #include "chxsmartptr.h"
  17. #include "comptr.h"
  18. #include "hxslist.h"
  19. // SetDllAccessPath exported function from client core dll (missing from hxcore.h)
  20. typedef HX_RESULT (HXEXPORT_PTR FPRMSETDLLACCESSPATH) (const char*);
  21. // class CHXClientEngineManager
  22. class CHXClientEngineManager
  23. : public CHXBody
  24. {
  25.  
  26. public:
  27. // ctor and dtor
  28.     CHXClientEngineManager();
  29.     virtual ~CHXClientEngineManager();
  30.     void ConstructL();
  31. private:
  32. // disallow assignment and copy
  33.     CHXClientEngineManager(const CHXClientEngineManager& rhs);
  34.     CHXClientEngineManager& operator=(const CHXClientEngineManager& rhs);
  35. public:
  36. // methods
  37.     comptr<CHXLitePrefs> GetPrefs();
  38.     comptr<IHXClientEngine> GetEngine();
  39.     comptr<IHXCommonClassFactory> GetFactory();
  40. private:
  41. // implementation
  42.     void CreatePrefsL();
  43.     void InitLibSearchPathL();
  44.     void LoadClientCoreL();
  45.   
  46. private:
  47. // data
  48.     // services
  49.     comptr<CHXLitePrefs> m_prefs;
  50.     comptr<IHXCommonClassFactory> m_factory;
  51.     comptr<IHXClientEngine> m_clientEngine;
  52.     // dll stuff
  53.     DLLAccess *m_pDllAccess;
  54.     FPRMCREATEENGINE m_fpCreateEngine; 
  55.     FPRMCLOSEENGINE m_fpCloseEngine;
  56.     FPRMSETDLLACCESSPATH m_fpSetDLLAccessPath;
  57. };
  58. // smart pointer
  59. typedef CHXSmartPtr<CHXClientEngineManager> CHXClientEngineManagerPtr;
  60.  
  61. inline
  62. comptr<CHXLitePrefs> CHXClientEngineManager::GetPrefs()
  63. {
  64.     return m_prefs;
  65. }
  66. inline
  67. comptr<IHXClientEngine> CHXClientEngineManager::GetEngine()
  68. {
  69.     return m_clientEngine;
  70. }
  71. inline
  72. comptr<IHXCommonClassFactory> CHXClientEngineManager::GetFactory()
  73. {
  74.     return m_factory;
  75. }
  76. #endif // CHXCLIENTCORE_INCLUDED__