8000 Update documentation generation · dw3/android-database-sqlcipher@c9f3eda · GitHub
[go: up one dir, main page]

Skip to content

Commit c9f3eda

Browse files
Update documentation generation
1 parent b7f95fe commit c9f3eda

File tree

7 files changed

+61
-31
lines changed

7 files changed

+61
-31
lines changed

custom_rules.xml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,22 @@
1717

1818
<target name="-javadoc" description="Generate Javadocs">
1919
<property name="javadoc.jar.name" value="${out.dir}/sqlcipher-javadoc.jar" />
20-
<javadoc sourcepath="${source.dir}"
20+
<javadoc sourcepath="${source.dir};gen"
2121
destdir="${out.dir}/javadoc"
2222
packagenames="net.sqlcipher.*"
23-
windowtitle="SQLCipher for Android"
24-
doctitle="SQLCipher for Android" />
23+
bootclasspath="${env.JAVA_HOME}/jre/lib/rt.jar"
24+
docletpath="${user.dir}/jars/doclava-1.0.6.jar" >
25+
<doclet name="com.google.doclava.Doclava">
26+
<param name="-hdf"/>
27+
<param name="project.name"/>
28+
<param name="SQLCipher for Android"/>
29+
</doclet>
30+
<classpath>
31+
<fileset dir="${sdk.dir}/platforms/${target}">
32+
<include name="android.jar"/>
33+
</fileset>
34+
</classpath>
35+
</javadoc>
2536
<delete file="${javadoc.jar.name}"/>
2637
<jar destfile="${javadoc.jar.name}"
2738
includes="net/sqlcipher/**"
@@ -62,4 +73,4 @@
6273
<copy file="${out.dir}/sqlcipher-javadoc.jar" todir="${jar.dir}" preservelastmodified="true" overwrite="true"/>
6374
</target>
6475

65-
</project>
76+
</project>

jars/doclava-1.0.6.jar

1.72 MB
Binary file not shown.

src/net/sqlcipher/DatabaseUtils.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ public static String dumpCurrentRowToString(Cursor cursor) {
495495
*
496496
* @param cursor The cursor to read from
497497
* @param field The TEXT field to read
498-
* @param values The {@link ContentValues} to put the value into, with the field as the key
498+
* @param values The ContentValues to put the value into, with the field as the key
499499
*/
500500
public static void cursorStringToContentValues(Cursor cursor, String field,
501501
ContentValues values) {
@@ -520,7 +520,7 @@ public static void cursorStringToInsertHelper(Cursor cursor, String field,
520520
*
521521
* @param cursor The cursor to read from
522522
* @param field The TEXT field to read
523-
* @param values The {@link ContentValues} to put the value into, with the field as the key
523+
* @param values The ContentValues to put the value into, with the field as the key
524524
* @param key The key to store the value with in the map
525525
*/
526526
public static void cursorStringToContentValues(Cursor cursor, String field,
@@ -533,7 +533,7 @@ public static void cursorStringToContentValues(Cursor cursor, String field,
533533
*
534534
* @param cursor The cursor to read from
535535
* @param field The INTEGER field to read
536-
* @param values The {@link ContentValues} to put the value into, with the field as the key
536+
* @param values The ContentValues to put the value into, with the field as the key
537537
*/
538538
public static void cursorIntToContentValues(Cursor cursor, String field, ContentValues values) {
539539
cursorIntToContentValues(cursor, field, values, field);
@@ -544,7 +544,7 @@ public static void cursorIntToContentValues(Cursor cursor, String field, Content
544544
*
545545
* @param cursor The cursor to read from
546546
* @param field The INTEGER field to read
547-
* @param values The {@link ContentValues} to put the value into, with the field as the key
547+
* @param values The ContentValues to put the value into, with the field as the key
548548
* @param key The key to store the value with in the map
549549
*/
550550
public static void cursorIntToContentValues(Cursor cursor, String field, ContentValues values,
@@ -562,7 +562,7 @@ public static void cursorIntToContentValues(Cursor cursor, String field, Content
562562
*
563563
* @param cursor The cursor to read from
564564
* @param field The INTEGER field to read
565-
* @param values The {@link ContentValues} to put the value into, with the field as the key
565+
* @param values The ContentValues to put the value into, with the field as the key
566566
*/
567567
public static void cursorLongToContentValues(Cursor cursor, String field, ContentValues values)
568568
{
@@ -574,7 +574,7 @@ public static void cursorLongToContentValues(Cursor cursor, String field, Conten
574574
*
575575
* @param cursor The cursor to read from
576576
* @param field The INTEGER field to read
577-
* @param values The {@link ContentValues} to put the value into
577+
* @param values The ContentValues to put the value into
578578
* @param key The key to store the value with in the map
579579
*/
580580
public static void cursorLongToContentValues(Cursor cursor, String field, ContentValues values,
@@ -593,7 +593,7 @@ public static void cursorLongToContentValues(Cursor cursor, String field, Conten
593593
*
594594
* @param cursor The cursor to read from
595595
* @param field The REAL field to read
596-
* @param values The {@link ContentValues} to put the value into
596+
* @param values The ContentValues to put the value into
597597
*/
598598
public static void cursorDoubleToCursorValues(Cursor cursor, String field, ContentValues values)
599599
{
@@ -605,7 +605,7 @@ public static void cursorDoubleToCursorValues(Cursor cursor, String field, Conte
605605
*
606606
* @param cursor The cursor to read from
607607
* @param field The REAL field to read
608-
* @param values The {@link ContentValues} to put the value into
608+
* @param values The ContentValues to put the value into
609609
* @param key The key to store the value with in the map
610610
*/
611611
public static void cursorDoubleToContentValues(Cursor cursor, String field,
@@ -622,7 +622,7 @@ public static void cursorDoubleToContentValues(Cursor cursor, String field,
622622
* Read the entire contents of a cursor row and store them in a ContentValues.
623623
*
624624
* @param cursor the cursor to read from.
625-
* @param values the {@link ContentValues} to put the row into.
625+
* @param values the ContentValues to put the row into.
626626
*/
627627
public static void cursorRowToContentValues(Cursor cursor, ContentValues values) {
628628
AbstractWindowedCursor awc =
@@ -718,7 +718,7 @@ public static String stringForQuery(SQLiteStatement prog, String[] selectionArgs
718718
*
719719
* @param cursor The cursor to read from
720720
* @param column The column to read
721-
* @param values The {@link ContentValues} to put the value into
721+
* @param values The ContentValues to put the value into
722722
*/
723723
public static void cursorStringToContentValuesIfPresent(Cursor cursor, ContentValues values,
724724
String column) {
@@ -734,7 +734,7 @@ public static void cursorStringToContentValuesIfPresent(Cursor cursor, ContentVa
734734
*
735735
* @param cursor The cursor to read from
736736
* @param column The column to read
737-
* @param values The {@link ContentValues} to put the value into
737+
* @param values The ContentValues to put the value into
738738
*/
739739
public static void cursorLongToContentValuesIfPresent(Cursor cursor, ContentValues values,
740740
String column) {
@@ -750,7 +750,7 @@ public static void cursorLongToContentValuesIfPresent(Cursor cursor, ContentValu
750750
*
751751
* @param cursor The cursor to read from
752752
* @param column The column to read
753-
* @param values The {@link ContentValues} to put the value into
753+
* @param values The ContentValues to put the value into
754754
*/
755755
public static void cursorShortToContentValuesIfPresent(Cursor cursor, ContentValues values,
756756
String column) {
@@ -766,7 +766,7 @@ public static void cursorShortToContentValuesIfPresent(Cursor cursor, ContentVal
766766
*
767767
* @param cursor The cursor to read from
768768
* @param column The column to read
769-
* @param values The {@link ContentValues} to put the value into
769+
* @param values The ContentValues to put the value into
770770
*/
771771
public static void cursorIntToContentValuesIfPresent(Cursor cursor, ContentValues values,
772772
String column) {
@@ -782,7 +782,7 @@ public static void cursorIntToContentValuesIfPresent(Cursor cursor, ContentValue
782782
*
783783
* @param cursor The cursor to read from
784784
* @param column The column to read
785-
* @param values The {@link ContentValues} to put the value into
785+
* @param values The ContentValues to put the value into
786786
*/
787787
public static void cursorFloatToContentValuesIfPresent(Cursor cursor, ContentValues values,
788788
String column) {
@@ -798,7 +798,7 @@ public static void cursorFloatToContentValuesIfPresent(Cursor cursor, ContentVal
798798
*
799799
* @param cursor The cursor to read from
800800
* @param column The column to read
801-
* @param values The {@link ContentValues} to put the value into
801+
* @param values The ContentValues to put the value into
802802
*/
803803
public static void cursorDoubleToContentValuesIfPresent(Cursor cursor, ContentValues values,
804804
String column) {

src/net/sqlcipher/database/SQLiteDatabase.java

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,25 +55,23 @@
5555
import android.util.Pair;
5656

5757
/**
58-
* Exposes methods to manage a SQLite database.
58+
* Exposes methods to manage a SQLCipher database.
5959
* <p>SQLiteDatabase has methods to create, delete, execute SQL commands, and
6060
* perform other common database management tasks.
61-
* <p>See the Notepad sample application in the SDK for an example of creating
62-
* and managing a database.
61+
* <p>A call to <code>loadLibs(…)</code> should occur before attempting to
62+
* create or open a database connection.
6363
* <p> Database names must be unique within an application, not across all
6464
* applications.
6565
*
66-
* <h3>Localized Collation - ORDER BY</h3>
67-
* <p>In addition to SQLite's default <code>BINARY</code> collator, Android supplies
68-
* two more, <code>LOCALIZED</code>, which changes with the system's current locale
69-
* if you wire it up correctly (XXX a link needed!), and <code>UNICODE</code>, which
70-
* is the Unicode Collation Algorithm and not tailored to the current locale.
7166
*/
7267
public class SQLiteDatabase extends SQLiteClosable {
7368
private static final String TAG = "Database";
7469
private static final int EVENT_DB_OPERATION = 52000;
7570
private static final int EVENT_DB_CORRUPT = 75004;
7671

72+
/**
73+
* The version number of the SQLCipher for Android Java client library.
74+
*/
7775
public static final String SQLCIPHER_ANDROID_VERSION = "3.4.0";
7876

7977
// Stores reference to all databases opened in the current process.
@@ -165,10 +163,16 @@ private static void loadICUData(Context context, File workingDir) {
165163
}
166164
}
167165

166+
/**
167+
* Loads the native SQLCipher library into the application process.
168+
*/
168169
public static synchronized void loadLibs (Context context) {
169170
loadLibs(context, context.getFilesDir());
170171
}
171172

173+
/**
174+
* Loads the native SQLCipher library into the application process.
175+
*/
172176
public static synchronized void loadLibs (Context context, File workingDir) {
173177
System.loadLibrary("sqlcipher");
174178

@@ -1018,16 +1022,14 @@ public static SQLiteDatabase openDatabase(String path, String password, CursorFa
10181022
* cursor when query is called, or null for default
10191023
* @param flags to control database access mode and other options
10201024
* @param hook to run on pre/post key events (may be null)
1021-
* @param errorHandler The {@link DatabaseErrorHandler} to be used when sqlite reports database
1022-
* corruption (or null for default).
10231025
*
10241026
* @return the newly opened database
10251027
*
10261028
* @throws SQLiteException if the database cannot be opened
10271029
* @throws IllegalArgumentException if the database path is null
10281030
*/
1029-
public static SQLiteDatabase openDatabase(String path, char[] password, CursorFactory factory, int flags, SQLiteDatabaseHook databaseHook) {
1030-
return openDatabase(path, password, factory, flags, databaseHook, new DefaultDatabaseErrorHandler());
1031+
public static SQLiteDatabase openDatabase(String path, char[] password, CursorFactory factory, int flags, SQLiteDatabaseHook hook) {
1032+
return openDatabase(path, password, factory, flags, hook, new DefaultDatabaseErrorHandler());
10311033
}
10321034

10331035
/**
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
package net.sqlcipher.database;
22

3+
/**
4+
* An interface to perform pre and post key operations against a database.
5+
*/
36
public interface SQLiteDatabaseHook {
7+
/**
8+
* Called immediately before opening the database.
9+
*/
410
void preKey(SQLiteDatabase database);
11+
/**
12+
* Called immediately after opening the database.
13+
*/
514
void postKey(SQLiteDatabase database);
615
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/**
2+
* Contains the SQLCipher database managements classes that an application would use to manage its own private database.
3+
*/
4+
package net.sqlcipher.database;

src/net/sqlcipher/package-info.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/**
2+
* Contains classes to explore data returned from a SQLCipher database.
3+
*/
4+
package net.sqlcipher;

0 commit comments

Comments
 (0)
0