1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/tools/installer/CFileList.h Sun Nov 25 04:46:18 2007 +0000
1.3 @@ -0,0 +1,40 @@
1.4 +#ifndef _INCLUDE_FOLDER_LIST_H_
1.5 +#define _INCLUDE_FOLDER_LIST_H_
1.6 +
1.7 +#include "platform_headers.h"
1.8 +#include <list>
1.9 +#include <vector>
1.10 +
1.11 +struct CFileListEntry
1.12 +{
1.13 + TCHAR file[MAX_PATH];
1.14 + unsigned __int64 size;
1.15 +};
1.16 +
1.17 +class CFileList
1.18 +{
1.19 +public:
1.20 + CFileList(const TCHAR *name);
1.21 + ~CFileList();
1.22 +public:
1.23 + CFileList *PeekCurrentFolder();
1.24 + void PopCurrentFolder();
1.25 + const TCHAR *PeekCurrentFile();
1.26 + void PopCurrentFile();
1.27 + const TCHAR *GetFolderName();
1.28 +public:
1.29 + void AddFolder(CFileList *pFileList);
1.30 + void AddFile(const TCHAR *name, unsigned __int64 size);
1.31 + unsigned __int64 GetRecursiveSize();
1.32 +public:
1.33 + static CFileList *BuildFileList(const TCHAR *name, const TCHAR *root_folder);
1.34 +private:
1.35 + std::list<CFileList *> m_folder_list;
1.36 + std::list<CFileListEntry> m_file_list;
1.37 + TCHAR m_FolderName[MAX_PATH];
1.38 + unsigned __int64 m_TotalSize;
1.39 + unsigned __int64 m_RecursiveSize;
1.40 + bool m_bGotRecursiveSize;
1.41 +};
1.42 +
1.43 +#endif //_INCLUDE_FOLDER_LIST_H_