aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/java/sip/communicator/impl/protocol')
-rw-r--r--src/net/java/sip/communicator/impl/protocol/icq/OperationSetAdHocMultiUserChatIcqImpl.java5
-rw-r--r--src/net/java/sip/communicator/impl/protocol/msn/OperationSetAdHocMultiUserChatMsnImpl.java23
-rw-r--r--src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetAdHocMultiUserChatYahooImpl.java26
3 files changed, 34 insertions, 20 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetAdHocMultiUserChatIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetAdHocMultiUserChatIcqImpl.java
index 05d7fdb..a951102 100644
--- a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetAdHocMultiUserChatIcqImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetAdHocMultiUserChatIcqImpl.java
@@ -194,13 +194,14 @@ public class OperationSetAdHocMultiUserChatIcqImpl
*
* @param adHocRoomName the name of the ad-hoc room
* @param contacts the list of contacts
+ * @param reason the reason to be sent with the invitation for contacts.
*
* @return the ad-hoc room that has been just created
* @throws OperationFailedException
* @throws OperationNotSupportedException
*/
public AdHocChatRoom createAdHocChatRoom(String adHocRoomName,
- List<Contact> contacts)
+ List<Contact> contacts, String reason)
throws OperationFailedException,
OperationNotSupportedException
{
@@ -213,7 +214,7 @@ public class OperationSetAdHocMultiUserChatIcqImpl
{
ContactIcqImpl newContact = (ContactIcqImpl) contact;
- adHocChatRoom.invite(newContact.getAddress(), "");
+ adHocChatRoom.invite(newContact.getAddress(), reason);
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/msn/OperationSetAdHocMultiUserChatMsnImpl.java b/src/net/java/sip/communicator/impl/protocol/msn/OperationSetAdHocMultiUserChatMsnImpl.java
index fdde12b..267df29 100644
--- a/src/net/java/sip/communicator/impl/protocol/msn/OperationSetAdHocMultiUserChatMsnImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/msn/OperationSetAdHocMultiUserChatMsnImpl.java
@@ -173,13 +173,16 @@ public class OperationSetAdHocMultiUserChatMsnImpl
*
* @param adHocRoomName the name of the ad-hoc room
* @param contacts the list of contacts
+ * @param reason the reason (will not be used since MSN does not support
+ * invitation with the possibility to reject it)
*
* @return the ad-hoc room that has been just created
* @throws OperationFailedException
* @throws OperationNotSupportedException
*/
public AdHocChatRoom createAdHocChatRoom( String adHocRoomName,
- List<Contact> contacts)
+ List<Contact> contacts,
+ String reason)
throws OperationFailedException, OperationNotSupportedException
{
AdHocChatRoom adHocChatRoom = createAdHocChatRoom(
@@ -191,7 +194,7 @@ public class OperationSetAdHocMultiUserChatMsnImpl
{
ContactMsnImpl newContact = (ContactMsnImpl) contact;
- adHocChatRoom.invite(newContact.getAddress(), "");
+ adHocChatRoom.invite(newContact.getAddress(), reason);
}
}
@@ -199,8 +202,8 @@ public class OperationSetAdHocMultiUserChatMsnImpl
}
/**
- * Creates an <tt>AdHocChatRoom</tt> whose name is _adHocRoomName with the
- * properties contained in _adHocRoomProperties
+ * Creates an <tt>AdHocChatRoom</tt> whose name is adHocRoomName with the
+ * properties contained in adHocRoomProperties
*
* @param adHocRoomName the name of the ad-hoc room
* @param adHocRoomProperties the ad-hoc room's properties
@@ -227,7 +230,7 @@ public class OperationSetAdHocMultiUserChatMsnImpl
// when the room hasn't been created, we create it.
adHocRoom = createLocalAdHocChatRoomInstance(adHocRoomName, id);
}
-
+
return adHocRoom;
}
@@ -245,7 +248,7 @@ public class OperationSetAdHocMultiUserChatMsnImpl
{
AdHocChatRoomMsnImpl adHocChatRoom =
new AdHocChatRoomMsnImpl(adHocChatRoomName, this.provider);
-
+
// We put it to the pending ad hoc chat rooms, waiting for the
// switchboard to be created.
this.pendingAdHocChatRoomList.put(switchboardId, adHocChatRoom);
@@ -533,7 +536,7 @@ public class OperationSetAdHocMultiUserChatMsnImpl
{
if (!isGroupChatMessage(switchboard))
return;
-
+
try
{
AdHocChatRoomMsnImpl chatRoom
@@ -543,7 +546,7 @@ public class OperationSetAdHocMultiUserChatMsnImpl
{
chatRoom = createLocalAdHocChatRoomInstance(switchboard);
}
-
+
OperationSetPersistentPresenceMsnImpl presenceOpSet
= (OperationSetPersistentPresenceMsnImpl) provider
.getOperationSet(OperationSetPersistentPresence.class);
@@ -626,8 +629,8 @@ public class OperationSetAdHocMultiUserChatMsnImpl
*/
public void switchboardStarted(MsnSwitchboard switchboard)
{
- Object switchboardID = switchboard.getAttachment();
-
+ Object switchboardID = switchboard.getAttachment();
+
AdHocChatRoomMsnImpl adHocChatRoom = null;
if (switchboardID != null
&& pendingAdHocChatRoomList.containsKey(switchboardID))
diff --git a/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetAdHocMultiUserChatYahooImpl.java b/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetAdHocMultiUserChatYahooImpl.java
index e0700c4..3019f04 100644
--- a/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetAdHocMultiUserChatYahooImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetAdHocMultiUserChatYahooImpl.java
@@ -218,24 +218,24 @@ public class OperationSetAdHocMultiUserChatYahooImpl
Map<String, Object> roomProperties)
throws OperationFailedException
{
- return createAdHocChatRoom(roomName, (String[]) null);
+ return createAdHocChatRoom(roomName, (String[]) null, "");
}
/**
* Creates an ad-hoc room with the named <tt>adHocRoomName</tt> and in
* including to the specified <tt>contacts</tt>. When the method returns the
- * ad-hoc room the local user will not have joined it and thus will not
- * receive messages on it until the <tt>AdHocChatRoom.join()</tt> method is
- * called.
+ * ad-hoc room the local user will have joined it.
*
* @return the ad-hoc room that has been just created
* @param adHocRoomName the name of the room to be created
* @param contacts the list of contacts
+ * @param reason the reason for contacts' invitation
* @throws OperationFailedException if the room couldn't be created for
* some reason
*/
public AdHocChatRoom createAdHocChatRoom( String adHocRoomName,
- List<Contact> contacts)
+ List<Contact> contacts,
+ String reason)
throws OperationFailedException
{
String[] invitedContacts = null; // parameter used for room's creation
@@ -258,12 +258,22 @@ public class OperationSetAdHocMultiUserChatYahooImpl
}
}
- return createAdHocChatRoom(adHocRoomName, invitedContacts);
+ return createAdHocChatRoom(adHocRoomName, invitedContacts, reason);
}
+ /**
+ *
+ *
+ * @param roomName name of the chatroom
+ * @param invitedContacts contacts to be invited to this room
+ * @param reason reason of this invitation
+ * @return AdHocChatRoom the ad-hoc room that has been just created
+ * @throws OperationFailedException
+ */
private AdHocChatRoom createAdHocChatRoom(
String roomName,
- String[] invitedContacts)
+ String[] invitedContacts,
+ String reason)
throws OperationFailedException
{
if (invitedContacts == null)
@@ -276,7 +286,7 @@ public class OperationSetAdHocMultiUserChatYahooImpl
YahooConference conference =
yahooProvider.getYahooSession().createConference(
invitedContacts, // users invited to this conference
- "", // invite message / topic
+ reason, // invite message / topic
yahooProvider.getYahooSession().getLoginIdentity());
chatRoom = createLocalChatRoomInstance(conference);