[prev in list] [next in list] [prev in thread] [next in thread]
List: alsaplayer-devel
Subject: Re: [Alsaplayer-devel]display_playlist
From: Frank Baumgart <godot () uni-paderborn ! de>
Date: 2003-11-06 22:04:41
[Download RAW message or body]
Hi Erik,
> However, I think the following might work - please look it over as it is a
> very quick hack in an unfamiliar place for me ...
Note: only reviewed, NOT tested.
Your patch looks good to me, apart that I would drop the "playlist item"
part of the key_id and just print the item number (if at all) to
simplify parsing on the client side.
Regards,
Frank
> + case AP_GET_PLAYLIST:
> + char key_id[KEYID_LEN];
> + std::vector<PlayItem>::const_iterator p =
> playlist->queue.begin();
> + int nitems = 0;
> + while(p != queue.end()) {
> + snprintf(key_id,KEYID_LEN, "playlist item %d",++nitems);
> + ap_message_add_string(reply, key_id,
> (*p).filename.c_str());
> + }
> + ap_message_add_int32(reply, "int",nitems);
> + ap_message_add_int32(reply, "ack",1);
> + break;
_______________________________________________
alsaplayer-devel mailing list
alsaplayer-devel@lists.tartarus.org
http://lists.tartarus.org/mailman/listinfo/alsaplayer-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic