diff --git a/Makefile b/Makefile index 204260b..0846b74 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -APPID = org.webosinternals.pulsecontrol +APPID = org.webosinternals.pulseaudio.settings package: clean cp -a c-binary node-service/bin diff --git a/README b/README new file mode 100644 index 0000000..e53a4ce --- /dev/null +++ b/README @@ -0,0 +1,3 @@ +PulseAudio Settings is an application for webOS that allows configuring the +pulseaudio and its modules. Currently it allows turning on/off usb audio +and configuring/connecting into other pulseaudio daemons over the network. \ No newline at end of file diff --git a/control/postinst b/control/postinst index 5854106..b24aa28 100755 --- a/control/postinst +++ b/control/postinst @@ -1,6 +1,6 @@ #!/bin/sh -SID="org.webosinternals.pulsecontrol.srv" +SID="org.webosinternals.pulseaudio.settings.srv" APPS="/media/cryptofs/apps" diff --git a/control/prerm b/control/prerm index 463fe2c..ad0a3e5 100755 --- a/control/prerm +++ b/control/prerm @@ -1,6 +1,6 @@ #!/bin/sh -SID="org.webosinternals.pulsecontrol.srv" +SID="org.webosinternals.pulseaudio.settings.srv" APPS="/media/cryptofs/apps" @@ -40,10 +40,10 @@ rm -f /var/palm/ls2/services/pub/${SID}.service # Cleanup the JS service here due to WebOS bugs # -rm -f /var/cache/configurator/*webosinternals.pulsecontrol* +rm -f /var/cache/configurator/*webosinternals.pulseaudio.settings* -rm -f /var/palm/ls2/roles/*/*webosinternals.pulsecontrol* +rm -f /var/palm/ls2/roles/*/*webosinternals.pulseaudio.settings* -rm -f /var/palm/ls2/services/*/*webosinternals.pulsecontrol* +rm -f /var/palm/ls2/services/*/*webosinternals.pulseaudio.settings* exit 0 diff --git a/enyo-app/appinfo.json b/enyo-app/appinfo.json index 838372d..3962859 100644 --- a/enyo-app/appinfo.json +++ b/enyo-app/appinfo.json @@ -1,11 +1,11 @@ { "title": "PulseAudio Settings", - "id": "org.webosinternals.pulsecontrol", - "version": "0.8.0", + "id": "org.webosinternals.pulseaudio.settings", + "version": "0.8.2", "release_date": "30-Sep-2011", "vendor": "WebOS Internals", "vendor_email": "support@webos-internals.org", - "vendor_url": "http://www.webos-internals.org/wiki/Application:PulseAudioControl", + "vendor_url": "http://www.webos-internals.org/wiki/Application:PulseAudioSettings", "type": "web", "noWindow" : true, "main": "index.html", diff --git a/enyo-app/source/Control.js b/enyo-app/source/Control.js index 4685217..93b5806 100644 --- a/enyo-app/source/Control.js +++ b/enyo-app/source/Control.js @@ -6,7 +6,7 @@ enyo.kind({ _ready: false, _prefs: { - _kind: "org.webosinternals.pulsecontrol:1", + _kind: "org.webosinternals.pulseaudio.settings:1", usbAudio: false, paServers: [], tcpServer: false, @@ -219,11 +219,11 @@ enyo.kind({ ]} ]}, - {name: 'pulseControlSrv', kind: 'PalmService', service: 'palm://org.webosinternals.pulsecontrol.srv', method: 'control', + {name: 'pulseaudio.settingsSrv', kind: 'PalmService', service: 'palm://org.webosinternals.pulseaudio.settings.srv', method: 'control', onSuccess: "handleServiceSuccess", onFailure: "handleServiceFailure"}, - {name: "loadPreferences", kind: "DbService", dbKind: "org.webosinternals.pulsecontrol:1", method: "find", onSuccess: "handlePrefsLoaded"}, - {name: "savePreferences", kind: "DbService", dbKind: "org.webosinternals.pulsecontrol:1", method: "put", onSuccess: "handlePrefsSaved"} + {name: "loadPreferences", kind: "DbService", dbKind: "org.webosinternals.pulseaudio.settings:1", method: "find", onSuccess: "handlePrefsLoaded"}, + {name: "savePreferences", kind: "DbService", dbKind: "org.webosinternals.pulseaudio.settings:1", method: "put", onSuccess: "handlePrefsSaved"} ], create: function() { @@ -250,7 +250,7 @@ enyo.kind({ this.$.controlDashboard.setLayers([]); if(topLayer.action) { - this.$.pulseControlSrv.call({action: topLayer.action, address: topLayer.address, sinks: topLayer.sinks}); + this.$.pulseaudio.settingsSrv.call({action: topLayer.action, address: topLayer.address, sinks: topLayer.sinks}); } }, @@ -306,7 +306,7 @@ enyo.kind({ restartPulseAudio: function(inSender, inEvent) { this.$.applySettingsButton.setDisabled(true); - this.$.pulseControlSrv.call({action: "reset"}); + this.$.pulseaudio.settingsSrv.call({action: "reset"}); }, handleServiceSuccess: function() { @@ -324,7 +324,7 @@ enyo.kind({ this.$.applySettingsButton.setDisabled(true); - this.$.pulseControlSrv.call({action: "apply"}); + this.$.pulseaudio.settingsSrv.call({action: "apply"}); }, handleEditAdvanced: function(inSender, inEvent) { diff --git a/node-service/assistants/control-assistant.js b/node-service/assistants/control-assistant.js index f5739fe..450e474 100644 --- a/node-service/assistants/control-assistant.js +++ b/node-service/assistants/control-assistant.js @@ -8,9 +8,9 @@ var DB = Foundations.Data.DB; var exec = IMPORTS.require('child_process').exec; -var DB_KIND = "org.webosinternals.pulsecontrol:1"; +var DB_KIND = "org.webosinternals.pulseaudio.settings:1"; -var SERVICE_ID = "org.webosinternals.pulsecontrol.srv"; +var SERVICE_ID = "org.webosinternals.pulseaudio.settings.srv"; var SERVICES_DIR = "/media/cryptofs/apps/usr/palm/services"; @@ -81,7 +81,7 @@ ControlAssistant.prototype.init = function(future, config, args) { "params" : {'subscribe': true} }, "callback" : { - "method" : "palm://org.webosinternals.pulsecontrol.srv/control", + "method" : "palm://org.webosinternals.pulseaudio.settings.srv/control", "params" : {"action": "check"} } } @@ -115,7 +115,7 @@ ControlAssistant.prototype.reset = function(future, config, args) { } else { future.nest(PalmCall.call("palm://com.palm.applicationManager/", "launch", { - 'id': "org.webosinternals.pulsecontrol", 'params': {'dashboard': "none"}})); + 'id': "org.webosinternals.pulseaudio.settings", 'params': {'dashboard': "none"}})); future.then(this, function(future) { future.result = { returnValue: true }; @@ -142,10 +142,10 @@ ControlAssistant.prototype.apply = function(future, config, args) { if((stdout) && (stdout.slice(0, 17) == "Module load error")) { future.nest(PalmCall.call("palm://com.palm.applicationManager/", "launch", { - 'id': "org.webosinternals.pulsecontrol", 'params': {'dashboard': "error", "reason": "usb"}})); + 'id': "org.webosinternals.pulseaudio.settings", 'params': {'dashboard': "error", "reason": "usb"}})); } else { future.nest(PalmCall.call("palm://com.palm.applicationManager/", "launch", { - 'id': "org.webosinternals.pulsecontrol", 'params': {'dashboard': "none"}})); + 'id': "org.webosinternals.pulseaudio.settings", 'params': {'dashboard': "none"}})); } future.then(this, function(future) { @@ -165,7 +165,7 @@ ControlAssistant.prototype.apply = function(future, config, args) { {"protocol": "TCP", "destinationPort": 4713}]} }, "callback" : { - "method" : "palm://org.webosinternals.pulsecontrol.srv/control", + "method" : "palm://org.webosinternals.pulseaudio.settings.srv/control", "params" : {"action":"none"} } } @@ -227,7 +227,7 @@ ControlAssistant.prototype.check = function(future, config, args) { if((args.wifi.state == "connected") || (args.wifi.state == "disconnected")) { if((addr != null) && (sinks != null) && (mode == "manual")) { future.nest(PalmCall.call("palm://com.palm.applicationManager/", "launch", { - 'id': "org.webosinternals.pulsecontrol", 'params': {'dashboard': "manual", + 'id': "org.webosinternals.pulseaudio.settings", 'params': {'dashboard': "manual", 'address': addr, 'sinks': sinks}})); future.then(this, function(future) { @@ -260,13 +260,13 @@ ControlAssistant.prototype.connect = function(future, config, args) { if((stdout) && (stdout.slice(0, 16) == "Connection error")) { future.nest(PalmCall.call("palm://com.palm.applicationManager/", "launch", { - 'id': "org.webosinternals.pulsecontrol", 'params': {'dashboard': "error", "reason": "net"}})); + 'id': "org.webosinternals.pulseaudio.settings", 'params': {'dashboard': "error", "reason": "net"}})); } else if((stdout) && (stdout.slice(0, 17) == "Module load error")) { future.nest(PalmCall.call("palm://com.palm.applicationManager/", "launch", { - 'id': "org.webosinternals.pulsecontrol", 'params': {'dashboard': "error", "reason": "net"}})); + 'id': "org.webosinternals.pulseaudio.settings", 'params': {'dashboard': "error", "reason": "net"}})); } else { future.nest(PalmCall.call("palm://com.palm.applicationManager/", "launch", { - 'id': "org.webosinternals.pulsecontrol", 'params': {'dashboard': "auto", + 'id': "org.webosinternals.pulseaudio.settings", 'params': {'dashboard': "auto", 'address': args.address, 'sinks': args.sinks}})); } @@ -289,11 +289,11 @@ ControlAssistant.prototype.disconnect = function(future, config, args) { if((args.address) && (args.sinks)) { future.nest(PalmCall.call("palm://com.palm.applicationManager/", "launch", { - 'id': "org.webosinternals.pulsecontrol", 'params': {'dashboard': "manual", + 'id': "org.webosinternals.pulseaudio.settings", 'params': {'dashboard': "manual", 'address': args.address, 'sinks': args.sinks}})); } else { future.nest(PalmCall.call("palm://com.palm.applicationManager/", "launch", { - 'id': "org.webosinternals.pulsecontrol", 'params': {'dashboard': "none"}})); + 'id': "org.webosinternals.pulseaudio.settings", 'params': {'dashboard': "none"}})); } future.then(this, function(future) { diff --git a/node-service/configuration/db/kinds/org.webosinternals.pulseaudio.settings.srv b/node-service/configuration/db/kinds/org.webosinternals.pulseaudio.settings.srv new file mode 100644 index 0000000..05ab860 --- /dev/null +++ b/node-service/configuration/db/kinds/org.webosinternals.pulseaudio.settings.srv @@ -0,0 +1,5 @@ +{ + "id": "org.webosinternals.pulseaudio.settings:1", + "indexes": [], + "sync": true +} diff --git a/node-service/configuration/db/kinds/org.webosinternals.pulsecontrol.srv b/node-service/configuration/db/kinds/org.webosinternals.pulsecontrol.srv deleted file mode 100644 index 7930db0..0000000 --- a/node-service/configuration/db/kinds/org.webosinternals.pulsecontrol.srv +++ /dev/null @@ -1,5 +0,0 @@ -{ - "id": "org.webosinternals.pulsecontrol:1", - "indexes": [], - "sync": true -} diff --git a/node-service/configuration/db/permissions/org.webosinternals.pulsecontrol.srv b/node-service/configuration/db/permissions/org.webosinternals.pulseaudio.settings.srv similarity index 54% rename from node-service/configuration/db/permissions/org.webosinternals.pulsecontrol.srv rename to node-service/configuration/db/permissions/org.webosinternals.pulseaudio.settings.srv index d958c73..8531ee1 100644 --- a/node-service/configuration/db/permissions/org.webosinternals.pulsecontrol.srv +++ b/node-service/configuration/db/permissions/org.webosinternals.pulseaudio.settings.srv @@ -1,8 +1,8 @@ [ { "type": "db.kind", - "object": "org.webosinternals.pulsecontrol:1", - "caller": "org.webosinternals.pulsecontrol", + "object": "org.webosinternals.pulseaudio.settings:1", + "caller": "org.webosinternals.pulseaudio.settings", "operations": { "create": "allow", "read": "allow", @@ -12,8 +12,8 @@ }, { "type": "db.kind", - "object": "org.webosinternals.pulsecontrol:1", - "caller": "org.webosinternals.pulsecontrol.srv", + "object": "org.webosinternals.pulseaudio.settings:1", + "caller": "org.webosinternals.pulseaudio.settings.srv", "operations": { "create": "allow", "read": "allow", diff --git a/node-service/configuration/event.d/org.webosinternals.pulsecontrol.srv b/node-service/configuration/event.d/org.webosinternals.pulseaudio.settings.srv similarity index 62% rename from node-service/configuration/event.d/org.webosinternals.pulsecontrol.srv rename to node-service/configuration/event.d/org.webosinternals.pulseaudio.settings.srv index b7fa41b..627a654 100644 --- a/node-service/configuration/event.d/org.webosinternals.pulsecontrol.srv +++ b/node-service/configuration/event.d/org.webosinternals.pulseaudio.settings.srv @@ -9,5 +9,5 @@ script sleep 15 - luna-send -n 1 palm://org.webosinternals.pulsecontrol.srv/control '{"action":"init"}' + luna-send -n 1 palm://org.webosinternals.pulseaudio.settings.srv/control '{"action":"init"}' end script diff --git a/node-service/org.webosinternals.pulsecontrol.srv.json b/node-service/org.webosinternals.pulseaudio.settings.srv.json similarity index 53% rename from node-service/org.webosinternals.pulsecontrol.srv.json rename to node-service/org.webosinternals.pulseaudio.settings.srv.json index d5cd4fd..51035e4 100644 --- a/node-service/org.webosinternals.pulsecontrol.srv.json +++ b/node-service/org.webosinternals.pulseaudio.settings.srv.json @@ -2,11 +2,11 @@ "role": { "exeName":"js", "type": "privileged", - "allowedNames": ["org.webosinternals.pulsecontrol.srv"] + "allowedNames": ["org.webosinternals.pulseaudio.settings.srv"] }, "permissions": [ { - "service":"org.webosinternals.pulsecontrol.srv", + "service":"org.webosinternals.pulseaudio.settings.srv", "inbound":["*"], "outbound":["*"] } diff --git a/node-service/org.webosinternals.pulseaudio.settings.srv.service b/node-service/org.webosinternals.pulseaudio.settings.srv.service new file mode 100644 index 0000000..c0a7dc9 --- /dev/null +++ b/node-service/org.webosinternals.pulseaudio.settings.srv.service @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.webosinternals.pulseaudio.settings.srv +Exec=/usr/bin/run-js-service -n /media/cryptofs/apps/usr/palm/services/org.webosinternals.pulseaudio.settings.srv diff --git a/node-service/org.webosinternals.pulsecontrol.srv.service b/node-service/org.webosinternals.pulsecontrol.srv.service deleted file mode 100644 index 0f5131a..0000000 --- a/node-service/org.webosinternals.pulsecontrol.srv.service +++ /dev/null @@ -1,3 +0,0 @@ -[D-BUS Service] -Name=org.webosinternals.pulsecontrol.srv -Exec=/usr/bin/run-js-service -n /media/cryptofs/apps/usr/palm/services/org.webosinternals.pulsecontrol.srv diff --git a/node-service/services.json b/node-service/services.json index fbc8436..3771b8a 100755 --- a/node-service/services.json +++ b/node-service/services.json @@ -1,8 +1,8 @@ { - "id": "org.webosinternals.pulsecontrol.srv", + "id": "org.webosinternals.pulseaudio.settings.srv", "description": "PulseAudio Control Service", "services": [ { - "name": "org.webosinternals.pulsecontrol.srv", + "name": "org.webosinternals.pulseaudio.settings.srv", "description": "PulseAudio Control Service", "assistant": "ServiceAssistant", diff --git a/package/packageinfo.json b/package/packageinfo.json index 37f7c70..93a414e 100644 --- a/package/packageinfo.json +++ b/package/packageinfo.json @@ -1,12 +1,12 @@ { - "id": "org.webosinternals.pulsecontrol", + "id": "org.webosinternals.pulseaudio.settings", "package_format_version": 2, "loc_name": "PulseAudio Settings", - "version": "0.8.0", + "version": "0.8.2", "icon": "icon.png", "miniicon": "icon.png", "vendor": "WebOS Internals", "vendorurl": "www.webos-internals.org", - "app": "org.webosinternals.pulsecontrol", - "services": ["org.webosinternals.pulsecontrol.srv"] + "app": "org.webosinternals.pulseaudio.settings", + "services": ["org.webosinternals.pulseaudio.settings.srv"] }