liblinphone
3.6.1
|
Typedefs | |
typedef enum _LinphoneSubscriptionDir | LinphoneSubscriptionDir |
typedef void(* | LinphoneEventIncomingNotifyCb )(LinphoneCore *lc, LinphoneEvent *lev, const char *notified_event, const LinphoneContent *body) |
typedef void(* | LinphoneSubscriptionStateChangedCb )(LinphoneCore *lc, LinphoneEvent *lev, LinphoneSubscriptionState state) |
Functions | |
LINPHONE_PUBLIC LinphoneEvent * | linphone_core_subscribe (LinphoneCore *lc, const LinphoneAddress *resource, const char *event, int expires, const LinphoneContent *body) |
LINPHONE_PUBLIC int | linphone_event_update_subscribe (LinphoneEvent *lev, const LinphoneContent *body) |
LINPHONE_PUBLIC int | linphone_event_accept_subscription (LinphoneEvent *lev) |
LINPHONE_PUBLIC int | linphone_event_deny_subscription (LinphoneEvent *lev, LinphoneReason reason) |
LINPHONE_PUBLIC int | linphone_event_notify (LinphoneEvent *lev, const LinphoneContent *body) |
LINPHONE_PUBLIC LinphoneEvent * | linphone_core_publish (LinphoneCore *lc, const LinphoneAddress *resource, const char *event, int expires, const LinphoneContent *body) |
LINPHONE_PUBLIC int | linphone_event_update_publish (LinphoneEvent *lev, const LinphoneContent *body) |
LINPHONE_PUBLIC LinphoneReason | linphone_event_get_reason (const LinphoneEvent *lev) |
LINPHONE_PUBLIC LinphoneSubscriptionState | linphone_event_get_subscription_state (const LinphoneEvent *lev) |
LINPHONE_PUBLIC LinphoneSubscriptionDir | linphone_event_get_subscription_dir (LinphoneEvent *lev) |
LINPHONE_PUBLIC void | linphone_event_set_user_data (LinphoneEvent *ev, void *up) |
LINPHONE_PUBLIC void * | linphone_event_get_user_data (const LinphoneEvent *ev) |
LINPHONE_PUBLIC void | linphone_event_terminate (LinphoneEvent *lev) |
LINPHONE_PUBLIC LinphoneEvent * | linphone_event_ref (LinphoneEvent *lev) |
LINPHONE_PUBLIC void | linphone_event_unref (LinphoneEvent *lev) |
LINPHONE_PUBLIC const char * | linphone_event_get_name (const LinphoneEvent *lev) |
LINPHONE_PUBLIC const LinphoneAddress * | linphone_event_get_from (const LinphoneEvent *lev) |
LINPHONE_PUBLIC const LinphoneAddress * | linphone_event_get_resource (const LinphoneEvent *lev) |
typedef enum _LinphoneSubscriptionDir LinphoneSubscriptionDir |
Typedef alias for _LinphoneSubscriptionDir
typedef void(* LinphoneEventIncomingNotifyCb)(LinphoneCore *lc, LinphoneEvent *lev, const char *notified_event, const LinphoneContent *body) |
Callback prototype for notifying the application about notification received from the network.
typedef void(* LinphoneSubscriptionStateChangedCb)(LinphoneCore *lc, LinphoneEvent *lev, LinphoneSubscriptionState state) |
Callback prototype for notifying the application about changes of subscription states, including arrival of new subscriptions.
Enum for subscription direction (incoming or outgoing).
Enum for subscription states.
Enumerator | |
---|---|
LinphoneSubscriptionNone |
Initial state, should not be used. |
LinphoneSubscriptionOutoingInit |
An outgoing subcription was created |
LinphoneSubscriptionIncomingReceived |
An incoming subcription is received |
LinphoneSubscriptionPending |
Subscription is pending, waiting for user approval |
LinphoneSubscriptionActive |
Subscription is accepted. |
LinphoneSubscriptionTerminated |
Subscription is terminated normally |
LinphoneSubscriptionError |
Subscription encountered an error, indicated by linphone_event_get_reason() |
LINPHONE_PUBLIC LinphoneEvent* linphone_core_subscribe | ( | LinphoneCore * | lc, |
const LinphoneAddress * | resource, | ||
const char * | event, | ||
int | expires, | ||
const LinphoneContent * | body | ||
) |
Create an outgoing subscription, specifying the destination resource, the event name, and an optional content body. If accepted, the subscription runs for a finite period, but is automatically renewed if not terminated before.
lc | the LinphoneCore |
resource | the destination resource |
event | the event name |
expires | the whished duration of the subscription |
body | an optional body, may be NULL. |
LINPHONE_PUBLIC int linphone_event_update_subscribe | ( | LinphoneEvent * | lev, |
const LinphoneContent * | body | ||
) |
Update an outgoing subscription.
lev | a LinphoneEvent |
body | an optional body to include in the subscription update, may be NULL. |
LINPHONE_PUBLIC int linphone_event_accept_subscription | ( | LinphoneEvent * | lev | ) |
Accept an incoming subcription.
LINPHONE_PUBLIC int linphone_event_deny_subscription | ( | LinphoneEvent * | lev, |
LinphoneReason | reason | ||
) |
Deny an incoming subscription with given reason.
LINPHONE_PUBLIC int linphone_event_notify | ( | LinphoneEvent * | lev, |
const LinphoneContent * | body | ||
) |
Send a notification.
lev | a #LinphoneEvent corresponding to an incoming subscription previously received and accepted. |
body | an optional body containing the actual notification data. |
LINPHONE_PUBLIC LinphoneEvent* linphone_core_publish | ( | LinphoneCore * | lc, |
const LinphoneAddress * | resource, | ||
const char * | event, | ||
int | expires, | ||
const LinphoneContent * | body | ||
) |
Publish an event. After expiry, the publication is refreshed unless it is terminated before.
lc | the LinphoneCore |
resource | the resource uri for the event |
event | the event name |
expires | the lifetime of the publication |
body | the actual published data |
LINPHONE_PUBLIC int linphone_event_update_publish | ( | LinphoneEvent * | lev, |
const LinphoneContent * | body | ||
) |
Update a publication.
lev | the #LinphoneEvent |
body | the new data to be published |
LINPHONE_PUBLIC LinphoneReason linphone_event_get_reason | ( | const LinphoneEvent * | lev | ) |
Return reason code (in case of error state reached).
LINPHONE_PUBLIC LinphoneSubscriptionState linphone_event_get_subscription_state | ( | const LinphoneEvent * | lev | ) |
Get subscription state. If the event object was not created by a subscription mechanism, LinphoneSubscriptionNone is returned.
LINPHONE_PUBLIC LinphoneSubscriptionDir linphone_event_get_subscription_dir | ( | LinphoneEvent * | lev | ) |
Get subscription direction. If the object wasn't created by a subscription mechanism, #LinphoneSubscriptionInvalidDir is returned.
LINPHONE_PUBLIC void linphone_event_set_user_data | ( | LinphoneEvent * | ev, |
void * | up | ||
) |
Set a user (application) pointer.
LINPHONE_PUBLIC void* linphone_event_get_user_data | ( | const LinphoneEvent * | ev | ) |
Retrieve user pointer.
LINPHONE_PUBLIC void linphone_event_terminate | ( | LinphoneEvent * | lev | ) |
Terminate an incoming or outgoing subscription that was previously acccepted, or a previous publication.
LINPHONE_PUBLIC LinphoneEvent* linphone_event_ref | ( | LinphoneEvent * | lev | ) |
Increase reference count.
LINPHONE_PUBLIC void linphone_event_unref | ( | LinphoneEvent * | lev | ) |
Decrease reference count.
LINPHONE_PUBLIC const char* linphone_event_get_name | ( | const LinphoneEvent * | lev | ) |
Get the name of the event as specified in the event package RFC.
LINPHONE_PUBLIC const LinphoneAddress* linphone_event_get_from | ( | const LinphoneEvent * | lev | ) |
Get the "from" address of the subscription.
LINPHONE_PUBLIC const LinphoneAddress* linphone_event_get_resource | ( | const LinphoneEvent * | lev | ) |
Get the resource address of the subscription or publish.