From: Ji-hoon Lee Date: Thu, 18 Jun 2020 08:02:30 +0000 (+0900) Subject: Temporarily merge ma_ap library and ma library X-Git-Tag: submit/tizen/20200709.044120^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6e714a0d9938715ce8ce93bb9df68ca94a0b5fec;p=platform%2Fcore%2Fuifw%2Fmulti-assistant.git Temporarily merge ma_ap library and ma library Change-Id: I809108959e360e0271361a6743138b2af50f7cce --- diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 5c106e4..67485ea 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -4,6 +4,9 @@ SET(SRCS ma_dbus.c ../common/ma_config_mgr.c ../common/multi_assistant_settings.c + ma_ap.c + ma_ap_client.c + ma_ap_dbus.c ) SET(UI_SRCS @@ -14,12 +17,6 @@ SET(UI_SRCS ../common/multi_assistant_settings.c ) -SET(AP_SRCS - ma_ap.c - ma_ap_client.c - ma_ap_dbus.c -) - FOREACH(flag ${pkgs_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) @@ -34,11 +31,6 @@ TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS}) ADD_LIBRARY("${PROJECT_NAME}_ui" SHARED ${UI_SRCS}) TARGET_LINK_LIBRARIES("${PROJECT_NAME}_ui" ${pkgs_LDFLAGS}) -## multi assistant ap library ## -ADD_LIBRARY("${PROJECT_NAME}_ap" SHARED ${AP_SRCS}) -TARGET_LINK_LIBRARIES("${PROJECT_NAME}_ap" ${pkgs_LDFLAGS}) - ## Install library files ## INSTALL(TARGETS "${PROJECT_NAME}" DESTINATION ${LIBDIR} COMPONENT RuntimeLibraries) INSTALL(TARGETS "${PROJECT_NAME}_ui" DESTINATION ${LIBDIR} COMPONENT RuntimeLibraries) -INSTALL(TARGETS "${PROJECT_NAME}_ap" DESTINATION ${LIBDIR} COMPONENT RuntimeLibraries) diff --git a/client/ma_ap_dbus.c b/client/ma_ap_dbus.c index 9d3e267..4e13401 100644 --- a/client/ma_ap_dbus.c +++ b/client/ma_ap_dbus.c @@ -49,7 +49,7 @@ typedef struct { int section; } streaming_data_streaming_section_header; -const char *message_port = "ma_streaming_port"; +static const char *message_port = "ma_streaming_port"; static int g_local_port_id = -1; static void message_port_cb(int local_port_id, diff --git a/client/ma_dbus.c b/client/ma_dbus.c index 8b05283..4aced1c 100644 --- a/client/ma_dbus.c +++ b/client/ma_dbus.c @@ -63,7 +63,7 @@ typedef struct { int section; } streaming_data_streaming_section_header; -const char *message_port = "ma_streaming_port"; +static const char *message_port = "ma_streaming_port"; static int g_local_port_id = -1; //LCOV_EXCL_START diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 923b3b3..2d2056a 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -1,17 +1,14 @@ ## configure pkgconfig files ## CONFIGURE_FILE(multi-assistant.pc.in multi-assistant.pc @ONLY) CONFIGURE_FILE(multi-assistant-ui.pc.in multi-assistant-ui.pc @ONLY) -CONFIGURE_FILE(multi-assistant-ap.pc.in multi-assistant-ap.pc @ONLY) ## Install pc files ## INSTALL(FILES ${CMAKE_BINARY_DIR}/include/multi-assistant.pc DESTINATION ${LIBDIR}/pkgconfig) INSTALL(FILES ${CMAKE_BINARY_DIR}/include/multi-assistant-ui.pc DESTINATION ${LIBDIR}/pkgconfig) -INSTALL(FILES ${CMAKE_BINARY_DIR}/include/multi-assistant-ap.pc DESTINATION ${LIBDIR}/pkgconfig) ## Install header files ## INSTALL(FILES ${CMAKE_BINARY_DIR}/include/multi_assistant.h DESTINATION ${INCLUDEDIR}) INSTALL(FILES ${CMAKE_BINARY_DIR}/include/multi_assistant_ui.h DESTINATION ${INCLUDEDIR}) -INSTALL(FILES ${CMAKE_BINARY_DIR}/include/multi_assistant_ap.h DESTINATION ${INCLUDEDIR}) INSTALL(FILES ${CMAKE_BINARY_DIR}/include/multi_assistant_common.h DESTINATION ${INCLUDEDIR}) INSTALL(FILES ${CMAKE_BINARY_DIR}/include/multi_assistant_settings.h DESTINATION ${INCLUDEDIR}) INSTALL(FILES ${CMAKE_BINARY_DIR}/include/multi_assistant_internal.h DESTINATION ${INCLUDEDIR}) diff --git a/include/multi_assistant_ap.h b/include/multi_assistant_ap.h index 55449c8..1639652 100644 --- a/include/multi_assistant_ap.h +++ b/include/multi_assistant_ap.h @@ -33,106 +33,6 @@ extern "C" { #endif -/** - * @brief Initializes multi-assistant AP. - * @since_tizen 6.0 - * @privlevel public - * @privilege %http://tizen.org/privilege/recorder - * - * @return @c 0 on success, otherwise a negative error value - * @retval #MA_ERROR_NONE Successful - * @retval #MA_ERROR_NOT_SUPPORTED Not supported - * @retval #MA_ERROR_PERMISSION_DENIED Permission denied - * @retval #MA_ERROR_OPERATION_FAILED Operation failed - * @retval #MA_ERROR_OUT_OF_MEMORY Out of memory - * - * @see ma_ap_deinitialize() - */ -int ma_ap_initialize(void); - -/** - * @brief Deinitializes multi-assistant AP. - * @since_tizen 6.0 - * @privlevel public - * @privilege %http://tizen.org/privilege/recorder - * - * @return @c 0 on success, otherwise a negative error value - * @retval #MA_ERROR_NONE Successful - * @retval #MA_ERROR_NOT_SUPPORTED Not supported - * @retval #MA_ERROR_PERMISSION_DENIED Permission denied - * @retval #MA_ERROR_INVALID_STATE Invalid state - * - * @see ma_ap_initialize() - */ -int ma_ap_deinitialize(void); - -/** - * @brief Sets an error callback. - * @since_tizen 6.0 - * - * @param[in] callback The callback - * @param[in] user_data The user data passed to the callback function - * - * @return @c 0 on success, otherwise a negative error value - * @retval #MA_ERROR_NONE Successful - * @retval #MA_ERROR_NOT_SUPPORTED Not supported - * @retval #MA_ERROR_INVALID_STATE Invalid state - * @retval #MA_ERROR_INVALID_PARAMETER Invalid parameter - * - * @pre The state should be #MA_STATE_INITIALIZED. - * @see ma_error_cb() - * @see ma_ap_unset_error_cb() - */ -int ma_ap_set_error_cb(ma_error_cb callback, void* user_data); - -/** - * @brief Unsets an error callback. - * @since_tizen 6.0 - * - * @return @c 0 on success, otherwise a negative error value - * @retval #MA_ERROR_NONE Successful - * @retval #MA_ERROR_NOT_SUPPORTED Not supported - * @retval #MA_ERROR_INVALID_STATE Invalid state - * - * @pre The state should be #MA_STATE_INITIALIZED. - * @see ma_error_cb() - * @see ma_ap_set_error_cb() - */ -int ma_ap_unset_error_cb(void); - -/** - * @brief Sets an audio streaming callback. - * @since_tizen 6.0 - * - * @param[in] callback The callback - * @param[in] user_data The user data passed to the callback function - * - * @return @c 0 on success, otherwise a negative error value - * @retval #MA_ERROR_NONE Successful - * @retval #MA_ERROR_NOT_SUPPORTED Not supported - * @retval #MA_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MA_ERROR_INVALID_STATE Invalid state - * - * @pre The state should be #MA_STATE_INITIALIZED. - * @see ma_audio_streaming_cb() - * @see ma_ap_unset_audio_streaming_cb() - */ -int ma_ap_set_audio_streaming_cb(ma_audio_streaming_cb callback, void* user_data); - -/** - * @brief Unsets an audio streaming callback. - * @since_tizen 6.0 - * - * @return @c 0 on success, otherwise a negative error value - * @retval #MA_ERROR_NONE Successful - * @retval #MA_ERROR_NOT_SUPPORTED Not supported - * @retval #MA_ERROR_INVALID_STATE Invalid state - * - * @pre The state should be #MA_STATE_INITIALIZED. - * @see ma_audio_streaming_cb() - * @see ma_ap_set_audio_streaming_cb() - */ -int ma_ap_unset_audio_streaming_cb(void); #ifdef __cplusplus } diff --git a/include/multi_assistant_internal.h b/include/multi_assistant_internal.h index fcb1665..08b39b2 100644 --- a/include/multi_assistant_internal.h +++ b/include/multi_assistant_internal.h @@ -18,6 +18,8 @@ #ifndef __TIZEN_UIFW_MULTI_ASSISTANT_INTERNAL_H__ #define __TIZEN_UIFW_MULTI_ASSISTANT_INTERNAL_H__ +#include + #ifdef __cplusplus extern "C" { @@ -45,6 +47,107 @@ extern "C" */ int ma_set_assistant_language(const char* language); +/** + * @brief Initializes multi-assistant AP. + * @since_tizen 6.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/recorder + * + * @return @c 0 on success, otherwise a negative error value + * @retval #MA_ERROR_NONE Successful + * @retval #MA_ERROR_NOT_SUPPORTED Not supported + * @retval #MA_ERROR_PERMISSION_DENIED Permission denied + * @retval #MA_ERROR_OPERATION_FAILED Operation failed + * @retval #MA_ERROR_OUT_OF_MEMORY Out of memory + * + * @see ma_ap_deinitialize() + */ +int ma_ap_initialize(void); + +/** + * @brief Deinitializes multi-assistant AP. + * @since_tizen 6.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/recorder + * + * @return @c 0 on success, otherwise a negative error value + * @retval #MA_ERROR_NONE Successful + * @retval #MA_ERROR_NOT_SUPPORTED Not supported + * @retval #MA_ERROR_PERMISSION_DENIED Permission denied + * @retval #MA_ERROR_INVALID_STATE Invalid state + * + * @see ma_ap_initialize() + */ +int ma_ap_deinitialize(void); + +/** + * @brief Sets an error callback. + * @since_tizen 6.0 + * + * @param[in] callback The callback + * @param[in] user_data The user data passed to the callback function + * + * @return @c 0 on success, otherwise a negative error value + * @retval #MA_ERROR_NONE Successful + * @retval #MA_ERROR_NOT_SUPPORTED Not supported + * @retval #MA_ERROR_INVALID_STATE Invalid state + * @retval #MA_ERROR_INVALID_PARAMETER Invalid parameter + * + * @pre The state should be #MA_STATE_INITIALIZED. + * @see ma_error_cb() + * @see ma_ap_unset_error_cb() + */ +int ma_ap_set_error_cb(ma_error_cb callback, void* user_data); + +/** + * @brief Unsets an error callback. + * @since_tizen 6.0 + * + * @return @c 0 on success, otherwise a negative error value + * @retval #MA_ERROR_NONE Successful + * @retval #MA_ERROR_NOT_SUPPORTED Not supported + * @retval #MA_ERROR_INVALID_STATE Invalid state + * + * @pre The state should be #MA_STATE_INITIALIZED. + * @see ma_error_cb() + * @see ma_ap_set_error_cb() + */ +int ma_ap_unset_error_cb(void); + +/** + * @brief Sets an audio streaming callback. + * @since_tizen 6.0 + * + * @param[in] callback The callback + * @param[in] user_data The user data passed to the callback function + * + * @return @c 0 on success, otherwise a negative error value + * @retval #MA_ERROR_NONE Successful + * @retval #MA_ERROR_NOT_SUPPORTED Not supported + * @retval #MA_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MA_ERROR_INVALID_STATE Invalid state + * + * @pre The state should be #MA_STATE_INITIALIZED. + * @see ma_audio_streaming_cb() + * @see ma_ap_unset_audio_streaming_cb() + */ +int ma_ap_set_audio_streaming_cb(ma_audio_streaming_cb callback, void* user_data); + +/** + * @brief Unsets an audio streaming callback. + * @since_tizen 6.0 + * + * @return @c 0 on success, otherwise a negative error value + * @retval #MA_ERROR_NONE Successful + * @retval #MA_ERROR_NOT_SUPPORTED Not supported + * @retval #MA_ERROR_INVALID_STATE Invalid state + * + * @pre The state should be #MA_STATE_INITIALIZED. + * @see ma_audio_streaming_cb() + * @see ma_ap_set_audio_streaming_cb() + */ +int ma_ap_unset_audio_streaming_cb(void); + #ifdef __cplusplus } #endif diff --git a/packaging/multi-assistant.spec b/packaging/multi-assistant.spec index 68dafb2..2f9f259 100644 --- a/packaging/multi-assistant.spec +++ b/packaging/multi-assistant.spec @@ -51,15 +51,6 @@ Requires: %{name} = %{version}-%{release} Multi assistant manager header files for MA development. -%package ap-devel -Summary: Multi assistant manager header files for MA AP development -Group: libdevel -Requires: %{name} = %{version}-%{release} - -%description ap-devel -Multi assistant manager header files for MA AP development. - - %if 0%{?gcov:1} %package gcov Summary: Multi assistant (gcov) @@ -115,7 +106,6 @@ mkdir -p %{_libdir}/multiassistant/ma %defattr(-,root,root,-) %{_libdir}/libma.so %{_libdir}/libma_ui.so -%{_libdir}/libma_ap.so %{TZ_SYS_RO_SHARE}/multiassistant/ma/1.0/ma-config.xml %{TZ_SYS_RO_SHARE}/dbus-1/services/org.tizen.multiassistant* %{TZ_SYS_RO_SHARE}/parser-plugins/multi-assistant.info @@ -127,7 +117,6 @@ mkdir -p %{_libdir}/multiassistant/ma %{_libdir}/pkgconfig/multi-assistant.pc %{_includedir}/multi_assistant.h %{_includedir}/multi_assistant_ui.h -%{_includedir}/multi_assistant_ap.h %{_includedir}/multi_assistant_common.h %{_includedir}/multi_assistant_settings.h %{_includedir}/multi_assistant_internal.h @@ -140,12 +129,6 @@ mkdir -p %{_libdir}/multiassistant/ma %{_includedir}/multi_assistant_common.h %{_includedir}/multi_assistant_settings.h -%files ap-devel -%defattr(-,root,root,-) -%{_libdir}/pkgconfig/multi-assistant-ap.pc -%{_includedir}/multi_assistant_ap.h -%{_includedir}/multi_assistant_common.h - %if 0%{?gcov:1} %files gcov %{_datadir}/gcov/obj/*