2 * Copyright 2013 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.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://floralicense.org/license/
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.
21 #ifndef _MF_SEARCH_INTERNAL_H_
22 #define _MF_SEARCH_INTERNAL_H_
24 #include "mf-search.h"
30 #define ms_debug(fmt , args...) mf_debug
31 #define ms_info(fmt , args...) mf_info
32 #define ms_warn(fmt , args...) mf_warnig
33 #define ms_error(fmt , args...) mf_error
34 #define ms_assert(fmt , args...) mf_assert
40 #define ms_debug(fmt , args...) do { printf("[%10s:%4d][D] "fmt"\n", __func__, __LINE__, ##args); } while (0)
41 #define ms_info(fmt , args...) do { printf("[%10s:%4d][I] "fmt"\n", __func__, __LINE__, ##args); } while (0)
42 #define ms_warn(fmt , args...) do { printf("[%10s:%4d][W] "fmt"\n", __func__, __LINE__, ##args); } while (0)
43 #define ms_error(fmt , args...) do { printf("[%10s:%4d][E] "fmt"\n", __func__, __LINE__, ##args); } while (0)
44 #define ms_assert(fmt , args...) do { printf("[%10s:%4d][A] "fmt"\n", __func__, __LINE__, ##args); } while (0)
46 #define ms_debug(fmt , args...) do { (void)0; } while (0)
47 #define ms_info(fmt , args...) do { (void)0; } while (0)
48 #define ms_warn(fmt , args...) do { (void)0; } while (0)
49 #define ms_error(fmt , args...) do { (void)0; } while (0)
50 #define ms_assert(fmt , args...) do { (void)0; } while (0)
55 * Enumerations of search state
58 int _mf_search_init(ms_handle_t **handle);
59 int _mf_search_start(ms_handle_t *handle,
60 const char **root_path,
61 unsigned int path_num,
63 mf_search_option option,
65 mf_search_filter_cb func,
67 int _mf_search_stop(ms_handle_t *handle);
68 void _mf_search_finalize(ms_handle_t **handle);
70 /*+++++++++++++++++++++++++ UTIL APIs ++++++++++++++++++++++++++++++ */
72 gchar *_mf_search_result_dir_get(mf_search_result_t *result);
73 gchar *_mf_search_result_file_get(mf_search_result_t *result);
74 gboolean _mf_search_result_is_end(mf_search_result_t *result);
75 gchar *_mf_search_result_current_dir_get(mf_search_result_t *result);
76 guint _mf_search_result_total_count_get(mf_search_result_t *result);