Adjust coding rules 76/64176/2 accepted/tizen/ivi/20160406.012801 accepted/tizen/mobile/20160406.012647 accepted/tizen/tv/20160406.012705 accepted/tizen/wearable/20160406.012733 submit/tizen/20160405.052614 submit/tizen_common/20160413.090423
authorMyungki Lee <mk5004.lee@samsung.com>
Thu, 31 Mar 2016 05:38:48 +0000 (14:38 +0900)
committerMyungki Lee <mk5004.lee@samsung.com>
Thu, 31 Mar 2016 05:38:48 +0000 (14:38 +0900)
Change-Id: I193e9a3521cfb27994abce51ecc2a62b6aa51a68
Signed-off-by: Myungki Lee <mk5004.lee@samsung.com>
include/message-port.h
include/message_port.h
include/message_port_error.h
src/inc/message-port-log.h
src/inc/message_port_log.h
src/message-port.c
src/message_port.c

index a635722..4a32929 100644 (file)
@@ -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 charlocal_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 charlocal_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);
 
 
 /**
index 0fef5f8..bfaf290 100644 (file)
@@ -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 */
index d15a2df..3a16b0c 100644 (file)
@@ -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 */
index ea6b979..2393106 100644 (file)
@@ -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__
index 76b86f1..6055516 100644 (file)
@@ -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__
index 3764a4d..a337d29 100755 (executable)
@@ -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
index 4ee9e99..69e7755 100644 (file)
@@ -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 charremote_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.");