Index: ppapi/c/private/ppb_network_monitor_private.h |
diff --git a/ppapi/c/private/ppb_network_monitor_private.h b/ppapi/c/private/ppb_network_monitor_private.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..af709a1258934b14eeb2831f1e5437d19fed1d39 |
--- /dev/null |
+++ b/ppapi/c/private/ppb_network_monitor_private.h |
@@ -0,0 +1,90 @@ |
+/* 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. |
+ */ |
+ |
+/* From private/ppb_network_monitor_private.idl, |
+ * modified Tue Feb 21 18:32:25 2012. |
+ */ |
+ |
+#ifndef PPAPI_C_PRIVATE_PPB_NETWORK_MONITOR_PRIVATE_H_ |
+#define PPAPI_C_PRIVATE_PPB_NETWORK_MONITOR_PRIVATE_H_ |
+ |
+#include "ppapi/c/pp_macros.h" |
+#include "ppapi/c/pp_resource.h" |
+#include "ppapi/c/pp_stdint.h" |
+ |
+#define PPB_NETWORKMONITOR_PRIVATE_INTERFACE_0_2 \ |
+ "PPB_NetworkMonitor_Private;0.2" |
+#define PPB_NETWORKMONITOR_PRIVATE_INTERFACE \ |
+ PPB_NETWORKMONITOR_PRIVATE_INTERFACE_0_2 |
+ |
+/** |
+ * @file |
+ * This file defines the <code>PPB_NetworkMonitor_Private</code> interface. |
+ */ |
+ |
+ |
+/** |
+ * @addtogroup Typedefs |
+ * @{ |
+ */ |
+/** |
+ * <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)(void* user_data, |
+ PP_Resource network_list); |
+/** |
+ * @} |
+ */ |
+ |
+/** |
+ * @addtogroup Interfaces |
+ * @{ |
+ */ |
+/** |
+ * The <code>PPB_NetworkMonitor_Private</code> provides access to |
+ * notifications of network configuration changes. |
+ */ |
+struct PPB_NetworkMonitor_Private_0_2 { |
+ /** |
+ * 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 |
+ * 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)(PPB_NetworkMonitor_Callback callback, |
+ void* 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); |
+}; |
+ |
+typedef struct PPB_NetworkMonitor_Private_0_2 PPB_NetworkMonitor_Private; |
+/** |
+ * @} |
+ */ |
+ |
+#endif /* PPAPI_C_PRIVATE_PPB_NETWORK_MONITOR_PRIVATE_H_ */ |
+ |