#ifndef __TIZEN_APPFW_APP_MANAGER_EXTENSION_H
#define __TIZEN_APPFW_APP_MANAGER_EXTENSION_H
+#include <stdbool.h>
+
#include "app_manager.h"
#ifdef __cplusplus
int app_manager_terminate_app(app_context_h app_context);
/**
+ * @brief Sets the display flag to enable/disable the splash screen.
+ * @since_tizen 3.0
+ * @privilege platform
+ * @privilege %http://tizen.org/privilege/packagemanager.admin
+ * @param[in] app_id The ID of the application
+ * @param[in] display The display flag to enable/disable the splash screen
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #APP_MANAGER_ERROR_NONE Successful
+ * @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #APP_MANAGER_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #APP_MANAGER_ERROR_IO_ERROR Internal I/O error
+ */
+int app_manager_set_splash_screen_display(const char *app_id, bool display);
+
+/**
* @}
*/
#include <aul.h>
#include <dlog.h>
#include <cynara-client.h>
+#include <package-manager.h>
#include "app_manager.h"
#include "app_manager_internal.h"
return r;
}
+API int app_manager_set_splash_screen_display(const char *app_id, bool display)
+{
+ int r;
+ pkgmgr_client *pc;
+
+ if (app_id == NULL)
+ return app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER,
+ __FUNCTION__, NULL);
+
+ pc = pkgmgr_client_new(PC_REQUEST);
+ if (pc == NULL)
+ return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY,
+ __FUNCTION__, NULL);
+
+ if (display)
+ r = pkgmgr_client_enable_splash_screen(pc, app_id);
+ else
+ r = pkgmgr_client_disable_splash_screen(pc, app_id);
+ pkgmgr_client_free(pc);
+
+ switch (r) {
+ case PKGMGR_R_OK:
+ r = APP_MANAGER_ERROR_NONE;
+ break;
+ case PKGMGR_R_EINVAL:
+ r = app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER,
+ __FUNCTION__, NULL);
+ break;
+ case PKGMGR_R_EPRIV:
+ r = app_manager_error(APP_MANAGER_ERROR_PERMISSION_DENIED,
+ __FUNCTION__, NULL);
+ break;
+ case PKGMGR_R_ENOMEM:
+ r = app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY,
+ __FUNCTION__, NULL);
+ break;
+ default:
+ r = app_manager_error(APP_MANAGER_ERROR_IO_ERROR,
+ __FUNCTION__, NULL);
+ break;
+ }
+
+ return r;
+}
+