2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
8 // http://www.apache.org/licenses/LICENSE-2.0
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.
17 * @file FSclRecord.cpp
18 * @brief This is the implementation for Record class.
20 * This file contains definitions of @e Record class.
23 #include <FSclRecord.h>
24 #include <FBaseSysLog.h>
25 #include "FScl_RecordImpl.h"
27 namespace Tizen { namespace Social
30 Record::Record(RecordType type)
32 __pRecordImpl = new (std::nothrow) _RecordImpl(type);
33 SysTryReturnVoidResult(NID_SCL, __pRecordImpl != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
36 Record::Record(const Record& rhs)
38 __pRecordImpl = new (std::nothrow) _RecordImpl(*rhs.__pRecordImpl);
39 SysTryReturnVoidResult(NID_SCL, __pRecordImpl != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
43 Record::operator =(const Record& rhs)
50 *__pRecordImpl = *rhs.__pRecordImpl;
61 Record::GetRecordType(void) const
63 return __pRecordImpl->GetRecordType();
67 Record::GetRecordId(void) const
69 return __pRecordImpl->GetRecordId();