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>
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)
SET(HEADERS_LIB_FRAME_BROKER
frame.h
frame_broker.h
- frame_broker_internal.h
frame_context.h
- frame_internal.h
frame_types.h
)
#include <stdint.h>
#include <Elementary.h>
+#include <bundle.h>
#include <frame_types.h>
#ifdef __cplusplus
*/
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
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
+++ /dev/null
-/*
- * 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__ */
+++ /dev/null
-/*
- * 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__ */
#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"
#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"
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,
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(remote-frame C)
+PROJECT(frame-provider C)
SET(PREFIX "${CMAKE_INSTALL_PREFIX}")
SET(PROJECT_NAME "${PROJECT_NAME}")
SET(VERSION "${FULLVER}")
INCLUDE(FindPkgConfig)
-pkg_check_modules(remote-frame REQUIRED
+pkg_check_modules(frame-provider REQUIRED
aul
bundle
capi-appfw-app-control
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")
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})
--- /dev/null
+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}
--- /dev/null
+/*
+ * 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__ */
--- /dev/null
+/*
+ * 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__ */
#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;
};
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;
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);
&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,
*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);
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)
{
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) {
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");
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,
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,
#ifdef LOG_TAG
#undef LOG_TAG
#endif
-#define LOG_TAG "REMOTE_FRAME"
+#define LOG_TAG "FRAME_PROVIDER"
#ifdef _E
#undef _E
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)
%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
%{_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
+++ /dev/null
-/*
- * 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__ */
+++ /dev/null
-/*
- * 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__ */
+++ /dev/null
-/*
- * 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__ */
+++ /dev/null
-/*
- * 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__ */
+++ /dev/null
-/*
- * 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__ */
+++ /dev/null
-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}
+++ /dev/null
-/*
- * 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);
-}
+++ /dev/null
-/*
- * 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;
-}
+++ /dev/null
-/*
- * 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;
-}