comparison src/protocols/msn/notification.c @ 5506:4f72b611f0ee

[gaim-migrate @ 5905] A few changes here. - Messages now have reference counting. - There's a message queue API in servconn. This was needed for times when we have a message but need further information from a command before processing it, like initial e-mail notifications. - As a result of the two above, we now have initial e-mail notifications again! committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 25 May 2003 09:04:32 +0000
parents cce2d7868c78
children 2a57266df5f6
comparison
equal deleted inserted replaced
5505:870207a49f2f 5506:4f72b611f0ee
1137 1137
1138 /************************************************************************** 1138 /**************************************************************************
1139 * Message Types 1139 * Message Types
1140 **************************************************************************/ 1140 **************************************************************************/
1141 static gboolean 1141 static gboolean
1142 __profile_msg(MsnServConn *servconn, const MsnMessage *msg) 1142 __profile_msg(MsnServConn *servconn, MsnMessage *msg)
1143 { 1143 {
1144 MsnSession *session = servconn->session; 1144 MsnSession *session = servconn->session;
1145 const char *value; 1145 const char *value;
1146 1146
1147 if (strcmp(servconn->msg_passport, "Hotmail")) { 1147 if (strcmp(servconn->msg_passport, "Hotmail")) {
1160 1160
1161 return TRUE; 1161 return TRUE;
1162 } 1162 }
1163 1163
1164 static gboolean 1164 static gboolean
1165 __initial_email_msg(MsnServConn *servconn, const MsnMessage *msg) 1165 __initial_email_msg(MsnServConn *servconn, MsnMessage *msg)
1166 { 1166 {
1167 MsnSession *session = servconn->session; 1167 MsnSession *session = servconn->session;
1168 struct gaim_connection *gc = session->account->gc; 1168 struct gaim_connection *gc = session->account->gc;
1169 GHashTable *table; 1169 GHashTable *table;
1170 const char *unread; 1170 const char *unread;
1174 return TRUE; 1174 return TRUE;
1175 } 1175 }
1176 1176
1177 if (session->passport_info.file == NULL) { 1177 if (session->passport_info.file == NULL) {
1178 msn_servconn_send_command(servconn, "URL", "INBOX"); 1178 msn_servconn_send_command(servconn, "URL", "INBOX");
1179
1180 msn_servconn_queue_message(servconn, "URL", msg);
1181
1179 return TRUE; 1182 return TRUE;
1180 } 1183 }
1181 1184
1182 table = msn_message_get_hashtable_from_body(msg); 1185 table = msn_message_get_hashtable_from_body(msg);
1183 1186
1191 1194
1192 return TRUE; 1195 return TRUE;
1193 } 1196 }
1194 1197
1195 static gboolean 1198 static gboolean
1196 __email_msg(MsnServConn *servconn, const MsnMessage *msg) 1199 __email_msg(MsnServConn *servconn, MsnMessage *msg)
1197 { 1200 {
1198 MsnSession *session = servconn->session; 1201 MsnSession *session = servconn->session;
1199 struct gaim_connection *gc = session->account->gc; 1202 struct gaim_connection *gc = session->account->gc;
1200 GHashTable *table; 1203 GHashTable *table;
1201 const char *from, *subject; 1204 const char *from, *subject;
1205 return TRUE; 1208 return TRUE;
1206 } 1209 }
1207 1210
1208 if (session->passport_info.file == NULL) { 1211 if (session->passport_info.file == NULL) {
1209 msn_servconn_send_command(servconn, "URL", "INBOX"); 1212 msn_servconn_send_command(servconn, "URL", "INBOX");
1213
1214 msn_servconn_queue_message(servconn, "URL", msg);
1215
1210 return TRUE; 1216 return TRUE;
1211 } 1217 }
1212 1218
1213 table = msn_message_get_hashtable_from_body(msg); 1219 table = msn_message_get_hashtable_from_body(msg);
1214 1220
1227 1233
1228 return TRUE; 1234 return TRUE;
1229 } 1235 }
1230 1236
1231 static gboolean 1237 static gboolean
1232 __system_msg(MsnServConn *servconn, const MsnMessage *msg) 1238 __system_msg(MsnServConn *servconn, MsnMessage *msg)
1233 { 1239 {
1234 GHashTable *table; 1240 GHashTable *table;
1235 const char *type_s; 1241 const char *type_s;
1236 1242
1237 if (strcmp(servconn->msg_passport, "Hotmail")) { 1243 if (strcmp(servconn->msg_passport, "Hotmail")) {