mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 17:19:39 +02:00
Add XMPPConnection.sendStanza(Stanza)
and deprecate sendPacket().
This commit is contained in:
parent
183af99ffb
commit
ed4fa3390f
58 changed files with 183 additions and 167 deletions
|
@ -82,7 +82,7 @@ public class AgentRoster {
|
|||
// Send request for roster.
|
||||
AgentStatusRequest request = new AgentStatusRequest();
|
||||
request.setTo(workgroupJID);
|
||||
connection.sendPacket(request);
|
||||
connection.sendStanza(request);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -94,7 +94,7 @@ public class AgentRoster {
|
|||
public void reload() throws NotConnectedException {
|
||||
AgentStatusRequest request = new AgentStatusRequest();
|
||||
request.setTo(workgroupJID);
|
||||
connection.sendPacket(request);
|
||||
connection.sendStanza(request);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -318,7 +318,7 @@ public class AgentSession {
|
|||
presence.setTo(workgroupJID);
|
||||
presence.addExtension(new DefaultExtensionElement(AgentStatus.ELEMENT_NAME,
|
||||
AgentStatus.NAMESPACE));
|
||||
connection.sendPacket(presence);
|
||||
connection.sendStanza(presence);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -465,7 +465,7 @@ public class AgentSession {
|
|||
DepartQueuePacket departPacket = new DepartQueuePacket(this.workgroupJID);
|
||||
|
||||
// PENDING
|
||||
this.connection.sendPacket(departPacket);
|
||||
this.connection.sendStanza(departPacket);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -693,7 +693,7 @@ public class AgentSession {
|
|||
if (packet instanceof OfferRequestProvider.OfferRequestPacket) {
|
||||
// Acknowledge the IQ set.
|
||||
IQ reply = IQ.createResultIQ((IQ) packet);
|
||||
connection.sendPacket(reply);
|
||||
connection.sendStanza(reply);
|
||||
|
||||
fireOfferRequestEvent((OfferRequestProvider.OfferRequestPacket)packet);
|
||||
}
|
||||
|
@ -782,7 +782,7 @@ public class AgentSession {
|
|||
else if (packet instanceof OfferRevokeProvider.OfferRevokePacket) {
|
||||
// Acknowledge the IQ set.
|
||||
IQ reply = IQ.createResultIQ((OfferRevokeProvider.OfferRevokePacket) packet);
|
||||
connection.sendPacket(reply);
|
||||
connection.sendStanza(reply);
|
||||
|
||||
fireOfferRevokeEvent((OfferRevokeProvider.OfferRevokePacket)packet);
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ public class Offer {
|
|||
*/
|
||||
public void accept() throws NotConnectedException {
|
||||
Stanza acceptPacket = new AcceptPacket(this.session.getWorkgroupJID());
|
||||
connection.sendPacket(acceptPacket);
|
||||
connection.sendStanza(acceptPacket);
|
||||
// TODO: listen for a reply.
|
||||
accepted = true;
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ public class Offer {
|
|||
*/
|
||||
public void reject() throws NotConnectedException {
|
||||
RejectPacket rejectPacket = new RejectPacket(this.session.getWorkgroupJID());
|
||||
connection.sendPacket(rejectPacket);
|
||||
connection.sendStanza(rejectPacket);
|
||||
// TODO: listen for a reply.
|
||||
rejected = true;
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public class OfferConfirmation extends SimpleIQ {
|
|||
|
||||
public void notifyService(XMPPConnection con, String workgroup, String createdRoomName) throws NotConnectedException {
|
||||
NotifyServicePacket packet = new NotifyServicePacket(workgroup, createdRoomName);
|
||||
con.sendPacket(packet);
|
||||
con.sendStanza(packet);
|
||||
}
|
||||
|
||||
public static class Provider extends IQProvider<OfferConfirmation> {
|
||||
|
|
|
@ -218,7 +218,7 @@ public class MessageEventManager extends Manager {
|
|||
messageEvent.setStanzaId(packetID);
|
||||
msg.addExtension(messageEvent);
|
||||
// Send the packet
|
||||
connection().sendPacket(msg);
|
||||
connection().sendStanza(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -237,7 +237,7 @@ public class MessageEventManager extends Manager {
|
|||
messageEvent.setStanzaId(packetID);
|
||||
msg.addExtension(messageEvent);
|
||||
// Send the packet
|
||||
connection().sendPacket(msg);
|
||||
connection().sendStanza(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -256,7 +256,7 @@ public class MessageEventManager extends Manager {
|
|||
messageEvent.setStanzaId(packetID);
|
||||
msg.addExtension(messageEvent);
|
||||
// Send the packet
|
||||
connection().sendPacket(msg);
|
||||
connection().sendStanza(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -275,6 +275,6 @@ public class MessageEventManager extends Manager {
|
|||
messageEvent.setStanzaId(packetID);
|
||||
msg.addExtension(messageEvent);
|
||||
// Send the packet
|
||||
connection().sendPacket(msg);
|
||||
connection().sendStanza(msg);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ public class RosterExchangeManager {
|
|||
|
||||
XMPPConnection connection = weakRefConnection.get();
|
||||
// Send the message that contains the roster
|
||||
connection.sendPacket(msg);
|
||||
connection.sendStanza(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -145,7 +145,7 @@ public class RosterExchangeManager {
|
|||
|
||||
XMPPConnection connection = weakRefConnection.get();
|
||||
// Send the message that contains the roster
|
||||
connection.sendPacket(msg);
|
||||
connection.sendStanza(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -168,7 +168,7 @@ public class RosterExchangeManager {
|
|||
|
||||
XMPPConnection connection = weakRefConnection.get();
|
||||
// Send the message that contains the roster
|
||||
connection.sendPacket(msg);
|
||||
connection.sendStanza(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue