cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [7/50] js commit: Renamed b2g to firefoxos
Date Tue, 12 Feb 2013 19:33:07 GMT
Renamed b2g to firefoxos


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/8f56179d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/8f56179d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/8f56179d

Branch: refs/heads/symbolmapping
Commit: 8f56179d79a16c747c563200056354b3681d1d9e
Parents: 349c6e1
Author: Gord Tanner <gtanner@gmail.com>
Authored: Mon Jan 28 21:42:14 2013 -0500
Committer: Gord Tanner <gtanner@gmail.com>
Committed: Mon Jan 28 21:42:14 2013 -0500

----------------------------------------------------------------------
 Jakefile                                        |    4 +-
 build/packager.js                               |    3 +-
 lib/b2g/exec.js                                 |   56 ------------------
 lib/b2g/platform.js                             |   26 --------
 lib/b2g/plugin/b2g/accelerometer.js             |   41 -------------
 lib/b2g/plugin/b2g/device.js                    |   39 ------------
 lib/b2g/plugin/b2g/network.js                   |   28 ---------
 lib/firefoxos/exec.js                           |   56 ++++++++++++++++++
 lib/firefoxos/platform.js                       |   26 ++++++++
 lib/firefoxos/plugin/firefoxos/accelerometer.js |   41 +++++++++++++
 lib/firefoxos/plugin/firefoxos/device.js        |   39 ++++++++++++
 lib/firefoxos/plugin/firefoxos/network.js       |   28 +++++++++
 12 files changed, 194 insertions(+), 193 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8f56179d/Jakefile
----------------------------------------------------------------------
diff --git a/Jakefile b/Jakefile
index 1babd49..020d486 100644
--- a/Jakefile
+++ b/Jakefile
@@ -89,7 +89,7 @@ task('build', ['clean', 'hint', 'update-version'], function () {
 
         packager.generate("windows8",commitId,true);
         packager.generate("blackberry",commitId);
-        packager.generate("b2g",commitId);
+        packager.generate("firefoxos",commitId);
         packager.generate("ios",commitId);
         packager.generate("windowsphone",commitId,true);
         packager.generate("android",commitId);
@@ -110,7 +110,7 @@ task('update-version', ['set-cwd'], function() {
     var files = {
         "lib/bada/plugin/bada/device.js":/(me\.cordova\s=\s").+(")/,
         "lib/tizen/plugin/tizen/Device.js":/(this\.cordova\s=\s").+(")/,
-        "lib/b2g/plugin/b2g/Device.js":/(this\.cordova\s=\s").+(")/,
+        "lib/firefoxos/plugin/firefoxos/Device.js":/(this\.cordova\s=\s").+(")/,
         "lib/blackberry/plugin/qnx/device.js":/(cordova:\s").+(")/,
         "lib/blackberry/plugin/air/device.js":/(cordova:\s").+(")/
     };

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8f56179d/build/packager.js
----------------------------------------------------------------------
diff --git a/build/packager.js b/build/packager.js
index 5112350..b630f5b 100644
--- a/build/packager.js
+++ b/build/packager.js
@@ -57,7 +57,7 @@ packager.bundle = function(platform, debug, commitId ) {
 
         //Test platform needs to bring in platform specific plugin's for testing
         copyProps(modules, collectFiles(path.join('lib', 'blackberry', 'plugin'), 'plugin'));
-        copyProps(modules, collectFiles(path.join('lib', 'b2g', 'plugin', 'b2g'), 'plugin/b2g'));
+        copyProps(modules, collectFiles(path.join('lib', 'firefoxos', 'plugin', 'firefoxos'),
'plugin/firefoxos'));
         copyProps(modules, collectFiles(path.join('lib', 'tizen', 'plugin', 'tizen'), 'plugin/tizen'));
         copyProps(modules, collectFiles(path.join('lib', 'windowsphone', 'plugin', 'windowsphone'),
'plugin/windowsphone'));
         copyProps(modules, collectFiles(path.join('lib', 'windows8', 'plugin', 'windows8'),
'plugin/windows8'));
@@ -71,6 +71,7 @@ packager.bundle = function(platform, debug, commitId ) {
 
     var output = [];
 	
+    output.push("// Platform: " + platform + "\n");
     output.push("// "  + commitId + "\n");
 	output.push("// File generated at :: "  + new Date() + "\n");
 

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8f56179d/lib/b2g/exec.js
----------------------------------------------------------------------
diff --git a/lib/b2g/exec.js b/lib/b2g/exec.js
deleted file mode 100644
index e8bb34c..0000000
--- a/lib/b2g/exec.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- *
- * 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.
- *
-*/
-
-/**
- * Execute a cordova command.  It is up to the native side whether this action
- * is synchronous or asynchronous.  The native side can return:
- *      Synchronous: PluginResult object as a JSON string
- *      Asynchrounous: Empty string ""
- * If async, the native side will cordova.callbackSuccess or cordova.callbackError,
- * depending upon the result of the action.
- *
- * @param {Function} success    The success callback
- * @param {Function} fail       The fail callback
- * @param {String} service      The name of the service to use
- * @param {String} action       Action to be run in cordova
- * @param {String[]} [args]     Zero or more arguments to pass to the method
- */
-
-var plugins = {
-    "Device": require('cordova/plugin/b2g/device'),
-    "NetworkStatus": require('cordova/plugin/b2g/network'),
-    "Accelerometer" : require('cordova/plugin/b2g/accelerometer')
-    //"Notification" : require('cordova/plugin/b2g/notification')
-};
-
-module.exports = function(success, fail, service, action, args) {
-    try {
-        console.error("exec:call plugin:"+service+":"+action);
-        plugins[service][action](success, fail, args);
-    }
-    catch(e) {
-        console.error("missing exec: " + service + "." + action);
-        console.error(args);
-        console.error(e);
-        console.error(e.stack);
-    }
-};
-

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8f56179d/lib/b2g/platform.js
----------------------------------------------------------------------
diff --git a/lib/b2g/platform.js b/lib/b2g/platform.js
deleted file mode 100644
index c462826..0000000
--- a/lib/b2g/platform.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- *
- * 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.
- *
-*/
-
-module.exports = {
-    id: "b2g",
-    initialize: function() {
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8f56179d/lib/b2g/plugin/b2g/accelerometer.js
----------------------------------------------------------------------
diff --git a/lib/b2g/plugin/b2g/accelerometer.js b/lib/b2g/plugin/b2g/accelerometer.js
deleted file mode 100644
index 7437124..0000000
--- a/lib/b2g/plugin/b2g/accelerometer.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- *
- * 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 cordova = require('cordova'),
-    callback;
-
-module.exports = {
-    start: function (win, fail, args) {
-        window.removeEventListener("devicemotion", callback);
-        callback = function (motion) {
-            win({
-                x: motion.accelerationIncludingGravity.x,
-                y: motion.accelerationIncludingGravity.y,
-                z: motion.accelerationIncludingGravity.z,
-                timestamp: motion.timestamp
-            });
-        };
-        window.addEventListener("devicemotion", callback);
-    },
-    stop: function (win, fail, args) {
-        window.removeEventListener("devicemotion", callback);
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8f56179d/lib/b2g/plugin/b2g/device.js
----------------------------------------------------------------------
diff --git a/lib/b2g/plugin/b2g/device.js b/lib/b2g/plugin/b2g/device.js
deleted file mode 100644
index 5d9d36b..0000000
--- a/lib/b2g/plugin/b2g/device.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *
- * 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(win, fail, args){
-        win({
-            platform: "Firefox OS",
-            version: "0.0.1",
-            model: "Beta Phone",
-            name: "Beta Phone", // deprecated: please use device.model
-            uuid: "somestring",
-            cordova: "2.4.0rc1"
-        });
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8f56179d/lib/b2g/plugin/b2g/network.js
----------------------------------------------------------------------
diff --git a/lib/b2g/plugin/b2g/network.js b/lib/b2g/plugin/b2g/network.js
deleted file mode 100644
index f7e702b..0000000
--- a/lib/b2g/plugin/b2g/network.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- *
- * 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 cordova = require('cordova');
-
-module.exports = {
-    getConnectionInfo: function (win, fail, args) {
-        win("3G");
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8f56179d/lib/firefoxos/exec.js
----------------------------------------------------------------------
diff --git a/lib/firefoxos/exec.js b/lib/firefoxos/exec.js
new file mode 100644
index 0000000..82ef415
--- /dev/null
+++ b/lib/firefoxos/exec.js
@@ -0,0 +1,56 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+/**
+ * Execute a cordova command.  It is up to the native side whether this action
+ * is synchronous or asynchronous.  The native side can return:
+ *      Synchronous: PluginResult object as a JSON string
+ *      Asynchrounous: Empty string ""
+ * If async, the native side will cordova.callbackSuccess or cordova.callbackError,
+ * depending upon the result of the action.
+ *
+ * @param {Function} success    The success callback
+ * @param {Function} fail       The fail callback
+ * @param {String} service      The name of the service to use
+ * @param {String} action       Action to be run in cordova
+ * @param {String[]} [args]     Zero or more arguments to pass to the method
+ */
+
+var plugins = {
+    "Device": require('cordova/plugin/firefoxos/device'),
+    "NetworkStatus": require('cordova/plugin/firefoxos/network'),
+    "Accelerometer" : require('cordova/plugin/firefoxos/accelerometer')
+    //"Notification" : require('cordova/plugin/firefoxos/notification')
+};
+
+module.exports = function(success, fail, service, action, args) {
+    try {
+        console.error("exec:call plugin:"+service+":"+action);
+        plugins[service][action](success, fail, args);
+    }
+    catch(e) {
+        console.error("missing exec: " + service + "." + action);
+        console.error(args);
+        console.error(e);
+        console.error(e.stack);
+    }
+};
+

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8f56179d/lib/firefoxos/platform.js
----------------------------------------------------------------------
diff --git a/lib/firefoxos/platform.js b/lib/firefoxos/platform.js
new file mode 100644
index 0000000..05f9b8b
--- /dev/null
+++ b/lib/firefoxos/platform.js
@@ -0,0 +1,26 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+module.exports = {
+    id: "firefoxos",
+    initialize: function() {
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8f56179d/lib/firefoxos/plugin/firefoxos/accelerometer.js
----------------------------------------------------------------------
diff --git a/lib/firefoxos/plugin/firefoxos/accelerometer.js b/lib/firefoxos/plugin/firefoxos/accelerometer.js
new file mode 100644
index 0000000..7437124
--- /dev/null
+++ b/lib/firefoxos/plugin/firefoxos/accelerometer.js
@@ -0,0 +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 cordova = require('cordova'),
+    callback;
+
+module.exports = {
+    start: function (win, fail, args) {
+        window.removeEventListener("devicemotion", callback);
+        callback = function (motion) {
+            win({
+                x: motion.accelerationIncludingGravity.x,
+                y: motion.accelerationIncludingGravity.y,
+                z: motion.accelerationIncludingGravity.z,
+                timestamp: motion.timestamp
+            });
+        };
+        window.addEventListener("devicemotion", callback);
+    },
+    stop: function (win, fail, args) {
+        window.removeEventListener("devicemotion", callback);
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8f56179d/lib/firefoxos/plugin/firefoxos/device.js
----------------------------------------------------------------------
diff --git a/lib/firefoxos/plugin/firefoxos/device.js b/lib/firefoxos/plugin/firefoxos/device.js
new file mode 100644
index 0000000..5d9d36b
--- /dev/null
+++ b/lib/firefoxos/plugin/firefoxos/device.js
@@ -0,0 +1,39 @@
+/*
+ *
+ * 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(win, fail, args){
+        win({
+            platform: "Firefox OS",
+            version: "0.0.1",
+            model: "Beta Phone",
+            name: "Beta Phone", // deprecated: please use device.model
+            uuid: "somestring",
+            cordova: "2.4.0rc1"
+        });
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8f56179d/lib/firefoxos/plugin/firefoxos/network.js
----------------------------------------------------------------------
diff --git a/lib/firefoxos/plugin/firefoxos/network.js b/lib/firefoxos/plugin/firefoxos/network.js
new file mode 100644
index 0000000..f7e702b
--- /dev/null
+++ b/lib/firefoxos/plugin/firefoxos/network.js
@@ -0,0 +1,28 @@
+/*
+ *
+ * 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 cordova = require('cordova');
+
+module.exports = {
+    getConnectionInfo: function (win, fail, args) {
+        win("3G");
+    }
+};


Mime
View raw message