Thu, 22 Feb 2024 06:03:16 -0600
Add a favorite property to PurpleContactInfo
This will be used in the future for toggling whether or not contacts are
favorited or starred.
Testing Done:
Ran the unit tests under valgrind.
Reviewed at https://reviews.imfreedom.org/r/2965/
|
42594
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
41217
diff
changeset
|
1 | /* |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
41217
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
41217
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
33368
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
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:
41217
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:
41217
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
33368
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
7 | * source distribution. |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.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:
41217
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:
41217
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:
41217
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:
41217
diff
changeset
|
12 | * any later version. |
|
33368
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.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:
41217
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:
41217
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:
41217
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:
41217
diff
changeset
|
17 | * more details. |
|
33368
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.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:
41217
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:
41217
diff
changeset
|
20 | * this library; if not, see <https://www.gnu.org/licenses/>. |
|
33368
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
21 | */ |
|
35487
494f09f7f331
Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents:
35460
diff
changeset
|
22 | |
|
41208
48baac6c8989
Remove unnecessary gtk-doc comments and move them where possible from libpurple/[d-m]*.h
Gary Kramlich <grim@reaperworld.com>
parents:
41175
diff
changeset
|
23 | /* |
|
48baac6c8989
Remove unnecessary gtk-doc comments and move them where possible from libpurple/[d-m]*.h
Gary Kramlich <grim@reaperworld.com>
parents:
41175
diff
changeset
|
24 | * This file is internal to libpurple. Do not use! |
|
48baac6c8989
Remove unnecessary gtk-doc comments and move them where possible from libpurple/[d-m]*.h
Gary Kramlich <grim@reaperworld.com>
parents:
41175
diff
changeset
|
25 | * |
|
48baac6c8989
Remove unnecessary gtk-doc comments and move them where possible from libpurple/[d-m]*.h
Gary Kramlich <grim@reaperworld.com>
parents:
41175
diff
changeset
|
26 | * Also, any public API should not depend on this file. |
|
48baac6c8989
Remove unnecessary gtk-doc comments and move them where possible from libpurple/[d-m]*.h
Gary Kramlich <grim@reaperworld.com>
parents:
41175
diff
changeset
|
27 | */ |
|
48baac6c8989
Remove unnecessary gtk-doc comments and move them where possible from libpurple/[d-m]*.h
Gary Kramlich <grim@reaperworld.com>
parents:
41175
diff
changeset
|
28 | |
|
39659
e4dfb99b0cef
Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39532
diff
changeset
|
29 | #ifndef PURPLE_GLIBCOMPAT_H |
|
e4dfb99b0cef
Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39532
diff
changeset
|
30 | #define PURPLE_GLIBCOMPAT_H |
|
33368
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
31 | |
|
35306
abc36dad1363
Include glib.h before messing with any defines
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35299
diff
changeset
|
32 | #include <glib.h> |
|
abc36dad1363
Include glib.h before messing with any defines
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35299
diff
changeset
|
33 | |
|
35872
4cd48601e1d1
cross-win32: better fix for g_stat bug
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35867
diff
changeset
|
34 | /* glib's definition of g_stat+GStatBuf seems to be broken on mingw64-w32 (and |
|
4cd48601e1d1
cross-win32: better fix for g_stat bug
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35867
diff
changeset
|
35 | * possibly other 32-bit windows), so instead of relying on it, |
|
4cd48601e1d1
cross-win32: better fix for g_stat bug
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35867
diff
changeset
|
36 | * we'll define our own. |
|
35867
b6f09494adda
cross-win32: hide glib bug of mismatched g_stat and GStatBuf for win32 (not win64)
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35804
diff
changeset
|
37 | */ |
|
b6f09494adda
cross-win32: hide glib bug of mismatched g_stat and GStatBuf for win32 (not win64)
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35804
diff
changeset
|
38 | #if defined(_WIN32) && !defined(_MSC_VER) && !defined(_WIN64) |
|
b6f09494adda
cross-win32: hide glib bug of mismatched g_stat and GStatBuf for win32 (not win64)
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35804
diff
changeset
|
39 | # include <glib/gstdio.h> |
|
35872
4cd48601e1d1
cross-win32: better fix for g_stat bug
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35867
diff
changeset
|
40 | typedef struct _stat GStatBufW32; |
|
4cd48601e1d1
cross-win32: better fix for g_stat bug
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35867
diff
changeset
|
41 | static inline int |
|
4cd48601e1d1
cross-win32: better fix for g_stat bug
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35867
diff
changeset
|
42 | purple_g_stat(const gchar *filename, GStatBufW32 *buf) |
|
4cd48601e1d1
cross-win32: better fix for g_stat bug
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35867
diff
changeset
|
43 | { |
|
4cd48601e1d1
cross-win32: better fix for g_stat bug
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35867
diff
changeset
|
44 | return g_stat(filename, (GStatBuf*)buf); |
|
4cd48601e1d1
cross-win32: better fix for g_stat bug
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35867
diff
changeset
|
45 | } |
|
4cd48601e1d1
cross-win32: better fix for g_stat bug
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35867
diff
changeset
|
46 | # define GStatBuf GStatBufW32 |
|
4cd48601e1d1
cross-win32: better fix for g_stat bug
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35867
diff
changeset
|
47 | # define g_stat purple_g_stat |
|
35867
b6f09494adda
cross-win32: hide glib bug of mismatched g_stat and GStatBuf for win32 (not win64)
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35804
diff
changeset
|
48 | #endif |
|
b6f09494adda
cross-win32: hide glib bug of mismatched g_stat and GStatBuf for win32 (not win64)
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35804
diff
changeset
|
49 | |
|
39659
e4dfb99b0cef
Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39532
diff
changeset
|
50 | #endif /* PURPLE_GLIBCOMPAT_H */ |