summaryrefslogtreecommitdiff
path: root/src/freebsd/up-acpi-native.c
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2010-01-18 13:06:07 +0000
committerRichard Hughes <richard@hughsie.com>2010-01-18 13:06:07 +0000
commit2a9dff08f61002f495f3a55ace168e21fc249902 (patch)
tree7211cbe449e9c943ba44ed46dcf1dcb3607f01d4 /src/freebsd/up-acpi-native.c
parent8d4ec58206cf9939830f567c8aaeed5286e785f7 (diff)
downloadupower-2a9dff08f61002f495f3a55ace168e21fc249902.tar.gz
trivial: convert freebsd private object to using upower prefix (no ABI or API changes)
Diffstat (limited to 'src/freebsd/up-acpi-native.c')
-rw-r--r--src/freebsd/up-acpi-native.c146
1 files changed, 73 insertions, 73 deletions
diff --git a/src/freebsd/up-acpi-native.c b/src/freebsd/up-acpi-native.c
index c6b4968..eb58db5 100644
--- a/src/freebsd/up-acpi-native.c
+++ b/src/freebsd/up-acpi-native.c
@@ -1,5 +1,5 @@
-/* dkp-acpi-native.c generated by valac, the Vala compiler
- * generated from dkp-acpi-native.vala, do not modify */
+/* up-acpi-native.c generated by valac, the Vala compiler
+ * generated from up-acpi-native.vala, do not modify */
#include <glib.h>
@@ -8,69 +8,69 @@
#include <string.h>
-#define TYPE_DKP_ACPI_NATIVE (dkp_acpi_native_get_type ())
-#define DKP_ACPI_NATIVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DKP_ACPI_NATIVE, DkpAcpiNative))
-#define DKP_ACPI_NATIVE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DKP_ACPI_NATIVE, DkpAcpiNativeClass))
-#define IS_DKP_ACPI_NATIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DKP_ACPI_NATIVE))
-#define IS_DKP_ACPI_NATIVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DKP_ACPI_NATIVE))
-#define DKP_ACPI_NATIVE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DKP_ACPI_NATIVE, DkpAcpiNativeClass))
+#define TYPE_UP_ACPI_NATIVE (up_acpi_native_get_type ())
+#define UP_ACPI_NATIVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UP_ACPI_NATIVE, UpAcpiNative))
+#define UP_ACPI_NATIVE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UP_ACPI_NATIVE, UpAcpiNativeClass))
+#define IS_UP_ACPI_NATIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UP_ACPI_NATIVE))
+#define IS_UP_ACPI_NATIVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UP_ACPI_NATIVE))
+#define UP_ACPI_NATIVE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UP_ACPI_NATIVE, UpAcpiNativeClass))
-typedef struct _DkpAcpiNative DkpAcpiNative;
-typedef struct _DkpAcpiNativeClass DkpAcpiNativeClass;
-typedef struct _DkpAcpiNativePrivate DkpAcpiNativePrivate;
+typedef struct _UpAcpiNative UpAcpiNative;
+typedef struct _UpAcpiNativeClass UpAcpiNativeClass;
+typedef struct _UpAcpiNativePrivate UpAcpiNativePrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _g_match_info_free0(var) ((var == NULL) ? NULL : (var = (g_match_info_free (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
-struct _DkpAcpiNative {
+struct _UpAcpiNative {
GObject parent_instance;
- DkpAcpiNativePrivate * priv;
+ UpAcpiNativePrivate * priv;
};
-struct _DkpAcpiNativeClass {
+struct _UpAcpiNativeClass {
GObjectClass parent_class;
};
-struct _DkpAcpiNativePrivate {
+struct _UpAcpiNativePrivate {
gchar *_driver;
gint _unit;
gchar *_path;
};
-static gpointer dkp_acpi_native_parent_class = NULL;
+static gpointer up_acpi_native_parent_class = NULL;
-GType dkp_acpi_native_get_type (void);
-#define DKP_ACPI_NATIVE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DKP_ACPI_NATIVE, DkpAcpiNativePrivate))
+GType up_acpi_native_get_type (void);
+#define UP_ACPI_NATIVE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_UP_ACPI_NATIVE, UpAcpiNativePrivate))
enum {
- DKP_ACPI_NATIVE_DUMMY_PROPERTY,
- DKP_ACPI_NATIVE_DRIVER,
- DKP_ACPI_NATIVE_UNIT,
- DKP_ACPI_NATIVE_PATH
+ UP_ACPI_NATIVE_DUMMY_PROPERTY,
+ UP_ACPI_NATIVE_DRIVER,
+ UP_ACPI_NATIVE_UNIT,
+ UP_ACPI_NATIVE_PATH
};
-DkpAcpiNative* dkp_acpi_native_new (const char* path);
-DkpAcpiNative* dkp_acpi_native_construct (GType object_type, const char* path);
-DkpAcpiNative* dkp_acpi_native_new_driver_unit (const char* driver, gint unit);
-DkpAcpiNative* dkp_acpi_native_construct_driver_unit (GType object_type, const char* driver, gint unit);
-const char* dkp_acpi_native_get_driver (DkpAcpiNative* self);
-gint dkp_acpi_native_get_unit (DkpAcpiNative* self);
-const char* dkp_acpi_native_get_path (DkpAcpiNative* self);
-static void dkp_acpi_native_finalize (GObject* obj);
-static void dkp_acpi_native_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
+UpAcpiNative* up_acpi_native_new (const char* path);
+UpAcpiNative* up_acpi_native_construct (GType object_type, const char* path);
+UpAcpiNative* up_acpi_native_new_driver_unit (const char* driver, gint unit);
+UpAcpiNative* up_acpi_native_construct_driver_unit (GType object_type, const char* driver, gint unit);
+const char* up_acpi_native_get_driver (UpAcpiNative* self);
+gint up_acpi_native_get_unit (UpAcpiNative* self);
+const char* up_acpi_native_get_path (UpAcpiNative* self);
+static void up_acpi_native_finalize (GObject* obj);
+static void up_acpi_native_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
-DkpAcpiNative* dkp_acpi_native_construct (GType object_type, const char* path) {
+UpAcpiNative* up_acpi_native_construct (GType object_type, const char* path) {
GError * _inner_error_;
- DkpAcpiNative * self;
+ UpAcpiNative * self;
GRegex* r;
GMatchInfo* mi;
gboolean ret = FALSE;
char* _tmp9_;
g_return_val_if_fail (path != NULL, NULL);
_inner_error_ = NULL;
- self = (DkpAcpiNative*) g_object_new (object_type, NULL);
+ self = (UpAcpiNative*) g_object_new (object_type, NULL);
r = NULL;
mi = NULL;
{
@@ -128,17 +128,17 @@ DkpAcpiNative* dkp_acpi_native_construct (GType object_type, const char* path) {
}
-DkpAcpiNative* dkp_acpi_native_new (const char* path) {
- return dkp_acpi_native_construct (TYPE_DKP_ACPI_NATIVE, path);
+UpAcpiNative* up_acpi_native_new (const char* path) {
+ return up_acpi_native_construct (TYPE_UP_ACPI_NATIVE, path);
}
-DkpAcpiNative* dkp_acpi_native_construct_driver_unit (GType object_type, const char* driver, gint unit) {
- DkpAcpiNative * self;
+UpAcpiNative* up_acpi_native_construct_driver_unit (GType object_type, const char* driver, gint unit) {
+ UpAcpiNative * self;
char* _tmp0_;
char* _tmp1_;
g_return_val_if_fail (driver != NULL, NULL);
- self = (DkpAcpiNative*) g_object_new (object_type, NULL);
+ self = (UpAcpiNative*) g_object_new (object_type, NULL);
self->priv->_driver = (_tmp0_ = g_strdup (driver), _g_free0 (self->priv->_driver), _tmp0_);
self->priv->_unit = unit;
self->priv->_path = (_tmp1_ = g_strdup_printf ("dev.%s.%i", self->priv->_driver, self->priv->_unit), _g_free0 (self->priv->_path), _tmp1_);
@@ -146,12 +146,12 @@ DkpAcpiNative* dkp_acpi_native_construct_driver_unit (GType object_type, const c
}
-DkpAcpiNative* dkp_acpi_native_new_driver_unit (const char* driver, gint unit) {
- return dkp_acpi_native_construct_driver_unit (TYPE_DKP_ACPI_NATIVE, driver, unit);
+UpAcpiNative* up_acpi_native_new_driver_unit (const char* driver, gint unit) {
+ return up_acpi_native_construct_driver_unit (TYPE_UP_ACPI_NATIVE, driver, unit);
}
-const char* dkp_acpi_native_get_driver (DkpAcpiNative* self) {
+const char* up_acpi_native_get_driver (UpAcpiNative* self) {
const char* result;
g_return_val_if_fail (self != NULL, NULL);
result = self->priv->_driver;
@@ -159,7 +159,7 @@ const char* dkp_acpi_native_get_driver (DkpAcpiNative* self) {
}
-gint dkp_acpi_native_get_unit (DkpAcpiNative* self) {
+gint up_acpi_native_get_unit (UpAcpiNative* self) {
gint result;
g_return_val_if_fail (self != NULL, 0);
result = self->priv->_unit;
@@ -167,7 +167,7 @@ gint dkp_acpi_native_get_unit (DkpAcpiNative* self) {
}
-const char* dkp_acpi_native_get_path (DkpAcpiNative* self) {
+const char* up_acpi_native_get_path (UpAcpiNative* self) {
const char* result;
g_return_val_if_fail (self != NULL, NULL);
result = self->priv->_path;
@@ -175,53 +175,53 @@ const char* dkp_acpi_native_get_path (DkpAcpiNative* self) {
}
-static void dkp_acpi_native_class_init (DkpAcpiNativeClass * klass) {
- dkp_acpi_native_parent_class = g_type_class_peek_parent (klass);
- g_type_class_add_private (klass, sizeof (DkpAcpiNativePrivate));
- G_OBJECT_CLASS (klass)->get_property = dkp_acpi_native_get_property;
- G_OBJECT_CLASS (klass)->finalize = dkp_acpi_native_finalize;
- g_object_class_install_property (G_OBJECT_CLASS (klass), DKP_ACPI_NATIVE_DRIVER, g_param_spec_string ("driver", "driver", "driver", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
- g_object_class_install_property (G_OBJECT_CLASS (klass), DKP_ACPI_NATIVE_UNIT, g_param_spec_int ("unit", "unit", "unit", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
- g_object_class_install_property (G_OBJECT_CLASS (klass), DKP_ACPI_NATIVE_PATH, g_param_spec_string ("path", "path", "path", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
+static void up_acpi_native_class_init (UpAcpiNativeClass * klass) {
+ up_acpi_native_parent_class = g_type_class_peek_parent (klass);
+ g_type_class_add_private (klass, sizeof (UpAcpiNativePrivate));
+ G_OBJECT_CLASS (klass)->get_property = up_acpi_native_get_property;
+ G_OBJECT_CLASS (klass)->finalize = up_acpi_native_finalize;
+ g_object_class_install_property (G_OBJECT_CLASS (klass), UP_ACPI_NATIVE_DRIVER, g_param_spec_string ("driver", "driver", "driver", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
+ g_object_class_install_property (G_OBJECT_CLASS (klass), UP_ACPI_NATIVE_UNIT, g_param_spec_int ("unit", "unit", "unit", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
+ g_object_class_install_property (G_OBJECT_CLASS (klass), UP_ACPI_NATIVE_PATH, g_param_spec_string ("path", "path", "path", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}
-static void dkp_acpi_native_instance_init (DkpAcpiNative * self) {
- self->priv = DKP_ACPI_NATIVE_GET_PRIVATE (self);
+static void up_acpi_native_instance_init (UpAcpiNative * self) {
+ self->priv = UP_ACPI_NATIVE_GET_PRIVATE (self);
}
-static void dkp_acpi_native_finalize (GObject* obj) {
- DkpAcpiNative * self;
- self = DKP_ACPI_NATIVE (obj);
+static void up_acpi_native_finalize (GObject* obj) {
+ UpAcpiNative * self;
+ self = UP_ACPI_NATIVE (obj);
_g_free0 (self->priv->_driver);
_g_free0 (self->priv->_path);
- G_OBJECT_CLASS (dkp_acpi_native_parent_class)->finalize (obj);
+ G_OBJECT_CLASS (up_acpi_native_parent_class)->finalize (obj);
}
-GType dkp_acpi_native_get_type (void) {
- static GType dkp_acpi_native_type_id = 0;
- if (dkp_acpi_native_type_id == 0) {
- static const GTypeInfo g_define_type_info = { sizeof (DkpAcpiNativeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dkp_acpi_native_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DkpAcpiNative), 0, (GInstanceInitFunc) dkp_acpi_native_instance_init, NULL };
- dkp_acpi_native_type_id = g_type_register_static (G_TYPE_OBJECT, "DkpAcpiNative", &g_define_type_info, 0);
+GType up_acpi_native_get_type (void) {
+ static GType up_acpi_native_type_id = 0;
+ if (up_acpi_native_type_id == 0) {
+ static const GTypeInfo g_define_type_info = { sizeof (UpAcpiNativeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) up_acpi_native_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UpAcpiNative), 0, (GInstanceInitFunc) up_acpi_native_instance_init, NULL };
+ up_acpi_native_type_id = g_type_register_static (G_TYPE_OBJECT, "UpAcpiNative", &g_define_type_info, 0);
}
- return dkp_acpi_native_type_id;
+ return up_acpi_native_type_id;
}
-static void dkp_acpi_native_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
- DkpAcpiNative * self;
- self = DKP_ACPI_NATIVE (object);
+static void up_acpi_native_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
+ UpAcpiNative * self;
+ self = UP_ACPI_NATIVE (object);
switch (property_id) {
- case DKP_ACPI_NATIVE_DRIVER:
- g_value_set_string (value, dkp_acpi_native_get_driver (self));
+ case UP_ACPI_NATIVE_DRIVER:
+ g_value_set_string (value, up_acpi_native_get_driver (self));
break;
- case DKP_ACPI_NATIVE_UNIT:
- g_value_set_int (value, dkp_acpi_native_get_unit (self));
+ case UP_ACPI_NATIVE_UNIT:
+ g_value_set_int (value, up_acpi_native_get_unit (self));
break;
- case DKP_ACPI_NATIVE_PATH:
- g_value_set_string (value, dkp_acpi_native_get_path (self));
+ case UP_ACPI_NATIVE_PATH:
+ g_value_set_string (value, up_acpi_native_get_path (self));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);