diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-07-30 00:47:29 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-07-30 00:47:29 +0200 |
commit | 5868fadaf15dbd41807c6f7a303c1ac8842cc703 (patch) | |
tree | ad42a814cd743b7ada8b0abc32b18aa91d722117 /src/canberra-gtk-play.c | |
parent | 8b771276641f07e5435e56f7f7a0392815f10708 (diff) | |
download | libcanberra-5868fadaf15dbd41807c6f7a303c1ac8842cc703.tar.gz |
allow setting of cache control property
Diffstat (limited to 'src/canberra-gtk-play.c')
-rw-r--r-- | src/canberra-gtk-play.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/canberra-gtk-play.c b/src/canberra-gtk-play.c index 527a9f8..8c141f6 100644 --- a/src/canberra-gtk-play.c +++ b/src/canberra-gtk-play.c @@ -49,12 +49,13 @@ static void callback(ca_context *c, uint32_t id, int error, void *userdata) { int main (int argc, char *argv[]) { GOptionContext *oc; ca_proplist *p; - static gchar *event_id = NULL, *event_description = NULL; + static gchar *event_id = NULL, *event_description = NULL, *cache_control = NULL; int ret = 0, r; static const GOptionEntry options[] = { - { "id", 0, 0, G_OPTION_ARG_STRING, &event_id, "Event sound identifier", "STRING" }, - { "description", 0, 0, G_OPTION_ARG_STRING, &event_description, "Event sound description", "STRING" }, + { "id", 0, 0, G_OPTION_ARG_STRING, &event_id, "Event sound identifier", "STRING" }, + { "description", 0, 0, G_OPTION_ARG_STRING, &event_description, "Event sound description", "STRING" }, + { "cache-control", 0, 0, G_OPTION_ARG_STRING, &cache_control, "Cache control (permanent, volatile, never)", "STRING" }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; @@ -84,6 +85,9 @@ int main (int argc, char *argv[]) { ca_proplist_create(&p); ca_proplist_sets(p, CA_PROP_EVENT_ID, event_id); + if (cache_control) + ca_proplist_sets(p, CA_PROP_CANBERRA_CACHE_CONTROL, cache_control); + if (event_description) ca_proplist_sets(p, CA_PROP_EVENT_DESCRIPTION, event_description); |