Update change log and spec for wrt-plugins-tizen_0.4.49
[framework/web/wrt-plugins-tizen.git] / src / Contact / ContactWebSite.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  * @file        ContactWebSite.cpp
20  * @author      Kisub Song (kisubs.song@samsung.com)
21  * @version     0.1
22  * @brief
23  */
24
25 #include "ContactWebSite.h"
26
27 namespace DeviceAPI {
28 namespace Contact {
29
30 ContactWebSite::ContactWebSite() :
31                 m_urlIsSet(false),
32                 m_typeIsSet(false)
33 {
34 }
35
36 ContactWebSite::~ContactWebSite()
37 {
38 }
39
40 std::string ContactWebSite::getUrl() const
41 {
42         return m_url;
43 }
44
45 void ContactWebSite::setUrl(const std::string &value)
46 {
47         m_url = value;
48         m_urlIsSet = true;
49 }
50
51 void ContactWebSite::unsetUrl()
52 {
53         m_url = "";
54         m_urlIsSet = false;
55 }
56
57 bool ContactWebSite::getUrlIsSet() const
58 {
59         return m_urlIsSet;
60 }
61
62 ContactWebSiteType ContactWebSite::getType() const
63 {
64         return m_type;
65 }
66
67 void ContactWebSite::setType(const ContactWebSiteType value)
68 {
69         m_type = value;
70         m_typeIsSet = true;
71 }
72
73 void ContactWebSite::unsetType()
74 {
75         m_type = WEBSITE_TYPE_HOMEPAGE;
76         m_typeIsSet = false;
77 }
78
79 bool ContactWebSite::getTypeIsSet() const
80 {
81         return m_typeIsSet;
82 }
83
84 void ContactWebSite::clear()
85 {
86         m_url = "";
87         m_urlIsSet = false;
88
89         m_type = WEBSITE_TYPE_HOMEPAGE;
90         m_typeIsSet = false;
91
92         m_label = "";
93         m_labelIsSet = false;
94 }
95
96 ContactWebSitePtr ContactWebSite::clone() const
97 {
98         ContactWebSitePtr result(new ContactWebSite());
99
100         result->m_url = m_url;
101         result->m_urlIsSet = m_urlIsSet;
102
103         result->m_type = m_type;
104         result->m_typeIsSet = m_typeIsSet;
105
106         result->m_label = m_label;
107         result->m_labelIsSet = m_labelIsSet;
108
109         return result;
110 }
111
112 std::string ContactWebSite::getLabel() const
113 {
114         return m_label;
115 }
116
117 void ContactWebSite::setLabel(const std::string &value)
118 {
119         m_label = value;
120         m_labelIsSet = true;
121 }
122
123 bool ContactWebSite::getLabelIsSet() const
124 {
125         return m_labelIsSet;
126 }
127
128 } // Contact
129 } // DeviceAPI