Modify the spec file for secure log
[framework/osp/social.git] / src / FScl_CalendarbookRecordRetrivalEvent.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_CalendarbookRecordRetrivalEvent.cpp
18  * @brief       This is the implementation file for the _CalendarbookRecordRetrivalEvent class.
19  *
20  * This file contains definitions of @e _CalendarbookRecordRetrivalEvent class.
21  */
22
23 #include <FBaseSysLog.h>
24 #include <FSclIRecordListener.h>
25 #include "FScl_CalendarbookRecordRetrivalEvent.h"
26 #include "FScl_CalendarbookRecordRetrivalEventArg.h"
27
28 using namespace Tizen::Base;
29 using namespace Tizen::Base::Runtime;
30
31 namespace Tizen { namespace Social
32 {
33
34 _CalendarbookRecordRetrivalEvent::_CalendarbookRecordRetrivalEvent(void)
35 {
36         // empty body
37 }
38
39 _CalendarbookRecordRetrivalEvent::~_CalendarbookRecordRetrivalEvent(void)
40 {
41         // emtpy body
42 }
43
44 result
45 _CalendarbookRecordRetrivalEvent::Construct(void)
46 {
47         result r = E_SUCCESS;
48
49         r = _Event::Initialize();
50         SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] This is not an event-driven thread.", GetErrorMessage(r));
51
52         return E_SUCCESS;
53 }
54
55 void
56 _CalendarbookRecordRetrivalEvent::FireImpl(IEventListener& listener, const IEventArg& arg)
57 {
58         IRecordListener* pIRecordListener = dynamic_cast<IRecordListener*>(&listener);
59         const _CalendarbookRecordRetrivalEventArg* pEventArg = dynamic_cast<const _CalendarbookRecordRetrivalEventArg*>(&arg);
60
61         if (pIRecordListener != null && pEventArg != null)
62         {
63                 pIRecordListener->OnRecordsReceivedN(pEventArg->GetRequestId(), pEventArg->GetEventInstanceList(), pEventArg->GetRequestResult());
64         }
65 }
66
67 }} // Tizen::Social