Skip to content

Commit a6044fb

Browse files
Repackaging structure from info.guardianproject.* to net.sqlcipher.*
1 parent 9151e30 commit a6044fb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+125
-125
lines changed

AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="info.guardianproject.database" android:versionCode="4"
3+
package="net.sqlcipher" android:versionCode="4"
44
android:versionName="v1 (0.0.6.FINAL)">
55
<uses-sdk android:minSdkVersion="7"></uses-sdk>
66
<application android:icon="@drawable/icon" android:label="@string/app_name">

jni/Android.mk

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ endif
2121
include $(CLEAR_VARS)
2222

2323
LOCAL_SRC_FILES:= \
24-
info_guardianproject_database_sqlcipher_SQLiteCompiledSql.cpp \
25-
info_guardianproject_database_sqlcipher_SQLiteDatabase.cpp \
26-
info_guardianproject_database_sqlcipher_SQLiteProgram.cpp \
27-
info_guardianproject_database_sqlcipher_SQLiteQuery.cpp \
28-
info_guardianproject_database_sqlcipher_SQLiteStatement.cpp \
29-
info_guardianproject_database_CursorWindow.cpp \
24+
net_sqlcipher_database_SQLiteCompiledSql.cpp \
25+
net_sqlcipher_database_SQLiteDatabase.cpp \
26+
net_sqlcipher_database_SQLiteProgram.cpp \
27+
net_sqlcipher_database_SQLiteQuery.cpp \
28+
net_sqlcipher_database_SQLiteStatement.cpp \
29+
net_sqlcipher_CursorWindow.cpp \
3030
CursorWindow.cpp
3131
# info_guardianproject_database_sqlcipher_SQLiteDebug.cpp
3232

jni/CursorWindow.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include "CursorWindow.h"
3232

3333

34-
namespace guardianproject {
34+
namespace sqlcipher {
3535

3636
CursorWindow::CursorWindow(size_t maxSize) :
3737
mMaxSize(maxSize)
@@ -410,4 +410,4 @@ bool CursorWindow::getNull(unsigned int row, unsigned int col, bool * valueOut)
410410
return true;
411411
}
412412

413-
}; // namespace guardianproject
413+
}; // namespace sqlcipher

jni/CursorWindow.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
// When defined to true numberic values are stored inline in the field_slot_t, otherwise they're allocated in the window
6363
#define WINDOW_STORAGE_INLINE_NUMERICS 1
6464

65-
namespace guardianproject {
65+
namespace sqlcipher {
6666

6767
typedef struct
6868
{
@@ -203,6 +203,6 @@ class CursorWindow
203203
uint32_t mFreeOffset;
204204
};
205205

206-
}; // namespace guardianproject
206+
}; // namespace sqlcipher
207207

208208
#endif

jni/info_guardianproject_database_CursorWindow.cpp renamed to jni/net_sqlcipher_CursorWindow.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include "sqlite3_exception.h"
3232
#include "android_util_Binder.h"
3333

34-
namespace guardianproject {
34+
namespace sqlcipher {
3535

3636
static jfieldID gWindowField;
3737
static jfieldID gBufferField;
@@ -683,9 +683,9 @@ int register_android_database_CursorWindow(JNIEnv * env)
683683
{
684684
jclass clazz;
685685

686-
clazz = env->FindClass("info/guardianproject/database/CursorWindow");
686+
clazz = env->FindClass("net/sqlcipher/CursorWindow");
687687
if (clazz == NULL) {
688-
LOGE("Can't find info/guardianproject/database/CursorWindow");
688+
LOGE("Can't find net/sqlcipher/CursorWindow");
689689
return -1;
690690
}
691691

@@ -716,8 +716,8 @@ int register_android_database_CursorWindow(JNIEnv * env)
716716
return -1;
717717
}
718718

719-
return android::AndroidRuntime::registerNativeMethods(env, "info/guardianproject/database/CursorWindow",
719+
return android::AndroidRuntime::registerNativeMethods(env, "net/sqlcipher/CursorWindow",
720720
sMethods, NELEM(sMethods));
721721
}
722722

723-
} // namespace guardianproject
723+
} // namespace sqlcipher

jni/info_guardianproject_database_sqlcipher_SQLiteCompiledSql.cpp renamed to jni/net_sqlcipher_database_SQLiteCompiledSql.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include "sqlite3_exception.h"
3333

3434

35-
namespace guardianproject {
35+
namespace sqlcipher {
3636

3737
static jfieldID gHandleField;
3838
static jfieldID gStatementField;
@@ -113,9 +113,9 @@ int register_android_database_SQLiteCompiledSql(JNIEnv * env)
113113
{
114114
jclass clazz;
115115

116-
clazz = env->FindClass("info/guardianproject/database/sqlcipher/SQLiteCompiledSql");
116+
clazz = env->FindClass("net/sqlcipher/database/SQLiteCompiledSql");
117117
if (clazz == NULL) {
118-
LOGE("Can't find info/guardianproject/database/sqlcipher/SQLiteCompiledSql");
118+
LOGE("Can't find net/sqlcipher/database/SQLiteCompiledSql");
119119
return -1;
120120
}
121121

@@ -128,10 +128,10 @@ int register_android_database_SQLiteCompiledSql(JNIEnv * env)
128128
}
129129

130130
return android::AndroidRuntime::registerNativeMethods(env,
131-
"info/guardianproject/database/sqlcipher/SQLiteCompiledSql", sMethods, NELEM(sMethods));
131+
"net/sqlcipher/database/SQLiteCompiledSql", sMethods, NELEM(sMethods));
132132
}
133133

134134

135135

136136

137-
} // namespace guardianproject
137+
} // namespace sqlcipher

jni/info_guardianproject_database_sqlcipher_SQLiteDatabase.cpp renamed to jni/net_sqlcipher_database_SQLiteDatabase.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050

5151

52-
namespace guardianproject {
52+
namespace sqlcipher {
5353

5454

5555
enum {
@@ -161,7 +161,7 @@ void dbopen(JNIEnv* env, jobject object, jstring pathString, jint flags)
161161
const char *text = (const char*)sqlite3_column_text(statement, 0);
162162
if (strcmp(text, "ok") != 0) {
163163
LOGE("integrity check failed for \"%s\": %s\n", integritySql, path8, text);
164-
jniThrowException(env, "info/guardianproject/database/sqlcipher/SQLiteDatabaseCorruptException", text);
164+
jniThrowException(env, "net/sqlcipher/database/SQLiteDatabaseCorruptException", text);
165165
goto done;
166166
}
167167
}
@@ -473,9 +473,9 @@ int register_android_database_SQLiteDatabase(JNIEnv *env)
473473
{
474474
jclass clazz;
475475

476-
clazz = env->FindClass("info/guardianproject/database/sqlcipher/SQLiteDatabase");
476+
clazz = env->FindClass("net/sqlcipher/database/SQLiteDatabase");
477477
if (clazz == NULL) {
478-
LOGE("Can't find info/guardianproject/database/sqlcipher/SQLiteDatabase\n");
478+
LOGE("Can't find net/sqlcipher/database/SQLiteDatabase\n");
479479
return -1;
480480
}
481481

@@ -485,7 +485,7 @@ int register_android_database_SQLiteDatabase(JNIEnv *env)
485485
return -1;
486486
}
487487

488-
return android::AndroidRuntime::registerNativeMethods(env, "info/guardianproject/database/sqlcipher/SQLiteDatabase", sMethods, NELEM(sMethods));
488+
return android::AndroidRuntime::registerNativeMethods(env, "net/sqlcipher/database/SQLiteDatabase", sMethods, NELEM(sMethods));
489489
}
490490

491491

@@ -564,25 +564,25 @@ void throw_sqlite3_exception(JNIEnv* env, int errcode,
564564
const char* exceptionClass;
565565
switch (errcode) {
566566
case SQLITE_IOERR:
567-
exceptionClass = "info/guardianproject/database/sqlcipher/SQLiteDiskIOException";
567+
exceptionClass = "net/sqlcipher/database/SQLiteDiskIOException";
568568
break;
569569
case SQLITE_CORRUPT:
570-
exceptionClass = "info/guardianproject/database/sqlcipher/SQLiteDatabaseCorruptException";
570+
exceptionClass = "net/sqlcipher/database/SQLiteDatabaseCorruptException";
571571
break;
572572
case SQLITE_CONSTRAINT:
573-
exceptionClass = "info/guardianproject/database/sqlcipher/SQLiteConstraintException";
573+
exceptionClass = "net/sqlcipher/database/SQLiteConstraintException";
574574
break;
575575
case SQLITE_ABORT:
576-
exceptionClass = "info/guardianproject/database/sqlcipher/SQLiteAbortException";
576+
exceptionClass = "net/sqlcipher/database/SQLiteAbortException";
577577
break;
578578
case SQLITE_DONE:
579-
exceptionClass = "info/guardianproject/database/sqlcipher/SQLiteDoneException";
579+
exceptionClass = "net/sqlcipher/database/SQLiteDoneException";
580580
break;
581581
case SQLITE_FULL:
582-
exceptionClass = "info/guardianproject/database/sqlcipher/SQLiteFullException";
582+
exceptionClass = "net/sqlcipher/database/SQLiteFullException";
583583
break;
584584
case SQLITE_MISUSE:
585-
exceptionClass = "info/guardianproject/database/sqlcipher/SQLiteMisuseException";
585+
exceptionClass = "net/sqlcipher/database/SQLiteMisuseException";
586586
break;
587587
default:
588588
exceptionClass = "info/guardianproject/database/sqlcipher/SQLiteException";
@@ -608,4 +608,4 @@ void throw_sqlite3_exception(JNIEnv* env, int errcode,
608608
}
609609

610610

611-
} // namespace guardianproject
611+
} // namespace sqlcipher

jni/info_guardianproject_database_sqlcipher_SQLiteDebug.cpp renamed to jni/net_sqlcipher_database_SQLiteDebug.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// From mem_mspace.c in libsqlite
3030
extern "C" mspace sqlite3_get_mspace();
3131

32-
namespace guardianproject {
32+
namespace sqlcipher {
3333

3434
static jfieldID gMemoryUsedField;
3535
static jfieldID gPageCacheOverfloField;
@@ -187,7 +187,7 @@ static void getHeapDirtyPages(JNIEnv *env, jobject clazz, jintArray pages)
187187

188188
static JNINativeMethod gMethods[] =
189189
{
190-
{ "getPagerStats", "(Linfo/guardianproject/database/sqlcipher/SQLiteDebug$PagerStats;)V",
190+
{ "getPagerStats", "(Lnet/sqlcipher/database/SQLiteDebug$PagerStats;)V",
191191
(void*) getPagerStats },
192192
{ "getHeapSize", "()J", (void*) getHeapSize },
193193
{ "getHeapAllocatedSize", "()J", (void*) getHeapAllocatedSize },
@@ -199,9 +199,9 @@ int register_android_database_SQLiteDebug(JNIEnv *env)
199199
{
200200
jclass clazz;
201201

202-
clazz = env->FindClass("info/guardianproject/database/sqlcipher/SQLiteDebug$PagerStats");
202+
clazz = env->FindClass("net/sqlcipher/database/SQLiteDebug$PagerStats");
203203
if (clazz == NULL) {
204-
LOGE("Can't find info/guardianproject/database/sqlcipher/SQLiteDebug$PagerStats");
204+
LOGE("Can't find net/sqlcipher/database/SQLiteDebug$PagerStats");
205205
return -1;
206206
}
207207

@@ -223,8 +223,8 @@ int register_android_database_SQLiteDebug(JNIEnv *env)
223223
return -1;
224224
}
225225

226-
return jniRegisterNativeMethods(env, "info/guardianproject/database/sqlcipher/SQLiteDebug",
226+
return jniRegisterNativeMethods(env, "net/sqlcipher/database/SQLiteDebug",
227227
gMethods, NELEM(gMethods));
228228
}
229229

230-
} // namespace guardianproject
230+
} // namespace sqlcipher

jni/info_guardianproject_database_sqlcipher_SQLiteProgram.cpp renamed to jni/net_sqlcipher_database_SQLiteProgram.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include "sqlite3_exception.h"
3333

3434

35-
namespace guardianproject {
35+
namespace sqlcipher {
3636

3737
static jfieldID gHandleField;
3838
static jfieldID gStatementField;
@@ -174,9 +174,9 @@ int register_android_database_SQLiteProgram(JNIEnv * env)
174174
{
175175
jclass clazz;
176176

177-
clazz = env->FindClass("info/guardianproject/database/sqlcipher/SQLiteProgram");
177+
clazz = env->FindClass("net/sqlcipher/database/SQLiteProgram");
178178
if (clazz == NULL) {
179-
LOGE("Can't find info/guardianproject/database/sqlcipher/SQLiteProgram");
179+
LOGE("Can't find net/sqlcipher/database/SQLiteProgram");
180180
return -1;
181181
}
182182

@@ -189,8 +189,8 @@ int register_android_database_SQLiteProgram(JNIEnv * env)
189189
}
190190

191191
return android::AndroidRuntime::registerNativeMethods(env,
192-
"info/guardianproject/database/sqlcipher/SQLiteProgram", sMethods, NELEM(sMethods));
192+
"net/sqlcipher/database/SQLiteProgram", sMethods, NELEM(sMethods));
193193
}
194194

195195

196-
} // namespace guardianproject
196+
} // namespace sqlcipher

jni/info_guardianproject_database_sqlcipher_SQLiteQuery.cpp renamed to jni/net_sqlcipher_database_SQLiteQuery.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#include "sqlite3_exception.h"
3434

3535

36-
namespace guardianproject {
36+
namespace sqlcipher {
3737

3838
CursorWindow * get_window_from_object(JNIEnv * env, jobject javaWindow);
3939

@@ -335,7 +335,7 @@ static jstring native_column_name(JNIEnv* env, jobject object, jint columnIndex)
335335
static JNINativeMethod sMethods[] =
336336
{
337337
/* name, signature, funcPtr */
338-
{"native_fill_window", "(Linfo/guardianproject/database/CursorWindow;IIII)I", (void *)native_fill_window},
338+
{"native_fill_window", "(Lnet/sqlcipher/CursorWindow;IIII)I", (void *)native_fill_window},
339339
{"native_column_count", "()I", (void*)native_column_count},
340340
{"native_column_name", "(I)Ljava/lang/String;", (void *)native_column_name},
341341
};
@@ -345,9 +345,9 @@ int register_android_database_SQLiteQuery(JNIEnv * env)
345345
{
346346
jclass clazz;
347347

348-
clazz = env->FindClass("info/guardianproject/database/sqlcipher/SQLiteQuery");
348+
clazz = env->FindClass("net/sqlcipher/database/SQLiteQuery");
349349
if (clazz == NULL) {
350-
LOGE("Can't find info/guardianproject/database/sqlcipher/SQLiteQuery");
350+
LOGE("Can't find net/sqlcipher/database/SQLiteQuery");
351351
return -1;
352352
}
353353

@@ -360,8 +360,8 @@ int register_android_database_SQLiteQuery(JNIEnv * env)
360360
}
361361

362362
return android::AndroidRuntime::registerNativeMethods(env,
363-
"info/guardianproject/database/sqlcipher/SQLiteQuery", sMethods, NELEM(sMethods));
363+
"net/sqlcipher/database/SQLiteQuery", sMethods, NELEM(sMethods));
364364
}
365365

366366

367-
} // namespace guardianproject
367+
} // namespace sqlcipher

0 commit comments

Comments
 (0)