Esempio n. 1
0
 public override Packet Handle(Packet packet)
 {
     if (packet.GetAttribute("type") == "result")
     {
         Logger.Log("Features discovered");
     }
     return packet;
 }
Esempio n. 2
0
        private void HandlePacket(Packet packet)
        {
            if (packet == null) return;

            // Logger.Log("Handling packet ...");

            if (packet.Name.Equals("empty"))
            {
                Logger.Log("Packet is empty");
            }

            if (packet.Name.Equals("error"))
            {
                Logger.Log(packet.HasChild("host-unknown")
                               ? "error - host unknown"
                               : "error");
            }

            if (!packet.HasAttribute("to"))
            {
                // Logger.Log("Packet does not have To attribute");
            }
            else
            {
                if (!packet.GetAttribute("to").ToLower().Trim().StartsWith(Properties.Account.Jid.ToLower().Trim()))
                {
                    // Logger.Log("Packet To attribute does not start with Jid " + Properties.Account.Jid);
                }
            }

            _stanzaQueue.Enqueue(packet);
        }
Esempio n. 3
0
 public override bool HandlingCondition(Packet packet)
 {
     return packet.Name == "iq" && packet.GetAttribute("id") == _iq.Id;
 }