00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef INCL_SYNCREPORT
00020 #define INCL_SYNCREPORT
00021
00025 #include "base/fscapi.h"
00026 #include "base/Log.h"
00027 #include "base/util/StringBuffer.h"
00028 #include "spds/SyncSource.h"
00029 #include "spds/constants.h"
00030 #include "spds/SyncSourceReport.h"
00031 #include "spds/SyncManagerConfig.h"
00032
00033
00034
00035 #define CLIENT "Client"
00036 #define SERVER "Server"
00037
00038
00049 class SyncReport {
00050
00051 private:
00052
00053
00054 int lastErrorCode;
00055
00056
00057 char* lastErrorMsg;
00058
00059
00060 SyncSourceReport* ssReport;
00061 unsigned int ssReportCount;
00062
00063
00064
00065
00066
00067 void initialize();
00068
00069
00070
00071
00072
00073 void assign(const SyncReport& sr);
00074
00075
00076 public:
00077
00078 SyncReport();
00079 SyncReport(SyncReport& sr);
00080
00081 SyncReport(SyncManagerConfig& config);
00082 virtual ~SyncReport();
00083
00089 const int getLastErrorCode() const;
00090
00095 const char* getLastErrorMsg() const;
00096
00098 const unsigned int getSyncSourceReportCount() const;
00099
00100 void setLastErrorCode(const int code);
00101 void setLastErrorMsg (const char* msg);
00102
00104 SyncSourceReport* getSyncSourceReport(const char* name) const;
00105
00107 SyncSourceReport* getSyncSourceReport(unsigned int index) const;
00108
00109
00120 void setSyncSourceReports(SyncManagerConfig& config);
00121
00130 void toString(StringBuffer &str, BOOL verbose = FALSE);
00131
00135 SyncReport& operator = (const SyncReport& sr) {
00136 assign(sr);
00137 return *this;
00138 }
00139 };
00140
00143 #endif
00144