f68c8c72466407dad547280c40aad61e472d08ef
[platform/framework/native/appfw.git] / src / base / utility / FBaseUtilLinkInfo.cpp
1 //
2 // Open Service Platform
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        FBaseUtilLinkInfo.cpp
20  * @brief       This is the implementation file for the LinkeInfo class.
21  *
22  */
23
24
25 //Includes
26 #include <FBaseUtilLinkInfo.h>
27
28
29 using namespace Tizen::Base;
30 using namespace Tizen::Base::Collection;
31
32 namespace Tizen { namespace Base { namespace Utility
33 {
34
35 LinkInfo::LinkInfo(void)
36         : __linkType(LINK_TYPE_NONE)
37         , __pLinkInfoImpl(null)
38 {
39 }
40
41
42 LinkInfo::LinkInfo(const LinkInfo& value)
43         : __pLinkInfoImpl(null)
44 {
45         __linkType = value.__linkType;
46         __link = value.__link;
47         __text = value.__text;
48 }
49
50
51 LinkInfo::LinkInfo(LinkType linkType, const String& link)
52         : __linkType(linkType)
53         , __link(link)
54         , __text(link)
55         , __pLinkInfoImpl(null)
56 {
57 }
58
59
60 LinkInfo::LinkInfo(LinkType linkType, const String& link, const String& text)
61         : __linkType(linkType)
62         , __link(link)
63         , __text(text)
64         , __pLinkInfoImpl(null)
65 {
66 }
67
68
69 LinkInfo::~LinkInfo(void)
70 {
71 }
72
73
74 LinkInfo&
75 LinkInfo::operator =(const LinkInfo& rhs)
76 {
77         if (&rhs != this)
78         {
79                 __linkType = rhs.__linkType;
80                 __link = rhs.__link;
81                 __text = rhs.__text;
82         }
83         return(*this);
84 }
85
86
87 void
88 LinkInfo::SetLink(const String& link)
89 {
90         __link = link;
91 }
92
93
94 String
95 LinkInfo::GetLink(void) const
96 {
97         return __link;
98 }
99
100
101 void
102 LinkInfo::SetLinkType(LinkType linkType)
103 {
104         __linkType = linkType;
105 }
106
107
108 LinkType
109 LinkInfo::GetLinkType(void) const
110 {
111         return __linkType;
112 }
113
114
115 void
116 LinkInfo::SetText(const String& text)
117 {
118         __text = text;
119 }
120
121
122 String
123 LinkInfo::GetText(void) const
124 {
125         return __text;
126 }
127
128
129 }}}