include/commands.h
changeset 89 c190335dbab3
parent 88 9b5c2357fad7
child 90 3102f7def87b
equal deleted inserted replaced
88:9b5c2357fad7 89:c190335dbab3
     1 #ifndef __COMMANDS_H__
       
     2 #define __COMMANDS_H__ 1
       
     3 
       
     4 #include <glib.h>
       
     5 
       
     6 #include "config.h"
       
     7 
       
     8 // Command structure
       
     9 typedef struct {
       
    10   char name[32];
       
    11   const char *help;
       
    12   guint completion_flags[2];
       
    13   void (*func)(char *);
       
    14 #ifdef MODULES_ENABLE
       
    15   gpointer userdata;
       
    16 #endif
       
    17 } cmd;
       
    18 
       
    19 void cmd_init(void);
       
    20 cmd *cmd_get(const char *command);
       
    21 int  process_line(const char *line);
       
    22 int  process_command(const char *line, guint iscmd);
       
    23 char *expandalias(const char *line);
       
    24 #ifdef MODULES_ENABLE
       
    25 void cmd_deinit(void);
       
    26 gpointer cmd_del(const char *name);
       
    27 void cmd_add(const char *name, const char *help, guint flags1, guint flags2, void (*f)(char*), gpointer userdata);
       
    28 #endif
       
    29 
       
    30 extern char *mcabber_version(void);
       
    31 extern void mcabber_set_terminate_ui(void);
       
    32 
       
    33 void cmd_room_whois(gpointer bud, char *nick_locale, guint interactive);
       
    34 void cmd_room_leave(gpointer bud, char *arg);
       
    35 void cmd_setstatus(const char *recipient, const char *arg);
       
    36 
       
    37 #endif /* __COMMANDS_H__ */
       
    38 
       
    39 /* vim: set expandtab cindent cinoptions=>2\:2(0:  For Vim users... */