public interface LinphoneEvent
Modifier and Type | Method and Description |
---|---|
void |
acceptSubscription()
Accept an incoming subscription.
|
void |
addCustomHeader(String name,
String value)
Add a custom header to an outgoing susbscription or publish.
|
void |
denySubscription(Reason reason)
Reject an incoming subscription.
|
LinphoneCore |
getCore()
Get a back pointer to the LinphoneCore object managing this LinphoneEvent.
|
String |
getCustomHeader(String name)
Obtain the value of a given header for an incoming subscription.
|
ErrorInfo |
getErrorInfo()
In case of error notified, returns the full error details.
|
String |
getEventName()
Get the event name as standardized by the event package RFC.
|
Reason |
getReason()
In the event where an error would be returned or notified relatively to this LinphoneEvent, returns a reason error code.
|
SubscriptionDir |
getSubscriptionDir()
Return subscription direction (incoming or outgoing).
|
SubscriptionState |
getSubscriptionState()
Get subscription state.
|
Object |
getUserContext()
Retrieve application context previously set by setUserContext().
|
void |
notify(LinphoneContent content)
Sends a NOTIFY request in the context of a LinphoneEvent created by an incoming subscription.
|
void |
sendPublish(LinphoneContent body)
Send a publish created by linphone_core_create_publish().
|
void |
sendSubscribe(LinphoneContent body)
Send a subscription previously created by linphone_core_create_subscribe().
|
void |
setUserContext(Object obj)
Assign an application context to the LinphoneEvent, for later use.
|
void |
terminate()
Terminate an outgoing or incoming subscription, depending on the way the LinphoneEvent was created.
|
void |
updatePublish(LinphoneContent content)
Update a Publish previously started with
LinphoneCore.publish(LinphoneAddress, String, int, LinphoneContent) . |
void |
updateSubscribe(LinphoneContent content)
Update a subscription initiated previously with
LinphoneCore.subscribe() |
String getEventName()
SubscriptionDir getSubscriptionDir()
SubscriptionState getSubscriptionState()
void acceptSubscription()
notify()
.void denySubscription(Reason reason)
reason
- reason code for rejection.void notify(LinphoneContent content)
content
- the data to be put in the notification.void updateSubscribe(LinphoneContent content)
LinphoneCore.subscribe()
content
- the data to be put in the subscribe request.void updatePublish(LinphoneContent content)
LinphoneCore.publish(LinphoneAddress, String, int, LinphoneContent)
.content
- the data to be put in the publish request.void terminate()
Reason getReason()
ErrorInfo getErrorInfo()
void setUserContext(Object obj)
obj
- Object getUserContext()
void addCustomHeader(String name, String value)
name
- header's namevalue
- the header's value.String getCustomHeader(String name)
name
- header's namevoid sendSubscribe(LinphoneContent body)
body
- optional content to attach with the subscription.void sendPublish(LinphoneContent body)
body
- the new data to be publishedLinphoneCore getCore()