summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/SkypeWeb/src/skype_utils.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_utils.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp
index 36128db115..e3af5b6c74 100644
--- a/protocols/SkypeWeb/src/skype_utils.cpp
+++ b/protocols/SkypeWeb/src/skype_utils.cpp
@@ -427,6 +427,8 @@ CMStringW RemoveHtml(const CMStringW &data)
return new_string;
}
+//////////////////////////////////////////////////////////////////////////////////////////
+
const char* CSkypeProto::MirandaToSkypeStatus(int status)
{
switch (status) {
@@ -461,6 +463,20 @@ int CSkypeProto::SkypeToMirandaStatus(const char *status)
return ID_STATUS_OFFLINE;
}
+//////////////////////////////////////////////////////////////////////////////////////////
+
+bool CSkypeProto::IsMe(const wchar_t *str)
+{
+ return (!mir_wstrcmpi(str, Utf2T(m_szMyname)) || !mir_wstrcmp(str, Utf2T(m_szOwnSkypeId)));
+}
+
+bool CSkypeProto::IsMe(const char *str)
+{
+ return (!mir_strcmpi(str, m_szMyname) || !mir_strcmp(str, m_szOwnSkypeId));
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////
+
bool CSkypeProto::IsFileExists(std::wstring path)
{
return _waccess(path.c_str(), 0) == 0;
@@ -526,6 +542,18 @@ CMStringW ParseUrl(const wchar_t *url, const wchar_t *token)
static int possibleTypes[] = { 1, 2, 8, 19 };
+bool IsPossibleUserType(const char *pszUserId)
+{
+ int iType = atoi(pszUserId);
+
+ // we don't process 28 and other shit
+ for (auto &it : possibleTypes)
+ if (it == iType)
+ return true;
+
+ return false;
+}
+
CMStringA UrlToSkypeId(const char *url, int *pUserType)
{
int userType = -1;