updates.
[silc.git] / lib / silcclient / client_internal.h
1 /*
2
3   client_internal.h
4
5   Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
6
7   Copyright (C) 1997 - 2001 Pekka Riikonen
8
9   This program is free software; you can redistribute it and/or modify
10   it under the terms of the GNU General Public License as published by
11   the Free Software Foundation; either version 2 of the License, or
12   (at your option) any later version.
13   
14   This program is distributed in the hope that it will be useful,
15   but WITHOUT ANY WARRANTY; without even the implied warranty of
16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17   GNU General Public License for more details.
18
19 */
20
21 #ifndef CLIENT_INTERNAL_H
22 #define CLIENT_INTERNAL_H
23
24 /* Internal context for connection process. This is needed as we
25    doing asynchronous connecting. */
26 typedef struct {
27   SilcClient client;
28   SilcClientConnection conn;
29   SilcTask task;
30   int sock;
31   char *host;
32   int port;
33   int tries;
34   void *context;
35 } SilcClientInternalConnectContext;
36
37 /* Structure to hold ping time information. Every PING command will 
38    add entry of this structure and is removed after reply to the ping
39    as been received. */
40 struct SilcClientPingStruct {
41   time_t start_time;
42   void *dest_id;
43   char *dest_name;
44 };
45
46 /* Structure to hold away messages set by user. This is mainly created
47    for future extensions where away messages could be set according filters
48    such as nickname and hostname. For now only one away message can 
49    be set in one connection. */
50 struct SilcClientAwayStruct {
51   char *away;
52   struct SilcClientAwayStruct *next;
53 };
54
55 /* Protypes */
56
57 SILC_TASK_CALLBACK_GLOBAL(silc_client_packet_process);
58 int silc_client_packet_send_real(SilcClient client,
59                                  SilcSocketConnection sock,
60                                  bool force_send);
61
62 #endif