Merged silc_1_0_branch to trunk.
[silc.git] / apps / irssi / src / silc / core / silc-cmdqueue.h
1 #ifndef __SILC_CMDQUEUE_H
2 #define __SILC_CMDQUEUE_H
3
4 /* wrappers for queuing commands:
5
6    basically the same as the correspondening silc_client_* functions 
7    with one additional parameter:
8    
9    bool sync            - command must be executed in sync (i.e. no
10                           other command may be send before completion)
11    */
12
13 bool silc_queue_command_call(SilcClient client, 
14                                 SilcClientConnection conn,
15                                 const char *command_line, ...);
16
17 #define silc_queue_command_pending silc_client_command_pending
18
19 /*
20    enable and/or disable command queueing. If command queueing is
21    disabled, all silc_queue_* calls will immedially call silc_client_*
22    functions. If queueing is enabled, all silc_queue_* calls don't have
23    any effect until queueing is disabled again.
24
25    queueing is enabled and disabled for each SilcClientConnection
26    seperatly.
27
28    If queueing is enabled, silc_queue_flush will send all currently
29    queued commands but won't disable queueing.
30  */
31 void silc_queue_enable(SilcClientConnection conn);
32 void silc_queue_disable(SilcClientConnection conn);
33 void silc_queue_flush(SilcClientConnection conn);
34
35 /* returns true if queueing is enabled */
36 bool silc_queue_get_state(SilcClientConnection conn);
37
38 void silc_queue_init(void);
39 void silc_queue_deinit(void);
40
41 #endif