19 |
19 |
20 |
20 |
21 #ifndef __R_DRIVEIMAGE_H__ |
21 #ifndef __R_DRIVEIMAGE_H__ |
22 #define __R_DRIVEIMAGE_H__ |
22 #define __R_DRIVEIMAGE_H__ |
23 |
23 |
24 #if defined(__MSVCDOTNET__) || defined(__TOOLS2__) |
24 #include <fstream> |
25 #include <fstream> |
|
26 #else //!__MSVCDOTNET__ |
|
27 #include <fstream.h> |
|
28 #endif |
|
29 |
|
30 #include "filesysteminterface.h" |
25 #include "filesysteminterface.h" |
31 #include <vector> |
26 #include <vector> |
32 |
27 |
33 typedef std::vector<void*> EntryReferenceVector; |
28 typedef vector<void*> EntryReferenceVector; |
34 typedef std::list<CDirectory*> EntryList; |
29 typedef list<CDirectory*> EntryList; |
35 |
30 |
36 const TInt KMaxGenBuffer=0x14; |
31 const TInt KMaxGenBuffer=0x14; |
37 |
32 |
38 // Node Type. |
33 // Node Type. |
39 enum KNodeType |
34 enum KNodeType |
55 class CDriveImage |
50 class CDriveImage |
56 { |
51 { |
57 public: |
52 public: |
58 CDriveImage(CObeyFile *aObey); |
53 CDriveImage(CObeyFile *aObey); |
59 ~CDriveImage(); |
54 ~CDriveImage(); |
60 TInt CreateImage(TText* alogfile); |
55 TInt CreateImage(const char* alogfile); |
61 static TBool FormatTranslation(TText* aUserFileFormat,enum TFileSystem& aDriveFileFormat); |
56 static TBool FormatTranslation(const char* aUserFileFormat,enum TFileSystem& aDriveFileFormat); |
62 |
57 |
63 private: |
58 private: |
64 |
59 |
65 TInt CreateList(); |
60 TInt CreateList(); |
66 TInt GenTreeTraverse(TRomNode* anode,enum KNodeType anodeType); |
61 TInt GenTreeTraverse(TRomNode* anode,enum KNodeType anodeType); |
67 TInt CreateDirOrFileEntry(TRomNode* atempnode,enum KNodeType aType); |
62 TInt CreateDirOrFileEntry(TRomNode* atempnode,enum KNodeType aType); |
68 TInt ConstructOptions(); |
63 TInt ConstructOptions(); |
69 TInt PlaceFileTemporary(const TInt afileSize,TRomNode* acurrentNode); |
64 TInt PlaceFileTemporary(const TInt afileSize,TRomNode* acurrentNode); |
70 TInt DeleteTempFolder(char* aTempDirName); |
65 TInt DeleteTempFolder(const char* aTempDirName); |
71 |
66 |
72 private: |
67 private: |
73 |
68 |
74 // Holds the address of CObeyFile object. used to get the object information. |
69 // Holds the address of CObeyFile object. used to get the object information. |
75 CObeyFile *iObey; |
70 CObeyFile *iObey; |
76 // Container required for file sysem module. |
71 // Container required for file sysem module. |
77 EntryList iNodeList; |
72 EntryList iNodeList; |
78 // Pointer for nested Container. |
73 // Pointer for nested Container. |
79 EntryList *iParentInnerList; |
74 CDirectory* iParentDirEntry ; |
80 |
75 |
81 // For temp storge of Container address. |
76 // For temp storge of Container address. |
82 EntryReferenceVector iNodeAddStore; |
77 EntryReferenceVector iNodeAddStore; |
83 |
78 |
84 // For file format support. |
79 // For file format support. |