PebbleOS
Loading...
Searching...
No Matches
Enumerations | Functions
Session analytics

Connectivity analytics hooks for session open and close. More...

Enumerations

enum  CommSessionCloseReason {
  CommSessionCloseReason_UnderlyingDisconnection = 0 , CommSessionCloseReason_ClosedRemotely = 1 , CommSessionCloseReason_ClosedLocally = 2 , CommSessionCloseReason_TransportSpecificBegin = 100 ,
  CommSessionCloseReason_TransportSpecificEnd = 255
}
 Why a session was closed. More...
 
enum  CommSessionTransportType {
  CommSessionTransportType_PlainSPP = 0 , CommSessionTransportType_iAP = 1 , CommSessionTransportType_PPoGATT = 2 , CommSessionTransportType_QEMU = 3 ,
  CommSessionTransportType_PULSE = 4
}
 Transport type carrying a session. More...
 

Functions

CommSessionTransportType comm_session_analytics_get_transport_type (CommSession *session)
 Get the transport type of a session.
 
void comm_session_analytics_open_session (CommSession *session)
 Record a session being opened.
 
void comm_session_analytics_close_session (CommSession *session, CommSessionCloseReason reason)
 Record a session being closed.
 

Detailed Description

Connectivity analytics hooks for session open and close.

Enumeration Type Documentation

◆ CommSessionCloseReason

Why a session was closed.

Enumerator
CommSessionCloseReason_UnderlyingDisconnection 

Underlying link disconnected.

CommSessionCloseReason_ClosedRemotely 

Closed by the phone.

CommSessionCloseReason_ClosedLocally 

Closed by the watch.

CommSessionCloseReason_TransportSpecificBegin 

First transport-specific reason.

CommSessionCloseReason_TransportSpecificEnd 

Last transport-specific reason.

◆ CommSessionTransportType

Transport type carrying a session.

Enumerator
CommSessionTransportType_PlainSPP 

Plain SPP (Android).

CommSessionTransportType_iAP 

iAP (iOS).

CommSessionTransportType_PPoGATT 

Pebble Protocol over GATT.

CommSessionTransportType_QEMU 

QEMU emulator transport.

CommSessionTransportType_PULSE 

PULSE serial transport.

Function Documentation

◆ comm_session_analytics_close_session()

void comm_session_analytics_close_session ( CommSession *  session,
CommSessionCloseReason  reason 
)

Record a session being closed.

Stops the connected-time timer for system sessions.

Parameters
sessionClosed session.
reasonClose reason.

◆ comm_session_analytics_get_transport_type()

CommSessionTransportType comm_session_analytics_get_transport_type ( CommSession *  session)

Get the transport type of a session.

The caller must hold bt_lock().

Parameters
sessionSession to query.
Returns
Transport type.

◆ comm_session_analytics_open_session()

void comm_session_analytics_open_session ( CommSession *  session)

Record a session being opened.

Starts the connectivity timers for system sessions.

Parameters
sessionOpened session.