[kdbus] KDBUS_ITEM_PAYLOAD_OFF items are (once again) relative to msg header
[platform/upstream/glib.git] / gio / gunixcredentialsmessage.h
1 /* GIO - GLib Input, Output and Streaming Library
2  *
3  * Copyright (C) 2010 Red Hat, Inc.
4  * Copyright (C) 2009 Codethink Limited
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License as published
8  * by the Free Software Foundation; either version 2 of the licence or (at
9  * your option) any later version.
10  *
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.
15  *
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/>.
18  *
19  * Authors: David Zeuthen <davidz@redhat.com>
20  */
21
22 #ifndef __G_UNIX_CREDENTIALS_MESSAGE_H__
23 #define __G_UNIX_CREDENTIALS_MESSAGE_H__
24
25 #include <gio/gio.h>
26
27 G_BEGIN_DECLS
28
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))
35
36 typedef struct _GUnixCredentialsMessagePrivate  GUnixCredentialsMessagePrivate;
37 typedef struct _GUnixCredentialsMessageClass    GUnixCredentialsMessageClass;
38
39 /**
40  * GUnixCredentialsMessageClass:
41  *
42  * Class structure for #GUnixCredentialsMessage.
43  *
44  * Since: 2.26
45  */
46 struct _GUnixCredentialsMessageClass
47 {
48   GSocketControlMessageClass parent_class;
49
50   /*< private >*/
51
52   /* Padding for future expansion */
53   void (*_g_reserved1) (void);
54   void (*_g_reserved2) (void);
55 };
56
57 /**
58  * GUnixCredentialsMessage:
59  *
60  * The #GUnixCredentialsMessage structure contains only private data
61  * and should only be accessed using the provided API.
62  *
63  * Since: 2.26
64  */
65 struct _GUnixCredentialsMessage
66 {
67   GSocketControlMessage parent_instance;
68   GUnixCredentialsMessagePrivate *priv;
69 };
70
71 GLIB_AVAILABLE_IN_ALL
72 GType                  g_unix_credentials_message_get_type             (void) G_GNUC_CONST;
73 GLIB_AVAILABLE_IN_ALL
74 GSocketControlMessage *g_unix_credentials_message_new                  (void);
75 GLIB_AVAILABLE_IN_ALL
76 GSocketControlMessage *g_unix_credentials_message_new_with_credentials (GCredentials *credentials);
77 GLIB_AVAILABLE_IN_ALL
78 GCredentials          *g_unix_credentials_message_get_credentials      (GUnixCredentialsMessage *message);
79
80 GLIB_AVAILABLE_IN_ALL
81 gboolean               g_unix_credentials_message_is_supported         (void);
82
83 G_END_DECLS
84
85 #endif /* __G_UNIX_CREDENTIALS_MESSAGE_H__ */