ContactStatusChange Method
      
 

Description

Called when contact's status changes.


Return Type

None  


Syntax

object.ContactStatusChange Owner, Contact, ChatRoom, NewStatus, OldStatus



The ContactStatusChange Method syntax has these parts:

Part Description
object An expression evaluating to an object of type IwodXMPPNotify.
Owner Required. A wodXMPP object.
Contact Required. A XMPPContact object.
ChatRoom Required. A XMPPChatRoom object.
NewStatus Required. A StatusEnum enumeration, as described in settings.
OldStatus Required. A StatusEnum enumeration, as described in settings.

Settings

The settings for OldStatus are:

Constant Value Description
 Offline 0 Offline.
 Online 1 Online.
 Away 2 Away.
 Chat 3 Free for chat.
 DoNotDisturb 4 Do not disturb.
 ExtendedAway 5 Extended away.
 Invisible 6 Invisible.
 Requested 7 Asking for subscription.
 Unsubscribed 8 Contact not subscribed.

Remarks

This method is called only if you implemented IwodXMPPNotify interface in your application, and wodXMPP.Notification property has received reference to instance of your implementation.

Called each time when your contact changes his online status. When this happens, the notification method will provide you with two parameters, Contact - which provides you with the reference to XMPPContact object of the contact that changed his status, and OldStatus which provides you with information what your contact's previous status was.

If this contact is only from some chat room, ChatRoom argument will hold reference to the chat room.

When your contact is connected more than once using different resources, Resource property will contain all of them, but first one listed there is one that caused this method to be called.