-
-
-static ail_error_e _create_table(void)
-{
- int i;
- ail_error_e ret;
- const char *tbls[3] = {
- "CREATE TABLE app_info "
- "(package TEXT PRIMARY KEY, "
- "exec TEXT DEFAULT 'No Exec', "
- "name TEXT DEFAULT 'No Name', "
- "type TEXT DEFAULT 'Application', "
- "icon TEXT DEFAULT 'No Icon', "
- "categories TEXT, "
- "version TEXT, "
- "mimetype TEXT, "
- "x_slp_service TEXT, "
- "x_slp_packagetype TEXT, "
- "x_slp_packagecategories TEXT, "
- "x_slp_packageid TEXT, "
- "x_slp_uri TEXT, "
- "x_slp_svc TEXT, "
- "x_slp_exe_path TEXT, "
- "x_slp_appid TEXT, "
- "x_slp_pkgid TEXT, "
- "x_slp_domain TEXT, "
- "x_slp_baselayoutwidth INTEGER DEFAULT 0, "
- "x_slp_installedtime INTEGER DEFAULT 0, "
- "nodisplay INTEGER DEFAULT 0, "
- "x_slp_taskmanage INTEGER DEFAULT 1, "
- "x_slp_multiple INTEGER DEFAULT 0, "
- "x_slp_removable INTEGER DEFAULT 1, "
- "x_slp_ishorizontalscale INTEGER DEFAULT 0, "
- "x_slp_enabled INTEGER DEFAULT 1, "
- "desktop TEXT UNIQUE NOT NULL);",
- "CREATE TABLE localname (package TEXT NOT NULL, "
- "locale TEXT NOT NULL, "
- "name TEXT NOT NULL, PRIMARY KEY (package, locale));",
- NULL
- };
-
- ret = db_open(DB_OPEN_RW);
- retv_if(ret != AIL_ERROR_OK, AIL_ERROR_DB_FAILED);
-
- for (i = 0; tbls[i] != NULL; i++) {
- ret = db_exec(tbls[i]);
- retv_if(ret != AIL_ERROR_OK, AIL_ERROR_DB_FAILED);
- }
-
- return AIL_ERROR_OK;
-}
-
-
-static inline void _insert_localname(gpointer data, gpointer user_data)