/**
* @ingroup CAPI_APPLICATION_FRAMEWORK
- * @defgroup SHORTCUT_MODULE Shortcut
+ * @defgroup SHORTCUT_MODULE Shortcut (Deprecated)
* @brief To enhance the Add to home feature.
* - The other for the application developers who should implement the Add to home feature.
* @section SHORTCUT_MODULE_HEADER Required Header
* @{
*/
-/**
- * @brief Called to receive the result of add_to_home_shortcut().
- * @since_tizen 2.3
- * @param[in] ret The result value, it could be @c 0 if it succeeds to add a shortcut,
- * otherwise it returns an errno
- * @param[in] pid The process ID of who handle this add_to_home request
- * @param[in] user_data The user data passed from the registration function
- * @return int @c 0 if there is no error, otherwise errno
- * @see add_to_home_shortcut()
- */
-typedef int (*result_internal_cb)(int ret, int pid, void *user_data);
-
-/**
- * @brief Enumeration for shortcut types.
- * @details Basically, three types of shortcuts are defined.
- * Every homescreen developer should support these types of shortcuts.
- * Or return a proper errno to figure out why the application failed to add a shortcut.
- * #LAUNCH_BY_PACKAGE is used for adding a package itself as a shortcut.
- * #LAUNCH_BY_URI is used for adding a shortcut for "uri" data.
- * @since_tizen 2.3
- */
-enum shortcut_internal_type {
- /**< Deprecated type */
- SHORTCUT_PACKAGE = 0x00000000, /**< Launch the package using the given package name */
- SHORTCUT_DATA = 0x00000001, /**< Launch the related package with the given data(content_info) */
- SHORTCUT_FILE = 0x00000002, /**< Launch the related package with the given filename(content_info) */
-
- LAUNCH_BY_PACKAGE = 0x00000000,
-
- SHORTCUT_REMOVE = 0x40000000, /**< Remove a shortcut */
- DYNAMICBOX_REMOVE = 0x80000000, /**< Remove a widget */
-
- DYNAMICBOX_TYPE_DEFAULT = 0x10000000, /**< Type mask for the default widget */
- DYNAMICBOX_TYPE_EASY_DEFAULT = 0x30000000, /**< Type mask for the easy mode widget */
- DYNAMICBOX_TYPE_1x1 = 0x10010000, /**< 1x1 */
- DYNAMICBOX_TYPE_2x1 = 0x10020000, /**< 2x1 */
- DYNAMICBOX_TYPE_2x2 = 0x10040000, /**< 2x2 */
- DYNAMICBOX_TYPE_4x1 = 0x10080000, /**< 4x1 */
- DYNAMICBOX_TYPE_4x2 = 0x10100000, /**< 4x2 */
- DYNAMICBOX_TYPE_4x3 = 0x10200000, /**< 4x3 */
- DYNAMICBOX_TYPE_4x4 = 0x10400000, /**< 4x4 */
- DYNAMICBOX_TYPE_4x5 = 0x11000000, /**< 4x5 */
- DYNAMICBOX_TYPE_4x6 = 0x12000000, /**< 4x6 */
- DYNAMICBOX_TYPE_EASY_1x1 = 0x30010000, /**< Easy mode 1x1 */
- DYNAMICBOX_TYPE_EASY_3x1 = 0x30020000, /**< Easy mode 3x2 */
- DYNAMICBOX_TYPE_EASY_3x3 = 0x30040000, /**< Easy mode 3x3 */
- DYNAMICBOX_TYPE_UNKNOWN = 0x1FFF0000, /**< Error */
-};
-
-#define SHORTCUT_ERROR (shortcut_error_quark())
-GQuark shortcut_error_quark(void);
-
-
-/**
- * @brief Definition for a macro to check type.
- * @since_tizen 2.3
- * @param[in] type The type of box
- * @return bool
- * @retval true(1) If it is a dynamicbox
- * @retval false(0) If it is not a dynamicbox
- * @see shortcut_type
- */
-#define ADD_TO_HOME_IS_DYNAMICBOX(type) (!!((type) & 0x10000000))
-
-/* DEPRECATED API */
-int add_to_home_shortcut(const char *appid, const char *name, int type, const char *content_info, const char *icon, int allow_duplicate, result_internal_cb result_cb, void *data) __attribute__((deprecated));
-int add_to_home_dynamicbox(const char *appid, const char *name, int type, const char *content, const char *icon, double period, int allow_duplicate, result_internal_cb result_cb, void *data) __attribute__((deprecated));
-
/**
* @}
*/
*/
/**
+ * @deprecated Deprecated since 9.0
* @brief Enumeration for values of shortcut response types.
* @since_tizen 2.3
*/
const char *icon, double period, int allow_duplicate);
int shortcut_remove_from_home_sync(const char *name);
+/**
+ * @brief Definition for a macro to check type.
+ * @since_tizen 2.3
+ * @param[in] type The type of box
+ * @return bool
+ * @retval true(1) If it is a dynamicbox
+ * @retval false(0) If it is not a dynamicbox
+ * @see shortcut_type
+ */
+#define ADD_TO_HOME_IS_DYNAMICBOX(type) (!!((type) & 0x10000000))
+
/**
* @}
*/
/**
+ * @deprecated Deprecated since 9.0
* @brief Enumeration for shortcut types.
* @details Basically, two types of shortcuts are defined.
* Every homescreen developer should support these types of shortcuts.
} shortcut_type;
/**
+ * @deprecated Deprecated since 9.0
* @brief Enumeration for sizes of shortcut widget.
* @since_tizen 2.4
*/
/**
+ * @deprecated Deprecated since 9.0
* @brief Called to receive the result of shortcut_add_to_home().
* @since_tizen 2.3
* @param[in] ret The result value, it could be @c 0 if it succeeds to add a shortcut,
/**
+ * @deprecated Deprecated since 9.0
* @brief Adds a shortcut to home, asynchronously.
* @since_tizen 2.3
* @privlevel public
}
* @endcode
*/
-int shortcut_add_to_home(const char *name, shortcut_type type, const char *uri, const char *icon, int allow_duplicate, result_cb cb, void *data);
+int shortcut_add_to_home(const char *name, shortcut_type type, const char *uri, const char *icon, int allow_duplicate, result_cb cb, void *data) TIZEN_DEPRECATED_API;
/**
+ * @deprecated Deprecated since 9.0
* @brief Adds a widget to home, asynchronously.
* @since_tizen 2.4
* @privlevel public
}
* @endcode
*/
-int shortcut_add_to_home_widget(const char *name, shortcut_widget_size_e size, const char *widget_id, const char *icon, double period, int allow_duplicate, result_cb cb, void *data);
+int shortcut_add_to_home_widget(const char *name, shortcut_widget_size_e size, const char *widget_id, const char *icon, double period, int allow_duplicate, result_cb cb, void *data) TIZEN_DEPRECATED_API;
/**
+ * @deprecated Deprecated since 9.0
* @brief Removes a shortcut from home, asynchronously.
* @details If the callback function registered for a widget, the shortcut deletion is possible.
* @since_tizen 3.0
* @endcode
*/
-int shortcut_remove_from_home(const char *name, result_cb cb, void *user_data);
+int shortcut_remove_from_home(const char *name, result_cb cb, void *user_data) TIZEN_DEPRECATED_API;
/**
+ * @deprecated Deprecated since 9.0
* @brief Called to receive the result of shortcut_get_list().
* @since_tizen 2.4
* @param[in] package_name The name of package
/**
+ * @deprecated Deprecated since 9.0
* @brief Gets the preset list of shortcut template from the installed package, synchronously.
* @since_tizen 2.4
* @privlevel public
* @post You have to check the return status from the callback function which is passed by the argument.
*
*/
-int shortcut_get_list(const char *package_name, shortcut_list_cb list_cb, void *data);
+int shortcut_get_list(const char *package_name, shortcut_list_cb list_cb, void *data) TIZEN_DEPRECATED_API;
/**
+ * @deprecated Deprecated since 9.0
* @brief Called to the add_to_home request.
* @details The homescreen should define a callback as this type and implement the service code
* for adding a new application shortcut.
/**
+ * @deprecated Deprecated since 9.0
* @brief Called to the shortcut_remove_from_home() request.
* @since_tizen 3.0
* @param[in] package_name The name of package
/**
+ * @deprecated Deprecated since 9.0
* @brief Sets a callback function to listen requests from applications.
* @since_tizen 2.4
* @privlevel public
* @see shortcut_request_cb()
* @see shortcut_error_e
*/
-int shortcut_set_request_cb(shortcut_request_cb request_cb, void *data);
+int shortcut_set_request_cb(shortcut_request_cb request_cb, void *data) TIZEN_DEPRECATED_API;
/**
+ * @deprecated Deprecated since 9.0
* @brief Unsets a callback for the shortcut request.
* @since_tizen 3.0
* @privlevel public
* @see shortcut_set_request_cb()
* @see get_last_result()
*/
-void shortcut_unset_request_cb(void);
+void shortcut_unset_request_cb(void) TIZEN_DEPRECATED_API;
/**
+ * @deprecated Deprecated since 9.0
* @brief Sets the callback function to listen the remove requests from applications.
* @since_tizen 3.0
* @privlevel public
* @see shortcut_remove_cb()
* @see shortcut_error_e
*/
-int shortcut_set_remove_cb(shortcut_remove_cb remove_cb, void *data);
+int shortcut_set_remove_cb(shortcut_remove_cb remove_cb, void *data) TIZEN_DEPRECATED_API;
/**
+ * @deprecated Deprecated since 9.0
* @brief Unsets a callback for the shortcut remove.
* @since_tizen 3.0
* @privlevel public
* @see shortcut_set_remove_cb()
* @see get_last_result()
*/
-void shortcut_unset_remove_cb(void);
+void shortcut_unset_remove_cb(void) TIZEN_DEPRECATED_API;
/**
} // namespace
EAPI int shortcut_set_request_cb(shortcut_request_cb request_cb, void* data) {
+ LOGW("DEPRECATION WARNING: shortcut_set_request_cb() is deprecated and will be removed from next release");
CHECK_SHORTCUT_FEATURE();
if (request_cb == nullptr)
return SHORTCUT_ERROR_INVALID_PARAMETER;
}
EAPI void shortcut_unset_request_cb() {
+ LOGW("DEPRECATION WARNING: shortcut_unset_request_cb() is deprecated and will be removed from next release");
CHECK_SHORTCUT_FEATURE_RET_LAST_RESULT();
try {
}
EAPI int shortcut_set_remove_cb(shortcut_remove_cb remove_cb, void* data) {
+ LOGW("DEPRECATION WARNING: shortcut_set_remove_cb() is deprecated and will be removed from next release");
CHECK_SHORTCUT_FEATURE();
if (remove_cb == nullptr)
}
EAPI void shortcut_unset_remove_cb() {
+ LOGW("DEPRECATION WARNING: shortcut_unset_remove_cb() is deprecated and will be removed from next release");
CHECK_SHORTCUT_FEATURE_RET_LAST_RESULT();
try {
::Connect();
EAPI int shortcut_add_to_home(const char* name, shortcut_type type,
const char* uri, const char* icon, int allow_duplicate,
result_cb cb, void* data) {
+ LOGW("DEPRECATION WARNING: shortcut_add_to_home() is deprecated and will be removed from next release");
CHECK_SHORTCUT_FEATURE();
if (ADD_TO_HOME_IS_DYNAMICBOX(type)) {
_E("Invalid type used for adding a shortcut");
EAPI int shortcut_add_to_home_widget(const char* name,
shortcut_widget_size_e size, const char* widget_id, const char* icon,
double period, int allow_duplicate, result_cb cb, void* data) {
+ LOGW("DEPRECATION WARNING: shortcut_add_to_home_widget() is deprecated and will be removed from next release");
CHECK_SHORTCUT_FEATURE();
if (name == nullptr) {
EAPI int shortcut_remove_from_home(const char* name, result_cb cb,
void* user_data) {
+ LOGW("DEPRECATION WARNING: shortcut_remove_from_home() is deprecated and will be removed from next release");
CHECK_SHORTCUT_FEATURE();
if (name == nullptr) {
_E("name is NULL.");
void* data) {
int ret = SHORTCUT_ERROR_NONE;
+ LOGW("DEPRECATION WARNING: shortcut_get_list() is deprecated and will be removed from next release");
CHECK_SHORTCUT_FEATURE();
if (list_cb == nullptr)
return SHORTCUT_ERROR_INVALID_PARAMETER;
EAPI int shortcut_add_to_home_sync(const char* name, shortcut_type type,
const char* uri, const char* icon, int allow_duplicate) {
+ LOGW("DEPRECATION WARNING: shortcut_add_to_home_sync() is deprecated and will be removed from next release");
CHECK_SHORTCUT_FEATURE();
if (ADD_TO_HOME_IS_DYNAMICBOX(type)) {
EAPI int shortcut_add_to_home_widget_sync(const char *name,
shortcut_widget_size_e size, const char *widget_id,
const char *icon, double period, int allow_duplicate) {
+ LOGW("DEPRECATION WARNING: shortcut_add_to_home_widget_sync() is deprecated and will be removed from next release");
CHECK_SHORTCUT_FEATURE();
if (name == NULL) {
}
EAPI int shortcut_remove_from_home_sync(const char *name) {
+ LOGW("DEPRECATION WARNING: shortcut_remove_from_home_sync() is deprecated and will be removed from next release");
CHECK_SHORTCUT_FEATURE();
if (name == NULL) {