[asterisk-scf-commits] asterisk-scf/integration/slice.git branch "udptl" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Mon Sep 26 08:40:31 CDT 2011


branch "udptl" has been updated
       via  e92080a042dd7426d08763065a2031d9b41c5e14 (commit)
      from  ded292faa0b073a2665e2700bce7663dfecb5dc5 (commit)

Summary of changes:
 slice/AsteriskSCF/Media/NetworkIf.ice          |   97 ++++++++++++++++++++++++
 slice/AsteriskSCF/Media/UDPTL/MediaUDPTLIf.ice |   57 ++------------
 2 files changed, 103 insertions(+), 51 deletions(-)
 create mode 100644 slice/AsteriskSCF/Media/NetworkIf.ice


- Log -----------------------------------------------------------------
commit e92080a042dd7426d08763065a2031d9b41c5e14
Author: Joshua Colp <jcolp at digium.com>
Date:   Mon Sep 26 10:47:29 2011 -0300

    Incorporate review feedback.

diff --git a/slice/AsteriskSCF/Media/NetworkIf.ice b/slice/AsteriskSCF/Media/NetworkIf.ice
new file mode 100644
index 0000000..65d686d
--- /dev/null
+++ b/slice/AsteriskSCF/Media/NetworkIf.ice
@@ -0,0 +1,97 @@
+/*
+ * Asterisk SCF -- An open-source communications framework.
+ *
+ * Copyright (C) 2011, Digium, Inc.
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk SCF project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE.txt file
+ * at the top of the source tree.
+ */
+
+#pragma once
+
+module AsteriskSCF
+{
+
+module Network
+{
+
+["suppress"]
+module V1
+{
+    /**
+     * String representation of the version of this interface
+     */
+    const string Version = "V1";
+
+    /**
+     * Structure returned when address information is queried
+     */
+    struct AddressInformation
+    {
+        /**
+         * String representation of the IP address.
+         */
+        string ipAddress;
+
+        /**
+         * Integer representation of the port.
+         */
+        int port;
+    };
+
+    /**
+     * Interface for a network receiver
+     */
+    interface Receiver
+    {
+        /**
+         * Method which returns the local address information that we are listening on.
+         *
+         * @return AddressInformation Populated AddressInformation structure.
+         */
+        idempotent AddressInformation getLocalDetails();
+    };
+
+    /**
+     * Exception thrown when an invalid address is passed in.
+     */
+    exception InvalidAddress
+    {
+    };
+
+    /**
+     * Interface for a network sender
+     */
+    interface Sender
+    {
+        /**
+         * Method which sets the address and port that we will send to.
+         *
+         * @param address A string representation of the address.
+         *
+         * @param port An integer containing the port.
+         *
+         * @throws InvalidAddress when the address passed in is invalid.
+         */
+        idempotent void setRemoteDetails(string address, int port) throws InvalidAddress;
+
+        /**
+         * Method which returns the remote address information that we are sending to.
+         *
+         * @return AddressInformation Populated AddressInformation structure.
+         */
+        idempotent AddressInformation getRemoteDetails();
+    };
+
+}; /*  end module V1 */
+
+}; /*  end module Network */
+
+}; /*  end module AsteriskSCF */
diff --git a/slice/AsteriskSCF/Media/UDPTL/MediaUDPTLIf.ice b/slice/AsteriskSCF/Media/UDPTL/MediaUDPTLIf.ice
index 60be41f..3147cac 100644
--- a/slice/AsteriskSCF/Media/UDPTL/MediaUDPTLIf.ice
+++ b/slice/AsteriskSCF/Media/UDPTL/MediaUDPTLIf.ice
@@ -16,6 +16,7 @@
 
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.ice>
 #include <AsteriskSCF/Media/MediaIf.ice>
+#include <AsteriskSCF/Media/NetworkIf.ice>
 
 module AsteriskSCF
 {
@@ -74,23 +75,9 @@ module V1
    /**
     * Interface to a UDPTL stream source.
     */
-   interface StreamSourceUDPTL extends AsteriskSCF::Media::V1::StreamSource
+   interface StreamSourceUDPTL extends AsteriskSCF::Media::V1::StreamSource, AsteriskSCF::Network::V1::Receiver
    {
       /**
-       * Method which retrieves the local listening IP address of this source.
-       *
-       * @return string A string representation of the IP address.
-       */
-      idempotent string getLocalAddress();
-
-      /**
-       * Method which retrieves the local listening port of this source.
-       *
-       * @return int An integer containing the port.
-       */
-      idempotent int getLocalPort();
-
-      /**
        * Method which returns the maximum size we will accept for IFPs.
        *
        * @return int An integer containing the size.
@@ -99,48 +86,16 @@ module V1
    };
 
    /**
-    * Exception thrown when an invalid address is passed in.
-    */
-   exception InvalidAddress
-   {
-   };
-
-   /**
     * Interface to a UDPTL stream sink.
     */
-   interface StreamSinkUDPTL extends AsteriskSCF::Media::V1::StreamSink
+   interface StreamSinkUDPTL extends AsteriskSCF::Media::V1::StreamSink, AsteriskSCF::Network::V1::Sender
    {
       /**
-       * Method which changes the IP address and port that media will be sent to.
-       *
-       * @param address A string representation of the  address.
-       *
-       * @param port An integer containing the port.
-       *
-       * @throws InvalidAddress when the address passed in is invalid.
-       */
-      void setRemoteDetails(string address, int port) throws InvalidAddress;
-
-      /**
-       * Method which retrieves the remote IP address.
-       *
-       * @return string A string representation of the IP address.
-       */
-      idempotent string getRemoteAddress();
-
-      /**
-       * Method which retrieves the remote port.
-       *
-       * @return int An integer containing the port.
-       */
-      idempotent int getRemotePort();
-
-      /**
        * Method which sets the maximum datagram size of this source.
        *
        * @param datagramSize Maximum datagram size.
        */
-      void setFarMaxDatagram(int datagramSize);
+      idempotent void setFarMaxDatagram(int datagramSize);
 
       /**
        * Method which returns the maximum datagram size of this source.
@@ -154,14 +109,14 @@ module V1
        *
        * @return int An integer containing the maximum IFP size.
        */
-      idempotent int getFarMaxIfp();
+      idempotent int getFarMaxIFP();
 
       /**
        * Method which sets the error correction scheme to use.
        *
        * @param ErrorCorrectionScheme The error correction scheme to use.
        */
-      void setErrorCorrectionScheme(ErrorCorrectionScheme scheme);
+      idempotent void setErrorCorrectionScheme(ErrorCorrectionScheme scheme);
 
       /**
        * Method which gets the error correction scheme.

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/slice.git



More information about the asterisk-scf-commits mailing list