/// <summary> /// Update the list with the given name and rules. /// </summary> /// <remarks> /// Specify the desired changes to the list by including all elements/rules in the list /// (not the "delta") /// </remarks> /// <param name="name">name of this list</param> /// <param name="rules">rules of this list</param> /// <param name="cb">Callback for the server result</param> /// <param name="cbArg">Callback arguments for the result when needed</param> public void UpdateList(string name, Item[] rules, IqCB cb, object cbArg) { var pIq = new PrivacyIq(); pIq.Type = IqType.set; // create a new list with the given name var list = new List(name); list.AddItems(rules); // add the list to the query pIq.Query.AddList(list); SendStanza(pIq, cb, cbArg); }
/// <summary> /// Update the list with the given name and rules. /// </summary> /// <remarks> /// Specify the desired changes to the list by including all elements/rules in the list /// (not the "delta") /// </remarks> /// <param name="name">name of this list</param> /// <param name="rules">rules of this list</param> /// <param name="cb">Callback for the server result</param> /// <param name="cbArg">Callback arguments for the result when needed</param> public void UpdateList(string name, Item[] rules, IqHandler cb) { PrivacyIq pIq = new PrivacyIq(); pIq.Type = agsXMPP.protocol.client.IqType.set; // create a new list with the given name List list = new List(name); list.AddItems(rules); // add the list to the query pIq.Query.AddList(list); SendStanza(pIq, cb); }
/// <summary> /// Update the list with the given name and rules. /// </summary> /// <remarks> /// Specify the desired changes to the list by including all elements/rules in the list /// (not the "delta") /// </remarks> /// <param name="name">name of this list</param> /// <param name="rules">rules of this list</param> /// <param name="cb">Callback for the server result</param> /// <param name="cbArg">Callback arguments for the result when needed</param> public void UpdateList(string name, Item[] rules, IqCB cb, object cbArg) { PrivacyIq pIq = new PrivacyIq(); pIq.Type = agsXMPP.protocol.client.IqType.set; // create a new list with the given name List list = new List(name); list.AddItems(rules); // add the list to the query pIq.Query.AddList(list); SendStanza(pIq, cb, cbArg); }