summaryrefslogtreecommitdiff
path: root/mobile_src/DataSync/SyncStatistics.h
diff options
context:
space:
mode:
Diffstat (limited to 'mobile_src/DataSync/SyncStatistics.h')
-rwxr-xr-xmobile_src/DataSync/SyncStatistics.h103
1 files changed, 103 insertions, 0 deletions
diff --git a/mobile_src/DataSync/SyncStatistics.h b/mobile_src/DataSync/SyncStatistics.h
new file mode 100755
index 0000000..9dd5634
--- /dev/null
+++ b/mobile_src/DataSync/SyncStatistics.h
@@ -0,0 +1,103 @@
+//
+// Tizen Web Device API
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+
+#ifndef _ABSTRACT_LAYER_SYNC_STATISTICS_H_
+#define _ABSTRACT_LAYER_SYNC_STATISTICS_H_
+
+#include <string>
+#include <dpl/shared_ptr.h>
+
+#include "SyncServiceInfo.h"
+
+#define UNDEFILED_TIME -1
+
+namespace DeviceAPI {
+namespace DataSync {
+
+class SyncStatistics
+{
+ public:
+ typedef enum
+ {
+ SUCCESS_STATUS,
+ FAIL_STATUS,
+ STOP_STATUS,
+ NONE_STATUS
+ } SyncStatus;
+
+ SyncStatistics();
+ SyncStatistics(SyncStatus syncStatus, SyncServiceInfo::SyncServiceType serviceType, long long int lastSyncTime, unsigned long serverToClientTotal, unsigned long serverToClientAdded, unsigned long serverToClientUpdated,
+ unsigned long serverToClientRemoved, unsigned long clientToServerTotal, unsigned long clientToServerAdded, unsigned long clientToServerUpdated, unsigned long clientToServerRemoved);
+ virtual ~SyncStatistics();
+
+ SyncStatus getSyncStatus() const;
+ void setSyncStatus(SyncStatus value);
+
+ SyncServiceInfo::SyncServiceType getServiceType() const;
+ void setServiceType(SyncServiceInfo::SyncServiceType value);
+
+ long long int getLastSyncTime() const;
+ void setLastSyncTime(long long int value);
+
+ unsigned long getServerToClientTotal() const;
+ void setServerToClientTotal(unsigned long value);
+
+ unsigned long getServerToClientAdded() const;
+ void setServerToClientAdded(unsigned long value);
+
+ unsigned long getServerToClientUpdated() const;
+ void setServerToClientUpdated(unsigned long value);
+
+ unsigned long getServerToClientRemoved() const;
+ void setServerToClientRemoved(unsigned long value);
+
+ unsigned long getClientToServerTotal() const;
+ void setClientToServerTotal(unsigned long value);
+
+ unsigned long getClientToServerAdded() const;
+ void setClientToServerAdded(unsigned long value);
+
+ unsigned long getClientToServerUpdated() const;
+ void setClientToServerUpdated(unsigned long value);
+
+ unsigned long getClientToServerRemoved() const;
+ void setClientToServerRemoved(unsigned long value);
+
+ protected:
+ SyncStatus m_syncStatus;
+ SyncServiceInfo::SyncServiceType m_serviceType;
+ long long int m_lastSyncTime;
+ unsigned long m_serverToClientTotal;
+ unsigned long m_serverToClientAdded;
+ unsigned long m_serverToClientUpdated;
+ unsigned long m_serverToClientRemoved;
+ unsigned long m_clientToServerTotal;
+ unsigned long m_clientToServerAdded;
+ unsigned long m_clientToServerUpdated;
+ unsigned long m_clientToServerRemoved;
+};
+
+typedef DPL::SharedPtr<SyncStatistics> SyncStatisticsPtr;
+typedef std::vector<SyncStatisticsPtr> SyncStatisticsList;
+typedef DPL::SharedPtr<SyncStatisticsList> SyncStatisticsListPtr;
+
+}
+}
+
+#endif /* _ABSTRACT_LAYER_SYNC_STATISTICS_H_ */
+