00001 #ifndef tcsDBBACKUP_H
00002 #define tcsDBBACKUP_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __cplusplus
00021 #error This is a C++ include file and cannot be used from plain C
00022 #endif
00023
00024 #include <sys/param.h>
00025
00026 #include "eccsErr.h"
00027
00028 #define DELIM ",\0"
00029 #define dbBACKUP_RCS "@(#) $Id: tcsDB_BACKUP.h,v 1.136 2003/11/27 15:10:04 vltsccm Exp $"
00030
00031 #define dbBACKUPMAX (msgBODYMAXLEN-1000)
00032
00033
00034
00035
00036
00037 #define dbBACKUP_BRANCH "BRANCH"
00038 #define dbBACKUP_CWP "CWP"
00039 #define dbBACKUP_POINT "POINT"
00040 #define dbBACKUP_ATTRIBUTE "ATTRIBUTE"
00041
00042 #define dbRESTORE_CWP "<CWP>:"
00043 #define dbRESTORE_POINT "<POINT>:"
00044 #define dbRESTORE_ATTRIBUTE "<ATTRIBUTE>:"
00045 #define dbRESTORE_TYPE "<TYPE>:"
00046 #define dbRESTORE_REC "<REC>:"
00047 #define dbRESTORE_FIELDS "<FIELDS>:"
00048
00049 class tcsDB_BACKUP : public eccsERROR_CLASS
00050 {
00051 public:
00052 tcsDB_BACKUP(const dbSYMADDRESS symAddr, vltLOGICAL branch, const char *backupFile);
00053 ~tcsDB_BACKUP();
00054
00055 ccsCOMPL_STAT DoBackup();
00056
00057 void SetBackupFile (const char *backupFile);
00058 void SetSymAddr(const dbSYMADDRESS symAddr);
00059 void SetTypeBranch(vltLOGICAL branch);
00060 void ChangeCWPinBackupFile(const char *cwp);
00061
00062 protected:
00063
00064 private:
00065 ccsCOMPL_STAT DbBackupSingleAttr (ccsENVNAME env,
00066 dbSYMADDRESS symAddr,
00067 dbDIRADDRESS *dirAddr );
00068
00069 ccsCOMPL_STAT DbBackupPoint(ccsENVNAME env,
00070 dbSYMADDRESS alias,
00071 vltLOGICAL branch);
00072
00073 ccsCOMPL_STAT DbBackupFct(dbSYMADDRESS symAddr,
00074 vltLOGICAL branch);
00075
00076 dbSYMADDRESS symCwp;
00077 FILE *dbBackupFd;
00078 char dbBackupOut[MAXPATHLEN+1];
00079 char *dbBackupPtr;
00080 int dbBackupSize;
00081 vltLOGICAL dbBranch;
00082 dbSYMADDRESS dbOvlCwp;
00083 };
00084
00085
00086
00087 #endif