Merge "Update deprecated libprivilege-control API functions." into tizen
[platform/framework/native/appfw.git] / src / base / utility / FBaseUtilLinkInfo.cpp
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 /**
18  * @file        FBaseUtilLinkInfo.cpp
19  * @brief       This is the implementation file for the LinkeInfo class.
20  *
21  */
22 #include <FBaseUtilLinkInfo.h>
23
24 using namespace Tizen::Base;
25 using namespace Tizen::Base::Collection;
26
27 namespace Tizen { namespace Base { namespace Utility
28 {
29
30 LinkInfo::LinkInfo(void)
31         : __linkType(LINK_TYPE_NONE)
32         , __pLinkInfoImpl(null)
33 {
34 }
35
36 LinkInfo::LinkInfo(const LinkInfo& value)
37         : __pLinkInfoImpl(null)
38 {
39         __linkType = value.__linkType;
40         __link = value.__link;
41         __text = value.__text;
42 }
43
44 LinkInfo::LinkInfo(LinkType linkType, const String& link)
45         : __linkType(linkType)
46         , __link(link)
47         , __text(link)
48         , __pLinkInfoImpl(null)
49 {
50 }
51
52 LinkInfo::LinkInfo(LinkType linkType, const String& link, const String& text)
53         : __linkType(linkType)
54         , __link(link)
55         , __text(text)
56         , __pLinkInfoImpl(null)
57 {
58 }
59
60 LinkInfo::~LinkInfo(void)
61 {
62 }
63
64 LinkInfo&
65 LinkInfo::operator =(const LinkInfo& rhs)
66 {
67         if (&rhs != this)
68         {
69                 __linkType = rhs.__linkType;
70                 __link = rhs.__link;
71                 __text = rhs.__text;
72         }
73         return(*this);
74 }
75
76 void
77 LinkInfo::SetLink(const String& link)
78 {
79         __link = link;
80 }
81
82 String
83 LinkInfo::GetLink(void) const
84 {
85         return __link;
86 }
87
88 void
89 LinkInfo::SetLinkType(LinkType linkType)
90 {
91         __linkType = linkType;
92 }
93
94 LinkType
95 LinkInfo::GetLinkType(void) const
96 {
97         return __linkType;
98 }
99
100 void
101 LinkInfo::SetText(const String& text)
102 {
103         __text = text;
104 }
105
106 String
107 LinkInfo::GetText(void) const
108 {
109         return __text;
110 }
111 }}}