]> code.delx.au - pulseaudio/commitdiff
dbusiface-card: Split some overly long lines.
authorTanu Kaskinen <tanuk@iki.fi>
Sat, 15 Aug 2009 02:51:55 +0000 (05:51 +0300)
committerTanu Kaskinen <tanuk@iki.fi>
Sat, 15 Aug 2009 02:51:55 +0000 (05:51 +0300)
src/modules/dbus/iface-card-profile.c
src/modules/dbus/iface-card-profile.h
src/modules/dbus/iface-card.c

index 2b85a5fc2a1aa3e6138267d643e5b3a2f7017241..4a1696c12da66af8f74650892272e9e93145778f 100644 (file)
@@ -182,7 +182,11 @@ static void handle_get_all(DBusConnection *conn, DBusMessage *msg, void *userdat
     dbus_message_unref(reply);
 }
 
-pa_dbusiface_card_profile *pa_dbusiface_card_profile_new(pa_dbusiface_card *card, pa_core *core, pa_card_profile *profile, uint32_t idx) {
+pa_dbusiface_card_profile *pa_dbusiface_card_profile_new(
+        pa_dbusiface_card *card,
+        pa_core *core,
+        pa_card_profile *profile,
+        uint32_t idx) {
     pa_dbusiface_card_profile *p = NULL;
 
     pa_assert(card);
index 9edcde73fa1067ee713ed9b0b6895fe9a53da2b2..a09767f81733dc3cadb99e179cc2ea25bfb2a368 100644 (file)
 
 typedef struct pa_dbusiface_card_profile pa_dbusiface_card_profile;
 
-pa_dbusiface_card_profile *pa_dbusiface_card_profile_new(pa_dbusiface_card *card, pa_core *core, pa_card_profile *profile, uint32_t idx);
+pa_dbusiface_card_profile *pa_dbusiface_card_profile_new(
+        pa_dbusiface_card *card,
+        pa_core *core,
+        pa_card_profile *profile,
+        uint32_t idx);
 void pa_dbusiface_card_profile_free(pa_dbusiface_card_profile *p);
 
 const char *pa_dbusiface_card_profile_get_path(pa_dbusiface_card_profile *p);
index 64ec12a95a0eb1da2234082e0da63025035a0b96..40031d2e08023fa837ac870f8e4cb5d08c5ab726 100644 (file)
@@ -312,7 +312,10 @@ static void handle_get_active_profile(DBusConnection *conn, DBusMessage *msg, vo
     pa_assert(c);
 
     if (!c->active_profile) {
-        pa_dbus_send_error(conn, msg, PA_DBUS_ERROR_NO_SUCH_PROPERTY, "The card %s has no profiles, and therefore there's no active profile either.", c->card->name);
+        pa_assert(pa_hashmap_isempty(c->profiles));
+
+        pa_dbus_send_error(conn, msg, PA_DBUS_ERROR_NO_SUCH_PROPERTY,
+                           "The card %s has no profiles, and therefore there's no active profile either.", c->card->name);
         return;
     }
 
@@ -470,7 +473,9 @@ static void subscription_cb(pa_core *core, pa_subscription_event_type_t t, uint3
             c->active_profile = c->card->active_profile;
             object_path = pa_dbusiface_card_profile_get_path(pa_hashmap_get(c->profiles, c->active_profile->name));
 
-            pa_assert_se(signal = dbus_message_new_signal(c->path, PA_DBUSIFACE_CARD_INTERFACE, signals[SIGNAL_ACTIVE_PROFILE_UPDATED].name));
+            pa_assert_se(signal = dbus_message_new_signal(c->path,
+                                                          PA_DBUSIFACE_CARD_INTERFACE,
+                                                          signals[SIGNAL_ACTIVE_PROFILE_UPDATED].name));
             pa_assert_se(dbus_message_append_args(signal, DBUS_TYPE_OBJECT_PATH, &object_path, DBUS_TYPE_INVALID));
 
             pa_dbus_protocol_send_signal(c->dbus_protocol, signal);
@@ -483,7 +488,9 @@ static void subscription_cb(pa_core *core, pa_subscription_event_type_t t, uint3
 
             pa_proplist_update(c->proplist, PA_UPDATE_SET, c->card->proplist);
 
-            pa_assert_se(signal = dbus_message_new_signal(c->path, PA_DBUSIFACE_CARD_INTERFACE, signals[SIGNAL_PROPERTY_LIST_UPDATED].name));
+            pa_assert_se(signal = dbus_message_new_signal(c->path,
+                                                          PA_DBUSIFACE_CARD_INTERFACE,
+                                                          signals[SIGNAL_PROPERTY_LIST_UPDATED].name));
             dbus_message_iter_init_append(signal, &msg_iter);
             pa_dbus_append_proplist(&msg_iter, c->proplist);