Thu, 30 Dec 2021 20:36:44 -0600
Create a demo protocol plugin that right now just adds contacts and statuses.
The idea of this protocol plugin is to make sure we have data that's suitable
for screen shots and that can easily help us when developing/testing.
Fixes PIDGIN-17558
Testing Done:
Created an account with the protocol plugin and verified that the contact list had the contacts with their correct statuses.
However, there does appear to be a unrelated bug with contact aliases.
Bugs closed: PIDGIN-17558
Reviewed at https://reviews.imfreedom.org/r/1188/
|
41224
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * This library is free software; you can redistribute it and/or |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * modify it under the terms of the GNU Lesser General Public |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * License as published by the Free Software Foundation; either |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * version 2 of the License, or (at your option) any later version. |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * This library is distributed in the hope that it will be useful, |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * Lesser General Public License for more details. |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * You should have received a copy of the GNU Lesser General Public |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * License along with this library; if not, see <https://www.gnu.org/licenses/>. |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | */ |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | #ifndef PURPLE_DEMO_PROTOCOL_H |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | #define PURPLE_DEMO_PROTOCOL_H |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | #include <glib.h> |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #include <glib-object.h> |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | #include <gplugin-native.h> |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | #include <purple.h> |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | G_BEGIN_DECLS |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | #define PURPLE_DEMO_TYPE_PROTOCOL (purple_demo_protocol_get_type()) |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | G_DECLARE_FINAL_TYPE(PurpleDemoProtocol, purple_demo_protocol, PURPLE_DEMO, |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | PROTOCOL, PurpleProtocol) |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | G_GNUC_INTERNAL void purple_demo_protocol_register(GPluginNativePlugin *plugin); |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | G_GNUC_INTERNAL PurpleProtocol *purple_demo_protocol_new(void); |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | G_END_DECLS |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | |
|
32a7796a2a36
Create a demo protocol plugin that right now just adds contacts and statuses.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | #endif /* PURPLE_DEMO_PROTOCOL_H */ |