You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/11/13 08:42:52 UTC
svn commit: r835767 - in /commons/sandbox/runtime/trunk/src/main:
java/org/apache/commons/runtime/util/SQLite.java
native/include/acr_sqlite.h native/modules/util/sqlite/sqliteapi.c
Author: mturk
Date: Fri Nov 13 07:42:52 2009
New Revision: 835767
URL: http://svn.apache.org/viewvc?rev=835767&view=rev
Log:
Add sqlite api stubs
Added:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/SQLite.java (with props)
commons/sandbox/runtime/trunk/src/main/native/include/acr_sqlite.h (with props)
Modified:
commons/sandbox/runtime/trunk/src/main/native/modules/util/sqlite/sqliteapi.c
Added: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/SQLite.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/SQLite.java?rev=835767&view=auto
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/SQLite.java (added)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/SQLite.java Fri Nov 13 07:42:52 2009
@@ -0,0 +1,41 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.runtime.util;
+
+/**
+ * SQLite module
+ */
+public final class SQLite
+{
+ private static native boolean has0();
+
+ private SQLite()
+ {
+ // No instance.
+ }
+
+ /**
+ * True if the SQLite module is compiled in and supported.
+ * <p>
+ * If the <em>Apache Commons Runtime</em>
+ * has compiled in {@code SQLite} support the value of this
+ * field is {@code true}.
+ * </p>
+ */
+ public static final boolean SUPPORTED = has0();
+
+}
Propchange: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/SQLite.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/sandbox/runtime/trunk/src/main/native/include/acr_sqlite.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr_sqlite.h?rev=835767&view=auto
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/acr_sqlite.h (added)
+++ commons/sandbox/runtime/trunk/src/main/native/include/acr_sqlite.h Fri Nov 13 07:42:52 2009
@@ -0,0 +1,20 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ACR_SQLITE_H
+#define ACR_SQLITE_H
+
+#endif /* ACR_SQLITE */
Propchange: commons/sandbox/runtime/trunk/src/main/native/include/acr_sqlite.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: commons/sandbox/runtime/trunk/src/main/native/modules/util/sqlite/sqliteapi.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/modules/util/sqlite/sqliteapi.c?rev=835767&r1=835766&r2=835767&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/modules/util/sqlite/sqliteapi.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/modules/util/sqlite/sqliteapi.c Fri Nov 13 07:42:52 2009
@@ -24,7 +24,9 @@
#include "acr_clazz.h"
#include "acr_vm.h"
-#include "sqlite3.h"
+#include "acr_sqlite.h"
+#include <sqlite3.h>
+#include <sqlite3ext.h>
ACR_UTIL_EXPORT_DECLARE(jint, SQLite, version0)(ACR_JNISTDARGS)
{
@@ -37,4 +39,3 @@
UNREFERENCED_O;
return CSTR_TO_JSTRING(SQLITE_VERSION);
}
-