+bool __search_sql_browser_bookmark_result_cb(favorites_bookmark_entry_s *item, void *user_data)
+{
+ SEARCH_FUNC_START;
+ struct search_item_sel *sel_mem_info = NULL;
+
+ bool ret = false;
+ bool is_word_in_str_main = false;
+ bool is_word_in_str_sub = false;
+
+ const char* match_str = NULL;
+
+ struct search_cb_data_browser *scd = (struct search_cb_data_browser*)user_data;
+ struct appdata *ad = scd->ad;
+ struct search_content_object *obj = scd->obj;
+ struct search_genlist_info *result_info = scd->result_info;
+ char *keyword = scd->keyword;
+
+ struct search_genlist_item_info *gen_item = NULL;
+ struct search_more_result *info = scd->info;
+
+ if (info->loop_cnt < info->next_point) {
+ info->loop_cnt++;
+ return true;
+ }
+
+ if (info->next_point <
+ info->offset + SEARCH_CATEGORY_LIST_MORE_CNT) {
+
+ sel_mem_info = (struct search_item_sel *)calloc(1, sizeof(struct search_item_sel));
+ sel_mem_info->type = obj->contents_type;;
+
+ /********** START : set search result to sel_mem_info buf ************/
+
+ if (item != NULL && item->title) {
+ match_str = search_markup_keyword(item->title, keyword, &is_word_in_str_main);
+ strncpy(sel_mem_info->main_buf,
+ match_str,
+ MAX_LENGTH_PER_LINE - 1);
+ }
+
+ if (item != NULL && item->address) {
+ match_str = search_markup_keyword(item->address, keyword, &is_word_in_str_sub);
+ strncpy(sel_mem_info->sub_buf,
+ match_str,
+ MAX_LENGTH_PER_LINE - 1);
+ strncpy(sel_mem_info->path,
+ item->address,
+ MAX_LENGTH_PER_PATH - 1);
+ }
+
+ if (is_word_in_str_main == true || is_word_in_str_sub == true) {
+ if (obj->gl_result_grp == NULL ) {
+ /* Set group title */
+ result_info->group = search_add_genlist_item(SEARCH_GENLIST_GROUP,
+ obj,
+ ad->itc_grouptitle,
+ obj,
+ NULL);
+ }
+
+ if (obj->obj_icon_path)
+ strncpy(sel_mem_info->icon1_path, obj->obj_icon_path,
+ MAX_LENGTH_PER_PATH - 1);
+
+ strncpy(sel_mem_info->icon2_path,
+ SEARCH_FAVORITE_ICON,
+ MAX_LENGTH_PER_PATH - 1);
+
+ gen_item = search_add_genlist_item(SEARCH_GENLIST_ITEM,
+ obj,
+ ad->itc_pslist_2line_2icon,
+ sel_mem_info,
+ obj->gl_result_grp);
+ result_info->itemlist = g_list_append(result_info->itemlist, (void*)gen_item);
+ }
+
+ /********** END : set search result to sel_mem_info buf *************/
+ info->next_point++;
+ info->loop_cnt++;
+
+ ret = true;
+ } else if (info->next_point ==
+ info->offset + SEARCH_CATEGORY_LIST_MORE_CNT) {
+ info->offset = info->next_point;
+ ret = false;
+ } else {
+ SEARCH_DEBUG_WARNING
+ ("__search_sql_browser_bookmark_result_cb wrong index : %d",
+ info->next_point);
+
+ ret = false;
+ }