diff options
author | Richard Hughes <richard@hughsie.com> | 2011-03-14 11:01:12 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2011-03-14 11:01:12 +0000 |
commit | b0bbb29df1363e4c7c51564506b45b42bf71137c (patch) | |
tree | 72ac863af4385796aec52b31eb05078692f7018b /src/up-config.h | |
parent | 6e8794ac6d2603cda9f2544bb7c9dde7033c9e92 (diff) | |
download | upower-b0bbb29df1363e4c7c51564506b45b42bf71137c.tar.gz |
Add a config option 'EnableWattsUpPro' to disable the Watts Up Pro device
Annoyingly, the device used in the Watts Up Pro device seems to be a generic
USB->serial adaptor, which means it doesn't have a unique vendor and product
ID. If we try to probe for the WUP device, we can actually upset other devices
that are not expecing to be probed. This fixes #33846 although we actually
still need to be more strict in detecting a true WUP device.
Diffstat (limited to 'src/up-config.h')
-rw-r--r-- | src/up-config.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/up-config.h b/src/up-config.h new file mode 100644 index 0000000..2622509 --- /dev/null +++ b/src/up-config.h @@ -0,0 +1,56 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2011 Richard Hughes <richard@hughsie.com> + * + * Licensed under the GNU General Public License Version 2 + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef __UP_CONFIG_H +#define __UP_CONFIG_H + +#include <glib-object.h> + +G_BEGIN_DECLS + +#define UP_TYPE_CONFIG (up_config_get_type ()) +#define UP_CONFIG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UP_TYPE_CONFIG, UpConfig)) +#define UP_CONFIG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), UP_TYPE_CONFIG, UpConfigClass)) +#define UP_IS_CONFIG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), UP_TYPE_CONFIG)) + +typedef struct _UpConfigPrivate UpConfigPrivate; +typedef struct _UpConfig UpConfig; +typedef struct _UpConfigClass UpConfigClass; + +struct _UpConfig +{ + GObject parent; + UpConfigPrivate *priv; +}; + +struct _UpConfigClass +{ + GObjectClass parent_class; +}; + +GType up_config_get_type (void); +UpConfig *up_config_new (void); +gboolean up_config_get_boolean (UpConfig *config, + const gchar *key); + +G_END_DECLS + +#endif /* __UP_CONFIG_H */ |