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 5d2e28df1..7069a66da 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
@@ -10,6 +10,7 @@
import net.java.sip.communicator.impl.protocol.jabber.extensions.jingle.*;
+import org.jitsi.service.neomedia.*;
import org.jivesoftware.smack.packet.*;
/**
@@ -283,6 +284,12 @@ public static class Channel
*/
public static final String SSRC_ELEMENT_NAME = "ssrc";
+ /**
+ * The name of the XML attribute of a channel which represents
+ * its direction.
+ */
+ public static final String DIRECTION_ATTR_NAME = "direction";
+
/**
* The number of seconds of inactivity after which the channel
* represented by this instance expires.
@@ -323,6 +330,11 @@ public static class Channel
*/
private long[] ssrcs = NO_SSRCS;
+ /**
+ * The direction of the channel represented by this instance.
+ */
+ private MediaDirection direction;
+
/**
* Adds a payload-type element defined by XEP-0167: Jingle RTP
* Sessions to this channel.
@@ -462,6 +474,16 @@ public synchronized long[] getSSRCs()
return (ssrcs.length == 0) ? NO_SSRCS : ssrcs.clone();
}
+ /**
+ * Gets the direction of this Channel.
+ *
+ * @return the direction of this Channel.
+ */
+ public MediaDirection getDirection()
+ {
+ return direction;
+ }
+
/**
* Removes a payload-type element defined by XEP-0167: Jingle
* RTP Sessions from this channel.
@@ -608,6 +630,17 @@ public void setSSRCs(long[] ssrcs)
: ssrcs.clone();
}
+ /**
+ * Sets the direction of this Channel
+ *
+ * @param direction the MediaDirection to set the
+ * direction of this Channel to.
+ */
+ public void setDirection(MediaDirection direction)
+ {
+ this.direction = direction;
+ }
+
/**
* Appends the XML String representation of this
* Channel to a specific StringBuilder.
@@ -660,6 +693,13 @@ public void toXML(StringBuilder xml)
.append(expire).append('\'');
}
+ MediaDirection direction = getDirection();
+ if (direction != null && direction != MediaDirection.SENDRECV)
+ {
+ xml.append(' ').append(DIRECTION_ATTR_NAME).append("='")
+ .append(direction.toString()).append('\'');
+ }
+
List payloadTypes = getPayloadTypes();
boolean hasPayloadTypes = (payloadTypes.size() != 0);
long[] ssrcs = getSSRCs();