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

Side by Side Diff: ppapi/cpp/private/network_list_private.h

Issue 23806003: Use PP_ArrayOutput and PPB_NetAddress in PPB_NetworkList_Private.. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_CPP_PRIVATE_NETWORK_LIST_PRIVATE_H_ 5 #ifndef PPAPI_CPP_PRIVATE_NETWORK_LIST_PRIVATE_H_
6 #define PPAPI_CPP_PRIVATE_NETWORK_LIST_PRIVATE_H_ 6 #define PPAPI_CPP_PRIVATE_NETWORK_LIST_PRIVATE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "ppapi/c/private/ppb_network_list_private.h" 11 #include "ppapi/c/private/ppb_network_list_private.h"
12 #include "ppapi/cpp/pass_ref.h" 12 #include "ppapi/cpp/pass_ref.h"
13 #include "ppapi/cpp/resource.h" 13 #include "ppapi/cpp/resource.h"
14 14
15 namespace pp { 15 namespace pp {
16 16
17 class NetAddress;
18
17 class NetworkListPrivate : public Resource { 19 class NetworkListPrivate : public Resource {
18 public: 20 public:
19 NetworkListPrivate(); 21 NetworkListPrivate();
20 NetworkListPrivate(PassRef, PP_Resource resource); 22 NetworkListPrivate(PassRef, PP_Resource resource);
21 23
22 /// Returns true if the required interface is available. 24 /// Returns true if the required interface is available.
23 static bool IsAvailable(); 25 static bool IsAvailable();
24 26
25 /// @return Returns the number of available network interfaces or 0 27 /// @return Returns the number of available network interfaces or 0
26 /// if the list has never been updated. 28 /// if the list has never been updated.
27 uint32_t GetCount() const; 29 uint32_t GetCount() const;
28 30
29 /// @return Returns the name for the network interface with the 31 /// @return Returns the name for the network interface with the
30 /// specified <code>index</code>. 32 /// specified <code>index</code>.
31 std::string GetName(uint32_t index) const; 33 std::string GetName(uint32_t index) const;
32 34
33 /// @return Returns the type of the network interface with the 35 /// @return Returns the type of the network interface with the
34 /// specified <code>index</code>. 36 /// specified <code>index</code>.
35 PP_NetworkListType_Private GetType(uint32_t index) const; 37 PP_NetworkListType_Private GetType(uint32_t index) const;
36 38
37 /// @return Returns the current state of the network interface with 39 /// @return Returns the current state of the network interface with
38 /// the specified <code>index</code>. 40 /// the specified <code>index</code>.
39 PP_NetworkListState_Private GetState(uint32_t index) const; 41 PP_NetworkListState_Private GetState(uint32_t index) const;
40 42
41 /// Gets the list of IP addresses for the network interface with the 43 /// Gets the list of IP addresses for the network interface with the
42 /// specified <code>index</code> and stores them in 44 /// specified <code>index</code> and stores them in
43 /// <code>addresses</code>. 45 /// <code>addresses</code>.
44 void GetIpAddresses(uint32_t index, 46 int32_t GetIpAddresses(uint32_t index,
45 std::vector<PP_NetAddress_Private>* addresses) const; 47 std::vector<NetAddress>* addresses) const;
46 48
47 /// @return Returns the display name for the network interface with 49 /// @return Returns the display name for the network interface with
48 /// the specified <code>index</code>. 50 /// the specified <code>index</code>.
49 std::string GetDisplayName(uint32_t index) const; 51 std::string GetDisplayName(uint32_t index) const;
50 52
51 /// @return Returns the MTU for the network interface with the 53 /// @return Returns the MTU for the network interface with the
52 /// specified <code>index</code>. 54 /// specified <code>index</code>.
53 uint32_t GetMTU(uint32_t index) const; 55 uint32_t GetMTU(uint32_t index) const;
54 }; 56 };
55 57
56 } // namespace pp 58 } // namespace pp
57 59
58 #endif // PPAPI_CPP_PRIVATE_NETWORK_LIST_PRIVATE_H_ 60 #endif // PPAPI_CPP_PRIVATE_NETWORK_LIST_PRIVATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698