~ubuntu-branches/ubuntu/wily/indicator-power/wily

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release
  • Date: 2014-10-14 20:37:25 UTC
  • mto: This revision was merged to the branch mainline in revision 72.
  • Revision ID: package-import@ubuntu.com-20141014203725-dqzijigg6arsdupk
Tags: upstream-12.10.6+14.10.20141014
ImportĀ upstreamĀ versionĀ 12.10.6+14.10.20141014

Show diffs side-by-side

added added

removed removed

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