summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_events.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/src/tox_events.cpp')
-rw-r--r--protocols/Tox/src/tox_events.cpp31
1 files changed, 29 insertions, 2 deletions
diff --git a/protocols/Tox/src/tox_events.cpp b/protocols/Tox/src/tox_events.cpp
index 255358d687..f1e21e955a 100644
--- a/protocols/Tox/src/tox_events.cpp
+++ b/protocols/Tox/src/tox_events.cpp
@@ -25,6 +25,21 @@ void CToxProto::InitCustomDbEvents()
dbEventType.descr = Translate("Audio call");
dbEventType.eventIcon = GetIconHandle("audio_call");
CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType);
+
+ dbEventType.eventType = DB_EVENT_AUDIO_RING;
+ dbEventType.descr = Translate("Audio ring");
+ dbEventType.eventIcon = GetIconHandle("audio_ring");
+ CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType);
+
+ dbEventType.eventType = DB_EVENT_AUDIO_START;
+ dbEventType.descr = Translate("Audio start");
+ dbEventType.eventIcon = GetIconHandle("audio_start");
+ CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType);
+
+ dbEventType.eventType = DB_EVENT_AUDIO_END;
+ dbEventType.descr = Translate("Audio end");
+ dbEventType.eventIcon = GetIconHandle("audio_end");
+ CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType);
}
int CToxProto::OnDbEventAdded(WPARAM hContact, LPARAM hEvent)
@@ -56,10 +71,22 @@ int CToxProto::OnDbEventAdded(WPARAM hContact, LPARAM hEvent)
switch (dbei.eventType)
{
case DB_EVENT_AUDIO_CALL:
- mir_snprintf(szService, SIZEOF(szService), "%s/AudioCall", GetContactProto(hContact));
+ mir_snprintf(szService, SIZEOF(szService), "%s/Audio/Call", GetContactProto(hContact));
+ break;
+
+ case DB_EVENT_AUDIO_RING:
+ mir_snprintf(szService, SIZEOF(szService), "%s/Audio/Ring", GetContactProto(hContact));
+ break;
+
+ case DB_EVENT_AUDIO_START:
+ mir_snprintf(szService, SIZEOF(szService), "%s/Audio/Start", GetContactProto(hContact));
+ break;
+
+ case DB_EVENT_AUDIO_END:
+ mir_snprintf(szService, SIZEOF(szService), "%s/Audio/End", GetContactProto(hContact));
break;
- default:
+ default:
return 0;
}
cle.pszService = szService;