annotate OrthancFramework/Sources/SQLite/SQLiteTypes.h @ 4829:c847b0dfd255

added missing copyright headers
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 25 Nov 2021 18:53:08 +0100
parents d25f4c0fa160
children 7053502fbf97
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2302
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 *
3063
fa5ad4368fe3 new mail address
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2303
diff changeset
4 * Copyright (C) 2012-2016 Sebastien Jodogne <s.jodogne@orthanc-labs.com>,
2302
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 * Medical Physics Department, CHU of Liege, Belgium
4829
c847b0dfd255 added missing copyright headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
6 * Copyright (C) 2017-2021 Osimis S.A., Belgium
2302
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 *
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * Redistribution and use in source and binary forms, with or without
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * modification, are permitted provided that the following conditions are
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * met:
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * * Redistributions of source code must retain the above copyright
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * notice, this list of conditions and the following disclaimer.
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * * Redistributions in binary form must reproduce the above
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * copyright notice, this list of conditions and the following disclaimer
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * in the documentation and/or other materials provided with the
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * distribution.
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * * Neither the name of the CHU of Liege, nor the names of its
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * contributors may be used to endorse or promote products derived
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 * from this software without specific prior written permission.
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 *
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 **/
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 #pragma once
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 struct sqlite3;
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 struct sqlite3_context;
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 struct sqlite3_stmt;
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 #if !defined(ORTHANC_SQLITE_VERSION)
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 #error Please define macro ORTHANC_SQLITE_VERSION
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 #endif
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45
2303
692527245856 fix for SQLite >= 3.19.0
jodogne
parents: 2302
diff changeset
46
692527245856 fix for SQLite >= 3.19.0
jodogne
parents: 2302
diff changeset
47 /**
692527245856 fix for SQLite >= 3.19.0
jodogne
parents: 2302
diff changeset
48 * "sqlite3_value" is defined as:
692527245856 fix for SQLite >= 3.19.0
jodogne
parents: 2302
diff changeset
49 * - "typedef struct Mem sqlite3_value;" up to SQLite <= 3.18.2
692527245856 fix for SQLite >= 3.19.0
jodogne
parents: 2302
diff changeset
50 * - "typedef struct sqlite3_value sqlite3_value;" since SQLite >= 3.19.0.
692527245856 fix for SQLite >= 3.19.0
jodogne
parents: 2302
diff changeset
51 * We create our own copy of this typedef to get around this API incompatibility.
692527245856 fix for SQLite >= 3.19.0
jodogne
parents: 2302
diff changeset
52 * https://github.com/mackyle/sqlite/commit/db1d90df06a78264775a14d22c3361eb5b42be17
692527245856 fix for SQLite >= 3.19.0
jodogne
parents: 2302
diff changeset
53 **/
692527245856 fix for SQLite >= 3.19.0
jodogne
parents: 2302
diff changeset
54
2302
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 #if ORTHANC_SQLITE_VERSION < 3019000
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 struct Mem;
2303
692527245856 fix for SQLite >= 3.19.0
jodogne
parents: 2302
diff changeset
57 #else
692527245856 fix for SQLite >= 3.19.0
jodogne
parents: 2302
diff changeset
58 struct sqlite3_value;
2302
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 #endif
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 namespace Orthanc
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 {
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 namespace SQLite
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 {
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 namespace Internals
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 {
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 #if ORTHANC_SQLITE_VERSION < 3019000
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 typedef struct ::Mem SQLiteValue;
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 #else
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 typedef struct ::sqlite3_value SQLiteValue;
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 #endif
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 }
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 }
f31dfb131dee fix backward compatibility with SQLite < 3.19.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 }