Liblinphone
5.3.0
|
Object representing an event state, which is subcribed or published. More...
#include <event.hh>
Public Member Functions | |
LINPHONECXX_PUBLIC | Event (void *ptr, bool takeRef=true) |
LINPHONECXX_PUBLIC _LinphoneEvent * | cPtr () |
LINPHONECXX_PUBLIC void | addListener (const std::shared_ptr< EventListener > &listener) |
Add an application listener to the Event instance. More... | |
LINPHONECXX_PUBLIC void | removeListener (const std::shared_ptr< EventListener > &listener) |
Remove a previously added listener from the Event instance. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::Core > | getCore () const |
Returns back pointer to the Core that created this Event. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::ErrorInfo > | getErrorInfo () const |
Get full details about an error occured. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::Address > | getFrom () const |
Get the "from" address of the subscription. More... | |
LINPHONECXX_PUBLIC std::string | getName () const |
Get the name of the event as specified in the event package RFC. More... | |
LINPHONECXX_PUBLIC linphone::PublishState | getPublishState () const |
Get publish state. More... | |
LINPHONECXX_PUBLIC linphone::Reason | getReason () const |
Return reason code (in case of error state reached). More... | |
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::Address > | getRemoteContact () const |
Get the "contact" address of the subscription. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::Address > | getResource () const |
Get the resource address of the subscription or publish. More... | |
LINPHONECXX_PUBLIC linphone::SubscriptionDir | getSubscriptionDir () |
Get subscription direction. More... | |
LINPHONECXX_PUBLIC linphone::SubscriptionState | getSubscriptionState () const |
Get subscription state. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::Address > | getTo () const |
Get the "to" address of the subscription. More... | |
LINPHONECXX_PUBLIC linphone::Status | acceptPublish () |
Accept an incoming publish. More... | |
LINPHONECXX_PUBLIC linphone::Status | acceptSubscription () |
Accept an incoming subcription. More... | |
LINPHONECXX_PUBLIC void | addCustomHeader (const std::string &name, const std::string &value) |
Add a custom header to an outgoing susbscription or publish. More... | |
LINPHONECXX_PUBLIC linphone::Status | denyPublish (linphone::Reason reason) |
Deny an incoming publish with given reason. More... | |
LINPHONECXX_PUBLIC linphone::Status | denySubscription (linphone::Reason reason) |
Deny an incoming subscription with given reason. More... | |
LINPHONECXX_PUBLIC std::string | getCustomHeader (const std::string &name) |
Obtain the value of a given header for an incoming subscription. More... | |
LINPHONECXX_PUBLIC linphone::Status | notify (const std::shared_ptr< const linphone::Content > &body) |
Send a notification. More... | |
LINPHONECXX_PUBLIC void | pausePublish () |
Prevent an event from refreshing its publish. More... | |
LINPHONECXX_PUBLIC linphone::Status | refreshPublish () |
Refresh an outgoing publish keeping the same body. More... | |
LINPHONECXX_PUBLIC linphone::Status | refreshSubscribe () |
Refresh an outgoing subscription keeping the same body. More... | |
LINPHONECXX_PUBLIC void | removeCustomHeader (const std::string &name) |
Remove custom header to an outgoing susbscription or publish. More... | |
LINPHONECXX_PUBLIC linphone::Status | sendPublish (const std::shared_ptr< const linphone::Content > &body) |
Send a publish created by Core::createPublish(). More... | |
LINPHONECXX_PUBLIC linphone::Status | sendSubscribe (const std::shared_ptr< const linphone::Content > &body) |
Send a subscription previously created by Core::createSubscribe(). More... | |
LINPHONECXX_PUBLIC void | terminate () |
Terminate an incoming or outgoing subscription that was previously acccepted, or a previous publication. More... | |
LINPHONECXX_PUBLIC linphone::Status | updatePublish (const std::shared_ptr< const linphone::Content > &body) |
Update (refresh) a publish. More... | |
LINPHONECXX_PUBLIC linphone::Status | updateSubscribe (const std::shared_ptr< const linphone::Content > &body) |
Update (refresh) an outgoing subscription, changing the body. More... | |
Object representing an event state, which is subcribed or published.
LINPHONECXX_PUBLIC linphone::Status linphone::Event::acceptPublish | ( | ) |
Accept an incoming publish.
LINPHONECXX_PUBLIC linphone::Status linphone::Event::acceptSubscription | ( | ) |
Accept an incoming subcription.
LINPHONECXX_PUBLIC void linphone::Event::addCustomHeader | ( | const std::string & | name, |
const std::string & | value | ||
) |
Add a custom header to an outgoing susbscription or publish.
name | header's name |
value | the header's value. |
LINPHONECXX_PUBLIC void linphone::Event::addListener | ( | const std::shared_ptr< EventListener > & | listener | ) |
Add an application listener to the Event instance.
listener | the application listener |
LINPHONECXX_PUBLIC linphone::Status linphone::Event::denyPublish | ( | linphone::Reason | reason | ) |
Deny an incoming publish with given reason.
LINPHONECXX_PUBLIC linphone::Status linphone::Event::denySubscription | ( | linphone::Reason | reason | ) |
Deny an incoming subscription with given reason.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::Core> linphone::Event::getCore | ( | ) | const |
LINPHONECXX_PUBLIC std::string linphone::Event::getCustomHeader | ( | const std::string & | name | ) |
Obtain the value of a given header for an incoming subscription.
name | header's name |
LINPHONECXX_PUBLIC std::shared_ptr<const linphone::ErrorInfo> linphone::Event::getErrorInfo | ( | ) | const |
Get full details about an error occured.
LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Address> linphone::Event::getFrom | ( | ) | const |
Get the "from" address of the subscription.
LINPHONECXX_PUBLIC std::string linphone::Event::getName | ( | ) | const |
Get the name of the event as specified in the event package RFC.
LINPHONECXX_PUBLIC linphone::PublishState linphone::Event::getPublishState | ( | ) | const |
Get publish state.
If the event object was not created by a publish mechanism, PublishState::None is returned.
LINPHONECXX_PUBLIC linphone::Reason linphone::Event::getReason | ( | ) | const |
Return reason code (in case of error state reached).
LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Address> linphone::Event::getRemoteContact | ( | ) | const |
Get the "contact" address of the subscription.
LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Address> linphone::Event::getResource | ( | ) | const |
Get the resource address of the subscription or publish.
LINPHONECXX_PUBLIC linphone::SubscriptionDir linphone::Event::getSubscriptionDir | ( | ) |
Get subscription direction.
If the object wasn't created by a subscription mechanism, SubscriptionDir::InvalidDir is returned.
LINPHONECXX_PUBLIC linphone::SubscriptionState linphone::Event::getSubscriptionState | ( | ) | const |
Get subscription state.
If the event object was not created by a subscription mechanism, SubscriptionState::None is returned.
LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Address> linphone::Event::getTo | ( | ) | const |
Get the "to" address of the subscription.
LINPHONECXX_PUBLIC linphone::Status linphone::Event::notify | ( | const std::shared_ptr< const linphone::Content > & | body | ) |
Send a notification.
body | an optional body containing the actual notification data. |
LINPHONECXX_PUBLIC void linphone::Event::pausePublish | ( | ) |
Prevent an event from refreshing its publish.
This is useful to let registrations to expire naturally (or) when the application wants to keep control on when refreshes are sent. The refreshing operations can be resumed with ProxyConfig::refreshRegister().
LINPHONECXX_PUBLIC linphone::Status linphone::Event::refreshPublish | ( | ) |
Refresh an outgoing publish keeping the same body.
LINPHONECXX_PUBLIC linphone::Status linphone::Event::refreshSubscribe | ( | ) |
Refresh an outgoing subscription keeping the same body.
LINPHONECXX_PUBLIC void linphone::Event::removeCustomHeader | ( | const std::string & | name | ) |
Remove custom header to an outgoing susbscription or publish.
name | header's name |
LINPHONECXX_PUBLIC void linphone::Event::removeListener | ( | const std::shared_ptr< EventListener > & | listener | ) |
Remove a previously added listener from the Event instance.
listener | the application listener |
LINPHONECXX_PUBLIC linphone::Status linphone::Event::sendPublish | ( | const std::shared_ptr< const linphone::Content > & | body | ) |
Send a publish created by Core::createPublish().
body | the new data to be published |
LINPHONECXX_PUBLIC linphone::Status linphone::Event::sendSubscribe | ( | const std::shared_ptr< const linphone::Content > & | body | ) |
Send a subscription previously created by Core::createSubscribe().
body | optional content to attach with the subscription. |
LINPHONECXX_PUBLIC void linphone::Event::terminate | ( | ) |
Terminate an incoming or outgoing subscription that was previously acccepted, or a previous publication.
The Event shall not be used anymore after this operation.
LINPHONECXX_PUBLIC linphone::Status linphone::Event::updatePublish | ( | const std::shared_ptr< const linphone::Content > & | body | ) |
Update (refresh) a publish.
body | the new data to be published |
LINPHONECXX_PUBLIC linphone::Status linphone::Event::updateSubscribe | ( | const std::shared_ptr< const linphone::Content > & | body | ) |
Update (refresh) an outgoing subscription, changing the body.
body | an optional body to include in the subscription update, may be nullptr. |