//--------------------------------------------------------Set-, Get- Methods:---------------------------------------------------------\\
        #region --Set-, Get- Methods--


        #endregion
        //--------------------------------------------------------Misc Methods:---------------------------------------------------------------\\
        #region --Misc Methods (Public)--


        #endregion

        #region --Misc Methods (Private)--


        #endregion

        #region --Misc Methods (Protected)--
        protected override void loadContent(XmlNodeList content)
        {
            DEVICES = new OmemoXmlDevices();
            foreach (XmlNode n in content)
            {
                if (string.Equals(n.Name, "items") && string.Equals(n.Attributes["node"]?.Value, Consts.XML_XEP_0384_DEVICE_LIST_NODE))
                {
                    DEVICES.loadDevices(n);
                    return;
                }
            }
        }
Ejemplo n.º 2
0
        //--------------------------------------------------------Constructor:----------------------------------------------------------------\\
        #region --Constructors--
        /// <summary>
        /// Basic Constructor
        /// </summary>
        /// <history>
        /// 04/08/2018 Created [Fabian Sauter]
        /// </history>
        public OmemoDeviceListEventMessage(XmlNode node) : base(node)
        {
            DEVICES = new OmemoXmlDevices();
            XmlNode eventNode = XMLUtils.getChildNode(node, "event", Consts.XML_XMLNS, Consts.XML_XEP_0060_NAMESPACE_EVENT);

            if (eventNode != null)
            {
                XmlNode itemsNode = XMLUtils.getChildNode(eventNode, "items", "node", Consts.XML_XEP_0384_DEVICE_LIST_NODE);
                if (itemsNode != null)
                {
                    DEVICES.loadDevices(itemsNode);
                }
            }
        }
Ejemplo n.º 3
0
 //--------------------------------------------------------Constructor:----------------------------------------------------------------\\
 #region --Constructors--
 public OmemoSetDeviceListMessage(string from, OmemoXmlDevices devices) : base(from, null, Consts.XML_XEP_0384_DEVICE_LIST_NODE)
 {
     DEVICES = devices;
 }