From 6682966738744a70877baf4a1605c31c7806ea3e Mon Sep 17 00:00:00 2001 From: Jessica Jong Date: Tue, 29 Jul 2014 16:44:24 +0800 Subject: [PATCH] Bug 990458 - Part 1: add updateNetworkInterface() API in idl. r=edgar --- dom/system/gonk/nsINetworkManager.idl | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/dom/system/gonk/nsINetworkManager.idl b/dom/system/gonk/nsINetworkManager.idl index 3bf98b60faa..1a7c393a2c0 100644 --- a/dom/system/gonk/nsINetworkManager.idl +++ b/dom/system/gonk/nsINetworkManager.idl @@ -21,8 +21,8 @@ interface nsINetworkInterface : nsISupports /** * Current network state, one of the NETWORK_STATE_* constants. * - * When this changes, network interface implementations notify the - * 'network-interface-state-changed' observer notification. + * When this changes, network interface implementations notify with + * updateNetworkInterface() API. */ readonly attribute long state; @@ -97,7 +97,7 @@ interface nsINetworkInterface : nsISupports /** * Manage network interfaces. */ -[scriptable, uuid(3ea50550-4b3c-11e3-8f96-0800200c9a66)] +[scriptable, uuid(f3193805-c070-4d23-bd5c-a439eb8610c3)] interface nsINetworkManager : nsISupports { /** @@ -113,6 +113,20 @@ interface nsINetworkManager : nsISupports */ void registerNetworkInterface(in nsINetworkInterface network); + /** + * Update the routes and DNSes according the state of the given network. + * + * Consumers will be notified with the 'network-connection-state-changed' + * observer notification. + * + * Throws an exception if the specified network interface object isn't + * registered. + * + * @param network + * Network interface to update. + */ + void updateNetworkInterface(in nsINetworkInterface network); + /** * Unregister the given network interface from the network manager. *