mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-26 22:12:05 +01:00
Added support for discovering room information. SMACK-11
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2424 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
1e36bdd143
commit
c5700d2257
1 changed files with 17 additions and 1 deletions
|
@ -179,6 +179,22 @@ public class MultiUserChat {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the discovered information of a given room whithout actually having to join the room.
|
||||
* The server will provide information only for rooms that are public.
|
||||
*
|
||||
* @param connection the XMPP connection to use for discovering information about the room.
|
||||
* @param room the name of the room in the form "roomName@service" of which we want to discover
|
||||
* its information.
|
||||
* @return the discovered information of a given room whithout actually having to join the room.
|
||||
* @throws XMPPException if an error occured while trying to discover information of a room.
|
||||
*/
|
||||
public static RoomInfo getRoomInfo(XMPPConnection connection, String room)
|
||||
throws XMPPException {
|
||||
DiscoverInfo info = ServiceDiscoveryManager.getInstanceFor(connection).discoverInfo(room);
|
||||
return new RoomInfo(info);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the room this MultiUserChat object represents.
|
||||
*
|
||||
|
@ -2119,7 +2135,7 @@ public class MultiUserChat {
|
|||
/**
|
||||
* Returns a new or existing InvitationsMonitor for a given connection.
|
||||
*
|
||||
* @param connection the connection to monitor for room invitations.
|
||||
* @param conn the connection to monitor for room invitations.
|
||||
* @return a new or existing InvitationsMonitor for a given connection.
|
||||
*/
|
||||
public static InvitationsMonitor getInvitationsMonitor(XMPPConnection conn) {
|
||||
|
|
Loading…
Reference in a new issue