]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/gudev/gudevclient.h
udev: move libudev, gudev to src/; move gudev/docs/, udev/docs/ to to docs/
[thirdparty/systemd.git] / src / gudev / gudevclient.h
CommitLineData
bf05675a
DZ
1/* -*- Mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
2 *
3 * Copyright (C) 2008 David Zeuthen <davidz@redhat.com>
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 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
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21#if !defined (_GUDEV_COMPILATION) && !defined(_GUDEV_INSIDE_GUDEV_H)
22#error "Only <gudev/gudev.h> can be included directly, this file may disappear or change contents."
23#endif
24
25#ifndef __G_UDEV_CLIENT_H__
26#define __G_UDEV_CLIENT_H__
27
28#include <gudev/gudevtypes.h>
29
30G_BEGIN_DECLS
31
32#define G_UDEV_TYPE_CLIENT (g_udev_client_get_type ())
33#define G_UDEV_CLIENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_UDEV_TYPE_CLIENT, GUdevClient))
34#define G_UDEV_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_UDEV_TYPE_CLIENT, GUdevClientClass))
35#define G_UDEV_IS_CLIENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_UDEV_TYPE_CLIENT))
36#define G_UDEV_IS_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_UDEV_TYPE_CLIENT))
37#define G_UDEV_CLIENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_UDEV_TYPE_CLIENT, GUdevClientClass))
38
39typedef struct _GUdevClientClass GUdevClientClass;
40typedef struct _GUdevClientPrivate GUdevClientPrivate;
41
42/**
43 * GUdevClient:
bf05675a
DZ
44 *
45 * The #GUdevClient struct is opaque and should not be accessed directly.
46 */
47struct _GUdevClient
48{
49 GObject parent;
50
51 /*< private >*/
52 GUdevClientPrivate *priv;
53};
54
55/**
56 * GUdevClientClass:
57 * @parent_class: Parent class.
58 * @uevent: Signal class handler for the #GUdevClient::uevent signal.
59 *
60 * Class structure for #GUdevClient.
61 */
62struct _GUdevClientClass
63{
64 GObjectClass parent_class;
65
66 /* signals */
67 void (*uevent) (GUdevClient *client,
68 const gchar *action,
69 GUdevDevice *device);
70
71 /*< private >*/
72 /* Padding for future expansion */
73 void (*reserved1) (void);
74 void (*reserved2) (void);
75 void (*reserved3) (void);
76 void (*reserved4) (void);
77 void (*reserved5) (void);
78 void (*reserved6) (void);
79 void (*reserved7) (void);
80 void (*reserved8) (void);
81};
82
83GType g_udev_client_get_type (void) G_GNUC_CONST;
84GUdevClient *g_udev_client_new (const gchar* const *subsystems);
85GList *g_udev_client_query_by_subsystem (GUdevClient *client,
86 const gchar *subsystem);
87GUdevDevice *g_udev_client_query_by_device_number (GUdevClient *client,
88 GUdevDeviceType type,
89 GUdevDeviceNumber number);
90GUdevDevice *g_udev_client_query_by_device_file (GUdevClient *client,
91 const gchar *device_file);
92GUdevDevice *g_udev_client_query_by_sysfs_path (GUdevClient *client,
93 const gchar *sysfs_path);
94GUdevDevice *g_udev_client_query_by_subsystem_and_name (GUdevClient *client,
95 const gchar *subsystem,
96 const gchar *name);
97
98G_END_DECLS
99
100#endif /* __G_UDEV_CLIENT_H__ */