Back to product page

Notification property


Fast notifications interface.

Type

IwodXMPPNotify interface.

Syntax

  • Basic
[Set] object.Notification [= value]
The Notification(object,value) syntax has these parts:
objectAn expression evaluating to an object of type wodXMPP
valueIwodXMPPNotify interface.

Remarks

Available only in Component (DLL, windowless) version!

Notification property holds reference to IwodXMPPNotify interface that can be implemented by your application. When this property is set, and contains such a reference, wodXMPPCom will call your method implementations instead of firing events. More information on how this works can be found here.

For example, instead of having this in your code (VB example):
Private Sub XMPP1_Connected()
 
       End Sub

you will have this:
Private Sub IwodXMPPNotify_Connected(ByVal Owner As wodXMPPComLib.IwodXMPPCom)
 
       End Sub

pretty much the same - except notification method has one more argument - Owner, which holds reference to wodXMPPCom instance that called this method.

In VB, to implement IwodXMPPNotify interface, you need code like this: - at the top of the code, in section, put this:
 
       Dim XMPP1 As wodXMPPCom
       Implements IwodXMPPNotify
 

- in Form_Load (or where you initialize new instance of wodXMPP) do this:
 
       Set XMPP1 = New wodXMPPCom
       Set XMPP1.Notification = Me
       XMPP1.Login = "joe@usa.net"
       XMPP1.Connect
       ...
 

You can notice that when we declared XMPP1, we did not use WithEvents keyword - it is not needed anymore, because events will not be fired anymore. Notification methods we implement will be called instead!

Platforms

Windows