Home2L - C/C++ API v1.4-0-g38cc (2024-05-25)
Smart Tools for a Private Home
Classes | Enumerations | Functions
Phone

Description

Wrapper for IP phone functionality.

This module provides a wrapper for IP phone functionality, which is presently used by the Home2L applications WallClock and DoorMan. Presently, two possible backends are supported: Linphone and PJSIP. Depending on the backend to be used, the following .C files have to be compiled, which contain alternative implementations to phone.H :

Furthermore, the respective external backend libraries have to be available (see directory external/linphone or external/pjsip, respectively).

Collaboration diagram for Phone:

Classes

struct  TPhoneVideoFrame
 Data structure to pass video frames to the UI. More...
 
class  CPhone
 IP Telephone. More...
 

Enumerations

enum  EPhoneVideoFormat
 Video frame pixel format. The values refer to the respective SDL pixel format types of a similar name. (see 'SDL_PixelFormatEnum' and the 'SDL_PIXELFORMAT_*' values in the SDL2 documentation).
 
enum  EPhoneState {
  psNone = 0 , psIdle , psDialing , psRinging ,
  psInCall , psTransferIdle , psTransferDialing , psTransferAutoComplete ,
  psTransferInCall
}
 Current phone state. More...
 
enum  EPhoneMedia {
  pmNone = 0 , pmAudioIn = 1 , pmAudioOut = 2 , pmAudio = 3 ,
  pmVideoIn = 4 , pmVideoOut = 8 , pmVideo = 12 , pmAll = 15
}
 Media mask. More...
 

Functions

const char * StrPhoneVideoFormat (EPhoneVideoFormat x)
 Get a readable string for the format.
 
static bool PhoneStateIsDevicePermitting (EPhoneState s)
 Return whether the caller is allowed to use the media (audio/video) devices that may otherwise be occupied by the respective phone.
 

Enumeration Type Documentation

◆ EPhoneState

Current phone state.

Enumerator
psNone 

No state (e.g. phone not initialized).

psIdle 

Phone is idle.

psDialing 

Phone is dialing, remote end may be ringing.

psRinging 

This phone is ringing.

psInCall 

A call is active.

psTransferIdle 

Primary call is paused, UI may query a new number to transfer to.

psTransferDialing 

Primary call is paused, a new call is in the dialing state.

psTransferAutoComplete 

Same as 'psTransferDialing', but on remote pickup the transfer will complete automatically.

psTransferInCall 

Primary call is paused, secondary call is active; hanging up results in completing the transfer.

Definition at line 200 of file phone.H.

◆ EPhoneMedia

Media mask.

Enumerator
pmNone 

Nothing.

pmAudioIn 

Microphone.

pmAudioOut 

Speaker.

pmAudio 

Microphone and Speaker.

pmVideoIn 

Camera.

pmVideoOut 

Display.

pmVideo 

Camera and Display.

pmAll 

Everything.

Definition at line 219 of file phone.H.