diff options
Diffstat (limited to 'src/daemon/sample-config/resource.cfg')
-rw-r--r-- | src/daemon/sample-config/resource.cfg | 136 |
1 files changed, 136 insertions, 0 deletions
diff --git a/src/daemon/sample-config/resource.cfg b/src/daemon/sample-config/resource.cfg new file mode 100644 index 0000000..07b6890 --- /dev/null +++ b/src/daemon/sample-config/resource.cfg @@ -0,0 +1,136 @@ +-- -*- mode: lua -*- + +-- load the native resource plugin +load_if_exists('resource-native') + +-- load the D-Bus resource plugin if we have it and D-Bus +try_load('resource-dbus', { + dbus_bus = "session", + dbus_service = "org.Murphy", + dbus_track = true, + default_zone = "driver", + default_class = "implicit" +}) + +-- try loading the WRT resource plugin +try_load('resource-wrt', { + address = "wsck:127.0.0.1:4000/murphy", + httpdir = "src/plugins/resource-wrt", + --[[ + sslcert = 'src/plugins/resource-wrt/resource.crt', + sslpkey = 'src/plugins/resource-wrt/resource.key', + --]] +}) + +-- load the IVI resource manager if it is available +load_if_exists('ivi-resource-manager') + +-- +-- define application classes +-- +application_class { name="interrupt", priority=99, + modal=true , share=false, order="fifo" } +application_class { name="navigator", priority=4 , + modal=false, share=true , order="fifo" } +application_class { name="phone" , priority=3 , + modal=false, share=true , order="lifo" } +application_class { name="game" , priority=2 , + modal=false, share=true , order="lifo" } +application_class { name="player" , priority=1 , + modal=false, share=true , order="lifo" } +application_class { name="implicit" , priority=0 , + modal=false, share=true , order="lifo" } + +-- +-- define zones +-- +zone.attributes { + type = {mdb.string, "common", "rw"}, + location = {mdb.string, "anywhere", "rw"} +} + +zone { + name = "driver", + attributes = { + type = "common", + location = "front-left" + } +} + +zone { + name = "passanger1", + attributes = { + type = "private", + location = "front-right" + } +} + +zone { + name = "passanger2", + attributes = { + type = "private", + location = "back-left" + } +} + +zone { + name = "passanger3", + attributes = { + type = "private", + location = "back-right" + } +} + +zone { + name = "passanger4", + attributes = { + type = "private", + location = "back-left" + } +} + + +-- +-- define resource classes +-- +if not m:plugin_loaded('ivi-resource-manager') then + resource.class { + name = "audio_playback", + shareable = true, + attributes = { + role = { mdb.string, "music", "rw" }, + pid = { mdb.string, "<unknown>", "rw" }, + policy = { mdb.string, "relaxed", "rw" } + } + } +end + +resource.class { + name = "audio_recording", + shareable = false, + attributes = { + role = { mdb.string, "music", "rw" }, + pid = { mdb.string, "<unknown>", "rw" }, + policy = { mdb.string, "relaxed", "rw" } + } +} + +resource.class { + name = "video_playback", + shareable = false, +} + +resource.class { + name = "video_recording", + shareable = false, +} + +resource.class { + name = "speech_synthesis", + shareable = true, +} + +resource.class { + name = "speech_recognition", + shareable = true, +} |