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

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

Issue 8357030: Add private Pepper API for dealing with PP_Flash_NetAddress. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added C++ wrapper for GetAnyAddress Created 9 years, 1 month 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/flash_net_address.h
diff --git a/ppapi/cpp/private/flash_net_address.h b/ppapi/cpp/private/flash_net_address.h
new file mode 100644
index 0000000000000000000000000000000000000000..9d09eb98b6bf610c824b94bdc3945bb78c5172a2
--- /dev/null
+++ b/ppapi/cpp/private/flash_net_address.h
@@ -0,0 +1,38 @@
+// 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.
+
+// TODO(viettrungluu): This (and the .cc file) contain C++ wrappers for things
+// in ppapi/c/private/ppb_flash_net_address.h. This is currently not used in
+// (or even compiled with) Chromium.
+
+#ifndef PPAPI_CPP_PRIVATE_FLASH_NET_ADDRESS_H_
+#define PPAPI_CPP_PRIVATE_FLASH_NET_ADDRESS_H_
+
+#include <string>
+
+#include "ppapi/c/pp_stdint.h"
+
+struct PP_Flash_NetAddress;
+
+namespace pp {
+namespace flash {
+
+class NetAddress {
+ public:
+ static bool AreEqual(const PP_Flash_NetAddress& addr1,
+ const PP_Flash_NetAddress& addr2);
+ static bool AreHostsEqual(const PP_Flash_NetAddress& addr1,
+ const PP_Flash_NetAddress& addr2);
+ static std::string Describe(const PP_Flash_NetAddress& addr,
+ bool include_port);
+ static bool ReplacePort(const PP_Flash_NetAddress& addr_in,
+ uint16_t port,
+ PP_Flash_NetAddress* addr_out);
+ static void GetAnyAddress(bool is_ipv6, struct PP_Flash_NetAddress* addr);
yzshen1 2011/11/07 21:57:44 nit: we could omit the struct keyword here.
viettrungluu 2011/11/07 23:33:37 Done.
+};
+
+} // namespace flash
+} // namespace pp
+
+#endif // PPAPI_CPP_PRIVATE_FLASH_NET_ADDRESS_H_

Powered by Google App Engine
This is Rietveld 408576698