Sun, 15 Apr 2007 02:10:37 +0000
propagate from branch 'im.pidgin.gaim' (head b2836a24d81e7a1bd1d21b3aea8794b094391344)
to branch 'im.pidgin.rlaager.merging.soc-msnp13-to-svn18164' (head 463b4fa9f067b279f843520d95a822adc86a0a1b)
|
9198
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
1 | /** |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
2 | * @file nexus.h MSN Nexus functions |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
3 | * |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
4 | * gaim |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
5 | * |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
6 | * Gaim is the legal property of its developers, whose names are too numerous |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
7 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
8 | * source distribution. |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
9 | * |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
10 | * This program is free software; you can redistribute it and/or modify |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
11 | * it under the terms of the GNU General Public License as published by |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
12 | * the Free Software Foundation; either version 2 of the License, or |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
13 | * (at your option) any later version. |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
14 | * |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
15 | * This program is distributed in the hope that it will be useful, |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
18 | * GNU General Public License for more details. |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
19 | * |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
20 | * You should have received a copy of the GNU General Public License |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
21 | * along with this program; if not, write to the Free Software |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
23 | */ |
|
8171
c3c43a25caec
[gaim-migrate @ 8884]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff
changeset
|
24 | #ifndef _MSN_NEXUS_H_ |
|
c3c43a25caec
[gaim-migrate @ 8884]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff
changeset
|
25 | #define _MSN_NEXUS_H_ |
|
c3c43a25caec
[gaim-migrate @ 8884]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff
changeset
|
26 | |
| 13854 | 27 | #include "soap.h" |
| 28 | ||
| 13907 | 29 | /*#define MSN_TWN_SERVER "loginnet.passport.com"*/ |
| 30 | #define MSN_TWN_SERVER "login.live.com" | |
| 13853 | 31 | |
| 32 | #define TWN_START_TOKEN "<wsse:BinarySecurityToken Id=\"PPToken1\">" | |
| 33 | #define TWN_END_TOKEN "</wsse:BinarySecurityToken>" | |
| 34 | ||
| 35 | #define TWN_POST_URL "/RST.srf" | |
| 36 | #define TWN_ENVELOP_TEMPLATE "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"\ | |
| 37 | "<Envelope xmlns=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:wsse=\"http://schemas.xmlsoap.org/ws/2003/06/secext\" xmlns:saml=\"urn:oasis:names:tc:SAML:1.0:assertion\" xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2002/12/policy\" xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\" xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/03/addressing\" xmlns:wssc=\"http://schemas.xmlsoap.org/ws/2004/04/sc\" xmlns:wst=\"http://schemas.xmlsoap.org/ws/2004/04/trust\">"\ | |
| 38 | "<Header>"\ | |
| 39 | "<ps:AuthInfo xmlns:ps=\"http://schemas.microsoft.com/Passport/SoapServices/PPCRL\" Id=\"PPAuthInfo\">"\ | |
| 40 | "<ps:HostingApp>{3:B}</ps:HostingApp>"\ | |
| 41 | "<ps:BinaryVersion>4</ps:BinaryVersion>"\ | |
| 42 | "<ps:UIVersion>1</ps:UIVersion>"\ | |
| 43 | "<ps:Cookies></ps:Cookies>"\ | |
| 44 | "<ps:RequestParams>AQAAAAIAAABsYwQAAAAzMDg0</ps:RequestParams>"\ | |
| 45 | "</ps:AuthInfo>"\ | |
| 46 | "<wsse:Security>"\ | |
| 47 | "<wsse:UsernameToken Id=\"user\">"\ | |
| 48 | "<wsse:Username>%s</wsse:Username>"\ | |
| 49 | "<wsse:Password>%s</wsse:Password>"\ | |
| 50 | "</wsse:UsernameToken>"\ | |
| 51 | "</wsse:Security>"\ | |
| 13907 | 52 | "</Header>"\ |
| 53 | "<Body>"\ | |
| 13853 | 54 | "<ps:RequestMultipleSecurityTokens xmlns:ps=\"http://schemas.microsoft.com/Passport/SoapServices/PPCRL\" Id=\"RSTS\">"\ |
| 55 | "<wst:RequestSecurityToken Id=\"RST0\">"\ | |
| 56 | "<wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType>"\ | |
| 57 | "<wsp:AppliesTo>"\ | |
| 58 | "<wsa:EndpointReference>"\ | |
| 59 | "<wsa:Address>http://Passport.NET/tb</wsa:Address>"\ | |
| 60 | "</wsa:EndpointReference>"\ | |
| 61 | "</wsp:AppliesTo>"\ | |
| 62 | "</wst:RequestSecurityToken>"\ | |
| 63 | "<wst:RequestSecurityToken Id=\"RST1\">"\ | |
| 64 | "<wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType>"\ | |
| 65 | "<wsp:AppliesTo>"\ | |
| 66 | "<wsa:EndpointReference>"\ | |
| 67 | "<wsa:Address>messenger.msn.com</wsa:Address>"\ | |
| 68 | "</wsa:EndpointReference>"\ | |
| 69 | "</wsp:AppliesTo>"\ | |
| 70 | "<wsse:PolicyReference URI=\"?%s\">"\ | |
| 71 | "</wsse:PolicyReference>"\ | |
| 72 | "</wst:RequestSecurityToken>"\ | |
| 73 | "</ps:RequestMultipleSecurityTokens>"\ | |
| 74 | "</Body>"\ | |
| 75 | "</Envelope>" | |
| 76 | ||
| 13907 | 77 | #define TWN_LIVE_START_TOKEN "<wsse:BinarySecurityToken Id=\"PPToken1\">" |
| 78 | #define TWN_LIVE_END_TOKEN "</wsse:BinarySecurityToken>" | |
| 79 | #define TWN_LIVE_ENVELOP_TEMPLATE "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"\ | |
| 80 | "<Envelope xmlns=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:wsse=\"http://schemas.xmlsoap.org/ws/2003/06/secext\" xmlns:saml=\"urn:oasis:names:tc:SAML:1.0:assertion\" xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2002/12/policy\" xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\" xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/03/addressing\" xmlns:wssc=\"http://schemas.xmlsoap.org/ws/2004/04/sc\" xmlns:wst=\"http://schemas.xmlsoap.org/ws/2004/04/trust\">"\ | |
| 81 | "<Header>"\ | |
| 82 | "<ps:AuthInfo xmlns:ps=\"http://schemas.microsoft.com/Passport/SoapServices/PPCRL\" Id=\"PPAuthInfo\">"\ | |
| 83 | "<ps:HostingApp>{7108E71A-9926-4FCB-BCC9-9A9D3F32E423}</ps:HostingApp>"\ | |
| 84 | "<ps:BinaryVersion>4</ps:BinaryVersion>"\ | |
| 85 | "<ps:UIVersion>1</ps:UIVersion>"\ | |
| 86 | "<ps:Cookies></ps:Cookies>"\ | |
| 87 | "<ps:RequestParams>AQAAAAIAAABsYwQAAAAyMDUy</ps:RequestParams>"\ | |
| 88 | "</ps:AuthInfo>"\ | |
| 89 | "<wsse:Security>"\ | |
| 90 | "<wsse:UsernameToken Id=\"user\">"\ | |
| 91 | "<wsse:Username>%s</wsse:Username>"\ | |
| 92 | "<wsse:Password>%s</wsse:Password>"\ | |
| 93 | "</wsse:UsernameToken>"\ | |
| 94 | "</wsse:Security>"\ | |
| 95 | "</Header>"\ | |
| 96 | "<Body>"\ | |
| 97 | "<ps:RequestMultipleSecurityTokens xmlns:ps=\"http://schemas.microsoft.com/Passport/SoapServices/PPCRL\" Id=\"RSTS\">"\ | |
| 98 | "<wst:RequestSecurityToken Id=\"RST0\">"\ | |
| 99 | "<wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType>"\ | |
| 100 | "<wsp:AppliesTo>"\ | |
| 101 | "<wsa:EndpointReference>"\ | |
| 102 | "<wsa:Address>http://Passport.NET/tb</wsa:Address>"\ | |
| 103 | "</wsa:EndpointReference>"\ | |
| 104 | "</wsp:AppliesTo>"\ | |
| 105 | "</wst:RequestSecurityToken>"\ | |
| 106 | "<wst:RequestSecurityToken Id=\"RST1\">"\ | |
| 107 | "<wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType>"\ | |
| 108 | "<wsp:AppliesTo>"\ | |
| 109 | "<wsa:EndpointReference>"\ | |
| 110 | "<wsa:Address>messenger.msn.com</wsa:Address>"\ | |
| 111 | "</wsa:EndpointReference>"\ | |
| 112 | "</wsp:AppliesTo>"\ | |
| 13908 | 113 | "<wsse:PolicyReference URI=\"?%s\"></wsse:PolicyReference>"\ |
| 13907 | 114 | "</wst:RequestSecurityToken>"\ |
| 115 | "<wst:RequestSecurityToken Id=\"RST2\">"\ | |
| 116 | "<wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType>"\ | |
| 117 | "<wsp:AppliesTo>"\ | |
| 118 | "<wsa:EndpointReference>"\ | |
| 119 | "<wsa:Address>contacts.msn.com</wsa:Address>"\ | |
| 120 | "</wsa:EndpointReference>"\ | |
| 121 | "</wsp:AppliesTo>"\ | |
| 122 | "<wsse:PolicyReference URI=\"?%s\"></wsse:PolicyReference>"\ | |
| 123 | " </wst:RequestSecurityToken>"\ | |
| 124 | "<wst:RequestSecurityToken Id=\"RST3\">"\ | |
| 125 | "<wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType>"\ | |
| 126 | "<wsp:AppliesTo>"\ | |
| 127 | "<wsa:EndpointReference>"\ | |
| 128 | "<wsa:Address>voice.messenger.msn.com</wsa:Address>"\ | |
| 129 | "</wsa:EndpointReference>"\ | |
| 130 | " </wsp:AppliesTo>"\ | |
| 131 | "<wsse:PolicyReference URI=\"?%s\"></wsse:PolicyReference>"\ | |
| 132 | "</wst:RequestSecurityToken>"\ | |
| 133 | "</ps:RequestMultipleSecurityTokens>"\ | |
| 134 | "</Body>"\ | |
| 135 | "</Envelope>" | |
| 136 | ||
|
8171
c3c43a25caec
[gaim-migrate @ 8884]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff
changeset
|
137 | typedef struct _MsnNexus MsnNexus; |
|
c3c43a25caec
[gaim-migrate @ 8884]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff
changeset
|
138 | |
|
c3c43a25caec
[gaim-migrate @ 8884]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff
changeset
|
139 | struct _MsnNexus |
|
c3c43a25caec
[gaim-migrate @ 8884]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff
changeset
|
140 | { |
|
c3c43a25caec
[gaim-migrate @ 8884]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff
changeset
|
141 | MsnSession *session; |
| 13878 | 142 | MsnSoapConn *soapconn; |
| 143 | char * challenge_data_str; | |
|
8171
c3c43a25caec
[gaim-migrate @ 8884]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff
changeset
|
144 | GHashTable *challenge_data; |
|
c3c43a25caec
[gaim-migrate @ 8884]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff
changeset
|
145 | }; |
|
c3c43a25caec
[gaim-migrate @ 8884]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff
changeset
|
146 | |
|
c3c43a25caec
[gaim-migrate @ 8884]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff
changeset
|
147 | void msn_nexus_connect(MsnNexus *nexus); |
|
c3c43a25caec
[gaim-migrate @ 8884]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff
changeset
|
148 | MsnNexus *msn_nexus_new(MsnSession *session); |
|
c3c43a25caec
[gaim-migrate @ 8884]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff
changeset
|
149 | void msn_nexus_destroy(MsnNexus *nexus); |
|
c3c43a25caec
[gaim-migrate @ 8884]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff
changeset
|
150 | |
|
8386
5b9e02f4c03d
[gaim-migrate @ 9114]
Mark Doliner <markdoliner@pidgin.im>
parents:
8171
diff
changeset
|
151 | #endif /* _MSN_NEXUS_H_ */ |