diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2016-03-27 19:40:03 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2016-09-29 15:43:05 +0200 |
commit | aa4577dfb9b5a7863a4939ec2409eae392e2fc0c (patch) | |
tree | fe696d759164829dcad1a05e02e850b5ba4369e9 /src/kerneldevice/mm-kernel-device-udev.h | |
parent | 1f813c4e9691f22017802278ab6f5b1475185113 (diff) |
core: new kernel device object instead of an explicit GUdevDevice
Instead of relying constantly on GUdevDevice objects reported by GUdev, we now
use a new generic object (MMKernelDevice) for which we provide an initial GUdev
based backend.
Diffstat (limited to 'src/kerneldevice/mm-kernel-device-udev.h')
-rw-r--r-- | src/kerneldevice/mm-kernel-device-udev.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/kerneldevice/mm-kernel-device-udev.h b/src/kerneldevice/mm-kernel-device-udev.h new file mode 100644 index 00000000..ed83159b --- /dev/null +++ b/src/kerneldevice/mm-kernel-device-udev.h @@ -0,0 +1,48 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details: + * + * Copyright (C) 2016 Velocloud, Inc. + */ + +#ifndef MM_KERNEL_DEVICE_UDEV_H +#define MM_KERNEL_DEVICE_UDEV_H + +#include <glib.h> +#include <glib-object.h> +#include <gudev/gudev.h> + +#include "mm-kernel-device.h" + +#define MM_TYPE_KERNEL_DEVICE_UDEV (mm_kernel_device_udev_get_type ()) +#define MM_KERNEL_DEVICE_UDEV(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_KERNEL_DEVICE_UDEV, MMKernelDeviceUdev)) +#define MM_KERNEL_DEVICE_UDEV_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MM_TYPE_KERNEL_DEVICE_UDEV, MMKernelDeviceUdevClass)) +#define MM_IS_KERNEL_DEVICE_UDEV(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MM_TYPE_KERNEL_DEVICE_UDEV)) +#define MM_IS_KERNEL_DEVICE_UDEV_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MM_TYPE_KERNEL_DEVICE_UDEV)) +#define MM_KERNEL_DEVICE_UDEV_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MM_TYPE_KERNEL_DEVICE_UDEV, MMKernelDeviceUdevClass)) + +typedef struct _MMKernelDeviceUdev MMKernelDeviceUdev; +typedef struct _MMKernelDeviceUdevClass MMKernelDeviceUdevClass; +typedef struct _MMKernelDeviceUdevPrivate MMKernelDeviceUdevPrivate; + +struct _MMKernelDeviceUdev { + MMKernelDevice parent; + MMKernelDeviceUdevPrivate *priv; +}; + +struct _MMKernelDeviceUdevClass { + MMKernelDeviceClass parent; +}; + +GType mm_kernel_device_udev_get_type (void); +MMKernelDevice *mm_kernel_device_udev_new (GUdevDevice *udev_device); + +#endif /* MM_KERNEL_DEVICE_UDEV_H */ |