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..a1ef5a8df2fc303f39ebdeea0c2ea1b80f6151d2 |
--- /dev/null |
+++ b/ppapi/api/private/ppb_network_monitor_private.idl |
@@ -0,0 +1,51 @@ |
+/* 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 |
+ * changes. Notifications are stopped when this method is called |
+ * with <code>callback</code> set to NULL. |
dmichael (off chromium)
2012/02/24 18:04:11
Hmm, I think I prefer wez's suggestion to return a
Sergey Ulanov
2012/02/24 18:25:11
Done and also renamed it to Create(). In that case
dmichael (off chromium)
2012/02/24 18:29:11
Yes. I guess that's the downside; more boilerplate
Sergey Ulanov
2012/02/24 18:54:34
Done.
|
+ * |
+ * @param[in] callback The callback that will be called every time |
+ * network configuration changes or NULL to stop network monitoring. |
+ * |
+ * @param[inout] user_data The data to be passed to the callback on |
+ * each call. |
+ * |
+ * @return Returns an error-code in case of an error or PP_OK |
+ * otherwise. |
+ */ |
+ int32_t SetCallback([in] PP_Instance instance, |
Sergey Ulanov
2012/02/23 02:17:28
Also added this |instance| parameters, but not sur
|
+ [in] PPB_NetworkMonitor_Callback callback, |
+ [inout] mem_t user_data); |
+ |
+}; |