Changeset 7db65b7 for protocols/msn
- Timestamp:
- 2010-08-09T19:04:55Z (14 years ago)
- Branches:
- master
- Children:
- 523fb23
- Parents:
- 5fecede
- Location:
- protocols/msn
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/ns.c
r5fecede r7db65b7 29 29 #include "passport.h" 30 30 #include "md5.h" 31 #include "soap.h" 31 32 32 33 static gboolean msn_ns_callback( gpointer data, gint source, b_input_condition cond ); … … 239 240 imcb_log( ic, "Authenticated, getting buddy list" ); 240 241 241 g_snprintf( buf, sizeof( buf ), "SYN %d 0\r\n", ++md->trId ); 242 return( msn_write( ic, buf, strlen( buf ) ) ); 242 msn_soap_memlist_request( ic ); 243 243 } 244 244 else -
protocols/msn/soap.c
r5fecede r7db65b7 83 83 static int msn_soap_send_request( struct msn_soap_req_data *soap_req ) 84 84 { 85 struct msn_data *md = soap_req->ic->proto_data; 85 86 char *http_req; 87 char *pom, *s; 86 88 url_t url; 87 89 88 90 soap_req->build_request( soap_req ); 91 92 pom = g_new0( char, strlen( md->passport_token ) * 3 ); 93 strcpy( pom, md->passport_token + 2 ); 94 if( ( s = strchr( pom, '&' ) ) ) 95 *s = '\0'; 89 96 90 97 url_set( &url, soap_req->url ); 91 98 http_req = g_strdup_printf( SOAP_HTTP_REQUEST, url.file, url.host, 92 soap_req->action, strlen( soap_req->payload ), soap_req->payload ); 99 soap_req->action, pom, 100 strlen( soap_req->payload ), soap_req->payload ); 93 101 94 102 soap_req->http_req = http_dorequest( url.host, url.port, url.proto == PROTO_HTTPS, … … 152 160 153 161 soap_req->url = g_strdup( SOAP_OIM_SEND_URL ); 154 soap_req->action = g_strdup( SOAP_OIM_ ACTION_URL);162 soap_req->action = g_strdup( SOAP_OIM_SEND_ACTION ); 155 163 soap_req->payload = g_markup_printf_escaped( SOAP_OIM_SEND_PAYLOAD, 156 164 ic->acc->user, display_name_b64, oim->to, md->passport_token, … … 256 264 } 257 265 } 266 267 268 /* memlist: Fetching the membership list (NOT address book) */ 269 270 #if 0 271 struct msn_soap_oim_send_data 272 { 273 char *to; 274 char *msg; 275 int number; 276 int need_retry; 277 }; 278 #endif 279 280 static int msn_soap_memlist_build_request( struct msn_soap_req_data *soap_req ) 281 { 282 soap_req->url = g_strdup( SOAP_MEMLIST_URL ); 283 soap_req->action = g_strdup( SOAP_MEMLIST_ACTION ); 284 soap_req->payload = g_strdup( SOAP_MEMLIST_PAYLOAD ); 285 286 return 1; 287 } 288 289 static const struct xt_handler_entry msn_soap_memlist_parser[] = { 290 { NULL, NULL, NULL } 291 }; 292 293 static int msn_soap_memlist_handle_response( struct msn_soap_req_data *soap_req ) 294 { 295 return 0; 296 } 297 298 static int msn_soap_memlist_free_data( struct msn_soap_req_data *soap_req ) 299 { 300 return 0; 301 } 302 303 int msn_soap_memlist_request( struct im_connection *ic ) 304 { 305 return msn_soap_start( ic, NULL, msn_soap_memlist_build_request, 306 msn_soap_memlist_parser, 307 msn_soap_memlist_handle_response, 308 msn_soap_memlist_free_data ); 309 } -
protocols/msn/soap.h
r5fecede r7db65b7 46 46 "User-Agent: BitlBee " BITLBEE_VERSION "\r\n" \ 47 47 "Content-Type: text/xml; charset=utf-8\r\n" \ 48 "Cookie: MSPAuth=%s\r\n" \ 48 49 "Content-Length: %d\r\n" \ 49 50 "Cache-Control: no-cache\r\n" \ … … 53 54 54 55 #define SOAP_OIM_SEND_URL "https://ows.messenger.msn.com/OimWS/oim.asmx" 55 #define SOAP_OIM_ ACTION_URL"http://messenger.msn.com/ws/2004/09/oim/Store"56 #define SOAP_OIM_SEND_ACTION "http://messenger.msn.com/ws/2004/09/oim/Store" 56 57 57 58 #define SOAP_OIM_SEND_PAYLOAD \ … … 85 86 int msn_soap_oim_send_queue( struct im_connection *ic, GSList **msgq ); 86 87 88 89 #define SOAP_MEMLIST_URL "https://byrdr.omega.contacts.msn.com/abservice/SharingService.asmx" 90 #define SOAP_MEMLIST_ACTION "http://www.msn.com/webservices/AddressBook/FindMembership" 91 92 #define SOAP_MEMLIST_PAYLOAD \ 93 "<?xml version=\"1.0\" encoding=\"utf-8\"?>" \ 94 "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" \ 95 "<soap:Header xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" \ 96 "<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">" \ 97 "<ApplicationId xmlns=\"http://www.msn.com/webservices/AddressBook\">CFE80F9D-180F-4399-82AB-413F33A1FA11</ApplicationId>" \ 98 "<IsMigration xmlns=\"http://www.msn.com/webservices/AddressBook\">false</IsMigration>" \ 99 "<PartnerScenario xmlns=\"http://www.msn.com/webservices/AddressBook\">Initial</PartnerScenario>" \ 100 "</ABApplicationHeader>" \ 101 "<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">" \ 102 "<ManagedGroupRequest xmlns=\"http://www.msn.com/webservices/AddressBook\">false</ManagedGroupRequest>" \ 103 "</ABAuthHeader>" \ 104 "</soap:Header>" \ 105 "<soap:Body xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" \ 106 "<FindMembership xmlns=\"http://www.msn.com/webservices/AddressBook\"><serviceFilter xmlns=\"http://www.msn.com/webservices/AddressBook\"><Types xmlns=\"http://www.msn.com/webservices/AddressBook\"><ServiceType xmlns=\"http://www.msn.com/webservices/AddressBook\">Messenger</ServiceType><ServiceType xmlns=\"http://www.msn.com/webservices/AddressBook\">Invitation</ServiceType><ServiceType xmlns=\"http://www.msn.com/webservices/AddressBook\">SocialNetwork</ServiceType><ServiceType xmlns=\"http://www.msn.com/webservices/AddressBook\">Space</ServiceType><ServiceType xmlns=\"http://www.msn.com/webservices/AddressBook\">Profile</ServiceType></Types></serviceFilter>" \ 107 "</FindMembership>" \ 108 "</soap:Body>" \ 109 "</soap:Envelope>" 110 111 int msn_soap_memlist_request( struct im_connection *ic ); 112 113 87 114 #endif /* __SOAP_H__ */
Note: See TracChangeset
for help on using the changeset viewer.