mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-12-06 02:51:11 +01:00
SMACK-279: The XMPPConnection extends the new abstract Connection class
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@11613 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
11a41e79ca
commit
127319a821
102 changed files with 1420 additions and 1194 deletions
|
|
@ -53,7 +53,7 @@ import java.util.*;
|
|||
*/
|
||||
public class AgentSession {
|
||||
|
||||
private XMPPConnection connection;
|
||||
private Connection connection;
|
||||
|
||||
private String workgroupJID;
|
||||
|
||||
|
|
@ -83,7 +83,7 @@ public class AgentSession {
|
|||
* authentication.
|
||||
* @param workgroupJID the fully qualified JID of the workgroup.
|
||||
*/
|
||||
public AgentSession(String workgroupJID, XMPPConnection connection) {
|
||||
public AgentSession(String workgroupJID, Connection connection) {
|
||||
// Login must have been done before passing in connection.
|
||||
if (!connection.isAuthenticated()) {
|
||||
throw new IllegalStateException("Must login to server before creating workgroup.");
|
||||
|
|
@ -1112,12 +1112,12 @@ public class AgentSession {
|
|||
/**
|
||||
* Returns the generic metadata of the workgroup the agent belongs to.
|
||||
*
|
||||
* @param con the XMPPConnection to use.
|
||||
* @param con the Connection to use.
|
||||
* @param query an optional query object used to tell the server what metadata to retrieve. This can be null.
|
||||
* @throws XMPPException if an error occurs while sending the request to the server.
|
||||
* @return the settings for the workgroup.
|
||||
*/
|
||||
public GenericSettings getGenericSettings(XMPPConnection con, String query) throws XMPPException {
|
||||
public GenericSettings getGenericSettings(Connection con, String query) throws XMPPException {
|
||||
GenericSettings setting = new GenericSettings();
|
||||
setting.setType(IQ.Type.GET);
|
||||
setting.setTo(workgroupJID);
|
||||
|
|
@ -1138,7 +1138,7 @@ public class AgentSession {
|
|||
return response;
|
||||
}
|
||||
|
||||
public boolean hasMonitorPrivileges(XMPPConnection con) throws XMPPException {
|
||||
public boolean hasMonitorPrivileges(Connection con) throws XMPPException {
|
||||
MonitorPacket request = new MonitorPacket();
|
||||
request.setType(IQ.Type.GET);
|
||||
request.setTo(workgroupJID);
|
||||
|
|
@ -1160,7 +1160,7 @@ public class AgentSession {
|
|||
|
||||
}
|
||||
|
||||
public void makeRoomOwner(XMPPConnection con, String sessionID) throws XMPPException {
|
||||
public void makeRoomOwner(Connection con, String sessionID) throws XMPPException {
|
||||
MonitorPacket request = new MonitorPacket();
|
||||
request.setType(IQ.Type.SET);
|
||||
request.setTo(workgroupJID);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue