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

Unified Diff: ppapi/cpp/private/network_list_private.h

Issue 9545010: Add NetworkList/NetworkMonitor hooks and C++ wrappers. (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 side-by-side diff with in-line comments
Download patch
Index: ppapi/cpp/private/network_list_private.h
diff --git a/ppapi/cpp/private/network_list_private.h b/ppapi/cpp/private/network_list_private.h
new file mode 100644
index 0000000000000000000000000000000000000000..219d02026f5776e7d632d54ff6acbd175415fcda
--- /dev/null
+++ b/ppapi/cpp/private/network_list_private.h
@@ -0,0 +1,56 @@
+// Copyright (c) 2011 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.
+
+#ifndef PPAPI_CPP_PRIVATE_NETWORK_LIST_PRIVATE_H_
+#define PPAPI_CPP_PRIVATE_NETWORK_LIST_PRIVATE_H_
+
+#include <string>
+#include <vector>
+
+#include "ppapi/c/private/ppb_network_list_private.h"
+#include "ppapi/cpp/resource.h"
+
+namespace pp {
+
+class NetworkListPrivate : public Resource {
+ public:
+ explicit NetworkListPrivate(PP_Resource resource);
+
+ // Returns true if the required interface is available.
dmichael (off chromium) 2012/03/01 18:29:54 // -> ///
Sergey Ulanov 2012/03/02 03:01:37 Done.
+ static bool IsAvailable();
+
+ /// @return Returns number of available network interfaces or 0 if
dmichael (off chromium) 2012/03/01 18:29:54 Returns "the" number
Sergey Ulanov 2012/03/02 03:01:37 Done.
+ /// the list has never been updated.
+ uint32_t GetCount();
+
+ /// @return Returns name for the network interface with the specified
dmichael (off chromium) 2012/03/01 18:29:54 "the" name (and similar for the other functions be
Sergey Ulanov 2012/03/02 03:01:37 Done.
+ /// <code>index</code>.
+ std::string GetName(uint32_t index);
+
+ /// @return Returns type of the network interface with the specified
+ /// <code>index</code>.
+ PP_NetworkListType_Private GetType(uint32_t index);
+
+ /// @return Returns current state of the network interface with the
+ /// specified <code>index</code>.
+ PP_NetworkListState_Private GetState(uint32_t index);
+
+ /// Gets list of IP addresses for the network interface with the
+ /// specified <code>index</code> and stores them in
+ /// <code>addresses</code>.
+ void GetIpAddresses(uint32_t index,
+ std::vector<PP_NetAddress_Private>* addresses);
+
+ /// @return Returns display name for the network interface with the
+ /// specified <code>index</code>.
+ std::string GetDisplayName(uint32_t index);
+
+ /// @return Returns MTU for the network interface with the specified
+ /// <code>index</code>.
+ uint32_t GetMTU(uint32_t index);
+};
+
+} // namespace pp
+
+#endif // PPAPI_CPP_PRIVATE_NETWORK_LIST_PRIVATE_H_

Powered by Google App Engine
This is Rietveld 408576698