Ejemplo n.º 1
0
        /// <summary>
        /// Add a Rosteritem to the Roster
        /// </summary>
        /// <param name="jid">The BARE jid of the rosteritem that should be removed</param>
        /// <param name="nickname">Nickname for the RosterItem</param>
        /// <param name="group">An Array of groups when you want to add the Rosteritem to multiple groups</param>
        public void AddRosterItem(Jid jid, string nickname, string[] group)
        {
            var riq = new RosterIq();

            riq.Type = IQType.Set;

            var ri = new RosterItem();

            ri.Jid = jid;

            if (nickname != null)
            {
                ri.Name = nickname;
            }

            foreach (var g in group)
            {
                ri.AddGroup(g);
            }

            riq.Query.AddRosterItem(ri);

            this.m_connection.Send(riq);
        }
Ejemplo n.º 2
0
 public void AddRosterItem(RosterItem r)
 {
     this.ChildNodes.Add(r);
 }