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 FIo_FileEventManagerImpl.h
19 * @brief This is the header file for the %_FileEventManagerImpl class.
21 * This header file contains the declarations of the %_FileEventManagerImpl class.
24 #ifndef _FIO_INTERNAL_FILE_EVENT_MANAGER_IMPL_H_
25 #define _FIO_INTERNAL_FILE_EVENT_MANAGER_IMPL_H_
29 #include <FBaseObject.h>
30 #include <FBaseColHashMap.h>
31 #include <FOspConfig.h>
32 #include <FBaseRtEvent.h>
34 namespace Tizen { namespace Base
39 namespace Tizen { namespace Io
42 class FileEventManager;
43 class IFileEventListener;
45 class _OSP_EXPORT_ _FileEventManagerImpl
46 : public Tizen::Base::Object
50 _FileEventManagerImpl(void);
52 virtual ~_FileEventManagerImpl(void);
54 result Construct(IFileEventListener& listener);
56 result AddPath(const Tizen::Base::String& path, unsigned long eventsToMonitor);
58 result RemovePath(const Tizen::Base::String& path);
60 result SendEvent(void);
62 static _FileEventManagerImpl* GetInstance(FileEventManager& fileEventManager);
64 static const _FileEventManagerImpl* GetInstance(const FileEventManager& fileEventManager);
67 _FileEventManagerImpl(const _FileEventManagerImpl& source);
69 _FileEventManagerImpl& operator =(const _FileEventManagerImpl& source);
71 Tizen::Base::String GetRegisteredPath(int fd);
73 static gboolean OnFileEventOccured(GIOChannel* source, GIOCondition condition, gpointer data);
75 Tizen::Base::Collection::HashMap* __pMonitorFileList;
76 Tizen::Base::Runtime::Event* __pEvent;
79 GIOChannel* __pGIOChannel;
81 friend class FileEventManager;
83 }; // _FileEventManagerImpl
87 #endif //_FIO_INTERNAL_FILE_EVENT_MANAGER_IMPL_H_