diff options
author | Martin Szulecki | 2009-12-31 15:31:08 +0100 |
---|---|---|
committer | Martin Szulecki | 2009-12-31 15:31:08 +0100 |
commit | 50172700b865fd50aed4608c5c883630910dbeb4 (patch) | |
tree | 53fdd92a94e4ed9aaf08faabcd4107a79803014a /src | |
parent | 4fa6ea79bf9811887df6a9f74ea750bac812c888 (diff) | |
download | sbmanager-50172700b865fd50aed4608c5c883630910dbeb4.tar.gz sbmanager-50172700b865fd50aed4608c5c883630910dbeb4.tar.bz2 |
Introduce sbitem helper to get display_name from item
Diffstat (limited to 'src')
-rw-r--r-- | src/sbmanager.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sbmanager.c b/src/sbmanager.c index 31d08b2..e3bf013 100644 --- a/src/sbmanager.c +++ b/src/sbmanager.c @@ -136,6 +136,16 @@ static gboolean elapsed_ms(struct timeval *tv, guint ms) } } +static char *sbitem_get_display_name(SBItem *item) +{ + char *strval = NULL; + plist_t node = plist_dict_get_item(item->node, "displayName"); + if (node && plist_get_node_type(node) == PLIST_STRING) { + plist_get_string_val(node, &strval); + } + return strval; +} + static void sbitem_free(SBItem *a) { if (a) { |