summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_utils.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-03-17 20:33:47 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-03-17 20:33:47 +0000
commitdd3d0e59dcd34beb222fcf612a51d3fee82c0e43 (patch)
tree0ae5a6e0a83399036d1452256ee3f89dc6da8872 /protocols/SkypeWeb/src/skype_utils.cpp
parent076fa9b3142f55fc736fbf58b20bfa45973acd68 (diff)
SkypeWeb: initial commit
git-svn-id: http://svn.miranda-ng.org/main/trunk@12424 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_utils.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_utils.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp
new file mode 100644
index 0000000000..5ce367f768
--- /dev/null
+++ b/protocols/SkypeWeb/src/skype_utils.cpp
@@ -0,0 +1,40 @@
+#include "common.h"
+
+void CSkypeProto::ShowNotification(const TCHAR *caption, const TCHAR *message, int flags, MCONTACT hContact)
+{
+ if (Miranda_Terminated())
+ {
+ return;
+ }
+
+ if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(NULL, "Popup", "ModuleIsEnabled", 1))
+ {
+ POPUPDATAT ppd = { 0 };
+ ppd.lchContact = hContact;
+ wcsncpy(ppd.lpwzContactName, caption, MAX_CONTACTNAME);
+ wcsncpy(ppd.lpwzText, message, MAX_SECONDLINE);
+ ppd.lchIcon = Skin_GetIcon("Skype_main");
+
+ if (!PUAddPopupT(&ppd))
+ return;
+ }
+
+ MessageBox(NULL, message, caption, MB_OK | flags);
+}
+
+void CSkypeProto::ShowNotification(const TCHAR *message, int flags, MCONTACT hContact)
+{
+ ShowNotification(_T(MODULE), message, flags, hContact);
+}
+
+bool CSkypeProto::IsFileExists(std::tstring path)
+{
+ WIN32_FIND_DATA wfd;
+ HANDLE hFind = FindFirstFile(path.c_str(), &wfd);
+ if (INVALID_HANDLE_VALUE != hFind)
+ {
+ FindClose(hFind);
+ return true;
+ }
+ return false;
+} \ No newline at end of file