Skip to content

Commit

Permalink
Test release
Browse files Browse the repository at this point in the history
  • Loading branch information
sconix committed Dec 27, 2011
1 parent f81a65b commit abfd4e4
Show file tree
Hide file tree
Showing 16 changed files with 53 additions and 50 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APPID = org.webosinternals.pulsecontrol
APPID = org.webosinternals.pulseaudio.settings

package: clean
cp -a c-binary node-service/bin
Expand Down
3 changes: 3 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion control/postinst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

SID="org.webosinternals.pulsecontrol.srv"
SID="org.webosinternals.pulseaudio.settings.srv"

APPS="/media/cryptofs/apps"

Expand Down
8 changes: 4 additions & 4 deletions control/prerm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

SID="org.webosinternals.pulsecontrol.srv"
SID="org.webosinternals.pulseaudio.settings.srv"

APPS="/media/cryptofs/apps"

Expand Down Expand Up @@ -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
6 changes: 3 additions & 3 deletions enyo-app/appinfo.json
Original file line number Diff line number Diff line change
@@ -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": "[email protected]",
"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",
Expand Down
14 changes: 7 additions & 7 deletions enyo-app/source/Control.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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() {
Expand All @@ -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});
}
},

Expand Down Expand Up @@ -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() {
Expand All @@ -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) {
Expand Down
26 changes: 13 additions & 13 deletions node-service/assistants/control-assistant.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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"}
}
}
Expand Down Expand Up @@ -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 };
Expand All @@ -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) {
Expand All @@ -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"}
}
}
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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}}));
}

Expand All @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": "org.webosinternals.pulseaudio.settings:1",
"indexes": [],
"sync": true
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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":["*"]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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
3 changes: 0 additions & 3 deletions node-service/org.webosinternals.pulsecontrol.srv.service

This file was deleted.

4 changes: 2 additions & 2 deletions node-service/services.json
Original file line number Diff line number Diff line change
@@ -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",

Expand Down
8 changes: 4 additions & 4 deletions package/packageinfo.json
Original file line number Diff line number Diff line change
@@ -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"]
}

0 comments on commit abfd4e4

Please sign in to comment.