Temporarily merge ma_ap library and ma library 07/238107/2 accepted/tizen/unified/20200709.164647 submit/tizen/20200709.044120
authorJi-hoon Lee <dalton.lee@samsung.com>
Thu, 18 Jun 2020 08:02:30 +0000 (17:02 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Thu, 9 Jul 2020 04:21:17 +0000 (13:21 +0900)
Change-Id: I809108959e360e0271361a6743138b2af50f7cce

client/CMakeLists.txt
client/ma_ap_dbus.c
client/ma_dbus.c
include/CMakeLists.txt
include/multi_assistant_ap.h
include/multi_assistant_internal.h
packaging/multi-assistant.spec

index 5c106e4f2ec108bb71fff55344603df584e2b75e..67485eaeb98ff9777654470cef2d8b7de82a4d76 100644 (file)
@@ -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)
index 9d3e26756fb752cf630da3953aac3f82397e4802..4e13401b8ee9423fb13d42691999eba9660b8588 100644 (file)
@@ -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,
index 8b05283bb5550681c53eef43bbda4cb24454b170..4aced1c3b734ca154ed66800d949672a2b7aba7f 100644 (file)
@@ -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
index 923b3b370b14c71a93d5cc091e310a0cbc48ab16..2d2056a30b9abf2184f7e05b448345164aed5e62 100644 (file)
@@ -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})
index 55449c80f5d9373a06254d6e2c34dae60236e092..1639652a1c62da8b44381f9f05c4c18434c74732 100644 (file)
@@ -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
 }
index fcb166553f01946e09404a83315cd88f07d06e39..08b39b28c474b04db300ec55bedf357d61354ee3 100644 (file)
@@ -18,6 +18,8 @@
 #ifndef __TIZEN_UIFW_MULTI_ASSISTANT_INTERNAL_H__
 #define __TIZEN_UIFW_MULTI_ASSISTANT_INTERNAL_H__
 
+#include <multi_assistant_common.h>
+
 #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
index 68dafb2e93528c3e7b01dccd154a4d5eda4ed1ba..2f9f259e14b12473b9eaae19794565cd230d349d 100644 (file)
@@ -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/*