projects
/
platform
/
upstream
/
glib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[kdbus] KDBUS_ITEM_PAYLOAD_OFF items are (once again) relative to msg header
[platform/upstream/glib.git]
/
gio
/
gdbusauthmechanism.c
diff --git
a/gio/gdbusauthmechanism.c
b/gio/gdbusauthmechanism.c
index
72eff74
..
d00fc4c
100644
(file)
--- a/
gio/gdbusauthmechanism.c
+++ b/
gio/gdbusauthmechanism.c
@@
-1,6
+1,6
@@
/* GDBus - GLib D-Bus Library
*
/* GDBus - GLib D-Bus Library
*
- * Copyright (C) 2008-20
09
Red Hat, Inc.
+ * Copyright (C) 2008-20
10
Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@
-13,23
+13,21
@@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#include "config.h"
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#include "config.h"
-#include <glib/gi18n.h>
-
#include "gdbusauthmechanism.h"
#include "gcredentials.h"
#include "gdbuserror.h"
#include "gioenumtypes.h"
#include "giostream.h"
#include "gdbusauthmechanism.h"
#include "gcredentials.h"
#include "gdbuserror.h"
#include "gioenumtypes.h"
#include "giostream.h"
+#include "glibintl.h"
+
/* ---------------------------------------------------------------------------------------------------- */
struct _GDBusAuthMechanismPrivate
/* ---------------------------------------------------------------------------------------------------- */
struct _GDBusAuthMechanismPrivate
@@
-45,7
+43,7
@@
enum
PROP_CREDENTIALS
};
PROP_CREDENTIALS
};
-G_DEFINE_ABSTRACT_TYPE
(GDBusAuthMechanism, _g_dbus_auth_mechanism, G_TYPE_OBJECT);
+G_DEFINE_ABSTRACT_TYPE
_WITH_PRIVATE (GDBusAuthMechanism, _g_dbus_auth_mechanism, G_TYPE_OBJECT)
/* ---------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------- */
@@
-59,8
+57,7
@@
_g_dbus_auth_mechanism_finalize (GObject *object)
if (mechanism->priv->credentials != NULL)
g_object_unref (mechanism->priv->credentials);
if (mechanism->priv->credentials != NULL)
g_object_unref (mechanism->priv->credentials);
- if (G_OBJECT_CLASS (_g_dbus_auth_mechanism_parent_class)->finalize != NULL)
- G_OBJECT_CLASS (_g_dbus_auth_mechanism_parent_class)->finalize (object);
+ G_OBJECT_CLASS (_g_dbus_auth_mechanism_parent_class)->finalize (object);
}
static void
}
static void
@@
-116,8
+113,6
@@
_g_dbus_auth_mechanism_class_init (GDBusAuthMechanismClass *klass)
{
GObjectClass *gobject_class;
{
GObjectClass *gobject_class;
- g_type_class_add_private (klass, sizeof (GDBusAuthMechanismPrivate));
-
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->get_property = _g_dbus_auth_mechanism_get_property;
gobject_class->set_property = _g_dbus_auth_mechanism_set_property;
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->get_property = _g_dbus_auth_mechanism_get_property;
gobject_class->set_property = _g_dbus_auth_mechanism_set_property;
@@
-126,8
+121,8
@@
_g_dbus_auth_mechanism_class_init (GDBusAuthMechanismClass *klass)
g_object_class_install_property (gobject_class,
PROP_STREAM,
g_param_spec_object ("stream",
g_object_class_install_property (gobject_class,
PROP_STREAM,
g_param_spec_object ("stream",
- _("IO Stream"),
- _("The underlying GIOStream used for I/O"),
+
P
_("IO Stream"),
+
P
_("The underlying GIOStream used for I/O"),
G_TYPE_IO_STREAM,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
G_TYPE_IO_STREAM,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
@@
-148,8
+143,8
@@
_g_dbus_auth_mechanism_class_init (GDBusAuthMechanismClass *klass)
g_object_class_install_property (gobject_class,
PROP_CREDENTIALS,
g_param_spec_object ("credentials",
g_object_class_install_property (gobject_class,
PROP_CREDENTIALS,
g_param_spec_object ("credentials",
- _("Credentials"),
- _("The credentials of the remote peer"),
+
P
_("Credentials"),
+
P
_("The credentials of the remote peer"),
G_TYPE_CREDENTIALS,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
G_TYPE_CREDENTIALS,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
@@
-162,10
+157,7
@@
_g_dbus_auth_mechanism_class_init (GDBusAuthMechanismClass *klass)
static void
_g_dbus_auth_mechanism_init (GDBusAuthMechanism *mechanism)
{
static void
_g_dbus_auth_mechanism_init (GDBusAuthMechanism *mechanism)
{
- /* not used for now */
- mechanism->priv = G_TYPE_INSTANCE_GET_PRIVATE (mechanism,
- G_TYPE_DBUS_AUTH_MECHANISM,
- GDBusAuthMechanismPrivate);
+ mechanism->priv = _g_dbus_auth_mechanism_get_instance_private (mechanism);
}
/* ---------------------------------------------------------------------------------------------------- */
}
/* ---------------------------------------------------------------------------------------------------- */
@@
-192,7
+184,7
@@
_g_dbus_auth_mechanism_get_name (GType mechanism_type)
const gchar *name;
GDBusAuthMechanismClass *klass;
const gchar *name;
GDBusAuthMechanismClass *klass;
- g_return_val_if_fail (g_type_is_a (mechanism_type,
G_TYPE_DBUS_AUTH_MECHANISM), NULL);
+ g_return_val_if_fail (g_type_is_a (mechanism_type, G_TYPE_DBUS_AUTH_MECHANISM), NULL);
klass = g_type_class_ref (mechanism_type);
g_assert (klass != NULL);
klass = g_type_class_ref (mechanism_type);
g_assert (klass != NULL);
@@
-208,7
+200,7
@@
_g_dbus_auth_mechanism_get_priority (GType mechanism_type)
gint priority;
GDBusAuthMechanismClass *klass;
gint priority;
GDBusAuthMechanismClass *klass;
- g_return_val_if_fail (g_type_is_a (mechanism_type,
G_TYPE_DBUS_AUTH_MECHANISM), 0);
+ g_return_val_if_fail (g_type_is_a (mechanism_type, G_TYPE_DBUS_AUTH_MECHANISM), 0);
klass = g_type_class_ref (mechanism_type);
g_assert (klass != NULL);
klass = g_type_class_ref (mechanism_type);
g_assert (klass != NULL);
@@
-228,10
+220,10
@@
_g_dbus_auth_mechanism_is_supported (GDBusAuthMechanism *mechanism)
}
gchar *
}
gchar *
-_g_dbus_auth_mechanism_encode_data (GDBusAuthMechanism
*mechanism,
- const gchar
*data,
- gsize
data_len,
- gsize
*out_data_len)
+_g_dbus_auth_mechanism_encode_data (GDBusAuthMechanism *mechanism,
+ const gchar *data,
+ gsize data_len,
+ gsize *out_data_len)
{
g_return_val_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism), NULL);
return G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->encode_data (mechanism, data, data_len, out_data_len);
{
g_return_val_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism), NULL);
return G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->encode_data (mechanism, data, data_len, out_data_len);
@@
-239,10
+231,10
@@
_g_dbus_auth_mechanism_encode_data (GDBusAuthMechanism *mechanism,
gchar *
gchar *
-_g_dbus_auth_mechanism_decode_data (GDBusAuthMechanism
*mechanism,
- const gchar
*data,
- gsize
data_len,
- gsize
*out_data_len)
+_g_dbus_auth_mechanism_decode_data (GDBusAuthMechanism *mechanism,
+ const gchar *data,
+ gsize data_len,
+ gsize *out_data_len)
{
g_return_val_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism), NULL);
return G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->decode_data (mechanism, data, data_len, out_data_len);
{
g_return_val_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism), NULL);
return G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->decode_data (mechanism, data, data_len, out_data_len);
@@
-251,47
+243,47
@@
_g_dbus_auth_mechanism_decode_data (GDBusAuthMechanism *mechanism,
/* ---------------------------------------------------------------------------------------------------- */
GDBusAuthMechanismState
/* ---------------------------------------------------------------------------------------------------- */
GDBusAuthMechanismState
-_g_dbus_auth_mechanism_server_get_state (GDBusAuthMechanism
*mechanism)
+_g_dbus_auth_mechanism_server_get_state (GDBusAuthMechanism *mechanism)
{
g_return_val_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism), G_DBUS_AUTH_MECHANISM_STATE_INVALID);
return G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->server_get_state (mechanism);
}
void
{
g_return_val_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism), G_DBUS_AUTH_MECHANISM_STATE_INVALID);
return G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->server_get_state (mechanism);
}
void
-_g_dbus_auth_mechanism_server_initiate (GDBusAuthMechanism
*mechanism,
- const gchar
*initial_response,
- gsize
initial_response_len)
+_g_dbus_auth_mechanism_server_initiate (GDBusAuthMechanism *mechanism,
+ const gchar *initial_response,
+ gsize initial_response_len)
{
g_return_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism));
G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->server_initiate (mechanism, initial_response, initial_response_len);
}
void
{
g_return_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism));
G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->server_initiate (mechanism, initial_response, initial_response_len);
}
void
-_g_dbus_auth_mechanism_server_data_receive (GDBusAuthMechanism
*mechanism,
- const gchar
*data,
- gsize
data_len)
+_g_dbus_auth_mechanism_server_data_receive (GDBusAuthMechanism *mechanism,
+ const gchar *data,
+ gsize data_len)
{
g_return_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism));
G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->server_data_receive (mechanism, data, data_len);
}
gchar *
{
g_return_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism));
G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->server_data_receive (mechanism, data, data_len);
}
gchar *
-_g_dbus_auth_mechanism_server_data_send (GDBusAuthMechanism
*mechanism,
- gsize
*out_data_len)
+_g_dbus_auth_mechanism_server_data_send (GDBusAuthMechanism *mechanism,
+ gsize *out_data_len)
{
g_return_val_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism), NULL);
return G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->server_data_send (mechanism, out_data_len);
}
gchar *
{
g_return_val_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism), NULL);
return G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->server_data_send (mechanism, out_data_len);
}
gchar *
-_g_dbus_auth_mechanism_server_get_reject_reason (GDBusAuthMechanism
*mechanism)
+_g_dbus_auth_mechanism_server_get_reject_reason (GDBusAuthMechanism *mechanism)
{
g_return_val_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism), NULL);
return G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->server_get_reject_reason (mechanism);
}
void
{
g_return_val_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism), NULL);
return G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->server_get_reject_reason (mechanism);
}
void
-_g_dbus_auth_mechanism_server_shutdown (GDBusAuthMechanism
*mechanism)
+_g_dbus_auth_mechanism_server_shutdown (GDBusAuthMechanism *mechanism)
{
g_return_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism));
G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->server_shutdown (mechanism);
{
g_return_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism));
G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->server_shutdown (mechanism);
@@
-300,15
+292,15
@@
_g_dbus_auth_mechanism_server_shutdown (GDBusAuthMechanism *mechanism)
/* ---------------------------------------------------------------------------------------------------- */
GDBusAuthMechanismState
/* ---------------------------------------------------------------------------------------------------- */
GDBusAuthMechanismState
-_g_dbus_auth_mechanism_client_get_state (GDBusAuthMechanism
*mechanism)
+_g_dbus_auth_mechanism_client_get_state (GDBusAuthMechanism *mechanism)
{
g_return_val_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism), G_DBUS_AUTH_MECHANISM_STATE_INVALID);
return G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->client_get_state (mechanism);
}
gchar *
{
g_return_val_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism), G_DBUS_AUTH_MECHANISM_STATE_INVALID);
return G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->client_get_state (mechanism);
}
gchar *
-_g_dbus_auth_mechanism_client_initiate (GDBusAuthMechanism
*mechanism,
- gsize
*out_initial_response_len)
+_g_dbus_auth_mechanism_client_initiate (GDBusAuthMechanism *mechanism,
+ gsize *out_initial_response_len)
{
g_return_val_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism), NULL);
return G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->client_initiate (mechanism,
{
g_return_val_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism), NULL);
return G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->client_initiate (mechanism,
@@
-316,24
+308,24
@@
_g_dbus_auth_mechanism_client_initiate (GDBusAuthMechanism *mechanism,
}
void
}
void
-_g_dbus_auth_mechanism_client_data_receive (GDBusAuthMechanism
*mechanism,
- const gchar
*data,
- gsize
data_len)
+_g_dbus_auth_mechanism_client_data_receive (GDBusAuthMechanism *mechanism,
+ const gchar *data,
+ gsize data_len)
{
g_return_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism));
G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->client_data_receive (mechanism, data, data_len);
}
gchar *
{
g_return_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism));
G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->client_data_receive (mechanism, data, data_len);
}
gchar *
-_g_dbus_auth_mechanism_client_data_send (GDBusAuthMechanism
*mechanism,
- gsize
*out_data_len)
+_g_dbus_auth_mechanism_client_data_send (GDBusAuthMechanism *mechanism,
+ gsize *out_data_len)
{
g_return_val_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism), NULL);
return G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->client_data_send (mechanism, out_data_len);
}
void
{
g_return_val_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism), NULL);
return G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->client_data_send (mechanism, out_data_len);
}
void
-_g_dbus_auth_mechanism_client_shutdown (GDBusAuthMechanism
*mechanism)
+_g_dbus_auth_mechanism_client_shutdown (GDBusAuthMechanism *mechanism)
{
g_return_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism));
G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->client_shutdown (mechanism);
{
g_return_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism));
G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->client_shutdown (mechanism);