summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rwxr-xr-xinclude/app.h29
-rwxr-xr-xinclude/app_preference_private.h8
-rwxr-xr-xinclude/app_private.h4
-rwxr-xr-xinclude/app_service.h94
-rw-r--r--[-rwxr-xr-x]include/app_storage.h0
-rwxr-xr-xinclude/app_ui_notification.h101
6 files changed, 226 insertions, 10 deletions
diff --git a/include/app.h b/include/app.h
index 386f9b1..362178b 100755
--- a/include/app.h
+++ b/include/app.h
@@ -288,6 +288,23 @@ int app_get_package(char **package);
/**
+ * @brief Gets the ID of the application.
+ *
+ * @remarks @a ID must be released with free() by you.
+ *
+ * @param [out] id The ID of the application
+ *
+ * @return 0 on success, otherwise a negative error value.
+ *
+ * @retval #APP_ERROR_NONE Successful
+ * @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #APP_ERROR_INVALID_CONTEXT The application is illegally launched, not launched by the launch system.
+ * @retval #APP_ERROR_OUT_OF_MEMORY Out of memory
+ */
+int app_get_id(char **id);
+
+
+/**
* @brief Gets the localized name of the application.
*
* @remarks @a name must be released with free() by you.
@@ -361,6 +378,18 @@ app_device_orientation_e app_get_device_orientation(void);
/**
+ * @brief Sets whether reclaiming system cache is enabled in the pause state.
+ *
+ * @details If the reclaiming system cache is enabled, the system caches are released as possible when the application's state changes to the pause state.
+ *
+ * @remarks The reclaiming system cache is enabled by default
+ *
+ * @param [in] enable whether reclaiming system cache is enabled
+ */
+void app_set_reclaiming_system_cache_on_pause(bool enable);
+
+
+/**
* @}
*/
diff --git a/include/app_preference_private.h b/include/app_preference_private.h
index 76000ad..aaf4a87 100755
--- a/include/app_preference_private.h
+++ b/include/app_preference_private.h
@@ -22,12 +22,12 @@
extern "C" {
#endif
-#define PREF_DB_NAME ".pref.db"
-#define PREF_TBL_NAME "pref"
+#define PREF_DB_NAME ".pref.db"
+#define PREF_TBL_NAME "pref"
#define PREF_F_KEY_NAME "pref_key"
-#define PREF_F_TYPE_NAME "pref_type"
+#define PREF_F_TYPE_NAME "pref_type"
#define PREF_F_DATA_NAME "pref_data"
-#define BUF_LEN (1024)
+#define BUF_LEN (4096)
typedef enum
{
diff --git a/include/app_private.h b/include/app_private.h
index 621ee50..e949f8a 100755
--- a/include/app_private.h
+++ b/include/app_private.h
@@ -38,6 +38,10 @@ extern "C" {
#define PATH_FMT_LOCALE_DIR PATH_FMT_RES_DIR "/locale"
#define PATH_FMT_DATA_DIR PATH_FMT_APP_ROOT "/%s/data"
+#define PATH_FMT_RO_APP_ROOT "/usr/apps"
+#define PATH_FMT_RO_RES_DIR PATH_FMT_RO_APP_ROOT "/%s/res"
+#define PATH_FMT_RO_LOCALE_DIR PATH_FMT_RO_RES_DIR "/locale"
+
typedef void (*app_finalizer_cb) (void *data);
int app_error(app_error_e error, const char* function, const char *description);
diff --git a/include/app_service.h b/include/app_service.h
index 7c24317..1764ab6 100755
--- a/include/app_service.h
+++ b/include/app_service.h
@@ -18,6 +18,7 @@
#ifndef __TIZEN_APPFW_SERVICE_H__
#define __TIZEN_APPFW_SERVICE_H__
+#include <sys/types.h>
#include <tizen.h>
#ifdef __cplusplus
@@ -167,6 +168,8 @@ typedef enum
/**
* @brief Called when the reply of the launch request is delivered.
*
+ * @remarks The @a request and @a reply must not be deallocated by an application.
+ *
* @param [in] request The service handle of the launch request that has sent
* @param [in] reply The service handle in which the results of the callee are contained
* @param [in] result The result code of the launch request
@@ -336,6 +339,7 @@ int service_get_mime(service_h service, char **mime);
/**
* @brief Sets the package name of the application to explicitly launch
*
+ * @remark This function is @b deprecated. Use service_set_app_id() instead.
* @param [in] service The service handle
* @param [in] package The package name of the application to explicitly launch \n
* If the @a package is NULL, it clears the previous value.
@@ -351,6 +355,7 @@ int service_set_package(service_h service, const char *package);
/**
* @brief Gets the package name of the application to explicitly launch
*
+ * @remark This function is @b deprecated. Use service_get_app_id() instead.
* @remarks The @a package must be released with free() by you.
* @param [in] service The service handle
* @param [out] package The package name of the application to explicitly launch
@@ -364,6 +369,64 @@ int service_get_package(service_h service, char **package);
/**
+ * @brief Sets the ID of the application to explicitly launch
+ *
+ * @param [in] service The service handle
+ * @param [in] app_id The ID of the application to explicitly launch \n
+ * If the @a app_id is NULL, it clears the previous value.
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #SERVICE_ERROR_NONE Successful
+ * @retval #SERVICE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #SERVICE_ERROR_OUT_OF_MEMORY Out of memory
+ * @see service_get_app_id()
+ */
+int service_set_app_id(service_h service, const char *app_id);
+
+
+/**
+ * @brief Gets the ID of the application to explicitly launch
+ *
+ * @remarks The @a app_id must be released with free() by you.
+ * @param [in] service The service handle
+ * @param [out] app_id The ID of the application to explicitly launch
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #SERVICE_ERROR_NONE Successful
+ * @retval #SERVICE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #SERVICE_ERROR_OUT_OF_MEMORY Out of memory
+ * @see service_set_app_id()
+ */
+int service_get_app_id(service_h service, char **app_id);
+
+/**
+ * @brief Sets the window id of the application
+ *
+ * @param [in] service The service handle
+ * @param [in] id the window id of caller application \n
+ * If the @a id is not positive, it clears the previous value.
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #SERVICE_ERROR_NONE Successful
+ * @retval #SERVICE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #SERVICE_ERROR_OUT_OF_MEMORY Out of memory
+ * @see service_get_window()
+ */
+int service_set_window(service_h service, unsigned int id);
+
+
+/**
+* @brief Gets the window id of the application
+*
+* @param [in] service The service handle
+* @param [out] id The window id of caller application
+* @return 0 on success, otherwise a negative error value.
+* @retval #SERVICE_ERROR_NONE Successful
+* @retval #SERVICE_ERROR_INVALID_PARAMETER Invalid parameter
+* @retval #SERVICE_ERROR_OUT_OF_MEMORY Out of memory
+* @see service_set_package()
+*/
+int service_get_window(service_h service, unsigned int *id);
+
+
+/**
* @brief Adds the extra data to the service.
*
* @remarks The function replaces any existing value for the given key.
@@ -520,7 +583,7 @@ int service_foreach_app_matched(service_h service, service_app_matched_cb callba
*
* @details The operation is mandatory information for the launch request. \n
* If the operation is not specified, #SERVICE_OPERATION_DEFAULT is used by default.
- * If the operation is #SERVICE_OPERATION_DEFAULT, the package information is mandatory to explicitly launch the application
+ * If the operation is #SERVICE_OPERATION_DEFAULT, the application ID is mandatory to explicitly launch the application
* @param [in] service The service handle
* @param [in] callback The callback function to be called when the reply is delivered
* @param [in] user_data The user data to be passed to the callback function
@@ -568,6 +631,35 @@ int service_reply_to_launch_request(service_h reply, service_h request, service_
int service_clone(service_h *clone, service_h service);
+/**
+ * @brief Gets the application ID of the caller from the launch request
+ *
+ * @remarks The @a service must be the launch reqeust from app_service_cb().
+ * @remarks This function returns #SERVICE_ERROR_INVALID_PARAMETER if the given service is not the launch request.
+ * @remarks The @a id must be released with free() by you.
+ * @param [in] service The service handle from app_service_cb()
+ * @param [out] id The application ID of the caller
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #SERVICE_ERROR_NONE Successful
+ * @retval #SERVICE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #SERVICE_ERROR_OUT_OF_MEMORY Out of memory
+ */
+int service_get_caller(service_h service, char **id);
+
+
+/**
+ * @brief Check whether the caller is requesting a reply from the launch reqeust
+ *
+ * @remarks The @a service must be the launch reqeust from app_service_cb().
+ * @remarks This function returns #SERVICE_ERROR_INVALID_PARAMETER if the given service is not the launch request.
+ * @param [in] service The service handle from app_service_cb()
+ * @param [out] requested whether a reply is requested by the caller
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #SERVICE_ERROR_NONE Successful
+ * @retval #SERVICE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #SERVICE_ERROR_OUT_OF_MEMORY Out of memory
+ */
+int service_is_reply_requested(service_h service, bool *requested);
/**
* @}
diff --git a/include/app_storage.h b/include/app_storage.h
index 0afe823..0afe823 100755..100644
--- a/include/app_storage.h
+++ b/include/app_storage.h
diff --git a/include/app_ui_notification.h b/include/app_ui_notification.h
index 88240e5..ba17898 100755
--- a/include/app_ui_notification.h
+++ b/include/app_ui_notification.h
@@ -11,7 +11,7 @@
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License.
+ * limitations under the License.
*/
@@ -71,7 +71,7 @@ typedef bool (*ui_notification_cb)(ui_notification_h notification, void *user_da
/**
* @brief Creates a notification handle.
- * @remarks The @a notification must be released with ui_notification_destroy() by you.
+ * @remarks The @a notification must be released with ui_notification_destroy() by you.
* @param[in] ongoing A boolean value that sets whether this is an ongoing notification.
* @param[out] notification A UI notification handle to be newly created on success
* @return 0 on success, otherwise a negative error value.
@@ -168,7 +168,7 @@ int ui_notification_get_time(ui_notification_h notification, struct tm **time);
* @retval #UI_NOTIFICATION_ERROR_NONE Successful
* @retval #UI_NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #UI_NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory
- * @see ui_notification_get_title()
+ * @see ui_notification_get_title()
*/
int ui_notification_set_title(ui_notification_h notification, const char *title);
@@ -195,7 +195,7 @@ int ui_notification_get_title(ui_notification_h notification, char **title);
* @retval #UI_NOTIFICATION_ERROR_NONE Successful
* @retval #UI_NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #UI_NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory
- * @see ui_notification_get_content()
+ * @see ui_notification_get_content()
*/
int ui_notification_set_content(ui_notification_h notification, const char *content);
@@ -213,6 +213,60 @@ int ui_notification_set_content(ui_notification_h notification, const char *cont
int ui_notification_get_content(ui_notification_h notification, char **content);
/**
+ * @brief Sets the path of sound file to play when the notification is shown.
+ * @remarks The @a path should be the absolute path. \n
+ * The sound file is only supported wave file format. \n
+ * This function should be called before posting or updating the notification (see ui_notification_post(), ui_notification_update()).
+ * @param[in] notification The notification handle
+ * @param[in] path The path of sound file to play when the notification is shown \n
+ * If the @a path is NULL, it clears the previous value.
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #UI_NOTIFICATION_ERROR_NONE Successful
+ * @retval #UI_NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #UI_NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory
+ * @see ui_notification_get_sound()
+ */
+int ui_notification_set_sound(ui_notification_h notification, const char *path);
+
+/**
+ * @brief Gets the path of sound file to play when the notification is shown.
+ * @remarks The @a path must be released with free() by you.
+ * @param[in] notification The notification handle
+ * @param[out] path The path of sound file to play when the notification is shown \n
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #UI_NOTIFICATION_ERROR_NONE Successful
+ * @retval #UI_NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #UI_NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory
+ * @see ui_notification_set_sound()
+ */
+int ui_notification_get_sound(ui_notification_h notification, char **path);
+
+/**
+ * @brief Sets whether to use vibration when the notification is shown.
+ * @remarks This function should be called before posting or updating the notification (see ui_notification_post(), ui_notification_update()).
+ * @param[in] notification The notification handle
+ * @param[in] value A boolean value that sets whether to use vibration.
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #UI_NOTIFICATION_ERROR_NONE Successful
+ * @retval #UI_NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #UI_NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory
+ * @see ui_notification_get_vibration()
+ */
+int ui_notification_set_vibration(ui_notification_h notification, bool value);
+
+/**
+ * @brief Gets whether to use vibration when the notification is shown.
+ * @param[in] notification The notification handle
+ * @param[out] value A boolean value that sets whether to use vibration.
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #UI_NOTIFICATION_ERROR_NONE Successful
+ * @retval #UI_NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #UI_NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory
+ * @see ui_notification_set_vibration()
+ */
+int ui_notification_get_vibration(ui_notification_h notification, bool *value);
+
+/**
* @brief Sets the service to launch when the notification is selected from the notification tray.
* @details When the notification is selected from the notification tray, the application which is described by the specified service is launched. \n
* If you want to launch the current application, use the explicit launch of the @ref CAPI_SERVICE_MODULE API
@@ -239,7 +293,7 @@ int ui_notification_set_service(ui_notification_h notification, service_h servic
* @retval #UI_NOTIFICATION_ERROR_NONE Successful
* @retval #UI_NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #UI_NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory
- * @see ui_notification_set_service()
+ * @see ui_notification_set_service()
*/
int ui_notification_get_service(ui_notification_h notification, service_h *service);
@@ -286,6 +340,43 @@ int ui_notification_cancel(ui_notification_h notification);
void ui_notification_cancel_all(void);
/**
+ * @brief Cancels selected type of previously posted notifications by the current application.
+ * @details Selected type of previously posted notifications are removed from the notification tray and the status bar.
+ * @remarks The notifications posted by other applications are not cancelled from the notification tray and the status bar.
+ * @param[in] ongoing A boolean value that indicates whether the notification type is ongoing to cancel.
+ * @see ui_notification_post()
+ * @see ui_notification_cancel()
+ * @see ui_notification_cancel_all()
+ */
+void ui_notification_cancel_all_by_type(bool ongoing);
+
+/**
+ * @brief Cancels selected type of previously posted notifications by the given application.
+ * @details Selected type of previously posted notifications are removed from the notification tray and the status bar.
+ * @remark This function is @b deprecated. Use app_manager_app_context_cb() instead.
+ * @param[in] package The package name of the application to calcel the posted notifications.
+ * @param[in] ongoing A boolean value that indicates whether the notification type is ongoing to cancel.
+ * @see ui_notification_post()
+ * @see ui_notification_cancel()
+ * @see ui_notification_cancel_all()
+ */
+void ui_notification_cancel_all_by_package(const char *package, bool ongoing);
+
+/**
+ * @brief Cancels selected type of previously posted notifications by the given application ID.
+ * @details Selected type of previously posted notifications are removed from the notification tray and the status bar.
+ * @param[in] id The ID of the application to calcel the posted notifications.
+ * @param[in] ongoing A boolean value that indicates whether the notification type is ongoing to cancel.
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #UI_NOTIFICATION_ERROR_NONE Successful
+ * @retval #UI_NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @see ui_notification_post()
+ * @see ui_notification_cancel()
+ * @see ui_notification_cancel_all()
+ */
+int ui_notification_cancel_all_by_app_id(const char *app_id, bool ongoing);
+
+/**
* @brief Updates the notification posted.
* @remarks You cannot update the notification which was cleared or canceled.
* @param[in] notification The notification handle