Ignore:
Timestamp:
2010-08-09T19:04:55Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
523fb23
Parents:
5fecede
Message:

Not working yet, but some code for fetching the membership list. Apparently
an upgrade to MSNP15 is needed. Oh well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/soap.c

    r5fecede r7db65b7  
    8383static int msn_soap_send_request( struct msn_soap_req_data *soap_req )
    8484{
     85        struct msn_data *md = soap_req->ic->proto_data;
    8586        char *http_req;
     87        char *pom, *s;
    8688        url_t url;
    8789       
    8890        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';
    8996       
    9097        url_set( &url, soap_req->url );
    9198        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 );
    93101       
    94102        soap_req->http_req = http_dorequest( url.host, url.port, url.proto == PROTO_HTTPS,
     
    152160       
    153161        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 );
    155163        soap_req->payload = g_markup_printf_escaped( SOAP_OIM_SEND_PAYLOAD,
    156164                ic->acc->user, display_name_b64, oim->to, md->passport_token,
     
    256264        }
    257265}
     266
     267
     268/* memlist: Fetching the membership list (NOT address book) */
     269
     270#if 0
     271struct msn_soap_oim_send_data
     272{
     273        char *to;
     274        char *msg;
     275        int number;
     276        int need_retry;
     277};
     278#endif
     279
     280static 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
     289static const struct xt_handler_entry msn_soap_memlist_parser[] = {
     290        { NULL,               NULL,     NULL                        }
     291};
     292
     293static int msn_soap_memlist_handle_response( struct msn_soap_req_data *soap_req )
     294{
     295        return 0;
     296}
     297
     298static int msn_soap_memlist_free_data( struct msn_soap_req_data *soap_req )
     299{
     300        return 0;
     301}
     302
     303int 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}
Note: See TracChangeset for help on using the changeset viewer.