Mercurial > pidgin
annotate src/protocols/silc/silcgaim.h @ 12662:eb4841fa697c
[gaim-migrate @ 15005]
sf bug #1385691, Text field visible even when status set to "online"
Don't allow available messages for ICQ. The server doesn't support them.
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Mon, 26 Dec 2005 07:43:41 +0000 |
| parents | fc464a0abccc |
| children | 95a73ce6e285 |
| rev | line source |
|---|---|
| 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" | |
| 10246 | 27 #include "cmds.h" |
| 28 #include "conversation.h" | |
| 8849 | 29 #include "debug.h" |
| 10246 | 30 #include "ft.h" |
| 8849 | 31 #include "notify.h" |
| 32 #include "prpl.h" | |
| 33 #include "request.h" | |
| 10246 | 34 #include "roomlist.h" |
| 8849 | 35 #include "server.h" |
| 36 #include "util.h" | |
| 37 | |
| 38 /* Default public and private key file names */ | |
| 39 #define SILCGAIM_PUBLIC_KEY_NAME "public_key.pub" | |
| 40 #define SILCGAIM_PRIVATE_KEY_NAME "private_key.prv" | |
| 41 | |
| 42 /* Default settings for creating key pair */ | |
| 43 #define SILCGAIM_DEF_PKCS "rsa" | |
| 44 #define SILCGAIM_DEF_PKCS_LEN 2048 | |
| 45 | |
| 46 #define SILCGAIM_PRVGRP 0x001fffff | |
| 47 | |
| 10050 | 48 /* Status IDs */ |
| 49 #define SILCGAIM_STATUS_ID_OFFLINE "offline" | |
| 10801 | 50 #define SILCGAIM_STATUS_ID_AVAILABLE "available" |
| 10050 | 51 #define SILCGAIM_STATUS_ID_HYPER "hyper" |
| 52 #define SILCGAIM_STATUS_ID_AWAY "away" | |
| 53 #define SILCGAIM_STATUS_ID_BUSY "busy" | |
| 54 #define SILCGAIM_STATUS_ID_INDISPOSED "indisposed" | |
| 55 #define SILCGAIM_STATUS_ID_PAGE "page" | |
| 56 | |
| 8849 | 57 typedef struct { |
| 58 unsigned long id; | |
| 59 const char *channel; | |
| 60 unsigned long chid; | |
| 61 const char *parentch; | |
| 62 SilcChannelPrivateKey key; | |
| 63 } *SilcGaimPrvgrp; | |
| 64 | |
| 65 /* The SILC Gaim plugin context */ | |
| 66 typedef struct SilcGaimStruct { | |
| 67 SilcClient client; | |
| 68 SilcClientConnection conn; | |
| 69 | |
| 70 guint scheduler; | |
| 71 GaimConnection *gc; | |
| 72 GaimAccount *account; | |
| 73 unsigned long channel_ids; | |
| 74 GList *grps; | |
| 75 | |
| 76 char *motd; | |
| 77 GaimRoomlist *roomlist; | |
| 12217 | 78 #ifdef HAVE_SILCMIME_H |
| 79 SilcMimeAssembler mimeass; | |
| 80 #endif | |
| 8849 | 81 unsigned int detaching : 1; |
| 82 unsigned int resuming : 1; | |
| 83 unsigned int roomlist_canceled : 1; | |
| 84 unsigned int chpk : 1; | |
| 85 } *SilcGaim; | |
| 86 | |
| 87 | |
| 88 gboolean silcgaim_check_silc_dir(GaimConnection *gc); | |
| 89 void silcgaim_chat_join_done(SilcClient client, | |
| 90 SilcClientConnection conn, | |
| 91 SilcClientEntry *clients, | |
| 92 SilcUInt32 clients_count, | |
| 93 void *context); | |
| 94 const char *silcgaim_silcdir(void); | |
| 95 const char *silcgaim_session_file(const char *account); | |
| 96 void silcgaim_verify_public_key(SilcClient client, SilcClientConnection conn, | |
| 97 const char *name, SilcSocketType conn_type, | |
| 98 unsigned char *pk, SilcUInt32 pk_len, | |
| 99 SilcSKEPKType pk_type, | |
| 100 SilcVerifyPublicKey completion, void *context); | |
| 9038 | 101 GList *silcgaim_buddy_menu(GaimBuddy *buddy); |
| 9288 | 102 void silcgaim_add_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group); |
| 10869 | 103 void silcgaim_send_buddylist(GaimConnection *gc); |
| 9288 | 104 void silcgaim_remove_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group); |
| 8849 | 105 void silcgaim_buddy_keyagr_request(SilcClient client, |
| 106 SilcClientConnection conn, | |
| 107 SilcClientEntry client_entry, | |
| 108 const char *hostname, SilcUInt16 port); | |
| 109 void silcgaim_idle_set(GaimConnection *gc, int idle); | |
| 110 char *silcgaim_tooltip_text(GaimBuddy *b); | |
| 111 char *silcgaim_status_text(GaimBuddy *b); | |
| 112 gboolean silcgaim_ip_is_private(const char *ip); | |
| 9466 | 113 void silcgaim_ftp_send_file(GaimConnection *gc, const char *name, const char *file); |
|
12149
4e46eeec4ace
[gaim-migrate @ 14450]
Richard Laager <rlaager@wiktel.com>
parents:
11522
diff
changeset
|
114 GaimXfer *silcgaim_ftp_new_xfer(GaimConnection *gc, const char *name); |
| 8849 | 115 void silcgaim_ftp_request(SilcClient client, SilcClientConnection conn, |
| 116 SilcClientEntry client_entry, SilcUInt32 session_id, | |
| 117 const char *hostname, SilcUInt16 port); | |
| 118 void silcgaim_show_public_key(SilcGaim sg, | |
| 119 const char *name, SilcPublicKey public_key, | |
| 120 GCallback callback, void *context); | |
| 121 void silcgaim_get_info(GaimConnection *gc, const char *who); | |
| 122 SilcAttributePayload | |
| 123 silcgaim_get_attr(SilcDList attrs, SilcAttribute attribute); | |
| 124 void silcgaim_get_umode_string(SilcUInt32 mode, char *buf, | |
| 125 SilcUInt32 buf_size); | |
| 126 void silcgaim_get_chmode_string(SilcUInt32 mode, char *buf, | |
| 127 SilcUInt32 buf_size); | |
| 128 void silcgaim_get_chumode_string(SilcUInt32 mode, char *buf, | |
| 129 SilcUInt32 buf_size); | |
| 130 GList *silcgaim_chat_info(GaimConnection *gc); | |
| 9756 | 131 GHashTable *silcgaim_chat_info_defaults(GaimConnection *gc, const char *chat_name); |
| 9038 | 132 GList *silcgaim_chat_menu(GaimChat *); |
| 8849 | 133 void silcgaim_chat_join(GaimConnection *gc, GHashTable *data); |
| 9917 | 134 char *silcgaim_get_chat_name(GHashTable *data); |
| 8849 | 135 void silcgaim_chat_invite(GaimConnection *gc, int id, const char *msg, |
| 136 const char *name); | |
| 137 void silcgaim_chat_leave(GaimConnection *gc, int id); | |
| 12217 | 138 int silcgaim_chat_send(GaimConnection *gc, int id, const char *msg, GaimMessageFlags flags); |
| 8849 | 139 void silcgaim_chat_set_topic(GaimConnection *gc, int id, const char *topic); |
| 140 GaimRoomlist *silcgaim_roomlist_get_list(GaimConnection *gc); | |
| 141 void silcgaim_roomlist_cancel(GaimRoomlist *list); | |
| 142 void silcgaim_chat_chauth_show(SilcGaim sg, SilcChannelEntry channel, | |
| 143 SilcBuffer channel_pubkeys); | |
| 9488 | 144 void silcgaim_parse_attrs(SilcDList attrs, char **moodstr, char **statusstr, |
| 145 char **contactstr, char **langstr, char **devicestr, | |
| 146 char **tzstr, char **geostr); | |
| 12217 | 147 #ifdef HAVE_SILCMIME_H |
| 148 char *silcgaim_file2mime(const char *filename); | |
| 149 SilcDList silcgaim_image_message(const char *msg, SilcUInt32 *mflags); | |
| 150 #endif | |
| 8849 | 151 |
| 9353 | 152 #ifdef _WIN32 |
| 153 typedef int uid_t; | |
| 154 | |
| 155 struct passwd { | |
| 156 char *pw_name; /* user name */ | |
| 157 char *pw_passwd; /* user password */ | |
| 158 int pw_uid; /* user id */ | |
| 159 int pw_gid; /* group id */ | |
| 160 char *pw_gecos; /* real name */ | |
| 161 char *pw_dir; /* home directory */ | |
| 162 char *pw_shell; /* shell program */ | |
| 163 }; | |
| 164 | |
| 165 struct passwd *getpwuid(int uid); | |
|
12323
fc464a0abccc
[gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
parents:
12217
diff
changeset
|
166 int getuid(void); |
|
fc464a0abccc
[gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
parents:
12217
diff
changeset
|
167 int geteuid(void); |
| 9353 | 168 #endif |
| 169 | |
| 8849 | 170 #endif /* SILCGAIM_H */ |
