Bug 1043114 - Part 1: Unify add/removeHostRoute and add/removeHostRouteWithResolve (idl). f=vchang, r=edgar
authorJessica Jong <jjong@mozilla.com>
Wed, 06 Aug 2014 01:45:00 -0400
changeset 198665 26966c20ff419c8aad09643e94da4c8b35146208
parent 198661 83f519eb1a3a0d6a7a2c2adce631c086d8112836
child 198666 4c9a84e17a87306b86b608a0c792a5d1266e08b1
push id27282
push userryanvm@gmail.com
push dateSat, 09 Aug 2014 15:16:47 +0000
treeherdermozilla-central@6d0b525bdd34 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersedgar
bugs1043114
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1043114 - Part 1: Unify add/removeHostRoute and add/removeHostRouteWithResolve (idl). f=vchang, r=edgar
dom/system/gonk/nsINetworkService.idl
--- a/dom/system/gonk/nsINetworkService.idl
+++ b/dom/system/gonk/nsINetworkService.idl
@@ -99,17 +99,17 @@ interface nsIUpdateUpStreamCallback : ns
    *        The external interface name.
    */
   void updateUpStreamResult(in boolean success, in DOMString externalIfname);
 };
 
 /**
  * Provide network services.
  */
-[scriptable, uuid(f96461fa-e844-45d2-a6c3-8cd23ab0916b)]
+[scriptable, uuid(ddb38428-0cf2-4c6a-a3c9-5e2f00fc54db)]
 interface nsINetworkService : nsISupports
 {
   /**
    * Enable or disable Wifi Tethering
    *
    * @param enabled
    *        Boolean that indicates whether tethering should be enabled (true) or disabled (false).
    * @param config
@@ -249,58 +249,54 @@ interface nsINetworkService : nsISupport
    * @param networkInterface
    *        The network interface we want remove from the default route.
    */
   void removeDefaultRoute(in nsINetworkInterface networkInterface);
 
   /**
    * Add host route.
    *
-   * @param networkInterface
-   *        The network interface we want to add to the host route.
+   * @param interfaceName
+   *        Network interface name for the output of the host route.
+   * @param gateway
+   *        Gateway ip for the output of the host route.
+   * @param host
+   *        Host ip we want to add route for.
+   *
+   * @return A deferred promise that resolves on success or rejects with a
+   *         specified reason otherwise.
    */
-  void addHostRoute(in nsINetworkInterface networkInterface);
+  jsval addHostRoute(in DOMString interfaceName, in DOMString gateway,
+                     in DOMString host);
 
   /**
    * Remove host route.
    *
-   * @param network
-   *        The network interface we want to remove from the host route.
+   * @param interfaceName
+   *        Network interface name for the output of the host route.
+   * @param gateway
+   *        Gateway ip for the output of the host route.
+   * @param host
+   *        Host ip we want to remove route for.
+   *
+   * @return A deferred promise that resolves on success or rejects with a
+   *         specified reason otherwise.
    */
-  void removeHostRoute(in nsINetworkInterface network);
+  jsval removeHostRoute(in DOMString interfaceName, in DOMString gateway,
+                        in DOMString host);
 
   /**
    * Remove all host routes.
    *
    * @param interfaceName
    *        The interface name we want remove from the routing table.
    */
   void removeHostRoutes(in DOMString interfaceName);
 
   /**
-   * Add host route with resolve.
-   *
-   * @param network
-   *        The network interface we want to add to the host route.
-   * @param hosts
-   *        The array of host names we want to add.
-   */
-  void addHostRouteWithResolve(in nsINetworkInterface network, in jsval hosts);
-
-  /**
-   * Remove host route with resolve.
-   *
-   * @param network
-   *        The network interface we want to remove from the host route.
-   * @param hosts
-   *        The array of host names we want to remove.
-   */
-  void removeHostRouteWithResolve(in nsINetworkInterface network, in jsval hosts);
-
-  /**
    * Add route to secondary routing table.
    *
    * @param interfaceName
    *        The network interface for this route.
    * @param route
    *        The route info should have the following fields:
    *        .ip: destination ip address
    *        .prefix: destination prefix