1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-25 21:42:07 +01:00

Added documentation for discovering room information. SMACK-11

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2427 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Gaston Dombiak 2004-12-15 01:53:24 +00:00 committed by gaston
parent 1d25c35031
commit 5982f5e2bd

View file

@ -16,6 +16,7 @@ Allows configuration of, participation in, and administration of individual text
<li><a href="#invite">Manage room invitations</a></li> <li><a href="#invite">Manage room invitations</a></li>
<li><a href="#discomuc">Discover MUC support</a></li> <li><a href="#discomuc">Discover MUC support</a></li>
<li><a href="#discojoin">Discover joined rooms</a></li> <li><a href="#discojoin">Discover joined rooms</a></li>
<li><a href="#discoroom">Discover room information</a></li>
<li><a href="#privchat">Start a private chat</a></li> <li><a href="#privchat">Start a private chat</a></li>
<li><a href="#subject">Manage changes on room subject</a></li> <li><a href="#subject">Manage changes on room subject</a></li>
<li><a href="#role">Manage role modifications</a></li> <li><a href="#role">Manage role modifications</a></li>
@ -262,6 +263,33 @@ In this example we can see how to get the rooms where a user is in: <br>
<hr> <hr>
<div class="subheader"><a name="discoroom">Discover room information</a></div><p>
<b>Description</b><p>
A user may need to discover information about a room without having to actually join the room. The server
will provide information only for public rooms.</p>
<b>Usage</b><p>
In order to discover information about a room just send <b>getRoomInfo(XMPPConnection connection, String room)</b>
to the <i><b>MultiUserChat</b></i> class where room is the XMPP ID of the room, e.g.
roomName@conference.myserver. You will get a RoomInfo object that contains the discovered room
information.</p>
<b>Examples</b><p>
In this example we can see how to discover information about a room: <br>
<blockquote>
<pre> <font color="#3f7f5f">// Discover information about the room roomName@conference.myserver</font>
RoomInfo info = MultiUserChat.getRoomInfo(conn, <font color="#0000FF">"roomName@conference.myserver"</font>);
System.out.println("Number of occupants:" + info.getOccupantsCount());
System.out.println("Room Subject:" + info.getSubject());
</pre>
</blockquote>
<hr>
<div class="subheader"><a name="privchat">Start a private chat</a></div><p> <div class="subheader"><a name="privchat">Start a private chat</a></div><p>
<b>Description</b><p> <b>Description</b><p>