You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
add complete java side of sqlite implementation
Mostly taken from https://www.sqlite.org/android which is forked from AOSPs implementation
This commit is contained in:
@@ -0,0 +1,165 @@
|
||||
/* DO NOT EDIT THIS FILE - it is machine generated */
|
||||
#include <jni.h>
|
||||
/* Header for class android_database_CursorWindow */
|
||||
|
||||
#ifndef _Included_android_database_CursorWindow
|
||||
#define _Included_android_database_CursorWindow
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/*
|
||||
* Class: android_database_CursorWindow
|
||||
* Method: nativeCreate
|
||||
* Signature: (Ljava/lang/String;I)J
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL Java_android_database_CursorWindow_nativeCreate
|
||||
(JNIEnv *, jclass, jstring, jint);
|
||||
|
||||
/*
|
||||
* Class: android_database_CursorWindow
|
||||
* Method: nativeDispose
|
||||
* Signature: (J)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_android_database_CursorWindow_nativeDispose
|
||||
(JNIEnv *, jclass, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_database_CursorWindow
|
||||
* Method: nativeGetName
|
||||
* Signature: (J)Ljava/lang/String;
|
||||
*/
|
||||
JNIEXPORT jstring JNICALL Java_android_database_CursorWindow_nativeGetName
|
||||
(JNIEnv *, jclass, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_database_CursorWindow
|
||||
* Method: nativeGetBlob
|
||||
* Signature: (JII)[B
|
||||
*/
|
||||
JNIEXPORT jbyteArray JNICALL Java_android_database_CursorWindow_nativeGetBlob
|
||||
(JNIEnv *, jclass, jlong, jint, jint);
|
||||
|
||||
/*
|
||||
* Class: android_database_CursorWindow
|
||||
* Method: nativeGetString
|
||||
* Signature: (JII)Ljava/lang/String;
|
||||
*/
|
||||
JNIEXPORT jstring JNICALL Java_android_database_CursorWindow_nativeGetString
|
||||
(JNIEnv *, jclass, jlong, jint, jint);
|
||||
|
||||
/*
|
||||
* Class: android_database_CursorWindow
|
||||
* Method: nativeCopyStringToBuffer
|
||||
* Signature: (JIILandroid/database/CharArrayBuffer;)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_android_database_CursorWindow_nativeCopyStringToBuffer
|
||||
(JNIEnv *, jclass, jlong, jint, jint, jobject);
|
||||
|
||||
/*
|
||||
* Class: android_database_CursorWindow
|
||||
* Method: nativePutBlob
|
||||
* Signature: (J[BII)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_android_database_CursorWindow_nativePutBlob
|
||||
(JNIEnv *, jclass, jlong, jbyteArray, jint, jint);
|
||||
|
||||
/*
|
||||
* Class: android_database_CursorWindow
|
||||
* Method: nativePutString
|
||||
* Signature: (JLjava/lang/String;II)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_android_database_CursorWindow_nativePutString
|
||||
(JNIEnv *, jclass, jlong, jstring, jint, jint);
|
||||
|
||||
/*
|
||||
* Class: android_database_CursorWindow
|
||||
* Method: nativeClear
|
||||
* Signature: (J)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_android_database_CursorWindow_nativeClear
|
||||
(JNIEnv *, jclass, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_database_CursorWindow
|
||||
* Method: nativeGetNumRows
|
||||
* Signature: (J)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_android_database_CursorWindow_nativeGetNumRows
|
||||
(JNIEnv *, jclass, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_database_CursorWindow
|
||||
* Method: nativeSetNumColumns
|
||||
* Signature: (JI)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_android_database_CursorWindow_nativeSetNumColumns
|
||||
(JNIEnv *, jclass, jlong, jint);
|
||||
|
||||
/*
|
||||
* Class: android_database_CursorWindow
|
||||
* Method: nativeAllocRow
|
||||
* Signature: (J)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_android_database_CursorWindow_nativeAllocRow
|
||||
(JNIEnv *, jclass, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_database_CursorWindow
|
||||
* Method: nativeFreeLastRow
|
||||
* Signature: (J)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_android_database_CursorWindow_nativeFreeLastRow
|
||||
(JNIEnv *, jclass, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_database_CursorWindow
|
||||
* Method: nativeGetType
|
||||
* Signature: (JII)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_android_database_CursorWindow_nativeGetType
|
||||
(JNIEnv *, jclass, jlong, jint, jint);
|
||||
|
||||
/*
|
||||
* Class: android_database_CursorWindow
|
||||
* Method: nativeGetLong
|
||||
* Signature: (JII)J
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL Java_android_database_CursorWindow_nativeGetLong
|
||||
(JNIEnv *, jclass, jlong, jint, jint);
|
||||
|
||||
/*
|
||||
* Class: android_database_CursorWindow
|
||||
* Method: nativeGetDouble
|
||||
* Signature: (JII)D
|
||||
*/
|
||||
JNIEXPORT jdouble JNICALL Java_android_database_CursorWindow_nativeGetDouble
|
||||
(JNIEnv *, jclass, jlong, jint, jint);
|
||||
|
||||
/*
|
||||
* Class: android_database_CursorWindow
|
||||
* Method: nativePutLong
|
||||
* Signature: (JJII)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_android_database_CursorWindow_nativePutLong
|
||||
(JNIEnv *, jclass, jlong, jlong, jint, jint);
|
||||
|
||||
/*
|
||||
* Class: android_database_CursorWindow
|
||||
* Method: nativePutDouble
|
||||
* Signature: (JDII)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_android_database_CursorWindow_nativePutDouble
|
||||
(JNIEnv *, jclass, jlong, jdouble, jint, jint);
|
||||
|
||||
/*
|
||||
* Class: android_database_CursorWindow
|
||||
* Method: nativePutNull
|
||||
* Signature: (JII)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_android_database_CursorWindow_nativePutNull
|
||||
(JNIEnv *, jclass, jlong, jint, jint);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,231 @@
|
||||
/* DO NOT EDIT THIS FILE - it is machine generated */
|
||||
#include <jni.h>
|
||||
/* Header for class android_database_sqlite_SQLiteConnection */
|
||||
|
||||
#ifndef _Included_android_database_sqlite_SQLiteConnection
|
||||
#define _Included_android_database_sqlite_SQLiteConnection
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#undef android_database_sqlite_SQLiteConnection_DEBUG
|
||||
#define android_database_sqlite_SQLiteConnection_DEBUG 0L
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeOpen
|
||||
* Signature: (Ljava/lang/String;ILjava/lang/String;ZZ)J
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL Java_android_database_sqlite_SQLiteConnection_nativeOpen
|
||||
(JNIEnv *, jclass, jstring, jint, jstring, jboolean, jboolean);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeClose
|
||||
* Signature: (J)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_android_database_sqlite_SQLiteConnection_nativeClose
|
||||
(JNIEnv *, jclass, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeRegisterCustomFunction
|
||||
* Signature: (JLandroid/database/sqlite/SQLiteCustomFunction;)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_android_database_sqlite_SQLiteConnection_nativeRegisterCustomFunction
|
||||
(JNIEnv *, jclass, jlong, jobject);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeRegisterLocalizedCollators
|
||||
* Signature: (JLjava/lang/String;)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_android_database_sqlite_SQLiteConnection_nativeRegisterLocalizedCollators
|
||||
(JNIEnv *, jclass, jlong, jstring);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativePrepareStatement
|
||||
* Signature: (JLjava/lang/String;)J
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL Java_android_database_sqlite_SQLiteConnection_nativePrepareStatement
|
||||
(JNIEnv *, jclass, jlong, jstring);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeFinalizeStatement
|
||||
* Signature: (JJ)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_android_database_sqlite_SQLiteConnection_nativeFinalizeStatement
|
||||
(JNIEnv *, jclass, jlong, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeGetParameterCount
|
||||
* Signature: (JJ)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_android_database_sqlite_SQLiteConnection_nativeGetParameterCount
|
||||
(JNIEnv *, jclass, jlong, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeIsReadOnly
|
||||
* Signature: (JJ)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_android_database_sqlite_SQLiteConnection_nativeIsReadOnly
|
||||
(JNIEnv *, jclass, jlong, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeGetColumnCount
|
||||
* Signature: (JJ)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_android_database_sqlite_SQLiteConnection_nativeGetColumnCount
|
||||
(JNIEnv *, jclass, jlong, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeGetColumnName
|
||||
* Signature: (JJI)Ljava/lang/String;
|
||||
*/
|
||||
JNIEXPORT jstring JNICALL Java_android_database_sqlite_SQLiteConnection_nativeGetColumnName
|
||||
(JNIEnv *, jclass, jlong, jlong, jint);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeBindNull
|
||||
* Signature: (JJI)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_android_database_sqlite_SQLiteConnection_nativeBindNull
|
||||
(JNIEnv *, jclass, jlong, jlong, jint);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeBindLong
|
||||
* Signature: (JJIJ)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_android_database_sqlite_SQLiteConnection_nativeBindLong
|
||||
(JNIEnv *, jclass, jlong, jlong, jint, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeBindDouble
|
||||
* Signature: (JJID)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_android_database_sqlite_SQLiteConnection_nativeBindDouble
|
||||
(JNIEnv *, jclass, jlong, jlong, jint, jdouble);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeBindString
|
||||
* Signature: (JJILjava/lang/String;)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_android_database_sqlite_SQLiteConnection_nativeBindString
|
||||
(JNIEnv *, jclass, jlong, jlong, jint, jstring);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeBindBlob
|
||||
* Signature: (JJI[B)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_android_database_sqlite_SQLiteConnection_nativeBindBlob
|
||||
(JNIEnv *, jclass, jlong, jlong, jint, jbyteArray);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeResetStatementAndClearBindings
|
||||
* Signature: (JJ)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_android_database_sqlite_SQLiteConnection_nativeResetStatementAndClearBindings
|
||||
(JNIEnv *, jclass, jlong, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeExecute
|
||||
* Signature: (JJ)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_android_database_sqlite_SQLiteConnection_nativeExecute
|
||||
(JNIEnv *, jclass, jlong, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeExecuteForLong
|
||||
* Signature: (JJ)J
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL Java_android_database_sqlite_SQLiteConnection_nativeExecuteForLong
|
||||
(JNIEnv *, jclass, jlong, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeExecuteForString
|
||||
* Signature: (JJ)Ljava/lang/String;
|
||||
*/
|
||||
JNIEXPORT jstring JNICALL Java_android_database_sqlite_SQLiteConnection_nativeExecuteForString
|
||||
(JNIEnv *, jclass, jlong, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeExecuteForBlobFileDescriptor
|
||||
* Signature: (JJ)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_android_database_sqlite_SQLiteConnection_nativeExecuteForBlobFileDescriptor
|
||||
(JNIEnv *, jclass, jlong, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeExecuteForChangedRowCount
|
||||
* Signature: (JJ)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_android_database_sqlite_SQLiteConnection_nativeExecuteForChangedRowCount
|
||||
(JNIEnv *, jclass, jlong, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeExecuteForLastInsertedRowId
|
||||
* Signature: (JJ)J
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL Java_android_database_sqlite_SQLiteConnection_nativeExecuteForLastInsertedRowId
|
||||
(JNIEnv *, jclass, jlong, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeExecuteForCursorWindow
|
||||
* Signature: (JJLandroid/database/CursorWindow;IIZ)J
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL Java_android_database_sqlite_SQLiteConnection_nativeExecuteForCursorWindow
|
||||
(JNIEnv *, jclass, jlong, jlong, jobject, jint, jint, jboolean);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeGetDbLookaside
|
||||
* Signature: (J)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_android_database_sqlite_SQLiteConnection_nativeGetDbLookaside
|
||||
(JNIEnv *, jclass, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeCancel
|
||||
* Signature: (J)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_android_database_sqlite_SQLiteConnection_nativeCancel
|
||||
(JNIEnv *, jclass, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeResetCancel
|
||||
* Signature: (JZ)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_android_database_sqlite_SQLiteConnection_nativeResetCancel
|
||||
(JNIEnv *, jclass, jlong, jboolean);
|
||||
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteConnection
|
||||
* Method: nativeHasCodec
|
||||
* Signature: ()Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_android_database_sqlite_SQLiteConnection_nativeHasCodec
|
||||
(JNIEnv *, jclass);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,23 @@
|
||||
/* DO NOT EDIT THIS FILE - it is machine generated */
|
||||
#include <jni.h>
|
||||
/* Header for class android_database_sqlite_SQLiteDebug */
|
||||
|
||||
#ifndef _Included_android_database_sqlite_SQLiteDebug
|
||||
#define _Included_android_database_sqlite_SQLiteDebug
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#undef android_database_sqlite_SQLiteDebug_DEBUG_LOG_SLOW_QUERIES
|
||||
#define android_database_sqlite_SQLiteDebug_DEBUG_LOG_SLOW_QUERIES 0L
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteDebug
|
||||
* Method: nativeGetPagerStats
|
||||
* Signature: (Landroid/database/sqlite/SQLiteDebug/PagerStats;)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_android_database_sqlite_SQLiteDebug_nativeGetPagerStats
|
||||
(JNIEnv *, jclass, jobject);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,21 @@
|
||||
/* DO NOT EDIT THIS FILE - it is machine generated */
|
||||
#include <jni.h>
|
||||
/* Header for class android_database_sqlite_SQLiteGlobal */
|
||||
|
||||
#ifndef _Included_android_database_sqlite_SQLiteGlobal
|
||||
#define _Included_android_database_sqlite_SQLiteGlobal
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/*
|
||||
* Class: android_database_sqlite_SQLiteGlobal
|
||||
* Method: nativeReleaseMemory
|
||||
* Signature: ()I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_android_database_sqlite_SQLiteGlobal_nativeReleaseMemory
|
||||
(JNIEnv *, jclass);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user