Changeset 2481 for box/trunk/lib/backupclient/BackupStoreFilename.cpp
- Timestamp:
- 29/03/2009 14:51:24 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/lib/backupclient/BackupStoreFilename.cpp
r217 r2481 38 38 // -------------------------------------------------------------------------- 39 39 BackupStoreFilename::BackupStoreFilename(const BackupStoreFilename &rToCopy) 40 : BackupStoreFilename_base(rToCopy)40 : mEncryptedName(rToCopy.mEncryptedName) 41 41 { 42 42 } … … 66 66 bool ok = true; 67 67 68 if( size() < 2)68 if(mEncryptedName.size() < 2) 69 69 { 70 70 // Isn't long enough to have a header … … 74 74 { 75 75 // Check size is consistent 76 unsigned int dsize = BACKUPSTOREFILENAME_GET_SIZE( *this);77 if(dsize != size())76 unsigned int dsize = BACKUPSTOREFILENAME_GET_SIZE(this->mEncryptedName); 77 if(dsize != mEncryptedName.size()) 78 78 { 79 79 ok = false; … … 81 81 82 82 // And encoding is an accepted value 83 unsigned int encoding = BACKUPSTOREFILENAME_GET_ENCODING( *this);83 unsigned int encoding = BACKUPSTOREFILENAME_GET_ENCODING(this->mEncryptedName); 84 84 if(encoding < Encoding_Min || encoding > Encoding_Max) 85 85 { … … 120 120 121 121 // assign to this string, storing the header and the extra data 122 assign(hdr, 2);123 append(data.c_str(), data.size());122 mEncryptedName.assign(hdr, 2); 123 mEncryptedName.append(data.c_str(), data.size()); 124 124 125 125 // Check it … … 142 142 CheckValid(); 143 143 144 rProtocol.Write( c_str(),size());144 rProtocol.Write(mEncryptedName.c_str(), mEncryptedName.size()); 145 145 } 146 146 … … 178 178 179 179 // assign to this string, storing the header and the extra data 180 assign(buf, dsize);180 mEncryptedName.assign(buf, dsize); 181 181 } 182 182 else … … 195 195 196 196 // assign to this string, storing the header and the extra data 197 assign(data, dsize);197 mEncryptedName.assign(data, dsize); 198 198 } 199 199 … … 217 217 CheckValid(); 218 218 219 rStream.Write( c_str(),size());219 rStream.Write(mEncryptedName.c_str(), mEncryptedName.size()); 220 220 } 221 221 … … 243 243 bool BackupStoreFilename::IsEncrypted() const 244 244 { 245 return BACKUPSTOREFILENAME_GET_ENCODING(*this) != Encoding_Clear; 245 return BACKUPSTOREFILENAME_GET_ENCODING(this->mEncryptedName) != 246 Encoding_Clear; 246 247 } 247 248 … … 251 252 // Function 252 253 // Name: BackupStoreFilename::SetAsClearFilename(const char *) 253 // Purpose: Sets this object to be a valid filename, but with a filename in the clear. 254 // Used on the server to create filenames when there's no way of encrypting it. 254 // Purpose: Sets this object to be a valid filename, but with a 255 // filename in the clear. Used on the server to create 256 // filenames when there's no way of encrypting it. 255 257 // Created: 22/4/04 256 258 // … … 269 271 270 272 // Store the encoded string 271 assign(encoded);273 mEncryptedName.assign(encoded); 272 274 273 275 // Stuff which must be done
Note: See TracChangeset
for help on using the changeset viewer.
