use of de.pixart.messenger.xmpp.stanzas.MessagePacket in project Pix-Art-Messenger by kriztan.
the class XmppConnection method acknowledgeStanzaUpTo.
private void acknowledgeStanzaUpTo(int serverCount) {
if (serverCount > stanzasSent) {
Log.e(Config.LOGTAG, "server acknowledged more stanzas than we sent. serverCount=" + serverCount + ", ourCount=" + stanzasSent);
}
for (int i = 0; i < mStanzaQueue.size(); ++i) {
if (serverCount >= mStanzaQueue.keyAt(i)) {
if (Config.EXTENDED_SM_LOGGING) {
Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": server acknowledged stanza #" + mStanzaQueue.keyAt(i));
}
AbstractAcknowledgeableStanza stanza = mStanzaQueue.valueAt(i);
if (stanza instanceof MessagePacket && acknowledgedListener != null) {
MessagePacket packet = (MessagePacket) stanza;
acknowledgedListener.onMessageAcknowledged(account, packet.getId());
}
mStanzaQueue.removeAt(i);
i--;
}
}
}
use of de.pixart.messenger.xmpp.stanzas.MessagePacket in project Pix-Art-Messenger by kriztan.
the class XmppConnection method processMessage.
private void processMessage(final Tag currentTag) throws XmlPullParserException, IOException {
final MessagePacket packet = (MessagePacket) processPacket(currentTag, PACKET_MESSAGE);
this.messageListener.onMessagePacketReceived(account, packet);
}
Aggregations