Add lightuser feature
[platform/core/appfw/pkgmgr-info.git] / include / pkgmgr-info.h
index 8f16df4..134af64 100644 (file)
@@ -1722,6 +1722,42 @@ static int get_res_version(const char *pkgid)
 int pkgmgrinfo_pkginfo_get_res_version(pkgmgrinfo_pkginfo_h handle, char **res_version);
 
 /**
+ * @fn int pkgmgrinfo_pkginfo_get_light_user_switch_mode(pkgmgrinfo_pkginfo_h handle, char **mode)
+ * @brief      This API gets the light_user_switch_mode of package
+ *
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in]  handle          pointer to package info handle
+ * @param[out] mode            pointer to hold resource version of package
+ * @return     0 if success, error code(<0) if fail
+ * @retval     PMINFO_R_OK     success
+ * @retval     PMINFO_R_EINVAL invalid argument
+ * @retval     PMINFO_R_ERROR  internal error
+ * @code
+static int get_light_user_switch_mode(const char *pkgid)
+{
+       int ret = 0;
+       char *mode = 0;
+       pkgmgrinfo_pkginfo_h handle;
+       ret = pkgmgrinfo_pkginfo_get_pkginfo(pkgid, &handle);
+       if (ret != PMINFO_R_OK)
+               return -1;
+
+       ret = pkgmgrinfo_pkginfo_get_light_user_switch_mode(handle, &mode);
+       if (ret != PMINFO_R_OK) {
+               pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+               return -1;
+       }
+       printf("light_user_switch_mode : %s\n", mode);
+       pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+
+       return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_pkginfo_get_light_user_switch_mode(pkgmgrinfo_pkginfo_h handle, char **mode);
+
+/**
  * @fn int pkgmgrinfo_pkginfo_get_support_mode(pkgmgrinfo_pkginfo_h handle, int *support_mode)
  * @brief      This API gets the support_mode of package
  *
@@ -5148,6 +5184,22 @@ int pkgmgrinfo_appinfo_get_setup_appid(pkgmgrinfo_appinfo_h handle, char **setup
 int pkgmgrinfo_appinfo_is_support_ambient(pkgmgrinfo_appinfo_h handle, bool *support_ambient);
 
 /**
+ * @fn int pkgmgrinfo_appinfo_get_light_user_switch_mode(pkgmgrinfo_appinfo_h handle, char *mode)
+ * @brief      This API gets the application 'light_user_switch_mode' value from the app ID
+ *
+ * @par                This API is for package-manager client application
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in]  handle          pointer to application info handle
+ * @param[out] mode    pointer to hold package light_user_switch_mode value
+ * @return     0 if success, error code(<0) if fail
+ * @retval     PMINFO_R_OK     success
+ * @retval     PMINFO_R_EINVAL invalid argument
+ * @retval     PMINFO_R_ERROR  internal error
+ */
+int pkgmgrinfo_appinfo_get_light_user_switch_mode(pkgmgrinfo_appinfo_h handle, char **mode);
+
+/**
  * @fn int pkgmgrinfo_appinfo_destroy_appinfo(pkgmgrinfo_appinfo_h handle)
  * @brief      This API destroys the application information handle freeing up all the resources
  *