# limitations under the License.
#
-for name in web_provider
-do
- rm -f /opt/dbspace/.$name.db
- rm -f /opt/dbspace/.$name.db-journal
- SQL="PRAGMA journal_mode = PERSIST;"
- sqlite3 /opt/dbspace/.$name.db "$SQL"
- SQL=".read /usr/share/web-provider/"$name"_db.sql"
- sqlite3 /opt/dbspace/.$name.db "$SQL"
- touch /opt/dbspace/.$name.db-journal
- chown 0:6026 /opt/dbspace/.$name.db
- chown 0:6026 /opt/dbspace/.$name.db-journal
- chmod 660 /opt/dbspace/.$name.db
- chmod 660 /opt/dbspace/.$name.db-journal
-done
+web_provider_db="/opt/usr/dbspace/.web_provider.db"
+web_provider_sql="/usr/share/web-provider/web_provider_db.sql"
+
+if [ -f $web_provider_db ]; then
+ echo "DB already exists."
+else
+ echo "create web livebox DB..."
+ rm -f $web_provider_db
+ rm -f $web_provider_db-journal
+ sql="PRAGMA journal_mode = PERSIST;"
+ sqlite3 $web_provider_db "$sql"
+ sql=".read "$web_provider_sql
+ sqlite3 $web_provider_db "$sql"
+ touch $web_provider_db-journal
+ chown 0:6026 $web_provider_db
+ chown 0:6026 $web_provider_db-journal
+ chmod 660 $web_provider_db
+ chmod 660 $web_provider_db-journal
+ echo "finish creation of db."
+fi
%post
killall -9 web-provider
-echo "create web livebox DB..."
/usr/bin/web_provider_reset_db.sh
if [ -f /usr/lib/rpm-plugins/msm.so ]; then
echo "smack setting..."
#include <string>
#include "SqliteDB.h"
-const std::string dbPath("/opt/dbspace/.web_provider.db");
+const std::string dbPath("/opt/usr/dbspace/.web_provider.db");
class WebProviderDB : public SqliteDB {
public:
return 0;
}
-int web_provider_livebox_insert_box_type(
- const char* box_id,
- const char* app_id,
- const char* box_type)
-{
- return web_provider_livebox_insert_box_info(box_id, app_id, box_type, 0, 0, 0);
-}
-
int web_provider_livebox_delete_by_box_id(const char* box_id)
{
if (!box_id) {
handle->closeDB();
return 0;
}
-
-const char* web_provider_info_get_default_type()
-{
- return web_provider_livebox_get_default_type();
-}
-
-const char* web_provider_info_get_box_type(const char* box_id)
-{
- return web_provider_livebox_get_box_type(box_id);
-}
-
-int web_provider_info_insert_box_type(
- const char* box_id,
- const char* app_id,
- const char* box_type)
-{
- return web_provider_livebox_insert_box_info(box_id, app_id, box_type, 0, 0, 0);
-}
-
-int web_provider_info_delete_by_box_id(const char* box_id)
-{
- return web_provider_livebox_delete_by_box_id(box_id);
-}
-
-int web_provider_info_delete_by_app_id(const char* app_id)
-{
- return web_provider_livebox_delete_by_app_id(app_id);
-}
-
-int web_provider_info_delete_by_type(const char* type)
-{
- return web_provider_livebox_delete_by_type(type);
-}
int auto_launch,
int mouse_event,
int pd_fast_open);
-DEPRECATED_API int web_provider_livebox_insert_box_type(
- const char* box_id,
- const char* app_id,
- const char* box_type);
EXPORT_API int web_provider_livebox_delete_by_box_id(const char* box_id);
EXPORT_API int web_provider_livebox_delete_by_app_id(const char* app_id);
EXPORT_API int web_provider_livebox_delete_by_type(const char* type);
-DEPRECATED_API const char* web_provider_info_get_default_type();
-DEPRECATED_API const char* web_provider_info_get_box_type(const char* box_id);
-DEPRECATED_API int web_provider_info_insert_box_type(
- const char* box_id,
- const char* app_id,
- const char* box_type);
-DEPRECATED_API int web_provider_info_delete_by_box_id(const char* box_id);
-DEPRECATED_API int web_provider_info_delete_by_app_id(const char* app_id);
-DEPRECATED_API int web_provider_info_delete_by_type(const char* type);
-
#ifdef __cplusplus
}
#endif