comparison src/protocols/msn/contact.h @ 19738:bc30c6270d9f

[gaim-migrate @ 16473] add the Framework of SOAP request Now can retrieve the Contact via SOAP Request. so many bug still exist! commited by MaYuan<mayuan2006@gmail.com> committer: Ethan Blanton <elb@pidgin.im>
author Ma Yuan <mayuan2006@gmail.com>
date Sun, 09 Jul 2006 16:48:25 +0000
parents
children 852b32710df0
comparison
equal deleted inserted replaced
19737:995aea35b05c 19738:bc30c6270d9f
1 /**
2 * @file contact.h Header file for contact.c
3 * Author
4 * MaYuan<mayuan2006@gmail.com>
5 * gaim
6 *
7 * Gaim is the legal property of its developers, whose names are too numerous
8 * to list here. Please refer to the COPYRIGHT file distributed with this
9 * source distribution.
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 */
25 #ifndef _MSN_CONTACT_H_
26 #define _MSN_CONTACT_H_
27
28 #define MSN_CONTACT_SERVER "contacts.msn.com"
29
30 #define MSN_GET_CONTACT_POST_URL "/abservice/SharingService.asmx"
31 #define MSN_GET_CONTACT_TEMPLATE "<?xml version='1.0' encoding='utf-8'?>"\
32 "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"\
33 "<soap:Header xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"\
34 "<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
35 "<ApplicationId xmlns=\"http://www.msn.com/webservices/AddressBook\">09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>"\
36 "<IsMigration xmlns=\"http://www.msn.com/webservices/AddressBook\">false</IsMigration>"\
37 "<PartnerScenario xmlns=\"http://www.msn.com/webservices/AddressBook\">Initial</PartnerScenario>"\
38 "</ABApplicationHeader>"\
39 "<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
40 "<ManagedGroupRequest xmlns=\"http://www.msn.com/webservices/AddressBook\">false</ManagedGroupRequest>"\
41 "</ABAuthHeader>"\
42 "</soap:Header>"\
43 "<soap:Body xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"\
44 "<FindMembership xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
45 "<serviceFilter xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
46 "<Types xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
47 "<ServiceType xmlns=\"http://www.msn.com/webservices/AddressBook\">Messenger</ServiceType>"\
48 "<ServiceType xmlns=\"http://www.msn.com/webservices/AddressBook\">Invitation</ServiceType>"\
49 "<ServiceType xmlns=\"http://www.msn.com/webservices/AddressBook\">SocialNetwork</ServiceType>"\
50 "<ServiceType xmlns=\"http://www.msn.com/webservices/AddressBook\">Space</ServiceType>"\
51 "<ServiceType xmlns=\"http://www.msn.com/webservices/AddressBook\">Profile</ServiceType>"\
52 "</Types>"\
53 "</serviceFilter>"\
54 "</FindMembership>"\
55 "</soap:Body>"\
56 "</soap:Envelope>"
57
58 #define MSN_ADDRESS_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
59 "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
60 "<soap:Header>"\
61 "<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
62 "<ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>"\
63 "<IsMigration>false</IsMigration>"\
64 "<PartnerScenario>Initial</PartnerScenario>"\
65 "</ABApplicationHeader>"\
66 "<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
67 "<ManagedGroupRequest>false</ManagedGroupRequest>"\
68 "</ABAuthHeader>"\
69 "</soap:Header>"\
70 "<soap:Body>"\
71 "<ABFindAll xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
72 "<abId>00000000-0000-0000-0000-000000000000</abId>"\
73 "<abView>Full</abView>"\
74 "</ABFindAll>"\
75 "</soap:Body>"\
76 "</soap:Envelope>"
77
78 #define MSN_GLEAMS_TEMPLATE = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
79 "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
80 "<soap:Header>"\
81 "<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
82 "<ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>"\
83 "<IsMigration>false</IsMigration>"\
84 "<PartnerScenario>Initial</PartnerScenario>"\
85 "</ABApplicationHeader>"\
86 "<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
87 "<ManagedGroupRequest>false</ManagedGroupRequest>"\
88 "</ABAuthHeader>"\
89 "</soap:Header>"\
90 "<soap:Body>"\
91 "<ABFindAll xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
92 "<abId>00000000-0000-0000-0000-000000000000</abId>"\
93 "<abView>Full</abView>"\
94 "<dynamicItemView>Gleam</dynamicItemView>"\
95 "<dynamicItemLastChange>0001-01-01T00:00:00.0000000-08:00</dynamicItemLastChange>"\
96 "</ABFindAll>"\
97 "</soap:Body>"\
98 "</soap:Envelope>"
99
100 typedef struct _MsnContact MsnContact;
101
102 struct _MsnContact
103 {
104 MsnSession *session;
105
106 MsnSoapConn *soapconn;
107 };
108
109 /*function prototype*/
110 MsnContact * msn_contact_new(MsnSession *session);
111 void msn_get_contact_list(MsnContact * contact);
112 void msn_contact_connect(MsnContact *contact);
113
114 void msn_contact_destroy(MsnContact *contact);
115 void msn_get_contact_list(MsnContact * contact);
116
117 #endif/* _MSN_CMDPROC_H_*/
118