chxavpathselector.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(AV_PATH_SELECTOR_INCLUDED__)
  7. #define AV_PATH_SELECTOR_INCLUDED__
  8. // Helix includes..
  9. #include "hxstack.h"
  10. // Includes from this project...
  11. #include "chxavvector.h"
  12. #include "chxavrefptr.h"
  13. #include "chxavfileviewpageinfo.h"
  14. // class CHXAvPathSelector
  15. class CHXAvPathSelector
  16. {
  17. public:
  18. // ctor and dtor
  19.     CHXAvPathSelector();
  20.     virtual ~CHXAvPathSelector();
  21.     void InitL(const CHXAvVector<CHXAvMediaFolderInfoPtr>& mediaFolderInfo,
  22.         TInt resIdPrompt, TInt resIdSelectButtonText);
  23. private:
  24. // disallow assignment and copy
  25.     CHXAvPathSelector(const CHXAvPathSelector& rhs);
  26.     CHXAvPathSelector& operator=(const CHXAvPathSelector& rhs);
  27. public:
  28. // methods
  29.     bool PromptUserSelectPathL();
  30.     const TDesC& GetSelectedPath() const;
  31. private:
  32.     enum Action
  33.     {
  34.         BACK,
  35.         SELECT,
  36.         ENTER,
  37.         IGNORE
  38.     };
  39. // implementation
  40.     CHXAvPathSelector::Action DoFolderPromptL();
  41.     CHXAvPathSelector::Action DoRootFolderPromptL();
  42.     void SetPathToParent();
  43.     void SetPathToChild(const TDesC& listText);
  44.     TInt InitMediaRootPathL(const TDesC& fullRootPath);
  45.     bool CurrentFolderHasSubFoldersL();
  46.     TUint GetValidRootCountL();
  47.     void ResetForRootFolderPrompt(TInt idxCurrentItem);
  48.     
  49. private:
  50. // data
  51.     CHXAvVector<CHXAvMediaFolderInfoPtr> m_mediaFolderInfo;
  52.     // full paths
  53.     refptr<TFileName>   m_spCurrentPath;
  54.     refptr<HBufC>       m_spRootPath;
  55.     CHXStack m_indexes;
  56.     TInt                m_idxInitCurrentItem;
  57.     TInt                m_resIdPrompt;
  58.     TInt                m_resIdSelectButtonText;
  59. };
  60. #endif // AV_PATH_SELECTOR_INCLUDED__