summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_instances.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2013-05-13 18:30:05 +0000
committerAlexander Lantsev <aunsane@gmail.com>2013-05-13 18:30:05 +0000
commit2a1e6f05aa9fcc4dfe642bd42aeb175e3958d4b3 (patch)
tree1f0195caf23d086ecae10fc75b11fa61d85e9a66 /protocols/Skype/src/skype_instances.cpp
parent59651e97603936fc7179864506caa1818e260c76 (diff)
Merged revision(s) from branches/unsane/skype_test:
- CSkypeProto is derived of Skype class now - chat events moved to skype_chat.cpp - fixed chat message timestamp - fixed #331, #332 git-svn-id: http://svn.miranda-ng.org/main/trunk@4644 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_instances.cpp')
-rw-r--r--protocols/Skype/src/skype_instances.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/protocols/Skype/src/skype_instances.cpp b/protocols/Skype/src/skype_instances.cpp
index 5232bd7cc8..5a49149ea8 100644
--- a/protocols/Skype/src/skype_instances.cpp
+++ b/protocols/Skype/src/skype_instances.cpp
@@ -20,6 +20,37 @@ CSkypeProto* CSkypeProto::InitSkypeProto(const char* protoName, const wchar_t* u
}
CSkypeProto *ppro = new CSkypeProto(protoName, userName);
+
+ VARST profilename( _T("%miranda_profilename%"));
+
+ if ( !ppro->StartSkypeRuntime((TCHAR *)profilename))
+ {
+ CSkypeProto::ShowNotification(::TranslateT("Did not unpack SkypeKit.exe."));
+ return NULL;
+ }
+
+ char *keyPair = ppro->LoadKeyPair();
+ if ( !keyPair)
+ {
+ CSkypeProto::ShowNotification(::TranslateT("Initialization key corrupted or not valid."));
+ return NULL;
+ }
+
+ TransportInterface::Status status = ppro->init(keyPair, "127.0.0.1", ppro->runtimePort);
+ if (status != TransportInterface::OK)
+ {
+ CSkypeProto::ShowNotification(::TranslateT("SkypeKit did not initialize."));
+ return NULL;
+ }
+
+ free(keyPair);
+
+ if ( !ppro->start())
+ {
+ ::MessageBox(NULL, TranslateT("SkypeKit did not start."), _T(MODULE), MB_OK | MB_ICONERROR);
+ return NULL;
+ }
+
CSkypeProto::instanceList.insert(ppro);
return ppro;
@@ -27,6 +58,8 @@ CSkypeProto* CSkypeProto::InitSkypeProto(const char* protoName, const wchar_t* u
int CSkypeProto::UninitSkypeProto(CSkypeProto* ppro)
{
+ ppro->StopSkypeRuntime();
+
CSkypeProto::instanceList.remove(ppro);
delete ppro;