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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // network name and address pair. | 64 // network name and address pair. |
65 // e.g. "eth0,10.0.0.2;eth0,fe80::5054:ff:fe12:3456" is a result string | 65 // e.g. "eth0,10.0.0.2;eth0,fe80::5054:ff:fe12:3456" is a result string |
66 // containing two items. | 66 // containing two items. |
67 std::string GetNetworkList(); | 67 std::string GetNetworkList(); |
68 | 68 |
69 // Get the mime type (if any) that is associated with the file extension. | 69 // Get the mime type (if any) that is associated with the file extension. |
70 // Returns true if a corresponding mime type exists. | 70 // Returns true if a corresponding mime type exists. |
71 bool GetMimeTypeFromExtension(const std::string& extension, | 71 bool GetMimeTypeFromExtension(const std::string& extension, |
72 std::string* result); | 72 std::string* result); |
73 | 73 |
| 74 // Returns the ISO country code equivalent of the current MCC (mobile country |
| 75 // code). |
| 76 NET_EXPORT std::string GetTelephonyNetworkCountryIso(); |
| 77 |
| 78 // Returns MCC+MNC (mobile country code + mobile network code) as |
| 79 // the numeric name of the current registered operator. |
| 80 NET_EXPORT std::string GetTelephonyNetworkOperator(); |
| 81 |
74 // Register JNI methods | 82 // Register JNI methods |
75 NET_EXPORT bool RegisterNetworkLibrary(JNIEnv* env); | 83 NET_EXPORT bool RegisterNetworkLibrary(JNIEnv* env); |
76 | 84 |
77 } // namespace android | 85 } // namespace android |
78 } // namespace net | 86 } // namespace net |
79 | 87 |
80 #endif // NET_ANDROID_NETWORK_LIBRARY_H_ | 88 #endif // NET_ANDROID_NETWORK_LIBRARY_H_ |
OLD | NEW |