diff options
author | George Hazan <ghazan@miranda.im> | 2020-01-15 23:27:07 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-01-15 23:27:07 +0300 |
commit | 28880a272962ca55298b4304bf6f5512bda901d2 (patch) | |
tree | bb7e23bf6daa82456981084ff6d96c7d9f6e4746 /protocols/Discord/src/proto.cpp | |
parent | 53aab07f1ee1dc3fe8c48dbe95a434079013f260 (diff) |
Discord voice calls - packet processing
Diffstat (limited to 'protocols/Discord/src/proto.cpp')
-rw-r--r-- | protocols/Discord/src/proto.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp index 1051b57005..f07fa1bfab 100644 --- a/protocols/Discord/src/proto.cpp +++ b/protocols/Discord/src/proto.cpp @@ -46,6 +46,7 @@ CDiscordProto::CDiscordProto(const char *proto_name, const wchar_t *username) : arGuilds(1, compareGuilds), arMarkReadQueue(1, compareUsers), arOwnMessages(1, compareMessages), + arVoiceCalls(1), m_wszEmail(this, "Email", L""), m_wszDefaultGroup(this, "GroupName", DB_KEYVAL_GROUP), @@ -71,6 +72,21 @@ CDiscordProto::CDiscordProto(const char *proto_name, const wchar_t *username) : // database db_set_resident(m_szModuleName, "XStatusMsg"); + // custom events + DBEVENTTYPEDESCR dbEventType = {}; + dbEventType.module = m_szModuleName; + dbEventType.flags = DETF_HISTORY | DETF_MSGWINDOW; + + dbEventType.eventType = EVENT_INCOMING_CALL; + dbEventType.descr = Translate("Incoming voice call"); + dbEventType.eventIcon = g_plugin.getIconHandle(IDI_VOICE_CALL); + DbEvent_RegisterType(&dbEventType); + + dbEventType.eventType = EVENT_CALL_FINISHED; + dbEventType.descr = Translate("Voice call ended"); + dbEventType.eventIcon = g_plugin.getIconHandle(IDI_VOICE_ENDED); + DbEvent_RegisterType(&dbEventType); + // Network initialization CMStringW descr; NETLIBUSER nlu = {}; |