2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FIo_FileEventManagerImpl.h
20 * @brief This is the header file for the %_FileEventManagerImpl class.
22 * This header file contains the declarations of the %_FileEventManagerImpl class.
25 #ifndef _FIO_INTERNAL_FILE_EVENT_MANAGER_IMPL_H_
26 #define _FIO_INTERNAL_FILE_EVENT_MANAGER_IMPL_H_
30 #include <FBaseObject.h>
31 #include <FBaseColHashMap.h>
32 #include <FOspConfig.h>
33 #include <FBaseRtEvent.h>
35 namespace Tizen { namespace Base
40 namespace Tizen { namespace Io
43 class FileEventManager;
44 class IFileEventListener;
46 class _OSP_EXPORT_ _FileEventManagerImpl
47 : public Tizen::Base::Object
51 _FileEventManagerImpl(void);
53 virtual ~_FileEventManagerImpl(void);
55 result Construct(IFileEventListener& listener);
57 result AddPath(const Tizen::Base::String& path, unsigned long eventsToMonitor);
59 result RemovePath(const Tizen::Base::String& path);
61 result SendEvent(void);
63 static _FileEventManagerImpl* GetInstance(FileEventManager& fileEventManager);
65 static const _FileEventManagerImpl* GetInstance(const FileEventManager& fileEventManager);
68 _FileEventManagerImpl(const _FileEventManagerImpl& source);
70 _FileEventManagerImpl& operator =(const _FileEventManagerImpl& source);
72 Tizen::Base::String GetRegisteredPath(int fd);
74 static gboolean OnFileEventOccured(GIOChannel* source, GIOCondition condition, gpointer data);
76 Tizen::Base::Collection::HashMap* __pMonitorFileList;
77 Tizen::Base::Runtime::Event* __pEvent;
80 GIOChannel* __pGIOChannel;
82 friend class FileEventManager;
84 }; // _FileEventManagerImpl
88 #endif //_FIO_INTERNAL_FILE_EVENT_MANAGER_IMPL_H_