summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Skype/src/skype_utils.cpp')
-rw-r--r--protocols/Skype/src/skype_utils.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/protocols/Skype/src/skype_utils.cpp b/protocols/Skype/src/skype_utils.cpp
index ae973f5fad..99463853c3 100644
--- a/protocols/Skype/src/skype_utils.cpp
+++ b/protocols/Skype/src/skype_utils.cpp
@@ -127,4 +127,32 @@ HANDLE CSkypeProto::ForkThreadEx(SkypeThreadFunc pFunc, void *param, UINT* threa
this,
param,
threadID ? threadID : &lthreadID);
+}
+
+//
+
+int CSkypeProto::SkypeToMirandaLoginError(CAccount::LOGOUTREASON logoutReason)
+{
+ int loginError = 0;
+
+ // todo: rewrite!!
+
+ switch (logoutReason)
+ {
+ case CAccount::SERVER_OVERLOADED:
+ case CAccount::P2P_CONNECT_FAILED:
+ case CAccount::SERVER_CONNECT_FAILED:
+ loginError = LOGINERR_NOSERVER;
+ break;
+ case CAccount::HTTPS_PROXY_AUTH_FAILED:
+ case CAccount::SOCKS_PROXY_AUTH_FAILED:
+ loginError = LOGINERR_PROXYFAILURE;
+ break;
+ case CAccount::INCORRECT_PASSWORD:
+ case CAccount::UNACCEPTABLE_PASSWORD:
+ loginError = LOGINERR_WRONGPASSWORD;
+ break;
+ }
+
+ return loginError;
} \ No newline at end of file