-//
-// 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__
* @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
* @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
* @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.
* @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.
* @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.
* 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
* @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.
* 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.
* @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);
/**
*
* @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 */
-//
-// 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__
/**
* @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 */
-//
-// 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__
-//
-// 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__
-
/*
- 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
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.");
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.");
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.");