From 0f960f99a6bd545d1077cb8152d86d6705b9b000 Mon Sep 17 00:00:00 2001 From: Matt Tucker Date: Mon, 13 Oct 2003 15:39:11 +0000 Subject: [PATCH] Added group chat invitation docs. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2137 b35dd754-fafc-0310-a699-88a17e54d16e --- documentation/extensions/intro.html | 5 ++ documentation/extensions/invitation.html | 60 ++++++++++++++++++++++++ documentation/extensions/toc.html | 1 + 3 files changed, 66 insertions(+) create mode 100644 documentation/extensions/invitation.html diff --git a/documentation/extensions/intro.html b/documentation/extensions/intro.html index 522d34412..e1a782498 100644 --- a/documentation/extensions/intro.html +++ b/documentation/extensions/intro.html @@ -44,6 +44,11 @@ Time Exchange JEP-90 Allows local time information to be shared between users. + + + Group Chat Invitations + N/A + Send invitations to other users to join a group chat room. diff --git a/documentation/extensions/invitation.html b/documentation/extensions/invitation.html new file mode 100644 index 000000000..c15b15824 --- /dev/null +++ b/documentation/extensions/invitation.html @@ -0,0 +1,60 @@ + + +Group Chat Invitations + + + + + +
Group Chat Invitations

+ +The group chat invitation packet extension is used to invite other +users to a group chat room. + +

+ +

+JEP related: N/A -- this protocol is outdated now that the Multi-User Chat (MUC) JEP is available +(JEP-45). However, most +existing clients still use this older protocol. Once MUC support becomes more +widespread, this API may be deprecated. + +


+ +

Inviting Other Users

+ +To use the GroupChatInvitation packet extension +to invite another user to a group chat room, address a new message to the +user and set the room name appropriately, as in the following code example: + +

+Message message = new Message("user@chat.example.com");
+message.setBody("Join me for a group chat!");
+message.addExtension(new GroupChatInvitation("room@chat.example.com"));
+con.sendPacket(message);
+
+ +The XML generated for the invitation portion of the code above would be: + +
+<x xmlns="jabber:x:conference" jid="room@chat.example.com"/>
+

+ +


+
Listening for Invitations

+ +To listen for group chat invitations, use a PacketExtensionFilter for the +x element name and jabber:x:conference namespace, as in the +following code example: + +

+PacketFilter filter = new PacketExtensionFilter("x", "jabber:x:conference");
+// Create a packet collector or packet listeners using the filter...
+
+ + + + \ No newline at end of file diff --git a/documentation/extensions/toc.html b/documentation/extensions/toc.html index 5249f2d03..67c4d6f9e 100644 --- a/documentation/extensions/toc.html +++ b/documentation/extensions/toc.html @@ -16,6 +16,7 @@ Message Events
Roster Item Exchange
Time Exchange
+Group Chat Invitations