persistentstorage/sql/SRC/Server/SqlBur.h
branchRCL_3
changeset 10 fa9941cf3867
parent 0 08ec8eefde2f
child 11 667e88a979d7
equal deleted inserted replaced
6:5ffdb8f2067f 10:fa9941cf3867
    22 #include <e32property.h>
    22 #include <e32property.h>
    23 #include <connect/abclient.h> // MactiveBackupDataClient
    23 #include <connect/abclient.h> // MactiveBackupDataClient
    24 #include "SqlSrvBurInterface.h"
    24 #include "SqlSrvBurInterface.h"
    25 
    25 
    26 using namespace conn;
    26 using namespace conn;
       
    27 
       
    28 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
       
    29 //////////////                     Backup database file header format                           ///////////////////
       
    30 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
       
    31 
       
    32 ////// No version (Version 0)
       
    33 //  8 chars          8 chars          8 chars             up to 256 characters (512 bytes)
       
    34 // <32-bit checksum><32-bit filesize><32-bit filenamelen><filename - UTF16 encoded>
       
    35 
       
    36 //////             Version 2
       
    37 //  8 chars          8 chars   4 chars     16 chars         8 chars             up to 256 characters (512 bytes)
       
    38 // <32-bit checksum><FFFFAA55><Version N#><64-bit filesize><32-bit filenamelen><filename - UTF16 encoded>
       
    39 
       
    40 const TInt KBackupHeaderVersion = 2;            //Current backup database file header version
       
    41 
       
    42 const TUint32 KMagicNum = 0xFFFFAA55;           //Magic number. If the "old database file size" field in the header
       
    43                                                 //has this value, then the header version is 2+
       
    44 const TInt KMaxHeaderSize = 256 + KMaxFileName; //The size of the buffer used for the operations on the header
       
    45 
       
    46 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
       
    47 
    27 
    48 
    28 //-----------------------------------------
    49 //-----------------------------------------
    29 // CSqlBackupClient
    50 // CSqlBackupClient
    30 //-----------------------------------------
    51 //-----------------------------------------
    31 
    52 
   125 		MSqlSrvBurInterface *iInterface; // the SQL server
   146 		MSqlSrvBurInterface *iInterface; // the SQL server
   126 		RArray<TParse> iFileList; // which is populated by the SQL server
   147 		RArray<TParse> iFileList; // which is populated by the SQL server
   127 		RFile64 iFile;
   148 		RFile64 iFile;
   128 		TInt iFileIndex;
   149 		TInt iFileIndex;
   129 		TUint iState;
   150 		TUint iState;
   130 		HBufC* iBuffer; // used for the header data
   151 		TBuf<KMaxHeaderSize> iBuffer; // used for the header data
   131 		TInt iHeaderSent; // how many header bytes sent so far
   152 		TInt iHeaderSent; // how many header bytes sent so far
   132 		TUint32 iChecksum; // used by restore
   153 		TUint32 iChecksum; // used by restore
   133 		TInt64 iFileSize; // used by restore
   154 		TInt64 iFileSize; // used by restore
   134 		TUint32 iFileNameSize; // used by restore
   155 		TUint32 iFileNameSize; // used by restore
   135 		TBool iAnyData; // set to true if the restore actually sends any data to us
   156 		TBool iAnyData; // set to true if the restore actually sends any data to us