Fix code for TDIS-5396
[framework/osp/social.git] / src / FScl_RecordImpl.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  * @file                FScl_RecordImpl.cpp
19  * @brief               This is the implementation for _RecordImpl class.
20  *
21  * This file contains definitions of _RecordImpl class.
22  */
23
24 #include "FScl_RecordImpl.h"
25
26 using namespace Tizen::Base;
27
28 namespace Tizen { namespace Social
29 {
30
31 _RecordImpl::_RecordImpl(RecordType type)
32         : __recordType(type)
33         , __recordId(INVALID_RECORD_ID)
34 {
35         // empty body.
36 }
37
38 _RecordImpl::~_RecordImpl()
39 {
40         // empty body.
41 }
42
43 _RecordImpl::_RecordImpl(const _RecordImpl& rhs)
44 {
45         __recordType = rhs.__recordType;
46         __recordId = rhs.__recordId;
47 }
48
49 _RecordImpl&
50 _RecordImpl::operator =(const _RecordImpl& rhs)
51 {
52         if (this == &rhs)
53         {
54                 return *this;
55         }
56
57         __recordType = rhs.__recordType;
58         __recordId = rhs.__recordId;
59
60         return *this;
61 }
62
63 RecordType
64 _RecordImpl::GetRecordType(void) const
65 {
66         return __recordType;
67 }
68
69 RecordId
70 _RecordImpl::GetRecordId(void) const
71 {
72         return __recordId;
73 }
74
75 void
76 _RecordImpl::SetRecordId(RecordId recordId)
77 {
78         __recordId = recordId;
79 }
80
81 _RecordImpl*
82 _RecordImpl::GetInstance(Record& record)
83 {
84         return record.__pRecordImpl;
85 }
86
87 const _RecordImpl*
88 _RecordImpl::GetInstance(const Record& record)
89 {
90         return record.__pRecordImpl;
91 }
92
93 }} // Tizen::Social