blob: 74e6585721ffe3d97bfc3b2ed509dd3ec8367a23 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
package de.thedevstack.conversationsplus.utils;
import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.xmpp.OnIqPacketReceived;
import eu.siacs.conversations.xmpp.XmppConnection;
import eu.siacs.conversations.xmpp.stanzas.IqPacket;
import eu.siacs.conversations.xmpp.stanzas.PresencePacket;
/**
* Created by tzur on 09.01.2016.
*/
public class XmppSendUtil {
public static void sendIqPacket(Account account, IqPacket packet, OnIqPacketReceived callback) {
final XmppConnection connection = account.getXmppConnection();
if (connection != null) {
connection.sendIqPacket(packet, callback);
}
}
public static void sendPresencePacket(Account account, PresencePacket packet) {
XmppConnection connection = account.getXmppConnection();
if (connection != null) {
connection.sendPresencePacket(packet);
}
}
}
|