#ifndef __DCTC_COM_H__ #define __DCTC_COM_H__ #include "lmp.h" typedef struct { int dctc_fd; /* socket to use to communicate with dctc */ gint tag_read; /* if dctc_fd!=-1 and this value !=-1, it is a tag to */ /* use with gdk_input_* for GDK_INPUT_READ event */ gint tag_write; /* if dctc_fd!=-1 and this value !=-1, it is a tag to */ /* use with gdk_input_* for GDK_INPUT_WRITE event */ GPtrArray *write_q; /* this array contains the list of all strings */ /* to send to dctc */ GString *incoming_data; /* this string contains partially received data */ LMP_ENTRY *user_info_lmp; /* LMP containing hub user information */ } DCTC_COM; /**********************************************************/ /* allocate a new DCTC_COM structure for the given socket */ /**********************************************************/ /* running_base_path = "$HOME/.dctc/dctc-xxxxxxxx-ip" */ /******************************************************/ DCTC_COM *create_new_dctc_com(int sock_fd, const char *running_base_path); /***************************************************/ /* close socket and free memory used by a DCTC_COM */ /***************************************************/ void close_and_free_dctc_com(DCTC_COM *cm); #endif