diff options
author | Sunwook Bae <sunwook45.bae@samsung.com> | 2013-08-12 20:11:45 +0900 |
---|---|---|
committer | Sunwook Bae <sunwook45.bae@samsung.com> | 2013-08-12 20:11:45 +0900 |
commit | 815c0af8821b9e6aed05ef514e2545f611511418 (patch) | |
tree | 3b797cfaed91fa31f61fd1c31dbfaba8f8487189 | |
parent | 483c7d7e659b87528a83f18383bd799c6ecdc74e (diff) | |
download | message-port-815c0af8821b9e6aed05ef514e2545f611511418.tar.gz message-port-815c0af8821b9e6aed05ef514e2545f611511418.tar.bz2 message-port-815c0af8821b9e6aed05ef514e2545f611511418.zip |
Change the default visibility to hidden
Change-Id: Ief04ded934465949d396c994516306ef72ed3089
Signed-off-by: Sunwook Bae <sunwook45.bae@samsung.com>
-rwxr-xr-x | CMakeLists.txt | 4 | ||||
-rwxr-xr-x | include/message-port.h | 26 |
2 files changed, 18 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 617689a..7eedc89 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,11 +36,11 @@ ENDFOREACH(flag) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wall" ) ## SET C COMPILER FLAGS -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror") +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror -fvisibility=hidden") SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") ## SET CPP COMPILER FLAGS -SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}") +SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden") IF("${ARCH}" STREQUAL "arm") ADD_DEFINITIONS("-DTARGET") diff --git a/include/message-port.h b/include/message-port.h index 4c84da2..a71ef93 100755 --- a/include/message-port.h +++ b/include/message-port.h @@ -19,6 +19,12 @@ #ifndef __APPFW_MESSAGE_PORT_H__ #define __APPFW_MESSAGE_PORT_H__ +#ifdef __GNUC__ +# define EXPORT_API __attribute__((visibility("default"))) +#else +# define EXPORT_API +#endif + #include <bundle.h> #ifdef __cplusplus @@ -66,7 +72,7 @@ typedef void (*messageport_message_cb)(int id, const char* remote_app_id, const * @retval #MESSAGEPORT_ERROR_OUT_OF_MEMORY Out of memory * @retval #MESSAGEPORT_ERROR_IO_ERROR Internal I/O error */ -int messageport_register_local_port(const char* local_port, messageport_message_cb callback); +EXPORT_API int messageport_register_local_port(const char* local_port, messageport_message_cb callback); /** * @brief Registers the trusted local message port. @n @@ -81,7 +87,7 @@ int messageport_register_local_port(const char* local_port, messageport_message_ * @retval #MESSAGEPORT_ERROR_OUT_OF_MEMORY Out of memory * @retval #MESSAGEPORT_ERROR_IO_ERROR Internal I/O error */ -int messageport_register_trusted_local_port(const char* local_port, messageport_message_cb callback); +EXPORT_API int messageport_register_trusted_local_port(const char* local_port, messageport_message_cb callback); /** * @brief Checks if the message port of a remote application is registered. @@ -95,7 +101,7 @@ int messageport_register_trusted_local_port(const char* local_port, messageport_ * @retval #MESSAGEPORT_ERROR_OUT_OF_MEMORY Out of memory * @retval #MESSAGEPORT_ERROR_IO_ERROR Internal I/O error */ -int messageport_check_remote_port(const char* remote_app_id, const char *remote_port, bool* exist); +EXPORT_API int messageport_check_remote_port(const char* remote_app_id, const char *remote_port, bool* exist); /** * @brief Checks if the trusted message port of a remote application is registered. @@ -110,7 +116,7 @@ int messageport_check_remote_port(const char* remote_app_id, const char *remote_ * @retval #MESSAGEPORT_ERROR_CERTIFICATE_NOT_MATCH The remote application is not signed with the same certificate * @retval #MESSAGEPORT_ERROR_IO_ERROR Internal I/O error */ -int messageport_check_trusted_remote_port(const char* remote_app_id, const char *remote_port, bool* exist); +EXPORT_API int messageport_check_trusted_remote_port(const char* remote_app_id, const char *remote_port, bool* exist); /** * @brief Sends a message to the message port of a remote application. @@ -138,7 +144,7 @@ int messageport_check_trusted_remote_port(const char* remote_app_id, const char * bundle_free(b); * @endcode */ -int messageport_send_message(const char* remote_app_id, const char* remote_port, bundle* message); +EXPORT_API int messageport_send_message(const char* remote_app_id, const char* remote_port, bundle* message); /** * @brief Sends a trusted message to the message port of a remote application. @n @@ -156,7 +162,7 @@ int messageport_send_message(const char* remote_app_id, const char* remote_port, * @retval #MESSAGEPORT_ERROR_MAX_EXCEEDED The size of message has exceeded the maximum limit * @retval #MESSAGEPORT_ERROR_IO_ERROR Internal I/O error */ -int messageport_send_trusted_message(const char* remote_app_id, const char* remote_port, bundle* message); +EXPORT_API int messageport_send_trusted_message(const char* remote_app_id, const char* remote_port, bundle* message); /** * @brief Sends a message to the message port of a remote application. This method is used for the bidirectional communication. @@ -194,7 +200,7 @@ int messageport_send_trusted_message(const char* remote_app_id, const char* remo * bundle_free(b); * } */ -int messageport_send_bidirectional_message(int id, const char* remote_app_id, const char* remote_port, bundle* data); +EXPORT_API int messageport_send_bidirectional_message(int id, const char* remote_app_id, const char* remote_port, bundle* data); /** * @brief Sends a trusted message to the message port of a remote application. This method is used for the bidirectional communication. @@ -213,7 +219,7 @@ int messageport_send_bidirectional_message(int id, const char* remote_app_id, co * @retval #MESSAGEPORT_ERROR_MAX_EXCEEDED The size of message has exceeded the maximum limit * @retval #MESSAGEPORT_ERROR_IO_ERROR Internal I/O error */ -int messageport_send_bidirectional_trusted_message(int id, const char* remote_app_id, const char* remote_port, bundle* data); +EXPORT_API int messageport_send_bidirectional_trusted_message(int id, const char* remote_app_id, const char* remote_port, bundle* data); /** @@ -227,7 +233,7 @@ int messageport_send_bidirectional_trusted_message(int id, const char* remote_ap * @retval #MESSAGEPORT_ERROR_OUT_OF_MEMORY Out of memory * @remarks @a name must be released with free() by you */ -int messageport_get_local_port_name(int id, char **name); +EXPORT_API int messageport_get_local_port_name(int id, char **name); /** * @brief Checks if the local message port is trusted. @@ -239,7 +245,7 @@ int messageport_get_local_port_name(int id, char **name); * @retval #MESSAGEPORT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MESSAGEPORT_ERROR_OUT_OF_MEMORY Out of memory */ -int messageport_check_trusted_local_port(int id, bool *trusted); +EXPORT_API int messageport_check_trusted_local_port(int id, bool *trusted); /** * @} |