src/irc_conn.h
changeset 37 4fe4a3c4496e
parent 29 3f0f2898fea3
child 45 71e65564afd2
equal deleted inserted replaced
36:791d7a5532e2 37:4fe4a3c4496e
    53     struct irc_conn_callbacks callbacks;
    53     struct irc_conn_callbacks callbacks;
    54 
    54 
    55     /** Opaque argument for callbacks */
    55     /** Opaque argument for callbacks */
    56     void *cb_arg;
    56     void *cb_arg;
    57 
    57 
       
    58     /** @group flags @{ */
    58     /** Registration request sent */
    59     /** Registration request sent */
    59     bool registering;
    60     bool registering;
    60 
    61 
    61     /* Registered (as in, we have a working nickname)? */
    62     /** Registered (as in, we have a working nickname)? */
    62     bool registered;
    63     bool registered;
       
    64     
       
    65     // @}
       
    66     
       
    67     /** Our current real nickname */
       
    68     char *nickname;
    63 
    69 
    64     /* Command handlers */
    70     /** Command handlers */
    65     STAILQ_HEAD(irc_conn_handlers, irc_cmd_chain) handlers;
    71     irc_cmd_handlers_t handlers;
    66 };
    72 };
    67 
    73 
    68 /**
    74 /**
    69  * Create a new irc_conn using the given sock_stream, which should be connected to an IRC server.
    75  * Create a new irc_conn using the given sock_stream, which should be connected to an IRC server.
    70  *
    76  *
    96  * XXX: rename to not conflict with irc_conn_register()
   102  * XXX: rename to not conflict with irc_conn_register()
    97  *
   103  *
    98  * @param chain the array of irc_cmd_handler structs, terminated with a NULL entry
   104  * @param chain the array of irc_cmd_handler structs, terminated with a NULL entry
    99  * @param arg the context argument to use for the callbacks
   105  * @param arg the context argument to use for the callbacks
   100  */
   106  */
   101 err_t irc_conn_register_handler_chain (struct irc_conn *conn, struct irc_cmd_handler *handlers, void *arg);
   107 err_t irc_conn_add_cmd_handlers (struct irc_conn *conn, struct irc_cmd_handler *handlers, void *arg);
   102 
   108 
   103 /**
   109 /**
   104  * Register with the IRC server using the given registration info (initial nickname etc.)
   110  * Register with the IRC server using the given registration info (initial nickname etc.)
   105  *
   111  *
   106  * This sends the NICK/USER command sequence.
   112  * This sends the NICK/USER command sequence.