Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2007-05-19 19:19:52 -0400
committerslewis2007-05-19 19:19:52 -0400
commitdf476bde2f4d69fd32e0e4821163f079af1136fa (patch)
treef90024ddf0afbcd22f84a22cb27278c7a6b44f8a /framework/bundles/org.eclipse.ecf.presence
parent594f3081aba4c7bc9e2b694a21898aeb97da10b1 (diff)
downloadorg.eclipse.ecf-df476bde2f4d69fd32e0e4821163f079af1136fa.tar.gz
org.eclipse.ecf-df476bde2f4d69fd32e0e4821163f079af1136fa.tar.xz
org.eclipse.ecf-df476bde2f4d69fd32e0e4821163f079af1136fa.zip
Added IChatRoomInvitationSender as per bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=187960. Added trivial implementations.
Diffstat (limited to 'framework/bundles/org.eclipse.ecf.presence')
-rw-r--r--framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/chatroom/IChatRoomInvitationSender.java41
-rw-r--r--framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/chatroom/IChatRoomManager.java10
2 files changed, 51 insertions, 0 deletions
diff --git a/framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/chatroom/IChatRoomInvitationSender.java b/framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/chatroom/IChatRoomInvitationSender.java
new file mode 100644
index 000000000..a9e71a036
--- /dev/null
+++ b/framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/chatroom/IChatRoomInvitationSender.java
@@ -0,0 +1,41 @@
+/****************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Composent, Inc. - initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.ecf.presence.chatroom;
+
+import org.eclipse.ecf.core.identity.ID;
+import org.eclipse.ecf.core.util.ECFException;
+
+/**
+ * Represents ability to send a chat room invitation to a given target.
+ */
+public interface IChatRoomInvitationSender {
+
+ /**
+ * Send invitation to join in chat room to target user.
+ *
+ * @param targetUser
+ * the ID of the targetUser to send the invitation to. Must not
+ * be <code>null</code>.
+ * @param subject
+ * an optional subject for the invitation. May be
+ * <code>null</code>.
+ * @param body
+ * an optional body for the invitation message. May be
+ * <code>null</code>.
+ * @throws ECFException
+ * if connection disconnected or some other error preventing
+ * sending of the invitation.
+ */
+ public void sendInvitation(ID targetUser, String subject, String body)
+ throws ECFException;
+
+}
diff --git a/framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/chatroom/IChatRoomManager.java b/framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/chatroom/IChatRoomManager.java
index f98853ee0..f538db20d 100644
--- a/framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/chatroom/IChatRoomManager.java
+++ b/framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/chatroom/IChatRoomManager.java
@@ -41,6 +41,16 @@ public interface IChatRoomManager extends IAdaptable {
public void removeInvitationListener(IChatRoomInvitationListener listener);
/**
+ * Get chat room invitation sender. If <code>null</code>, this chat room
+ * manager does not support the ability to send invitations.
+ *
+ * @return IChatRoomInvitationSender to use to send invitations. May be
+ * <code>null</code>, and in that case no invitation sending ability
+ * is available from this chat manager.
+ */
+ public IChatRoomInvitationSender getInvitationSender();
+
+ /**
* Get parent IChatRoomManager. If this manager is the root, then this
* method returns <code>null</code>.
*

Back to the top