Line data Source code
1 : /* The following definitions are auto-generated from dp_iface.xml */
2 :
3 : #include "util/util.h"
4 : #include "sbus/sssd_dbus.h"
5 : #include "sbus/sssd_dbus_meta.h"
6 : #include "sbus/sssd_dbus_invokers.h"
7 : #include "dp_iface_generated.h"
8 :
9 : /* invokes a handler with a 's' DBus signature */
10 : static int invoke_s_method(struct sbus_request *dbus_req, void *function_ptr);
11 :
12 : /* invokes a handler with a 'us' DBus signature */
13 : static int invoke_us_method(struct sbus_request *dbus_req, void *function_ptr);
14 :
15 : /* invokes a handler with a 'uss' DBus signature */
16 : static int invoke_uss_method(struct sbus_request *dbus_req, void *function_ptr);
17 :
18 : /* invokes a handler with a 'uuusss' DBus signature */
19 : static int invoke_uuusss_method(struct sbus_request *dbus_req, void *function_ptr);
20 :
21 : /* arguments for org.freedesktop.sssd.DataProvider.Client.Register */
22 : const struct sbus_arg_meta iface_dp_client_Register__in[] = {
23 : { "Name", "s" },
24 : { NULL, }
25 : };
26 :
27 0 : int iface_dp_client_Register_finish(struct sbus_request *req)
28 : {
29 0 : return sbus_request_return_and_finish(req,
30 : DBUS_TYPE_INVALID);
31 : }
32 :
33 : /* methods for org.freedesktop.sssd.DataProvider.Client */
34 : const struct sbus_method_meta iface_dp_client__methods[] = {
35 : {
36 : "Register", /* name */
37 : iface_dp_client_Register__in,
38 : NULL, /* no out_args */
39 : offsetof(struct iface_dp_client, Register),
40 : invoke_s_method,
41 : },
42 : { NULL, }
43 : };
44 :
45 : /* interface info for org.freedesktop.sssd.DataProvider.Client */
46 : const struct sbus_interface_meta iface_dp_client_meta = {
47 : "org.freedesktop.sssd.DataProvider.Client", /* name */
48 : iface_dp_client__methods,
49 : NULL, /* no signals */
50 : NULL, /* no properties */
51 : sbus_invoke_get_all, /* GetAll invoker */
52 : };
53 :
54 : /* arguments for org.freedesktop.sssd.DataProvider.Backend.IsOnline */
55 : const struct sbus_arg_meta iface_dp_backend_IsOnline__in[] = {
56 : { "domain_name", "s" },
57 : { NULL, }
58 : };
59 :
60 : /* arguments for org.freedesktop.sssd.DataProvider.Backend.IsOnline */
61 : const struct sbus_arg_meta iface_dp_backend_IsOnline__out[] = {
62 : { "status", "b" },
63 : { NULL, }
64 : };
65 :
66 0 : int iface_dp_backend_IsOnline_finish(struct sbus_request *req, bool arg_status)
67 : {
68 0 : dbus_bool_t cast_status = arg_status;
69 0 : return sbus_request_return_and_finish(req,
70 : DBUS_TYPE_BOOLEAN, &cast_status,
71 : DBUS_TYPE_INVALID);
72 : }
73 :
74 : /* methods for org.freedesktop.sssd.DataProvider.Backend */
75 : const struct sbus_method_meta iface_dp_backend__methods[] = {
76 : {
77 : "IsOnline", /* name */
78 : iface_dp_backend_IsOnline__in,
79 : iface_dp_backend_IsOnline__out,
80 : offsetof(struct iface_dp_backend, IsOnline),
81 : invoke_s_method,
82 : },
83 : { NULL, }
84 : };
85 :
86 : /* interface info for org.freedesktop.sssd.DataProvider.Backend */
87 : const struct sbus_interface_meta iface_dp_backend_meta = {
88 : "org.freedesktop.sssd.DataProvider.Backend", /* name */
89 : iface_dp_backend__methods,
90 : NULL, /* no signals */
91 : NULL, /* no properties */
92 : sbus_invoke_get_all, /* GetAll invoker */
93 : };
94 :
95 : /* arguments for org.freedesktop.sssd.DataProvider.Failover.ListServices */
96 : const struct sbus_arg_meta iface_dp_failover_ListServices__in[] = {
97 : { "domain_name", "s" },
98 : { NULL, }
99 : };
100 :
101 : /* arguments for org.freedesktop.sssd.DataProvider.Failover.ListServices */
102 : const struct sbus_arg_meta iface_dp_failover_ListServices__out[] = {
103 : { "services", "as" },
104 : { NULL, }
105 : };
106 :
107 0 : int iface_dp_failover_ListServices_finish(struct sbus_request *req, const char *arg_services[], int len_services)
108 : {
109 0 : return sbus_request_return_and_finish(req,
110 : DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &arg_services, len_services,
111 : DBUS_TYPE_INVALID);
112 : }
113 :
114 : /* methods for org.freedesktop.sssd.DataProvider.Failover */
115 : const struct sbus_method_meta iface_dp_failover__methods[] = {
116 : {
117 : "ListServices", /* name */
118 : iface_dp_failover_ListServices__in,
119 : iface_dp_failover_ListServices__out,
120 : offsetof(struct iface_dp_failover, ListServices),
121 : invoke_s_method,
122 : },
123 : { NULL, }
124 : };
125 :
126 : /* interface info for org.freedesktop.sssd.DataProvider.Failover */
127 : const struct sbus_interface_meta iface_dp_failover_meta = {
128 : "org.freedesktop.sssd.DataProvider.Failover", /* name */
129 : iface_dp_failover__methods,
130 : NULL, /* no signals */
131 : NULL, /* no properties */
132 : sbus_invoke_get_all, /* GetAll invoker */
133 : };
134 :
135 : /* arguments for org.freedesktop.sssd.dataprovider.autofsHandler */
136 : const struct sbus_arg_meta iface_dp_autofsHandler__in[] = {
137 : { "dp_flags", "u" },
138 : { "mapname", "s" },
139 : { NULL, }
140 : };
141 :
142 : /* arguments for org.freedesktop.sssd.dataprovider.autofsHandler */
143 : const struct sbus_arg_meta iface_dp_autofsHandler__out[] = {
144 : { "dp_error", "q" },
145 : { "error", "u" },
146 : { "error_message", "s" },
147 : { NULL, }
148 : };
149 :
150 0 : int iface_dp_autofsHandler_finish(struct sbus_request *req, uint16_t arg_dp_error, uint32_t arg_error, const char *arg_error_message)
151 : {
152 0 : return sbus_request_return_and_finish(req,
153 : DBUS_TYPE_UINT16, &arg_dp_error,
154 : DBUS_TYPE_UINT32, &arg_error,
155 : DBUS_TYPE_STRING, &arg_error_message,
156 : DBUS_TYPE_INVALID);
157 : }
158 :
159 : /* arguments for org.freedesktop.sssd.dataprovider.hostHandler */
160 : const struct sbus_arg_meta iface_dp_hostHandler__in[] = {
161 : { "dp_flags", "u" },
162 : { "name", "s" },
163 : { "alias", "s" },
164 : { NULL, }
165 : };
166 :
167 : /* arguments for org.freedesktop.sssd.dataprovider.hostHandler */
168 : const struct sbus_arg_meta iface_dp_hostHandler__out[] = {
169 : { "dp_error", "q" },
170 : { "error", "u" },
171 : { "error_message", "s" },
172 : { NULL, }
173 : };
174 :
175 0 : int iface_dp_hostHandler_finish(struct sbus_request *req, uint16_t arg_dp_error, uint32_t arg_error, const char *arg_error_message)
176 : {
177 0 : return sbus_request_return_and_finish(req,
178 : DBUS_TYPE_UINT16, &arg_dp_error,
179 : DBUS_TYPE_UINT32, &arg_error,
180 : DBUS_TYPE_STRING, &arg_error_message,
181 : DBUS_TYPE_INVALID);
182 : }
183 :
184 : /* arguments for org.freedesktop.sssd.dataprovider.getDomains */
185 : const struct sbus_arg_meta iface_dp_getDomains__in[] = {
186 : { "domain_hint", "s" },
187 : { NULL, }
188 : };
189 :
190 : /* arguments for org.freedesktop.sssd.dataprovider.getDomains */
191 : const struct sbus_arg_meta iface_dp_getDomains__out[] = {
192 : { "dp_error", "q" },
193 : { "error", "u" },
194 : { "error_message", "s" },
195 : { NULL, }
196 : };
197 :
198 0 : int iface_dp_getDomains_finish(struct sbus_request *req, uint16_t arg_dp_error, uint32_t arg_error, const char *arg_error_message)
199 : {
200 0 : return sbus_request_return_and_finish(req,
201 : DBUS_TYPE_UINT16, &arg_dp_error,
202 : DBUS_TYPE_UINT32, &arg_error,
203 : DBUS_TYPE_STRING, &arg_error_message,
204 : DBUS_TYPE_INVALID);
205 : }
206 :
207 : /* arguments for org.freedesktop.sssd.dataprovider.getAccountInfo */
208 : const struct sbus_arg_meta iface_dp_getAccountInfo__in[] = {
209 : { "dp_flags", "u" },
210 : { "entry_type", "u" },
211 : { "attr_type", "u" },
212 : { "filter", "s" },
213 : { "domain", "s" },
214 : { "extra", "s" },
215 : { NULL, }
216 : };
217 :
218 : /* arguments for org.freedesktop.sssd.dataprovider.getAccountInfo */
219 : const struct sbus_arg_meta iface_dp_getAccountInfo__out[] = {
220 : { "dp_error", "q" },
221 : { "error", "u" },
222 : { "error_message", "s" },
223 : { NULL, }
224 : };
225 :
226 0 : int iface_dp_getAccountInfo_finish(struct sbus_request *req, uint16_t arg_dp_error, uint32_t arg_error, const char *arg_error_message)
227 : {
228 0 : return sbus_request_return_and_finish(req,
229 : DBUS_TYPE_UINT16, &arg_dp_error,
230 : DBUS_TYPE_UINT32, &arg_error,
231 : DBUS_TYPE_STRING, &arg_error_message,
232 : DBUS_TYPE_INVALID);
233 : }
234 :
235 : /* methods for org.freedesktop.sssd.dataprovider */
236 : const struct sbus_method_meta iface_dp__methods[] = {
237 : {
238 : "pamHandler", /* name */
239 : NULL, /* no in_args */
240 : NULL, /* no out_args */
241 : offsetof(struct iface_dp, pamHandler),
242 : NULL, /* no invoker */
243 : },
244 : {
245 : "sudoHandler", /* name */
246 : NULL, /* no in_args */
247 : NULL, /* no out_args */
248 : offsetof(struct iface_dp, sudoHandler),
249 : NULL, /* no invoker */
250 : },
251 : {
252 : "autofsHandler", /* name */
253 : iface_dp_autofsHandler__in,
254 : iface_dp_autofsHandler__out,
255 : offsetof(struct iface_dp, autofsHandler),
256 : invoke_us_method,
257 : },
258 : {
259 : "hostHandler", /* name */
260 : iface_dp_hostHandler__in,
261 : iface_dp_hostHandler__out,
262 : offsetof(struct iface_dp, hostHandler),
263 : invoke_uss_method,
264 : },
265 : {
266 : "getDomains", /* name */
267 : iface_dp_getDomains__in,
268 : iface_dp_getDomains__out,
269 : offsetof(struct iface_dp, getDomains),
270 : invoke_s_method,
271 : },
272 : {
273 : "getAccountInfo", /* name */
274 : iface_dp_getAccountInfo__in,
275 : iface_dp_getAccountInfo__out,
276 : offsetof(struct iface_dp, getAccountInfo),
277 : invoke_uuusss_method,
278 : },
279 : { NULL, }
280 : };
281 :
282 : /* interface info for org.freedesktop.sssd.dataprovider */
283 : const struct sbus_interface_meta iface_dp_meta = {
284 : "org.freedesktop.sssd.dataprovider", /* name */
285 : iface_dp__methods,
286 : NULL, /* no signals */
287 : NULL, /* no properties */
288 : sbus_invoke_get_all, /* GetAll invoker */
289 : };
290 :
291 : /* invokes a handler with a 's' DBus signature */
292 0 : static int invoke_s_method(struct sbus_request *dbus_req, void *function_ptr)
293 : {
294 : const char * arg_0;
295 0 : int (*handler)(struct sbus_request *, void *, const char *) = function_ptr;
296 :
297 0 : if (!sbus_request_parse_or_finish(dbus_req,
298 : DBUS_TYPE_STRING, &arg_0,
299 : DBUS_TYPE_INVALID)) {
300 0 : return EOK; /* request handled */
301 : }
302 :
303 0 : return (handler)(dbus_req, dbus_req->intf->handler_data,
304 : arg_0);
305 : }
306 :
307 : /* invokes a handler with a 'uss' DBus signature */
308 0 : static int invoke_uss_method(struct sbus_request *dbus_req, void *function_ptr)
309 : {
310 : uint32_t arg_0;
311 : const char * arg_1;
312 : const char * arg_2;
313 0 : int (*handler)(struct sbus_request *, void *, uint32_t, const char *, const char *) = function_ptr;
314 :
315 0 : if (!sbus_request_parse_or_finish(dbus_req,
316 : DBUS_TYPE_UINT32, &arg_0,
317 : DBUS_TYPE_STRING, &arg_1,
318 : DBUS_TYPE_STRING, &arg_2,
319 : DBUS_TYPE_INVALID)) {
320 0 : return EOK; /* request handled */
321 : }
322 :
323 0 : return (handler)(dbus_req, dbus_req->intf->handler_data,
324 : arg_0,
325 : arg_1,
326 : arg_2);
327 : }
328 :
329 : /* invokes a handler with a 'uuusss' DBus signature */
330 0 : static int invoke_uuusss_method(struct sbus_request *dbus_req, void *function_ptr)
331 : {
332 : uint32_t arg_0;
333 : uint32_t arg_1;
334 : uint32_t arg_2;
335 : const char * arg_3;
336 : const char * arg_4;
337 : const char * arg_5;
338 0 : int (*handler)(struct sbus_request *, void *, uint32_t, uint32_t, uint32_t, const char *, const char *, const char *) = function_ptr;
339 :
340 0 : if (!sbus_request_parse_or_finish(dbus_req,
341 : DBUS_TYPE_UINT32, &arg_0,
342 : DBUS_TYPE_UINT32, &arg_1,
343 : DBUS_TYPE_UINT32, &arg_2,
344 : DBUS_TYPE_STRING, &arg_3,
345 : DBUS_TYPE_STRING, &arg_4,
346 : DBUS_TYPE_STRING, &arg_5,
347 : DBUS_TYPE_INVALID)) {
348 0 : return EOK; /* request handled */
349 : }
350 :
351 0 : return (handler)(dbus_req, dbus_req->intf->handler_data,
352 : arg_0,
353 : arg_1,
354 : arg_2,
355 : arg_3,
356 : arg_4,
357 : arg_5);
358 : }
359 :
360 : /* invokes a handler with a 'us' DBus signature */
361 0 : static int invoke_us_method(struct sbus_request *dbus_req, void *function_ptr)
362 : {
363 : uint32_t arg_0;
364 : const char * arg_1;
365 0 : int (*handler)(struct sbus_request *, void *, uint32_t, const char *) = function_ptr;
366 :
367 0 : if (!sbus_request_parse_or_finish(dbus_req,
368 : DBUS_TYPE_UINT32, &arg_0,
369 : DBUS_TYPE_STRING, &arg_1,
370 : DBUS_TYPE_INVALID)) {
371 0 : return EOK; /* request handled */
372 : }
373 :
374 0 : return (handler)(dbus_req, dbus_req->intf->handler_data,
375 : arg_0,
376 : arg_1);
377 : }
|