Adds optional name attribute to the conference element in colibri.

smack4 5470
damencho 10 years ago
parent 20aba12e18
commit 5d1032133b

@ -125,6 +125,7 @@ public static ColibriConferenceIQ getResponseContents(
conferenceResult.setFrom(conferenceResponse.getFrom());
conferenceResult.setID(conferenceResponse.getID());
conferenceResult.setName(conferenceResponse.getName());
// FIXME: we support single bundle for all channels
String bundleId = null;

@ -146,6 +146,7 @@ public void reset()
// that new conference will be allocated
request = new ColibriConferenceIQ();
request.setID(conferenceState.getID());
request.setName(conferenceState.getName());
}
/**

@ -51,6 +51,13 @@ public class ColibriConferenceIQ
*/
public static final String ID_ATTR_NAME = "id";
/**
* The XML name of the <tt>name</tt> attribute of the Jitsi Videobridge
* <tt>conference</tt> IQ which represents the value of the <tt>name</tt>
* property of <tt>ColibriConferenceIQ</tt> if available.
*/
public static final String NAME_ATTR_NAME = "name";
/**
* The XML COnferencing with LIghtweight BRIdging namespace of the Jitsi
* Videobridge <tt>conference</tt> IQ.
@ -106,6 +113,11 @@ public class ColibriConferenceIQ
*/
private boolean gracefulShutdown;
/**
* World readable name for the conference.
*/
private String name;
/**
* Returns an error response for given <tt>IQ</tt> that is returned by
* the videobridge after it has entered graceful shutdown mode and new
@ -252,6 +264,10 @@ public String getChildElementXML()
xml.append(' ').append(ID_ATTR_NAME).append("='").append(id)
.append('\'');
if (name != null)
xml.append(' ').append(NAME_ATTR_NAME).append("='").append(name)
.append('\'');
List<Content> contents = getContents();
List<ChannelBundle> channelBundles = getChannelBundles();
@ -436,6 +452,24 @@ public boolean isGracefulShutdown()
return gracefulShutdown;
}
/**
* 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 <tt>channel</tt> included into a <tt>content</tt> of a Jitsi
* Videobridge <tt>conference</tt> IQ.
@ -2174,27 +2208,53 @@ public static class Recording
*/
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);

@ -249,6 +249,12 @@ public IQ parseIQ(XmlPullParser parser)
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

Loading…
Cancel
Save