You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/01/24 22:27:40 UTC

[4/4] js commit: [all] modulemapper refactor for capture.

Updated Branches:
  refs/heads/symbolmapping 3aa50363b -> 7ec3bc120


[all] modulemapper refactor for capture.

https://issues.apache.org/jira/browse/CB-2227


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

Branch: refs/heads/symbolmapping
Commit: 7ec3bc120227b0b3f8bce251add7ce414a3c4baf
Parents: 6485228
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Jan 24 16:26:03 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Jan 24 16:26:03 2013 -0500

----------------------------------------------------------------------
 lib/bada/platform.js                   |    3 --
 lib/bada/plugin/capture/symbols.js     |   31 +++++++++++++++++++++++++++
 lib/common/common.js                   |   25 ---------------------
 lib/common/plugin/capture/symbols.js   |   29 +++++++++++++++++++++++++
 lib/windows8/platform.js               |   14 +-----------
 lib/windows8/plugin/capture/symbols.js |   31 +++++++++++++++++++++++++++
 lib/windowsphone/platform.js           |    7 ------
 7 files changed, 92 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/7ec3bc12/lib/bada/platform.js
----------------------------------------------------------------------
diff --git a/lib/bada/platform.js b/lib/bada/platform.js
index 8316c7b..b980fe4 100644
--- a/lib/bada/platform.js
+++ b/lib/bada/platform.js
@@ -44,9 +44,6 @@ module.exports = {
             children: {
                 device: {
                     path: "cordova/plugin/bada/device"
-                },
-                capture: {
-                    path: "cordova/plugin/bada/Capture"
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/7ec3bc12/lib/bada/plugin/capture/symbols.js
----------------------------------------------------------------------
diff --git a/lib/bada/plugin/capture/symbols.js b/lib/bada/plugin/capture/symbols.js
new file mode 100644
index 0000000..e90fcec
--- /dev/null
+++ b/lib/bada/plugin/capture/symbols.js
@@ -0,0 +1,31 @@
+/*
+ * 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 modulemapper = require('cordova/modulemapper');
+
+modulemapper.clobbers('cordova/plugin/CaptureError', 'CaptureError');
+modulemapper.clobbers('cordova/plugin/CaptureAudioOptions', 'CaptureAudioOptions');
+modulemapper.clobbers('cordova/plugin/CaptureImageOptions', 'CaptureImageOptions');
+modulemapper.clobbers('cordova/plugin/CaptureVideoOptions', 'CaptureVideoOptions');
+modulemapper.clobbers('cordova/plugin/MediaFile', 'MediaFile');
+modulemapper.clobbers('cordova/plugin/MediaFileData', 'MediaFileData');
+modulemapper.clobbers('cordova/plugin/capture', 'navigator.device.capture');
+
+modulemapper.merges('cordova/plugin/bada/Capture', 'navigator.capture');

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/7ec3bc12/lib/common/common.js
----------------------------------------------------------------------
diff --git a/lib/common/common.js b/lib/common/common.js
index 37dda9d..67da854 100644
--- a/lib/common/common.js
+++ b/lib/common/common.js
@@ -53,13 +53,6 @@ module.exports = {
                 contacts: {
                     path: 'cordova/plugin/contacts'
                 },
-                device:{
-                    children:{
-                        capture: {
-                            path: 'cordova/plugin/capture'
-                        }
-                    }
-                },
                 geolocation: {
                     path: 'cordova/plugin/geolocation'
                 },
@@ -79,18 +72,6 @@ module.exports = {
                 }
             }
         },
-        CaptureError: {
-            path: 'cordova/plugin/CaptureError'
-        },
-        CaptureAudioOptions:{
-            path: 'cordova/plugin/CaptureAudioOptions'
-        },
-        CaptureImageOptions: {
-            path: 'cordova/plugin/CaptureImageOptions'
-        },
-        CaptureVideoOptions: {
-            path: 'cordova/plugin/CaptureVideoOptions'
-        },
         CompassHeading:{
             path: 'cordova/plugin/CompassHeading'
         },
@@ -139,12 +120,6 @@ module.exports = {
         MediaError: {
             path: 'cordova/plugin/MediaError'
         },
-        MediaFile: {
-            path: 'cordova/plugin/MediaFile'
-        },
-        MediaFileData:{
-            path: 'cordova/plugin/MediaFileData'
-        },
         Position: {
             path: 'cordova/plugin/Position'
         },

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/7ec3bc12/lib/common/plugin/capture/symbols.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/capture/symbols.js b/lib/common/plugin/capture/symbols.js
new file mode 100644
index 0000000..fce0a39
--- /dev/null
+++ b/lib/common/plugin/capture/symbols.js
@@ -0,0 +1,29 @@
+/*
+ * 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 modulemapper = require('cordova/modulemapper');
+
+modulemapper.clobbers('cordova/plugin/CaptureError', 'CaptureError');
+modulemapper.clobbers('cordova/plugin/CaptureAudioOptions', 'CaptureAudioOptions');
+modulemapper.clobbers('cordova/plugin/CaptureImageOptions', 'CaptureImageOptions');
+modulemapper.clobbers('cordova/plugin/CaptureVideoOptions', 'CaptureVideoOptions');
+modulemapper.clobbers('cordova/plugin/MediaFile', 'MediaFile');
+modulemapper.clobbers('cordova/plugin/MediaFileData', 'MediaFileData');
+modulemapper.clobbers('cordova/plugin/capture', 'navigator.device.capture');

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/7ec3bc12/lib/windows8/platform.js
----------------------------------------------------------------------
diff --git a/lib/windows8/platform.js b/lib/windows8/platform.js
index 7646fea..d07016a 100755
--- a/lib/windows8/platform.js
+++ b/lib/windows8/platform.js
@@ -51,7 +51,7 @@ module.exports = {
         modulemapper.mapModules(window);
 
         window.alert = window.alert || require("cordova/plugin/notification").alert;
-        window.confirm = window.confirm || require("cordova/plugin/notification").confirm;  
+        window.confirm = window.confirm || require("cordova/plugin/notification").confirm;
 
         var onWinJSReady = function () {
             var app = WinJS.Application;
@@ -99,13 +99,6 @@ module.exports = {
         },
         navigator: {
             children: {
-                device: {
-                    children: {
-                        capture: {
-                            path: "cordova/plugin/capture"
-                        }
-                    }
-                },
                 console: {
                     path: "cordova/plugin/windows8/console"
                 }
@@ -114,10 +107,5 @@ module.exports = {
         MediaError: {
             path: 'cordova/plugin/MediaError'
         }
-    },
-    merges: {
-        MediaFile: {
-            path: "cordova/plugin/windows8/MediaFile"
-        }
     }
 };

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/7ec3bc12/lib/windows8/plugin/capture/symbols.js
----------------------------------------------------------------------
diff --git a/lib/windows8/plugin/capture/symbols.js b/lib/windows8/plugin/capture/symbols.js
new file mode 100644
index 0000000..d47db46
--- /dev/null
+++ b/lib/windows8/plugin/capture/symbols.js
@@ -0,0 +1,31 @@
+/*
+ * 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 modulemapper = require('cordova/modulemapper');
+
+modulemapper.clobbers('cordova/plugin/CaptureError', 'CaptureError');
+modulemapper.clobbers('cordova/plugin/CaptureAudioOptions', 'CaptureAudioOptions');
+modulemapper.clobbers('cordova/plugin/CaptureImageOptions', 'CaptureImageOptions');
+modulemapper.clobbers('cordova/plugin/CaptureVideoOptions', 'CaptureVideoOptions');
+modulemapper.clobbers('cordova/plugin/MediaFile', 'MediaFile');
+modulemapper.clobbers('cordova/plugin/MediaFileData', 'MediaFileData');
+modulemapper.clobbers('cordova/plugin/capture', 'navigator.device.capture');
+
+modulemapper.merges('cordova/plugin/windows8/MediaFile', 'MediaFile');

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/7ec3bc12/lib/windowsphone/platform.js
----------------------------------------------------------------------
diff --git a/lib/windowsphone/platform.js b/lib/windowsphone/platform.js
index aff1eec..6d23324 100644
--- a/lib/windowsphone/platform.js
+++ b/lib/windowsphone/platform.js
@@ -57,13 +57,6 @@ module.exports = {
         },
         navigator: {
             children: {
-                device: {
-                    children:{
-                        capture:{
-                            path:"cordova/plugin/capture"
-                        }
-                    }
-                },
                 console: {
                     path: "cordova/plugin/windowsphone/console"