Init Tizen 2.2.1
[framework/osp/social.git] / inc / FSclRelationship.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 * @file         FSclRelationship.h
18 * @brief        This is the header file for the %Relationship class.
19 *
20 * This header file contains the declarations of the %Relationship class.
21 */
22 #ifndef _FSCL_RELATIONSHIP_H_
23 #define _FSCL_RELATIONSHIP_H_
24
25 #include <FBaseResult.h>
26 #include <FBaseObject.h>
27 #include <FBaseString.h>
28 #include <FSclTypes.h>
29
30 namespace Tizen { namespace Social
31 {
32
33 /**
34 * @class        Relationship
35 * @brief        This class represents a relation.
36 *
37 * @since        2.0
38 *
39 * @final        This class is not intended for extension.
40 *
41 * The %Relationship class represents a relation. A relation consists of the type, label, and name. 
42 *
43 */
44 class _OSP_EXPORT_ Relationship
45         : public Tizen::Base::Object
46 {
47 public:
48         /**
49          * This is the default constructor for this class.
50          *
51          * @since       2.0
52          */
53         Relationship(void);
54
55         /**
56          * Copying of objects using this copy constructor is allowed.
57          *
58          * @since       2.0
59          *
60          * @param[in]   rhs     An instance of %Relationship to copy
61          */
62         Relationship(const Relationship& rhs);
63
64         /**
65          * This destructor overrides Tizen::Base::Object::~Object().
66          *
67          * @since       2.0
68          */
69         virtual ~Relationship(void);
70
71         /**
72          * Checks whether the value of the specified instance is equal to the value of the current instance of Tizen::Base::Object.
73          *
74          * @since       2.0
75          *
76          * @return      @c true if the value of the specified instance of Tizen::Base::Object is equal to the value of the current instance of %Tizen::Base::Object, @n
77          *                      else @c false
78          * @param[in]   rhs             An instance of Tizen::Base::Object to compare
79          */
80         virtual bool Equals(const Tizen::Base::Object& rhs) const;
81
82         /**
83          * Gets the hash value of the current instance of Tizen::Base::Object.
84          *
85          * @since       2.0
86          *
87          * @return      The integer value indicates the hash value of the current instance of Tizen::Base::Object
88          */
89         virtual int GetHashCode(void) const;
90
91         /**
92          * Gets the relation type.
93          *
94          * @since       2.0
95          *
96          * @return      The type of the relation
97          */
98         RelationshipType GetType(void) const;
99
100         /**
101          * Gets the name of the relative.
102          *
103          * @since       2.0
104          *
105          * @return      The name of the relative
106          */
107         Tizen::Base::String GetRelativeName(void) const;
108
109         /**
110          * Gets the label of the relation.
111          *
112          * @since       2.0
113          *
114          * @return      The relation label
115          * @see SetLabel()
116          */
117         Tizen::Base::String GetLabel(void) const;
118
119         /**
120          * Sets the relation type.
121          *
122          * @since       2.0
123          *
124          * @param[in]   type            The type of the relation
125          */
126         void SetType(RelationshipType type);
127
128         /**
129          * Sets the label of the relation.
130          *
131          * @since       2.0
132          *
133          * @param[in]   label           The relation label
134          * @see GetLabel()
135          */
136         void SetLabel(const Tizen::Base::String& label);
137
138         /**
139          * Sets the name of the relative.
140          *
141          * @since       2.0
142          *
143          * @param[in]   relativeName            The name of the relative
144          */
145         void SetRelativeName(const Tizen::Base::String& relativeName);
146
147         /**
148          * Copying of objects using this copy assignment operator is allowed.
149          *
150          * @since       2.0
151          *
152          * @param[in]   rhs     An instance of %Relationship to copy
153          */
154         Relationship& operator =(const Relationship& rhs);
155
156         /**
157          * Checks whether the data in the specified instance of %Relationship is equal to the data in the current instance.
158          *
159          * @since       2.0
160          *
161          * @return              @c true if the data in the specified instance equals the data in the current instance, @n
162          *                              else @c false
163          * @param[in]   rhs             An instance of %Relationship
164          */
165         bool operator ==(const Relationship& rhs) const;
166
167         /**
168          * Checks whether the data in the specified instance of %Relationship is not equal to the data in the current instance.
169          *
170          * @since       2.0
171          *
172          * @return              @c true if the data in the specified instance is not equal to the data in the current instance, @n
173          *                              else @c false
174          * @param[in]   rhs             An instance of %Relationship
175          */
176         bool operator !=(const Relationship& rhs) const;
177
178 private:
179         RelationshipType __type;
180         Tizen::Base::String __label;
181         Tizen::Base::String __name;
182
183         friend class _RelationshipImpl;
184         class _RelationshipImpl* __pRelationshipImpl;
185 }; // Relationship
186
187 }} // Tizen::Social
188
189 #endif // _FSCL_RELATIONSHIP_H_