/// <summary> /// Creates the node using the specified configuration form. /// </summary> /// <param name="config">Null for the default configuration</param> public void Create(jabber.protocol.x.Data config) { lock (this) { if (!NeedsAsking(this[Op.CREATE])) { SubscribeIfPending(); return; } this[Op.CREATE] = STATE.Asking; } /* * <iq type='set' * from='[email protected]/elsinore' * to='pubsub.shakespeare.lit' * id='create1'> * <pubsub xmlns='http://jabber.org/protocol/pubsub'> * <create node='princely_musings'/> * <configure/> * </pubsub> * </iq> */ PubSubCommandIQ <Create> iq = new PubSubCommandIQ <Create>(m_stream.Document, m_node); iq.To = m_jid; iq.Type = IQType.set; iq.Command.CreateConfiguration(config); BeginIQ(iq, GotCreated, null); }
/// <summary> /// Creates the node using the specified configuration form. /// </summary> /// <param name="config">Null for the default configuration</param> public void Create(jabber.protocol.x.Data config) { lock (this) { if (!NeedsAsking(this[Op.CREATE])) { SubscribeIfPending(); return; } this[Op.CREATE] = STATE.Asking; } /* <iq type='set' from='[email protected]/elsinore' to='pubsub.shakespeare.lit' id='create1'> <pubsub xmlns='http://jabber.org/protocol/pubsub'> <create node='princely_musings'/> <configure/> </pubsub> </iq> */ PubSubCommandIQ<Create> iq = new PubSubCommandIQ<Create>(m_stream.Document, m_node); iq.To = m_jid; iq.Type = IQType.set; iq.Command.CreateConfiguration(config); BeginIQ(iq, GotCreated, null); }