/* * This file is part of QCluster. * * QCluster 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 of the License, or * (at your option) any later version. * * QCluster 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 QCluster; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Peter Harper * * $Id: message.h,v 1.1 2003/12/02 06:17:38 rmello Exp $ */ #include "ns.h" #include "cluster.h" #ifndef _MESSAGE_H #define _MESSAGE_H extern struct q_message_type * q_register_msg_type( int msg_type_id, char *msg_type_name, int (*construct_in_func)(void *, int, void *, int *), int (*construct_out_func)(void *, int, void *, int *)); extern void q_set_can_process_p(struct q_group *group_ptr, int can_process_p); extern void q_remote_set_can_process_val(struct q_server *remote_server_ptr, struct q_group *group_ptr, int can_process_p); extern struct q_group *q_get_group_ptr(struct q_server *server_ptr, char *group_name); extern struct q_message_type *q_get_msg_type_ptr(int msg_type_id); extern int q_queue_msg(struct q_message_type *msg_type_ptr, struct q_group *group_ptr, char * msg_id, int msg_status, void *msg_buf, int msg_size, int cur_hops); extern int q_msg_status_update(char *msg_id, struct q_group *group_ptr, int new_status); struct q_message *q_get_msg_and_set_status(struct q_group *group_ptr, int cur_status, int old_status); /* * Functions used for internal qcluster use. These functions are used * by the cluster communications functions in clustercomms file. */ extern int q_remote_queue_msg(struct q_message_type *msg_type_ptr, struct q_group *group_ptr, char * msg_id, int msg_status, void *msg_buf, int msg_size); extern int q_recover_msg(struct q_server *failed_server_ptr, struct q_message *msg_ptr); extern int q_remote_msg_status_update(char *msg_id, struct q_group *group_ptr, int new_status); extern Ns_RWLock g_msg_types_mutex; extern Tcl_HashTable g_msg_types; #endif