651abdb8c51ed4d6c3c3cc5863206b381bb3d9f5
[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
93 ContactWebSitePtr ContactWebSite::clone() const
94 {
95         ContactWebSitePtr result(new ContactWebSite());
96
97         result->m_url = m_url;
98         result->m_urlIsSet = m_urlIsSet;
99
100         result->m_type = m_type;
101         result->m_typeIsSet = m_typeIsSet;
102
103         return result;
104 }
105
106 } // Contact
107 } // DeviceAPI