- A recent libxml2 changed its handler function to take a `const` pointer. It's
safe for us to have it, and them not, but the opposite way causes an implicit
cast warning.
- In relatively new GLib (many years now), `g_object_ref` casts its output to
match its input. This means we should not be casting to `G_OBJECT`, as that
is not the type it expects, and would translate to the output being `GObject`
instead of the original type.
This fixes the build in Fedora 40, which changes several incompatible pointer
conversion warnings into errors.
This patch is partially from the Fedora maintainer @yarda, with some corrections by me (to the `g_object_ref` portions.)
Testing Done:
Compiled in a Rawhide environment with this patch applied.
Bugs closed: PIDGIN-17850
Reviewed at https://reviews.imfreedom.org/r/2944/
/**
* @file connection.h Connection API
* @ingroup core
* @see @ref connection-signals
*/
/* purple
*
* Purple is the legal property of its developers, whose names are too numerous
* to list here. Please refer to the COPYRIGHT file distributed with this
* source distribution.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#ifndef _PURPLE_CONNECTION_H_
#define _PURPLE_CONNECTION_H_
/** @copydoc _PurpleConnection */
typedefstruct_PurpleConnectionPurpleConnection;
/**
* Flags to change behavior of the client for a given connection.
*/
typedefenum
{
PURPLE_CONNECTION_HTML=0x0001,/**< Connection sends/receives in 'HTML'. */
PURPLE_CONNECTION_NO_BGCOLOR=0x0002,/**< Connection does not send/receive
background colors. */
PURPLE_CONNECTION_AUTO_RESP=0x0004,/**< Send auto responses when away. */
PURPLE_CONNECTION_FORMATTING_WBFO=0x0008,/**< The text buffer must be formatted as a whole */
PURPLE_CONNECTION_NO_NEWLINES=0x0010,/**< No new lines are allowed in outgoing messages */
PURPLE_CONNECTION_NO_FONTSIZE=0x0020,/**< Connection does not send/receive font sizes */
PURPLE_CONNECTION_NO_URLDESC=0x0040,/**< Connection does not support descriptions with links */
PURPLE_CONNECTION_NO_IMAGES=0x0080,/**< Connection does not support sending of images */
PURPLE_CONNECTION_ALLOW_CUSTOM_SMILEY=0x0100,/**< Connection supports sending and receiving custom smileys */