Unsubscribe

Metreos.Providers.Presence.Unsubscribe

Summary

Unsubscribe will terminate a subscription.

Usage

The Unsubscribe action will indicate with the ResultCode result data parameter if the unsubscription was successful. Also, the SubscriptionTerminated event will also occur after this action has successfully completed. Both indicate the same thing: that the subscription is over. However, because SubscriptionTerminated also occurs when the presence server ends the subscription, the event handler of the SubscriptionTerminated event may offer a cleaner location to perform end-of-subscription logic.

Remarks

None.

Action Parameters
Parameter Name.NET TypeDefaultDescription
TimeoutSystem.Int32The Timeout property specifies to the Application Runtime Environment how long to wait for a response from the provider for the current action. The ReturnValue returned in this case is Timeout. The value must be a literal value in milliseconds.
Subscriber *System.StringThe identity of the watcher. This must be the same as the value supplied in the TriggeringSubscribe or NonTriggeringSubscribe action.
PasswordSystem.StringThe password of the watcher.
RequestUri *System.StringThe URI of the presentity to unsubscribe from. This must be the same as the value supplied in the TriggeringSubscribe or NonTriggeringSubscribe action.
Triggering *System.BooleanfalseIndicates if the subscription you are cancelling is triggering timer, and the other creates a non-triggering.
Result Data
Parameter Name.NET TypeDescription
ResultCodeSystem.Int64The result code of the subscribe operation. The following are the possible values:
0

Success

1

Failure

2

Duplicate Subscription

3

Missing Parameter Subscriber

4

Missing Parameter RequestUri

5

Missing Parameter Password

6

Unused

7

Bad Subscriber Format

8

Bad RequestUri Format

9

Missing Registrar Info

10

Missing Domain Name

11

Unknown Domain Name

12

No Subscription

13

Service Not Available

14

Timeout

15

Unauthorized

16

Authentication Failed

Branch Conditions 

Success

No description.

Failure

No description.

Timeout

No description.