From 27b3d9cf58fb9c9e8c7481e42016b9c504da229b Mon Sep 17 00:00:00 2001 From: Erik Meyer Date: Mon, 15 Jun 2026 13:46:32 -0400 Subject: [PATCH] feat: updates IAudioCodecPhonebook interface --- .../Interfaces/IAudioCodecPhonebook.cs | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/PepperDash.Essentials.Devices.Common/AudioCodec/Interfaces/IAudioCodecPhonebook.cs b/src/PepperDash.Essentials.Devices.Common/AudioCodec/Interfaces/IAudioCodecPhonebook.cs index 253680d7..3391f462 100644 --- a/src/PepperDash.Essentials.Devices.Common/AudioCodec/Interfaces/IAudioCodecPhonebook.cs +++ b/src/PepperDash.Essentials.Devices.Common/AudioCodec/Interfaces/IAudioCodecPhonebook.cs @@ -1,4 +1,5 @@ using Newtonsoft.Json; +using System; using System.Collections.Generic; using PepperDash.Essentials.Devices.Common.Codec; @@ -10,6 +11,11 @@ namespace PepperDash.Essentials.Devices.Common.AudioCodec; /// public interface IAudioCodecPhonebook : IHasDialer { + /// + /// Raised when the list of phonebook entries changes. The event args contain the updated list of entries. + /// + event EventHandler ListChanged; + /// /// Sets a phonebook entry at the specified index. The implementation of this method is up to the device, but it should update the phonebook entry at the specified index with the provided name and number. /// @@ -18,6 +24,12 @@ public interface IAudioCodecPhonebook : IHasDialer /// void SetPhonebookEntry(int index, string name, string number); + /// + /// Dials the phonebook entry at the specified index. + /// + /// + void DialPhonebookEntry(int index); + /// /// Gets the list of phonebook entries for the device. /// @@ -35,4 +47,24 @@ public class CodecPhonebookEntry [JsonProperty("number")] public string Number { get; set; } +} + +/// +/// Provides the updated list of phonebook entries for the event. +/// +public class PhonebookListChangedEventArgs : EventArgs +{ + /// + /// Gets the updated list of phonebook entries. + /// + public List Entries { get; } + + /// + /// Initializes a new instance of the class. + /// + /// The updated list of phonebook entries. + public PhonebookListChangedEventArgs(List entries) + { + Entries = entries; + } } \ No newline at end of file