OLD | NEW |
---|---|
(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 /** | |
7 * This file defines the <code>PPB_NetworkMonitor_Private</code> interface. | |
8 */ | |
9 | |
10 label Chrome { | |
11 M19 = 0.2 | |
12 }; | |
13 | |
14 /** | |
15 * <code>PPB_NetworkMonitor_Callback</code> is a callback function | |
16 * type that is used to receive notifications about network | |
17 * configuration changes. The <code>network_list</code> passed to this | |
18 * callback is a <code>PPB_NetworkList_Private</code> resource that | |
19 * contains current configuration of network interfaces. | |
20 */ | |
21 typedef void PPB_NetworkMonitor_Callback([inout] mem_t user_data, | |
22 [in] PP_Resource network_list); | |
23 | |
24 | |
25 /** | |
26 * The <code>PPB_NetworkMonitor_Private</code> provides access to | |
27 * notifications of network configuration changes. | |
28 */ | |
29 interface PPB_NetworkMonitor_Private { | |
30 /** | |
31 * Starts network change monitoring. The specified | |
32 * <code>callback</code> will be called on the main thread | |
33 * 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.
| |
34 * network configuration changes. | |
35 * | |
36 * @param[in] callback The callback that will be called every time | |
37 * network configuration changes. | |
38 * | |
39 * @param[inout] user_data The data to be passed to the callback on | |
40 * each call. | |
41 * | |
42 * @return Returns a negative error-code in case of an error, | |
43 * otherwise returns an Id that can be later used with the | |
44 * StopMonitoring() method to stop notifications. | |
45 */ | |
46 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
| |
47 [inout] mem_t user_data); | |
48 | |
49 /** | |
50 * Stops network change monitoring. | |
51 | |
52 * @param[in] network_monitor_id An ID that was returned by the | |
53 * StartMonitoring() method. | |
54 * | |
55 * @return Returns a negative error-code in case of an error or | |
56 * PP_OK otherwise. | |
57 */ | |
58 int32_t StopMonitoring(int32_t network_monitor_id); | |
59 }; | |
OLD | NEW |