Back to product page

ContactSearchDone callback method


Called when search query has completed.

Syntax

  • Basic
object.ContactSearchDone (Owner, Service, Items)
The ContactSearchDone(object,Owner,Service,Items) syntax has these parts:
objectAn expression evaluating to an object of type IwodXMPPNotify
OwnerAn expression evaluating to an object of type wodXMPP
ServiceXMPPService object
ItemsXMPPVars object

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.

ContactSearchDone notification method is called as a result of Search method. It will be called when server provides the "Search Form" (which you can show using the Show method), or the search report, where you can loop through Items.Item(xyz).SubValue(xyz) properties.

For example, after successful search request, you can view returned JIDs like this:
 
Private Sub IwodXMPPNotify_ContactSearchDone(ByVal Owner As WODXMPPCOMLib.IwodXMPPCom, ByVal Service As WODXMPPCOMLib.IXMPPService, ByVal Items As WODXMPPCOMLib.IXMPPVars)
 If Items.Type = VarReport Then
   Dim i As Integer
   For i = 0 To Items("jid").SubCount - 1
     Debug.Print Items("jid").SubValue(i) ' show only JID subitems
   Next i
 End If
End Sub
 

It would be best to present returned data as the grid - allowing user to select on of jids and request them to Subscribe to user's contact list.

Platforms

Windows