pa_tagstruct_puts(t, card->active_profile ? card->active_profile->name : NULL);
pa_tagstruct_put_proplist(t, card->proplist);
+
+ if (c->version < 26)
+ return;
+
+ if (card->ports) {
+ pa_device_port* port;
+ pa_proplist* proplist = pa_proplist_new(); /* For now - push an empty proplist */
+
+ pa_tagstruct_putu32(t, pa_hashmap_size(card->ports));
+
+ PA_HASHMAP_FOREACH(port, card->ports, state) {
+ pa_tagstruct_puts(t, port->name);
+ pa_tagstruct_puts(t, port->description);
+ pa_tagstruct_putu32(t, port->priority);
+ pa_tagstruct_putu32(t, port->available);
+ pa_tagstruct_putu8(t, /* FIXME: port->direction */ (port->is_input ? PA_DIRECTION_INPUT : 0) | (port->is_output ? PA_DIRECTION_OUTPUT : 0));
+ pa_tagstruct_put_proplist(t, proplist);
+
+ if (port->profiles) {
+ void* state2;
+ pa_tagstruct_putu32(t, pa_hashmap_size(port->profiles));
+ PA_HASHMAP_FOREACH(p, port->profiles, state2)
+ pa_tagstruct_puts(t, p->name);
+ } else
+ pa_tagstruct_putu32(t, 0);
+ }
+
+ pa_proplist_free(proplist);
+ } else
+ pa_tagstruct_putu32(t, 0);
}
static void module_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_module *module) {