Commit e04b5a9e authored by Richard Hughes's avatar Richard Hughes

trivial: DkpNative -> UpNative (no ABI or API break)

parent ad282a53
......@@ -23,7 +23,7 @@
#include "up-native.h"
/**
* dkp_native_get_native_path:
* up_native_get_native_path:
* @object: the native tracking object
*
* This converts a GObject used as the device data into a native path.
......@@ -33,7 +33,7 @@
* Return value: The native path for the device which is unique, e.g. "/sys/class/power/BAT1"
**/
const gchar *
dkp_native_get_native_path (GObject *object)
up_native_get_native_path (GObject *object)
{
return "/sys/dummy";
}
......@@ -45,17 +45,17 @@ dkp_native_get_native_path (GObject *object)
#include "egg-test.h"
void
dkp_native_test (gpointer user_data)
up_native_test (gpointer user_data)
{
EggTest *test = (EggTest *) user_data;
const gchar *path;
if (!egg_test_start (test, "DkpNative"))
if (!egg_test_start (test, "UpNative"))
return;
/************************************************************/
egg_test_title (test, "get instance");
path = dkp_native_get_native_path (NULL);
path = up_native_get_native_path (NULL);
egg_test_assert (test, (g_strcmp0 (path, "/sys/dummy") == 0));
egg_test_end (test);
......
......@@ -24,7 +24,7 @@
#include "up-native.h"
/**
* dkp_native_get_native_path:
* up_native_get_native_path:
* @object: the native tracking object
*
* This converts a GObject used as the device data into a native path.
......@@ -32,7 +32,7 @@
* Return value: The native path for the device which is unique, e.g. "/sys/class/power/BAT1"
**/
const gchar *
dkp_native_get_native_path (GObject *object)
up_native_get_native_path (GObject *object)
{
return up_acpi_native_get_path (UP_ACPI_NATIVE (object));
}
......@@ -44,19 +44,19 @@ dkp_native_get_native_path (GObject *object)
#include "egg-test.h"
void
dkp_native_test (gpointer user_data)
up_native_test (gpointer user_data)
{
EggTest *test = (EggTest *) user_data;
UpAcpiNative *dan;
const gchar *path;
if (!egg_test_start (test, "DkpNative"))
if (!egg_test_start (test, "UpNative"))
return;
/************************************************************/
egg_test_title (test, "get instance");
dan = up_acpi_native_new_driver_unit ("battery", 0);
path = dkp_native_get_native_path (dan);
path = up_native_get_native_path (dan);
egg_test_assert (test, (g_strcmp0 (path, "dev.battery.0") == 0));
g_object_unref (dan);
......
......@@ -24,7 +24,7 @@
#include "up-native.h"
/**
* dkp_native_get_native_path:
* up_native_get_native_path:
* @object: the native tracking object
*
* This converts a GObject used as the device data into a native path.
......@@ -34,7 +34,7 @@
* Return value: The native path for the device which is unique, e.g. "/sys/class/power/BAT1"
**/
const gchar *
dkp_native_get_native_path (GObject *object)
up_native_get_native_path (GObject *object)
{
return g_udev_device_get_sysfs_path (G_UDEV_DEVICE (object));
}
......
......@@ -59,7 +59,7 @@ up_device_list_lookup (UpDeviceList *list, GObject *native)
g_return_val_if_fail (UP_IS_DEVICE_LIST (list), NULL);
/* does device exist in db? */
native_path = dkp_native_get_native_path (native);
native_path = up_native_get_native_path (native);
if (native_path == NULL)
return NULL;
device = g_hash_table_lookup (list->priv->map_native_path_to_device, native_path);
......@@ -83,7 +83,7 @@ up_device_list_insert (UpDeviceList *list, GObject *native, GObject *device)
g_return_val_if_fail (native != NULL, FALSE);
g_return_val_if_fail (device != NULL, FALSE);
native_path = dkp_native_get_native_path (native);
native_path = up_native_get_native_path (native);
if (native_path == NULL) {
egg_warning ("failed to get native path");
return FALSE;
......
......@@ -538,7 +538,7 @@ up_device_coldplug (UpDevice *device, UpDaemon *daemon, GObject *native)
device->priv->native = g_object_ref (native);
device->priv->daemon = g_object_ref (daemon);
native_path = dkp_native_get_native_path (native);
native_path = up_native_get_native_path (native);
device->priv->native_path = g_strdup (native_path);
/* stop signals and callbacks */
......
......@@ -18,17 +18,17 @@
*
*/
#ifndef __DKP_NATIVE_H__
#define __DKP_NATIVE_H__
#ifndef __UP_NATIVE_H__
#define __UP_NATIVE_H__
#include <glib-object.h>
G_BEGIN_DECLS
const gchar *dkp_native_get_native_path (GObject *object);
void dkp_native_test (gpointer user_data);
const gchar *up_native_get_native_path (GObject *object);
void up_native_test (gpointer user_data);
G_END_DECLS
#endif /* __DKP_NATIVE_H__ */
#endif /* __UP_NATIVE_H__ */
......@@ -49,7 +49,7 @@ main (int argc, char **argv)
up_device_test (test);
up_device_list_test (test);
dkp_history_test (test);
dkp_native_test (test);
up_native_test (test);
up_polkit_test (test);
dkp_qos_test (test);
dkp_wakeups_test (test);
......
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