|
PebbleOS
|
Incoming call handling. More...
Data Structures | |
| struct | PebblePhoneCaller |
| Caller identity carried by phone events. More... | |
Functions | |
| void | phone_call_service_init (void) |
| Initialize the service and subscribe to the events it handles. | |
| void | phone_call_answer (void) |
| Answer the current incoming call. | |
| void | phone_call_decline (void) |
| Decline or hang up the current call. | |
| PebblePhoneCaller * | phone_call_util_create_caller (const char *number, const char *name) |
| Create a caller to pass in a phone event. | |
| void | phone_call_util_destroy_caller (PebblePhoneCaller *caller) |
| Free a caller created with phone_call_util_create_caller(). | |
Incoming call handling.
Calls are reported over ANCS on iOS and over the Pebble Protocol phone endpoint otherwise (see Phone endpoint). The service consumes PEBBLE_PHONE_EVENT events, drives the phone call UI, and routes answer and decline actions to the right transport.
| struct PebblePhoneCaller |
| void phone_call_answer | ( | void | ) |
Answer the current incoming call.
On iOS the call is considered over for the watch once answered, as no ongoing call UI is shown.
| void phone_call_decline | ( | void | ) |
Decline or hang up the current call.
| void phone_call_service_init | ( | void | ) |
Initialize the service and subscribe to the events it handles.
| PebblePhoneCaller * phone_call_util_create_caller | ( | const char * | number, |
| const char * | name | ||
| ) |
Create a caller to pass in a phone event.
The strings are copied to the kernel heap. When both are NULL or empty, the name is set to the localized "Unknown".
| number | Phone number, or NULL. |
| name | Caller name, or NULL. |
| void phone_call_util_destroy_caller | ( | PebblePhoneCaller * | caller | ) |
Free a caller created with phone_call_util_create_caller().
| caller | Caller to free, or NULL. |