Commit d2550b4c authored by Richard Hughes's avatar Richard Hughes

trivial: DkpDaemon -> UpDaemon (no ABI or API break)

parent 2562bc6a
......@@ -45,7 +45,7 @@ up-marshal.c: up-marshal.list
echo "#include \"up-marshal.h\"" > $@ && glib-genmarshal $< --prefix=dkp_marshal --body >> $@
up-daemon-glue.h: org.freedesktop.DeviceKit.Power.xml Makefile.am
dbus-binding-tool --prefix=dkp_daemon --mode=glib-server --output=up-daemon-glue.h org.freedesktop.DeviceKit.Power.xml
dbus-binding-tool --prefix=up_daemon --mode=glib-server --output=up-daemon-glue.h org.freedesktop.DeviceKit.Power.xml
up-device-glue.h: org.freedesktop.DeviceKit.Power.Device.xml Makefile.am
dbus-binding-tool --prefix=dkp_device --mode=glib-server --output=up-device-glue.h org.freedesktop.DeviceKit.Power.Device.xml
......
......@@ -42,7 +42,7 @@ static void up_backend_finalize (GObject *object);
struct UpBackendPrivate
{
DkpDaemon *daemon;
UpDaemon *daemon;
DkpDevice *device;
DkpDeviceList *device_list; /* unused */
GObject *native;
......@@ -103,7 +103,7 @@ out:
/**
* up_backend_coldplug:
* @backend: The %UpBackend class instance
* @daemon: The %DkpDaemon controlling instance
* @daemon: The %UpDaemon controlling instance
*
* Finds all the devices already plugged in, and emits device-add signals for
* each of them.
......@@ -111,10 +111,10 @@ out:
* Return value: %TRUE for success
**/
gboolean
up_backend_coldplug (UpBackend *backend, DkpDaemon *daemon)
up_backend_coldplug (UpBackend *backend, UpDaemon *daemon)
{
backend->priv->daemon = g_object_ref (daemon);
backend->priv->device_list = dkp_daemon_get_device_list (daemon);
backend->priv->device_list = up_daemon_get_device_list (daemon);
/* small delay until first device is added */
g_timeout_add_seconds (1, (GSourceFunc) up_backend_add_cb, backend);
......
......@@ -63,7 +63,7 @@ static gboolean up_backend_supports_sleep_state (const gchar *state);
struct UpBackendPrivate
{
DkpDaemon *daemon;
UpDaemon *daemon;
DkpDeviceList *device_list;
GHashTable *handle_map;
guint poll_timer_id;
......@@ -239,7 +239,7 @@ up_backend_lid_coldplug (UpBackend *backend)
/**
* up_backend_coldplug:
* @backend: The %UpBackend class instance
* @daemon: The %DkpDaemon controlling instance
* @daemon: The %UpDaemon controlling instance
*
* Finds all the devices already plugged in, and emits device-add signals for
* each of them.
......@@ -247,13 +247,13 @@ up_backend_lid_coldplug (UpBackend *backend)
* Return value: %TRUE for success
**/
gboolean
up_backend_coldplug (UpBackend *backend, DkpDaemon *daemon)
up_backend_coldplug (UpBackend *backend, UpDaemon *daemon)
{
DkpAcpiNative *acnative;
int i;
backend->priv->daemon = g_object_ref (daemon);
backend->priv->device_list = dkp_daemon_get_device_list (daemon);
backend->priv->device_list = up_daemon_get_device_list (daemon);
for (i = 0; i < (int) G_N_ELEMENTS (handlers); i++) {
int j;
......
......@@ -49,7 +49,7 @@ static void up_backend_finalize (GObject *object);
struct UpBackendPrivate
{
DkpDaemon *daemon;
UpDaemon *daemon;
DkpDeviceList *device_list;
GUdevClient *gudev_client;
DkpDeviceList *managed_devices;
......@@ -270,7 +270,7 @@ up_backend_uevent_signal_handler_cb (GUdevClient *client, const gchar *action,
/**
* up_backend_coldplug:
* @backend: The %UpBackend class instance
* @daemon: The %DkpDaemon controlling instance
* @daemon: The %UpDaemon controlling instance
*
* Finds all the devices already plugged in, and emits device-add signals for
* each of them.
......@@ -278,7 +278,7 @@ up_backend_uevent_signal_handler_cb (GUdevClient *client, const gchar *action,
* Return value: %TRUE for success
**/
gboolean
up_backend_coldplug (UpBackend *backend, DkpDaemon *daemon)
up_backend_coldplug (UpBackend *backend, UpDaemon *daemon)
{
GUdevDevice *native;
GList *devices;
......@@ -287,7 +287,7 @@ up_backend_coldplug (UpBackend *backend, DkpDaemon *daemon)
const gchar *subsystems[] = {"power_supply", "usb", "tty", "input", NULL};
backend->priv->daemon = g_object_ref (daemon);
backend->priv->device_list = dkp_daemon_get_device_list (daemon);
backend->priv->device_list = up_daemon_get_device_list (daemon);
backend->priv->gudev_client = g_udev_client_new (subsystems);
g_signal_connect (backend->priv->gudev_client, "uevent",
G_CALLBACK (up_backend_uevent_signal_handler_cb), backend);
......
......@@ -404,7 +404,7 @@ dkp_device_supply_refresh_battery (DkpDeviceSupply *supply)
gboolean recall_notice;
const gchar *recall_vendor = NULL;
const gchar *recall_url = NULL;
DkpDaemon *daemon;
UpDaemon *daemon;
gboolean on_battery;
guint battery_count;
......@@ -600,7 +600,7 @@ dkp_device_supply_refresh_battery (DkpDeviceSupply *supply)
NULL);
/* only guess when we have more than one battery devices */
battery_count = dkp_daemon_get_number_devices_of_type (daemon, DKP_DEVICE_TYPE_BATTERY);
battery_count = up_daemon_get_number_devices_of_type (daemon, DKP_DEVICE_TYPE_BATTERY);
/* try to find a suitable icon depending on AC state */
if (battery_count > 1) {
......
......@@ -53,7 +53,7 @@ struct DkpInputPrivate
struct input_event event;
gsize offset;
GIOChannel *channel;
DkpDaemon *daemon;
UpDaemon *daemon;
};
G_DEFINE_TYPE (DkpInput, dkp_input, G_TYPE_OBJECT)
......@@ -164,7 +164,7 @@ out:
* dkp_input_coldplug:
**/
gboolean
dkp_input_coldplug (DkpInput *input, DkpDaemon *daemon, GUdevDevice *d)
dkp_input_coldplug (DkpInput *input, UpDaemon *daemon, GUdevDevice *d)
{
gboolean ret = FALSE;
gchar *path;
......
......@@ -50,7 +50,7 @@ typedef struct
GType dkp_input_get_type (void);
DkpInput *dkp_input_new (void);
gboolean dkp_input_coldplug (DkpInput *input,
DkpDaemon *daemon,
UpDaemon *daemon,
GUdevDevice *d);
G_END_DECLS
......
......@@ -23,8 +23,8 @@
#define __UP_BACKEND_H
#include <glib-object.h>
#include <dkp-enum.h>
#include "up-enum.h"
#include "up-device.h"
#include "up-daemon.h"
......@@ -66,7 +66,7 @@ UpBackend *up_backend_new (void);
void up_backend_test (gpointer user_data);
gboolean up_backend_coldplug (UpBackend *backend,
DkpDaemon *daemon);
UpDaemon *daemon);
G_END_DECLS
......
This diff is collapsed.
......@@ -18,8 +18,8 @@
*
*/
#ifndef __DKP_DAEMON_H__
#define __DKP_DAEMON_H__
#ifndef __UP_DAEMON_H__
#define __UP_DAEMON_H__
#include <glib-object.h>
#include <polkit/polkit.h>
......@@ -30,68 +30,68 @@
G_BEGIN_DECLS
#define DKP_TYPE_DAEMON (dkp_daemon_get_type ())
#define DKP_DAEMON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DKP_TYPE_DAEMON, DkpDaemon))
#define DKP_DAEMON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), DKP_TYPE_DAEMON, DkpDaemonClass))
#define DKP_IS_DAEMON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), DKP_TYPE_DAEMON))
#define DKP_IS_DAEMON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), DKP_TYPE_DAEMON))
#define DKP_DAEMON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DKP_TYPE_DAEMON, DkpDaemonClass))
#define UP_TYPE_DAEMON (up_daemon_get_type ())
#define UP_DAEMON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UP_TYPE_DAEMON, UpDaemon))
#define UP_DAEMON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), UP_TYPE_DAEMON, UpDaemonClass))
#define UP_IS_DAEMON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), UP_TYPE_DAEMON))
#define UP_IS_DAEMON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), UP_TYPE_DAEMON))
#define UP_DAEMON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), UP_TYPE_DAEMON, UpDaemonClass))
typedef struct DkpDaemonPrivate DkpDaemonPrivate;
typedef struct UpDaemonPrivate UpDaemonPrivate;
typedef struct
{
GObject parent;
DkpDaemonPrivate *priv;
} DkpDaemon;
UpDaemonPrivate *priv;
} UpDaemon;
typedef struct
{
GObjectClass parent_class;
} DkpDaemonClass;
} UpDaemonClass;
typedef enum
{
DKP_DAEMON_ERROR_GENERAL,
DKP_DAEMON_ERROR_NOT_SUPPORTED,
DKP_DAEMON_ERROR_NO_SUCH_DEVICE,
DKP_DAEMON_NUM_ERRORS
} DkpDaemonError;
UP_DAEMON_ERROR_GENERAL,
UP_DAEMON_ERROR_NOT_SUPPORTED,
UP_DAEMON_ERROR_NO_SUCH_DEVICE,
UP_DAEMON_NUM_ERRORS
} UpDaemonError;
#define DKP_DAEMON_ERROR dkp_daemon_error_quark ()
#define UP_DAEMON_ERROR up_daemon_error_quark ()
GType dkp_daemon_error_get_type (void);
#define DKP_DAEMON_TYPE_ERROR (dkp_daemon_error_get_type ())
GType up_daemon_error_get_type (void);
#define UP_DAEMON_TYPE_ERROR (up_daemon_error_get_type ())
GQuark dkp_daemon_error_quark (void);
GType dkp_daemon_get_type (void);
DkpDaemon *dkp_daemon_new (void);
void dkp_daemon_test (gpointer user_data);
GQuark up_daemon_error_quark (void);
GType up_daemon_get_type (void);
UpDaemon *up_daemon_new (void);
void up_daemon_test (gpointer user_data);
/* private */
guint dkp_daemon_get_number_devices_of_type (DkpDaemon *daemon,
guint up_daemon_get_number_devices_of_type (UpDaemon *daemon,
DkpDeviceType type);
DkpDeviceList *dkp_daemon_get_device_list (DkpDaemon *daemon);
gboolean dkp_daemon_startup (DkpDaemon *daemon);
DkpDeviceList *up_daemon_get_device_list (UpDaemon *daemon);
gboolean up_daemon_startup (UpDaemon *daemon);
/* exported */
gboolean dkp_daemon_enumerate_devices (DkpDaemon *daemon,
gboolean up_daemon_enumerate_devices (UpDaemon *daemon,
DBusGMethodInvocation *context);
gboolean dkp_daemon_get_on_battery (DkpDaemon *daemon,
gboolean up_daemon_get_on_battery (UpDaemon *daemon,
DBusGMethodInvocation *context);
gboolean dkp_daemon_get_low_battery (DkpDaemon *daemon,
gboolean up_daemon_get_low_battery (UpDaemon *daemon,
DBusGMethodInvocation *context);
gboolean dkp_daemon_suspend (DkpDaemon *daemon,
gboolean up_daemon_suspend (UpDaemon *daemon,
DBusGMethodInvocation *context);
gboolean dkp_daemon_hibernate (DkpDaemon *daemon,
gboolean up_daemon_hibernate (UpDaemon *daemon,
DBusGMethodInvocation *context);
gboolean dkp_daemon_can_suspend (DkpDaemon *daemon,
gboolean up_daemon_can_suspend (UpDaemon *daemon,
gboolean interactive,
DBusGMethodInvocation *context);
gboolean dkp_daemon_can_hibernate (DkpDaemon *daemon,
gboolean up_daemon_can_hibernate (UpDaemon *daemon,
gboolean interactive,
DBusGMethodInvocation *context);
G_END_DECLS
#endif /* __DKP_DAEMON_H__ */
#endif /* __UP_DAEMON_H__ */
......@@ -47,7 +47,7 @@ struct DkpDevicePrivate
gchar *object_path;
DBusGConnection *system_bus_connection;
DBusGProxy *system_bus_proxy;
DkpDaemon *daemon;
UpDaemon *daemon;
DkpHistory *history;
GObject *native;
gboolean has_ever_refresh;
......@@ -509,9 +509,9 @@ out:
/**
* dkp_device_get_daemon:
*
* Returns a refcounted #DkpDaemon instance, or %NULL
* Returns a refcounted #UpDaemon instance, or %NULL
**/
DkpDaemon *
UpDaemon *
dkp_device_get_daemon (DkpDevice *device)
{
if (device->priv->daemon == NULL)
......@@ -525,7 +525,7 @@ dkp_device_get_daemon (DkpDevice *device)
* Return %TRUE on success, %FALSE if we failed to get data and should be removed
**/
gboolean
dkp_device_coldplug (DkpDevice *device, DkpDaemon *daemon, GObject *native)
dkp_device_coldplug (DkpDevice *device, UpDaemon *daemon, GObject *native)
{
gboolean ret;
const gchar *native_path;
......@@ -605,7 +605,7 @@ dkp_device_get_statistics (DkpDevice *device, const gchar *type, DBusGMethodInvo
/* doesn't even try to support this */
if (!device->priv->has_statistics) {
error = g_error_new (DKP_DAEMON_ERROR, DKP_DAEMON_ERROR_GENERAL, "device does not support getting stats");
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "device does not support getting stats");
dbus_g_method_return_error (context, error);
goto out;
}
......@@ -618,14 +618,14 @@ dkp_device_get_statistics (DkpDevice *device, const gchar *type, DBusGMethodInvo
/* maybe the device doesn't support histories */
if (array == NULL) {
error = g_error_new (DKP_DAEMON_ERROR, DKP_DAEMON_ERROR_GENERAL, "device has no statistics");
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "device has no statistics");
dbus_g_method_return_error (context, error);
goto out;
}
/* always 101 items of data */
if (array->len != 101) {
error = g_error_new (DKP_DAEMON_ERROR, DKP_DAEMON_ERROR_GENERAL, "statistics invalid as have %i items", array->len);
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "statistics invalid as have %i items", array->len);
dbus_g_method_return_error (context, error);
goto out;
}
......@@ -668,7 +668,7 @@ dkp_device_get_history (DkpDevice *device, const gchar *type_string, guint times
/* doesn't even try to support this */
if (!device->priv->has_history) {
error = g_error_new (DKP_DAEMON_ERROR, DKP_DAEMON_ERROR_GENERAL, "device does not support getting history");
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "device does not support getting history");
dbus_g_method_return_error (context, error);
goto out;
}
......@@ -689,7 +689,7 @@ dkp_device_get_history (DkpDevice *device, const gchar *type_string, guint times
/* maybe the device doesn't have any history */
if (array == NULL) {
error = g_error_new (DKP_DAEMON_ERROR, DKP_DAEMON_ERROR_GENERAL, "device has no history");
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "device has no history");
dbus_g_method_return_error (context, error);
goto out;
}
......
......@@ -77,9 +77,9 @@ DkpDevice *dkp_device_new (void);
void dkp_device_test (gpointer user_data);
gboolean dkp_device_coldplug (DkpDevice *device,
DkpDaemon *daemon,
UpDaemon *daemon,
GObject *native);
DkpDaemon *dkp_device_get_daemon (DkpDevice *device);
UpDaemon *dkp_device_get_daemon (DkpDevice *device);
GObject *dkp_device_get_native (DkpDevice *device);
const gchar *dkp_device_get_object_path (DkpDevice *device);
gboolean dkp_device_get_on_battery (DkpDevice *device,
......
......@@ -123,7 +123,7 @@ gint
main (gint argc, gchar **argv)
{
GError *error = NULL;
DkpDaemon *daemon = NULL;
UpDaemon *daemon = NULL;
DkpQos *qos = NULL;
DkpWakeups *wakeups = NULL;
GOptionContext *context;
......@@ -182,9 +182,9 @@ main (gint argc, gchar **argv)
qos = dkp_qos_new ();
wakeups = dkp_wakeups_new ();
daemon = dkp_daemon_new ();
daemon = up_daemon_new ();
loop = g_main_loop_new (NULL, FALSE);
ret = dkp_daemon_startup (daemon);
ret = up_daemon_startup (daemon);
if (!ret) {
egg_warning ("Could not startup; bailing out");
goto out;
......
......@@ -75,7 +75,7 @@ dkp_polkit_check_auth (DkpPolkit *polkit, PolkitSubject *subject, const gchar *a
/* check auth */
result = polkit_authority_check_authorization_sync (polkit->priv->authority, subject, action_id, NULL, POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION, NULL, &error_local);
if (result == NULL) {
error = g_error_new (DKP_DAEMON_ERROR, DKP_DAEMON_ERROR_GENERAL, "failed to check authorisation: %s", error_local->message);
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "failed to check authorisation: %s", error_local->message);
dbus_g_method_return_error (context, error);
g_error_free (error_local);
g_error_free (error);
......@@ -86,7 +86,7 @@ dkp_polkit_check_auth (DkpPolkit *polkit, PolkitSubject *subject, const gchar *a
if (polkit_authorization_result_get_is_authorized (result)) {
ret = TRUE;
} else {
error = g_error_new (DKP_DAEMON_ERROR, DKP_DAEMON_ERROR_GENERAL, "not authorized");
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "not authorized");
dbus_g_method_return_error (context, error);
g_error_free (error);
}
......
......@@ -257,7 +257,7 @@ dkp_qos_request_latency (DkpQos *qos, const gchar *type_text, gint value, gboole
/* get correct data */
type = dkp_qos_type_from_text (type_text);
if (type == DKP_QOS_TYPE_UNKNOWN) {
error = g_error_new (DKP_DAEMON_ERROR, DKP_DAEMON_ERROR_GENERAL, "type invalid: %s", type_text);
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "type invalid: %s", type_text);
dbus_g_method_return_error (context, error);
goto out;
}
......@@ -265,7 +265,7 @@ dkp_qos_request_latency (DkpQos *qos, const gchar *type_text, gint value, gboole
/* as we are async, we can get the sender */
sender = dbus_g_method_get_sender (context);
if (sender == NULL) {
error = g_error_new (DKP_DAEMON_ERROR, DKP_DAEMON_ERROR_GENERAL, "no DBUS sender");
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "no DBUS sender");
dbus_g_method_return_error (context, error);
goto out;
}
......@@ -286,7 +286,7 @@ dkp_qos_request_latency (DkpQos *qos, const gchar *type_text, gint value, gboole
/* get uid */
retval = dkp_polkit_get_uid (qos->priv->polkit, subject, &uid);
if (!retval) {
error = g_error_new (DKP_DAEMON_ERROR, DKP_DAEMON_ERROR_GENERAL, "cannot get UID");
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "cannot get UID");
dbus_g_method_return_error (context, error);
goto out;
}
......@@ -294,7 +294,7 @@ dkp_qos_request_latency (DkpQos *qos, const gchar *type_text, gint value, gboole
/* get pid */
retval = dkp_polkit_get_pid (qos->priv->polkit, subject, &pid);
if (!retval) {
error = g_error_new (DKP_DAEMON_ERROR, DKP_DAEMON_ERROR_GENERAL, "cannot get PID");
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "cannot get PID");
dbus_g_method_return_error (context, error);
goto out;
}
......@@ -302,7 +302,7 @@ dkp_qos_request_latency (DkpQos *qos, const gchar *type_text, gint value, gboole
/* get command line */
cmdline = dkp_qos_get_cmdline (pid);
if (cmdline == NULL) {
error = g_error_new (DKP_DAEMON_ERROR, DKP_DAEMON_ERROR_GENERAL, "cannot get cmdline");
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "cannot get cmdline");
dbus_g_method_return_error (context, error);
goto out;
}
......@@ -361,7 +361,7 @@ dkp_qos_cancel_request (DkpQos *qos, guint cookie, DBusGMethodInvocation *contex
/* find the correct cookie */
obj = dkp_qos_find_from_cookie (qos, cookie);
if (obj == NULL) {
error = g_error_new (DKP_DAEMON_ERROR, DKP_DAEMON_ERROR_GENERAL,
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL,
"Cannot find request for #%i", cookie);
dbus_g_method_return_error (context, error);
goto out;
......@@ -370,7 +370,7 @@ dkp_qos_cancel_request (DkpQos *qos, guint cookie, DBusGMethodInvocation *contex
/* get the sender? */
sender = dbus_g_method_get_sender (context);
if (sender == NULL) {
error = g_error_new (DKP_DAEMON_ERROR, DKP_DAEMON_ERROR_GENERAL, "no DBUS sender");
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "no DBUS sender");
dbus_g_method_return_error (context, error);
goto out;
}
......@@ -412,7 +412,7 @@ dkp_qos_get_latency (DkpQos *qos, const gchar *type_text, gint *value, GError **
/* get correct data */
type = dkp_qos_type_from_text (type_text);
if (type == DKP_QOS_TYPE_UNKNOWN) {
g_set_error (error, DKP_DAEMON_ERROR, DKP_DAEMON_ERROR_GENERAL, "type invalid: %s", type_text);
g_set_error (error, UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "type invalid: %s", type_text);
return FALSE;
}
......@@ -433,7 +433,7 @@ dkp_qos_set_minimum_latency (DkpQos *qos, const gchar *type_text, gint value, DB
/* type valid? */
type = dkp_qos_type_from_text (type_text);
if (type == DKP_QOS_TYPE_UNKNOWN) {
error = g_error_new (DKP_DAEMON_ERROR, DKP_DAEMON_ERROR_GENERAL, "type invalid: %s", type_text);
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "type invalid: %s", type_text);
dbus_g_method_return_error (context, error);
return;
}
......
......@@ -53,7 +53,7 @@ main (int argc, char **argv)
dkp_polkit_test (test);
dkp_qos_test (test);
dkp_wakeups_test (test);
dkp_daemon_test (test);
up_daemon_test (test);
return (egg_test_finish (test));
}
......
......@@ -171,7 +171,7 @@ dkp_wakeups_get_total (DkpWakeups *wakeups, guint *value, GError **error)
/* no capability */
if (!wakeups->priv->has_capability) {
g_set_error_literal (error, DKP_DAEMON_ERROR, DKP_DAEMON_ERROR_GENERAL, "no hardware support");
g_set_error_literal (error, UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "no hardware support");
return FALSE;
}
......@@ -180,7 +180,7 @@ dkp_wakeups_get_total (DkpWakeups *wakeups, guint *value, GError **error)
/* no data */
if (!ret) {
g_set_error_literal (error, DKP_DAEMON_ERROR, DKP_DAEMON_ERROR_GENERAL, "cannot enable timerstats");
g_set_error_literal (error, UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "cannot enable timerstats");
return FALSE;
}
......@@ -201,7 +201,7 @@ dkp_wakeups_get_data (DkpWakeups *wakeups, GPtrArray **data, GError **error)
/* no capability */
if (!wakeups->priv->has_capability) {
g_set_error_literal (error, DKP_DAEMON_ERROR, DKP_DAEMON_ERROR_GENERAL, "no hardware support");
g_set_error_literal (error, UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "no hardware support");
return FALSE;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment