public MucMark(Conference conference)
        {
            _nick = conference.Nickname;

            if (!string.IsNullOrEmpty(conference.Password))
            {
                _password = conference.Password;
            }

            _jid = conference.Jid;
            _name = conference.Name;
            _autoJoin = conference.AutoJoin;
            _time = DateTime.Now;
        }
        public void SaveBookmarks()
        {
            Conference[] conferences;

            lock (MucMarks.Instance._syncObject)
            {
                conferences = new Conference[MucMarks.Instance.Count];

                int i = 0;
                foreach (MucMark mucMark in MucMarks.Instance)
                {
                    conferences[i++] = new Conference(mucMark.Jid, mucMark.Name, mucMark.Nick, mucMark.Password, mucMark.AutoJoin);
                }
            }

            _bookmarkManager.StoreBookmarks(conferences, OnStoreResult);
        }
 /// <summary>
 /// Add a conference bookmark to the storage object
 /// </summary>
 /// <param name="conf"></param>
 /// <returns></returns>
 public Conference AddConference(Conference conf)
 {
     AddChild(conf);
     return conf;
 }
 /// <summary>
 /// get all conference booksmarks
 /// </summary>
 /// <returns></returns>
 public Conference[] GetConferences()
 {
     ElementList nl = SelectElements(typeof(Conference));
     Conference[] items = new Conference[nl.Count];
     int i = 0;
     foreach (Element e in nl)
     {
         items[i] = (Conference)e;
         i++;
     }
     return items;
 }
 /// <summary>
 /// add multiple conference bookmarks
 /// </summary>
 /// <param name="confs"></param>
 public void AddConferences(Conference[] confs)
 {
     foreach (Conference conf in confs)
     {
         AddConference(conf);
     }
 }
Exemple #6
0
        /// <summary>
        /// Send booksmarks to the server storage
        /// </summary>
        /// <param name="urls"></param>
        /// <param name="conferences"></param>
        /// <param name="cb"></param>
        /// <param name="cbArgs"></param>
        public void StoreBookmarks(Url[] urls, Conference[] conferences, IqCB cb, object cbArgs)
        {
            StorageIq siq = new StorageIq(IqType.set);

            if (urls != null)
                siq.Query.Storage.AddUrls(urls);

            if (conferences != null)
                siq.Query.Storage.AddConferences(conferences);

            if (cb == null)
                m_connection.Send(siq);
            else
                m_connection.IqGrabber.SendIq(siq, cb, cbArgs);
        }
Exemple #7
0
 /// <summary>
 /// Send booksmarks to the server storage
 /// </summary>
 /// <param name="urls"></param>
 /// <param name="conferences"></param>
 /// <param name="cb"></param>
 public void StoreBookmarks(Url[] urls, Conference[] conferences, IqCB cb)
 {
     StoreBookmarks(urls, conferences, cb, null);
 }
Exemple #8
0
 /// <summary>
 /// Send booksmarks to the server storage
 /// </summary>
 /// <param name="urls"></param>
 /// <param name="conferences"></param>
 public void StoreBookmarks(Url[] urls, Conference[] conferences)
 {
     StoreBookmarks(urls, conferences, null, null);
 }
Exemple #9
0
 /// <summary>
 /// Send booksmarks to the server storage
 /// </summary>
 /// <param name="conferences"></param>
 /// <param name="cb"></param>
 /// <param name="cbArgs"></param>
 public void StoreBookmarks(Conference[] conferences, IqCB cb, object cbArgs)
 {
     StoreBookmarks(null, conferences, cb, cbArgs);
 }
Exemple #10
0
 /// <summary>
 /// Send booksmarks to the server storage
 /// </summary>
 /// <param name="conferences"></param>
 /// <param name="cb"></param>
 public void StoreBookmarks(Conference[] conferences, IqCB cb)
 {
     StoreBookmarks(null, conferences, cb, null);
 }
Exemple #11
0
 /// <summary>
 /// Send booksmarks to the server storage
 /// </summary>
 /// <param name="conferences"></param>
 public void StoreBookmarks(Conference[] conferences)
 {
     StoreBookmarks(null, conferences, null, null);
 }
Exemple #12
0
 /// <summary>
 /// Send booksmarks to the server storage
 /// </summary>
 /// <param name="conferences"></param>
 /// <param name="cb"></param>
 /// <param name="cbArgs"></param>
 public void StoreBookmarks(Conference[] conferences, IqHandler cb)
 {
     StoreBookmarks(null, conferences, cb);
 }
Exemple #13
0
 /// <summary>
 ///     Add a conference bookmark to the storage object
 /// </summary>
 /// <param name="conf"></param>
 /// <returns></returns>
 public Conference AddConference(Conference conf)
 {
     AddChild(conf);
     return(conf);
 }