Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
ramtin #1
User title: RamTin
Member since Mar 2013 · 26 posts
Group memberships: Members
Show profile · Link to this post
Subject: Share contacts
Hi alex
agsXMPP
C#
Look this :
My rosters list
1@localhost
2@localhost
3@localhost
4@localhost
5@localhost
6@localhost

How can share 1-5 ids to 6@localhost?

This is xml for that:
  1. <message to="6@localhost" >
  2.    <x xmlns="http://jabber.org/protocol/rosterx">
  3.       <item action="add" jid="1@localhost"/>
  4.       <item action="add" jid="2@localhost"/>
  5.       <item action="add" jid="3@localhost"/>
  6.       <item action="add" jid="4@localhost"/>
  7.       <item action="add" jid="5@localhost"/>
  8.    </x>
  9. </message>

In agsXMPP there is way for that?

Thanks
This post was edited on 2013-10-15, 10:03 by Alex.
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
yes, you can find the classes for this in agsXMPP.protocol.x.rosterx

Alex
Avatar
ramtin #3
User title: RamTin
Member since Mar 2013 · 26 posts
Group memberships: Members
Show profile · Link to this post
this code is right?
  1. agsXMPP.protocol.x.rosterx.RosterItem item = new agsXMPP.protocol.x.rosterx.RosterItem
  2. {
  3.     Action = agsXMPP.protocol.x.rosterx.Action.add,
  4.     Jid = new Jid("2@localhost")
  5. };
  6. agsXMPP.protocol.x.rosterx.RosterX rosterX = new agsXMPP.protocol.x.rosterx.RosterX();
  7. rosterX.AddRosterItem(item);
This post was edited 2 times, last on 2013-10-15, 11:10 by Alex.
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
yes, and then just do:

  1. msg.Add(rosterX);

to add the object to a message and send it.

On the receiving side check if incoming messages contain a RosterX object.
Avatar
ramtin #5
User title: RamTin
Member since Mar 2013 · 26 posts
Group memberships: Members
Show profile · Link to this post
in "agsXMPP.protocol.client.Message" i couldn't find msg.Add() !
it just AddChild and AddTag

or i mistake ?
thanks
Avatar
Alex #6
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
AddChild, Add is in MatriX ;-)
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: agsXMPP RSS