summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-10-24 20:02:53 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-10-24 20:02:53 +0000
commit999314c0bc7a87f1fb4a771569aaed99aa9ac5b6 (patch)
tree33365106169435072a89a834907aaf529767cdb9
parentf6e4c2b47dbf0761224232888dca66ed0bddd1c7 (diff)
Add support for Enable config option
-rw-r--r--audio/main.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/audio/main.c b/audio/main.c
index 2ec605d0..61ca1e3e 100644
--- a/audio/main.c
+++ b/audio/main.c
@@ -93,6 +93,27 @@ static void read_config(const char *file)
g_free(str);
}
+ str = g_key_file_get_string(keyfile, "General", "Enable", &err);
+ if (err) {
+ debug("%s: %s", file, err->message);
+ g_error_free(err);
+ err = NULL;
+ } else {
+ if (strstr(str, "Headset"))
+ enabled.headset = TRUE;
+ if (strstr(str, "Gateway"))
+ enabled.gateway = TRUE;
+ if (strstr(str, "Sink"))
+ enabled.sink = TRUE;
+ if (strstr(str, "Source"))
+ enabled.source = TRUE;
+ if (strstr(str, "Control"))
+ enabled.control = TRUE;
+ if (strstr(str, "Target"))
+ enabled.target = TRUE;
+ g_free(str);
+ }
+
str = g_key_file_get_string(keyfile, "General", "Disable", &err);
if (err) {
debug("%s: %s", file, err->message);