equal
deleted
inserted
replaced
37 class CMMCScBkupDriveAndOperationTypeManager; |
37 class CMMCScBkupDriveAndOperationTypeManager; |
38 class CMMCScBkupArchiveInfo; |
38 class CMMCScBkupArchiveInfo; |
39 |
39 |
40 _LIT( KBackUpFolder, "\\Backup\\" ); |
40 _LIT( KBackUpFolder, "\\Backup\\" ); |
41 _LIT( KBackUpFiles, "*.arc" ); |
41 _LIT( KBackUpFiles, "*.arc" ); |
42 |
42 const TInt KCArrayGranularity = 10; |
43 |
43 |
44 class TBkupDrivesAndOperation |
44 class TBkupDrivesAndOperation |
45 { |
45 { |
46 public: |
46 public: |
47 TBkupDrivesAndOperation(){} |
47 TBkupDrivesAndOperation(){} |
84 self->ConstructL(); |
84 self->ConstructL(); |
85 return self; |
85 return self; |
86 } |
86 } |
87 void ConstructL() |
87 void ConstructL() |
88 { |
88 { |
89 mUids = new ( ELeave ) CArrayFixFlat<unsigned int>( 10 ); |
89 mUids = new ( ELeave ) CArrayFixFlat<unsigned int>( KCArrayGranularity ); |
90 mExclude_uids = new ( ELeave ) CArrayFixFlat<unsigned int>( 10 ); |
90 mExclude_uids = new ( ELeave ) CArrayFixFlat<unsigned int>( KCArrayGranularity ); |
91 mArchive_name = HBufC::NewL(1); |
91 mArchive_name = 0; |
92 } |
92 } |
93 |
93 |
94 ~CBkupCategory() |
94 ~CBkupCategory() |
95 { |
95 { |
96 mUids->Reset(); |
96 mUids->Reset(); |
103 mCategory = category; |
103 mCategory = category; |
104 } |
104 } |
105 |
105 |
106 void setArchive_name( TDesC16& archive_name ) |
106 void setArchive_name( TDesC16& archive_name ) |
107 { |
107 { |
108 delete mArchive_name; |
108 if ( mArchive_name != 0 ) |
109 mArchive_name = HBufC::NewL( archive_name.Length() ); |
109 { |
|
110 delete mArchive_name; |
|
111 } |
|
112 TRAP_IGNORE( mArchive_name = HBufC::NewL( archive_name.Length() ) ); |
110 *mArchive_name = archive_name; |
113 *mArchive_name = archive_name; |
111 } |
114 } |
112 |
115 |
113 void setSpecial_flags( unsigned int special_flags ) |
116 void setSpecial_flags( unsigned int special_flags ) |
114 { |
117 { |
120 mExclude_special_flags = exclude_special_flags; |
123 mExclude_special_flags = exclude_special_flags; |
121 } |
124 } |
122 |
125 |
123 void addUids( unsigned int uid ) |
126 void addUids( unsigned int uid ) |
124 { |
127 { |
125 mUids->AppendL( uid, sizeof(unsigned int)); |
128 TRAP_IGNORE( mUids->AppendL( uid, sizeof(unsigned int) ) ); |
126 } |
129 } |
127 |
130 |
128 void addExclude_uids( unsigned int exclude_uid ) |
131 void addExclude_uids( unsigned int exclude_uid ) |
129 { |
132 { |
130 mExclude_uids->AppendL( exclude_uid, sizeof(unsigned int) ); |
133 TRAP_IGNORE( mExclude_uids->AppendL( exclude_uid, sizeof(unsigned int) ) ); |
131 } |
134 } |
132 |
135 |
133 unsigned int category() { return mCategory; } |
136 unsigned int category() { return mCategory; } |
134 HBufC* archive_name() { return mArchive_name; } |
137 HBufC* archive_name() { return mArchive_name; } |
135 unsigned int special_flags() { return mSpecial_flags; } |
138 unsigned int special_flags() { return mSpecial_flags; } |