| Line |
Branch |
Exec |
Source |
| 1 |
|
|
/* px-module.h |
| 2 |
|
|
* |
| 3 |
|
|
* Copyright 2022-2023 Jan-Michael Brummer |
| 4 |
|
|
* |
| 5 |
|
|
* This library is free software; you can redistribute it and/or |
| 6 |
|
|
* modify it under the terms of the GNU Lesser General Public |
| 7 |
|
|
* License as published by the Free Software Foundation; either |
| 8 |
|
|
* version 2.1 of the License, or (at your option) any later version. |
| 9 |
|
|
* |
| 10 |
|
|
* This library 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 GNU |
| 13 |
|
|
* Lesser General Public License for more details. |
| 14 |
|
|
* |
| 15 |
|
|
* You should have received a copy of the GNU Lesser General Public |
| 16 |
|
|
* License along with this library; if not, write to the Free Software |
| 17 |
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 |
|
|
* |
| 19 |
|
|
* SPDX-License-Identifier: LGPL-2.1-or-later |
| 20 |
|
|
*/ |
| 21 |
|
|
|
| 22 |
|
|
#pragma once |
| 23 |
|
|
|
| 24 |
|
|
#include <gio/gio.h> |
| 25 |
|
|
|
| 26 |
|
|
#define PX_TYPE_MODULE (px_module_get_type ()) |
| 27 |
|
|
|
| 28 |
0/2
✗ Branch 0 not taken.
✗ Branch 1 not taken.
|
9 |
G_DECLARE_FINAL_TYPE (PxModule, px_module, PX, MODULE, GObject) |
| 29 |
|
|
|
| 30 |
|
|
extern GQuark px_module_error_quark (void); |
| 31 |
|
|
#define PX_MODULE_ERROR px_module_error_quark () |
| 32 |
|
|
|
| 33 |
|
|
typedef enum { |
| 34 |
|
|
PX_MODULE_ERROR_INVALID_MODULE = 1001, |
| 35 |
|
|
PX_MODULE_ERROR_CONFIGURATION, |
| 36 |
|
|
} PxModuleErrorCode; |
| 37 |
|
|
|
| 38 |
|
|
PxModule * |
| 39 |
|
|
px_module_load_finished (GObject *source_object, |
| 40 |
|
|
GAsyncResult *result, |
| 41 |
|
|
GError **error); |
| 42 |
|
|
|
| 43 |
|
|
void |
| 44 |
|
|
px_module_load_async (GFile *target, |
| 45 |
|
|
GFileInfo *info, |
| 46 |
|
|
GCancellable *cancellable, |
| 47 |
|
|
GAsyncReadyCallback callback, |
| 48 |
|
|
gpointer user_data); |
| 49 |
|
|
|
| 50 |
|
|
typedef PxModule *(*PxModuleCreate)(void); |
| 51 |
|
|
|
| 52 |
|
|
PxModule *px_module_create (void); |
| 53 |
|
|
|
| 54 |
|
|
const char *px_module_get_name (PxModule *self); |
| 55 |
|
|
|
| 56 |
|
|
PxModule * |
| 57 |
|
|
px_module_load (GFile *target, |
| 58 |
|
|
GFileInfo *info, |
| 59 |
|
|
gpointer user_data); |
| 60 |
|
|
|