10 #ifndef PCMK__CRM_COMMON_MESSAGES_INTERNAL__H 11 #define PCMK__CRM_COMMON_MESSAGES_INTERNAL__H 14 #include <libxml/tree.h> 68 #define pcmk__set_request_flags(request, flags_to_set) do { \ 69 (request)->flags = pcmk__set_flags_as(__func__, __LINE__, \ 70 LOG_TRACE, "Request", "message", (request)->flags, \ 71 (flags_to_set), #flags_to_set); \ 111 #define pcmk__new_message(server, reply_to, sender_system, \ 112 recipient_node, recipient_system, task, data) \ 113 pcmk__new_message_as(__func__, (server), (reply_to), \ 114 (sender_system), (recipient_node), \ 115 (recipient_system), (task), (data)) 141 #define pcmk__new_request(server, sender_system, recipient_node, \ 142 recipient_system, task, data) \ 143 pcmk__new_message_as(__func__, (server), NULL, \ 144 (sender_system), (recipient_node), \ 145 (recipient_system), (task), (data)) 162 #define pcmk__new_reply(original_request, data) \ 163 pcmk__new_reply_as(__func__, (original_request), (data)) 166 const char *reply_to,
const char *sender_system,
167 const char *recipient_node,
168 const char *recipient_system,
const char *task,
187 static inline const char *
190 if ((request != NULL) && (request->
ipc_client != NULL)) {
192 }
else if ((request != NULL) && (request->
peer != NULL)) {
208 static inline const char *
211 if ((request != NULL) && (request->
ipc_client != NULL)) {
213 }
else if ((request != NULL) && (request->
peer != NULL)) {
214 return request->
peer;
216 return "(unspecified)";
224 #endif // PCMK__CRM_COMMON_MESSAGES_INTERNAL__H
GHashTable * pcmk__register_handlers(const pcmk__server_command_t handlers[])
void pcmk__reset_request(pcmk__request_t *request)
xmlNode * pcmk__process_request(pcmk__request_t *request, GHashTable *handlers)
xmlNode * pcmk__new_reply_as(const char *origin, const xmlNode *original_request, xmlNode *data)
pcmk__client_t * ipc_client
pcmk__action_result_t result
pcmk_ipc_server
Available IPC interfaces.
xmlNode * pcmk__new_message_as(const char *origin, enum pcmk_ipc_server server, const char *reply_to, const char *sender_system, const char *recipient_node, const char *recipient_system, const char *task, xmlNode *data)
const char * pcmk__client_name(const pcmk__client_t *c)