| OLD | NEW |
| 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 NET_ANDROID_NETWORK_LIBRARY_H_ | 5 #ifndef NET_ANDROID_NETWORK_LIBRARY_H_ |
| 6 #define NET_ANDROID_NETWORK_LIBRARY_H_ | 6 #define NET_ANDROID_NETWORK_LIBRARY_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 bool StoreKeyPair(const uint8* public_key, | 37 bool StoreKeyPair(const uint8* public_key, |
| 38 size_t public_len, | 38 size_t public_len, |
| 39 const uint8* private_key, | 39 const uint8* private_key, |
| 40 size_t private_len); | 40 size_t private_len); |
| 41 | 41 |
| 42 // Returns true if it can determine that only loopback addresses are configured. | 42 // Returns true if it can determine that only loopback addresses are configured. |
| 43 // i.e. if only 127.0.0.1 and ::1 are routable. | 43 // i.e. if only 127.0.0.1 and ::1 are routable. |
| 44 // Also returns false if it cannot determine this. | 44 // Also returns false if it cannot determine this. |
| 45 bool HaveOnlyLoopbackAddresses(); | 45 bool HaveOnlyLoopbackAddresses(); |
| 46 | 46 |
| 47 // Return a string containing a list of network interfaces, each item is a |
| 48 // network name and address pair. |
| 49 // e.g. "eth0,10.0.0.2;eth0,fe80::5054:ff:fe12:3456" is a result string |
| 50 // containing two items. |
| 51 std::string GetNetworkList(); |
| 52 |
| 47 // Get the mime type (if any) that is associated with the file extension. | 53 // Get the mime type (if any) that is associated with the file extension. |
| 48 // Returns true if a corresponding mime type exists. | 54 // Returns true if a corresponding mime type exists. |
| 49 bool GetMimeTypeFromExtension(const std::string& extension, | 55 bool GetMimeTypeFromExtension(const std::string& extension, |
| 50 std::string* result); | 56 std::string* result); |
| 51 | 57 |
| 52 // Register JNI methods | 58 // Register JNI methods |
| 53 bool RegisterNetworkLibrary(JNIEnv* env); | 59 bool RegisterNetworkLibrary(JNIEnv* env); |
| 54 | 60 |
| 55 } // namespace android | 61 } // namespace android |
| 56 } // namespace net | 62 } // namespace net |
| 57 | 63 |
| 58 #endif // NET_ANDROID_NETWORK_LIBRARY_H_ | 64 #endif // NET_ANDROID_NETWORK_LIBRARY_H_ |
| OLD | NEW |