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 once | |
33 * after this method is called (to supply the initial network | |
34 * configuarion) and then later every time network configuration | |
35 * changes. Notifications are stopped when this method is called | |
36 * 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.
| |
37 * | |
38 * @param[in] callback The callback that will be called every time | |
39 * network configuration changes or NULL to stop network monitoring. | |
40 * | |
41 * @param[inout] user_data The data to be passed to the callback on | |
42 * each call. | |
43 * | |
44 * @return Returns an error-code in case of an error or PP_OK | |
45 * otherwise. | |
46 */ | |
47 int32_t SetCallback([in] PP_Instance instance, | |
Sergey Ulanov
2012/02/23 02:17:28
Also added this |instance| parameters, but not sur
| |
48 [in] PPB_NetworkMonitor_Callback callback, | |
49 [inout] mem_t user_data); | |
50 | |
51 }; | |
OLD | NEW |