mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-23 04:22:05 +01:00
Remove getConfiguration() from XMPPConnection
interface definition.
This commit is contained in:
parent
445d175a2e
commit
944ac37fc3
3 changed files with 28 additions and 11 deletions
|
@ -240,8 +240,7 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
||||||
config = configuration;
|
config = configuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
protected ConnectionConfiguration getConfiguration() {
|
||||||
public ConnectionConfiguration getConfiguration() {
|
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1089,4 +1088,14 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
||||||
super.finalize();
|
super.finalize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RosterStore getRosterStore() {
|
||||||
|
return config.getRosterStore();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isRosterLoadedAtLogin() {
|
||||||
|
return config.isRosterLoadedAtLogin();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,7 +122,7 @@ public class Roster {
|
||||||
*/
|
*/
|
||||||
Roster(final XMPPConnection connection) {
|
Roster(final XMPPConnection connection) {
|
||||||
this.connection = connection;
|
this.connection = connection;
|
||||||
rosterStore = connection.getConfiguration().getRosterStore();
|
rosterStore = connection.getRosterStore();
|
||||||
// Listen for any roster packets.
|
// Listen for any roster packets.
|
||||||
connection.addPacketListener(new RosterPushListener(), ROSTER_PUSH_FILTER);
|
connection.addPacketListener(new RosterPushListener(), ROSTER_PUSH_FILTER);
|
||||||
// Listen for any presence packets.
|
// Listen for any presence packets.
|
||||||
|
@ -168,7 +168,7 @@ public class Roster {
|
||||||
// again if it's an anonymous connection.
|
// again if it's an anonymous connection.
|
||||||
if (connection.isAnonymous())
|
if (connection.isAnonymous())
|
||||||
return;
|
return;
|
||||||
if (!connection.getConfiguration().isRosterLoadedAtLogin())
|
if (!connection.isRosterLoadedAtLogin())
|
||||||
return;
|
return;
|
||||||
try {
|
try {
|
||||||
Roster.this.reload();
|
Roster.this.reload();
|
||||||
|
|
|
@ -141,13 +141,6 @@ public interface XMPPConnection {
|
||||||
*/
|
*/
|
||||||
public boolean isUsingCompression();
|
public boolean isUsingCompression();
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the configuration used to connect to the server.
|
|
||||||
*
|
|
||||||
* @return the configuration used to connect to the server.
|
|
||||||
*/
|
|
||||||
public ConnectionConfiguration getConfiguration();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends the specified packet to the server.
|
* Sends the specified packet to the server.
|
||||||
*
|
*
|
||||||
|
@ -349,4 +342,19 @@ public interface XMPPConnection {
|
||||||
* @return the currently active {@link FromMode}
|
* @return the currently active {@link FromMode}
|
||||||
*/
|
*/
|
||||||
public FromMode getFromMode();
|
public FromMode getFromMode();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the permanent roster store.
|
||||||
|
* @return the permanent roster store or null
|
||||||
|
*/
|
||||||
|
public RosterStore getRosterStore();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if the roster will be loaded from the server when logging in. This
|
||||||
|
* is the common behaviour for clients but sometimes clients may want to differ this
|
||||||
|
* or just never do it if not interested in rosters.
|
||||||
|
*
|
||||||
|
* @return true if the roster will be loaded from the server when logging in.
|
||||||
|
*/
|
||||||
|
public boolean isRosterLoadedAtLogin();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue