return ret;
}
+
+int media_svc_get_book_by_keyword(sqlite3 *handle, const char *keyword, GList **result)
+{
+ int ret = MS_MEDIA_ERR_NONE;
+ GList *item_list = NULL;
+ GList *iter = NULL;
+ char *query = NULL;
+ char *tmp_path = NULL;
+
+ media_svc_retvm_if(!handle, MS_MEDIA_ERR_INVALID_PARAMETER, "db handle is NULL");
+ media_svc_retvm_if(!keyword, MS_MEDIA_ERR_INVALID_PARAMETER, "keyword is NULL");
+ media_svc_retvm_if(!result, MS_MEDIA_ERR_INVALID_PARAMETER, "result is NULL");
+
+ query = sqlite3_mprintf("SELECT media_path FROM %q WHERE media_type=%d AND validity=1;",
+ DB_TABLE_MEDIA, MEDIA_SVC_MEDIA_TYPE_BOOK);
+
+ ret = _media_svc_get_media(handle, query, &item_list);
+ media_svc_retvm_if(ret != MS_MEDIA_ERR_NONE, ret, "_media_svc_get_media failed");
+
+ for (iter = item_list; iter; iter = g_list_next(iter)) {
+ tmp_path = (char *)iter->data;
+
+ if (_media_svc_is_keyword_included(tmp_path, keyword))
+ *result = g_list_append(*result, g_strdup(tmp_path));
+ }
+
+ g_list_free_full(item_list, g_free);
+
+ return ret;
+}