Beispiel #1
0
static void
battery_destructor(plugin_instance *p)
{
    battery_priv *c = (battery_priv *) p;

    ENTER;
    if (c->timer)
        g_source_remove(c->timer);
    PLUGIN_CLASS(k)->destructor(p);
    class_put("meter");
    RET();
}
Beispiel #2
0
Datei: net.c Projekt: g7/fbpanel
static void
net_destructor(plugin_instance *p)
{
    net_priv *c = (net_priv *) p;

    ENTER;
    if (c->timer)
        g_source_remove(c->timer);
    PLUGIN_CLASS(k)->destructor(p);
    class_put("chart");
    RET();
}
Beispiel #3
0
static void
volume_destructor(plugin_instance *p)
{
    volume_priv *c = (volume_priv *) p;

    ENTER;
    g_source_remove(c->update_id);
    if (c->slider_window)
        gtk_widget_destroy(c->slider_window);
    PLUGIN_CLASS(k)->destructor(p);
    class_put("meter");
    RET();
}
Beispiel #4
0
Datei: user.c Projekt: g7/fbpanel
static void
user_destructor(plugin_instance *p)
{
    user_priv *c G_GNUC_UNUSED = (user_priv *) p;

    ENTER;
    PLUGIN_CLASS(k)->destructor(p);
    if (c->pid)
        kill(c->pid, SIGKILL);
    if (c->sid)
        g_source_remove(c->sid);
    class_put("menu");
    RET();
}
Beispiel #5
0
/*
 * test_class_get
 *	make test call to class_get which should return
 *	a pointer to the class passed in and increase
 *	the reference count to that kobject
 */
static int test_class_get() {
	int rc;
	struct class *tmp = NULL;

	/* get reference count before test call */
	tmp = class_get(&test_class);
	if (tmp == &test_class) {
		printk("tbase: Success get class\n");
		rc = 0;
	}
	else {
		printk("tbase: Failure get class\n");
		rc = 1;
	}

	class_put(&test_class);
 	return rc;
}