chxavplayerdoc.cpp
上传用户:zhongxx05
上传日期:2007-06-06
资源大小:33641k
文件大小:2k
源码类别:

Symbian

开发平台:

C/C++

  1. /************************************************************************
  2.  * chxavplayerdoc.cpp
  3.  * ------------------
  4.  *
  5.  * Synopsis:
  6.  * One doc object is created for each app instance. The doc is used
  7.  * to create a UI instance.
  8.  *
  9.  *
  10.  * Target:
  11.  * Symbian OS
  12.  *
  13.  *
  14.  * (c) 1995-2003 RealNetworks, Inc. Patents pending. All rights reserved.
  15.  *
  16.  ************************************************************************/
  17. #include "hxsym_debug.h"
  18. #include "chxavplayerdoc.h"
  19. #include "chxavplayerui.h"
  20. /*
  21.  * CHXAvPlayerDoc
  22.  * --------------
  23.  *
  24.  */
  25. CHXAvPlayerDoc::CHXAvPlayerDoc(CEikApplication& aApp)
  26.     : CAknDocument(aApp)
  27. {     
  28. }
  29. /*
  30.  * ~CHAvPlayerDoc
  31.  * --------------
  32.  *
  33.  */
  34. CHXAvPlayerDoc::~CHXAvPlayerDoc()
  35. {
  36. }
  37. /*
  38.  * CreateAppUiL
  39.  * ------------
  40.  *
  41.  */
  42. CEikAppUi *
  43. CHXAvPlayerDoc::CreateAppUiL()
  44. {        
  45.     // create the ui class that manages all the player views
  46.     CHXAvPlayerUI* pUi = new (ELeave) CHXAvPlayerUI();
  47.     return pUi;
  48. }
  49. void CHXAvPlayerDoc::SetEngineManager(const CHXClientEngineManagerPtr& spEngineMgr)
  50. {
  51.     //
  52.     // we keep a reference to the client engine manager
  53.     // in the doc class in order to ensure that the client 
  54.     // core dll remains loaded for the full lifetime of the
  55.     // ui class and all its views
  56.     //
  57.     m_spEngineMgr = spEngineMgr;
  58. }
  59. /*
  60.  * OpenFileL
  61.  * ---------
  62.  * Open the given filename.
  63.  *
  64.  */
  65. CFileStore* 
  66. CHXAvPlayerDoc::OpenFileL(TBool /*aDoOpen*/, const TDesC& aFilename, RFs& /*aFs*/)
  67. {
  68.     CHXAvPlayerUI *pUI = static_cast<CHXAvPlayerUI *>(iAppUi);
  69.     pUI->OpenFileL(aFilename);
  70.     return 0;
  71. }
  72. /*
  73.  * ConstructL
  74.  * ----------
  75.  *
  76.  */
  77. void
  78. CHXAvPlayerDoc::ConstructL()
  79. {
  80. }
  81. /*
  82.  * NewL
  83.  * ----
  84.  *
  85.  */
  86. CHXAvPlayerDoc *
  87. CHXAvPlayerDoc::NewL(CEikApplication& aApp)
  88. {
  89.     CHXAvPlayerDoc* self = new (ELeave) CHXAvPlayerDoc(aApp);
  90.     CleanupStack::PushL(self);
  91.     self->ConstructL();
  92.     CleanupStack::Pop();
  93.     return self;
  94. }