Thu, 01 Jul 2004 15:57:38 +0000
[gaim-migrate @ 10256]
this patch had some little discussion, so the original comments about it
don't make too much sense now.
it makes the log viewwer further collapse things into months for things
older than the current month. for relatively short logs this might not be
wonderful, but it should help with very long logs. see patch #963827
oh and thanks to Cole Kowalski for this
committer: Luke Schierer <lschiere@pidgin.im>
| 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 "multi.h" | |
| 29 | #include "notify.h" | |
| 30 | #include "prpl.h" | |
| 31 | #include "request.h" | |
| 32 | #include "server.h" | |
| 33 | #include "util.h" | |
| 34 | #include "roomlist.h" | |
| 35 | #include "ft.h" | |
| 9272 | 36 | #include "cmds.h" |
| 8849 | 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 | ||
| 48 | typedef struct { | |
| 49 | unsigned long id; | |
| 50 | const char *channel; | |
| 51 | unsigned long chid; | |
| 52 | const char *parentch; | |
| 53 | SilcChannelPrivateKey key; | |
| 54 | } *SilcGaimPrvgrp; | |
| 55 | ||
| 56 | /* The SILC Gaim plugin context */ | |
| 57 | typedef struct SilcGaimStruct { | |
| 58 | SilcClient client; | |
| 59 | SilcClientConnection conn; | |
| 60 | ||
| 61 | guint scheduler; | |
| 62 | GaimConnection *gc; | |
| 63 | GaimAccount *account; | |
| 64 | unsigned long channel_ids; | |
| 65 | GList *grps; | |
| 66 | ||
| 67 | char *motd; | |
| 68 | GaimRoomlist *roomlist; | |
| 69 | ||
| 70 | unsigned int detaching : 1; | |
| 71 | unsigned int resuming : 1; | |
| 72 | unsigned int roomlist_canceled : 1; | |
| 73 | unsigned int chpk : 1; | |
| 74 | } *SilcGaim; | |
| 75 | ||
| 76 | ||
| 77 | gboolean silcgaim_check_silc_dir(GaimConnection *gc); | |
| 78 | void silcgaim_chat_join_done(SilcClient client, | |
| 79 | SilcClientConnection conn, | |
| 80 | SilcClientEntry *clients, | |
| 81 | SilcUInt32 clients_count, | |
| 82 | void *context); | |
| 83 | const char *silcgaim_silcdir(void); | |
| 84 | const char *silcgaim_session_file(const char *account); | |
| 85 | void silcgaim_verify_public_key(SilcClient client, SilcClientConnection conn, | |
| 86 | const char *name, SilcSocketType conn_type, | |
| 87 | unsigned char *pk, SilcUInt32 pk_len, | |
| 88 | SilcSKEPKType pk_type, | |
| 89 | SilcVerifyPublicKey completion, void *context); | |
| 9038 | 90 | GList *silcgaim_buddy_menu(GaimBuddy *buddy); |
|
9288
a19f73556084
[gaim-migrate @ 10091]
Mark Doliner <markdoliner@pidgin.im>
parents:
9272
diff
changeset
|
91 | void silcgaim_add_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group); |
|
a19f73556084
[gaim-migrate @ 10091]
Mark Doliner <markdoliner@pidgin.im>
parents:
9272
diff
changeset
|
92 | void silcgaim_remove_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group); |
| 8849 | 93 | void silcgaim_buddy_keyagr_request(SilcClient client, |
| 94 | SilcClientConnection conn, | |
| 95 | SilcClientEntry client_entry, | |
| 96 | const char *hostname, SilcUInt16 port); | |
| 97 | void silcgaim_idle_set(GaimConnection *gc, int idle); | |
| 98 | char *silcgaim_tooltip_text(GaimBuddy *b); | |
| 99 | char *silcgaim_status_text(GaimBuddy *b); | |
| 100 | gboolean silcgaim_ip_is_private(const char *ip); | |
| 101 | void silcgaim_ftp_send_file(GaimConnection *gc, const char *name); | |
| 102 | void silcgaim_ftp_request(SilcClient client, SilcClientConnection conn, | |
| 103 | SilcClientEntry client_entry, SilcUInt32 session_id, | |
| 104 | const char *hostname, SilcUInt16 port); | |
| 105 | void silcgaim_show_public_key(SilcGaim sg, | |
| 106 | const char *name, SilcPublicKey public_key, | |
| 107 | GCallback callback, void *context); | |
| 108 | void silcgaim_get_info(GaimConnection *gc, const char *who); | |
| 109 | SilcAttributePayload | |
| 110 | silcgaim_get_attr(SilcDList attrs, SilcAttribute attribute); | |
| 111 | void silcgaim_get_umode_string(SilcUInt32 mode, char *buf, | |
| 112 | SilcUInt32 buf_size); | |
| 113 | void silcgaim_get_chmode_string(SilcUInt32 mode, char *buf, | |
| 114 | SilcUInt32 buf_size); | |
| 115 | void silcgaim_get_chumode_string(SilcUInt32 mode, char *buf, | |
| 116 | SilcUInt32 buf_size); | |
| 117 | GList *silcgaim_chat_info(GaimConnection *gc); | |
| 9038 | 118 | GList *silcgaim_chat_menu(GaimChat *); |
| 8849 | 119 | void silcgaim_chat_join(GaimConnection *gc, GHashTable *data); |
| 120 | void silcgaim_chat_invite(GaimConnection *gc, int id, const char *msg, | |
| 121 | const char *name); | |
| 122 | void silcgaim_chat_leave(GaimConnection *gc, int id); | |
| 123 | int silcgaim_chat_send(GaimConnection *gc, int id, const char *msg); | |
| 124 | void silcgaim_chat_set_topic(GaimConnection *gc, int id, const char *topic); | |
| 125 | GaimRoomlist *silcgaim_roomlist_get_list(GaimConnection *gc); | |
| 126 | void silcgaim_roomlist_cancel(GaimRoomlist *list); | |
| 127 | void silcgaim_chat_chauth_show(SilcGaim sg, SilcChannelEntry channel, | |
| 128 | SilcBuffer channel_pubkeys); | |
| 129 | ||
|
9353
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
130 | #ifdef _WIN32 |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
131 | typedef int uid_t; |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
132 | |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
133 | struct passwd { |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
134 | char *pw_name; /* user name */ |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
135 | char *pw_passwd; /* user password */ |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
136 | int pw_uid; /* user id */ |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
137 | int pw_gid; /* group id */ |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
138 | char *pw_gecos; /* real name */ |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
139 | char *pw_dir; /* home directory */ |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
140 | char *pw_shell; /* shell program */ |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
141 | }; |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
142 | |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
143 | struct passwd *getpwuid(int uid); |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
144 | int getuid(); |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
145 | int geteuid(); |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
146 | #endif |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
147 | |
| 8849 | 148 | #endif /* SILCGAIM_H */ |