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

Side by Side Diff: ppapi/c/private/ppb_network_monitor_private.h

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
4 */
5
6 /* From private/ppb_network_monitor_private.idl,
7 * modified Tue Feb 21 18:32:25 2012.
8 */
9
10 #ifndef PPAPI_C_PRIVATE_PPB_NETWORK_MONITOR_PRIVATE_H_
11 #define PPAPI_C_PRIVATE_PPB_NETWORK_MONITOR_PRIVATE_H_
12
13 #include "ppapi/c/pp_macros.h"
14 #include "ppapi/c/pp_resource.h"
15 #include "ppapi/c/pp_stdint.h"
16
17 #define PPB_NETWORKMONITOR_PRIVATE_INTERFACE_0_2 \
18 "PPB_NetworkMonitor_Private;0.2"
19 #define PPB_NETWORKMONITOR_PRIVATE_INTERFACE \
20 PPB_NETWORKMONITOR_PRIVATE_INTERFACE_0_2
21
22 /**
23 * @file
24 * This file defines the <code>PPB_NetworkMonitor_Private</code> interface.
25 */
26
27
28 /**
29 * @addtogroup Typedefs
30 * @{
31 */
32 /**
33 * <code>PPB_NetworkMonitor_Callback</code> is a callback function
34 * type that is used to receive notifications about network
35 * configuration changes. The <code>network_list</code> passed to this
36 * callback is a <code>PPB_NetworkList_Private</code> resource that
37 * contains current configuration of network interfaces.
38 */
39 typedef void (*PPB_NetworkMonitor_Callback)(void* user_data,
40 PP_Resource network_list);
41 /**
42 * @}
43 */
44
45 /**
46 * @addtogroup Interfaces
47 * @{
48 */
49 /**
50 * The <code>PPB_NetworkMonitor_Private</code> provides access to
51 * notifications of network configuration changes.
52 */
53 struct PPB_NetworkMonitor_Private_0_2 {
54 /**
55 * Starts network change monitoring. The specified
56 * <code>callback</code> will be called on the main thread
57 * immidiately after this method is called and then later every time
58 * network configuration changes.
59 *
60 * @param[in] callback The callback that will be called every time
61 * network configuration changes.
62 *
63 * @param[inout] user_data The data to be passed to the callback on
64 * each call.
65 *
66 * @return Returns a negative error-code in case of an error,
67 * otherwise returns an Id that can be later used with the
68 * StopMonitoring() method to stop notifications.
69 */
70 int32_t (*StartMonitoring)(PPB_NetworkMonitor_Callback callback,
71 void* user_data);
72 /**
73 * Stops network change monitoring.
74 *
75 * @param[in] network_monitor_id An ID that was returned by the
76 * StartMonitoring() method.
77 *
78 * @return Returns a negative error-code in case of an error or
79 * PP_OK otherwise.
80 */
81 int32_t (*StopMonitoring)(int32_t network_monitor_id);
82 };
83
84 typedef struct PPB_NetworkMonitor_Private_0_2 PPB_NetworkMonitor_Private;
85 /**
86 * @}
87 */
88
89 #endif /* PPAPI_C_PRIVATE_PPB_NETWORK_MONITOR_PRIVATE_H_ */
90
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698