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 FScl_CalendarbookRecordRetrivalEvent.cpp
18 * @brief This is the implementation file for the _CalendarbookRecordRetrivalEvent class.
20 * This file contains definitions of @e _CalendarbookRecordRetrivalEvent class.
23 #include <FSclIRecordListener.h>
24 #include <FBaseSysLog.h>
25 #include "FScl_CalendarbookRecordRetrivalEventArg.h"
26 #include "FScl_CalendarbookRecordRetrivalEvent.h"
28 using namespace Tizen::Base;
29 using namespace Tizen::Base::Runtime;
31 namespace Tizen { namespace Social
34 _CalendarbookRecordRetrivalEvent::_CalendarbookRecordRetrivalEvent(void)
39 _CalendarbookRecordRetrivalEvent::~_CalendarbookRecordRetrivalEvent(void)
45 _CalendarbookRecordRetrivalEvent::Construct(void)
49 r = _Event::Initialize();
50 SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] This is not an event-driven thread.", GetErrorMessage(r));
56 _CalendarbookRecordRetrivalEvent::FireImpl(IEventListener& listener, const IEventArg& arg)
58 IRecordListener* pIRecordListener = dynamic_cast<IRecordListener*>(&listener);
59 const _CalendarbookRecordRetrivalEventArg* pEventArg = dynamic_cast<const _CalendarbookRecordRetrivalEventArg*>(&arg);
61 if (pIRecordListener != null && pEventArg != null)
63 pIRecordListener->OnRecordsReceivedN(pEventArg->GetRequestId(), pEventArg->GetEventInstanceList(), pEventArg->GetRequestResult());