mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
feat: enhance audio codec phonebook functionality and messaging integration
This commit is contained in:
parent
c8faa19835
commit
0098673a5e
4 changed files with 135 additions and 67 deletions
|
|
@ -28,6 +28,8 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||
: base(key, messagePath, device)
|
||||
{
|
||||
_phonebook = device as IAudioCodecPhonebook ?? throw new ArgumentNullException(nameof(device));
|
||||
|
||||
_phonebook.ListChanged += (sender, args) => SendFullStatus();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
|
@ -43,7 +45,12 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||
{
|
||||
var entry = content.ToObject<SetPhonebookEntryContent>();
|
||||
_phonebook.SetPhonebookEntry(entry.Index, entry.Name, entry.Number);
|
||||
SendFullStatus();
|
||||
});
|
||||
|
||||
AddAction("/dialEntry", (id, content) =>
|
||||
{
|
||||
var request = content.ToObject<MobileControlSimpleContent<int>>();
|
||||
_phonebook.DialPhonebookEntry(request.Value);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue