Mercurial > pidgin
annotate src/protocols/msn/session.h @ 5954:fccc33d4b8fa
[gaim-migrate @ 6398]
I made serv_set_info or whatever it's called take a const char *
I don't really remember why
I also made some other small changes
There should be no functionality change
I'm still struggling to get available messages working. They haunt my
dreams. Like the gray gorilla, or the Silhouette of the past, fading
into the dim light of the moon.
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Wed, 25 Jun 2003 04:20:30 +0000 |
| parents | 5baeb89ee2d4 |
| children | b7e113a59b51 |
| 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" | |
|
5518
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5456
diff
changeset
|
30 #include "group.h" |
| 5309 | 31 |
| 32 struct _MsnSession | |
| 33 { | |
|
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
34 GaimAccount *account; |
|
5363
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5327
diff
changeset
|
35 MsnUser *user; |
| 5309 | 36 |
| 37 char *dispatch_server; | |
| 38 int dispatch_port; | |
| 39 | |
| 40 gboolean connected; | |
| 41 | |
| 42 MsnServConn *dispatch_conn; | |
| 43 MsnServConn *notification_conn; | |
| 44 | |
| 45 unsigned int trId; | |
| 46 | |
| 47 MsnUsers *users; | |
|
5518
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5456
diff
changeset
|
48 MsnGroups *groups; |
| 5309 | 49 |
|
5898
5baeb89ee2d4
[gaim-migrate @ 6330]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
50 GList *servconns; |
| 5309 | 51 GList *switches; |
| 52 | |
| 53 struct | |
| 54 { | |
| 55 GSList *forward; | |
| 56 GSList *reverse; | |
| 57 GSList *allow; | |
| 58 GSList *block; | |
| 59 | |
| 60 } lists; | |
| 61 | |
| 62 struct | |
| 63 { | |
| 64 char *kv; | |
| 65 char *sid; | |
| 66 char *mspauth; | |
| 67 unsigned long sl; | |
| 68 char *file; | |
| 69 | |
| 70 } passport_info; | |
| 71 | |
|
5322
a4d017bee1de
[gaim-migrate @ 5694]
Christian Hammond <chipx86@chipx86.com>
parents:
5318
diff
changeset
|
72 /* You have no idea how much I hate all that is below. */ |
| 5309 | 73 GaimPlugin *prpl; |
|
5322
a4d017bee1de
[gaim-migrate @ 5694]
Christian Hammond <chipx86@chipx86.com>
parents:
5318
diff
changeset
|
74 |
|
5456
40e976d42028
[gaim-migrate @ 5844]
Christian Hammond <chipx86@chipx86.com>
parents:
5406
diff
changeset
|
75 gboolean syncing_lists; |
|
5406
9acf4832c0dc
[gaim-migrate @ 5782]
Christian Hammond <chipx86@chipx86.com>
parents:
5363
diff
changeset
|
76 gboolean lists_synced; |
|
9acf4832c0dc
[gaim-migrate @ 5782]
Christian Hammond <chipx86@chipx86.com>
parents:
5363
diff
changeset
|
77 |
|
5322
a4d017bee1de
[gaim-migrate @ 5694]
Christian Hammond <chipx86@chipx86.com>
parents:
5318
diff
changeset
|
78 /* For moving buddies from one group to another. Ugh. */ |
|
a4d017bee1de
[gaim-migrate @ 5694]
Christian Hammond <chipx86@chipx86.com>
parents:
5318
diff
changeset
|
79 gboolean moving_buddy; |
|
5327
b716ffc25d2d
[gaim-migrate @ 5700]
Christian Hammond <chipx86@chipx86.com>
parents:
5322
diff
changeset
|
80 char *dest_group_name; |
|
5518
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5456
diff
changeset
|
81 MsnUser *moving_user; |
|
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5456
diff
changeset
|
82 MsnGroup *old_group; |
| 5309 | 83 }; |
| 84 | |
| 85 /** | |
| 86 * Creates an MSN session. | |
| 87 * | |
| 88 * @param account The account. | |
| 89 * @param server The dispatch server. | |
| 90 * @param port The dispatch port. | |
| 91 * | |
| 92 * @return The new MSN session. | |
| 93 */ | |
|
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
94 MsnSession *msn_session_new(GaimAccount *account, |
| 5309 | 95 const char *server, int port); |
| 96 | |
| 97 /** | |
| 98 * Destroys an MSN session. | |
| 99 * | |
| 100 * @param session The MSN session to destroy. | |
| 101 */ | |
| 102 void msn_session_destroy(MsnSession *session); | |
| 103 | |
| 104 /** | |
| 105 * Connects to and initiates an MSN session. | |
| 106 * | |
| 107 * @param session The MSN session. | |
| 108 * | |
| 109 * @return @c TRUE on success, @c FALSE on failure. | |
| 110 */ | |
| 111 gboolean msn_session_connect(MsnSession *session); | |
| 112 | |
| 113 /** | |
| 114 * Disconnects from an MSN session. | |
| 115 * | |
| 116 * @param session The MSN session. | |
| 117 */ | |
| 118 void msn_session_disconnect(MsnSession *session); | |
| 119 | |
| 120 /** | |
| 121 * Opens a new switchboard connection. | |
| 122 * | |
| 123 * @param session The MSN session. | |
| 124 * | |
| 125 * @return The new switchboard connection. | |
| 126 */ | |
| 127 MsnSwitchBoard *msn_session_open_switchboard(MsnSession *session); | |
| 128 | |
| 129 /** | |
| 130 * Finds a switch with the given passport. | |
| 131 * | |
| 132 * @param session The MSN session. | |
| 133 * @param passport The passport to search for. | |
| 134 * | |
| 135 * @return The switchboard, if found. | |
| 136 */ | |
| 137 MsnSwitchBoard *msn_session_find_switch_with_passport( | |
| 138 const MsnSession *session, const char *passport); | |
| 139 | |
| 140 /** | |
| 141 * Finds a switchboard with the given chat ID. | |
| 142 * | |
| 143 * @param session The MSN session. | |
| 144 * @param chat_id The chat ID to search for. | |
| 145 * | |
| 146 * @return The switchboard, if found. | |
| 147 */ | |
| 148 MsnSwitchBoard *msn_session_find_switch_with_id(const MsnSession *session, | |
| 149 int chat_id); | |
| 150 | |
| 151 /** | |
| 152 * Finds the first unused switchboard. | |
| 153 * | |
| 154 * @param session The MSN session. | |
| 155 * | |
| 156 * @return The first unused, writable switchboard, if found. | |
| 157 */ | |
| 158 MsnSwitchBoard *msn_session_find_unused_switch(const MsnSession *session); | |
| 159 | |
| 160 #endif /* _MSN_SESSION_H_ */ |
