</method>
<method name="account_type_add">
<arg type="a{sv}" name="account_type_data" direction="in" />
+ <arg type="i" name="uid" direction="in" />
<arg type="i" name="account_type_db_id" direction="out" />
</method>
<method name="account_query_all">
+ <arg type="i" name="uid" direction="in" />
<arg type="aa{sv}" name="account_data" direction="out" />
</method>
<method name="account_type_query_all">
+ <arg type="i" name="uid" direction="in" />
<arg type="aa{sv}" name="account_type_data" direction="out" />
</method>
<method name="account_delete_from_db_by_id">
</method>
<method name="account_get_total_count_from_db">
<arg type="b" name="include_hidden" direction="in" />
+ <arg type="i" name="uid" direction="in" />
<arg type="i" name="count" direction="out" />
</method>
<method name="account_query_account_by_account_id">
<arg type="i" name="account_db_id" direction="in" />
+ <arg type="i" name="uid" direction="in" />
<arg type="a{sv}" name="account_data" direction="out" />
</method>
<method name="account_update_to_db_by_user_name">
<method name="account_type_query_label_by_locale">
<arg type="s" name="app_id" direction="in" />
<arg type="s" name="locale" direction="in" />
+ <arg type="i" name="uid" direction="in" />
<arg type="s" name="label_name" direction="out" />
</method>
<method name="account_type_query_by_provider_feature">
<arg type="s" name="key" direction="in" />
+ <arg type="i" name="uid" direction="in" />
<arg type="aa{sv}" name="account_type_list_data" direction="out" />
</method>
<method name="account_query_account_by_user_name">
<arg type="s" name="user_name" direction="in" />
+ <arg type="i" name="uid" direction="in" />
<arg type="aa{sv}" name="account_list_data" direction="out" />
</method>
<method name="account_query_account_by_package_name">
<arg type="s" name="package_name" direction="in" />
+ <arg type="i" name="uid" direction="in" />
<arg type="aa{sv}" name="account_list_data" direction="out" />
</method>
<method name="account_query_account_by_capability">
<arg type="s" name="capability_type" direction="in" />
<arg type="i" name="capability_value" direction="in" />
+ <arg type="i" name="uid" direction="in" />
<arg type="aa{sv}" name="account_list_data" direction="out" />
</method>
<method name="account_query_account_by_capability_type">
<arg type="s" name="capability_type" direction="in" />
+ <arg type="i" name="uid" direction="in" />
<arg type="aa{sv}" name="account_list_data" direction="out" />
</method>
<method name="account_query_capability_by_account_id">
<arg type="i" name="account_id" direction="in" />
+ <arg type="i" name="uid" direction="in" />
<arg type="aa{sv}" name="account_list_data" direction="out" />
</method>
<method name="account_update_sync_status_by_id">
</method>
<method name="account_type_query_provider_feature_by_app_id">
<arg type="s" name="app_id" direction="in" />
+ <arg type="i" name="uid" direction="in" />
<arg type="a(ss)" name="feature_list_data" direction="out" />
</method>
<method name="account_type_query_supported_feature">
<arg type="s" name="app_id" direction="in" />
<arg type="s" name="capability" direction="in" />
+ <arg type="i" name="uid" direction="in" />
<arg type="i" name="is_supported" direction="out" />
</method>
<method name="account_type_update_to_db_by_app_id">
<arg type="a{sv}" name="account_type_variant" direction="in" />
<arg type="s" name="app_id" direction="in" />
+ <arg type="i" name="uid" direction="in" />
</method>
<method name="account_type_delete_by_app_id">
<arg type="s" name="app_id" direction="in" />
+ <arg type="i" name="uid" direction="in" />
</method>
<method name="account_type_query_label_by_app_id">
<arg type="s" name="app_id" direction="in" />
+ <arg type="i" name="uid" direction="in" />
<arg type="a(sss)" name="label_list_variant" direction="out" />
</method>
<method name="account_type_query_by_app_id">
<arg type="s" name="app_id" direction="in" />
+ <arg type="i" name="uid" direction="in" />
<arg type="a{sv}" name="account_type_variant" direction="out" />
</method>
<method name="account_type_query_app_id_exist">
<arg type="s" name="app_id" direction="in" />
+ <arg type="i" name="uid" direction="in" />
</method>
<method name="account_update_to_db_by_id_ex">
<arg type="a{sv}" name="account_variant" direction="in" />
<arg type="i" name="account_id" direction="in" />
+ <arg type="i" name="uid" direction="in" />
</method>
</interface>
</node>
ptr = NULL; \
} \
+//ACCOUNT_TABLE
+#define ACCOUNT_SCHEMA "create table account \n"\
+ "(\n"\
+"_id INTEGER PRIMARY KEY AUTOINCREMENT, "\
+"user_name TEXT, "\
+"email_address TEXT, "\
+"display_name TEXT, "\
+"icon_path TEXT, "\
+"source TEXT, "\
+"package_name TEXT, "\
+"access_token TEXT, "\
+"domain_name TEXT, "\
+"auth_type INTEGER, "\
+"secret INTEGER, "\
+"sync_support INTEGER, "\
+"txt_custom0 TEXT, "\
+"txt_custom1 TEXT, "\
+"txt_custom2 TEXT, "\
+"txt_custom3 TEXT, "\
+"txt_custom4 TEXT, "\
+"int_custom0 INTEGER, "\
+"int_custom1 INTEGER, "\
+"int_custom2 INTEGER, "\
+"int_custom3 INTEGER, "\
+"int_custom4 INTEGER "\
+");"
+
+//CAPABILITY_TABLE
+#define CAPABILITY_SCHEMA "create table capability \n"\
+ "(\n"\
+"_id INTEGER PRIMARY KEY AUTOINCREMENT, "\
+"key TEXT, "\
+"value INTEGER, "\
+"package_name TEXT, "\
+"user_name TEXT, "\
+"account_id INTEGER, "\
+"FOREIGN KEY (account_id) REFERENCES account(_id) "\
+");"
+
+//ACCOUNT_CUSTOM_TABLE
+#define ACCOUNT_CUSTOM_SCHEMA "create table account_custom \n"\
+ "(\n"\
+"AccountId INTEGER, "\
+"AppId TEXT, "\
+"Key TEXT, "\
+"Value TEXT "\
+");"
+
+//ACCOUNT_TYPE_TABLE
+#define ACCOUNT_TYPE_SCHEMA "create table account_type \n"\
+ "(\n"\
+"_id INTEGER PRIMARY KEY AUTOINCREMENT, "\
+"AppId TEXT, "\
+"ServiceProviderId TEXT, "\
+"IconPath TEXT, "\
+"SmallIconPath TEXT, "\
+"MultipleAccountSupport INTEGER "\
+");"
+
+//LABEL_TABLE
+#define LABEL_SCHEMA "create table label \n"\
+ "(\n"\
+"AppId TEXT, "\
+"Label TEXT, "\
+"Locale TEXT"\
+");"
+
+//PROVIDER_FEATURE_TABLE
+#define PROVIDER_FEATURE_SCHEMA "create table provider_feature \n"\
+ "(\n"\
+"app_id TEXT, "\
+"key TEXT "\
+");"
+
#define OWNER_ROOT 0
#define GLOBAL_USER tzplatform_getuid(TZ_SYS_GLOBALAPP_USER)
-#define ACCOUNT_DB_PATH "/usr/dbspace/.account.db"
+//#define ACCOUNT_DB_PATH "/usr/dbspace/.account.db"
+//#define USER_DB_DIR tzplatform_getenv(TZ_USER_DB)
+//#define ACCOUNT_GLOBAL_DB_PATH "/usr/dbspace/.account.db"
+//#define ACCOUNT_GLOBAL_JN_PATH "/usr/dbspace/.account.db-journal"
+//#define ACCOUNT_DB_PATH tzplatform_mkpath(TZ_USER_DB, "/.account.db")
+//#define ACCOUNT_JN_PATH tzplatform_mkpath(TZ_USER_DB, "/.account.db-journal")
+#define ACCOUNT_GET_USER_DB_DIR(dest,size,uid) \
+ do { \
+ snprintf(dest,size-1,"%s%d", "/usr/dbspace/", uid); \
+ }while(0)
+#define ACCOUNT_GET_GLOBAL_DB_PATH(dest,size) \
+ do { \
+ snprintf(dest,size-1,"%s", "/usr/dbspace/.account.db"); \
+ }while(0)
+#define ACCOUNT_GET_GLOBAL_JN_PATH(dest,size) \
+ do { \
+ snprintf(dest,size-1,"%s", "/usr/dbspace/.account.db-journal"); \
+ }while(0)
+#define ACCOUNT_GET_USER_DB_PATH(dest,size,uid) \
+ do { \
+ snprintf(dest,size-1,"%s%d%s", "/usr/dbspace/", uid, "/.account.db"); \
+ }while(0)
+#define ACCOUNT_GET_USER_JN_PATH(dest,size,uid) \
+ do { \
+ snprintf(dest,size-1,"%s%d%s", "/usr/dbspace/", uid, "/.account.db-journal"); \
+ }while(0)
#define ACCOUNT_TABLE "account"
#define CAPABILITY_TABLE "capability"
#define ACCOUNT_CUSTOM_TABLE "account_custom"