2 * Copyright 2012 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.
22 #ifndef _MF_SEARCH_INTERNAL_H_
23 #define _MF_SEARCH_INTERNAL_H_
25 #include "mf-ug-search.h"
29 #include "mf-ug-dlog.h"
31 #define ms_debug(fmt , args...) ug_debug
32 #define ms_info(fmt , args...) ug_debug
33 #define ms_warn(fmt , args...) ug_debug
34 #define ms_error(fmt , args...) ug_debug
35 #define ms_assert(fmt , args...) ug_debug
41 #define ms_debug(fmt , args...) do { printf("[%10s:%4d][D] "fmt"\n", __func__, __LINE__, ##args); } while (0)
42 #define ms_info(fmt , args...) do { printf("[%10s:%4d][I] "fmt"\n", __func__, __LINE__, ##args); } while (0)
43 #define ms_warn(fmt , args...) do { printf("[%10s:%4d][W] "fmt"\n", __func__, __LINE__, ##args); } while (0)
44 #define ms_error(fmt , args...) do { printf("[%10s:%4d][E] "fmt"\n", __func__, __LINE__, ##args); } while (0)
45 #define ms_assert(fmt , args...) do { printf("[%10s:%4d][A] "fmt"\n", __func__, __LINE__, ##args); } while (0)
47 #define ms_debug(fmt , args...) do { (void)0; } while (0)
48 #define ms_info(fmt , args...) do { (void)0; } while (0)
49 #define ms_warn(fmt , args...) do { (void)0; } while (0)
50 #define ms_error(fmt , args...) do { (void)0; } while (0)
51 #define ms_assert(fmt , args...) do { (void)0; } while (0)
56 * Enumerations of search state
59 int _mf_ug_search_init(ms_handle_t **handle);
60 int _mf_ug_search_start(ms_handle_t *handle, const char **root_path, unsigned int path_num, const char *needle, mf_search_option option,
62 int _mf_ug_search_stop(ms_handle_t *handle);
63 void _mf_ug_search_finalize(ms_handle_t **handle);
65 /*+++++++++++++++++++++++++ UTIL APIs ++++++++++++++++++++++++++++++ */
67 gchar *_mf_ug_search_result_dir_get(mf_search_result_t *result);
68 gchar *_mf_ug_search_result_file_get(mf_search_result_t *result);
69 gboolean _mf_ug_search_result_is_end(mf_search_result_t *result);
70 gchar *_mf_ug_search_result_current_dir_get(mf_search_result_t *result);
71 guint _mf_ug_search_result_total_count_get(mf_search_result_t *result);