1 /* -*- Mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
3 * Copyright (C) 2008-2010 David Zeuthen <davidz@redhat.com>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library 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.
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 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library 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
20 #if !defined (_GUDEV_COMPILATION) && !defined(_GUDEV_INSIDE_GUDEV_H)
21 #error "Only <gudev/gudev.h> can be included directly, this file may disappear or change contents."
24 #ifndef __G_UDEV_ENUMERATOR_H__
25 #define __G_UDEV_ENUMERATOR_H__
27 #include <gudev/gudevtypes.h>
31 #define G_UDEV_TYPE_ENUMERATOR (g_udev_enumerator_get_type ())
32 #define G_UDEV_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_UDEV_TYPE_ENUMERATOR, GUdevEnumerator))
33 #define G_UDEV_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_UDEV_TYPE_ENUMERATOR, GUdevEnumeratorClass))
34 #define G_UDEV_IS_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_UDEV_TYPE_ENUMERATOR))
35 #define G_UDEV_IS_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_UDEV_TYPE_ENUMERATOR))
36 #define G_UDEV_ENUMERATOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_UDEV_TYPE_ENUMERATOR, GUdevEnumeratorClass))
38 typedef struct _GUdevEnumeratorClass GUdevEnumeratorClass;
39 typedef struct _GUdevEnumeratorPrivate GUdevEnumeratorPrivate;
44 * The #GUdevEnumerator struct is opaque and should not be accessed directly.
48 struct _GUdevEnumerator
53 GUdevEnumeratorPrivate *priv;
57 * GUdevEnumeratorClass:
58 * @parent_class: Parent class.
60 * Class structure for #GUdevEnumerator.
64 struct _GUdevEnumeratorClass
66 GObjectClass parent_class;
69 /* Padding for future expansion */
70 void (*reserved1) (void);
71 void (*reserved2) (void);
72 void (*reserved3) (void);
73 void (*reserved4) (void);
74 void (*reserved5) (void);
75 void (*reserved6) (void);
76 void (*reserved7) (void);
77 void (*reserved8) (void);
80 GType g_udev_enumerator_get_type (void) G_GNUC_CONST;
81 GUdevEnumerator *g_udev_enumerator_new (GUdevClient *client);
82 GUdevEnumerator *g_udev_enumerator_add_match_subsystem (GUdevEnumerator *enumerator,
83 const gchar *subsystem);
84 GUdevEnumerator *g_udev_enumerator_add_nomatch_subsystem (GUdevEnumerator *enumerator,
85 const gchar *subsystem);
86 GUdevEnumerator *g_udev_enumerator_add_match_sysfs_attr (GUdevEnumerator *enumerator,
89 GUdevEnumerator *g_udev_enumerator_add_nomatch_sysfs_attr (GUdevEnumerator *enumerator,
92 GUdevEnumerator *g_udev_enumerator_add_match_property (GUdevEnumerator *enumerator,
95 GUdevEnumerator *g_udev_enumerator_add_match_name (GUdevEnumerator *enumerator,
97 GUdevEnumerator *g_udev_enumerator_add_match_tag (GUdevEnumerator *enumerator,
99 GUdevEnumerator *g_udev_enumerator_add_match_is_initialized (GUdevEnumerator *enumerator);
100 GUdevEnumerator *g_udev_enumerator_add_sysfs_path (GUdevEnumerator *enumerator,
101 const gchar *sysfs_path);
102 GList *g_udev_enumerator_execute (GUdevEnumerator *enumerator);
106 #endif /* __G_UDEV_ENUMERATOR_H__ */