1 // Copyright 2013 Samsung Electronics. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
6 * @file ewk_ipc_message_internal.h
7 * @brief Custom support for ipc messages
10 #ifndef ewk_ipc_message_internal_h
11 #define ewk_ipc_message_internal_h
15 #include "ewk_context_internal.h"
21 typedef struct Ewk_Wrt_Message_Data Ewk_IPC_Wrt_Message_Data;
24 * Create new Ewk_Wrt_Message_Data object. It has to freed by the caller
25 * using ewk_ipc_wrt_message_data_del()
27 EXPORT_API Ewk_IPC_Wrt_Message_Data* ewk_ipc_wrt_message_data_new();
30 * Delete the Ewk_Wrt_Message_Object passed by the caller.
32 EXPORT_API void ewk_ipc_wrt_message_data_del(Ewk_IPC_Wrt_Message_Data* data);
37 * @return false if NULL string was provided, true otherwise
39 EXPORT_API Eina_Bool ewk_ipc_wrt_message_data_type_set(Ewk_IPC_Wrt_Message_Data *data, const char *type);
42 * Get the type of given message. The string should be released with eina_stringshare_del()
44 * @return true on success, false in case provided data structure is NULL
46 EXPORT_API Eina_Stringshare* ewk_ipc_wrt_message_data_type_get(const Ewk_IPC_Wrt_Message_Data *data);
51 * @return false if NULL string was provided, true otherwise
53 EXPORT_API Eina_Bool ewk_ipc_wrt_message_data_value_set(Ewk_IPC_Wrt_Message_Data *data, const char *value);
56 * Get message value. The string should be released with eina_stringshare_del()
58 * @return true on success, false in case provided data structure is NULL
60 EXPORT_API Eina_Stringshare* ewk_ipc_wrt_message_data_value_get(const Ewk_IPC_Wrt_Message_Data *data);
65 * @return false if NULL string was provided, true otherwise
67 EXPORT_API Eina_Bool ewk_ipc_wrt_message_data_id_set(Ewk_IPC_Wrt_Message_Data *data, const char *id);
70 * Get message ID. The string should be released with eina_stringshare_del()
72 * @return true on success, false in case provided data structure is NULL
74 EXPORT_API Eina_Stringshare* ewk_ipc_wrt_message_data_id_get(const Ewk_IPC_Wrt_Message_Data *data);
77 * Get message reference ID
79 * @return false if NULL string was provided, true otherwise
81 EXPORT_API Eina_Bool ewk_ipc_wrt_message_data_reference_id_set(Ewk_IPC_Wrt_Message_Data *data, const char *reference_id);
84 * Set message reference ID. The string should be released with eina_stringshare_del()
86 * @return true on success, false in case provided data structure is NULL
88 EXPORT_API Eina_Stringshare* ewk_ipc_wrt_message_data_reference_id_get(const Ewk_IPC_Wrt_Message_Data *data);
91 * Send IPC message to Wrt
93 * Plugins -> Wrt (Renderer->Browser)
95 EXPORT_API Eina_Bool ewk_ipc_plugins_message_send(int routingId, const Ewk_IPC_Wrt_Message_Data* data);
98 * Send IPC message to Plugins
100 * Wrt -> Plugins (Browser->Renderer)
101 * //TODO - it is always send to all rendereres - it need to be modified
103 EXPORT_API Eina_Bool ewk_ipc_wrt_message_send(Ewk_Context* context, const Ewk_IPC_Wrt_Message_Data* data);
107 * Send Synchronous IPC message to Wrt
109 * Plugins -> Wrt (answer: -> Plugins) (Renderer->Browser -> Renderer)
111 * If success the value member will be set by the handler
113 EXPORT_API Eina_Bool ewk_ipc_plugins_sync_message_send(int routingId, Ewk_IPC_Wrt_Message_Data* data);
119 #endif // ewk_ipc_message_internal_h