[mono.data.sqlite] Using sqlite_close_v2 when available
[mono.git] / mcs / class / Mono.Data.Sqlite / Mono.Data.Sqlite_2.0 / UnsafeNativeMethods.cs
index bb01c8a10915e75212be5b4d04f5d1ae06cf4d6b..4b440b951ed56cd07ede1b2c0f6aa3a3ebc21615 100644 (file)
@@ -30,6 +30,8 @@ namespace Mono.Data.Sqlite
     private const string SQLITE_DLL = "SQLite.Interop.DLL";\r
 #endif // USE_INTEROP_DLL\r
 \r
+#elif MONOTOUCH\r
+       private const string SQLITE_DLL = "/usr/lib/libsqlite3.dylib";\r
 #else\r
     private const string SQLITE_DLL = "sqlite3";\r
 #endif\r
@@ -133,6 +135,13 @@ namespace Mono.Data.Sqlite
     [DllImport(SQLITE_DLL)]\r
 #endif\r
     internal static extern int sqlite3_close(IntPtr db);\r
+               \r
+#if !PLATFORM_COMPACTFRAMEWORK\r
+    [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)]\r
+#else\r
+    [DllImport(SQLITE_DLL)]\r
+#endif\r
+    internal static extern int sqlite3_close_v2(IntPtr db);\r
 \r
 #if !PLATFORM_COMPACTFRAMEWORK\r
     [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)]\r
@@ -141,6 +150,13 @@ namespace Mono.Data.Sqlite
 #endif\r
     internal static extern int sqlite3_create_function(IntPtr db, byte[] strName, int nArgs, int nType, IntPtr pvUser, SQLiteCallback func, SQLiteCallback fstep, SQLiteFinalCallback ffinal);\r
 \r
+#if !PLATFORM_COMPACTFRAMEWORK\r
+               [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)]\r
+#else\r
+               [DllImport(SQLITE_DLL)]\r
+#endif\r
+               internal static extern int sqlite3_create_function_v2(IntPtr db, byte[] strName, int nArgs, int nType, IntPtr pvUser, SQLiteCallback func, SQLiteCallback fstep, SQLiteFinalCallback ffinal, SQLiteFinalCallback fdestroy);\r
+\r
 #if !PLATFORM_COMPACTFRAMEWORK\r
     [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)]\r
 #else\r
@@ -693,6 +709,20 @@ namespace Mono.Data.Sqlite
 #endif\r
     internal static extern int sqlite3_config (SQLiteConfig config);\r
 \r
+#if !PLATFORM_COMPACTFRAMEWORK\r
+               [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)]\r
+#else\r
+               [DllImport(SQLITE_DLL)]\r
+#endif\r
+               internal static extern IntPtr sqlite3_user_data (IntPtr context);\r
+\r
+#if !PLATFORM_COMPACTFRAMEWORK\r
+    [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)]\r
+#else\r
+    [DllImport(SQLITE_DLL)]\r
+#endif\r
+    internal static extern int sqlite3_free (IntPtr ptr);\r
+\r
     #endregion\r
   }\r
 \r