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..ae7751ca85f50ee96e5aa2acdf516956d52bcaed |
--- /dev/null |
+++ b/ppapi/api/private/ppb_network_monitor_private.idl |
@@ -0,0 +1,59 @@ |
+/* 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 |
+ * immidiately after this method is called and then later every time |
brettw
2012/02/22 17:26:39
immediately is spelled wrong, but let's say "once
Sergey Ulanov
2012/02/23 02:17:28
Done.
|
+ * network configuration changes. |
+ * |
+ * @param[in] callback The callback that will be called every time |
+ * network configuration changes. |
+ * |
+ * @param[inout] user_data The data to be passed to the callback on |
+ * each call. |
+ * |
+ * @return Returns a negative error-code in case of an error, |
+ * otherwise returns an Id that can be later used with the |
+ * StopMonitoring() method to stop notifications. |
+ */ |
+ int32_t StartMonitoring([in] PPB_NetworkMonitor_Callback callback, |
brettw
2012/02/22 17:26:39
I don't really feel like we need this ID. I think
Wez
2012/02/22 17:46:43
Why not return a PP_Resource identifying the monit
Sergey Ulanov
2012/02/23 02:17:28
Done. Also removed StopMonitoring() and renamed th
Sergey Ulanov
2012/02/23 02:17:28
Just changed it so that there is always only one m
|
+ [inout] mem_t user_data); |
+ |
+ /** |
+ * Stops network change monitoring. |
+ |
+ * @param[in] network_monitor_id An ID that was returned by the |
+ * StartMonitoring() method. |
+ * |
+ * @return Returns a negative error-code in case of an error or |
+ * PP_OK otherwise. |
+ */ |
+ int32_t StopMonitoring(int32_t network_monitor_id); |
+}; |