protocols/demo/purpledemoconnection.h

Sun, 10 Aug 2025 23:44:08 +0800

author
Gong Zhile <gongzl@stu.hebust.edu.cn>
date
Sun, 10 Aug 2025 23:44:08 +0800
branch
purple_conversation_find_message_by_id
changeset 43309
099e1dfb856b
parent 43243
2764eb6266aa
permissions
-rw-r--r--

Add Purple.Conversation.find_message_by_id

The method was added so that a protocol or plugin could easily lookup
for the reference for a message. This will be especially useful when a
protocol received a quoted message but only with an id.

41999
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * Purple - Internet Messaging Library
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 * This library is free software; you can redistribute it and/or
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 * modify it under the terms of the GNU Lesser General Public
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * License as published by the Free Software Foundation; either
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 * version 2 of the License, or (at your option) any later version.
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 *
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * This library is distributed in the hope that it will be useful,
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 * Lesser General Public License for more details.
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 *
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * You should have received a copy of the GNU Lesser General Public
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * License along with this library; if not, see <https://www.gnu.org/licenses/>.
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 */
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 #ifndef PURPLE_DEMO_CONNECTION_H
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 #define PURPLE_DEMO_CONNECTION_H
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22 #include <glib.h>
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 #include <purple.h>
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26 G_BEGIN_DECLS
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 #define PURPLE_DEMO_TYPE_CONNECTION (purple_demo_connection_get_type())
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29 G_DECLARE_FINAL_TYPE(PurpleDemoConnection, purple_demo_connection, PURPLE_DEMO,
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 CONNECTION, PurpleConnection)
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 G_GNUC_INTERNAL void purple_demo_connection_register(GPluginNativePlugin *plugin);
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33
43243
2764eb6266aa Demo: fix some unbalanced G_BEGIN_DECLS
Gary Kramlich <grim@reaperworld.com>
parents: 42652
diff changeset
34 G_END_DECLS
41999
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35
91af085cf35b Update the demo protocol plugin to use the new create_connection virtual method
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 #endif /* PURPLE_DEMO_CONNECTION_H */

mercurial