Updated Branches: refs/heads/master b0890aae5 -> 6f2ac072f
fix line endings, only matters if you are a windows user ... Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/6f2ac072 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/6f2ac072 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/6f2ac072 Branch: refs/heads/master Commit: 6f2ac072fc0518cfa4d8a63a68537b4153bbf88b Parents: 28f1e88 Author: Jesse MacFadyen <purplecabb...@gmail.com> Authored: Thu Oct 18 15:21:20 2012 -0700 Committer: Jesse MacFadyen <purplecabb...@gmail.com> Committed: Thu Oct 18 15:21:20 2012 -0700 ---------------------------------------------------------------------- lib/tizen/plugin/tizen/Device.js | 114 ++++++++++++++-------------- lib/webworks/air/plugin/air/device.js | 82 ++++++++++---------- lib/webworks/qnx/plugin/qnx/device.js | 80 ++++++++++---------- 3 files changed, 138 insertions(+), 138 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/6f2ac072/lib/tizen/plugin/tizen/Device.js ---------------------------------------------------------------------- diff --git a/lib/tizen/plugin/tizen/Device.js b/lib/tizen/plugin/tizen/Device.js index 1b923a6..a43a850 100644 --- a/lib/tizen/plugin/tizen/Device.js +++ b/lib/tizen/plugin/tizen/Device.js @@ -1,57 +1,57 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -/*global tizen:false */ -var channel = require('cordova/channel'); - -// Tell cordova channel to wait on the CordovaInfoReady event -channel.waitForInitialization('onCordovaInfoReady'); - -function Device() { - this.version = null; - this.uuid = null; - this.name = null; - this.cordova = "2.2.0rc1"; - this.platform = "Tizen"; - - var me = this; - - function onSuccessCallback(sysInfoProp) { - me.name = sysInfoProp.model; - me.uuid = sysInfoProp.imei; - me.version = sysInfoProp.version; - channel.onCordovaInfoReady.fire(); - } - - function onErrorCallback(error) { - console.log("error initializing cordova: " + error); - } - - channel.onCordovaReady.subscribe(function() { - me.getDeviceInfo(onSuccessCallback, onErrorCallback); - }); -} - -Device.prototype.getDeviceInfo = function(success, fail, args) { - tizen.systeminfo.getPropertyValue("Device", success, fail); -}; - -module.exports = new Device(); +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +/*global tizen:false */ +var channel = require('cordova/channel'); + +// Tell cordova channel to wait on the CordovaInfoReady event +channel.waitForInitialization('onCordovaInfoReady'); + +function Device() { + this.version = null; + this.uuid = null; + this.name = null; + this.cordova = "2.2.0rc1 "; + this.platform = "Tizen"; + + var me = this; + + function onSuccessCallback(sysInfoProp) { + me.name = sysInfoProp.model; + me.uuid = sysInfoProp.imei; + me.version = sysInfoProp.version; + channel.onCordovaInfoReady.fire(); + } + + function onErrorCallback(error) { + console.log("error initializing cordova: " + error); + } + + channel.onCordovaReady.subscribe(function() { + me.getDeviceInfo(onSuccessCallback, onErrorCallback); + }); +} + +Device.prototype.getDeviceInfo = function(success, fail, args) { + tizen.systeminfo.getPropertyValue("Device", success, fail); +}; + +module.exports = new Device(); http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/6f2ac072/lib/webworks/air/plugin/air/device.js ---------------------------------------------------------------------- diff --git a/lib/webworks/air/plugin/air/device.js b/lib/webworks/air/plugin/air/device.js index 5a1bcd5..2b1ad3c 100644 --- a/lib/webworks/air/plugin/air/device.js +++ b/lib/webworks/air/plugin/air/device.js @@ -1,41 +1,41 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -var channel = require('cordova/channel'), - cordova = require('cordova'); - -// Tell cordova channel to wait on the CordovaInfoReady event -channel.waitForInitialization('onCordovaInfoReady'); - -module.exports = { - getDeviceInfo : function(args, win, fail){ - win({ - platform: "PlayBook", - version: blackberry.system.softwareVersion, - name: blackberry.system.model, - uuid: blackberry.identity.PIN, - cordova: "2.2.0rc1" - }); - - return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "Device info returned" }; - } - -}; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +var channel = require('cordova/channel'), + cordova = require('cordova'); + +// Tell cordova channel to wait on the CordovaInfoReady event +channel.waitForInitialization('onCordovaInfoReady'); + +module.exports = { + getDeviceInfo : function(args, win, fail){ + win({ + platform: "PlayBook", + version: blackberry.system.softwareVersion, + name: blackberry.system.model, + uuid: blackberry.identity.PIN, + cordova: "2.2.0rc1 " + }); + + return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "Device info returned" }; + } + +}; http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/6f2ac072/lib/webworks/qnx/plugin/qnx/device.js ---------------------------------------------------------------------- diff --git a/lib/webworks/qnx/plugin/qnx/device.js b/lib/webworks/qnx/plugin/qnx/device.js index 993cda5..8d331ca 100644 --- a/lib/webworks/qnx/plugin/qnx/device.js +++ b/lib/webworks/qnx/plugin/qnx/device.js @@ -1,40 +1,40 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -var channel = require('cordova/channel'), - cordova = require('cordova'); - -// Tell cordova channel to wait on the CordovaInfoReady event -channel.waitForInitialization('onCordovaInfoReady'); - -module.exports = { - getDeviceInfo : function(args, win, fail){ - win({ - platform: "BB10", - version: blackberry.system.softwareVersion, - name: "Dev Alpha", - uuid: blackberry.identity.uuid, - cordova: "2.2.0rc1" - }); - - return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "Device info returned" }; - } -}; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +var channel = require('cordova/channel'), + cordova = require('cordova'); + +// Tell cordova channel to wait on the CordovaInfoReady event +channel.waitForInitialization('onCordovaInfoReady'); + +module.exports = { + getDeviceInfo : function(args, win, fail){ + win({ + platform: "BB10", + version: blackberry.system.softwareVersion, + name: "Dev Alpha", + uuid: blackberry.identity.uuid, + cordova: "2.2.0rc1 " + }); + + return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "Device info returned" }; + } +};