From 5982f5e2bdbcd289ef0dae49587cf907414ea6d0 Mon Sep 17 00:00:00 2001 From: Gaston Dombiak Date: Wed, 15 Dec 2004 01:53:24 +0000 Subject: [PATCH] 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 --- documentation/extensions/muc.html | 32 +++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/documentation/extensions/muc.html b/documentation/extensions/muc.html index 329617102..9f9db7bfb 100644 --- a/documentation/extensions/muc.html +++ b/documentation/extensions/muc.html @@ -16,6 +16,7 @@ Allows configuration of, participation in, and administration of individual text
  • Manage room invitations
  • Discover MUC support
  • Discover joined rooms
  • +
  • Discover room information
  • Start a private chat
  • Manage changes on room subject
  • Manage role modifications
  • @@ -246,8 +247,8 @@ A user may also want to query a contact regarding which rooms the contact is in. Usage

    -In order to get the rooms where a user is in just send -getJoinedRooms(XMPPConnection connection, String user) to the MultiUserChat +In order to get the rooms where a user is in just send +getJoinedRooms(XMPPConnection connection, String user) to the MultiUserChat class where user is a fully qualified XMPP ID, e.g. jdoe@example.com. You will get an Iterator of Strings as an answer where each String represents a room name.

    @@ -262,6 +263,33 @@ In this example we can see how to get the rooms where a user is in:

    +
    Discover room information

    + +Description

    + +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.

    + +Usage

    + +In order to discover information about a room just send getRoomInfo(XMPPConnection connection, String room) +to the MultiUserChat 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.

    + +Examples

    + +In this example we can see how to discover information about a room:
    +

    +
          // Discover information about the room roomName@conference.myserver
    +      RoomInfo info = MultiUserChat.getRoomInfo(conn, "roomName@conference.myserver");
    +      System.out.println("Number of occupants:" + info.getOccupantsCount());
    +      System.out.println("Room Subject:" + info.getSubject());
    +
    +
    + +
    +
    Start a private chat

    Description