configuration: various fixes in the LUA config file
authorJanos Kovacs <jankovac503@gmail.com>
Fri, 1 Feb 2013 18:11:09 +0000 (20:11 +0200)
committerJanos Kovacs <jankovac503@gmail.com>
Fri, 1 Feb 2013 20:06:49 +0000 (22:06 +0200)
- add 'interrupt' application class
- add 'policy' attribute to 'audio_playback' resource
- add 'role' and 'policy' attributes to 'audio_recording' resource
- make 'audio_recording' nonshareable
- try-load the resource-dbus module instead of load

src/daemon/murphy.lua

index 1febd9d..a0f4221 100644 (file)
@@ -32,7 +32,7 @@ end
 
 -- load the dbus resource plugin
 if m:plugin_exists('resource-dbus') then
-    m:load_plugin('resource-dbus', {
+    m:try_load_plugin('resource-dbus', {
         dbus_bus = "system",
         dbus_service = "org.Murphy",
         dbus_track = true,
@@ -54,11 +54,12 @@ end
 
 
 -- define application classes
-application_class { name = "navigator", priority = 4 }
-application_class { name = "phone"    , priority = 3 }
-application_class { name = "game"     , priority = 2 }
-application_class { name = "player"   , priority = 1 }
-application_class { name = "implicit" , priority = 0 }
+application_class { name = "interrupt", priority = 99 }
+application_class { name = "navigator", priority =  4 }
+application_class { name = "phone"    , priority =  3 }
+application_class { name = "game"     , priority =  2 }
+application_class { name = "player"   , priority =  1 }
+application_class { name = "implicit" , priority =  0 }
 
 -- define zone attributes
 zone.attributes {
@@ -113,13 +114,18 @@ resource.class {
      name = "audio_playback",
      shareable = true,
      attributes = {
-         role = { mdb.string, "music", "rw" }
+         role = { mdb.string, "music", "rw" },
+         policy = { mdb.string, "relaxed", "rw" }
      }
 }
 
 resource.class {
      name = "audio_recording",
-     shareable = true
+     shareable = false,
+     attributes = {
+         role = { mdb.string, "music", "rw" },
+         policy = { mdb.string, "relaxed", "rw" }
+     }
 }
 
 resource.class {