FMLiveSwitchDtmfTone Class Reference

A DTMF (telephone-event) tone. More...

Instance Methods

(FMLiveSwitchDtmfTone *) - clone
 Clones this instance. More...
 
(FMLiveSwitchDtmfTone *) - cloneWithDuration:
 Clones this instance. More...
 
(NSString *) - description
 Serializes to a string. More...
 
(int) - duration
 Gets the duration in milliseconds. More...
 
(bool) - end
 Gets whether this is the final tone raised for the current value. More...
 
(instancetype) - initWithValue:
 Initializes a new instance of the FMLiveSwitchDtmfTone class. More...
 
(instancetype) - initWithValue:duration:
 Initializes a new instance of the FMLiveSwitchDtmfTone class. More...
 
(NSString *) - toJson
 Serializes to JSON. More...
 
(FMLiveSwitchDtmfPacket *) - toPacketWithClockRate:
 Serializes to a packet. More...
 
(NSString *) - value
 Gets the value. More...
 

Class Methods

(FMLiveSwitchDtmfTone *) + a
 Gets A tone. More...
 
(NSString *) + aValue
 Gets the A value ("A"). More...
 
(FMLiveSwitchDtmfTone *) + b
 Gets the B tone. More...
 
(NSString *) + bValue
 Gets the B value ("B"). More...
 
(FMLiveSwitchDtmfTone *) + c
 Gets the C tone. More...
 
(NSString *) + cValue
 Gets the C value ("C"). More...
 
(FMLiveSwitchDtmfTone *) + d
 Gets the D tone. More...
 
(NSString *) + dValue
 Gets the D value ("D"). More...
 
(FMLiveSwitchDtmfTone *) + eight
 Gets the eight tone. More...
 
(NSString *) + eightValue
 Gets the eight value ("8"). More...
 
(FMLiveSwitchDtmfTone *) + empty
 Gets the empty tone. More...
 
(NSString *) + emptyValue
 Gets the empty value (""). More...
 
(FMLiveSwitchDtmfTone *) + five
 Gets the five tone. More...
 
(NSString *) + fiveValue
 Gets the five value ("5"). More...
 
(FMLiveSwitchDtmfTone *) + four
 Gets the four tone. More...
 
(NSString *) + fourValue
 Gets the four value ("4"). More...
 
(NSMutableArray *) + fromJsonArrayWithTonesJson:
 Deserializes an array from JSON. More...
 
(FMLiveSwitchDtmfTone *) + fromJsonWithToneJson:
 Deserializes from JSON. More...
 
(FMLiveSwitchDtmfTone *) + fromPacket:clockRate:
 Deserializes from a packet. More...
 
(NSMutableArray *) + fromToneString:
 Converts a DTMF tone string into an array of tones. More...
 
(NSMutableArray *) + fromToneString:duration:
 Converts a DTMF tone string into an array of tones. More...
 
(NSMutableArray *) + fromToneString:duration:interToneGap:
 Converts a DTMF tone string into an array of tones. More...
 
(FMLiveSwitchDtmfTone *) + hash
 Gets the hash tone. More...
 
(NSString *) + hashValue
 Gets the hash value ("#"). More...
 
(FMLiveSwitchDtmfTone *) + nine
 Gets the nine tone. More...
 
(NSString *) + nineValue
 Gets the nine value ("9"). More...
 
(FMLiveSwitchDtmfTone *) + one
 Gets the one tone. More...
 
(NSString *) + oneValue
 Gets the one value ("1"). More...
 
(FMLiveSwitchDtmfTone *) + pause
 Gets the pause tone. More...
 
(int) + pauseDuration
 Gets the pause duration in milliseconds (2000). More...
 
(NSString *) + pauseValue
 Gets the pause value (","). More...
 
(FMLiveSwitchDtmfTone *) + seven
 Gets the seven tone. More...
 
(NSString *) + sevenValue
 Gets the seven value ("7"). More...
 
(FMLiveSwitchDtmfTone *) + six
 Gets the six tone. More...
 
(NSString *) + sixValue
 Gets the six value ("6"). More...
 
(FMLiveSwitchDtmfTone *) + star
 Gets the star tone. More...
 
(NSString *) + starValue
 Gets the star value ("*"). More...
 
(FMLiveSwitchDtmfTone *) + three
 Gets the three tone. More...
 
(NSString *) + threeValue
 Gets the three value ("3"). More...
 
(NSString *) + toJsonArrayWithTones:
 Serializes an array to JSON. More...
 
(NSString *) + toJsonWithTone:
 Serializes to JSON. More...
 
(FMLiveSwitchDtmfTone *) + tone:
 Initializes a new instance of the FMLiveSwitchDtmfTone class. More...
 
(FMLiveSwitchDtmfTone *) + tone:duration:
 Initializes a new instance of the FMLiveSwitchDtmfTone class. More...
 
(NSString *) + toToneStringWithTones:
 Converts an array of DTMF tones into a tone string. More...
 
(FMLiveSwitchDtmfTone *) + two
 Gets the two tone. More...
 
(NSString *) + twoValue
 Gets the two value ("2"). More...
 
(FMLiveSwitchDtmfTone *) + zero
 Gets the zero tone. More...
 
(NSString *) + zeroValue
 Gets the zero value ("0"). More...
 

Detailed Description

A DTMF (telephone-event) tone.

Method Documentation

◆ a

Gets A tone.

◆ aValue

+ (NSString*) aValue

Gets the A value ("A").

◆ b

Gets the B tone.

◆ bValue

+ (NSString*) bValue

Gets the B value ("B").

◆ c

Gets the C tone.

◆ clone

Clones this instance.

◆ cloneWithDuration:

- (FMLiveSwitchDtmfTone*) cloneWithDuration: (int)  duration

Clones this instance.

Parameters
durationThe new duration.

◆ cValue

+ (NSString*) cValue

Gets the C value ("C").

◆ d

Gets the D tone.

◆ description

- (NSString*) description

Serializes to a string.

◆ duration

- (int) duration

Gets the duration in milliseconds.

◆ dValue

+ (NSString*) dValue

Gets the D value ("D").

◆ eight

Gets the eight tone.

◆ eightValue

+ (NSString*) eightValue

Gets the eight value ("8").

◆ empty

Gets the empty tone.

◆ emptyValue

+ (NSString*) emptyValue

Gets the empty value ("").

◆ end

- (bool) end

Gets whether this is the final tone raised for the current value.

◆ five

Gets the five tone.

◆ fiveValue

+ (NSString*) fiveValue

Gets the five value ("5").

◆ four

Gets the four tone.

◆ fourValue

+ (NSString*) fourValue

Gets the four value ("4").

◆ fromJsonArrayWithTonesJson:

+ (NSMutableArray*) fromJsonArrayWithTonesJson: (NSString *)  tonesJson

Deserializes an array from JSON.

Parameters
tonesJsonThe JSON.

◆ fromJsonWithToneJson:

+ (FMLiveSwitchDtmfTone*) fromJsonWithToneJson: (NSString *)  toneJson

Deserializes from JSON.

Parameters
toneJsonThe JSON.

◆ fromPacket:clockRate:

+ (FMLiveSwitchDtmfTone*) fromPacket: (FMLiveSwitchDtmfPacket *)  packet
clockRate: (int)  clockRate 

Deserializes from a packet.

Parameters
packetThe packet.
clockRateThe clock rate.

◆ fromToneString:

+ (NSMutableArray*) fromToneString: (NSString *)  toneString

Converts a DTMF tone string into an array of tones.

Each tone will have a duration of 100ms and an inter-tone gap of 100ms.

Parameters
toneStringThe tone string.

◆ fromToneString:duration:

+ (NSMutableArray*) fromToneString: (NSString *)  toneString
duration: (int)  duration 

Converts a DTMF tone string into an array of tones.

Each tone will have an inter-tone gap of 100ms.

Parameters
toneStringThe tone string.
durationThe duration, in milliseconds (minimum of 40, maximum of 2,000).

◆ fromToneString:duration:interToneGap:

+ (NSMutableArray*) fromToneString: (NSString *)  toneString
duration: (int)  duration
interToneGap: (int)  interToneGap 

Converts a DTMF tone string into an array of tones.

Parameters
toneStringThe tone string.
durationThe duration, in milliseconds (minimum of 40, maximum of 2,000).
interToneGapThe time between tones, in milliseconds (minimum of 40).

◆ hash

Gets the hash tone.

◆ hashValue

+ (NSString*) hashValue

Gets the hash value ("#").

◆ initWithValue:

- (instancetype) initWithValue: (NSString *)  value

Initializes a new instance of the FMLiveSwitchDtmfTone class.

Parameters
valueThe value.

◆ initWithValue:duration:

- (instancetype) initWithValue: (NSString *)  value
duration: (int)  duration 

Initializes a new instance of the FMLiveSwitchDtmfTone class.

Parameters
valueThe value.
durationThe duration.

◆ nine

Gets the nine tone.

◆ nineValue

+ (NSString*) nineValue

Gets the nine value ("9").

◆ one

Gets the one tone.

◆ oneValue

+ (NSString*) oneValue

Gets the one value ("1").

◆ pause

Gets the pause tone.

◆ pauseDuration

+ (int) pauseDuration

Gets the pause duration in milliseconds (2000).

◆ pauseValue

+ (NSString*) pauseValue

Gets the pause value (",").

◆ seven

Gets the seven tone.

◆ sevenValue

+ (NSString*) sevenValue

Gets the seven value ("7").

◆ six

Gets the six tone.

◆ sixValue

+ (NSString*) sixValue

Gets the six value ("6").

◆ star

Gets the star tone.

◆ starValue

+ (NSString*) starValue

Gets the star value ("*").

◆ three

Gets the three tone.

◆ threeValue

+ (NSString*) threeValue

Gets the three value ("3").

◆ toJson

- (NSString*) toJson

Serializes to JSON.

◆ toJsonArrayWithTones:

+ (NSString*) toJsonArrayWithTones: (NSMutableArray *)  tones

Serializes an array to JSON.

Parameters
tonesThe array.

◆ toJsonWithTone:

+ (NSString*) toJsonWithTone: (FMLiveSwitchDtmfTone *)  tone

Serializes to JSON.

◆ tone:

+ (FMLiveSwitchDtmfTone*) tone: (NSString *)  value

Initializes a new instance of the FMLiveSwitchDtmfTone class.

Parameters
valueThe value.

◆ tone:duration:

+ (FMLiveSwitchDtmfTone*) tone: (NSString *)  value
duration: (int)  duration 

Initializes a new instance of the FMLiveSwitchDtmfTone class.

Parameters
valueThe value.
durationThe duration.

◆ toPacketWithClockRate:

- (FMLiveSwitchDtmfPacket*) toPacketWithClockRate: (int)  clockRate

Serializes to a packet.

Parameters
clockRateThe clock rate.

◆ toToneStringWithTones:

+ (NSString*) toToneStringWithTones: (NSMutableArray *)  tones

Converts an array of DTMF tones into a tone string.

This discards duration and inter-tone gap data.

Parameters
tonesThe tones.

◆ two

Gets the two tone.

◆ twoValue

+ (NSString*) twoValue

Gets the two value ("2").

◆ value

- (NSString*) value

Gets the value.

◆ zero

Gets the zero tone.

◆ zeroValue

+ (NSString*) zeroValue

Gets the zero value ("0").