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:
 Initializes a new instance of the ConnectionStateLedger class. More...
 
(void) - recordConnectionState:
 Records a new connection state transition with current timestamp. More...
 

Class Methods

(FMLiveSwitchConnectionStateLedger *) + connectionStateLedgerWithConnectionId:
 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:

+ (FMLiveSwitchConnectionStateLedger*) connectionStateLedgerWithConnectionId: (NSString *)  connectionId

Initializes a new instance of the ConnectionStateLedger class.

Parameters
connectionIdThe unique identifier for the connection to track.

◆ 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:

- (instancetype) initWithConnectionId: (NSString *)  connectionId

Initializes a new instance of the ConnectionStateLedger class.

Parameters
connectionIdThe unique identifier for the connection to track.

◆ recordConnectionState:

- (void) recordConnectionState: (FMLiveSwitchConnectionState)  state

Records a new connection state transition with current timestamp.

Parameters
stateThe new connection state to record.