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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 // a PKCS#12 archive holding a private key to the CertInstaller activity. | 53 // a PKCS#12 archive holding a private key to the CertInstaller activity. |
54 NET_EXPORT void StoreCertificate(net::CertificateMimeType cert_type, | 54 NET_EXPORT void StoreCertificate(net::CertificateMimeType cert_type, |
55 const void* data, | 55 const void* data, |
56 size_t data_len); | 56 size_t data_len); |
57 | 57 |
58 // Returns true if it can determine that only loopback addresses are configured. | 58 // Returns true if it can determine that only loopback addresses are configured. |
59 // i.e. if only 127.0.0.1 and ::1 are routable. | 59 // i.e. if only 127.0.0.1 and ::1 are routable. |
60 // Also returns false if it cannot determine this. | 60 // Also returns false if it cannot determine this. |
61 bool HaveOnlyLoopbackAddresses(); | 61 bool HaveOnlyLoopbackAddresses(); |
62 | 62 |
63 // Return a string containing a list of network interfaces, each item is a | |
64 // network name and address pair. | |
65 // e.g. "eth0,10.0.0.2;eth0,fe80::5054:ff:fe12:3456" is a result string | |
66 // containing two items. | |
67 std::string GetNetworkList(); | |
68 | |
69 // Get the mime type (if any) that is associated with the file extension. | 63 // Get the mime type (if any) that is associated with the file extension. |
70 // Returns true if a corresponding mime type exists. | 64 // Returns true if a corresponding mime type exists. |
71 bool GetMimeTypeFromExtension(const std::string& extension, | 65 bool GetMimeTypeFromExtension(const std::string& extension, |
72 std::string* result); | 66 std::string* result); |
73 | 67 |
74 // Returns the ISO country code equivalent of the current MCC (mobile country | 68 // Returns the ISO country code equivalent of the current MCC (mobile country |
75 // code). | 69 // code). |
76 NET_EXPORT std::string GetTelephonyNetworkCountryIso(); | 70 NET_EXPORT std::string GetTelephonyNetworkCountryIso(); |
77 | 71 |
78 // Returns MCC+MNC (mobile country code + mobile network code) as | 72 // Returns MCC+MNC (mobile country code + mobile network code) as |
79 // the numeric name of the current registered operator. | 73 // the numeric name of the current registered operator. |
80 NET_EXPORT std::string GetTelephonyNetworkOperator(); | 74 NET_EXPORT std::string GetTelephonyNetworkOperator(); |
81 | 75 |
82 // Register JNI methods | 76 // Register JNI methods |
83 NET_EXPORT bool RegisterNetworkLibrary(JNIEnv* env); | 77 NET_EXPORT bool RegisterNetworkLibrary(JNIEnv* env); |
84 | 78 |
85 } // namespace android | 79 } // namespace android |
86 } // namespace net | 80 } // namespace net |
87 | 81 |
88 #endif // NET_ANDROID_NETWORK_LIBRARY_H_ | 82 #endif // NET_ANDROID_NETWORK_LIBRARY_H_ |
OLD | NEW |