Sun, 08 Aug 2004 05:38:02 +0000
[gaim-migrate @ 10574]
Remove multi.h
| 8849 | 1 | /* |
| 2 | ||
| 3 | silcgaim.h | |
| 4 | ||
| 5 | Author: Pekka Riikonen <priikone@silcnet.org> | |
| 6 | ||
| 7 | Copyright (C) 2004 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; version 2 of the License. | |
| 12 | ||
| 13 | This program is distributed in the hope that it will be useful, | |
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 16 | GNU General Public License for more details. | |
| 17 | ||
| 18 | */ | |
| 19 | ||
| 20 | #ifndef SILCGAIM_H | |
| 21 | #define SILCGAIM_H | |
| 22 | ||
| 23 | /* Gaim includes */ | |
| 24 | #include "internal.h" | |
| 25 | #include "account.h" | |
| 26 | #include "accountopt.h" | |
| 27 | #include "debug.h" | |
| 28 | #include "notify.h" | |
| 29 | #include "prpl.h" | |
| 30 | #include "request.h" | |
| 31 | #include "server.h" | |
| 32 | #include "util.h" | |
| 33 | #include "roomlist.h" | |
| 34 | #include "ft.h" | |
| 9272 | 35 | #include "cmds.h" |
| 8849 | 36 | |
| 37 | /* Default public and private key file names */ | |
| 38 | #define SILCGAIM_PUBLIC_KEY_NAME "public_key.pub" | |
| 39 | #define SILCGAIM_PRIVATE_KEY_NAME "private_key.prv" | |
| 40 | ||
| 41 | /* Default settings for creating key pair */ | |
| 42 | #define SILCGAIM_DEF_PKCS "rsa" | |
| 43 | #define SILCGAIM_DEF_PKCS_LEN 2048 | |
| 44 | ||
| 45 | #define SILCGAIM_PRVGRP 0x001fffff | |
| 46 | ||
| 47 | typedef struct { | |
| 48 | unsigned long id; | |
| 49 | const char *channel; | |
| 50 | unsigned long chid; | |
| 51 | const char *parentch; | |
| 52 | SilcChannelPrivateKey key; | |
| 53 | } *SilcGaimPrvgrp; | |
| 54 | ||
| 55 | /* The SILC Gaim plugin context */ | |
| 56 | typedef struct SilcGaimStruct { | |
| 57 | SilcClient client; | |
| 58 | SilcClientConnection conn; | |
| 59 | ||
| 60 | guint scheduler; | |
| 61 | GaimConnection *gc; | |
| 62 | GaimAccount *account; | |
| 63 | unsigned long channel_ids; | |
| 64 | GList *grps; | |
| 65 | ||
| 66 | char *motd; | |
| 67 | GaimRoomlist *roomlist; | |
| 68 | ||
| 69 | unsigned int detaching : 1; | |
| 70 | unsigned int resuming : 1; | |
| 71 | unsigned int roomlist_canceled : 1; | |
| 72 | unsigned int chpk : 1; | |
| 73 | } *SilcGaim; | |
| 74 | ||
| 75 | ||
| 76 | gboolean silcgaim_check_silc_dir(GaimConnection *gc); | |
| 77 | void silcgaim_chat_join_done(SilcClient client, | |
| 78 | SilcClientConnection conn, | |
| 79 | SilcClientEntry *clients, | |
| 80 | SilcUInt32 clients_count, | |
| 81 | void *context); | |
| 82 | const char *silcgaim_silcdir(void); | |
| 83 | const char *silcgaim_session_file(const char *account); | |
| 84 | void silcgaim_verify_public_key(SilcClient client, SilcClientConnection conn, | |
| 85 | const char *name, SilcSocketType conn_type, | |
| 86 | unsigned char *pk, SilcUInt32 pk_len, | |
| 87 | SilcSKEPKType pk_type, | |
| 88 | SilcVerifyPublicKey completion, void *context); | |
| 9038 | 89 | GList *silcgaim_buddy_menu(GaimBuddy *buddy); |
|
9288
a19f73556084
[gaim-migrate @ 10091]
Mark Doliner <markdoliner@pidgin.im>
parents:
9272
diff
changeset
|
90 | void silcgaim_add_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group); |
|
a19f73556084
[gaim-migrate @ 10091]
Mark Doliner <markdoliner@pidgin.im>
parents:
9272
diff
changeset
|
91 | void silcgaim_remove_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group); |
| 8849 | 92 | void silcgaim_buddy_keyagr_request(SilcClient client, |
| 93 | SilcClientConnection conn, | |
| 94 | SilcClientEntry client_entry, | |
| 95 | const char *hostname, SilcUInt16 port); | |
| 96 | void silcgaim_idle_set(GaimConnection *gc, int idle); | |
| 97 | char *silcgaim_tooltip_text(GaimBuddy *b); | |
| 98 | char *silcgaim_status_text(GaimBuddy *b); | |
| 99 | gboolean silcgaim_ip_is_private(const char *ip); | |
|
9466
b6425eab60ca
[gaim-migrate @ 10291]
Daniel Atallah <datallah@pidgin.im>
parents:
9353
diff
changeset
|
100 | void silcgaim_ftp_send_file(GaimConnection *gc, const char *name, const char *file); |
| 8849 | 101 | void silcgaim_ftp_request(SilcClient client, SilcClientConnection conn, |
| 102 | SilcClientEntry client_entry, SilcUInt32 session_id, | |
| 103 | const char *hostname, SilcUInt16 port); | |
| 104 | void silcgaim_show_public_key(SilcGaim sg, | |
| 105 | const char *name, SilcPublicKey public_key, | |
| 106 | GCallback callback, void *context); | |
| 107 | void silcgaim_get_info(GaimConnection *gc, const char *who); | |
| 108 | SilcAttributePayload | |
| 109 | silcgaim_get_attr(SilcDList attrs, SilcAttribute attribute); | |
| 110 | void silcgaim_get_umode_string(SilcUInt32 mode, char *buf, | |
| 111 | SilcUInt32 buf_size); | |
| 112 | void silcgaim_get_chmode_string(SilcUInt32 mode, char *buf, | |
| 113 | SilcUInt32 buf_size); | |
| 114 | void silcgaim_get_chumode_string(SilcUInt32 mode, char *buf, | |
| 115 | SilcUInt32 buf_size); | |
| 116 | GList *silcgaim_chat_info(GaimConnection *gc); | |
| 9038 | 117 | GList *silcgaim_chat_menu(GaimChat *); |
| 8849 | 118 | void silcgaim_chat_join(GaimConnection *gc, GHashTable *data); |
| 119 | void silcgaim_chat_invite(GaimConnection *gc, int id, const char *msg, | |
| 120 | const char *name); | |
| 121 | void silcgaim_chat_leave(GaimConnection *gc, int id); | |
| 122 | int silcgaim_chat_send(GaimConnection *gc, int id, const char *msg); | |
| 123 | void silcgaim_chat_set_topic(GaimConnection *gc, int id, const char *topic); | |
| 124 | GaimRoomlist *silcgaim_roomlist_get_list(GaimConnection *gc); | |
| 125 | void silcgaim_roomlist_cancel(GaimRoomlist *list); | |
| 126 | void silcgaim_chat_chauth_show(SilcGaim sg, SilcChannelEntry channel, | |
| 127 | SilcBuffer channel_pubkeys); | |
|
9488
9d6520fa53fd
[gaim-migrate @ 10313]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9466
diff
changeset
|
128 | void silcgaim_parse_attrs(SilcDList attrs, char **moodstr, char **statusstr, |
|
9d6520fa53fd
[gaim-migrate @ 10313]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9466
diff
changeset
|
129 | char **contactstr, char **langstr, char **devicestr, |
|
9d6520fa53fd
[gaim-migrate @ 10313]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9466
diff
changeset
|
130 | char **tzstr, char **geostr); |
| 8849 | 131 | |
|
9353
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
132 | #ifdef _WIN32 |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
133 | typedef int uid_t; |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
134 | |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
135 | struct passwd { |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
136 | char *pw_name; /* user name */ |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
137 | char *pw_passwd; /* user password */ |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
138 | int pw_uid; /* user id */ |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
139 | int pw_gid; /* group id */ |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
140 | char *pw_gecos; /* real name */ |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
141 | char *pw_dir; /* home directory */ |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
142 | char *pw_shell; /* shell program */ |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
143 | }; |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
144 | |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
145 | struct passwd *getpwuid(int uid); |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
146 | int getuid(); |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
147 | int geteuid(); |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
148 | #endif |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
149 | |
| 8849 | 150 | #endif /* SILCGAIM_H */ |