X-Git-Url: https://git.distorted.org.uk/~mdw/jog/blobdiff_plain/2ec1e6937048636ec6761c3a76c5bf9544278601..fc68367d2a863d41d11032fa1a6e92708c379f5f:/txport.h diff --git a/txport.h b/txport.h index ad4f338..92d4032 100644 --- a/txport.h +++ b/txport.h @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: txport.h,v 1.1 2002/01/25 19:34:45 mdw Exp $ + * $Id: txport.h,v 1.2 2002/01/30 09:27:10 mdw Exp $ * * Transport switch glue * @@ -26,14 +26,6 @@ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/*----- Revision history --------------------------------------------------* - * - * $Log: txport.h,v $ - * Revision 1.1 2002/01/25 19:34:45 mdw - * Initial revision - * - */ - #ifndef TXPORTSW_H #define TXPORTSW_H @@ -107,7 +99,8 @@ typedef struct txport_ops { const char *name; const struct txfile *fv; const char *config; - txport *(*create)(const char */*file*/, const char */*config*/); + txport *(*create)(const char */*file*/); + int (*configure)(txport */*tx*/, const char */*k*/, const char */*v*/); void *(*fetch)(void */*txv*/); ssize_t (*write)(txport */*tx*/, const void */*p*/, size_t /*sz*/); void (*destroy)(txport */*tx*/); @@ -138,6 +131,18 @@ extern const char *txconf; extern txport *tx_create(const char */*name*/, const char */*file*/, const char */*config*/); +/* --- @tx_configure@ --- * + * + * Arguments: @txport *tx@ = pointer to transport block + * @const char *config@ = config string + * + * Returns: Zero if OK, nonzero on errors. + * + * Use: Applies a configuration string to a transport. + */ + +extern int tx_configure(txport */*tx*/, const char */*config*/); + /* --- @tx_write@ --- * * * Arguments: @txport *tx@ = pointer to transport context @@ -165,6 +170,17 @@ extern int tx_vprintf(txport */*tx*/, const char */*p*/, va_list */*ap*/); extern int tx_printf(txport */*tx*/, const char */*p*/, ...); +/* --- @tx_newline@ --- * + * + * Arguments: @txport *tx@ = pointer to transport context + * + * Returns: Zero if OK, nonzero on error. + * + * Use: Writes a newline (record boundary) to the output. + */ + +int tx_newline(txport */*tx*/); + /* --- @tx_read@, @tx_readx@ --- * * * Arguments: @txport *tx@ = pointer to transport context