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

Unified Diff: ppapi/cpp/dev/net_address_dev.h

Issue 16331007: Introduce PPB_NetAddress_Dev. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/dev/net_address_dev.h
diff --git a/ppapi/cpp/dev/net_address_dev.h b/ppapi/cpp/dev/net_address_dev.h
new file mode 100644
index 0000000000000000000000000000000000000000..e5100e5de21fd1c7effbcf14c84fde0b001fdda6
--- /dev/null
+++ b/ppapi/cpp/dev/net_address_dev.h
@@ -0,0 +1,52 @@
+// Copyright (c) 2013 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_DEV_NET_ADDRESS_DEV_H_
+#define PPAPI_CPP_DEV_NET_ADDRESS_DEV_H_
+
+#include "ppapi/c/dev/ppb_net_address_dev.h"
+#include "ppapi/cpp/pass_ref.h"
+#include "ppapi/cpp/resource.h"
+#include "ppapi/cpp/var.h"
+
+namespace pp {
+
+class InstanceHandle;
+
+class NetAddress_Dev : public Resource {
+ public:
+ NetAddress_Dev();
+
+ NetAddress_Dev(PassRef, PP_Resource resource);
+
+ NetAddress_Dev(const InstanceHandle& instance,
+ const PP_NetAddress_IPv4_Dev& ipv4_addr);
+
+ NetAddress_Dev(const InstanceHandle& instance,
+ const PP_NetAddress_IPv6_Dev& ipv6_addr);
+
+ NetAddress_Dev(const NetAddress_Dev& other);
+
+ virtual ~NetAddress_Dev();
+
+ NetAddress_Dev& operator=(const NetAddress_Dev& other);
+
+ /// Static function for determining whether the browser supports the required
+ /// NetAddress interface.
+ ///
+ /// @return true if the interface is available, false otherwise.
+ static bool IsAvailable();
+
+ PP_NetAddress_Family_Dev GetFamily() const;
+
+ Var DescribeAsString(PP_Bool include_port) const;
+
+ PP_Bool DescribeAsIPv4Address(PP_NetAddress_IPv4_Dev* ipv4_addr) const;
+
+ PP_Bool DescribeAsIPv6Address(PP_NetAddress_IPv6_Dev* ipv6_addr) const;
+};
+
+} // namespace pp
+
+#endif // PPAPI_CPP_DEV_NET_ADDRESS_DEV_H_

Powered by Google App Engine
This is Rietveld 408576698