Branch data Line data Source code
1 : : // SPDX-License-Identifier: GPL-3.0-or-later
2 : : // SPDX-FileCopyrightText: Andy Holmes <andrew.g.r.holmes@gmail.com>
3 : :
4 : : #include "config.h"
5 : :
6 : : #include <libpeas.h>
7 : : #include <libportal/portal.h>
8 : : #include <valent.h>
9 : :
10 : : #include "valent-xdp-background.h"
11 : : #include "valent-xdp-input.h"
12 : : #include "valent-xdp-session.h"
13 : :
14 : :
15 : : _VALENT_EXTERN void
16 : 0 : valent_xdp_plugin_register_types (PeasObjectModule *module)
17 : : {
18 : 0 : peas_object_module_register_extension_type (module,
19 : : VALENT_TYPE_INPUT_ADAPTER,
20 : : VALENT_TYPE_XDP_INPUT);
21 : :
22 : : /* These extensions only makes sense in a sandbox environment. */
23 : 0 : if (xdp_portal_running_under_sandbox ())
24 : : {
25 : : #ifdef HAVE_LIBPORTAL_GTK4
26 : 0 : peas_object_module_register_extension_type (module,
27 : : VALENT_TYPE_APPLICATION_PLUGIN,
28 : : VALENT_TYPE_XDP_BACKGROUND);
29 : : #endif /* HAVE_LIBPORTAL_GTK4 */
30 : 0 : peas_object_module_register_extension_type (module,
31 : : VALENT_TYPE_SESSION_ADAPTER,
32 : : VALENT_TYPE_XDP_SESSION);
33 : : }
34 : 0 : }
35 : :
|