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