voice

package
v0.0.0-...-d5168a5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SelfID           string
	DeviceID         string
	PrivateKey       ed25519.PrivateKey
	Rest             restTransport
	KeyID            string
	MessagingClient  messagingClient
	MessagingService messagingService
}

type Message

type Message struct {
	Recipients []string
	JTI        string
	ISS        string
	Payload    map[string]interface{}
}

Message represents a chat message.

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(cfg Config) *Service

func (*Service) Accept

func (s *Service) Accept(recipient, cid, callID, peerInfo string, data map[string]interface{}) error

Sends a chat.voice.accept message accepting a specific call.

func (*Service) Busy

func (s *Service) Busy(recipient, cid, callID string) error

Sends a chat.voice.busy message finishing the call.

func (*Service) OnAccept

func (s *Service) OnAccept(callback func(iss, cid, callID, peerInfo string, data interface{}))

OnMessage subscribes to an incoming chat.voice.accept message

func (*Service) OnBusy

func (s *Service) OnBusy(callback func(iss, cid, callID string))

OnMessage subscribes to an incoming chat.voice.busy message

func (*Service) OnSetup

func (s *Service) OnSetup(callback func(iss, cid string, data interface{}))

OnMessage subscribes to an incoming chat.voice.setup message

func (*Service) OnStart

func (s *Service) OnStart(callback func(iss, cid, callID, peerInfo string, data interface{}))

OnMessage subscribes to an incoming chat.voice.start message

func (*Service) OnStop

func (s *Service) OnStop(callback func(iss, cid, callID string))

OnMessage subscribes to an incoming chat.voice.stop message

func (*Service) OnSummary

func (s *Service) OnSummary(callback func(iss, cid, callID string))

OnMessage subscribes to an incoming chat.voice.summary message

func (*Service) Setup

func (s *Service) Setup(recipient, name, cid string) error

func (*Service) Start

func (s *Service) Start(recipient, cid, callID, peerInfo string, data map[string]interface{}) error

Sends a chat.voice.start message with the details for starting a call.

func (*Service) Stop

func (s *Service) Stop(recipient, cid, callID string) error

Sends a chat.voice.accept message finishing the call.

func (*Service) Summary

func (s *Service) Summary(recipient, cid, callID string) error

Sends a chat.voice.summary message Sending details about the call.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL