| 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 BASE_ANDROID_JNI_ARRAY_H_ | 5 #ifndef BASE_ANDROID_JNI_ARRAY_H_ |
| 6 #define BASE_ANDROID_JNI_ARRAY_H_ | 6 #define BASE_ANDROID_JNI_ARRAY_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 JNIEnv* env, | 54 JNIEnv* env, |
| 55 jobjectArray array, | 55 jobjectArray array, |
| 56 std::vector<std::string>* out); | 56 std::vector<std::string>* out); |
| 57 | 57 |
| 58 // Appends the Java bytes in |bytes_array| onto the end of |out|. | 58 // Appends the Java bytes in |bytes_array| onto the end of |out|. |
| 59 BASE_EXPORT void AppendJavaByteArrayToByteVector( | 59 BASE_EXPORT void AppendJavaByteArrayToByteVector( |
| 60 JNIEnv* env, | 60 JNIEnv* env, |
| 61 jbyteArray byte_array, | 61 jbyteArray byte_array, |
| 62 std::vector<uint8>* out); | 62 std::vector<uint8>* out); |
| 63 | 63 |
| 64 // Appends the Java longs in |longs_array| onto the end of |out|. |
| 65 BASE_EXPORT void AppendJavaLongArrayToLongVector( |
| 66 JNIEnv* env, |
| 67 jlongArray long_array, |
| 68 std::vector<long>* out); |
| 69 |
| 64 // Replaces the content of |out| with the Java bytes in |bytes_array|. | 70 // Replaces the content of |out| with the Java bytes in |bytes_array|. |
| 65 BASE_EXPORT void JavaByteArrayToByteVector( | 71 BASE_EXPORT void JavaByteArrayToByteVector( |
| 66 JNIEnv* env, | 72 JNIEnv* env, |
| 67 jbyteArray byte_array, | 73 jbyteArray byte_array, |
| 68 std::vector<uint8>* out); | 74 std::vector<uint8>* out); |
| 69 | 75 |
| 70 // Replaces the content of |out| with the Java ints in |int_array|. | 76 // Replaces the content of |out| with the Java ints in |int_array|. |
| 71 BASE_EXPORT void JavaIntArrayToIntVector( | 77 BASE_EXPORT void JavaIntArrayToIntVector( |
| 72 JNIEnv* env, | 78 JNIEnv* env, |
| 73 jintArray int_array, | 79 jintArray int_array, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 90 // conversion is performed. | 96 // conversion is performed. |
| 91 BASE_EXPORT void JavaArrayOfByteArrayToStringVector( | 97 BASE_EXPORT void JavaArrayOfByteArrayToStringVector( |
| 92 JNIEnv* env, | 98 JNIEnv* env, |
| 93 jobjectArray array, | 99 jobjectArray array, |
| 94 std::vector<std::string>* out); | 100 std::vector<std::string>* out); |
| 95 | 101 |
| 96 } // namespace android | 102 } // namespace android |
| 97 } // namespace base | 103 } // namespace base |
| 98 | 104 |
| 99 #endif // BASE_ANDROID_JNI_ARRAY_H_ | 105 #endif // BASE_ANDROID_JNI_ARRAY_H_ |
| OLD | NEW |