Mercurial > pidgin
annotate src/protocols/msn/session.h @ 5318:bd98232872a3
[gaim-migrate @ 5690]
Renaming a group on the buddy list now renames the group on the
server-stored buddy list. Also, we updated to MSNP7 on the notification
server as well! Yay!
committer: Tailor Script <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Tue, 06 May 2003 23:07:12 +0000 |
| parents | e2e53316a21d |
| children | a4d017bee1de |
| rev | line source |
|---|---|
| 5309 | 1 /** |
| 2 * @file session.h MSN session functions | |
| 3 * | |
| 4 * gaim | |
| 5 * | |
| 6 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org> | |
| 7 * | |
| 8 * This program is free software; you can redistribute it and/or modify | |
| 9 * it under the terms of the GNU General Public License as published by | |
| 10 * the Free Software Foundation; either version 2 of the License, or | |
| 11 * (at your option) any later version. | |
| 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 * You should have received a copy of the GNU General Public License | |
| 19 * along with this program; if not, write to the Free Software | |
| 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 21 */ | |
| 22 #ifndef _MSN_SESSION_H_ | |
| 23 #define _MSN_SESSION_H_ | |
| 24 | |
| 25 typedef struct _MsnSession MsnSession; | |
| 26 | |
| 27 #include "servconn.h" | |
| 28 #include "switchboard.h" | |
| 29 #include "user.h" | |
| 30 | |
| 31 struct _MsnSession | |
| 32 { | |
| 33 struct gaim_account *account; | |
| 34 | |
| 35 char *dispatch_server; | |
| 36 int dispatch_port; | |
| 37 | |
| 38 gboolean connected; | |
| 39 | |
| 40 MsnServConn *dispatch_conn; | |
| 41 MsnServConn *notification_conn; | |
| 42 | |
| 43 unsigned int trId; | |
| 44 | |
| 45 MsnUsers *users; | |
| 46 | |
| 47 GList *switches; | |
|
5318
bd98232872a3
[gaim-migrate @ 5690]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
48 GHashTable *group_names; /* ID -> name */ |
|
bd98232872a3
[gaim-migrate @ 5690]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
49 GHashTable *group_ids; /* Name -> ID */ |
| 5309 | 50 |
| 51 struct | |
| 52 { | |
| 53 GSList *forward; | |
| 54 GSList *reverse; | |
| 55 GSList *allow; | |
| 56 GSList *block; | |
| 57 | |
| 58 } lists; | |
| 59 | |
| 60 struct | |
| 61 { | |
| 62 char *kv; | |
| 63 char *sid; | |
| 64 char *mspauth; | |
| 65 unsigned long sl; | |
| 66 char *file; | |
| 67 | |
| 68 } passport_info; | |
| 69 | |
| 70 /* You have no idea how much I hate this. */ | |
| 71 GaimPlugin *prpl; | |
| 72 }; | |
| 73 | |
| 74 /** | |
| 75 * Creates an MSN session. | |
| 76 * | |
| 77 * @param account The account. | |
| 78 * @param server The dispatch server. | |
| 79 * @param port The dispatch port. | |
| 80 * | |
| 81 * @return The new MSN session. | |
| 82 */ | |
| 83 MsnSession *msn_session_new(struct gaim_account *account, | |
| 84 const char *server, int port); | |
| 85 | |
| 86 /** | |
| 87 * Destroys an MSN session. | |
| 88 * | |
| 89 * @param session The MSN session to destroy. | |
| 90 */ | |
| 91 void msn_session_destroy(MsnSession *session); | |
| 92 | |
| 93 /** | |
| 94 * Connects to and initiates an MSN session. | |
| 95 * | |
| 96 * @param session The MSN session. | |
| 97 * | |
| 98 * @return @c TRUE on success, @c FALSE on failure. | |
| 99 */ | |
| 100 gboolean msn_session_connect(MsnSession *session); | |
| 101 | |
| 102 /** | |
| 103 * Disconnects from an MSN session. | |
| 104 * | |
| 105 * @param session The MSN session. | |
| 106 */ | |
| 107 void msn_session_disconnect(MsnSession *session); | |
| 108 | |
| 109 /** | |
| 110 * Opens a new switchboard connection. | |
| 111 * | |
| 112 * @param session The MSN session. | |
| 113 * | |
| 114 * @return The new switchboard connection. | |
| 115 */ | |
| 116 MsnSwitchBoard *msn_session_open_switchboard(MsnSession *session); | |
| 117 | |
| 118 /** | |
| 119 * Finds a switch with the given passport. | |
| 120 * | |
| 121 * @param session The MSN session. | |
| 122 * @param passport The passport to search for. | |
| 123 * | |
| 124 * @return The switchboard, if found. | |
| 125 */ | |
| 126 MsnSwitchBoard *msn_session_find_switch_with_passport( | |
| 127 const MsnSession *session, const char *passport); | |
| 128 | |
| 129 /** | |
| 130 * Finds a switchboard with the given chat ID. | |
| 131 * | |
| 132 * @param session The MSN session. | |
| 133 * @param chat_id The chat ID to search for. | |
| 134 * | |
| 135 * @return The switchboard, if found. | |
| 136 */ | |
| 137 MsnSwitchBoard *msn_session_find_switch_with_id(const MsnSession *session, | |
| 138 int chat_id); | |
| 139 | |
| 140 /** | |
| 141 * Finds the first unused switchboard. | |
| 142 * | |
| 143 * @param session The MSN session. | |
| 144 * | |
| 145 * @return The first unused, writable switchboard, if found. | |
| 146 */ | |
| 147 MsnSwitchBoard *msn_session_find_unused_switch(const MsnSession *session); | |
| 148 | |
| 149 #endif /* _MSN_SESSION_H_ */ |
