Class Event
Object representing an event state, which is subcribed or published.
Inherited Members
Namespace: Linphone
Assembly: cs.temp.dll.dll
Syntax
public class Event : LinphoneObject
Remarks
See :
Properties
Core
Declaration
public Core Core { get; }
Property Value
Type | Description |
---|---|
Core | the Core object associated. |
CurrentCallbacks
Get the current LinphoneEventCbs object associated with a LinphoneEvent.
Declaration
public EventListener CurrentCallbacks { get; }
Property Value
Type | Description |
---|---|
EventListener | The current LinphoneEventCbs object associated with the LinphoneEvent. |
ErrorInfo
Get full details about an error occured.
Declaration
public ErrorInfo ErrorInfo { get; }
Property Value
Type | Description |
---|---|
ErrorInfo | a ErrorInfo object. |
From
Get the "from" address of the subscription.
Declaration
public Address From { get; }
Property Value
Type | Description |
---|---|
Address | the from Address. |
Listener
Declaration
public EventListener Listener { get; }
Property Value
Type | Description |
---|---|
EventListener |
Name
Get the name of the event as specified in the event package RFC.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String | the event name. |
PublishState
Get publish state.
If the event object was not created by a publish mechanism, None is returned.
Declaration
public PublishState PublishState { get; }
Property Value
Type | Description |
---|---|
PublishState | the current PublishState |
Reason
Return reason code (in case of error state reached).
Declaration
public Reason Reason { get; }
Property Value
Type | Description |
---|---|
Reason | a Reason enum |
RemoteContact
Get the "contact" address of the subscription.
Declaration
public Address RemoteContact { get; }
Property Value
Type | Description |
---|---|
Address | The "contact" address of the subscription |
Resource
Get the resource address of the subscription or publish.
Declaration
public Address Resource { get; }
Property Value
Type | Description |
---|---|
Address | the resource Address. |
SubscriptionDir
Get subscription direction.
If the object wasn't created by a subscription mechanism, InvalidDir is returned.
Declaration
public SubscriptionDir SubscriptionDir { get; }
Property Value
Type | Description |
---|---|
SubscriptionDir | the SubscriptionDir |
SubscriptionState
Get subscription state.
If the event object was not created by a subscription mechanism, None is returned.
Declaration
public SubscriptionState SubscriptionState { get; }
Property Value
Type | Description |
---|---|
SubscriptionState | the current SubscriptionState |
To
Get the "to" address of the subscription.
Declaration
public Address To { get; }
Property Value
Type | Description |
---|---|
Address | the "to" Address. |
Methods
AcceptSubscription()
Accept an incoming subcription.
Declaration
public void AcceptSubscription()
AddCustomHeader(String, String)
Add a custom header to an outgoing susbscription or publish.
Declaration
public void AddCustomHeader(string name, string val)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | header's name |
System.String | val | the header's value. |
DenySubscription(Reason)
Deny an incoming subscription with given reason.
Declaration
public void DenySubscription(Reason reason)
Parameters
Type | Name | Description |
---|---|---|
Reason | reason |
Finalize()
Declaration
protected void Finalize()
GetCustomHeader(String)
Obtain the value of a given header for an incoming subscription.
Declaration
public string GetCustomHeader(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | header's name |
Returns
Type | Description |
---|---|
System.String | the header's value or null if such header doesn't exist. |
Notify(Content)
Send a notification.
Declaration
public void Notify(Content body)
Parameters
Type | Name | Description |
---|---|---|
Content | body | an optional body containing the actual notification data. |
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 RefreshRegister().
Declaration
public void PausePublish()
RefreshPublish()
Refresh an outgoing publish keeping the same body.
Declaration
public void RefreshPublish()
RefreshSubscribe()
Refresh an outgoing subscription keeping the same body.
Declaration
public void RefreshSubscribe()
RemoveCustomHeader(String)
Remove custom header to an outgoing susbscription or publish.
Declaration
public void RemoveCustomHeader(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | header's name |
SendPublish(Content)
Send a publish created by
Declaration
public void SendPublish(Content body)
Parameters
Type | Name | Description |
---|---|---|
Content | body | the new data to be published |
SendSubscribe(Content)
Send a subscription previously created by
Declaration
public void SendSubscribe(Content body)
Parameters
Type | Name | Description |
---|---|---|
Content | body | optional content to attach with the subscription. |
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.
Declaration
public void Terminate()
UpdatePublish(Content)
Update (refresh) a publish.
Declaration
public void UpdatePublish(Content body)
Parameters
Type | Name | Description |
---|---|---|
Content | body | the new data to be published |
UpdateSubscribe(Content)
Update (refresh) an outgoing subscription, changing the body.
Declaration
public void UpdateSubscribe(Content body)
Parameters
Type | Name | Description |
---|---|---|
Content | body | an optional body to include in the subscription update, may be null. |