示例#1
0
static void
hal_device_store_finalize (GObject *obj)
{
	HalDeviceStore *store = HAL_DEVICE_STORE (obj);

	g_slist_foreach (store->devices, (GFunc) g_object_unref, NULL);

	if (parent_class->finalize)
		parent_class->finalize (obj);
}
示例#2
0
static void
emit_device_capability_added (HalDevice *device,
			      const char *capability,
			      gpointer data)
{
	HalDeviceStore *store = HAL_DEVICE_STORE (data);

	g_signal_emit (store, signals[DEVICE_CAPABILITY_ADDED], 0,
		       device, capability);
}
示例#3
0
static void
emit_device_lock_released (HalDevice *device,
                           const char *lock_name,
                           const char *lock_owner,
                           gpointer data)
{
	HalDeviceStore *store = HAL_DEVICE_STORE (data);

	g_signal_emit (store, signals[DEVICE_LOCK_RELEASED], 0,
		       device, lock_name, lock_owner);
}
示例#4
0
static void
device_pre_property_changed (HalDevice *device,
			      const char *key,
			      gboolean removed,
			      gpointer data)
{
	HalDeviceStore *store = HAL_DEVICE_STORE (data);

	if (hal_device_property_get_type (device, key) == HAL_PROPERTY_TYPE_STRING) {
		property_index_modify_string(store, device, key, FALSE);
	}
}
示例#5
0
static void
emit_device_property_changed (HalDevice *device,
			      const char *key,
			      gboolean added,
			      gboolean removed,
			      gpointer data)
{
	HalDeviceStore *store = HAL_DEVICE_STORE (data);

	g_signal_emit (store, signals[DEVICE_PROPERTY_CHANGED], 0,
		       device, key, added, removed);
}
示例#6
0
static void
emit_device_property_changed (HalDevice *device,
			      const char *key,
			      gboolean added,
			      gboolean removed,
			      gpointer data)
{
	HalDeviceStore *store = HAL_DEVICE_STORE (data);

	if (hal_device_property_get_type (device, key) == HAL_PROPERTY_TYPE_STRING) {
		property_index_modify_string(store, device, key, TRUE);
	}

	g_signal_emit (store, signals[DEVICE_PROPERTY_CHANGED], 0,
		       device, key, added, removed);
}