tizen 2.3.1 release
[framework/web/mobile/wrt-plugins-tizen.git] / src / DataSync / SyncInfo.cpp
1 //
2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18
19 #include "SyncInfo.h"
20
21 namespace DeviceAPI {
22 namespace DataSync {
23
24 SyncInfo::SyncInfo()
25 {
26     m_url = "";
27     m_id = "";
28     m_password = "";
29     m_syncMode = UNDEFINED_MODE;
30     m_syncType = UNDEFINED_TYPE;
31     m_syncInterval = INTERVAL_UNDEFINED;
32 }
33
34 SyncInfo::SyncInfo(std::string url, std::string id, std::string password, SyncMode syncMode, SyncType syncType, SyncInterval syncInterval)
35 {
36     m_url = url;
37     m_id = id;
38     m_password = password;
39     m_syncMode = syncMode;
40     m_syncType = syncType;
41     m_syncInterval = syncInterval;
42 }
43
44 SyncInfo::~SyncInfo()
45 {
46 }
47
48 std::string SyncInfo::getUrl() const
49 {
50     return m_url;
51 }
52
53 void SyncInfo::setUrl(const std::string &url)
54 {
55     m_url = url;
56 }
57
58 std::string SyncInfo::getId() const
59 {
60     return m_id;
61 }
62
63 void SyncInfo::setId(const std::string &id)
64 {
65     m_id = id;
66 }
67
68 std::string SyncInfo::getPassword() const
69 {
70     return m_password;
71 }
72
73 void SyncInfo::setPassword(const std::string &password)
74 {
75     m_password = password;
76 }
77
78 SyncInfo::SyncMode SyncInfo::getSyncMode() const
79 {
80     return m_syncMode;
81 }
82
83 void SyncInfo::setSyncMode(SyncInfo::SyncMode syncMode)
84 {
85     m_syncMode = syncMode;
86 }
87
88 SyncInfo::SyncType SyncInfo::getSyncType() const
89 {
90     return m_syncType;
91 }
92
93 void SyncInfo::setSyncType(SyncInfo::SyncType syncType)
94 {
95     m_syncType = syncType;
96 }
97
98 SyncInfo::SyncInterval SyncInfo::getSyncInterval() const
99 {
100     return m_syncInterval;
101 }
102
103 void SyncInfo::setSyncInterval(SyncInfo::SyncInterval syncInterval)
104 {
105     m_syncInterval = syncInterval;
106 }
107
108 }
109 }