~ubuntu-branches/ubuntu/natty/devicekit-power/natty

« back to all changes in this revision

Viewing changes to src/dkp-device-glue.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-03-06 13:48:24 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090306134824-33mroekaajqd2tl6
Tags: 006-0ubuntu1
* New upstream version 006:
  - Fix the battery capacity calculation. (fd#19165)
  - Special case machines where the kernel does not convert charge to power.
  - Check all the power supply fields for valid data.
  - Add a wakeups interface so we can get data from the system over DBus.
  - Allow showing the wakeup data in the devkit-power command line tool.
  - Fix compile failure with gcc-4.4.0 and old versions of glib2.
  - Only enable the wakeups polling if a client requires the data.
  - Correctly set the power-supply property.
  - Don't crash when we limit the resolution of a small dataset.
  - Don't sync to disk every 5 seconds, do it every 10 minutes.
  - Fix the QoS interface with the proper signature.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
#endif /* !G_ENABLE_DEBUG */
54
54
 
55
55
 
56
 
/* NONE:STRING,POINTER (/tmp/dbus-binding-tool-c-marshallers.7T6BLU:1) */
57
 
extern void dbus_glib_marshal_dkp_device_VOID__STRING_POINTER (GClosure     *closure,
58
 
                                                               GValue       *return_value,
59
 
                                                               guint         n_param_values,
60
 
                                                               const GValue *param_values,
61
 
                                                               gpointer      invocation_hint,
62
 
                                                               gpointer      marshal_data);
63
 
void
64
 
dbus_glib_marshal_dkp_device_VOID__STRING_POINTER (GClosure     *closure,
65
 
                                                   GValue       *return_value G_GNUC_UNUSED,
66
 
                                                   guint         n_param_values,
67
 
                                                   const GValue *param_values,
68
 
                                                   gpointer      invocation_hint G_GNUC_UNUSED,
69
 
                                                   gpointer      marshal_data)
70
 
{
71
 
  typedef void (*GMarshalFunc_VOID__STRING_POINTER) (gpointer     data1,
72
 
                                                     gpointer     arg_1,
73
 
                                                     gpointer     arg_2,
74
 
                                                     gpointer     data2);
75
 
  register GMarshalFunc_VOID__STRING_POINTER callback;
76
 
  register GCClosure *cc = (GCClosure*) closure;
77
 
  register gpointer data1, data2;
78
 
 
79
 
  g_return_if_fail (n_param_values == 3);
80
 
 
81
 
  if (G_CCLOSURE_SWAP_DATA (closure))
82
 
    {
83
 
      data1 = closure->data;
84
 
      data2 = g_value_peek_pointer (param_values + 0);
85
 
    }
86
 
  else
87
 
    {
88
 
      data1 = g_value_peek_pointer (param_values + 0);
89
 
      data2 = closure->data;
90
 
    }
91
 
  callback = (GMarshalFunc_VOID__STRING_POINTER) (marshal_data ? marshal_data : cc->callback);
92
 
 
93
 
  callback (data1,
94
 
            g_marshal_value_peek_string (param_values + 1),
95
 
            g_marshal_value_peek_pointer (param_values + 2),
96
 
            data2);
97
 
}
98
 
#define dbus_glib_marshal_dkp_device_NONE__STRING_POINTER       dbus_glib_marshal_dkp_device_VOID__STRING_POINTER
99
 
 
100
 
/* NONE:STRING,UINT,UINT,POINTER (/tmp/dbus-binding-tool-c-marshallers.7T6BLU:2) */
 
56
/* NONE:STRING,UINT,UINT,POINTER (/tmp/dbus-binding-tool-c-marshallers.XI53OU:1) */
101
57
extern void dbus_glib_marshal_dkp_device_VOID__STRING_UINT_UINT_POINTER (GClosure     *closure,
102
58
                                                                         GValue       *return_value,
103
59
                                                                         guint         n_param_values,
145
101
}
146
102
#define dbus_glib_marshal_dkp_device_NONE__STRING_UINT_UINT_POINTER     dbus_glib_marshal_dkp_device_VOID__STRING_UINT_UINT_POINTER
147
103
 
148
 
/* NONE:POINTER (/tmp/dbus-binding-tool-c-marshallers.7T6BLU:3) */
 
104
/* NONE:STRING,POINTER (/tmp/dbus-binding-tool-c-marshallers.XI53OU:2) */
 
105
extern void dbus_glib_marshal_dkp_device_VOID__STRING_POINTER (GClosure     *closure,
 
106
                                                               GValue       *return_value,
 
107
                                                               guint         n_param_values,
 
108
                                                               const GValue *param_values,
 
109
                                                               gpointer      invocation_hint,
 
110
                                                               gpointer      marshal_data);
 
111
void
 
112
dbus_glib_marshal_dkp_device_VOID__STRING_POINTER (GClosure     *closure,
 
113
                                                   GValue       *return_value G_GNUC_UNUSED,
 
114
                                                   guint         n_param_values,
 
115
                                                   const GValue *param_values,
 
116
                                                   gpointer      invocation_hint G_GNUC_UNUSED,
 
117
                                                   gpointer      marshal_data)
 
118
{
 
119
  typedef void (*GMarshalFunc_VOID__STRING_POINTER) (gpointer     data1,
 
120
                                                     gpointer     arg_1,
 
121
                                                     gpointer     arg_2,
 
122
                                                     gpointer     data2);
 
123
  register GMarshalFunc_VOID__STRING_POINTER callback;
 
124
  register GCClosure *cc = (GCClosure*) closure;
 
125
  register gpointer data1, data2;
 
126
 
 
127
  g_return_if_fail (n_param_values == 3);
 
128
 
 
129
  if (G_CCLOSURE_SWAP_DATA (closure))
 
130
    {
 
131
      data1 = closure->data;
 
132
      data2 = g_value_peek_pointer (param_values + 0);
 
133
    }
 
134
  else
 
135
    {
 
136
      data1 = g_value_peek_pointer (param_values + 0);
 
137
      data2 = closure->data;
 
138
    }
 
139
  callback = (GMarshalFunc_VOID__STRING_POINTER) (marshal_data ? marshal_data : cc->callback);
 
140
 
 
141
  callback (data1,
 
142
            g_marshal_value_peek_string (param_values + 1),
 
143
            g_marshal_value_peek_pointer (param_values + 2),
 
144
            data2);
 
145
}
 
146
#define dbus_glib_marshal_dkp_device_NONE__STRING_POINTER       dbus_glib_marshal_dkp_device_VOID__STRING_POINTER
 
147
 
 
148
/* NONE:POINTER (/tmp/dbus-binding-tool-c-marshallers.XI53OU:3) */
149
149
#define dbus_glib_marshal_dkp_device_VOID__POINTER      g_cclosure_marshal_VOID__POINTER
150
150
#define dbus_glib_marshal_dkp_device_NONE__POINTER      dbus_glib_marshal_dkp_device_VOID__POINTER
151
151