aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/service/protocol
diff options
context:
space:
mode:
authorBoris Grozev <boris@jitsi.org>2013-06-24 10:46:13 +0300
committerBoris Grozev <boris@jitsi.org>2013-06-24 10:55:35 +0300
commit97821cffa356fbe67d081f091f67a607a5aebc13 (patch)
treeb7c23779564ecdeeb886c7e619096bd8e9ff3439 /src/net/java/sip/communicator/service/protocol
parente1ef0b0ff5aebda40a364827b67f2724e1cdb73d (diff)
downloadjitsi-97821cffa356fbe67d081f091f67a607a5aebc13.zip
jitsi-97821cffa356fbe67d081f091f67a607a5aebc13.tar.gz
jitsi-97821cffa356fbe67d081f091f67a607a5aebc13.tar.bz2
Adds comments, renames fields
Diffstat (limited to 'src/net/java/sip/communicator/service/protocol')
-rw-r--r--src/net/java/sip/communicator/service/protocol/media/AbstractOperationSetTelephonyConferencing.java10
-rw-r--r--src/net/java/sip/communicator/service/protocol/media/MediaAwareCallPeer.java64
2 files changed, 60 insertions, 14 deletions
diff --git a/src/net/java/sip/communicator/service/protocol/media/AbstractOperationSetTelephonyConferencing.java b/src/net/java/sip/communicator/service/protocol/media/AbstractOperationSetTelephonyConferencing.java
index 1f4c9cd..dd4c9ff 100644
--- a/src/net/java/sip/communicator/service/protocol/media/AbstractOperationSetTelephonyConferencing.java
+++ b/src/net/java/sip/communicator/service/protocol/media/AbstractOperationSetTelephonyConferencing.java
@@ -7,18 +7,14 @@
package net.java.sip.communicator.service.protocol.media;
import java.beans.*;
-import java.io.*;
import java.util.*;
-import javax.xml.parsers.*;
-
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
import net.java.sip.communicator.util.*;
import org.jitsi.service.neomedia.*;
import org.w3c.dom.*;
-import org.xml.sax.*;
/**
* Represents a default implementation of
@@ -890,6 +886,7 @@ public abstract class AbstractOperationSetTelephonyConferencing<
if (changed)
notifyAll(callPeer.getCall());
+ callPeer.setLastConferenceInfoReceived(confInfo);
return confInfo.getVersion();
}
@@ -936,7 +933,7 @@ public abstract class AbstractOperationSetTelephonyConferencing<
* RFC4575 - Constructing Coherent State
*/
int documentVersion = confInfo.getVersion();
- int ourVersion = callPeer.getConferenceStateVersion();
+ int ourVersion = callPeer.getLastConferenceInfoReceivedVersion();
ConferenceInfoDocument.State documentState = confInfo.getState();
if (ourVersion == -1)
@@ -1227,7 +1224,8 @@ public abstract class AbstractOperationSetTelephonyConferencing<
if (true)
return -1;
- ConferenceInfoDocument ourDocument = callPeer.getConferenceState();
+ ConferenceInfoDocument ourDocument
+ = callPeer.getLastConferenceInfoReceived();
ConferenceInfoDocument newDocument;
ConferenceInfoDocument.State usersState = diff.getUsersState();
diff --git a/src/net/java/sip/communicator/service/protocol/media/MediaAwareCallPeer.java b/src/net/java/sip/communicator/service/protocol/media/MediaAwareCallPeer.java
index da0f986..96f8738 100644
--- a/src/net/java/sip/communicator/service/protocol/media/MediaAwareCallPeer.java
+++ b/src/net/java/sip/communicator/service/protocol/media/MediaAwareCallPeer.java
@@ -136,7 +136,12 @@ public abstract class MediaAwareCallPeer
*/
private long lastConferenceInfoSentTimestamp = -1;
- private ConferenceInfoDocument conferenceState = null;
+ /**
+ * The last Conference Information (RFC4575) document sent to us by this
+ * <tt>CallPeer</tt>. This is always a document with state "full", which is
+ * only gets updated by "partial" or "deleted" documents.
+ */
+ private ConferenceInfoDocument lastConferenceInfoReceived = null;
/**
* Creates a new call peer with address <tt>peerAddress</tt>.
@@ -1022,40 +1027,83 @@ public abstract class MediaAwareCallPeer
}
}
+ /**
+ * Returns the last <tt>ConferenceInfoDocument</tt> sent by us to this
+ * <tt>CallPeer</tt>. It is a document with state <tt>full</tt>
+ * @return the last <tt>ConferenceInfoDocument</tt> sent by us to this
+ * <tt>CallPeer</tt>. It is a document with state <tt>full</tt>
+ */
public ConferenceInfoDocument getLastConferenceInfoSent()
{
return lastConferenceInfoSent;
}
+ /**
+ * Sets the last <tt>ConferenceInfoDocument</tt> sent by us to this
+ * <tt>CallPeer</tt>.
+ * @param confInfo the document to set.
+ */
public void setLastConferenceInfoSent(ConferenceInfoDocument confInfo)
{
lastConferenceInfoSent = confInfo;
}
+ /**
+ * Gets the time (as obtained by <tt>System.currentTimeMillis()</tt>)
+ * at which we last sent a <tt>ConferenceInfoDocument</tt> to this
+ * <tt>CallPeer</tt>.
+ * @return the time (as obtained by <tt>System.currentTimeMillis()</tt>)
+ * at which we last sent a <tt>ConferenceInfoDocument</tt> to this
+ * <tt>CallPeer</tt>.
+ */
public long getLastConferenceInfoSentTimestamp()
{
return lastConferenceInfoSentTimestamp;
}
+ /**
+ * Sets the time (as obtained by <tt>System.currentTimeMillis()</tt>)
+ * at which we last sent a <tt>ConferenceInfoDocument</tt> to this
+ * <tt>CallPeer</tt>.
+ * @param newTimestamp the time to set
+ */
public void setLastConferenceInfoSentTimestamp(long newTimestamp)
{
lastConferenceInfoSentTimestamp = newTimestamp;
}
- public ConferenceInfoDocument getConferenceState()
+ /**
+ * Gets the last <tt>ConferenceInfoDocument</tt> sent to us by this
+ * <tt>CallPeer</tt>.
+ * @return the last <tt>ConferenceInfoDocument</tt> sent to us by this
+ * <tt>CallPeer</tt>.
+ */
+ public ConferenceInfoDocument getLastConferenceInfoReceived()
{
- return conferenceState;
+ return lastConferenceInfoReceived;
}
- public void setConferenceState(ConferenceInfoDocument confInfo)
+ /**
+ * Gets the last <tt>ConferenceInfoDocument</tt> sent to us by this
+ * <tt>CallPeer</tt>.
+ * @return the last <tt>ConferenceInfoDocument</tt> sent to us by this
+ * <tt>CallPeer</tt>.
+ */
+ public void setLastConferenceInfoReceived(ConferenceInfoDocument confInfo)
{
- conferenceState = confInfo;
+ lastConferenceInfoReceived = confInfo;
}
- public int getConferenceStateVersion()
+ /**
+ * Gets the <tt>version</tt> of the last <tt>ConferenceInfoDocument</tt>
+ * sent to us by this <tt>CallPeer</tt>, or -1 if we haven't (yet) received
+ * a <tt>ConferenceInformationDocument</tt> from this <tt>CallPeer</tt>.
+ * @return
+ */
+ public int getLastConferenceInfoReceivedVersion()
{
- return (conferenceState == null)
+ return (lastConferenceInfoReceived == null)
? -1
- : conferenceState.getVersion();
+ : lastConferenceInfoReceived.getVersion();
}
}