Merge "Added new method to the NotificationManager Interface" into tizen_2.2
[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          */
81         LinkInfo(LinkType linkType, const Tizen::Base::String& link);
82
83         /**
84          * Initializes an instance of %LinkInfo with the specified parameters.
85          *
86          * @since 2.0
87          *
88          * @param[in]   linkType    The link type
89          * @param[in]   link        The link
90          * @param[in]   text        The string that represents the link
91          */
92         LinkInfo(LinkType linkType, const Tizen::Base::String& link, const Tizen::Base::String& text);
93
94         /**
95          * Copying of objects using this copy assignment operator is allowed.
96          *
97          * @since 2.0
98          *
99          * @return      A reference to the calling instance
100          * @param[in]   rhs     An instance of %LinkInfo to copy
101          */
102         LinkInfo& operator =(const LinkInfo& rhs);
103
104         /**
105          * Gets the link.
106          *
107          * @since 2.0
108          *
109          * @return      The string that contains the link
110          * @see         SetLink()
111          */
112         Tizen::Base::String GetLink(void) const;
113
114         /**
115          * Sets the link.
116          *
117          * @since 2.0
118          *
119          * @param[in]   link    The string that contains the link
120          * @see         GetLink()
121          */
122         void SetLink(const Tizen::Base::String& link);
123
124         /**
125          * Gets the type of the link.
126          *
127          * @since 2.0
128          *
129          * @return      The link type
130          * @see         SetLinkType()
131          */
132         LinkType GetLinkType(void) const;
133
134         /**
135          * Sets the type of the link.
136          *
137          * @since 2.0
138          *
139          * @param[in]   linkType    The link type
140          * @see         GetLinkType()
141          */
142         void SetLinkType(LinkType linkType);
143
144         /**
145          * Gets the string that represents the link.
146          *
147          * @since 2.0
148          *
149          * @return      The string that represents the link
150          * @see         SetText()
151          */
152         Tizen::Base::String GetText(void) const;
153
154         /**
155          * Sets the string that represents the link.
156          *
157          * @since 2.0
158          *
159          * @return      An error code
160          * @param[in]   text            The string that represents the link
161          * @see         GetText()
162          */
163         void SetText(const Tizen::Base::String& text);
164
165
166 private:
167         LinkType __linkType;
168         Tizen::Base::String __link;
169         Tizen::Base::String __text;
170
171         friend class _LinkInfoImpl;
172         class _LinkInfoImpl* __pLinkInfoImpl;
173
174 }; // LinkInfo
175
176 }}} // Tizen::Base::Utility
177
178 #endif // _FBASE_UTIL_LINK_INFO_H_