Fix frame-broker & frame-provider 88/215888/1
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 17 Oct 2019 07:49:51 +0000 (16:49 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 17 Oct 2019 07:49:51 +0000 (16:49 +0900)
The remote-frame package is removed.
The frame-provider package is added for the shared widget launch.

Change-Id: Iaa35f4df3b9904c416b9bee420f1f8cc260ec31f
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
26 files changed:
CMakeLists.txt
frame-broker/CMakeLists.txt
frame-broker/include/frame.h
frame-broker/include/frame_broker.h
frame-broker/include/frame_broker_internal.h [deleted file]
frame-broker/include/frame_internal.h [deleted file]
frame-broker/src/frame.c
frame-broker/src/frame_broker.c
frame-provider/CMakeLists.txt [moved from remote-frame/CMakeLists.txt with 84% similarity]
frame-provider/frame-provider.pc.in [new file with mode: 0644]
frame-provider/include/frame_provider.h [new file with mode: 0644]
frame-provider/include/frame_provider_types.h [new file with mode: 0644]
frame-provider/src/frame_provider.c [moved from remote-frame/src/remote_frame_provider.c with 74% similarity]
frame-provider/src/log_private.h [moved from remote-frame/src/log_private.h with 96% similarity]
frame-provider/src/private.h [moved from remote-frame/src/private.h with 100% similarity]
packaging/frame-provider.manifest [moved from packaging/remote-frame.manifest with 100% similarity]
packaging/libwidget_viewer.spec
remote-frame/include/remote_frame.h [deleted file]
remote-frame/include/remote_frame_consumer.h [deleted file]
remote-frame/include/remote_frame_context.h [deleted file]
remote-frame/include/remote_frame_provider.h [deleted file]
remote-frame/include/remote_frame_types.h [deleted file]
remote-frame/remote-frame.pc.in [deleted file]
remote-frame/src/remote_frame.c [deleted file]
remote-frame/src/remote_frame_consumer.c [deleted file]
remote-frame/src/remote_frame_context.c [deleted file]

index 37e9560..643ecda 100644 (file)
@@ -4,13 +4,12 @@ ADD_SUBDIRECTORY(widget_viewer_evas)
 ADD_SUBDIRECTORY(widget_viewer_sdk)
 ADD_SUBDIRECTORY(watch-control)
 ADD_SUBDIRECTORY(frame-broker)
-ADD_SUBDIRECTORY(remote-frame)
+ADD_SUBDIRECTORY(frame-provider)
 ADD_SUBDIRECTORY(tool)
 ADD_SUBDIRECTORY(unittest)
 
 ADD_DEPENDENCIES(widget-viewer_unittests widget_viewer_evas)
 ADD_DEPENDENCIES(widget_viewer_sdk widget_viewer_evas)
-ADD_DEPENDENCIES(remote-frame frame-broker)
 
 ENABLE_TESTING()
 SET(WIDGET_VIEWER_UNIT_TESTS widget-viewer_unittests)
index b4f4762..949be48 100644 (file)
@@ -45,9 +45,7 @@ SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${PROJECT_NAME}
 SET(HEADERS_LIB_FRAME_BROKER
        frame.h
        frame_broker.h
-       frame_broker_internal.h
        frame_context.h
-       frame_internal.h
        frame_types.h
        )
 
index fcf7e39..a6bd21d 100644 (file)
@@ -20,6 +20,7 @@
 #include <stdint.h>
 
 #include <Elementary.h>
+#include <bundle.h>
 #include <frame_types.h>
 
 #ifdef __cplusplus
@@ -125,6 +126,21 @@ int frame_get_position_x(frame_h handle, int32_t *x);
  */
 int frame_get_position_y(frame_h handle, int32_t *y);
 
+/**
+ * @brief Gets the extra data of the frame.
+ * @since_tizen 5.5
+ * @remarks The @a extra_data should not be released.
+ *
+ * @param[in]   handle          The frame handle
+ * @param[out]  extra_data      The bundle object
+ * @return      @c 0 on success,
+ *              otherwise a negative error value
+ *
+ * @retval #FRAME_BROKER_ERROR_NONE Successful
+ * @retval #FRAME_BROKER_ERROR_INVALID_PARAMETER Invalid parameter
+ */
+int frame_get_extra_data(frame_h handle, bundle **extra_data);
+
 #ifdef __cplusplus
 }
 #endif
index 526c83e..43020e7 100644 (file)
@@ -105,6 +105,38 @@ int frame_broker_send_launch_request(frame_broker_h handle,
                app_control_reply_cb reply_cb,
                void *user_data);
 
+/**
+ * @brief Sends the launch request to the provider asynchronously.
+ * @since_tizen 5.5
+ *
+ * @privlevel public
+ * @privilege %http:://tizen.org/privilege/appmanager.launch
+ *
+ * @param[in]   handle          The frame broker handle
+ * @param[in]   app_control     The app_control handle
+ * @param[in]   result_cb       The callback function to be called when the result is delivered
+ * @param[in]   reply_cb        The callback function to be called when the reply is delivered
+ * @param[in]   uset_data       The user data to be passed to the callback function
+ * @return      @c 0 on success,
+ *              otherwise a negative error value
+ *
+ * @retval #FRAME_BROKER_ERROR_NONE Successful
+ * @retval #FRAME_BROKER_ERROR_APP_NOT_FOUND The application to run the given launch request is not found
+ * @retval #FRAME_BROKER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #FRAME_BROKER_ERROR_IO_ERROR I/O error
+ * @retval #FRAME_BROKER_ERROR_LAUNCH_REJECTED Failed to launch the application
+ * @retval #FRAME_BROKER_ERROR_PERMISSION_DENIED Permission denied
+ *
+ * @see app_control_send_launch_request_async()
+ * @see app_control_result_cb()
+ * @see app_control_reply_cb()
+ */
+int frame_broker_send_launch_request_to_provider(frame_broker_h handle,
+               app_control_h app_control,
+               app_control_result_cb result_cb,
+               app_control_reply_cb reply_cb,
+               void *user_data);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/frame-broker/include/frame_broker_internal.h b/frame-broker/include/frame_broker_internal.h
deleted file mode 100644 (file)
index 7ff1ca4..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * 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.
- */
-
-#ifndef __FRAME_BROKER_INTERNAL_H__
-#define __FRAME_BROKER_INTERNAL_H__
-
-#include <frame_broker.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @brief Sends the launch request to get the remote frame.
- * @since_tizen 5.5
- *
- * @param[in]   handle          The frame broker handle
- * @param[in]   app_control     The app_control handle
- * @param[in]   result_cb       The callback function to be called when the result is delivered
- * @param[in]   reply_cb        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
- * @return      @c 0 on success,
- *              otherwise a negative error value
- *
- * @retval #FRAME_BROKER_ERROR_NONE Successful
- * @retval #FRAME_BROKER_ERROR_APP_NOT_FOUND The application to run the given launch request is not found
- * @retval #FRAME_BROKER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #FRAME_BROKER_ERROR_IO_ERROR I/O error
- * @retval #FRAME_BROKER_ERROR_LAUNCH_REJECTED Failed to launch the application
- * @retval #FRAME_BROKER_ERROR_PERMISSION_DENIED Permission denied
- */
-int frame_broker_send_launch_request_for_remote_frame(frame_broker_h handle,
-               app_control_h app_control,
-               app_control_result_cb result_cb,
-               app_control_reply_cb reply_cb,
-               void *user_data);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __FRAME_BROKER_INTERNAL_H__ */
diff --git a/frame-broker/include/frame_internal.h b/frame-broker/include/frame_internal.h
deleted file mode 100644 (file)
index dcb4a5e..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * 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.
- */
-
-#ifndef __FRAME_INTERNAL_H__
-#define __FRAME_INTERNAL_H__
-
-#include <bundle.h>
-#include <frame.h>
-#include <frame_types.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @brief Gets the extra data of the frame.
- * @since_tizen 5.5
- * @remarks The @a extra_data should not be released.
- *
- * @param[in]   handle          The frame handle
- * @param[out]  extra_data      The bundle object
- * @return      @c 0 on success,
- *              otherwise a negative error value
- *
- * @retval #FRAME_BROKER_ERROR_NONE Successful
- * @retval #FRAME_BROKER_ERROR_INVALID_PARAMETER Invalid parameter
- */
-int frame_get_extra_data(frame_h handle, bundle **extra_data);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __FRAME_INTERNAL_H__ */
index b5a1de1..e13e796 100644 (file)
@@ -20,7 +20,6 @@
 #include <screen_connector_launcher_service_evas.h>
 
 #include "frame.h"
-#include "frame_internal.h"
 #include "frame_private.h"
 #include "log_private.h"
 #include "private.h"
index 5dbb44b..c36956f 100644 (file)
@@ -26,7 +26,6 @@
 #include <uuid/uuid.h>
 
 #include "frame_broker.h"
-#include "frame_broker_internal.h"
 #include "frame_broker_private.h"
 #include "frame_context_private.h"
 #include "frame_private.h"
@@ -414,7 +413,7 @@ API int frame_broker_send_launch_request(frame_broker_h handle,
                        user_data, false);
 }
 
-API int frame_broker_send_launch_request_for_remote_frame(
+API int frame_broker_send_launch_request_to_provider(
                frame_broker_h handle,
                app_control_h app_control,
                app_control_result_cb result_cb,
similarity index 84%
rename from remote-frame/CMakeLists.txt
rename to frame-provider/CMakeLists.txt
index 1c1b389..ccd3934 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(remote-frame C)
+PROJECT(frame-provider C)
 
 SET(PREFIX "${CMAKE_INSTALL_PREFIX}")
 SET(PROJECT_NAME "${PROJECT_NAME}")
@@ -9,7 +9,7 @@ SET(VERSION_MAJOR "${MAJORVER}")
 SET(VERSION "${FULLVER}")
 
 INCLUDE(FindPkgConfig)
-pkg_check_modules(remote-frame REQUIRED
+pkg_check_modules(frame-provider REQUIRED
        aul
        bundle
        capi-appfw-app-control
@@ -21,7 +21,7 @@ pkg_check_modules(remote-frame REQUIRED
 
 AUX_SOURCE_DIRECTORY(src SOURCES)
 
-FOREACH(flag ${remote-frame_CFLAGS})
+FOREACH(flag ${frame-provider_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -Wall -Werror -Winline")
@@ -37,17 +37,14 @@ ADD_LIBRARY(${PROJECT_NAME} SHARED ${SOURCES})
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION_MAJOR})
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${VERSION})
 
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${remote-frame_LDFLAGS} frame-broker)
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${frame-provider_LDFLAGS})
 
 CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY)
 SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${PROJECT_NAME}.pc")
 
 SET(HEADERS_LIB_REMOTE_FRAME
-       remote_frame.h
-       remote_frame_consumer.h
-       remote_frame_context.h
-       remote_frame_provider.h
-       remote_frame_types.h
+       frame_provider.h
+       frame_provider_types.h
        )
 
 FOREACH(hfile ${HEADERS_LIB_REMOTE_FRAME})
diff --git a/frame-provider/frame-provider.pc.in b/frame-provider/frame-provider.pc.in
new file mode 100644 (file)
index 0000000..c39c6f4
--- /dev/null
@@ -0,0 +1,12 @@
+prefix=@PREFIX@
+exec_prefix=@EXEC_PREFIX@
+libdir=@LIBDIR@
+includedir=@INCLUDEDIR@
+
+Name: frame-provider
+Description: Support development of the frame provider
+Version: @VERSION@
+Requires: screen_connector_shared_widget_launch elementary bundle
+Libs: -L${libdir} -lframe-provider
+Cflags: -I${includedir}
+cppflags: -I${includedir}
diff --git a/frame-provider/include/frame_provider.h b/frame-provider/include/frame_provider.h
new file mode 100644 (file)
index 0000000..7e7ead4
--- /dev/null
@@ -0,0 +1,156 @@
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * 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.
+ */
+
+#ifndef __FRAME_PROVIDER_H__
+#define __FRAME_PROVIDER_H__
+
+#include <stdint.h>
+
+#include <Elementary.h>
+#include <bundle.h>
+#include <frame_provider_types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief The frame provider handle.
+ * @since_tizen 5.5
+ */
+typedef struct frame_provider_s *frame_provider_h;
+
+/**
+ * @brief Called when the show event is occurred.
+ * @since_tizen 5.5
+ * @details When the provider should show the object to share with the caller, this callback function is called.
+ *          After showing the object, the caller should call frame_provider_notify_show_status() function to notify.
+ * @remarks The @a handle should not be released.
+ *
+ * @param[in]   handle          The frame provider handle
+ * @param[in]   user_data       The user data passed from frame_provider_create() function
+ *
+ * @see frame_provider_create()
+ * @see frame_provider_notify_show_status()
+ */
+typedef void (*frame_provider_show_cb)(frame_provider_h handle,
+               void *user_data);
+
+/**
+ * @brief Called when the hide event is occurred.
+ * @since_tizen 5.5
+ * @details When the provider should hide the object to share with the caller, this callback function is called.
+ *          After hiding the object, the caller should call frame_provider_notify_hide_status() function to notify.
+ * @remarks The @a handle should not be released.
+ *
+ * @param[in]   handle          The frame provider handle
+ * @param[in]   user_data       The user data passed from frame_provider_create() function
+ *
+ * @see frame_provider_create()
+ * @see frame_provider_notify_hide_status()
+ */
+typedef void (*frame_provider_hide_cb)(frame_provider_h handle,
+               void *user_data);
+
+/**
+ * @brief The structure type containing the set of callback functions for events of a frame provider.
+ * @since_tizen 5.5
+ *
+ * @see frame_provider_create()
+ * @see frame_provider_show_cb()
+ * @see frame_provider_hide_cb()
+ */
+typedef struct {
+       frame_provider_show_cb show; /**< The callback function called when the show event is occurred. */
+       frame_provider_hide_cb hide; /**< The callback function called when the hide event is occurred. */
+} frame_provider_event_callback_s;
+
+/**
+ * @brief Creates the frame provider handle.
+ * @since_tizen 5.5
+ * @remarks The @a handle should be released using frame_provider_destroy().
+ *
+ * @param[in]   win             The evas object
+ * @param[in]   callback        The set of callback functions to handle frame provider events
+ * @param[in]   user_data       The user data to be passed to the callback functions
+ * @param[out]  handle          The frame provider handle
+ * @return      @c 0 on success,
+ *              otherwise a negative error value
+ *
+ * @retval #FRAME_ERROR_NONE Successful
+ * @retval #FRAME_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #FRAME_ERROR_OUT_OF_MEMORY Out of memory
+ *
+ * @see frame_provider_destroy()
+ * @see frame_provider_event_callback_s
+ */
+int frame_provider_create(Evas_Object *win,
+               frame_provider_event_callback_s *callback,
+               void *user_data,
+               frame_provider_h *handle);
+
+/**
+ * @brief Destroyes the frame provider handle.
+ * @since_tizen 5.5
+ *
+ * @param[in]   handle          The frame provider handle
+ * @return      @c 0 on success,
+ *              otherwise a negative error value
+ *
+ * @retval #FRAME_ERROR_NONE Successful
+ * @retval #FRAME_ERROR_INVALID_PARAMETER Invalid parameter
+ */
+int frame_provider_destroy(frame_provider_h handle);
+
+/**
+ * @brief Notifies that the object is prepared to show.
+ * @since_tizen 5.5
+ *
+ * @param[in]   handle          The frame provider handle
+ * @param[in]   extra_data      The bundle object
+ * @return      @c 0 on success,
+ *              otherwise a negative error value
+ *
+ * @retval #FRAME_ERROR_NONE Successful
+ * @retval #FRAME_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #FRAME_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #FRAME_ERROR_IO_ERROR I/O error
+ */
+int frame_provider_notify_show_status(frame_provider_h handle,
+               bundle *extra_data);
+
+/**
+ * @brief Notifies that the object is prepared to hide.
+ * @since_tizen 5.5
+ *
+ * @param[in]   handle          The frame provider handle
+ * @param[in]   extra_data      The bundle object
+ * @return      @c 0 on success,
+ *              otherwise a negative error value
+ *
+ * @retval #FRAME_ERROR_NONE Successful
+ * @retval #FRAME_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #FRAME_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #FRAME_ERROR_IO_ERROR I/O error
+ */
+int frame_provider_notify_hide_status(frame_provider_h handle,
+               bundle *extra_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __FRAME_PROVIDER_H__ */
diff --git a/frame-provider/include/frame_provider_types.h b/frame-provider/include/frame_provider_types.h
new file mode 100644 (file)
index 0000000..16e6a36
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * 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.
+ */
+
+#ifndef __FRAME_PROVIDER_TYPES_H__
+#define __FRAME_PROVIDER_TYPES_H__
+
+#include <tizen.h>
+#include <app_control.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Enumeration for frame provider error.
+ * @since_tizen 5.5
+ */
+typedef enum {
+       FRAME_PROVIDER_ERROR_NONE = TIZEN_ERROR_NONE,                             /**< Successful */
+       FRAME_PROVIDER_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION,   /**< Invalid operation */
+       FRAME_PROVIDER_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER,   /**< Invalid parameter */
+       FRAME_PROVIDER_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR,                     /**< I/O error */
+       FRAME_PROVIDER_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY,           /**< Out of memory */
+} frame_provider_error_e;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __FRAME_PROVIDER_TYPES_H__ */
similarity index 74%
rename from remote-frame/src/remote_frame_provider.c
rename to frame-provider/src/frame_provider.c
index af33259..0ce4315 100644 (file)
 #include <screen_connector_shared_widget_launch.h>
 #include <Ecore_Wl2.h>
 
-#include "remote_frame_provider.h"
-#include "remote_frame_types.h"
+#include "frame_provider.h"
+#include "frame_provider_types.h"
 #include "log_private.h"
 #include "private.h"
 
-struct remote_frame_provider_s {
+struct frame_provider_s {
        Evas_Object *win;
        screen_connector_shared_widget_launch_h scswl;
        screen_connector_shared_widget_launch_prepare_state_e state;
        uint32_t serial;
-       remote_frame_provider_event_callback_s callback;
+       frame_provider_event_callback_s callback;
        void *user_data;
 };
 
@@ -72,7 +72,7 @@ static void __scswl_prepare_cb(
                uint32_t serial,
                void *user_data)
 {
-       remote_frame_provider_h provider = user_data;
+       frame_provider_h provider = user_data;
 
        provider->state = state;
        provider->serial = serial;
@@ -83,29 +83,29 @@ static void __scswl_prepare_cb(
                provider->callback.hide(provider, provider->user_data);
 }
 
-API int remote_frame_provider_create(Evas_Object *win,
-               remote_frame_provider_event_callback_s *callback,
+API int frame_provider_create(Evas_Object *win,
+               frame_provider_event_callback_s *callback,
                void *user_data,
-               remote_frame_provider_h *handle)
+               frame_provider_h *handle)
 {
-       struct remote_frame_provider_s *provider;
+       struct frame_provider_s *provider;
        Ecore_Wl2_Window *wl2_win;
        int ret;
 
        if (!win || !callback || !handle) {
                _E("Invalid parameter");
-               return REMOTE_FRAME_ERROR_INVALID_PARAMETER;
+               return FRAME_PROVIDER_ERROR_INVALID_PARAMETER;
        }
 
        if (__exist_win(win)) {
                _E("Already exists. win(%p)", win);
-               return REMOTE_FRAME_ERROR_INVALID_PARAMETER;
+               return FRAME_PROVIDER_ERROR_INVALID_PARAMETER;
        }
 
-       provider = calloc(1, sizeof(struct remote_frame_provider_s));
+       provider = calloc(1, sizeof(struct frame_provider_s));
        if (!provider) {
                _E("Out of memory");
-               return REMOTE_FRAME_ERROR_OUT_OF_MEMORY;
+               return FRAME_PROVIDER_ERROR_OUT_OF_MEMORY;
        }
 
        wl2_win = (Ecore_Wl2_Window *)elm_win_wl_window_get(win);
@@ -113,7 +113,7 @@ API int remote_frame_provider_create(Evas_Object *win,
                        &provider->scswl);
        if (ret != 0) {
                _E("Failed to create scswl. error(%d)", ret);
-               return REMOTE_FRAME_ERROR_OUT_OF_MEMORY;
+               return FRAME_PROVIDER_ERROR_OUT_OF_MEMORY;
        }
 
        screen_connector_shared_widget_launch_prepare_cb_set(provider->scswl,
@@ -127,14 +127,14 @@ API int remote_frame_provider_create(Evas_Object *win,
 
        *handle = provider;
 
-       return REMOTE_FRAME_ERROR_NONE;
+       return FRAME_PROVIDER_ERROR_NONE;
 }
 
-API int remote_frame_provider_destroy(remote_frame_provider_h handle)
+API int frame_provider_destroy(frame_provider_h handle)
 {
        if (!handle) {
                _E("Invalid parameter");
-               return REMOTE_FRAME_ERROR_NONE;
+               return FRAME_PROVIDER_ERROR_NONE;
        }
 
        __remove_win(handle->win);
@@ -142,10 +142,10 @@ API int remote_frame_provider_destroy(remote_frame_provider_h handle)
        screen_connector_shared_widget_launch_destroy(handle->scswl);
        free(handle);
 
-       return REMOTE_FRAME_ERROR_NONE;
+       return FRAME_PROVIDER_ERROR_NONE;
 }
 
-static int __notify_status(remote_frame_provider_h handle,
+static int __notify_status(frame_provider_h handle,
                screen_connector_shared_widget_launch_prepare_state_e state,
                bundle *extra_data)
 {
@@ -155,12 +155,12 @@ static int __notify_status(remote_frame_provider_h handle,
 
        if (!handle || !handle->serial) {
                _E("Invalid parameter");
-               return REMOTE_FRAME_ERROR_INVALID_PARAMETER;
+               return FRAME_PROVIDER_ERROR_INVALID_PARAMETER;
        }
 
        if (handle->state != state) {
                _E("Invalid operation");
-               return REMOTE_FRAME_ERROR_INVALID_OPERATION;
+               return FRAME_PROVIDER_ERROR_INVALID_OPERATION;
        }
 
        if (extra_data) {
@@ -168,9 +168,9 @@ static int __notify_status(remote_frame_provider_h handle,
                if (ret != BUNDLE_ERROR_NONE) {
                        _E("Failed to encode extra data. error(%d)", ret);
                        if (ret == BUNDLE_ERROR_OUT_OF_MEMORY)
-                               return REMOTE_FRAME_ERROR_OUT_OF_MEMORY;
+                               return FRAME_PROVIDER_ERROR_OUT_OF_MEMORY;
 
-                       return REMOTE_FRAME_ERROR_INVALID_PARAMETER;
+                       return FRAME_PROVIDER_ERROR_INVALID_PARAMETER;
                }
        } else {
                raw = (bundle_raw *)strdup("None");
@@ -181,14 +181,13 @@ static int __notify_status(remote_frame_provider_h handle,
        free((void *)raw);
        if (ret != 0) {
                _E("Failed to notify provider status. error(%d)", ret);
-               return REMOTE_FRAME_ERROR_IO_ERROR;
+               return FRAME_PROVIDER_ERROR_IO_ERROR;
        }
 
-       return REMOTE_FRAME_ERROR_NONE;
+       return FRAME_PROVIDER_ERROR_NONE;
 }
 
-API int remote_frame_provider_notify_show_status(
-               remote_frame_provider_h handle,
+API int frame_provider_notify_show_status(frame_provider_h handle,
                bundle *extra_data)
 {
        return __notify_status(handle,
@@ -196,8 +195,7 @@ API int remote_frame_provider_notify_show_status(
                extra_data);
 }
 
-API int remote_frame_provider_notify_hide_status(
-               remote_frame_provider_h handle,
+API int frame_provider_notify_hide_status(frame_provider_h handle,
                bundle *extra_data)
 {
        return __notify_status(handle,
similarity index 96%
rename from remote-frame/src/log_private.h
rename to frame-provider/src/log_private.h
index c6e8119..f391a27 100644 (file)
@@ -22,7 +22,7 @@
 #ifdef LOG_TAG
 #undef LOG_TAG
 #endif
-#define LOG_TAG "REMOTE_FRAME"
+#define LOG_TAG "FRAME_PROVIDER"
 
 #ifdef _E
 #undef _E
index 037c783..a6e39ac 100644 (file)
@@ -11,7 +11,7 @@ Source1001: %{name}_evas.manifest
 Source1003: org.tizen.widget_viewer_sdk.manifest
 Source1004: watch-control.manifest
 Source1005: frame-broker.manifest
-Source1006: remote-frame.manifest
+Source1006: frame-provider.manifest
 BuildRequires: cmake, gettext-tools, coreutils, edje-bin
 BuildRequires: pkgconfig(dlog)
 BuildRequires: pkgconfig(aul)
@@ -210,27 +210,27 @@ Header & package configuration of launcher service
 %postun -n frame-broker -p /sbin/ldconfig
 
 ################################################
-# libremote-frame
+# libframe-provider
 ################################################
-%package -n remote-frame
-Summary: APIs to handle launching images for remote frame
+%package -n frame-provider
+Summary: APIs to handle launching images for the callee
 Version: 0.0.1
 License: Apache-2.0
 Group: Applications/Core Applications
 
-%description -n remote-frame
-A set of APIs to handle launching images for remote frame
+%description -n frame-provider
+A set of APIs to handle launching images for the callee
 
-%package -n remote-frame-devel
-Summary: APIs to handle remote frame
+%package -n frame-provider-devel
+Summary: APIs to handle launching images for the callee (devel)
 Group: Development/Libraries
-Requires: remote-frame
+Requires: frame-provider
 
-%description -n remote-frame-devel
-Header & package configuration for remote frame
+%description -n frame-provider-devel
+Header & package configuration for the callee (devel)
 
-%post -n remote-frame -p /sbin/ldconfig
-%postun -n remote-frame -p /sbin/ldconfig
+%post -n frame-provider -p /sbin/ldconfig
+%postun -n frame-provider -p /sbin/ldconfig
 
 ################################################
 # files
@@ -275,13 +275,13 @@ Header & package configuration for remote frame
 %{_libdir}/pkgconfig/frame-broker.pc
 %{_libdir}/libframe-broker.so
 
-%files -n remote-frame
-%manifest remote-frame.manifest
-%{_libdir}/libremote-frame.so.*
+%files -n frame-provider
+%manifest frame-provider.manifest
+%{_libdir}/libframe-provider.so.*
 
-%files -n remote-frame-devel
-%{_includedir}/remote-frame/*.h
-%{_libdir}/pkgconfig/remote-frame.pc
-%{_libdir}/libremote-frame.so
+%files -n frame-provider-devel
+%{_includedir}/frame-provider/*.h
+%{_libdir}/pkgconfig/frame-provider.pc
+%{_libdir}/libframe-provider.so
 
 # End of a file
diff --git a/remote-frame/include/remote_frame.h b/remote-frame/include/remote_frame.h
deleted file mode 100644 (file)
index 1b7ca26..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * 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.
- */
-
-#ifndef __REMOTE_FRAME_H__
-#define __REMOTE_FRAME_H__
-
-#include <stdint.h>
-
-#include <Elementary.h>
-#include <bundle.h>
-#include <remote_frame_types.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @brief The remote frame handle.
- * @since_tizen 5.5
- */
-typedef void *remote_frame_h;
-
-/**
- * @brief Enumeration for the remote frame type.
- * @since_tizen 5.5
- */
-typedef enum {
-       REMOTE_FRAME_TYPE_REMOTE_SURFACE, /**< The remote surface */
-       REMOTE_FRAME_TYPE_SPLASH_SCREEN,  /**< The splash screen */
-} remote_frame_type_e;
-
-/**
- * @brief Enumeration for the remote frame direction.
- * @since_tizen 5.5
- */
-typedef enum {
-       REMOTE_FRAME_DIRECTION_FORWARD,  /**< The direction that is from the caller to the other application. */
-       REMOTE_FRAME_DIRECTION_BACKWARD, /**< The direction that is from the other application to the caller. */
-} remote_frame_direction_e;
-
-/**
- * @brief Gets the raw handle of the remote frame.
- * @since_tizen 5.5
- * @remarks The @a raw should not be released.
- *
- * @param[in]   handle          The remote frame handle
- * @param[out]  raw             The evas object
- * @return      @c 0 on success,
- *              otherwise a negative error value
- *
- * @retval #REMOTE_FRAME_ERROR_NONE Successful
- * @retval #REMOTE_FRAME_ERROR_INVALID_PARAMETER Invalid parameter
- */
-int remote_frame_get_raw(remote_frame_h handle, Evas_Object **raw);
-
-/**
- * @brief Gets the type of the remote frame.
- * @since_tizen 5.5
- *
- * @param[in]   handle          The remote frame handle
- * @param[out]  type            The type
- * @return      @c 0 on success,
- *              otherwise a negative error value
- *
- * @retval #REMOTE_FRAME_ERROR_NONE Successful
- * @retval #REMOTE_FRAME_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see remote_frame_type_e
- */
-int remote_frame_get_type(remote_frame_h handle, remote_frame_type_e *type);
-
-/**
- * @brief Gets the direction of the remote frame.
- * @since_tizen 5.5
- *
- * @param[in]   handle          The remote frame handle
- * @param[out]  direction       The direction
- * @return      @c 0 on success,
- *              otherwise a negative error value
- *
- * @retval #REMOTE_FRAME_ERROR_NONE Successful
- * @retval #REMOTE_FRAME_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see remote_frame_direction_e
- */
-int remote_frame_get_direction(remote_frame_h handle,
-               remote_frame_direction_e *direction);
-
-/**
- * @brief Gets the position X of the remote frame.
- * @since_tizen 5.5
- *
- * @param[in]   handle          The remote frame handle
- * @param[out]  x               The position X
- * @return      @c 0 on success,
- *              otherwise a negative error value
- *
- * @retval #REMOTE_FRAME_ERROR_NONE Successful
- * @retval #REMOTE_FRAME_ERROR_INVALID_PARAMETER Invalid parameter
- */
-int remote_frame_get_position_x(remote_frame_h handle, int32_t *x);
-
-/**
- * @brief Gets the position Y of the remote frame.
- * @since_tizen 5.5
- *
- * @param[in]   handle          The remote frame handle
- * @param[out]  y               The position Y
- * @return      @c 0 on success,
- *              otherwise a negative error value
- *
- * @retval #REMOTE_FRAME_ERROR_NONE Successful
- * @retval #REMOTE_FRAME_ERROR_INVALID_PARAMETER Invalid parameter
- */
-int remote_frame_get_position_y(remote_frame_h handle, int32_t *y);
-
-/**
- * @brief Gets the extra data of the remote frame.
- * @since_tizen 5.5
- * @remarks The @a extra_data should not be released.
- *
- * @param[in]   handle          The remote frame handle
- * @param[out]  extra_data      The bundle object
- * @return      @c 0 on success,
- *              otherwise a negative error value
- *
- *
- * @retval #REMOTE_FRAME_ERROR_NONE Successful
- * @retval #REMOTE_FRAME_ERROR_INVALID_PARAMETER Invalid parameter
- */
-int remote_frame_get_extra_data(remote_frame_h handle, bundle **extra_data);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __REMOTE_FRAME_H__ */
diff --git a/remote-frame/include/remote_frame_consumer.h b/remote-frame/include/remote_frame_consumer.h
deleted file mode 100644 (file)
index ccff372..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * 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.
- */
-
-#ifndef __REMOTE_FRAME_CONSUMER_H__
-#define __REMOTE_FRAME_CONSUMER_H__
-
-#include <Elementary.h>
-#include <app_control.h>
-#include <remote_frame.h>
-#include <remote_frame_context.h>
-#include <remote_frame_types.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @brief The remote frame consumer handle.
- * @since_tizen 5.5
- */
-typedef struct remote_frame_consumer_s *remote_frame_consumer_h;
-
-/**
- * @brief Creates the remote frame consumer handle.
- * @since_tizen 5.5
- * @remarks The @a handle should be released using remote_frame_consumer_destroy() function.
- *
- * @param[in]   win             The evas object
- * @param[in]   callback        The set of callback functions to handle remote frame context lifecycle events
- * @param[in]   user_data       The user data passed to the callback functions
- * @param[out]  handle          The remote frame consumer handle
- * @return      @c 0 on success,
- *              otherwise a negative error value
- *
- * @retval #REMOTE_FRAME_ERROR_NONE Successful
- * @retval #REMOTE_FRAME_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #REMOTE_FRAME_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #REMOTE_FRAME_ERROR_IO_ERROR I/O error
- *
- * @see remote_frame_consumer_destroy()
- * @see remote_frame_context_lifecycle_callback_s
- */
-int remote_frame_consumer_create(Evas_Object *win,
-               remote_frame_context_lifecycle_callback_s *callback,
-               void *user_data,
-               remote_frame_consumer_h *handle);
-
-/**
- * @brief Destroyes the remote frame consumer handle.
- * @since_tizen 5.5
- *
- * @param[in]   handle          The remote frame consumer handle
- * @return      @c 0 on success,
- *              otherwise a negative error value
- *
- * @retval #REMOTE_FRAME_ERROR_NONE Successful
- * @retval #REMOTE_FRAME_ERROR_INVALID_PARAMETER Invalid parameter
- */
-int remote_frame_consumer_destroy(remote_frame_consumer_h handle);
-
-/**
- * @brief Sends the launch request asynchronously.
- * @since_tizen 5.5
- *
- * @privlevel public
- * @privilege %http:://tizen.org/privilege/appmanager.launch
- *
- * @param[in]   handle          The remote frame consumer handle
- * @param[in]   app_control     The app_control handle
- * @param[in]   result_cb       The callback function to be called when the result is delivered
- * @param[in]   reply_cb        The callback function to be called when the reply is delivered
- * @param[in]   uset_data       The user data to be passed to the callback function
- * @return      @c 0 on success,
- *              otherwise a negative error value
- *
- * @retval #REMOTE_FRAME_ERROR_NONE Successful
- * @retval #REMOTE_FRAME_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #REMOTE_FRAME_ERROR_APP_NOT_FOUND The application to run the given launch request is not found
- * @retval #REMOTE_FRAME_ERROR_LAUNCH_REJECTED Failed to launch the application
- * @retval #REMOTE_FRAME_ERROR_PERMISSION_DENIED Permission denied
- *
- * @see app_control_send_launch_request_async()
- * @see app_control_result_cb()
- * @see app_control_reply_cb()
- */
-int remote_frame_consumer_send_launch_request(remote_frame_consumer_h handle,
-               app_control_h app_control,
-               app_control_result_cb result_cb,
-               app_control_reply_cb reply_cb,
-               void *user_data);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __REMOTE_FRAME_VIEWER_H__ */
diff --git a/remote-frame/include/remote_frame_context.h b/remote-frame/include/remote_frame_context.h
deleted file mode 100644 (file)
index c49387a..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * 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.
- */
-
-#ifndef __REMOTE_FRAME_CONTEXT_H__
-#define __REMOTE_FRAME_CONTEXT_H__
-
-#include <remote_frame.h>
-#include <remote_frame_types.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @brief The remote frame context handle.
- * @since_tizen 5.5
- */
-typedef void *remote_frame_context_h;
-
-/**
- * @brief Enumeration for errors of the remote frame context.
- * @since_tizen 5.5
- */
-typedef enum {
-       REMOTE_FRAME_CONTEXT_ERROR_NONE,          /**< Successful */
-       REMOTE_FRAME_CONTEXT_ERROR_DISQUALIFIED,  /**< Disqualified */
-       REMOTE_FRAME_CONTEXT_ERROR_WRONG_REQUEST, /**< Wrong request */
-} remote_frame_context_error_e;
-
-/**
- * @brief Called when the remote frame context is created.
- * @since_tizen 5.5
- * @remarks The @a context should be not released.
- *
- * @param[in]   context         The remote frame context handle
- * @param[in]   user_data       The user data passed from remote_frame_viewer_create() function
- */
-typedef void (*remote_frame_context_create_cb)(remote_frame_context_h context,
-               void *user_data);
-
-/**
- * @brief Called when the remote frame context is resumed.
- * @since_tizen 5.5
- * @details When the remote frame has been prepared, this callback function is called.
- *          The caller can start animations. To notify that the animation is started, the caller should call remote_frame_context_start_animation() function.
- *          After the animation is finished, the caller should call frame_context_finish_animation() function to notify.
- * @remarks The @a context and the @frame should not be released.
- *          The @a context and the @frame can be used only in the callback.
- *
- * @param[in]   context         The remote frame context handle
- * @param[in]   frame           The remote frame
- * @param[in]   user_data       The user data passed from remote_frame_viewer_create() function
- *
- * @see remote_frame_context_start_animation()
- * @see remote_frame_context_finish_animation()
- */
-typedef void (*remote_frame_context_resume_cb)(remote_frame_context_h context,
-               remote_frame_h frame,
-               void *user_data);
-
-/**
- * @brief Called when the remote frame context is paused.
- * @since_tizen 5.5
- * @details When the animation has been finished, this callback function is called.
- * @remarks The @a context should not be released. The @a context can be used only in the callback.
- *
- * @param[in]   context         The remote frame context handle
- * @param[in]   uset_data       The user data passed from remote_frame_viewer_create() function
- */
-typedef void (*remote_frame_context_pause_cb)(remote_frame_context_h context,
-               void *user_data);
-
-/**
- * @brief Called when the remote frame context is destroyed.
- * @since_tizen 5.5
- * @remarks The @a context should not be released. The @a context can be used only in the callback.
- *
- * @param[in]   context         The remote frame context handle
- * @param[in]   uset_data       The user data passed from remote_frame_viewer_create() function
- */
-typedef void (*remote_frame_context_destroy_cb)(remote_frame_context_h context,
-               void *user_data);
-
-/**
- * @brief Called when the error is occurred.
- * @since_tizen 5.5
- * @remarks The @a context should not be released. The @a context can be used only in the callback.
- *
- * @param[in]   context         The remote frame context handle
- * @param[in]   error           The error
- * @param[in]   user_data       The user data passed from remote_frame_viewer_create() function
- *
- * @see remote_frame_context_error_e
- */
-typedef void (*remote_frame_context_error_cb)(remote_frame_context_h context,
-               remote_frame_context_error_e error,
-               void *user_data);
-
-/**
- * @brief Called when the remote frame context is updated.
- * @since_tizen 5.5
- * @details When the remote frame has been updated, this callback function is called.
- * @remarks The @a context and the @frame should not be released.
- *          The @a context and the @frame can be used only in the callback.
- *
- * @param[in]   context         The remote frame context handle
- * @param[in]   frame           The remote frame
- * @param[in]   user_data       The user data passed from remote_frame_viewer_create() function
- *
- * @see remote_frame_context_update_cb()
- * @see remote_frame_context_start_animation()
- * @see remote_frame_context_finish_animation()
- */
-typedef void (*remote_frame_context_update_cb)(remote_frame_context_h context,
-               remote_frame_h frame,
-               void *user_data);
-
-/**
- * @brief The structure type containing the set of callback functions for lifecycle of a remote frame context.
- * @since_tizen 5.5
- *
- * @see remote_frame_viewer_create()
- * @see remote_frame_context_create_cb()
- * @see remote_frame_context_resume_cb()
- * @see remote_frame_context_pause_cb()
- * @see remote_frame_context_destroy_cb()
- * @see remote_frame_context_error_cb()
- */
-typedef struct {
-       remote_frame_context_create_cb create;   /**< The callback function called after the remote frame context is created. */
-       remote_frame_context_resume_cb resume;   /**< The callback function called when the frame is prepared. */
-       remote_frame_context_pause_cb pause;     /**< The callback function called when the animation is finished. */
-       remote_frame_context_destroy_cb destroy; /**< The callback function called before the remote frame context is destroyed. */
-       remote_frame_context_update_cb update;   /**< The callback function called when the frame is updated. */
-       remote_frame_context_error_cb error;     /**< The callback function called when the error is occurred. */
-} remote_frame_context_lifecycle_callback_s;
-
-/**
- * @brief Notifies that the animation is started.
- * @since_tizen 5.5
- *
- * @param[in]   handle          The remote frame context handle
- * @return      @c 0 on success,
- *              otherwise a negative error value
- *
- * @retval #REMOTE_FRAME_ERROR_NONE Successful
- * @retval #REMOTE_FRAME_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #REMOTE_FRAME_ERROR_IO_ERROR I/O error
- *
- * @see frame_context_finish_animation()
- */
-int remote_frame_context_start_animation(remote_frame_context_h handle);
-
-/**
- * @brief Notifies that the animation is finished.
- * @since_tizen 5.5
- *
- * @param[in]   handle          The remote frame context handle
- * @return      @c 0 on success,
- *              otherwise a negative error value
- *
- * @retval #REMOTE_FRAME_ERROR_NONE Successful
- * @retval #REMOTE_FRAME_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #REMOTE_FRAME_ERROR_IO_ERROR I/O error
-
- * @see frame_context_start_animation()
- */
-int remote_frame_context_finish_animation(remote_frame_context_h handle);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __REMOTE_FRAME_CONTEXT_H__ */
diff --git a/remote-frame/include/remote_frame_provider.h b/remote-frame/include/remote_frame_provider.h
deleted file mode 100644 (file)
index ae3288c..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * 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.
- */
-
-#ifndef __REMOTE_FRAME_PROVIDER_H__
-#define __REMOTE_FRAME_PROVIDER_H__
-
-#include <stdint.h>
-
-#include <Elementary.h>
-#include <bundle.h>
-#include <remote_frame_types.h>
-#include <tizen.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @brief The remote frame provider handle.
- * @since_tizen 5.5
- */
-typedef struct remote_frame_provider_s *remote_frame_provider_h;
-
-/**
- * @brief Called when the show event is occurred.
- * @since_tizen 5.5
- * @details When the provider should show the object to share with the caller, this callback function is called.
- *          After showing the object, the caller should call remote_frame_provider_notify_show_status() function to notify.
- * @remarks The @a handle should not be released.
- *
- * @param[in]   handle          The remote frame provider handle
- * @param[in]   user_data       The user data passed from remote_frame_provider_create() function
- *
- * @see remote_frame_provider_create()
- * @see remote_frame_provider_notify_show_status()
- */
-typedef void (*remote_frame_provider_show_cb)(remote_frame_provider_h handle,
-               void *user_data);
-
-/**
- * @brief Called when the hide event is occurred.
- * @since_tizen 5.5
- * @details When the provider should hide the object to share with the caller, this callback function is called.
- *          After hiding the object, the caller should call remote_frame_provider_notify_hide_status() function to notify.
- * @remarks The @a handle should not be released.
- *
- * @param[in]   handle          The remote frame provider handle
- * @param[in]   user_data       The user data passed from remote_frame_provider_create() function
- *
- * @see remote_frame_provider_create()
- * @see remote_frame_provider_notify_hide_status()
- */
-typedef void (*remote_frame_provider_hide_cb)(remote_frame_provider_h handle,
-               void *user_data);
-
-/**
- * @brief The structure type containing the set of callback functions for events of a remote frame provider.
- * @since_tizen 5.5
- *
- * @see remote_frame_provider_create()
- * @see remote_frame_provider_show_cb()
- * @see remote_frame_provider_hide_cb()
- */
-typedef struct {
-       remote_frame_provider_show_cb show; /**< The callback function called when the show event is occurred. */
-       remote_frame_provider_hide_cb hide; /**< The callback function called when the hide event is occurred. */
-} remote_frame_provider_event_callback_s;
-
-/**
- * @brief Creates the remote frame provider handle.
- * @since_tizen 5.5
- * @remarks The @a handle should be released using remote_frame_provider_destroy().
- *
- * @param[in]   win             The evas object
- * @param[in]   callback        The set of callback functions to handle remote frame provider events
- * @param[in]   user_data       The user data to be passed to the callback functions
- * @param[out]  handle          The remote frame provider handle
- * @return      @c 0 on success,
- *              otherwise a negative error value
- *
- * @retval #REMOTE_FRAME_ERROR_NONE Successful
- * @retval #REMOTE_FRAME_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #REMOTE_FRAME_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @see remote_frame_provider_destroy()
- * @see remote_frame_provider_event_callback_s
- */
-int remote_frame_provider_create(Evas_Object *win,
-               remote_frame_provider_event_callback_s *callback,
-               void *user_data,
-               remote_frame_provider_h *handle);
-
-/**
- * @brief Destroyes the remote frame provider handle.
- * @since_tizen 5.5
- *
- * @param[in]   handle          The remote frame provider handle
- * @return      @c 0 on success,
- *              otherwise a negative error value
- *
- * @retval #REMOTE_FRAME_ERROR_NONE Successful
- * @retval #REMOTE_FRAME_ERROR_INVALID_PARAMETER Invalid parameter
- */
-int remote_frame_provider_destroy(remote_frame_provider_h handle);
-
-/**
- * @brief Notifies that the object is prepared to show.
- * @since_tizen 5.5
- *
- * @param[in]   handle          The remote frame provider handle
- * @param[in]   extra_data      The bundle object
- * @return      @c 0 on success,
- *              otherwise a negative error value
- *
- * @retval #REMOTE_FRAME_ERROR_NONE Successful
- * @retval #REMOTE_FRAME_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #REMOTE_FRAME_ERROR_INVALID_OPERATION Invalid operation
- * @retval #REMOTE_FRAME_ERROR_IO_ERROR I/O error
- */
-int remote_frame_provider_notify_show_status(remote_frame_provider_h handle,
-               bundle *extra_data);
-
-/**
- * @brief Notifies that the object is prepared to hide.
- * @since_tizen 5.5
- *
- * @param[in]   handle          The remote frame provider handle
- * @param[in]   extra_data      The bundle object
- * @return      @c 0 on success,
- *              otherwise a negative error value
- *
- * @retval #REMOTE_FRAME_ERROR_NONE Successful
- * @retval #REMOTE_FRAME_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #REMOTE_FRAME_ERROR_INVALID_OPERATION Invalid operation
- * @retval #REMOTE_FRAME_ERROR_IO_ERROR I/O error
- */
-int remote_frame_provider_notify_hide_status(remote_frame_provider_h handle,
-               bundle *extra_data);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __REMOTE_FRAME_PROVIDER_H__ */
diff --git a/remote-frame/include/remote_frame_types.h b/remote-frame/include/remote_frame_types.h
deleted file mode 100644 (file)
index 8d2c848..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * 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.
- */
-
-#ifndef __REMOTE_FRAME_TYPES_H__
-#define __REMOTE_FRAME_TYPES_H__
-
-#include <tizen.h>
-#include <app_control.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @brief Enumeration for remote frame error.
- * @since_tizen 5.5
- */
-typedef enum {
-       REMOTE_FRAME_ERROR_NONE = TIZEN_ERROR_NONE,                             /**< Successful */
-       REMOTE_FRAME_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER,   /**< Invalid parameter */
-       REMOTE_FRAME_ERROR_APP_NOT_FOUND = APP_CONTROL_ERROR_APP_NOT_FOUND,     /**< The application is not found */
-       REMOTE_FRAME_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION,   /**< Invalid operation */
-       REMOTE_FRAME_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR,                     /**< I/O error */
-       REMOTE_FRAME_ERROR_LAUNCH_REJECTED = APP_CONTROL_ERROR_LAUNCH_REJECTED, /**< Launch rejected */
-       REMOTE_FRAME_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY,           /**< Out of memory */
-       REMOTE_FRAME_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED,   /**< Permission denied */
-} remote_frame_error_e;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __REMOTE_FRAME_TYPES_H__ */
diff --git a/remote-frame/remote-frame.pc.in b/remote-frame/remote-frame.pc.in
deleted file mode 100644 (file)
index 8c48a06..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-prefix=@PREFIX@
-exec_prefix=@EXEC_PREFIX@
-libdir=@LIBDIR@
-includedir=@INCLUDEDIR@
-
-Name: remote-frame
-Description: Support development of the remote frame
-Version: @VERSION@
-Requires: screen_connector_shared_widget_launch elementary frame-broker capi-appfw-app-control bundle
-Libs: -L${libdir} -lremote-frame
-Cflags: -I${includedir}
-cppflags: -I${includedir}
diff --git a/remote-frame/src/remote_frame.c b/remote-frame/src/remote_frame.c
deleted file mode 100644 (file)
index 837d7c9..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * 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.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <glib.h>
-#include <frame_broker.h>
-#include <frame_internal.h>
-
-#include "remote_frame.h"
-#include "remote_frame_types.h"
-#include "log_private.h"
-#include "private.h"
-
-#define HANDLE_TO_FRAME(h) ((frame_h)(remote_frame_h)(h))
-
-API int remote_frame_get_raw(remote_frame_h handle, Evas_Object **raw)
-{
-       frame_h frame = HANDLE_TO_FRAME(handle);
-
-       return frame_get_raw(frame, raw);
-}
-
-static remote_frame_type_e __convert_type(frame_type_e type)
-{
-       if (type == FRAME_TYPE_REMOTE_SURFACE)
-               return REMOTE_FRAME_TYPE_REMOTE_SURFACE;
-
-       return REMOTE_FRAME_TYPE_SPLASH_SCREEN;
-}
-
-API int remote_frame_get_type(remote_frame_h handle, remote_frame_type_e *type)
-{
-       frame_h frame = HANDLE_TO_FRAME(handle);
-       frame_type_e frame_type;
-       int ret;
-
-       if (!handle || !type) {
-               _E("Invalid parameter");
-               return REMOTE_FRAME_ERROR_INVALID_PARAMETER;
-       }
-
-       ret = frame_get_type(frame, &frame_type);
-       if (ret != FRAME_BROKER_ERROR_NONE)
-               return ret;
-
-       *type = __convert_type(frame_type);
-
-       return REMOTE_FRAME_ERROR_NONE;
-}
-
-static remote_frame_direction_e __convert_direction(frame_direction_e direction)
-{
-       if (direction == FRAME_DIRECTION_FORWARD)
-               return REMOTE_FRAME_DIRECTION_FORWARD;
-
-       return REMOTE_FRAME_DIRECTION_BACKWARD;
-}
-
-API int remote_frame_get_direction(remote_frame_h handle,
-               remote_frame_direction_e *direction)
-{
-       frame_h frame = HANDLE_TO_FRAME(handle);
-       frame_direction_e frame_direction;
-       int ret;
-
-       if (!handle || !direction) {
-               _E("Invalid parameter");
-               return REMOTE_FRAME_ERROR_INVALID_PARAMETER;
-       }
-
-       ret = frame_get_direction(frame, &frame_direction);
-       if (ret != FRAME_BROKER_ERROR_NONE)
-               return ret;
-
-       *direction = __convert_direction(frame_direction);
-
-       return REMOTE_FRAME_ERROR_NONE;
-}
-
-API int remote_frame_get_position_x(remote_frame_h handle, int32_t *x)
-{
-       frame_h frame = HANDLE_TO_FRAME(handle);
-
-       return frame_get_position_x(frame, x);
-}
-
-API int remote_frame_get_position_y(remote_frame_h handle, int32_t *y)
-{
-       frame_h frame = HANDLE_TO_FRAME(handle);
-
-       return frame_get_position_y(frame, y);
-}
-
-API int remote_frame_get_extra_data(remote_frame_h handle, bundle **extra_data)
-{
-       frame_h frame = HANDLE_TO_FRAME(handle);
-
-       return frame_get_extra_data(frame, extra_data);
-}
diff --git a/remote-frame/src/remote_frame_consumer.c b/remote-frame/src/remote_frame_consumer.c
deleted file mode 100644 (file)
index c941b8a..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * 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.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <glib.h>
-#include <frame_broker.h>
-#include <frame_broker_internal.h>
-#include <aul_launcher_service.h>
-
-#include "remote_frame_consumer.h"
-#include "remote_frame_context.h"
-#include "log_private.h"
-#include "private.h"
-
-struct remote_frame_consumer_s {
-       frame_broker_h broker;
-       Evas_Object *win;
-       remote_frame_context_lifecycle_callback_s callback;
-       void *user_data;
-};
-
-static void __frame_context_create_cb(frame_context_h context, void *user_data)
-{
-       remote_frame_consumer_h consumer = user_data;
-
-       consumer->callback.create(context, consumer->user_data);
-}
-
-static void __frame_context_resume_cb(frame_context_h context, frame_h frame,
-               void *user_data)
-{
-       remote_frame_consumer_h consumer = user_data;
-
-       consumer->callback.resume(context, frame, consumer->user_data);
-}
-
-static void __frame_context_pause_cb(frame_context_h context, void *user_data)
-{
-       remote_frame_consumer_h consumer = user_data;
-
-       consumer->callback.pause(context, consumer->user_data);
-}
-
-static void __frame_context_destroy_cb(frame_context_h context, void *user_data)
-{
-       remote_frame_consumer_h consumer = user_data;
-
-       consumer->callback.destroy(context, consumer->user_data);
-}
-
-static void __frame_context_update_cb(frame_context_h context, frame_h frame,
-               void *user_data)
-{
-       remote_frame_consumer_h consumer = user_data;
-
-       consumer->callback.update(context, frame, consumer->user_data);
-}
-
-static remote_frame_context_error_e __convert_error(frame_context_error_e error)
-{
-       switch (error) {
-       case FRAME_CONTEXT_ERROR_DISQUALIFIED:
-               return REMOTE_FRAME_CONTEXT_ERROR_DISQUALIFIED;
-       case FRAME_CONTEXT_ERROR_WRONG_REQUEST:
-               return REMOTE_FRAME_CONTEXT_ERROR_WRONG_REQUEST;
-       default:
-               return REMOTE_FRAME_CONTEXT_ERROR_NONE;
-       }
-}
-
-static void __frame_context_error_cb(frame_context_h context,
-               frame_context_error_e error,
-               void *user_data)
-{
-       remote_frame_consumer_h consumer = user_data;
-
-       consumer->callback.error(context, __convert_error(error),
-                       consumer->user_data);
-}
-
-API int remote_frame_consumer_create(Evas_Object *win,
-               remote_frame_context_lifecycle_callback_s *callback,
-               void *user_data,
-               remote_frame_consumer_h *handle)
-{
-       struct remote_frame_consumer_s *consumer;
-       frame_context_lifecycle_callback_s cbs = {
-               .create = __frame_context_create_cb,
-               .resume = __frame_context_resume_cb,
-               .pause = __frame_context_pause_cb,
-               .destroy = __frame_context_destroy_cb,
-               .update = __frame_context_update_cb,
-               .error = __frame_context_error_cb
-       };
-       frame_broker_h broker;
-       int ret;
-
-       if (!win || !callback || !handle) {
-               _E("Invalid parameter");
-               return REMOTE_FRAME_ERROR_INVALID_PARAMETER;
-       }
-
-       if (!callback->create || !callback->resume ||
-                       !callback->pause || !callback->destroy ||
-                       !callback->update || !callback->error) {
-               _E("Invalid parameter");
-               return REMOTE_FRAME_ERROR_INVALID_PARAMETER;
-       }
-
-       consumer = calloc(1, sizeof(struct remote_frame_consumer_s));
-       if (!consumer) {
-               _E("Out of memory");
-               return REMOTE_FRAME_ERROR_OUT_OF_MEMORY;
-       }
-
-       ret = frame_broker_create(win, &cbs, consumer, &broker);
-       if (ret != FRAME_BROKER_ERROR_NONE) {
-               remote_frame_consumer_destroy(consumer);
-               return ret;
-       }
-
-       consumer->broker = broker;
-       consumer->win = win;
-       consumer->callback = *callback;
-       consumer->user_data = user_data;
-
-       *handle = consumer;
-
-       return REMOTE_FRAME_ERROR_NONE;
-}
-
-API int remote_frame_consumer_destroy(remote_frame_consumer_h handle)
-{
-       if (!handle) {
-               _E("Invalid parameter");
-               return REMOTE_FRAME_ERROR_INVALID_PARAMETER;
-       }
-
-       frame_broker_destroy(handle->broker);
-       free(handle);
-
-       return REMOTE_FRAME_ERROR_NONE;
-}
-
-API int remote_frame_consumer_send_launch_request(
-               remote_frame_consumer_h handle,
-               app_control_h app_control,
-               app_control_result_cb result_cb,
-               app_control_reply_cb reply_cb,
-               void *user_data) {
-       int ret;
-
-       if (!handle || !app_control || !result_cb) {
-               _E("Invalid parameter");
-               return REMOTE_FRAME_ERROR_INVALID_PARAMETER;
-       }
-
-       ret = frame_broker_send_launch_request_for_remote_frame(
-                       handle->broker, app_control, result_cb, reply_cb,
-                       user_data);
-       if (ret != FRAME_BROKER_ERROR_NONE) {
-               _E("Failed to send launch request. error(%d)", ret);
-               return ret;
-       }
-
-       return REMOTE_FRAME_ERROR_NONE;
-}
diff --git a/remote-frame/src/remote_frame_context.c b/remote-frame/src/remote_frame_context.c
deleted file mode 100644 (file)
index cfeaa93..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * 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.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <glib.h>
-#include <frame_broker.h>
-
-#include "remote_frame_context.h"
-#include "remote_frame_types.h"
-#include "log_private.h"
-#include "private.h"
-
-#define HANDLE_TO_FRAME_CONTEXT(h)                                             \
-       ((frame_context_h)(remote_frame_context_h)(h))
-
-API int remote_frame_context_start_animation(remote_frame_context_h handle)
-{
-       frame_context_h context = HANDLE_TO_FRAME_CONTEXT(handle);
-       int ret;
-
-       ret = frame_context_start_animation(context);
-       if (ret != FRAME_BROKER_ERROR_NONE)
-               return ret;
-
-       return REMOTE_FRAME_ERROR_NONE;
-}
-
-API int remote_frame_context_finish_animation(remote_frame_context_h handle)
-{
-       frame_context_h context = HANDLE_TO_FRAME_CONTEXT(handle);
-       int ret;
-
-       ret = frame_context_finish_animation(context);
-       if (ret != FRAME_BROKER_ERROR_NONE)
-               return ret;
-
-       return REMOTE_FRAME_ERROR_NONE;
-}