/*! @file ******************************************************************************** <PRE> Module : CMMusic file : function : author : fedorawang ver : v1.5 -------------------------------------------------------------------------------- Copyright : GPL(General Public License) -------------------------------------------------------------------------------- </PRE> *******************************************************************************/ #ifndef FILEMGR_H_ #define FILEMGR_H_ #include "Helper.h" class CFileMgr { public: typedef struct _FILEITEM { unsigned char ucType; std::string strName; std::string strType; } FILEITEM, *LPFILEITEM; public: CFileMgr(); virtual ~CFileMgr(); public: void Load(int nType); int GetSize(); const char* GetName(int nIndex); unsigned char GetType(int nIndex); const char* GetDesc(int nIndex); std::string GetPath(int nIndex); void Clear(); bool SetSel(int nIndex); int FindIndex(const char* lpszStr); void InsertItem(const std::string& strType,const LPFILEITEM pItem); private: static bool CmpName(const FILEITEM& lItem,const FILEITEM& rItem); std::vector<FILEITEM> m_vctFile; std::string m_strPath; std::string m_strMusicType; std::string m_strListType; }; #endif /*FILEMGR_H_*/