JULEA
jcredentials.h
Go to the documentation of this file.
1 /*
2  * JULEA - Flexible storage framework
3  * Copyright (C) 2010-2024 Michael Kuhn
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Lesser General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
23 #ifndef JULEA_CREDENTIALS_H
24 #define JULEA_CREDENTIALS_H
25 
26 #if !defined(JULEA_H) && !defined(JULEA_COMPILATION)
27 #error "Only <julea.h> can be included directly."
28 #endif
29 
30 #include <glib.h>
31 
32 #include <bson.h>
33 
34 G_BEGIN_DECLS
35 
42 struct JCredentials;
43 
44 typedef struct JCredentials JCredentials;
45 
52 
61 
68 void j_credentials_unref(JCredentials* credentials);
69 
70 G_DEFINE_AUTOPTR_CLEANUP_FUNC(JCredentials, j_credentials_unref)
71 
72 
79 guint32 j_credentials_get_user(JCredentials* credentials);
80 
88 guint32 j_credentials_get_group(JCredentials* credentials);
89 
100 bson_t* j_credentials_serialize(JCredentials* credentials);
101 
111 void j_credentials_deserialize(JCredentials* credentials, bson_t const* b);
112 
117 G_END_DECLS
118 
119 #endif
guint32 j_credentials_get_user(JCredentials *credentials)
Definition: jcredentials.c:93
guint32 j_credentials_get_group(JCredentials *credentials)
Definition: jcredentials.c:103
void j_credentials_deserialize(JCredentials *credentials, bson_t const *b)
Definition: jcredentials.c:131
JCredentials * j_credentials_new(void)
Definition: jcredentials.c:53
JCredentials * j_credentials_ref(JCredentials *credentials)
Definition: jcredentials.c:68
void j_credentials_unref(JCredentials *credentials)
Definition: jcredentials.c:80
bson_t * j_credentials_serialize(JCredentials *credentials)
Definition: jcredentials.c:113
Definition: jcredentials.c:45