tizen 2.3.1 release
[framework/web/mobile/wrt-plugins-tizen.git] / src / DataSync / SyncServiceInfo.h
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 #ifndef _ABSTRACT_LAYER_SYNC_SERVICE_INFO_H_
20 #define _ABSTRACT_LAYER_SYNC_SERVICE_INFO_H_
21
22 #include <string>
23 #include <vector>
24 #include <memory>
25
26 namespace DeviceAPI {
27 namespace DataSync {
28
29 class SyncServiceInfo
30 {
31 public:
32     typedef enum
33     {
34         CONTACT_SERVICE_TYPE,
35         EVENT_SERVICE_TYPE,
36         UNDEFINED_SERVICE_TYPE
37     } SyncServiceType;
38
39     SyncServiceInfo();
40     SyncServiceInfo(bool enable, SyncServiceType syncServiceType, std::string serverDatabaseUri, std::string id, std::string password);
41     virtual ~SyncServiceInfo();
42
43     bool getEnable() const;
44     void setEnable(bool value);
45
46     SyncServiceType getSyncServiceType() const;
47     void setSyncServiceType(SyncServiceType value);
48
49     std::string getServerDatabaseUri() const;
50     void setServerDatabaseUri(const std::string &value);
51
52     std::string getId() const;
53     void setId(const std::string &value);
54
55     std::string getPassword() const;
56     void setPassword(const std::string &value);
57
58 protected:
59     bool m_enable;
60     SyncServiceType m_syncServiceType;
61     std::string m_serverDatabaseUri;
62     std::string m_id;
63     std::string m_password;
64 };
65
66 typedef std::shared_ptr<SyncServiceInfo> SyncServiceInfoPtr;
67 typedef std::vector<SyncServiceInfoPtr> SyncServiceInfoList;
68 typedef std::shared_ptr<SyncServiceInfoList> SyncServiceInfoListPtr;
69
70 }
71 }
72
73 #endif /* _ABSTRACT_LAYER_SYNC_SERVICE_INFO_H_ */
74