summaryrefslogtreecommitdiff
path: root/plugins/SecureIM/dbevent.cpp
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-05-15 10:38:20 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-05-15 10:38:20 +0000
commit48540940b6c28bb4378abfeb500ec45a625b37b6 (patch)
tree2ef294c0763e802f91d868bdef4229b6868527de /plugins/SecureIM/dbevent.cpp
parent5c350913f011e119127baeb32a6aedeb4f0d33bc (diff)
initial commit
git-svn-id: http://svn.miranda-ng.org/main/trunk@2 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SecureIM/dbevent.cpp')
-rw-r--r--plugins/SecureIM/dbevent.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/SecureIM/dbevent.cpp b/plugins/SecureIM/dbevent.cpp
new file mode 100644
index 0000000000..9b7d8f10c0
--- /dev/null
+++ b/plugins/SecureIM/dbevent.cpp
@@ -0,0 +1,21 @@
+#include "commonheaders.h"
+
+
+void HistoryLog(HANDLE hContact, LPCSTR szText) {
+
+ DBEVENTINFO dbei;
+ memset(&dbei, 0, sizeof(dbei));
+
+ dbei.cbSize = sizeof(dbei);
+ dbei.szModule = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ dbei.flags = DBEF_SENT|DBEF_READ;
+ dbei.timestamp = time(NULL);
+ dbei.eventType = EVENTTYPE_MESSAGE;
+ dbei.cbBlob = (int)strlen(szText) + 1;
+ dbei.pBlob = (PBYTE)szText;
+
+ CallService(MS_DB_EVENT_ADD, (WPARAM)0, (LPARAM)&dbei);
+}
+
+
+// EOF