Removed __declspec from msn and yahoo plugins, updated libmsn to the latest version

This commit is contained in:
barrett 2012-02-26 03:35:45 +00:00
parent 1930170620
commit d86051bdfe
23 changed files with 195 additions and 317 deletions

View File

@ -24,5 +24,5 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "authdata.h"
#include <authdata.h>

View File

@ -26,7 +26,7 @@
*/
#include <string>
#include "passport.h"
#include <passport.h>
#include "libmsn_export.h"

View File

@ -22,7 +22,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "buddy.h"
#include <buddy.h>
#include <cassert>
namespace MSN

View File

@ -29,7 +29,7 @@
#include <list>
#include <vector>
#include <map>
#include "passport.h"
#include <passport.h>
#include "libmsn_export.h"

View File

@ -22,12 +22,12 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "connection.h"
#include "errorcodes.h"
#include "util.h"
#include "passport.h"
#include "externals.h"
#include "notificationserver.h"
#include <connection.h>
#include <errorcodes.h>
#include <util.h>
#include <passport.h>
#include <externals.h>
#include <notificationserver.h>
#ifndef WIN32
#include <unistd.h>
#include <sys/types.h>

View File

@ -29,7 +29,6 @@
#include <vector>
#include <map>
#include <stdexcept>
#include <sstream>
#ifdef _MSC_VER
#pragma warning( disable : 4290 )

View File

@ -27,7 +27,7 @@
#include <string>
#include <list>
#include "switchboardserver.h"
#include <switchboardserver.h>
#include "libmsn_export.h"

View File

@ -25,9 +25,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "buddy.h"
#include "util.h"
#include <config.h>
#include <buddy.h>
#include <util.h>
#include "libmsn_export.h"

View File

@ -23,9 +23,9 @@
*/
#include <stdlib.h>
#include "message.h"
#include "errorcodes.h"
#include "util.h"
#include <message.h>
#include <errorcodes.h>
#include <util.h>
#include <iomanip>
#include <cassert>
@ -124,7 +124,7 @@ namespace MSN
{
std::string color = this->getFormatInfo()["CO"];
assert(color.size() <= 6 && color.size() >= 0);
color.insert(0UL, 6 - color.size(), '0');
color.insert(0U, 6 - color.size(), '0');
int r = 0, g = 0, b = 0;
b = strtol(color.substr(0, 2).c_str(), NULL, 16);
@ -167,7 +167,7 @@ namespace MSN
void Message::setColor(std::string color)
{
color.insert(0UL, 6 - color.size(), '0');
color.insert(0U, 6 - color.size(), '0');
int r = 0, g = 0, b = 0;
r = strtol(color.substr(0, 2).c_str(), NULL, 16);

View File

@ -25,14 +25,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "authdata.h"
#include "connection.h"
#include "errorcodes.h"
#include "externals.h"
#include "message.h"
#include "notificationserver.h"
#include "switchboardserver.h"
#include "util.h"
#include "soap.h"
#include <authdata.h>
#include <connection.h>
#include <errorcodes.h>
#include <externals.h>
#include <message.h>
#include <notificationserver.h>
#include <switchboardserver.h>
#include <util.h>
#include <soap.h>
#endif

View File

@ -19,10 +19,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "util.h"
#include <util.h>
#include <openssl/sha.h>
#include "msnobject.h"
#include "xmlParser.h"
#include <msnobject.h>
#include <xmlParser.h>
#include <iostream>
#include <fstream>

View File

@ -22,13 +22,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "notificationserver.h"
#include "errorcodes.h"
#include "externals.h"
#include "md5.h"
#include "util.h"
#include "soap.h"
#include <config.h>
#include <notificationserver.h>
#include <errorcodes.h>
#include <externals.h>
#include <md5.h>
#include <util.h>
#include <soap.h>
#include <algorithm>
#include <cctype>
#include <cassert>

View File

@ -25,15 +25,15 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "connection.h"
#include "authdata.h"
#include "errorcodes.h"
#include "buddy.h"
#include "passport.h"
#include <connection.h>
#include <authdata.h>
#include <errorcodes.h>
#include <buddy.h>
#include <passport.h>
#include <stdexcept>
#include "externals.h"
#include "msnobject.h"
#include "soap.h"
#include <externals.h>
#include <msnobject.h>
#include <soap.h>
#include <cassert>
#include <sys/types.h>

View File

@ -20,12 +20,12 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "notificationserver.h"
#include "errorcodes.h"
#include "externals.h"
#include "util.h"
#include "p2p.h"
#include "xmlParser.h"
#include <notificationserver.h>
#include <errorcodes.h>
#include <externals.h>
#include <util.h>
#include <p2p.h>
#include <xmlParser.h>
#include <cctype>
#include <iostream>

View File

@ -23,12 +23,12 @@
*/
#include "connection.h"
#include "authdata.h"
#include "errorcodes.h"
#include "buddy.h"
#include "passport.h"
#include "util.h"
#include <connection.h>
#include <authdata.h>
#include <errorcodes.h>
#include <buddy.h>
#include <passport.h>
#include <util.h>
#include <stdexcept>
#include <vector>

View File

@ -22,7 +22,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "passport.h"
#include <passport.h>
#include <stdio.h>
namespace MSN

View File

@ -22,12 +22,12 @@
#include "notificationserver.h"
#include "errorcodes.h"
#include "externals.h"
#include "md5.h"
#include "util.h"
#include "soap.h"
#include <notificationserver.h>
#include <errorcodes.h>
#include <externals.h>
#include <md5.h>
#include <util.h>
#include <soap.h>
#include <cctype>
#include <iostream>
@ -314,25 +314,17 @@ namespace MSN {
void Soap::parseGetTicketsResponse(std::string response)
{
XMLNode domTree = XMLNode::parseString( response.c_str() );
XMLNode response1 = XMLNode::parseString( response.c_str() );
if(http_response_code == "301")
{
const char *preferredHostName = domTree.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("PreferredHostName").getText();
if(preferredHostName)
{
Soap *soapConnection = new Soap(notificationServer, sitesToAuthList);
std::string newdomain(preferredHostName);
soapConnection->actionDomains[AUTH] = newdomain;
soapConnection->setMBI(mbi);
Soap *soapConnection = manageSoapRedirect(response1, AUTH);
soapConnection->getTickets(this->passport, this->password, this->policy);
}
return;
}
// get the header information from the DOM
XMLNode tokens = domTree.getChildNode("S:Envelope").getChildNode("S:Body").getChildNode("wst:RequestSecurityTokenResponseCollection");
const char *reason = domTree.getChildNode("S:Envelope").getChildNode("S:Fault").getChildNode("faultcode").getText();
XMLNode tokens = response1.getChildNode("S:Envelope").getChildNode("S:Body").getChildNode("wst:RequestSecurityTokenResponseCollection");
const char *reason = response1.getChildNode("S:Envelope").getChildNode("S:Fault").getChildNode("faultcode").getText();
if(reason)
{
std::string reason1(reason);
@ -345,7 +337,7 @@ namespace MSN {
}
if(reason1 == "psf:Redirect")
{
const char *newurl = domTree.getChildNode("S:Envelope").getChildNode("S:Fault").getChildNode("psf:redirectUrl").getText();
const char *newurl = response1.getChildNode("S:Envelope").getChildNode("S:Fault").getChildNode("psf:redirectUrl").getText();
Soap *soapConnection = new Soap(notificationServer);
std::string newurl1(newurl);
@ -480,22 +472,14 @@ namespace MSN {
void Soap::parseEnableContactOnAddressBookResponse(std::string response)
{
XMLNode response1 = XMLNode::parseString(response.c_str());
if(http_response_code == "301" )
{
const char *preferredHostName = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("PreferredHostName").getText();
if(preferredHostName)
{
Soap *soapConnection = new Soap(notificationServer, sitesToAuthList);
std::string newdomain(preferredHostName);
soapConnection->actionDomains[ENABLE_CONTACT_ON_ADDRESSBOOK] = newdomain;
soapConnection->setMBI(mbi);
Soap *soapConnection = manageSoapRedirect(response1, ENABLE_CONTACT_ON_ADDRESSBOOK);
soapConnection->enableContactOnAddressBook(this->contactId, this->tempPassport, this->myDisplayName);
}
return;
}
XMLNode version = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("Version");
const char *ver = version.getText();
if(ver)
@ -576,22 +560,14 @@ namespace MSN {
void Soap::parseDelContactFromAddressBookResponse(std::string response)
{
XMLNode response1 = XMLNode::parseString(response.c_str());
if(http_response_code == "301" )
{
const char *preferredHostName = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("PreferredHostName").getText();
if(preferredHostName)
{
Soap *soapConnection = new Soap(notificationServer, sitesToAuthList);
std::string newdomain(preferredHostName);
soapConnection->actionDomains[DEL_CONTACT_FROM_ADDRESSBOOK] = newdomain;
soapConnection->setMBI(mbi);
Soap *soapConnection = manageSoapRedirect(response1, DEL_CONTACT_FROM_ADDRESSBOOK);
soapConnection->delContactFromAddressBook(this->contactId, this->tempPassport);
}
return;
}
XMLNode version = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("Version");
const char *ver = version.getText();
if(ver)
@ -683,22 +659,14 @@ namespace MSN {
void Soap::parseDisableContactFromAddressBookResponse(std::string response)
{
XMLNode response1 = XMLNode::parseString(response.c_str());
if(http_response_code == "301" )
{
const char *preferredHostName = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("PreferredHostName").getText();
if(preferredHostName)
{
Soap *soapConnection = new Soap(notificationServer, sitesToAuthList);
std::string newdomain(preferredHostName);
soapConnection->actionDomains[DISABLE_CONTACT_ON_ADDRESSBOOK] = newdomain;
soapConnection->setMBI(mbi);
Soap *soapConnection = manageSoapRedirect(response1, DISABLE_CONTACT_ON_ADDRESSBOOK);
soapConnection->disableContactFromAddressBook(this->contactId, this->tempPassport);
}
return;
}
XMLNode version = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("Version");
const char *ver = version.getText();
if(ver)
@ -797,18 +765,11 @@ namespace MSN {
void Soap::parseAddContactToAddressBookResponse(std::string response)
{
XMLNode response1 = XMLNode::parseString(response.c_str());
if(http_response_code == "301" )
{
const char *preferredHostName = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("PreferredHostName").getText();
if(preferredHostName)
{
Soap *soapConnection = new Soap(notificationServer, sitesToAuthList);
std::string newdomain(preferredHostName);
soapConnection->actionDomains[ADD_CONTACT_TO_ADDRESSBOOK] = newdomain;
soapConnection->setMBI(mbi);
Soap *soapConnection = manageSoapRedirect(response1, ADD_CONTACT_TO_ADDRESSBOOK);
soapConnection->addContactToAddressBook(this->tempPassport, this->tempDisplayName);
}
return;
}
@ -902,22 +863,14 @@ namespace MSN {
void Soap::parseAddContactToGroupResponse(std::string response)
{
XMLNode response1 = XMLNode::parseString(response.c_str());
if(http_response_code == "301" )
{
const char *preferredHostName = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("PreferredHostName").getText();
if(preferredHostName)
{
Soap *soapConnection = new Soap(notificationServer, sitesToAuthList);
std::string newdomain(preferredHostName);
soapConnection->actionDomains[ADD_CONTACT_TO_GROUP] = newdomain;
soapConnection->setMBI(mbi);
Soap *soapConnection = manageSoapRedirect(response1, ADD_CONTACT_TO_GROUP);
soapConnection->addContactToGroup(this->groupId, this->contactId);
}
return;
}
XMLNode version = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("Version");
const char *ver = version.getText();
if(ver)
@ -1017,22 +970,14 @@ namespace MSN {
void Soap::parseAddGroupResponse(std::string response)
{
XMLNode response1 = XMLNode::parseString(response.c_str());
if(http_response_code == "301" )
{
const char *preferredHostName = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("PreferredHostName").getText();
if(preferredHostName)
{
Soap *soapConnection = new Soap(notificationServer, sitesToAuthList);
std::string newdomain(preferredHostName);
soapConnection->actionDomains[ADD_GROUP] = newdomain;
soapConnection->setMBI(mbi);
Soap *soapConnection = manageSoapRedirect(response1, ADD_GROUP);
soapConnection->addGroup(this->groupName);
}
return;
}
XMLNode version = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("Version");
const char *ver = version.getText();
if(ver)
@ -1116,22 +1061,14 @@ namespace MSN {
void Soap::parseDelGroupResponse(std::string response)
{
XMLNode response1 = XMLNode::parseString(response.c_str());
if(http_response_code == "301" )
{
const char *preferredHostName = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("PreferredHostName").getText();
if(preferredHostName)
{
Soap *soapConnection = new Soap(notificationServer, sitesToAuthList);
std::string newdomain(preferredHostName);
soapConnection->actionDomains[DEL_GROUP] = newdomain;
soapConnection->setMBI(mbi);
Soap *soapConnection = manageSoapRedirect(response1, DEL_GROUP);
soapConnection->delGroup(this->groupId);
}
return;
}
XMLNode version = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("Version");
const char *ver = version.getText();
if(ver)
@ -1220,22 +1157,14 @@ namespace MSN {
void Soap::parseRenameGroupResponse(std::string response)
{
XMLNode response1 = XMLNode::parseString(response.c_str());
if(http_response_code == "301" )
{
const char *preferredHostName = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("PreferredHostName").getText();
if(preferredHostName)
{
Soap *soapConnection = new Soap(notificationServer, sitesToAuthList);
std::string newdomain(preferredHostName);
soapConnection->actionDomains[RENAME_GROUP] = newdomain;
soapConnection->setMBI(mbi);
Soap *soapConnection = manageSoapRedirect(response1, RENAME_GROUP);
soapConnection->renameGroup(this->groupId, this->groupName);
}
return;
}
XMLNode version = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("Version");
const char *ver = version.getText();
if(ver)
@ -1323,22 +1252,14 @@ namespace MSN {
void Soap::parseDelContactFromGroupResponse(std::string response)
{
XMLNode response1 = XMLNode::parseString(response.c_str());
if(http_response_code == "301" )
{
const char *preferredHostName = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("PreferredHostName").getText();
if(preferredHostName)
{
Soap *soapConnection = new Soap(notificationServer, sitesToAuthList);
std::string newdomain(preferredHostName);
soapConnection->actionDomains[DEL_CONTACT_FROM_GROUP] = newdomain;
soapConnection->setMBI(mbi);
Soap *soapConnection = manageSoapRedirect(response1, DEL_CONTACT_FROM_GROUP);
soapConnection->delContactFromGroup(this->groupId, this->contactId);
}
return;
}
XMLNode version = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("Version");
const char *ver = version.getText();
if(ver)
@ -1454,18 +1375,11 @@ namespace MSN {
void Soap::parseAddContactToListResponse(std::string response)
{
XMLNode response1 = XMLNode::parseString(response.c_str());
if(http_response_code == "301")
{
const char *preferredHostName = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("PreferredHostName").getText();
if(preferredHostName)
{
Soap *soapConnection = new Soap(notificationServer, sitesToAuthList);
std::string newdomain(preferredHostName);
soapConnection->actionDomains[ADD_CONTACT_TO_LIST] = newdomain;
soapConnection->setMBI(mbi);
Soap *soapConnection = manageSoapRedirect(response1, ADD_CONTACT_TO_LIST);
soapConnection->addContactToList(this->tempPassport, this->tempList);
}
return;
}
@ -1585,22 +1499,14 @@ namespace MSN {
void Soap::parseRemoveContactFromListResponse(std::string response)
{
XMLNode response1 = XMLNode::parseString(response.c_str());
if(http_response_code == "301")
{
const char *preferredHostName = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("PreferredHostName").getText();
if(preferredHostName)
{
Soap *soapConnection = new Soap(notificationServer, sitesToAuthList);
std::string newdomain(preferredHostName);
soapConnection->actionDomains[DEL_CONTACT_FROM_LIST] = newdomain;
soapConnection->setMBI(mbi);
Soap *soapConnection = manageSoapRedirect(response1, DEL_CONTACT_FROM_LIST);
soapConnection->removeContactFromList(this->tempPassport, this->tempList);
}
return;
}
XMLNode version = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("Version");
const char *ver = version.getText();
if(ver)
@ -1709,20 +1615,11 @@ namespace MSN {
XMLNode response1 = XMLNode::parseString(response.c_str());
if(http_response_code == "301" )
{
const char *preferredHostName = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("PreferredHostName").getText();
if(preferredHostName)
{
Soap *soapConnection = new Soap(notificationServer, sitesToAuthList);
std::string newdomain(preferredHostName);
soapConnection->actionDomains[GET_LISTS] = newdomain;
soapConnection->setMBI(mbi);
Soap *soapConnection = manageSoapRedirect(response1, GET_LISTS);
soapConnection->getLists(this->listInfo);
}
return;
}
XMLNode Services = response1.getChildNode("soap:Envelope").getChildNode("soap:Body").getChildNode("FindMembershipResponse").getChildNode("FindMembershipResult").getChildNode("Services");
int nServices = Services.nChildNode("Service");
@ -1869,16 +1766,8 @@ namespace MSN {
XMLNode response1 = XMLNode::parseString(response.c_str());
if(http_response_code == "301" )
{
const char *preferredHostName = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("PreferredHostName").getText();
if(preferredHostName)
{
Soap *soapConnection = new Soap(notificationServer, sitesToAuthList);
std::string newdomain(preferredHostName);
soapConnection->actionDomains[GET_ADDRESS_BOOK] = newdomain;
soapConnection->setMBI(mbi);
Soap *soapConnection = manageSoapRedirect(response1, GET_ADDRESS_BOOK);
soapConnection->getAddressBook(this->listInfo);
}
return;
}
@ -2075,20 +1964,11 @@ namespace MSN {
XMLNode response1 = XMLNode::parseString(response.c_str());
if(http_response_code == "301" )
{
const char *preferredHostName = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("PreferredHostName").getText();
if(preferredHostName)
{
Soap *soapConnection = new Soap(notificationServer, sitesToAuthList);
std::string newdomain(preferredHostName);
soapConnection->actionDomains[RETRIEVE_OIM] = newdomain;
soapConnection->setMBI(mbi);
Soap *soapConnection = manageSoapRedirect(response1, RETRIEVE_OIM);
soapConnection->getOIM(this->oim_id, this->markAsRead);
}
return;
}
const char* msg = response1.getChildNode("soap:Envelope").getChildNode("soap:Body").getChildNode("GetMessageResponse").getChildNode("GetMessageResult").getText();
if(msg)
{
@ -2160,18 +2040,11 @@ namespace MSN {
void Soap::parseDeleteOIMResponse(std::string response)
{
XMLNode response1 = XMLNode::parseString(response.c_str());
if(http_response_code == "301" )
{
const char *preferredHostName = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("PreferredHostName").getText();
if(preferredHostName)
{
Soap *soapConnection = new Soap(notificationServer, sitesToAuthList);
std::string newdomain(preferredHostName);
soapConnection->actionDomains[DELETE_OIM] = newdomain;
soapConnection->setMBI(mbi);
Soap *soapConnection = manageSoapRedirect(response1, DELETE_OIM);
soapConnection->deleteOIM(this->oim_id);
}
return;
}
@ -2225,22 +2098,14 @@ namespace MSN {
void Soap::parseGetMailDataResponse(std::string response)
{
XMLNode response1 = XMLNode::parseString(response.c_str());
if(http_response_code == "301")
{
const char *preferredHostName = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("PreferredHostName").getText();
if(preferredHostName)
{
Soap *soapConnection = new Soap(notificationServer, sitesToAuthList);
std::string newdomain(preferredHostName);
soapConnection->actionDomains[RETRIEVE_OIM_MAIL_DATA] = newdomain;
soapConnection->setMBI(mbi);
Soap *soapConnection = manageSoapRedirect(response1, RETRIEVE_OIM_MAIL_DATA);
soapConnection->getMailData();
}
return;
}
// oh my god! xml text as a field of a xml node! I cant believe it!
std::string maildata = response1.getChildNode("soap:Envelope").getChildNode("soap:Body").getChildNode("GetMetadataResponse").getChildNode("MD").createXMLString(false);
if(maildata.empty())
@ -2349,18 +2214,11 @@ namespace MSN {
OIM oim = this->oim;
// probably we need to generate a new lockkey
XMLNode response1 = XMLNode::parseString(response.c_str());
if(http_response_code == "301")
{
const char *preferredHostName = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("PreferredHostName").getText();
if(preferredHostName)
{
Soap *soapConnection = new Soap(notificationServer, sitesToAuthList);
std::string newdomain(preferredHostName);
soapConnection->actionDomains[GENERATE_LOCKKEY] = newdomain;
soapConnection->setMBI(mbi);
Soap *soapConnection = manageSoapRedirect(response1, GENERATE_LOCKKEY);
soapConnection->generateLockkey(this->oim);
}
return;
}
@ -2478,18 +2336,11 @@ namespace MSN {
{
OIM oim = this->oim;
XMLNode response1 = XMLNode::parseString(response.c_str());
if(http_response_code == "301")
{
const char *preferredHostName = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("PreferredHostName").getText();
if(preferredHostName)
{
Soap *soapConnection = new Soap(notificationServer, sitesToAuthList);
std::string newdomain(preferredHostName);
soapConnection->actionDomains[SEND_OIM] = newdomain;
soapConnection->setMBI(mbi);
Soap *soapConnection = manageSoapRedirect(response1, SEND_OIM);
soapConnection->sendOIM(this->oim, this->lockkey);
}
return;
}
@ -2576,16 +2427,8 @@ namespace MSN {
XMLNode response1 = XMLNode::parseString(response.c_str());
if(http_response_code == "301" )
{
const char *preferredHostName = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("PreferredHostName").getText();
if(preferredHostName)
{
Soap *soapConnection = new Soap(notificationServer, sitesToAuthList);
std::string newdomain(preferredHostName);
soapConnection->actionDomains[CHANGE_DISPLAYNAME] = newdomain;
soapConnection->setMBI(mbi);
Soap *soapConnection = manageSoapRedirect(response1, CHANGE_DISPLAYNAME);
soapConnection->changeDisplayName(this->tempDisplayName);
}
return;
}
@ -2698,6 +2541,34 @@ namespace MSN {
delete this;
}
Soap* Soap::manageSoapRedirect(XMLNode response1, soapAction action)
{
Soap *soapConnection = new Soap(notificationServer, sitesToAuthList);
Message::Headers headers = Message::Headers(http_header_response);
std::string newdomain;
std::string location = headers["Location"];
const char *preferredHostName = response1.getChildNode("soap:Envelope").getChildNode("soap:Header").getChildNode("ServiceHeader").getChildNode("PreferredHostName").getText();
if(preferredHostName)
{
std::string newdomain(preferredHostName);
soapConnection->actionDomains[action] = newdomain;
}
if (location.size())
{
std::string newurl1(location);
std::vector<std::string> a = splitString(newurl1, "/");
std::string newdomain = splitString(a[1], "/")[0];
soapConnection->actionDomains[action] = newdomain;
std::vector<std::string> postpath = splitString(newurl1, newdomain);
soapConnection->actionPOSTURLs[action] = postpath[1];
}
soapConnection->setMBI(mbi);
return soapConnection;
}
void Soap::disconnect()
{
}

View File

@ -23,18 +23,20 @@
*/
#include "connection.h"
#include "authdata.h"
#include "errorcodes.h"
#include "buddy.h"
#include "passport.h"
#include <connection.h>
#include <authdata.h>
#include <errorcodes.h>
#include <buddy.h>
#include <passport.h>
#include <stdexcept>
#include "externals.h"
#include <externals.h>
#include <iostream>
#include <vector>
#include <map>
#include "xmlParser.h"
#include "libmsn_export.h"
namespace MSN
@ -206,6 +208,8 @@ public:
void changeDisplayName(std::string newDisplayName);
void parseChangeDisplayNameResponse(std::string);
Soap* manageSoapRedirect(XMLNode response1, soapAction action);
virtual void dispatchCommand(std::vector<std::string> &) {};
virtual void connect(const std::string &, unsigned int) {};
virtual void disconnect();

View File

@ -22,11 +22,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "switchboardserver.h"
#include "notificationserver.h"
#include "errorcodes.h"
#include "externals.h"
#include "util.h"
#include <switchboardserver.h>
#include <notificationserver.h>
#include <errorcodes.h>
#include <externals.h>
#include <util.h>
#include <stdio.h>
#include <string.h>

View File

@ -25,11 +25,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "message.h"
#include "authdata.h"
#include "connection.h"
#include "passport.h"
#include "p2p.h"
#include <message.h>
#include <authdata.h>
#include <connection.h>
#include <passport.h>
#include <p2p.h>
#include <string>
#include <cassert>

View File

@ -22,7 +22,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <iostream>
#include "util.h"
#include <util.h>
#include <unistd.h>
#include <sstream>
#include <errno.h>
#include <cctype>
@ -30,9 +31,8 @@
#include <openssl/rand.h>
#include <cstring>
#include <sys/timeb.h>
#include <posix/unistd.h>
#include "md5.h"
#include "libsiren/siren7.h"
#include <md5.h>
#include <libsiren/siren7.h>
#ifdef _WIN32
#define random rand

View File

@ -1,8 +1,10 @@
#include "MSN.h"
extern "C" __declspec(dllexport) CayaProtocol* protocol();
extern "C" __declspec(dllexport) const char* signature();
extern "C" __declspec(dllexport) const char* friendly_signature();
extern "C" {
CayaProtocol* protocol();
const char* signature();
const char* friendly_signature();
}
CayaProtocol*
protocol()

View File

@ -33,10 +33,12 @@
const char * kProtocolSignature = "yahoo";
const char * kProtocolName = "Yahoo";
extern "C" __declspec(dllexport) CayaProtocol* protocol();
extern "C" __declspec(dllexport) const char* signature();
extern "C" __declspec(dllexport) const char* friendly_signature();
extern "C" void register_callbacks();
extern "C" {
CayaProtocol* protocol();
const char* signature();
const char* friendly_signature();
void register_callbacks();
}
CayaProtocol*
protocol()