From 5d1032133bbbae0be75631f56dd17a56bb8d062d Mon Sep 17 00:00:00 2001 From: damencho Date: Fri, 14 Aug 2015 17:14:11 -0500 Subject: Adds optional name attribute to the conference element in colibri. --- .../jabber/extensions/colibri/ColibriAnalyser.java | 1 + .../jabber/extensions/colibri/ColibriBuilder.java | 1 + .../extensions/colibri/ColibriConferenceIQ.java | 62 +++++++++++++++++++++- .../extensions/colibri/ColibriIQProvider.java | 6 +++ 4 files changed, 69 insertions(+), 1 deletion(-) (limited to 'src/net') diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriAnalyser.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriAnalyser.java index 4e3f20a..cdd4d4f 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriAnalyser.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriAnalyser.java @@ -125,6 +125,7 @@ public class ColibriAnalyser conferenceResult.setFrom(conferenceResponse.getFrom()); conferenceResult.setID(conferenceResponse.getID()); + conferenceResult.setName(conferenceResponse.getName()); // FIXME: we support single bundle for all channels String bundleId = null; diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriBuilder.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriBuilder.java index be588d3..547ebe8 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriBuilder.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriBuilder.java @@ -146,6 +146,7 @@ public class ColibriBuilder // that new conference will be allocated request = new ColibriConferenceIQ(); request.setID(conferenceState.getID()); + request.setName(conferenceState.getName()); } /** diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriConferenceIQ.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriConferenceIQ.java index 63c71c7..1b403b2 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriConferenceIQ.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriConferenceIQ.java @@ -52,6 +52,13 @@ public class ColibriConferenceIQ public static final String ID_ATTR_NAME = "id"; /** + * The XML name of the name attribute of the Jitsi Videobridge + * conference IQ which represents the value of the name + * property of ColibriConferenceIQ if available. + */ + public static final String NAME_ATTR_NAME = "name"; + + /** * The XML COnferencing with LIghtweight BRIdging namespace of the Jitsi * Videobridge conference IQ. */ @@ -107,6 +114,11 @@ public class ColibriConferenceIQ private boolean gracefulShutdown; /** + * World readable name for the conference. + */ + private String name; + + /** * Returns an error response for given IQ that is returned by * the videobridge after it has entered graceful shutdown mode and new * conferences can no longer be created. @@ -252,6 +264,10 @@ public class ColibriConferenceIQ xml.append(' ').append(ID_ATTR_NAME).append("='").append(id) .append('\''); + if (name != null) + xml.append(' ').append(NAME_ATTR_NAME).append("='").append(name) + .append('\''); + List contents = getContents(); List channelBundles = getChannelBundles(); @@ -437,6 +453,24 @@ public class ColibriConferenceIQ } /** + * The world readable name of the conference. + * @return name of the conference. + */ + public String getName() + { + return name; + } + + /** + * Sets name. + * @param name the name to set. + */ + public void setName(String name) + { + this.name = name; + } + + /** * Represents a channel included into a content of a Jitsi * Videobridge conference IQ. */ @@ -2174,27 +2208,53 @@ public class ColibriConferenceIQ */ public static final String TOKEN_ATTR_NAME = "token"; + /** + * The target directory. + */ private String directory; + /** + * State of the recording.. + */ private State state; + /** + * Access token. + */ private String token; + /** + * Construct new recording element. + * @param state the state as string + */ public Recording(String state) { this.state = State.parseString(state); } + /** + * Construct new recording element. + * @param state + */ public Recording(State state) { this.state = state; } + /** + * Construct new recording element. + * @param state the state as string + * @param token the token to authenticate + */ public Recording(String state, String token) { this(State.parseString(state), token); } - + /** + * Construct new recording element. + * @param state the state + * @param token the token to authenticate + */ public Recording(State state, String token) { this(state); diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriIQProvider.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriIQProvider.java index 42e136a..39e299f 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriIQProvider.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriIQProvider.java @@ -249,6 +249,12 @@ public class ColibriIQProvider if ((conferenceID != null) && (conferenceID.length() != 0)) conference.setID(conferenceID); + String conferenceName = parser + .getAttributeValue("", ColibriConferenceIQ.NAME_ATTR_NAME); + + if ((conferenceName != null) && (conferenceName.length() != 0)) + conference.setName(conferenceName); + boolean done = false; ColibriConferenceIQ.Channel channel = null; ColibriConferenceIQ.RTCPTerminationStrategy rtcpTerminationStrategy -- cgit v1.1