PebbleOS
Loading...
Searching...
No Matches
Enumerations | Functions
Remote polling

Periodic "poll services" requests to the phone app. More...

Enumerations

enum  PollRemoteService { POLL_REMOTE_SERVICE_MAIL = 0x0 , POLL_REMOTE_SERVICE_DATA_SPOOLING = 0x1 , NUM_POLL_REMOTE_SERVICES }
 Service the phone is asked to poll. More...
 

Functions

void poll_remote_init (void)
 Initialize the per-service state.
 
void poll_remote_send_request (PollRemoteService service)
 Send a poll request now, for instance on user interaction.
 
void poll_remote_start (void)
 Start sending poll requests at the configured intervals.
 
void poll_remote_stop (void)
 Stop sending poll requests.
 
void poll_remote_set_intervals (PollRemoteService service, const uint8_t min_interval_minutes, const uint8_t max_interval_minutes)
 Set the polling intervals of a service.
 

Detailed Description

Periodic "poll services" requests to the phone app.

iOS does not let apps do networking in the background, but a Bluetooth message grants the app a limited time to run. The watch thus periodically asks the phone to poll web services such as email. Intervals are configured per service, usually by the phone (endpoint 0xcafe).

Enumeration Type Documentation

◆ PollRemoteService

Service the phone is asked to poll.

Enumerator
POLL_REMOTE_SERVICE_MAIL 

Email.

POLL_REMOTE_SERVICE_DATA_SPOOLING 

Data spooling.

NUM_POLL_REMOTE_SERVICES 

Number of services.

Function Documentation

◆ poll_remote_init()

void poll_remote_init ( void  )

Initialize the per-service state.

◆ poll_remote_send_request()

void poll_remote_send_request ( PollRemoteService  service)

Send a poll request now, for instance on user interaction.

Does nothing if less than the minimum interval elapsed since the last request, or when there is no system session. A sent request restarts the interval count.

Parameters
serviceService to poll.

◆ poll_remote_set_intervals()

void poll_remote_set_intervals ( PollRemoteService  service,
const uint8_t  min_interval_minutes,
const uint8_t  max_interval_minutes 
)

Set the polling intervals of a service.

Parameters
serviceService to configure.
min_interval_minutesMinimum time between two requests; poll_remote_send_request() does nothing before it elapsed.
max_interval_minutesInterval of the automatic requests, 0 to disable them.

◆ poll_remote_start()

void poll_remote_start ( void  )

Start sending poll requests at the configured intervals.

Restarts the interval count of every service. Does nothing if already started.

See also
poll_remote_stop

◆ poll_remote_stop()

void poll_remote_stop ( void  )

Stop sending poll requests.

Does nothing if already stopped.

See also
poll_remote_start