mozglue/android/SQLiteBridge.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 #ifndef SQLiteBridge_h
michael@0 6 #define SQLiteBridge_h
michael@0 7
michael@0 8 #include "sqlite3.h"
michael@0 9
michael@0 10 void setup_sqlite_functions(void *sqlite_handle);
michael@0 11
michael@0 12 #define SQLITE_WRAPPER(name, return_type, args...) \
michael@0 13 typedef return_type (*name ## _t)(args); \
michael@0 14 extern name ## _t f_ ## name;
michael@0 15
michael@0 16 SQLITE_WRAPPER(sqlite3_open, int, const char*, sqlite3**)
michael@0 17 SQLITE_WRAPPER(sqlite3_errmsg, const char*, sqlite3*)
michael@0 18 SQLITE_WRAPPER(sqlite3_prepare_v2, int, sqlite3*, const char*, int, sqlite3_stmt**, const char**)
michael@0 19 SQLITE_WRAPPER(sqlite3_bind_parameter_count, int, sqlite3_stmt*)
michael@0 20 SQLITE_WRAPPER(sqlite3_bind_text, int, sqlite3_stmt*, int, const char*, int, void(*)(void*))
michael@0 21 SQLITE_WRAPPER(sqlite3_step, int, sqlite3_stmt*)
michael@0 22 SQLITE_WRAPPER(sqlite3_column_count, int, sqlite3_stmt*)
michael@0 23 SQLITE_WRAPPER(sqlite3_finalize, int, sqlite3_stmt*)
michael@0 24 SQLITE_WRAPPER(sqlite3_close, int, sqlite3*)
michael@0 25 SQLITE_WRAPPER(sqlite3_column_name, const char*, sqlite3_stmt*, int)
michael@0 26 SQLITE_WRAPPER(sqlite3_column_type, int, sqlite3_stmt*, int)
michael@0 27 SQLITE_WRAPPER(sqlite3_column_blob, const void*, sqlite3_stmt*, int)
michael@0 28 SQLITE_WRAPPER(sqlite3_column_bytes, int, sqlite3_stmt*, int)
michael@0 29 SQLITE_WRAPPER(sqlite3_column_text, const unsigned char*, sqlite3_stmt*, int)
michael@0 30 SQLITE_WRAPPER(sqlite3_changes, int, sqlite3*)
michael@0 31 SQLITE_WRAPPER(sqlite3_last_insert_rowid, sqlite3_int64, sqlite3*)
michael@0 32
michael@0 33 #endif /* SQLiteBridge_h */

mercurial