Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1326)

Unified Diff: ppapi/api/private/ppb_network_monitor_private.idl

Issue 9416083: Make PPB_NetworkList_Private immutable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ppapi/api/private/ppb_network_monitor_private.idl
diff --git a/ppapi/api/private/ppb_network_monitor_private.idl b/ppapi/api/private/ppb_network_monitor_private.idl
new file mode 100644
index 0000000000000000000000000000000000000000..8144605e17bbb66c698c66291dce31140a4e7801
--- /dev/null
+++ b/ppapi/api/private/ppb_network_monitor_private.idl
@@ -0,0 +1,64 @@
+/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/**
+ * This file defines the <code>PPB_NetworkMonitor_Private</code> interface.
+ */
+
+label Chrome {
+ M19 = 0.2
+};
+
+/**
+ * <code>PPB_NetworkMonitor_Callback</code> is a callback function
+ * type that is used to receive notifications about network
+ * configuration changes. The <code>network_list</code> passed to this
+ * callback is a <code>PPB_NetworkList_Private</code> resource that
+ * contains current configuration of network interfaces.
+ */
+typedef void PPB_NetworkMonitor_Callback([inout] mem_t user_data,
+ [in] PP_Resource network_list);
+
+
+/**
+ * The <code>PPB_NetworkMonitor_Private</code> provides access to
+ * notifications of network configuration changes.
+ */
+interface PPB_NetworkMonitor_Private {
+ /**
+ * Starts network change monitoring. The specified
+ * <code>callback</code> will be called on the main thread once
+ * after this method is called (to supply the initial network
+ * configuarion) and then later every time network configuration
Wez 2012/02/25 02:10:36 typo: configuration
+ * changes. Notifications are stopped when the returned resource is
+ * destroyed. If the plugin doesn't have access to the network list
Wez 2012/02/25 02:10:36 Is there any possibility of in-flight notification
+ * then the callback will be called once with the
+ * <code>network_list</code> parameter is set to 0.
Wez 2012/02/25 02:10:36 typo: ... parameter set to ...
+ *
+ * @param[in] callback The callback that will be called every time
+ * network configuration changes or NULL to stop network monitoring.
Wez 2012/02/25 02:10:36 nit: Network monitoring is stopped by deleting the
+ *
+ * @param[inout] user_data The data to be passed to the callback on
+ * each call.
+ *
+ * @return A <code>PP_Resource</code> containing the created
+ * NetworkMonitor resource.
+ */
+ PP_Resource Create([in] PP_Instance instance,
+ [in] PPB_NetworkMonitor_Callback callback,
+ [inout] mem_t user_data);
+
+ /**
+ * Determines if the specified <code>resource</code> is a
+ * <code>NetworkMonitor</code> object.
+ *
+ * @param[in] resource A <code>PP_Resource</code> resource.
+ *
+ * @return Returns <code>PP_TRUE</code> if <code>resource</code> is
+ * a <code>PPB_NetworkMonitor_Private</code>, <code>PP_FALSE</code>
+ * otherwise.
+ */
+ PP_Bool IsNetworkMonitor([in] PP_Resource resource);
+};

Powered by Google App Engine
This is Rietveld 408576698