major version up : apply multi-user(System) 05/48705/2 accepted/tizen/mobile/20151006.225116 accepted/tizen/tv/20151103.024923 accepted/tizen/wearable/20151203.083947 submit/tizen_mobile/20151006.082543 submit/tizen_tv/20151103.020006 submit/tizen_wearable/20151203.073504 tizen_3.0.m2.a1_mobile_release
authorjang <jiseob.jang@samsung.com>
Fri, 25 Sep 2015 07:17:39 +0000 (16:17 +0900)
committerjang <jiseob.jang@samsung.com>
Fri, 25 Sep 2015 07:23:11 +0000 (16:23 +0900)
- add schema for creating account table in user db.
- add getting path of user account db.

Change-Id: If18eb9f90bc2a9c561b7c2a3e581759dc116ea68
Signed-off-by: jang <jiseob.jang@samsung.com>
CMakeLists.txt
common/account_mgr.xml
common/include/account-private.h
packaging/account-common.spec

index 70f19500a85b5c80a616741b98fc93d6ae896e6c..b3a797d1c6d740d84f5daf984a902c1f9bc414de 100644 (file)
@@ -6,6 +6,6 @@ SET(EXEC_PREFIX "\${prefix}")
 #SET(LIBDIR "\${prefix}/lib")
 #SET(INCLUDEDIR "\${prefix}/include ")
 SET(VERSION_MAJOR 0)
-SET(VERSION "${VERSION_MAJOR}.0.6")
+SET(VERSION "${VERSION_MAJOR}.1.0")
 
 ADD_SUBDIRECTORY(common)
index 492b50309e6c76bd7a3e438591c4d88301e57d04..0278c680c257cbd21c46c3ceedddddb5afee0210 100644 (file)
@@ -8,12 +8,15 @@
     </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>
index 0aa027417fe734656591f348f18f521cb6b70853..68b2e384efa0cc0544d1b26002e5014076f150fd 100644 (file)
@@ -103,9 +103,108 @@ NULL after passing        them to free: free(NULL) is safe (it does nothing).
                                        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"
index 88f212ba9c8ff798f2bdf1a226a20dc8456f3808..a6a0051c5a4338df94ea95de5fc3dcfc5728afcd 100644 (file)
@@ -1,7 +1,7 @@
 
 Name:       account-common
 Summary:    Account common library
-Version:    0.0.6
+Version:    0.1.0
 Release:    1
 Group:      Social & Content/API
 License:    Apache-2.0