~ps-jenkins/indicator-power/latestsnapshot-12.10.6+13.10.20131008-0ubuntu1

« back to all changes in this revision

Viewing changes to src/device-provider-upower.h

  • Committer: Tarmac
  • Author(s): Charles Kerr
  • Date: 2013-06-19 21:13:09 UTC
  • mfrom: (167.1.32 gmenuify)
  • Revision ID: tarmac-20130619211309-nj444ogmrhsi7r9f
Convert the power indicator into a service that exports GMenus and GActions in accordance with our indicator-ng design.

Approved by PS Jenkins bot, Ted Gould.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2013 Canonical Ltd.
 
3
 *
 
4
 * Authors:
 
5
 *   Charles Kerr <charles.kerr@canonical.com>
 
6
 *
 
7
 * This program is free software: you can redistribute it and/or modify it
 
8
 * under the terms of the GNU General Public License version 3, as published
 
9
 * by the Free Software Foundation.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful, but
 
12
 * WITHOUT ANY WARRANTY; without even the implied warranties of
 
13
 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 
14
 * PURPOSE.  See the GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License along
 
17
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 
18
 */
 
19
 
 
20
#ifndef __INDICATOR_POWER_DEVICE_PROVIDER_UPOWER__H__
 
21
#define __INDICATOR_POWER_DEVICE_PROVIDER_UPOWER__H__
 
22
 
 
23
#include <glib-object.h> /* parent class */
 
24
 
 
25
#include "device-provider.h"
 
26
 
 
27
G_BEGIN_DECLS
 
28
 
 
29
#define INDICATOR_TYPE_POWER_DEVICE_PROVIDER_UPOWER \
 
30
  (indicator_power_device_provider_upower_get_type())
 
31
 
 
32
#define INDICATOR_POWER_DEVICE_PROVIDER_UPOWER(o) \
 
33
  (G_TYPE_CHECK_INSTANCE_CAST ((o), \
 
34
                               INDICATOR_TYPE_POWER_DEVICE_PROVIDER_UPOWER, \
 
35
                               IndicatorPowerDeviceProviderUPower))
 
36
 
 
37
#define INDICATOR_POWER_DEVICE_PROVIDER_UPOWER_GET_CLASS(o) \
 
38
 (G_TYPE_INSTANCE_GET_CLASS ((o), \
 
39
                             INDICATOR_TYPE_POWER_DEVICE_PROVIDER_UPOWER, \
 
40
                             IndicatorPowerDeviceProviderUPowerClass))
 
41
 
 
42
#define INDICATOR_IS_POWER_DEVICE_PROVIDER_UPOWER(o) \
 
43
  (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
 
44
                               INDICATOR_TYPE_POWER_DEVICE_PROVIDER_UPOWER))
 
45
 
 
46
typedef struct _IndicatorPowerDeviceProviderUPower
 
47
                IndicatorPowerDeviceProviderUPower;
 
48
typedef struct _IndicatorPowerDeviceProviderUPowerPriv
 
49
                IndicatorPowerDeviceProviderUPowerPriv;
 
50
typedef struct _IndicatorPowerDeviceProviderUPowerClass
 
51
                IndicatorPowerDeviceProviderUPowerClass;
 
52
 
 
53
/**
 
54
 * An IndicatorPowerDeviceProvider which gets its devices from UPower.
 
55
 */
 
56
struct _IndicatorPowerDeviceProviderUPower
 
57
{
 
58
  GObject parent_instance;
 
59
 
 
60
  IndicatorPowerDeviceProviderUPowerPriv * priv;
 
61
};
 
62
 
 
63
struct _IndicatorPowerDeviceProviderUPowerClass
 
64
{
 
65
  GObjectClass parent_class;
 
66
};
 
67
 
 
68
IndicatorPowerDeviceProvider * indicator_power_device_provider_upower_new (void);
 
69
 
 
70
G_END_DECLS
 
71
 
 
72
#endif /* __INDICATOR_POWER_DEVICE_PROVIDER_UPOWER__H__ */