1 /* GIO - GLib Input, Output and Streaming Library
3 * Copyright (C) 2010 Red Hat, Inc.
4 * Copyright (C) 2009 Codethink Limited
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General
17 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
19 * Authors: David Zeuthen <davidz@redhat.com>
22 #ifndef __G_UNIX_CREDENTIALS_MESSAGE_H__
23 #define __G_UNIX_CREDENTIALS_MESSAGE_H__
29 #define G_TYPE_UNIX_CREDENTIALS_MESSAGE (g_unix_credentials_message_get_type ())
30 #define G_UNIX_CREDENTIALS_MESSAGE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNIX_CREDENTIALS_MESSAGE, GUnixCredentialsMessage))
31 #define G_UNIX_CREDENTIALS_MESSAGE_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), G_TYPE_UNIX_CREDENTIALS_MESSAGE, GUnixCredentialsMessageClass))
32 #define G_IS_UNIX_CREDENTIALS_MESSAGE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_CREDENTIALS_MESSAGE))
33 #define G_IS_UNIX_CREDENTIALS_MESSAGE_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), G_TYPE_UNIX_CREDENTIALS_MESSAGE))
34 #define G_UNIX_CREDENTIALS_MESSAGE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_UNIX_CREDENTIALS_MESSAGE, GUnixCredentialsMessageClass))
36 typedef struct _GUnixCredentialsMessagePrivate GUnixCredentialsMessagePrivate
;
37 typedef struct _GUnixCredentialsMessageClass GUnixCredentialsMessageClass
;
39 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixCredentialsMessage
, g_object_unref
)
42 * GUnixCredentialsMessageClass:
44 * Class structure for #GUnixCredentialsMessage.
48 struct _GUnixCredentialsMessageClass
50 GSocketControlMessageClass parent_class
;
54 /* Padding for future expansion */
55 void (*_g_reserved1
) (void);
56 void (*_g_reserved2
) (void);
60 * GUnixCredentialsMessage:
62 * The #GUnixCredentialsMessage structure contains only private data
63 * and should only be accessed using the provided API.
67 struct _GUnixCredentialsMessage
69 GSocketControlMessage parent_instance
;
70 GUnixCredentialsMessagePrivate
*priv
;
74 GType
g_unix_credentials_message_get_type (void) G_GNUC_CONST
;
76 GSocketControlMessage
*g_unix_credentials_message_new (void);
78 GSocketControlMessage
*g_unix_credentials_message_new_with_credentials (GCredentials
*credentials
);
80 GCredentials
*g_unix_credentials_message_get_credentials (GUnixCredentialsMessage
*message
);
83 gboolean
g_unix_credentials_message_is_supported (void);
87 #endif /* __G_UNIX_CREDENTIALS_MESSAGE_H__ */