diff --git a/include/crm/common/ipc.h b/include/crm/common/ipc.h index e1863b9635..492e812b6a 100644 --- a/include/crm/common/ipc.h +++ b/include/crm/common/ipc.h @@ -1,55 +1,66 @@ -/* $Id: ipc.h,v 1.3 2004/10/21 18:25:43 andrew Exp $ */ +/* $Id: ipc.h,v 1.4 2004/12/05 16:04:42 andrew Exp $ */ /* * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef CRM_COMMON_IPC__H #define CRM_COMMON_IPC__H #include #include #include #include -typedef struct _crmd_client +typedef struct crmd_client_s { char *sub_sys; char *uuid; char *table_key; IPC_Channel *client_channel; GCHSource *client_source; } crmd_client_t; + extern gboolean send_ipc_message(IPC_Channel *ipc_client, IPC_Message *msg); extern void default_ipc_connection_destroy(gpointer user_data); extern xmlNodePtr find_xml_in_ipcmessage(IPC_Message *msg, gboolean do_free); extern gboolean send_xmlipc_message(IPC_Channel *ipc_client, xmlNodePtr msg); +extern int init_server_ipc_comms( + char *channel_name, + gboolean (*channel_client_connect)( + IPC_Channel *newclient, gpointer user_data), + void (*channel_connection_destroy)(gpointer user_data)); + +/* extern GCHSource *init_client_ipc_comms( */ extern IPC_Channel *init_client_ipc_comms( - const char *child, + const char *channel_name, gboolean (*dispatch)(IPC_Channel* source_data, gpointer user_data), - crmd_client_t *user_data); + void *client_data); + +extern IPC_Channel *init_client_ipc_comms_nodispatch(const char *channel_name); extern gboolean subsystem_msg_dispatch(IPC_Channel *sender, void *user_data); -#endif +extern IPC_WaitConnection *wait_channel_init(char daemonsocket[]); +#endif