mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-07-02 10:38:16 +00:00
feat: implement IAudioCodecPhonebookMessenger for phonebook messaging functionality
This commit is contained in:
parent
22f5558e39
commit
2dd99da67f
3 changed files with 120 additions and 4 deletions
|
|
@ -1,15 +1,38 @@
|
|||
|
||||
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using PepperDash.Essentials.Devices.Common.Codec;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.AudioCodec;
|
||||
|
||||
/// <summary>
|
||||
/// Defines the contract for a device that has a phonebook.
|
||||
/// This is used to provide a common interface for devices that have phonebook functionality
|
||||
/// </summary>
|
||||
public interface IAudioCodecPhonebook : IHasDialer
|
||||
{
|
||||
/// <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>
|
||||
/// <param name="index"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="number"></param>
|
||||
void SetPhonebookEntry(int index, string name, string number);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of phonebook entries for the device.
|
||||
/// </summary>
|
||||
List<CodecPhonebookEntry> PhonebookEntries { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines a phonebook entry for the audio codec phonebook.
|
||||
/// This is used to provide a common data structure for phonebook entries across different devices.
|
||||
/// </summary>
|
||||
public class CodecPhonebookEntry
|
||||
{
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[JsonProperty("number")]
|
||||
public string Number { get; set; }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue