You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2013/09/13 01:09:25 UTC

git commit: add firefoxos support

Updated Branches:
  refs/heads/dev 2e120b5a2 -> 30ba3ce8e


add firefoxos support


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/commit/30ba3ce8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/30ba3ce8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/30ba3ce8

Branch: refs/heads/dev
Commit: 30ba3ce8e0ea2ed48e65fc607d838e54a012d926
Parents: 2e120b5
Author: James Long <lo...@gmail.com>
Authored: Wed Sep 11 16:36:31 2013 -0400
Committer: Steven Gill <st...@gmail.com>
Committed: Thu Sep 12 16:09:16 2013 -0700

----------------------------------------------------------------------
 plugin.xml              | 13 +++++++++++++
 src/firefoxos/device.js | 16 ++++++++++++++++
 2 files changed, 29 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/30ba3ce8/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 3bc0034..4d6be1c 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -14,6 +14,19 @@
         <clobbers target="device" />
     </js-module>
 
+    <!-- firefoxos -->
+    <platform name="firefoxos">
+        <config-file target="config.xml" parent="/*">
+            <feature name="Device">
+                <param name="firefoxos-package" value="Device" />
+            </feature>
+        </config-file>                                         
+        
+        <js-module src="src/firefoxos/device.js" name="device-impl">
+          <runs />
+        </js-module>
+    </platform>
+
     <!-- android -->
     <platform name="android">
         <config-file target="res/xml/config.xml" parent="/*">

http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/30ba3ce8/src/firefoxos/device.js
----------------------------------------------------------------------
diff --git a/src/firefoxos/device.js b/src/firefoxos/device.js
new file mode 100644
index 0000000..55d1c75
--- /dev/null
+++ b/src/firefoxos/device.js
@@ -0,0 +1,16 @@
+
+var firefoxos = require('cordova/platform');
+
+var Device = {
+    getDeviceInfo: function(success, error) {
+        success({
+            cordova: firefoxos.cordovaVersion,
+            platform: 'firefoxos',
+            model: null,
+            version: null,
+            uuid: null
+        });
+    }
+};
+
+firefoxos.registerPlugin('Device', Device);