Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
algorizm #1
Member since Dec 2008 · 11 posts
Group memberships: Members
Show profile · Link to this post
Subject: how to receive result vardinfo?
The sample code does not contain the vcard button in the matrix sdk, however the online version does.
Is it possible to get the latest version?

For example, use the following code:

  1. Martix.Xmpp.Client vcardiq viq = new Vcardlq (lqType.get);
  2. xmppclient.lqFilter.Sendlq( viq, VCardResult);
  3.  
  4. void VCardResult( object sender, lqEventArgs e)
  5. {
  6.    if( e.lq.Type == lqType.result)
  7.    {
  8.  
  9.        Matrix.Xmpp.Vcard.Vcard vcinfo = e.lq ?
  10.        
  11.        //AgsXmpp SDK
  12.        //Result Vcard object class return
  13.        // iq.Vcard
  14.    }
  15. }
Avatar
Alex #2
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
here is an example how you get the vcard of the user user@server.org:

  1. var viq = new Vcardlq (lqType.get) {To = "user@server.org"};
  2. xmppclient.lqFilter.Sendlq( viq, VCardResult);
  3.  
  4. void VCardResult( object sender, lqEventArgs e)
  5. {
  6.    if( e.lq.Type == lqType.result)
  7.    {
  8.        var vcard = iq.Element<Vcard>();
  9.        // add more code here to read the vcard fields.
  10.    }
  11. }
Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: MatriX RSS