public void ModifyList(Jid room, agsXMPP.protocol.x.muc.iq.admin.Item[] items, IqCB cb, object cbArg) { AdminIq aIq = new AdminIq(); aIq.To = room; aIq.Type = IqType.set; foreach (agsXMPP.protocol.x.muc.iq.admin.Item itm in items) { aIq.Query.AddItem(itm); } if (cb == null) m_connection.Send(aIq); else m_connection.IqGrabber.SendIq(aIq, cb, cbArg); }
private void ChangeAffiliation(Affiliation affiliation, Jid room, Jid user, string nickname, string reason, IqCB cb, object cbArg) { var aIq = new AdminIq(); aIq.To = room; aIq.Type = IqType.set; agsXMPP.protocol.x.muc.iq.admin.Item itm = new agsXMPP.protocol.x.muc.iq.admin.Item(); itm.Affiliation = affiliation; if (user != null) itm.Jid = user; if (nickname != null) itm.Nickname = nickname; if (reason != null) itm.Reason = reason; aIq.Query.AddItem(itm); if (cb == null) m_connection.Send(aIq); else m_connection.IqGrabber.SendIq(aIq, cb, cbArg); }
private void ChangeRole(Role role, Jid room, string nickname, string reason, IqCB cb, object cbArg) { AdminIq aIq = new AdminIq(); aIq.To = room; aIq.Type = IqType.set; agsXMPP.protocol.x.muc.iq.admin.Item itm = new agsXMPP.protocol.x.muc.iq.admin.Item(); itm.Role = role; itm.Nickname = nickname; if (reason != null) itm.Reason = reason; aIq.Query.AddItem(itm); if (cb == null) m_connection.Send(aIq); else m_connection.IqGrabber.SendIq(aIq, cb, cbArg); }
public void RequestList(Role role, Jid room, IqCB cb, object cbArg) { AdminIq aIq = new AdminIq(); aIq.To = room; aIq.Type = IqType.get; aIq.Query.AddItem(new agsXMPP.protocol.x.muc.iq.admin.Item(role)); if (cb == null) m_connection.Send(aIq); else m_connection.IqGrabber.SendIq(aIq, cb, cbArg); }