libpurple/purpleversion.c

Mon, 04 Nov 2024 23:42:22 -0600

author
Gary Kramlich <grim@reaperworld.com>
date
Mon, 04 Nov 2024 23:42:22 -0600
changeset 43054
ccd071e7cd83
parent 42594
eddde70cedd8
permissions
-rw-r--r--

Add a boolean setting for toggling developer mode

This just gives a simple API method for checking the setting.

Testing Done:
Added a temporary `g_warning` to the end of `Pidgin.Application.startup` to verify the setting after modifying the file by hand.

Bugs closed: PIDGIN-17993

Reviewed at https://reviews.imfreedom.org/r/3647/

42376
c6aa66fec38a Prefix version.h with purple
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41682
diff changeset
1 /*
c6aa66fec38a Prefix version.h with purple
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41682
diff changeset
2 * Purple - Internet Messaging Library
c6aa66fec38a Prefix version.h with purple
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41682
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
c6aa66fec38a Prefix version.h with purple
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41682
diff changeset
4 *
c6aa66fec38a Prefix version.h with purple
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41682
diff changeset
5 * Purple is the legal property of its developers, whose names are too numerous
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42379
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
16651
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
7 * source distribution.
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
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: 42379
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: 42379
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: 42379
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: 42379
diff changeset
12 * any later version.
16651
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
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: 42379
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: 42379
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: 42379
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: 42379
diff changeset
17 * more details.
16651
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
18 *
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42379
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: 42379
diff changeset
20 * this library; if not, see <https://www.gnu.org/licenses/>.
16651
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
21 */
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
22
42379
7b0652cf8b35 Fix some includes that were missed in the version file rename
Gary Kramlich <grim@reaperworld.com>
parents: 42376
diff changeset
23 #include "purpleversion.h"
7b0652cf8b35 Fix some includes that were missed in the version file rename
Gary Kramlich <grim@reaperworld.com>
parents: 42376
diff changeset
24 #include "purpleversionconsts.h"
16651
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
25
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
26 const guint purple_major_version = PURPLE_MAJOR_VERSION;
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
27 const guint purple_minor_version = PURPLE_MINOR_VERSION;
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
28 const guint purple_micro_version = PURPLE_MICRO_VERSION;
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
29
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
30 const char *purple_version_check(guint required_major, guint required_minor, guint required_micro)
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
31 {
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
32 if (required_major > PURPLE_MAJOR_VERSION)
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
33 return "libpurple version too old (major mismatch)";
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
34 if (required_major < PURPLE_MAJOR_VERSION)
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
35 return "libpurple version too new (major mismatch)";
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
36 if (required_minor > PURPLE_MINOR_VERSION)
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
37 return "libpurple version too old (minor mismatch)";
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
38 if ((required_minor == PURPLE_MINOR_VERSION) && (required_micro > PURPLE_MICRO_VERSION))
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
39 return "libpurple version too old (micro mismatch)";
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
40 return NULL;
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
41 }

mercurial