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 FApp_RequestManagerT.h
19 * @brief This is the header file for the _RequestManagerT class.
22 #ifndef _FAPP_INTERNAL_REQUEST_MANAGERT_H_
23 #define _FAPP_INTERNAL_REQUEST_MANAGERT_H_
25 #include <FOspConfig.h>
26 #include <FBaseColHashMapT.h>
27 #include <FBaseSysLog.h>
29 namespace Tizen { namespace Base { namespace Runtime
34 namespace Tizen { namespace App
38 class _RequestManagerT
41 typedef Tizen::Base::Collection::HashMapT<int, T*> RequestListType;
42 typedef Tizen::Base::Collection::IMapEnumeratorT<int, T*> RequestListEnumType;
43 typedef bool (*Pred)(const T&, Tizen::Base::Runtime::IEventListener*);
45 _RequestManagerT(void);
47 ~_RequestManagerT(void);
49 int InsertItem(T* pItem);
51 void RemoveItem(int reqId);
53 void RemoveItem(T* pItem);
55 T* FindItemWithListener(Pred, Tizen::Base::Runtime::IEventListener* pListener) const;
57 T* FindItem(int reqId) const;
59 void Dump(void) const;
62 _RequestManagerT(const T& rhs);
64 _RequestManagerT& operator =(const _RequestManagerT& rhs);
68 RequestListType __requestList;
69 }; // _RequestManagerT
74 #endif // _FAPP_INTERNAL_REQUEST_MANAGERT_H_