From d086387464ba40c1aa53889fed5d98fe7d251b2f Mon Sep 17 00:00:00 2001 From: Myungki Lee Date: Thu, 31 Mar 2016 14:38:48 +0900 Subject: [PATCH] Adjust coding rules Change-Id: I193e9a3521cfb27994abce51ecc2a62b6aa51a68 Signed-off-by: Myungki Lee --- include/message-port.h | 50 ++++++++++++++++++++++---------------------- include/message_port.h | 3 +-- include/message_port_error.h | 35 +++++++++++++++---------------- src/inc/message-port-log.h | 32 ++++++++++++++-------------- src/inc/message_port_log.h | 32 ++++++++++++++-------------- src/message-port.c | 31 +++++++++++++-------------- src/message_port.c | 6 +++--- 7 files changed, 93 insertions(+), 96 deletions(-) diff --git a/include/message-port.h b/include/message-port.h index a635722..4a32929 100644 --- a/include/message-port.h +++ b/include/message-port.h @@ -1,19 +1,19 @@ -// -// Open Service Platform -// Copyright (c) 2012 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. -// +/* + * Open Service Platform + * Copyright (c) 2012 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 __APPFW_MESSAGE_PORT_H__ @@ -45,7 +45,7 @@ extern "C" { * @remarks @a data must be released with bundle_free() by you * @remark @a remote_app_id and @a remote_port will be set if the remote application sends a bidirectional message, otherwise they are NULL. */ -typedef void (*messageport_message_cb)(int id, const char* remote_app_id, const char* remote_port, bool trusted_message, bundle* data, void* user_data); +typedef void (*messageport_message_cb)(int id, const char *remote_app_id, const char *remote_port, bool trusted_message, bundle *data, void *user_data); /** * @brief Unregisters the local message port. @n @@ -73,7 +73,7 @@ EXPORT_API int messageport_unregister_local_port(int local_port_id, bool trusted * @retval #MESSAGEPORT_ERROR_IO_ERROR Internal I/O error * @retval #MESSAGEPORT_ERROR_RESOURCE_UNAVAILABLE Resource temporarily unavailable */ -EXPORT_API 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 @@ -89,7 +89,7 @@ EXPORT_API int messageport_register_local_port(const char* local_port, messagepo * @retval #MESSAGEPORT_ERROR_IO_ERROR Internal I/O error * @retval #MESSAGEPORT_ERROR_RESOURCE_UNAVAILABLE Resource temporarily unavailable */ -EXPORT_API 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. @@ -104,7 +104,7 @@ EXPORT_API int messageport_register_trusted_local_port(const char* local_port, m * @retval #MESSAGEPORT_ERROR_IO_ERROR Internal I/O error * @retval #MESSAGEPORT_ERROR_RESOURCE_UNAVAILABLE Resource temporarily unavailable */ -EXPORT_API 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. @@ -120,7 +120,7 @@ EXPORT_API int messageport_check_remote_port(const char* remote_app_id, const ch * @retval #MESSAGEPORT_ERROR_IO_ERROR Internal I/O error * @retval #MESSAGEPORT_ERROR_RESOURCE_UNAVAILABLE Resource temporarily unavailable */ -EXPORT_API 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. @@ -149,7 +149,7 @@ EXPORT_API int messageport_check_trusted_remote_port(const char* remote_app_id, * bundle_free(b); * @endcode */ -EXPORT_API 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 @@ -168,7 +168,7 @@ EXPORT_API int messageport_send_message(const char* remote_app_id, const char* r * @retval #MESSAGEPORT_ERROR_IO_ERROR Internal I/O error * @retval #MESSAGEPORT_ERROR_RESOURCE_UNAVAILABLE Resource temporarily unavailable */ -EXPORT_API 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. @@ -207,7 +207,7 @@ EXPORT_API int messageport_send_trusted_message(const char* remote_app_id, const * bundle_free(b); * } */ -EXPORT_API 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. @@ -227,7 +227,7 @@ EXPORT_API int messageport_send_bidirectional_message(int id, const char* remote * @retval #MESSAGEPORT_ERROR_IO_ERROR Internal I/O error * @retval #MESSAGEPORT_ERROR_RESOURCE_UNAVAILABLE Resource temporarily unavailable */ -EXPORT_API 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); /** diff --git a/include/message_port.h b/include/message_port.h index 0fef5f8..bfaf290 100644 --- a/include/message_port.h +++ b/include/message_port.h @@ -43,8 +43,7 @@ extern "C" { * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -typedef enum -{ +typedef enum { MESSAGE_PORT_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ MESSAGE_PORT_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< Internal I/O error */ MESSAGE_PORT_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */ diff --git a/include/message_port_error.h b/include/message_port_error.h index d15a2df..3a16b0c 100644 --- a/include/message_port_error.h +++ b/include/message_port_error.h @@ -1,19 +1,19 @@ -// -// Open Service Platform -// Copyright (c) 2012 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. -// +/* + * Open Service Platform + * Copyright (c) 2012 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 __APPFW_MESSAGE_PORT_ERROR_H__ @@ -24,8 +24,7 @@ /** * @brief Enumerations of error code for Application. */ -typedef enum -{ +typedef enum { MESSAGEPORT_ERROR_NONE = 0, /**< Successful */ MESSAGEPORT_ERROR_IO_ERROR = -EIO, /**< Internal I/O error */ MESSAGEPORT_ERROR_OUT_OF_MEMORY = -ENOMEM, /**< Out of memory */ diff --git a/src/inc/message-port-log.h b/src/inc/message-port-log.h index ea6b979..2393106 100644 --- a/src/inc/message-port-log.h +++ b/src/inc/message-port-log.h @@ -1,19 +1,19 @@ -// -// Open Service Platform -// Copyright (c) 2012 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. -// +/* + * Open Service Platform + * Copyright (c) 2012 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 __APPFW_MESSAGE_PORT_LOG_H__ diff --git a/src/inc/message_port_log.h b/src/inc/message_port_log.h index 76b86f1..6055516 100644 --- a/src/inc/message_port_log.h +++ b/src/inc/message_port_log.h @@ -1,19 +1,19 @@ -// -// Open Service Platform -// Copyright (c) 2012 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. -// +/* + * Open Service Platform + * Copyright (c) 2012 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 __TIZEN_APPFW_MESSAGE_PORT_LOG_H__ diff --git a/src/message-port.c b/src/message-port.c index 3764a4d..a337d29 100755 --- a/src/message-port.c +++ b/src/message-port.c @@ -1,20 +1,19 @@ - /* - Message Port - Copyright (c) 2015 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. -*/ + * Message Port + * Copyright (c) 2015 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. + */ /** * @file message-port.cpp diff --git a/src/message_port.c b/src/message_port.c index 4ee9e99..69e7755 100644 --- a/src/message_port.c +++ b/src/message_port.c @@ -159,7 +159,7 @@ int message_port_unregister_trusted_local_port(int trusted_local_port_id) return convert_to_tizen_error((messageport_error_e)res); } -int message_port_check_remote_port(const char* remote_app_id, const char *remote_port, bool* exist) +int message_port_check_remote_port(const char *remote_app_id, const char *remote_port, bool *exist) { if (remote_app_id == NULL || remote_port == NULL) { _LOGE("[MESSAGE_PORT_ERROR_INVALID_PARAMETER] NULL value is not allowed."); @@ -169,7 +169,7 @@ int message_port_check_remote_port(const char* remote_app_id, const char *remote return convert_to_tizen_error((messageport_error_e)messageport_check_remote_port(remote_app_id, remote_port, exist)); } -int message_port_check_trusted_remote_port(const char* remote_app_id, const char *remote_port, bool *exist) +int message_port_check_trusted_remote_port(const char *remote_app_id, const char *remote_port, bool *exist) { if (remote_app_id == NULL || remote_port == NULL) { _LOGE("[MESSAGE_PORT_ERROR_INVALID_PARAMETER] NULL value is not allowed."); @@ -227,7 +227,7 @@ int message_port_send_message_with_local_port(const char *remote_app_id, const c return convert_to_tizen_error((messageport_error_e)messageport_send_bidirectional_message(local_port_id, remote_app_id, remote_port, message)); } -int message_port_send_trusted_message_with_local_port(const char* remote_app_id, const char *remote_port, bundle* message, int local_port_id) +int message_port_send_trusted_message_with_local_port(const char *remote_app_id, const char *remote_port, bundle *message, int local_port_id) { if (remote_app_id == NULL || remote_port == NULL || message == NULL) { _LOGE("[MESSAGE_PORT_ERROR_INVALID_PARAMETER] NULL value is not allowed."); -- 2.7.4