2 * Copyright (c) 2012, 2013 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.
17 #ifndef _MTP_INOTI_HANDLER_H_
18 #define _MTP_INOTI_HANDLER_H_
20 #include "mtp_config.h"
21 #ifdef MTP_SUPPORT_OBJECTADDDELETE_EVENT
22 #include <sys/inotify.h>
24 #include "mtp_datatype.h"
26 #define INOTI_EVENT_SIZE (sizeof(struct inotify_event))
27 #define INOTI_BUF_LEN (INOTI_EVENT_SIZE + NAME_MAX + 1)
28 #define INOTI_FOLDER_COUNT_MAX (1024)
32 mtp_char *forlder_name;
35 typedef struct _open_files_info {
38 struct _open_files_info* previous;
39 struct _open_files_info* next;
42 void *_thread_inoti(void *arg);
43 void _inoti_add_watch_for_fs_events(mtp_char *path);
44 mtp_bool _inoti_init_filesystem_evnts();
45 void _inoti_deinit_filesystem_events();
46 #endif /* MTP_SUPPORT_OBJECTADDDELETE_EVENT */
48 #endif /* _MTP_INOTI_HANDLER_H_ */