Mercurial > pidgin
comparison src/protocols/msn/session.h @ 9193:502707ca1836
[gaim-migrate @ 9988]
Patch by Felipe Contreras to add MSN file transfer and buddy icons. Please
test and report any bugs!
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 06 Jun 2004 02:39:08 +0000 |
parents | c30d81b4dd22 |
children | ab6636c5a136 |
comparison
equal
deleted
inserted
replaced
9192:5655dcd94d0f | 9193:502707ca1836 |
---|---|
22 #ifndef _MSN_SESSION_H_ | 22 #ifndef _MSN_SESSION_H_ |
23 #define _MSN_SESSION_H_ | 23 #define _MSN_SESSION_H_ |
24 | 24 |
25 typedef struct _MsnSession MsnSession; | 25 typedef struct _MsnSession MsnSession; |
26 | 26 |
27 #include "group.h" | |
28 #include "nexus.h" | |
29 #include "servconn.h" | |
30 #include "sslconn.h" | 27 #include "sslconn.h" |
28 | |
29 #include "notification.h" | |
31 #include "switchboard.h" | 30 #include "switchboard.h" |
32 #include "user.h" | 31 #include "user.h" |
32 #include "group.h" | |
33 | 33 |
34 #include "cmdproc.h" | |
35 #include "nexus.h" | |
36 | |
37 #include "userlist.h" | |
38 #include "sync.h" | |
34 | 39 |
35 struct _MsnSession | 40 struct _MsnSession |
36 { | 41 { |
37 GaimAccount *account; | 42 GaimAccount *account; |
38 MsnUser *user; | 43 MsnUser *user; |
39 char *away_state; | 44 int state; |
40 | 45 |
41 guint protocol_ver; | 46 guint protocol_ver; |
42 | 47 |
43 char *dispatch_host; | 48 char *dispatch_host; |
44 int dispatch_port; | 49 int dispatch_port; |
45 | 50 |
46 gboolean connected; | 51 gboolean connected; |
47 | 52 |
48 MsnServConn *notification_conn; | 53 MsnNotification *notification; |
49 | |
50 MsnNexus *nexus; | 54 MsnNexus *nexus; |
51 | 55 |
52 gboolean http_method; | 56 gboolean http_method; |
53 gint http_poll_timer; | 57 gint http_poll_timer; |
54 | 58 |
55 MsnUsers *users; | 59 MsnUserList *userlist; |
56 MsnGroups *groups; | |
57 | 60 |
58 int servconns_count; | 61 int servconns_count; |
59 GList *servconns; | |
60 GList *switches; | 62 GList *switches; |
63 GList *directconns; | |
61 | 64 |
62 struct | 65 int conv_seq; |
63 { | |
64 GSList *forward; | |
65 GSList *reverse; | |
66 GSList *allow; | |
67 GSList *block; | |
68 | |
69 } lists; | |
70 | 66 |
71 struct | 67 struct |
72 { | 68 { |
73 char *kv; | 69 char *kv; |
74 char *sid; | 70 char *sid; |
79 int client_port; | 75 int client_port; |
80 | 76 |
81 } passport_info; | 77 } passport_info; |
82 | 78 |
83 /* You have no idea how much I hate all that is below. */ | 79 /* You have no idea how much I hate all that is below. */ |
80 /* shx: What? ;) */ | |
81 | |
84 GaimPlugin *prpl; | 82 GaimPlugin *prpl; |
85 | 83 |
86 /* For MSNP8 and MSNP9. */ | 84 MsnSync *sync; |
87 int num_users; | |
88 int total_users; | |
89 int num_groups; | |
90 int total_groups; | |
91 MsnUser *last_user_added; | |
92 | 85 |
93 /* For MSNP7 and lower. */ | 86 GList *slplinks; |
94 gboolean syncing_lists; | |
95 gboolean lists_synced; | |
96 | |
97 /* For moving buddies from one group to another. Ugh. */ | |
98 gboolean moving_buddy; | |
99 char *dest_group_name; | |
100 MsnUser *moving_user; | |
101 MsnGroup *old_group; | |
102 | |
103 /* The last chat ID. */ | |
104 int last_chat_id; | |
105 }; | 87 }; |
106 | 88 |
107 /** | 89 /** |
108 * Creates an MSN session. | 90 * Creates an MSN session. |
109 * | 91 * |
110 * @param account The account. | 92 * @param account The account. |
111 * @param server The dispatch server host. | 93 * @param host The dispatch server host. |
112 * @param port The dispatch server port. | 94 * @param port The dispatch server port. |
113 * | 95 * |
114 * @return The new MSN session. | 96 * @return The new MSN session. |
115 */ | 97 */ |
116 MsnSession *msn_session_new(GaimAccount *account, | 98 MsnSession *msn_session_new(GaimAccount *account, |
117 const char *host, int port); | 99 const char *host, int port, |
100 gboolean http_method); | |
118 | 101 |
119 /** | 102 /** |
120 * Destroys an MSN session. | 103 * Destroys an MSN session. |
121 * | 104 * |
122 * @param session The MSN session to destroy. | 105 * @param session The MSN session to destroy. |
138 * @param session The MSN session. | 121 * @param session The MSN session. |
139 */ | 122 */ |
140 void msn_session_disconnect(MsnSession *session); | 123 void msn_session_disconnect(MsnSession *session); |
141 | 124 |
142 /** | 125 /** |
143 * Opens a new switchboard connection. | |
144 * | |
145 * @param session The MSN session. | |
146 * | |
147 * @return The new switchboard connection. | |
148 */ | |
149 MsnSwitchBoard *msn_session_open_switchboard(MsnSession *session); | |
150 | |
151 /** | |
152 * Changes the status of the user. | |
153 * | |
154 * @param session The MSN session. | |
155 * @param state The new state. | |
156 */ | |
157 gboolean msn_session_change_status(MsnSession *session, const char *state); | |
158 | |
159 /** | |
160 * Finds a switch with the given passport. | |
161 * | |
162 * @param session The MSN session. | |
163 * @param passport The passport to search for. | |
164 * | |
165 * @return The switchboard, if found. | |
166 */ | |
167 MsnSwitchBoard *msn_session_find_switch_with_passport( | |
168 const MsnSession *session, const char *passport); | |
169 | |
170 /** | |
171 * Finds a switchboard with the given chat ID. | 126 * Finds a switchboard with the given chat ID. |
172 * | 127 * |
173 * @param session The MSN session. | 128 * @param session The MSN session. |
174 * @param chat_id The chat ID to search for. | 129 * @param chat_id The chat ID to search for. |
175 * | 130 * |
176 * @return The switchboard, if found. | 131 * @return The switchboard, if found. |
177 */ | 132 */ |
178 MsnSwitchBoard *msn_session_find_switch_with_id(const MsnSession *session, | 133 MsnSwitchBoard *msn_session_find_switch_with_id(const MsnSession *session, |
179 int chat_id); | 134 int chat_id); |
180 | 135 |
181 /** | 136 MsnSwitchBoard *msn_session_find_swboard(MsnSession *session, |
182 * Finds the first unused switchboard. | 137 const char *username); |
183 * | 138 MsnSwitchBoard *msn_session_get_swboard(MsnSession *session, |
184 * @param session The MSN session. | 139 const char *username); |
185 * | |
186 * @return The first unused, writable switchboard, if found. | |
187 */ | |
188 MsnSwitchBoard *msn_session_find_unused_switch(const MsnSession *session); | |
189 | 140 |
190 #endif /* _MSN_SESSION_H_ */ | 141 #endif /* _MSN_SESSION_H_ */ |