aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/java/sip/communicator/impl')
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/SourcePacketExtension.java15
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/extensions/jingle/JingleAction.java10
2 files changed, 18 insertions, 7 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/SourcePacketExtension.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/SourcePacketExtension.java
index a852a9d..87bd597 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/SourcePacketExtension.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/SourcePacketExtension.java
@@ -70,6 +70,21 @@ public class SourcePacketExtension
}
/**
+ * Finds the value of SSRC parameter identified by given name.
+ * @param name the name of SSRC parameter to find.
+ * @return value of SSRC parameter
+ */
+ public String getParameter(String name)
+ {
+ for (ParameterPacketExtension param : getParameters())
+ {
+ if (name.equals(param.getName()))
+ return param.getValue();
+ }
+ return null;
+ }
+
+ /**
* Gets the synchronization source (SSRC) ID of this source.
*
* @return the synchronization source (SSRC) ID of this source
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/jingle/JingleAction.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/jingle/JingleAction.java
index 2e55fce..c00940b 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/jingle/JingleAction.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/jingle/JingleAction.java
@@ -213,19 +213,15 @@ public enum JingleAction
* @param jingleActionStr the action <tt>String</tt> that we'd like to
* parse.
* @return a <tt>JingleAction</tt> value corresponding to the specified
- * <tt>jingleActionStr</tt>.
- *
- * @throws IllegalArgumentException in case <tt>jingleActionStr</tt> is
- * not a valid media direction.
+ * <tt>jingleActionStr</tt> or <tt>null</tt> if given <tt>String</tt> can
+ * not be matched with any of enumeration values.
*/
public static JingleAction parseString(String jingleActionStr)
- throws IllegalArgumentException
{
for (JingleAction value : values())
if (value.toString().equals(jingleActionStr))
return value;
- throw new IllegalArgumentException(
- jingleActionStr + " is not a valid jingle action");
+ return null;
}
}