Merge remote-tracking branch 'origin/dev/v3-routing' into dev/v3-routing

This commit is contained in:
Neil Dorin 2026-06-16 08:58:01 -06:00
commit c8faa19835

View file

@ -1,4 +1,5 @@
using Newtonsoft.Json; using Newtonsoft.Json;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using PepperDash.Essentials.Devices.Common.Codec; using PepperDash.Essentials.Devices.Common.Codec;
@ -10,6 +11,11 @@ namespace PepperDash.Essentials.Devices.Common.AudioCodec;
/// </summary> /// </summary>
public interface IAudioCodecPhonebook : IHasDialer public interface IAudioCodecPhonebook : IHasDialer
{ {
/// <summary>
/// Raised when the list of phonebook entries changes. The event args contain the updated list of entries.
/// </summary>
event EventHandler<PhonebookListChangedEventArgs> ListChanged;
/// <summary> /// <summary>
/// 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. /// 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.
/// </summary> /// </summary>
@ -18,6 +24,12 @@ public interface IAudioCodecPhonebook : IHasDialer
/// <param name="number"></param> /// <param name="number"></param>
void SetPhonebookEntry(int index, string name, string number); void SetPhonebookEntry(int index, string name, string number);
/// <summary>
/// Dials the phonebook entry at the specified index.
/// </summary>
/// <param name="index"></param>
void DialPhonebookEntry(int index);
/// <summary> /// <summary>
/// Gets the list of phonebook entries for the device. /// Gets the list of phonebook entries for the device.
/// </summary> /// </summary>
@ -36,3 +48,23 @@ public class CodecPhonebookEntry
[JsonProperty("number")] [JsonProperty("number")]
public string Number { get; set; } public string Number { get; set; }
} }
/// <summary>
/// Provides the updated list of phonebook entries for the <see cref="IAudioCodecPhonebook.ListChanged"/> event.
/// </summary>
public class PhonebookListChangedEventArgs : EventArgs
{
/// <summary>
/// Gets the updated list of phonebook entries.
/// </summary>
public List<CodecPhonebookEntry> Entries { get; }
/// <summary>
/// Initializes a new instance of the <see cref="PhonebookListChangedEventArgs"/> class.
/// </summary>
/// <param name="entries">The updated list of phonebook entries.</param>
public PhonebookListChangedEventArgs(List<CodecPhonebookEntry> entries)
{
Entries = entries;
}
}