mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-07-02 10:38:16 +00:00
feat: updates IAudioCodecPhonebook interface
This commit is contained in:
parent
4403e91b79
commit
27b3d9cf58
1 changed files with 32 additions and 0 deletions
|
|
@ -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;
|
|||
/// </summary>
|
||||
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>
|
||||
/// 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>
|
||||
|
|
@ -18,6 +24,12 @@ public interface IAudioCodecPhonebook : IHasDialer
|
|||
/// <param name="number"></param>
|
||||
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>
|
||||
/// Gets the list of phonebook entries for the device.
|
||||
/// </summary>
|
||||
|
|
@ -36,3 +48,23 @@ public class CodecPhonebookEntry
|
|||
[JsonProperty("number")]
|
||||
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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue