From 4deaf28bfaf2a71686e0ef2e3b494ab5b807311b Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Mon, 1 Oct 2012 19:25:45 +0000 Subject: - netlib funcs moved to skype_netlib.cpp - some minor changes git-svn-id: http://svn.miranda-ng.org/main/trunk@1753 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/src/skype_proto.cpp | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'protocols/Skype/src/skype_proto.cpp') diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp index 962dce0167..33bb6e7f9e 100644 --- a/protocols/Skype/src/skype_proto.cpp +++ b/protocols/Skype/src/skype_proto.cpp @@ -13,25 +13,17 @@ CSkypeProto::CSkypeProto(const char* protoName, const TCHAR* userName) this->signin_lock = CreateMutex(0, false, 0); this->SetAllContactStatuses(ID_STATUS_OFFLINE); - TCHAR name[128]; - mir_sntprintf(name, SIZEOF(name), TranslateT("%s connection"), this->m_tszUserName); + this->InitNetLib(); - NETLIBUSER nlu = {0}; - nlu.cbSize = sizeof( nlu ); - nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_TCHAR; // | NUF_HTTPGATEWAY; - nlu.ptszDescriptiveName = name; - nlu.szSettingsModule = m_szModuleName; - this->hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu); - - this->Log("Setting protocol/module name to '%s/%s'", m_szProtoName, m_szModuleName); + //->SetOnChangeCallback((OnContactChangeFunc)&CSkypeProto::OnContactChanged, this); + //.SetOnChangeCallback((OnContactChangeFunc)&CSkypeProto::OnContactChanged, this); this->CreateService(PS_CREATEACCMGRUI, &CSkypeProto::OnAccountManagerInit); } CSkypeProto::~CSkypeProto() { - Netlib_CloseHandle(this->hNetlibUser); - this->hNetlibUser = NULL; + this->UninitNetLib(); CloseHandle(this->signin_lock); @@ -42,7 +34,7 @@ CSkypeProto::~CSkypeProto() HANDLE __cdecl CSkypeProto::AddToList(int flags, PROTOSEARCHRESULT* psr) { - if (psr->cbSize != sizeof(PROTOSEARCHRESULT)) + //if (psr->cbSize != sizeof(PROTOSEARCHRESULT)) return 0; //return this->AddToListBySkypeLogin(psr->id, psr->nick, psr->firstName, psr->lastName, flags); @@ -212,9 +204,12 @@ void __cdecl CSkypeProto::SignIn(void*) this->account->LoginWithPassword(mir_u2a(this->password), false, false); this->account->BlockWhileLoggingIn(); + + //CContact::Ref()->SetOnChangeCallback((OnContactChangeFunc)&CSkypeProto::OnContactChanged, this); + this->SetStatus(this->m_iDesiredStatus); this->ForkThread(&CSkypeProto::LoadContactList, this); //this->LoadContactList(this); ReleaseMutex(this->signin_lock); -} +} \ No newline at end of file -- cgit v1.2.3