Merged silc_1_0_branch to trunk.
[silc.git] / apps / irssi / src / silc / core / client_ops.h
1 /*
2
3   client_ops.h
4
5   Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
6
7   Copyright (C) 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_OPS_H
22 #define CLIENT_OPS_H
23
24 #include "silc-servers.h"
25
26 void silc_say(SilcClient client, SilcClientConnection conn,
27               SilcClientMessageType type, char *msg, ...);
28 void silc_say_error(char *msg, ...);
29 void silc_channel_message(SilcClient client, SilcClientConnection conn,
30                           SilcClientEntry sender,
31                           SilcChannelEntry channel,
32                           SilcMessagePayload payload,
33                           SilcChannelPrivateKey key,
34                           SilcMessageFlags flags,
35                           const unsigned char *message,
36                           SilcUInt32 message_len);
37 void silc_private_message(SilcClient client, SilcClientConnection conn,
38                           SilcClientEntry sender,
39                           SilcMessagePayload payload,
40                           SilcMessageFlags flags,
41                           const unsigned char *message,
42                           SilcUInt32 message_len);
43 void silc_notify(SilcClient client, SilcClientConnection conn,
44                  SilcNotifyType type, ...);
45 void silc_command(SilcClient client, SilcClientConnection conn,
46                   SilcClientCommandContext cmd_context, bool success,
47                   SilcCommand command, SilcStatus status);
48 void silc_command_reply(SilcClient client, SilcClientConnection conn,
49                         SilcCommandPayload cmd_payload, bool success,
50                         SilcCommand command, SilcStatus status, ...);
51 void silc_connect(SilcClient client, SilcClientConnection conn,
52                   SilcClientConnectionStatus status);
53 void silc_disconnect(SilcClient client, SilcClientConnection conn,
54                      SilcStatus status, const char *message);
55 void silc_ask_passphrase(SilcClient client, SilcClientConnection conn,
56                          SilcAskPassphrase completion, void *context);
57 void silc_verify_public_key(SilcClient client, SilcClientConnection conn,
58                             SilcSocketType conn_type, unsigned char *pk,
59                             SilcUInt32 pk_len, SilcSKEPKType pk_type,
60                             SilcVerifyPublicKey completion, void *context);
61 void silc_get_auth_method(SilcClient client, SilcClientConnection conn,
62                           char *hostname, SilcUInt16 port,
63                           SilcGetAuthMeth completion, void *context);
64 void silc_failure(SilcClient client, SilcClientConnection conn,
65                   SilcProtocol protocol, void *failure);
66 bool silc_key_agreement(SilcClient client, SilcClientConnection conn,
67                         SilcClientEntry client_entry, const char *hostname,
68                         SilcUInt16 port, SilcKeyAgreementCallback *completion,
69                         void **context);
70 void silc_ftp(SilcClient client, SilcClientConnection conn,
71               SilcClientEntry client_entry, SilcUInt32 session_id,
72               const char *hostname, SilcUInt16 port);
73 void
74 silc_detach(SilcClient client, SilcClientConnection conn,
75             const unsigned char *detach_data, SilcUInt32 detach_data_len);
76 char *
77 silc_unescape_data(const char *escaped_data, SilcUInt32 *length);
78 char *
79 silc_escape_data(const char *data, SilcUInt32 len);
80
81 char *
82 silc_get_session_filename(SILC_SERVER_REC *server);
83
84 #endif