ContactSearchDone Event
    
 

Description

Fires when search query has completed.


Syntax

Private Sub object_ContactSearchDone(Service, Items)



The ContactSearchDone Event syntax has these parts:

Part Description
object A wodXMPP object.
Service A XMPPService object. Provides reference to XMPPService object.
Items A XMPPVars object. Provides reference to filled XMPPVars object, that contains search result.

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.