Move system-server under server/system.
[platform/framework/native/appfw.git] / inc / FBaseUtilLinkInfo.h
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.h
19  * @brief               This is the header file for the %LinkInfo class.
20  *
21  * This header file contains the declarations of the %LinkInfo class.
22  */
23 #ifndef _FBASE_UTIL_LINK_INFO_H_
24 #define _FBASE_UTIL_LINK_INFO_H_
25
26 #include <FBaseColIList.h>
27 #include <FBaseString.h>
28 #include <FBaseUtilTypes.h>
29
30
31 namespace Tizen { namespace Base { namespace Utility
32 {
33
34 /**
35 * @class   LinkInfo
36 * @brief   This class provides methods for accessing the link, its type, and a string that represents the link.
37 *
38 * @since 2.0
39 *
40 * The %LinkInfo class provides information regarding a link. It contains methods
41 * for accessing the link, its type, and a string that represents the link.
42 */
43 class _OSP_EXPORT_ LinkInfo
44         : public Tizen::Base::Object
45 {
46 public:
47         /**
48          * This is the default constructor for this class.
49          *
50          * @since 2.0
51          *
52          * @remarks     The link and text are set to empty strings and the link type is set to @c LINK_TYPE_NONE.
53          */
54         LinkInfo(void);
55
56         /**
57          * This destructor overrides Tizen::Base::Object::~Object().
58          *
59          * @since 2.0
60          */
61         virtual ~LinkInfo(void);
62
63         /**
64          * Copying of objects using this copy constructor is allowed.
65          *
66          * @since 2.0
67          *
68          * @param[in]   value  An instance of %LinkInfo
69          */
70         LinkInfo(const LinkInfo& value);
71
72         /**
73          * Initializes an instance of %LinkInfo with the specified parameters.
74          *
75          * @since 2.0
76          *
77          * @param[in]   linkType    The link type
78          * @param[in]   link        The link
79          * @remarks     The link's @c text is set to the same string as @c link.
80          * @see         Tizen::Base::Utility::LinkType
81          */
82         LinkInfo(LinkType linkType, const Tizen::Base::String& link);
83
84         /**
85          * Initializes an instance of %LinkInfo with the specified parameters.
86          *
87          * @since 2.0
88          *
89          * @param[in]   linkType    The link type
90          * @param[in]   link        The link
91          * @param[in]   text        A string that represents the link
92          * @see         Tizen::Base::Utility::LinkType
93          */
94         LinkInfo(LinkType linkType, const Tizen::Base::String& link, const Tizen::Base::String& text);
95
96         /**
97          * Copying of objects using this copy assignment operator is allowed.
98          *
99          * @since 2.0
100          *
101          * @return      A reference to the calling instance
102          * @param[in]   rhs     An instance of %LinkInfo
103          */
104         LinkInfo& operator =(const LinkInfo& rhs);
105
106         /**
107          * Gets the link.
108          *
109          * @since 2.0
110          *
111          * @return      The string that contains the link
112          * @see         SetLink()
113          */
114         Tizen::Base::String GetLink(void) const;
115
116         /**
117          * Sets the link.
118          *
119          * @since 2.0
120          *
121          * @param[in]   link    The string that contains the link
122          * @see         GetLink()
123          */
124         void SetLink(const Tizen::Base::String& link);
125
126         /**
127          * Gets the type of the link.
128          *
129          * @since 2.0
130          *
131          * @return      The link type
132          * @see         SetLinkType()
133          * @see         Tizen::Base::Utility::LinkType
134          */
135         LinkType GetLinkType(void) const;
136
137         /**
138          * Sets the type of the link.
139          *
140          * @since 2.0
141          *
142          * @param[in]   linkType    The link type
143          * @see         GetLinkType()
144          * @see         Tizen::Base::Utility::LinkType
145          */
146         void SetLinkType(LinkType linkType);
147
148         /**
149          * Gets the string that represents the link.
150          *
151          * @since 2.0
152          *
153          * @return      The string that represents the link
154          * @see         SetText()
155          */
156         Tizen::Base::String GetText(void) const;
157
158         /**
159          * Sets the string that represents the link.
160          *
161          * @since 2.0
162          *
163          * @return      An error code
164          * @param[in]   text            The string that represents the link
165          * @see         GetText()
166          */
167         void SetText(const Tizen::Base::String& text);
168
169
170 private:
171         LinkType __linkType;
172         Tizen::Base::String __link;
173         Tizen::Base::String __text;
174
175         friend class _LinkInfoImpl;
176         class _LinkInfoImpl* __pLinkInfoImpl;
177
178 }; // LinkInfo
179
180 }}} // Tizen::Base::Utility
181
182 #endif // _FBASE_UTIL_LINK_INFO_H_