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.
18 * @file FBaseRt_EventPendingOperationManager.cpp
19 * @brief This is the implementation file for the _EventPendingOperationManager class.
25 #include <FBaseObject.h>
27 #include "FBaseRtEvent.h"
28 #include <FBaseSysLog.h>
29 #include "FBaseRt_EventPendingOperationManager.h"
32 using namespace Tizen::Base;
33 using namespace Tizen::Base::Runtime;
34 using namespace Tizen::Base::Collection;
36 namespace Tizen { namespace Base { namespace Runtime
39 _EventPendingOperationManager::_EventPendingOperationManager(void)
45 _EventPendingOperationManager::AddFilter(const IEventFilter& filter)
49 _EventPendingOperation* pPendingOperation = new (std::nothrow) _EventPendingOperation;
51 pPendingOperation->opType = EVENT_OPERATION_ADD_FILTER;
52 pPendingOperation->pFilter = &filter;
54 r = __operations.Add(*pPendingOperation);
60 _EventPendingOperationManager::RemoveFilter(const IEventFilter& filter)
64 _EventPendingOperation* pPendingOperation = new (std::nothrow) _EventPendingOperation;
66 pPendingOperation->opType = EVENT_OPERATION_REMOVE_FILTER;
67 pPendingOperation->pFilter = &filter;
69 r = __operations.Add(*pPendingOperation);
75 _EventPendingOperationManager::AddListener(const IEventListener& listener)
77 _EventPendingOperation* pPendingOperation = new (std::nothrow) _EventPendingOperation;
79 pPendingOperation->opType = EVENT_OPERATION_ADD_LISTENER;
80 pPendingOperation->pListener = &listener;
82 result r = __operations.Add(*pPendingOperation);
88 _EventPendingOperationManager::RemoveListener(const IEventListener& listener)
92 _EventPendingOperation* pPendingOperation = new (std::nothrow) _EventPendingOperation;
94 pPendingOperation->opType = EVENT_OPERATION_REMOVE_LISTENER;
95 pPendingOperation->pListener = &listener;
97 r = __operations.Add(*pPendingOperation);
102 } } } // Tizen::Runtime