Exemple #1
0
        /// <summary>
        /// Get the default configuration of the node.
        /// </summary>
        /// <param name="service">JID of the pub/sub service</param>
        /// <param name="callback">Callback.  Must not be null.  Will not be called back
        /// if there is an error, but instead OnError will be called.</param>
        /// <param name="state">State information to be passed back to callback</param>
        public void GetDefaults(JID service, IqCB callback, object state)
        {
            OwnerPubSubCommandIQ <OwnerDefault> iq = new OwnerPubSubCommandIQ <OwnerDefault>(m_stream.Document);

            iq.To   = service;
            iq.Type = IQType.get;
            BeginIQ(iq, OnDefaults, new IQTracker.TrackerData(callback, state, null, null));
        }
Exemple #2
0
        /// <summary>
        /// Request configuration form as the owner
        /// </summary>
        /// <param name="callback">Callback.  Must not be null.  Will not be called back
        /// if there is an error, but instead OnError will be called.</param>
        /// <param name="state">State information to be passed back to callback</param>
        public void Configure(IqCB callback, object state)
        {
            OwnerPubSubCommandIQ <OwnerConfigure> iq = new OwnerPubSubCommandIQ <OwnerConfigure>(m_stream.Document);

            iq.To           = m_jid;
            iq.Type         = IQType.get;
            iq.Command.Node = m_node;
            BeginIQ(iq, OnConfigure, new IQTracker.TrackerData(callback, state, null, null));
        }
Exemple #3
0
        /// <summary>
        /// Delete all items from a node at once.
        /// </summary>
        public void Purge()
        {
            OwnerPubSubCommandIQ <OwnerPurge> iq = new OwnerPubSubCommandIQ <OwnerPurge>(m_stream.Document);

            iq.To           = m_jid;
            iq.Type         = IQType.set;
            iq.Command.Node = m_node;
            BeginIQ(iq, GotPurge, null);
        }
Exemple #4
0
        /// <summary>
        /// Deletes the node from the XMPP server.
        /// </summary>
        public void Delete()
        {
            OwnerPubSubCommandIQ <OwnerDelete> iq = new OwnerPubSubCommandIQ <OwnerDelete>(m_stream.Document);

            iq.To           = m_jid;
            iq.Type         = IQType.set;
            iq.Command.Node = m_node;
            m_stream.Tracker.BeginIQ(iq, GotDelete, null);
        }
Exemple #5
0
 /// <summary>
 /// Get the default configuration of the node.
 /// </summary>
 /// <param name="service">JID of the pub/sub service</param>
 /// <param name="callback">Callback.  Must not be null.  Will not be called back 
 /// if there is an error, but instead OnError will be called.</param>
 /// <param name="state">State information to be passed back to callback</param>
 public void GetDefaults(JID service, IqCB callback, object state)
 {
     OwnerPubSubCommandIQ<OwnerDefault> iq = new OwnerPubSubCommandIQ<OwnerDefault>(m_stream.Document);
     iq.To = service;
     iq.Type = IQType.get;
     BeginIQ(iq, OnDefaults, new IQTracker.TrackerData(callback, state, null, null));
 }
Exemple #6
0
 /// <summary>
 /// Request configuration form as the owner
 /// </summary>
 /// <param name="callback">Callback.  Must not be null.  Will not be called back 
 /// if there is an error, but instead OnError will be called.</param>
 /// <param name="state">State information to be passed back to callback</param>
 public void Configure(IqCB callback, object state)
 {
     OwnerPubSubCommandIQ<OwnerConfigure> iq = new OwnerPubSubCommandIQ<OwnerConfigure>(m_stream.Document);
     iq.To = m_jid;
     iq.Type = IQType.get;
     iq.Command.Node = m_node;
     BeginIQ(iq, OnConfigure, new IQTracker.TrackerData(callback, state, null, null));
 }
Exemple #7
0
        /// <summary>
        /// Delete all items from a node at once.
        /// </summary>
        public void Purge()
        {
            OwnerPubSubCommandIQ<OwnerPurge> iq = new OwnerPubSubCommandIQ<OwnerPurge>(m_stream.Document);
            iq.To = m_jid;
            iq.Type = IQType.set;
            iq.Command.Node = m_node;
            BeginIQ(iq, GotPurge, null);

        }
 /// <summary>
 /// Deletes the node from the XMPP server.
 /// </summary>
 public void Delete()
 {
     OwnerPubSubCommandIQ<OwnerDelete> iq = new OwnerPubSubCommandIQ<OwnerDelete>(m_stream.Document);
     iq.To = m_jid;
     iq.Type = IQType.set;
     iq.Command.Node = m_node;
     m_stream.Tracker.BeginIQ(iq, GotDelete, null);
 }