Clean up the Makefiles, Add some descriptions 98/48998/1 submit/tizen/20151005.082535 submit/tizen/20151006.070518 submit/tizen/20151006.093657
authorsejong123.park <sejong123.park@samsung.com>
Mon, 5 Oct 2015 02:53:33 +0000 (11:53 +0900)
committersejong123.park <sejong123.park@samsung.com>
Mon, 5 Oct 2015 02:55:20 +0000 (11:55 +0900)
Change-Id:Icb2030d2304afc32ba1c83d4ba3bb21e73fef67c
Signed-off-by: sejong123.park <sejong123.park@samsung.com>
CMakeLists.txt [changed mode: 0755->0644]
legacy/CMakeLists.txt [changed mode: 0755->0644]
muse/include/muse_camera.h
muse/include/muse_camera_msg.h [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 4369303..2b4a1b7
@@ -1,21 +1,7 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 
-SET(Services
-        "application"
-        "base"
-        "content"
-        "location"
-        "media"
-        "messaging"
-        "network"
-        "social"
-        "telephony"
-        "system"
-   )
-
 # project
 SET(prefix "/usr")
-SET(version "0.0.1")
 SET(maintainer "Jeongmo Yang<jm80.yang>, Hyuntae Kim<ht1211.kim@samsung.com>, Sejong Park<sejong123.park@samsung.com>")
 SET(description "A Camera library in Tizen Native API")
 SET(service "mmsvc")
@@ -26,7 +12,6 @@ PROJECT(${fw_name})
 
 SET(CMAKE_INSTALL_PREFIX ${prefix})
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-SET(VERSION ${version})
 
 SET(INC_DIR legacy/include)
 INCLUDE_DIRECTORIES(${INC_DIR})
@@ -38,7 +23,6 @@ IF("${ARCH}" STREQUAL "arm")
 ENDIF("${ARCH}" STREQUAL "arm")
 
 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
-ADD_DEFINITIONS("-DTIZEN_DEBUG")
 
 CONFIGURE_FILE(
     ${fw_name}.pc.in
old mode 100755 (executable)
new mode 100644 (file)
index dbd8d02..18c8017
@@ -66,4 +66,3 @@ INSTALL(
 SET(PC_NAME ${fw_name})
 SET(PC_REQUIRED ${pc_dependents})
 SET(PC_LDFLAGS -l${fw_name})
-SET(PC_CFLAGS -I\${includedir}/media)
\ No newline at end of file
index 74c7a41..14e1e6b 100644 (file)
 extern "C" {
 #endif
 
+/**
+  * @file muse_camera.h
+  * @brief This file contains the muse camera API for framework, related structures and enumerations.
+  */
+
 #include "tbm_bufmgr.h"
 #include <stdbool.h>
 #include <glib.h>
 #include <stdio.h>
 
+/**
+ * @brief Enumeration for the muse camera apis.
+ */
 typedef enum {
        MUSE_CAMERA_API_CREATE, //0
        MUSE_CAMERA_API_DESTROY,
@@ -158,6 +166,9 @@ typedef enum {
        MUSE_CAMERA_API_MAX
 } muse_camera_api_e;
 
+/**
+ * @brief Enumeration for the muse camera events.
+ */
 typedef enum {
        MUSE_CAMERA_EVENT_TYPE_STATE_CHANGE, //0
        MUSE_CAMERA_EVENT_TYPE_FOCUS_CHANGE,
@@ -190,7 +201,7 @@ typedef enum {
 }muse_camera_event_e;
 
 /**
- * @brief The structure type for data transport
+ * @brief The structure type for data transport for the muse camera
  */
 typedef struct {
        int data_size;
@@ -200,41 +211,85 @@ typedef struct {
        tbm_bufmgr bufmgr;
 } muse_camera_transport_info_s;
 
+/**
+ * @brief The structure type for the userdata, registering into the daemon core.
+ */
 typedef struct {
        tbm_bufmgr bufmgr;
 } muse_camera_info_s;
 
+/**
+ * @brief The structure type for muse camera errors.
+ */
 typedef enum {
        MUSE_CAMERA_ERROR_INVALID = -1,
        MUSE_CAMERA_ERROR_NONE = 1,
 } muse_camera_error_e;
 
+/**
+ * @brief Definition for the callback event id.
+ */
 #define MUSE_CAMERA_CB_EVENT   MUSE_CAMERA_API_MAX + 1 //129
+
+/**
+ * @brief Definition for the max message length.
+ */
 #define MUSE_CAMERA_MSG_MAX_LENGTH             256
-#define MUSE_CAMERA_PARSE_STRING_SIZE  200
-#define KEY_HOUSE      0x8000
-//#define FD_SHARE
-
-#ifdef USE_SHARED_MEMORY
-int camera_ipc_create_shm(int key_num, int size, void *shm_addr);
-int camera_ipc_get_shm(int key_num, int size, void *shm_addr);
-int camera_ipc_dt_shm(void *shm_addr);
-
-typedef struct _camera_shm_info{
-        int written;
-        char data[4];
-}camera_shm_info;
-#endif
 
+/**
+ * @brief Definition for the socket path length of the shmsink.
+ */
 #define SOCKET_PATH_LENGTH 32
+
+/**
+ * @brief Definition for the socket path base of the shmsink.
+ */
 #define SOCKET_PATH_BASE "/tmp/mused_gst.%d"
+
+/**
+ * @brief Definition for the wait time of the ipc callback.
+ */
 #define CALLBACK_TIME_OUT 3
+
+/**
+ * @brief Definition for the long wait time of the ipc callback.
+ */
 #define CALLBACK_TIME_OUT_LONG 8
 
+
+/**
+ * @brief Makes the tbm buffer object, and set to the muse camera structure.
+ * @param[out] transport_info The allocated structure, tbm bo will be set in here.
+ * @return TRUE on success, otherwise a FALSE value
+ */
 bool muse_camera_ipc_make_tbm(muse_camera_transport_info_s *transport_info);
+
+/**
+ * @brief Exports the tbm buffer object, another process can import this bo.
+ * @param[in] transport_info Using transport_info.bo to export.
+ * @return TBM gem name on success, otherwise a negative error value
+ */
 int muse_camera_ipc_export_tbm(muse_camera_transport_info_s transport_info);
+
+/**
+ * @brief Initialize the tbm buffer manager, mainly at the client side.
+ * @param[out] transport_info The allocated structure, tbm bufmgr will be set in here.
+ * @return TRUE on success, otherwise a FALSE value
+ */
 bool muse_camera_ipc_init_tbm(muse_camera_transport_info_s *transport_info);
+
+/**
+ * @brief Imports the tbm buffer object.
+ * @param[out] transport_info Set the transport_info.bo.
+ * @return TRUE on success, otherwise a FALSE value
+ */
 int muse_camera_ipc_import_tbm(muse_camera_transport_info_s *transport_info);
+
+/**
+ * @brief Unreference the tbm buffer object.
+ * @param[in] transport_info Using the transport_info.bo.
+ * @return TRUE on success, otherwise a FALSE value
+ */
 void muse_camera_unref_tbm(muse_camera_transport_info_s *transport_info);
 
 #ifdef __cplusplus
old mode 100755 (executable)
new mode 100644 (file)
index 2c148a8..117631b
@@ -139,8 +139,10 @@ typedef const char* STRING;
 
 /**
  * @brief Send the message from proxy to module via ipc.
- * @param[in] param The key to query, the variable name should be matched to the message's one.
- * @param[out] buf The string of message buffer.
+ * @param[in] api The enumeration of the corresponding api.
+ * @param[in] fd The socket fd that connected to the module via ipc.
+ * @param[in] cb_info The callback information, waiting for the ack from the module.
+ * @param[out] ret The delivered return value from the module to proxy side.
  */
 #define muse_camera_msg_send(api, fd, cb_info, ret) \
        do{     \
@@ -156,6 +158,13 @@ typedef const char* STRING;
                muse_core_msg_json_factory_free(__sndMsg__); \
        }while(0)
 
+/**
+ * @brief Send the message from proxy to module via ipc, waits more period of time for the ack.
+ * @param[in] api The enumeration of the corresponding api.
+ * @param[in] fd The socket fd that connected to the module via ipc.
+ * @param[in] cb_info The callback information, waiting for the ack from the module.
+ * @param[out] ret The delivered return value from the module to proxy side.
+ */
 #define muse_camera_msg_send_longtime(api, fd, cb_info, ret) \
        do{     \
                char *__sndMsg__; \
@@ -170,6 +179,15 @@ typedef const char* STRING;
                muse_core_msg_json_factory_free(__sndMsg__); \
        }while(0)
 
+/**
+ * @brief Send the message from proxy to module via ipc, adding 1 more parameter.
+ * @param[in] api The enumeration of the corresponding api.
+ * @param[in] fd The socket fd that connected to the module via ipc.
+ * @param[in] cb_info The callback information, waiting for the ack from the module.
+ * @param[out] ret The delivered return value from the module to proxy side.
+ * @param[in] type The data type of the parameter.
+ * @param[in] param A single parameter to be included in the message.
+ */
 #define muse_camera_msg_send1(api, fd, cb_info, ret, type, param) \
        do{     \
                char *__sndMsg__; \
@@ -187,6 +205,17 @@ typedef const char* STRING;
                muse_core_msg_json_factory_free(__sndMsg__); \
        }while(0)
 
+/**
+ * @brief Send the message from proxy to module via ipc, adding 2 more parameters.
+ * @param[in] api The enumeration of the corresponding api.
+ * @param[in] fd The socket fd that connected to the module via ipc.
+ * @param[in] cb_info The callback information, waiting for the ack from the module.
+ * @param[out] ret The delivered return value from the module to proxy side.
+ * @param[in] type1 The data type of the parameter.
+ * @param[in] param1 The first parameter to be included in the message.
+ * @param[in] type2 The data type of the parameter.
+ * @param[in] param2 The 2nd parameter to be included in the message.
+ */
 #define muse_camera_msg_send2(api, fd, cb_info, ret, type1, param1, type2, param2) \
        do{     \
                char *__sndMsg__; \
@@ -206,6 +235,19 @@ typedef const char* STRING;
                muse_core_msg_json_factory_free(__sndMsg__); \
        }while(0)
 
+/**
+ * @brief Send the message from proxy to module via ipc, adding 3 more parameters.
+ * @param[in] api The enumeration of the corresponding api.
+ * @param[in] fd The socket fd that connected to the module via ipc.
+ * @param[in] cb_info The callback information, waiting for the ack from the module.
+ * @param[out] ret The delivered return value from the module to proxy side.
+ * @param[in] type1 The data type of the parameter.
+ * @param[in] param1 The first parameter to be included in the message.
+ * @param[in] type2 The data type of the parameter.
+ * @param[in] param2 The 2nd parameter to be included in the message.
+ * @param[in] type3 The data type of the parameter.
+ * @param[in] param3 The 3rd parameter to be included in the message.
+ */
 #define muse_camera_msg_send3(api, fd, cb_info, ret, type1, param1, type2, param2, type3, param3) \
        do{     \
                char *__sndMsg__; \
@@ -227,6 +269,16 @@ typedef const char* STRING;
                muse_core_msg_json_factory_free(__sndMsg__); \
        }while(0)
 
+/**
+ * @brief Send the message from proxy to module via ipc, adding an array data.
+ * @param[in] api The enumeration of the corresponding api.
+ * @param[in] fd The socket fd that connected to the module via ipc.
+ * @param[in] cb_info The callback information, waiting for the ack from the module.
+ * @param[out] ret The delivered return value from the module to proxy side.
+ * @param[in] param The array data parameter to be included in the message.
+ * @param[in] length The length of the array.
+ * @param[in] datum_size The size of the array.
+ */
 #define muse_camera_msg_send_array(api, fd, cb_info, ret, param, length, datum_size) \
        do{     \
                char *__sndMsg__; \
@@ -248,40 +300,12 @@ typedef const char* STRING;
                muse_core_msg_json_factory_free(__sndMsg__); \
        }while(0)
 
-#define muse_camera_msg_send1_async(api, camera, fd, type, param) \
-       do{     \
-               char *__sndMsg__; \
-               int __len__; \
-               type __value__ = (type)param; \
-               __sndMsg__ = muse_core_msg_json_factory_new(api, \
-                               MUSE_TYPE_##type, #param, __value__, \
-                               0); \
-               __len__ = muse_core_ipc_send_msg(fd, __sndMsg__); \
-               muse_core_msg_json_factory_free(__sndMsg__); \
-               if (__len__ <= 0) { \
-                       LOGE("sending message failed"); \
-                       return CAMERA_ERROR_INVALID_OPERATION; \
-               } \
-       }while(0)
-
-#define muse_camera_msg_send2_async(api, camera, fd, type1, param1, type2, param2) \
-       do{     \
-               char *__sndMsg__; \
-               int __len__; \
-               type1 __value1__ = (type1)param1; \
-               type2 __value2__ = (type2)param2; \
-               __sndMsg__ = muse_core_msg_json_factory_new(api, \
-                               MUSE_TYPE_##type1, #param1, __value1__, \
-                               MUSE_TYPE_##type2, #param2, __value2__, \
-                               0); \
-               __len__ = muse_core_ipc_send_msg(fd, __sndMsg__); \
-               muse_core_msg_json_factory_free(__sndMsg__); \
-               if (__len__ <= 0) { \
-                       LOGE("sending message failed"); \
-                       return CAMERA_ERROR_INVALID_OPERATION; \
-               } \
-       }while(0)
-
+/**
+ * @brief Returning the ack message from the server to client side.
+ * @param[in] api The enumeration of the corresponding api.
+ * @param[out] ret The delivered return value from the module to proxy side.
+ * @param[in] module The module info for the ipc transportation.
+ */
 #define muse_camera_msg_return(api, ret, module) \
        do{     \
                char *__sndMsg__; \
@@ -297,6 +321,14 @@ typedef const char* STRING;
                muse_core_msg_json_factory_free(__sndMsg__); \
        }while(0)
 
+/**
+ * @brief Returning the ack message from the server to client side.
+ * @param[in] api The enumeration of the corresponding api.
+ * @param[out] ret The delivered return value from the module to proxy side.
+ * @param[in] module The module info for the ipc transportation.
+ * @param[in] type The data type of the parameter.
+ * @param[in] param A parameter to be included in the message.
+ */
 #define muse_camera_msg_return1(api, ret, module, type, param) \
        do{     \
                char *__sndMsg__; \
@@ -314,6 +346,16 @@ typedef const char* STRING;
                muse_core_msg_json_factory_free(__sndMsg__); \
        }while(0)
 
+/**
+ * @brief Returning the ack message from the server to client side, adding 2 parameters.
+ * @param[in] api The enumeration of the corresponding api.
+ * @param[out] ret The delivered return value from the module to proxy side.
+ * @param[in] module The module info for the ipc transportation.
+ * @param[in] type1 The data type of the parameter.
+ * @param[in] param1 The 1st parameter to be included in the message.
+ * @param[in] type2 The data type of the parameter.
+ * @param[in] param2 The 2nd parameter to be included in the message.
+ */
 #define muse_camera_msg_return2(api, ret, module, type1, param1, type2, param2) \
        do{     \
                char *__sndMsg__; \
@@ -333,6 +375,18 @@ typedef const char* STRING;
                muse_core_msg_json_factory_free(__sndMsg__); \
        }while(0)
 
+/**
+ * @brief Returning the ack message from the server to client side, adding 3 parameters.
+ * @param[in] api The enumeration of the corresponding api.
+ * @param[out] ret The delivered return value from the module to proxy side.
+ * @param[in] module The module info for the ipc transportation.
+ * @param[in] type1 The data type of the parameter.
+ * @param[in] param1 The 1st parameter to be included in the message.
+ * @param[in] type2 The data type of the parameter.
+ * @param[in] param2 The 2nd parameter to be included in the message.
+ * @param[in] type3 The data type of the parameter.
+ * @param[in] param3 The 3rd parameter to be included in the message.
+ */
 #define muse_camera_msg_return3(api, ret, module, type1, param1, type2, param2, type3, param3) \
        do{     \
                char *__sndMsg__; \
@@ -354,6 +408,15 @@ typedef const char* STRING;
                muse_core_msg_json_factory_free(__sndMsg__); \
        }while(0)
 
+/**
+ * @brief Returning the ack message from the server to client side, adding array parameter.
+ * @param[in] api The enumeration of the corresponding api.
+ * @param[out] ret The delivered return value from the module to proxy side.
+ * @param[in] module The module info for the ipc transportation.
+ * @param[in] param The array data parameter to be included in the message.
+ * @param[in] length The length of the array.
+ * @param[in] datum_size The size of the array.
+ */
 #define muse_camera_msg_return_array(api, ret, module, param, length, datum_size) \
        do{     \
                char *__sndMsg__; \
@@ -375,6 +438,12 @@ typedef const char* STRING;
                muse_core_msg_json_factory_free(__sndMsg__); \
        }while(0)
 
+/**
+ * @brief Returning the event ack message from the server to client side, adding array parameter.
+ * @param[in] api The enumeration of the corresponding api.
+ * @param[out] ret The delivered return value from the module to proxy side.
+ * @param[in] module The module info for the ipc transportation.
+ */
 #define muse_camera_msg_event(api, event, module) \
        do{     \
                char *__sndMsg__; \
@@ -385,6 +454,14 @@ typedef const char* STRING;
                muse_core_msg_json_factory_free(__sndMsg__); \
        }while(0)
 
+/**
+ * @brief Returning the event ack message from the server to client side, adding array parameter.
+ * @param[in] api The enumeration of the corresponding api.
+ * @param[out] ret The delivered return value from the module to proxy side.
+ * @param[in] module The module info for the ipc transportation.
+ * @param[in] type The data type of the parameter.
+ * @param[in] param A parameter to be included in the message.
+ */
 #define muse_camera_msg_event1(api, event, module, type, param) \
        do{     \
                char *__sndMsg__; \
@@ -397,6 +474,15 @@ typedef const char* STRING;
                muse_core_msg_json_factory_free(__sndMsg__); \
        }while(0)
 
+/**
+ * @brief Returning the event ack message from the server to client side, adding array parameter.
+ * @param[in] api The enumeration of the corresponding api.
+ * @param[out] ret The delivered return value from the module to proxy side.
+ * @param[in] module The module info for the ipc transportation.
+ * @param[in] param1 The 1st parameter to be included in the message.
+ * @param[in] type2 The data type of the parameter.
+ * @param[in] param2 The 2nd parameter to be included in the message.
+ */
 #define muse_camera_msg_event2(api, event, module, type1, param1, type2, param2) \
        do{     \
                char *__sndMsg__; \
@@ -411,6 +497,17 @@ typedef const char* STRING;
                muse_core_msg_json_factory_free(__sndMsg__); \
        }while(0)
 
+/**
+ * @brief Returning the event ack message from the server to client side, adding array parameter.
+ * @param[in] api The enumeration of the corresponding api.
+ * @param[out] ret The delivered return value from the module to proxy side.
+ * @param[in] module The module info for the ipc transportation.
+ * @param[in] param1 The 1st parameter to be included in the message.
+ * @param[in] type2 The data type of the parameter.
+ * @param[in] param2 The 2nd parameter to be included in the message.
+ * @param[in] type3 The data type of the parameter.
+ * @param[in] param3 The 3rd parameter to be included in the message.
+ */
 #define muse_camera_msg_event3(api, event, module, type1, param1, type2, param2, type3, param3) \
        do{     \
                char *__sndMsg__; \
@@ -427,74 +524,6 @@ typedef const char* STRING;
                muse_core_msg_json_factory_free(__sndMsg__); \
        }while(0)
 
-#define muse_camera_msg_event4(api, event, module, type1, param1, type2, param2, type3, param3, type4, param4) \
-       do{     \
-               char *__sndMsg__; \
-               type1 __value1__ = (type1)param1; \
-               type2 __value2__ = (type2)param2; \
-               type3 __value3__ = (type3)param3; \
-               type4 __value4__ = (type4)param4; \
-               __sndMsg__ = muse_core_msg_json_factory_new(api, \
-                               MUSE_TYPE_INT, PARAM_EVENT, event, \
-                               MUSE_TYPE_##type1, #param1, __value1__, \
-                               MUSE_TYPE_##type2, #param2, __value2__, \
-                               MUSE_TYPE_##type3, #param3, __value3__, \
-                               MUSE_TYPE_##type4, #param4, __value4__, \
-                               0); \
-               muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
-               muse_core_msg_json_factory_free(__sndMsg__); \
-       }while(0)
-
-#define muse_camera_msg_event2_array(api, event, module, type1, param1, type2, param2, arr_param, length, datum_size) \
-       do{     \
-               char *__sndMsg__; \
-               type1 __value1__ = (type1)param1; \
-               type2 __value2__ = (type2)param2; \
-               int *__arr_value__ = (int *)arr_param; \
-               __sndMsg__ = muse_core_msg_json_factory_new(api, \
-                               MUSE_TYPE_INT, PARAM_EVENT, event, \
-                               MUSE_TYPE_##type1, #param1, __value1__, \
-                               MUSE_TYPE_##type2, #param2, __value2__, \
-                               MUSE_TYPE_INT, #length, length, \
-                               MUSE_TYPE_ARRAY, #arr_param, \
-                                       datum_size == sizeof(int)? length :  \
-                                       length / sizeof(int) + (length % sizeof(int)?1:0), \
-                                       __arr_value__, \
-                               0); \
-               muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
-               muse_core_msg_json_factory_free(__sndMsg__); \
-       }while(0)
-
-#define muse_camera_msg_event6_array(api, event, module, type1, param1, type2, param2, type3, param3, type4, param4, type5, param5, type6, param6, arr_param, length, datum_size) \
-       do{     \
-               char *__sndMsg__; \
-               type1 __value1__ = (type1)param1; \
-               type2 __value2__ = (type2)param2; \
-               type3 __value3__ = (type3)param3; \
-               type4 __value4__ = (type4)param4; \
-               type5 __value5__ = (type5)param5; \
-               type6 __value6__ = (type6)param6; \
-               int *__arr_value__ = (int *)arr_param; \
-               __sndMsg__ = muse_core_msg_json_factory_new(api, \
-                               MUSE_TYPE_INT, PARAM_EVENT, event, \
-                               MUSE_TYPE_##type1, #param1, __value1__, \
-                               MUSE_TYPE_##type2, #param2, __value2__, \
-                               MUSE_TYPE_##type3, #param3, __value3__, \
-                               MUSE_TYPE_##type4, #param4, __value4__, \
-                               MUSE_TYPE_##type5, #param5, __value5__, \
-                               MUSE_TYPE_##type6, #param6, __value6__, \
-                               MUSE_TYPE_INT, #length, length, \
-                               MUSE_TYPE_ARRAY, #arr_param, \
-                                       datum_size == sizeof(int)? length :  \
-                                       length / sizeof(int) + (length % sizeof(int)?1:0), \
-                                       __arr_value__, \
-                               0); \
-               muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
-               muse_core_msg_json_factory_free(__sndMsg__); \
-       }while(0)
-
-
-
 #ifdef __cplusplus
 }
 #endif