Fri, 25 Apr 2025 01:08:11 -0500
SIP: A stubbed out SIP protocol plugin
Testing Done:
Launched in a devenv and verified that the protocol showed up with its icon in the add account dialog. Also called in the turtles.
Reviewed at https://reviews.imfreedom.org/r/3988/
|
43245
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * This library is free software; you can redistribute it and/or |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * modify it under the terms of the GNU Lesser General Public |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * License as published by the Free Software Foundation; either |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * version 2 of the License, or (at your option) any later version. |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * This library is distributed in the hope that it will be useful, |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * Lesser General Public License for more details. |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * You should have received a copy of the GNU Lesser General Public |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * License along with this library; if not, see <https://www.gnu.org/licenses/>. |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | */ |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | #include <glib/gi18n-lib.h> |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | #include "purplesipprotocol.h" |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | struct _PurpleSipProtocol { |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | PurpleProtocol parent; |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | }; |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | /****************************************************************************** |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | * GObject Implementation |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | *****************************************************************************/ |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | G_DEFINE_DYNAMIC_TYPE_EXTENDED( |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | PurpleSipProtocol, |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | purple_sip_protocol, |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | PURPLE_TYPE_PROTOCOL, |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | G_TYPE_FLAG_FINAL, |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | {}) |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | static void |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | purple_sip_protocol_init(G_GNUC_UNUSED PurpleSipProtocol *protocol) { |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | } |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | static void |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | purple_sip_protocol_class_finalize(G_GNUC_UNUSED PurpleSipProtocolClass *klass) { |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | } |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | static void |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | purple_sip_protocol_class_init(PurpleSipProtocolClass *klass) { |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | PurpleProtocolClass *protocol_class = PURPLE_PROTOCOL_CLASS(klass); |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | } |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | /****************************************************************************** |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | * Local Exports |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | *****************************************************************************/ |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | void |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | purple_sip_protocol_register(GPluginNativePlugin *plugin) { |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | purple_sip_protocol_register_type(G_TYPE_MODULE(plugin)); |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | } |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
57 | |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | PurpleProtocol * |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
59 | purple_sip_protocol_new(void) { |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
60 | return g_object_new( |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | PURPLE_SIP_TYPE_PROTOCOL, |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
62 | "id", "prpl-sip", |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
63 | "name", "SIP", |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
64 | "description", _("Session Initiation Protocol which is used in " |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
65 | "internet telephony."), |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
66 | "icon-name", "im-purple-sip", |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
67 | "icon-resource-path", "/im/pidgin/libpurple/protocols/sip/icons", |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
68 | "options", OPT_PROTO_NO_PASSWORD, |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
69 | NULL); |
|
b83427aa2c38
SIP: A stubbed out SIP protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
70 | } |