FMLiveSwitchConnectionStateLedger Class Reference

Maintains a ledger of connection state transitions with timestamps. More...

Instance Methods

(NSString *) - description
 Provides a string representation of all recorded state transitions. More...
 
(instancetype) - initWithConnectionId:client:connectionType:clientId:mediaProtocol:
 Initializes a new instance of the ConnectionStateLedger class. More...
 
(void) - recordAnswerWithState:sent:renegotiation:
 Records an offer. More...
 
(void) - recordConnectionState:
 Records a new connection state transition with current timestamp. More...
 
(void) - recordErrorWithState:error:
 Records an error. More...
 
(void) - recordMediaIntentWithState:sent:
 Records a media intent with current timestamp. More...
 
(void) - recordOfferWithState:sent:renegotiation:
 Records an offer. More...
 

Class Methods

(FMLiveSwitchConnectionStateLedger *) + connectionStateLedgerWithConnectionId:client:connectionType:clientId:mediaProtocol:
 Initializes a new instance of the ConnectionStateLedger class. More...
 

Detailed Description

Maintains a ledger of connection state transitions with timestamps.

Tracks the history of state changes for a specific connection.

Method Documentation

◆ connectionStateLedgerWithConnectionId:client:connectionType:clientId:mediaProtocol:

+ (FMLiveSwitchConnectionStateLedger*) connectionStateLedgerWithConnectionId: (NSString *)  connectionId
client: (bool)  client
connectionType: (NSString *)  connectionType
clientId: (NSString *)  clientId
mediaProtocol: (FMLiveSwitchMediaProtocol)  mediaProtocol 

Initializes a new instance of the ConnectionStateLedger class.

Parameters
connectionIdThe unique identifier for the connection to track.
clientIndicates whether this ledger is for the client rather than for a server.
connectionTypeIndicates the connection type.
clientIdThe unique identifier for the client.
mediaProtocolThe mediaprotocol of this connection.

◆ description

- (NSString*) description

Provides a string representation of all recorded state transitions.

Returns
A formatted string showing all state transitions with timestamps and durations.

◆ initWithConnectionId:client:connectionType:clientId:mediaProtocol:

- (instancetype) initWithConnectionId: (NSString *)  connectionId
client: (bool)  client
connectionType: (NSString *)  connectionType
clientId: (NSString *)  clientId
mediaProtocol: (FMLiveSwitchMediaProtocol)  mediaProtocol 

Initializes a new instance of the ConnectionStateLedger class.

Parameters
connectionIdThe unique identifier for the connection to track.
clientIndicates whether this ledger is for the client rather than for a server.
connectionTypeIndicates the connection type.
clientIdThe unique identifier for the client.
mediaProtocolThe mediaprotocol of this connection.

◆ recordAnswerWithState:sent:renegotiation:

- (void) recordAnswerWithState: (FMLiveSwitchConnectionState)  state
sent: (bool)  sent
renegotiation: (bool)  renegotiation 

Records an offer.

◆ recordConnectionState:

- (void) recordConnectionState: (FMLiveSwitchConnectionState)  state

Records a new connection state transition with current timestamp.

Parameters
stateThe new connection state to record.

◆ recordErrorWithState:error:

- (void) recordErrorWithState: (FMLiveSwitchConnectionState)  state
error: (NSString *)  error 

Records an error.

◆ recordMediaIntentWithState:sent:

- (void) recordMediaIntentWithState: (FMLiveSwitchConnectionState)  state
sent: (bool)  sent 

Records a media intent with current timestamp.

◆ recordOfferWithState:sent:renegotiation:

- (void) recordOfferWithState: (FMLiveSwitchConnectionState)  state
sent: (bool)  sent
renegotiation: (bool)  renegotiation 

Records an offer.