1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
2  *
3  * Copyright (C) 2011 Richard Hughes <richard@hughsie.com>
4  *
5  * Licensed under the GNU General Public License Version 2
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  */
21 
22 #ifndef __CD_INHIBIT_H
23 #define __CD_INHIBIT_H
24 
25 #include <glib-object.h>
26 
27 G_BEGIN_DECLS
28 
29 #define CD_TYPE_INHIBIT (cd_inhibit_get_type ())
30 G_DECLARE_DERIVABLE_TYPE (CdInhibit, cd_inhibit, CD, INHIBIT, GObject)
31 
32 struct _CdInhibitClass
33 {
34 	GObjectClass		 parent_class;
35 	void			(*changed)	(CdInhibit	*inhibit);
36 };
37 
38 GType		 cd_inhibit_get_type		(void);
39 CdInhibit	*cd_inhibit_new			(void);
40 
41 gboolean	 cd_inhibit_add			(CdInhibit	*inhibit,
42 						 const gchar	*sender,
43 						 GError		**error)
44 						 G_GNUC_WARN_UNUSED_RESULT;
45 gboolean	 cd_inhibit_remove		(CdInhibit	*inhibit,
46 						 const gchar	*sender,
47 						 GError		**error)
48 						 G_GNUC_WARN_UNUSED_RESULT;
49 gboolean	 cd_inhibit_valid		(CdInhibit	*inhibit);
50 gchar		**cd_inhibit_get_bus_names	(CdInhibit	*inhibit);
51 
52 G_END_DECLS
53 
54 #endif /* __CD_INHIBIT_H */
55 
56