libpurple/purplesqlitehistoryadapter.h

Sat, 09 Aug 2025 17:37:27 +0800

author
Gong Zhile <gongzl@stu.hebust.edu.cn>
date
Sat, 09 Aug 2025 17:37:27 +0800
branch
bird-header-fix
changeset 43304
2599d35e9750
parent 43176
04f562dc0ff2
permissions
-rw-r--r--

Fix the birb header path

The birb header referred would only work with birb provided by wrap casuing
build to fail because of system-installed birb dependency. The commit points
it to the correct path <birb.h>.

See: https://keep.imfreedom.org/birb/birb/file/5bf00c7d7f80/birb/meson.build#l77

41090
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
1 /*
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
2 * Purple - Internet Messaging Library
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
4 *
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
5 * Purple is the legal property of its developers, whose names are too numerous
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
7 * source distribution.
41090
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
8 *
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
9 * This library is free software; you can redistribute it and/or modify it
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
10 * under the terms of the GNU General Public License as published by the Free
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
11 * Software Foundation; either version 2 of the License, or (at your option)
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
12 * any later version.
41090
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
13 *
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
14 * This library is distributed in the hope that it will be useful, but WITHOUT
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
17 * more details.
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
18 *
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
19 * You should have received a copy of the GNU General Public License along with
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42387
diff changeset
20 * this library; if not, see <https://www.gnu.org/licenses/>.
41090
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
21 */
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
22
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
23 #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION)
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
24 # error "only <purple.h> may be included directly"
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
25 #endif
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
26
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
27 #ifndef PURPLE_SQLITE_HISTORY_ADAPTER_H
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
28 #define PURPLE_SQLITE_HISTORY_ADAPTER_H
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
29
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
30 #include <glib.h>
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
31 #include <glib-object.h>
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
32
42340
807dda9de806 Fix more internal includes that were using just angle brackets
Gary Kramlich <grim@reaperworld.com>
parents: 41205
diff changeset
33 #include "purplehistoryadapter.h"
807dda9de806 Fix more internal includes that were using just angle brackets
Gary Kramlich <grim@reaperworld.com>
parents: 41205
diff changeset
34 #include "purplemessage.h"
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42340
diff changeset
35 #include "purpleversion.h"
41090
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
36
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
37 G_BEGIN_DECLS
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
38
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
39 /**
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
40 * PurpleSqliteHistoryAdapter:
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
41 *
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
42 * #PurpleSqliteHistoryAdapter is a class that allows interfacing with an
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
43 * SQLite database to store history. It is a subclass of @PurpleHistoryAdapter.
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
44 *
42616
a7144db5570a Remove the micro version from since tags for libpurple part 5
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
45 * Since: 3.0
41090
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
46 */
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
47
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
48 #define PURPLE_TYPE_SQLITE_HISTORY_ADAPTER (purple_sqlite_history_adapter_get_type())
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42340
diff changeset
49
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42340
diff changeset
50 PURPLE_AVAILABLE_IN_3_0
41090
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
51 G_DECLARE_FINAL_TYPE(PurpleSqliteHistoryAdapter, purple_sqlite_history_adapter,
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
52 PURPLE, SQLITE_HISTORY_ADAPTER, PurpleHistoryAdapter)
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
53
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
54 /**
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
55 * purple_sqlite_history_adapter_new:
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
56 * @filename: The filename of the sqlite database.
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
57 *
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
58 * Creates a new #PurpleHistoryAdapter.
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
59 *
43176
04f562dc0ff2 Annotate libpurple constructors that return base types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42616
diff changeset
60 * Returns: (transfer full) (type PurpleSqliteHistoryAdapter): The new history
04f562dc0ff2 Annotate libpurple constructors that return base types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42616
diff changeset
61 * adapter.
41090
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
62 *
42616
a7144db5570a Remove the micro version from since tags for libpurple part 5
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
63 * Since: 3.0
41090
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
64 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42340
diff changeset
65 PURPLE_AVAILABLE_IN_3_0
41090
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
66 PurpleHistoryAdapter *purple_sqlite_history_adapter_new(const gchar *filename);
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
67
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
68 /**
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
69 * purple_sqlite_history_adapter_get_filename
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
70 * @adapter: The #PurpleSqliteHistoryAdapter instance
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
71 *
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
72 * Gets the filename of the sqlite database.
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
73 *
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
74 * Returns: The filename that the @adapter reads and writes to
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
75 *
42616
a7144db5570a Remove the micro version from since tags for libpurple part 5
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
76 * Since: 3.0
41090
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
77 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42340
diff changeset
78 PURPLE_AVAILABLE_IN_3_0
41090
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
79 const gchar *purple_sqlite_history_adapter_get_filename(PurpleSqliteHistoryAdapter *adapter);
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
80
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
81 G_END_DECLS
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
82
741992355ead GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
diff changeset
83 #endif /* PURPLE_SQLITE_HISTORY_ADAPTER */

mercurial