Back to product page

ContactSearchDone event


Fires when search query has completed.

Syntax

  • Basic
Private Sub object_ContactSearchDone (ByRef Service, ByRef Items)
The ContactSearchDone(Service,Items) syntax has these parts:
ServiceXMPPService object
ItemsXMPPVars object

Remarks

ContactSearchDone event fires as a result of Search method. It will be fired 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 wodXMPP1_ContactSearchDone(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