mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-03-07 14:56:07 +00:00
implement conversational awareness in tray app
This commit is contained in:
19
aln/Notifications/ConversationalAwareness.py
Normal file
19
aln/Notifications/ConversationalAwareness.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# 04 00 04 00 4b 00 02 00 01 [01/02/03/0b/09]
|
||||
|
||||
from ..enums import enums
|
||||
|
||||
class ConversationalAwarenessNotification:
|
||||
NOTIFICATION_PREFIX = enums.CONVERSATION_AWARENESS_RECEIVE_PREFIX
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def isConversationalAwarenessData(self, data: bytes):
|
||||
if len(data) != 10:
|
||||
return False
|
||||
if data.hex().startswith(self.NOTIFICATION_PREFIX.hex()):
|
||||
return True
|
||||
|
||||
def setData(self, data: bytes):
|
||||
self.status = data[9]
|
||||
pass
|
||||
Reference in New Issue
Block a user