value[0], NULL);
}
+static void update_phone_alerts(const char *category, const char *description)
+{
+ unsigned int i;
+
+ if (g_str_equal(category, "ringer")) {
+ if (g_str_equal(description, "enabled"))
+ ringer_setting = RINGER_NORMAL;
+ else if (g_str_equal(description, "disabled"))
+ ringer_setting = RINGER_SILENT;
+ }
+
+ for (i = 0; i < G_N_ELEMENTS(pasp_categories); i++) {
+ if (g_str_equal(pasp_categories[i], category)) {
+ if (g_str_equal(description, "active"))
+ alert_status |= (1 << i);
+ else if (g_str_equal(description, "not active"))
+ alert_status &= ~(1 << i);
+ }
+ }
+}
+
static DBusMessage *new_alert(DBusConnection *conn, DBusMessage *msg,
void *data)
{
}
}
+ if (pasp_category(category))
+ update_phone_alerts(category, description);
+
DBG("NewAlert(\"%s\", %d, \"%s\")", category, count, description);
return dbus_message_new_method_return(msg);