You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by he...@apache.org on 2013/06/13 23:52:50 UTC

[01/13] js commit: remvoed Accelerometer code

Updated Branches:
  refs/heads/3.0.0 c6482accd -> 6b0579a40


remvoed Accelerometer code


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

Branch: refs/heads/3.0.0
Commit: 2dde8a7778a4fceae58d854364cd574904e9b14a
Parents: 26796d7
Author: Steven Gill <st...@gmail.com>
Authored: Thu May 2 11:59:44 2013 -0700
Committer: Steven Gill <st...@gmail.com>
Committed: Thu May 2 11:59:44 2013 -0700

----------------------------------------------------------------------
 lib/common/plugin/Acceleration.js          |  29 ----
 lib/common/plugin/accelerometer.js         | 170 ------------------------
 lib/common/plugin/accelerometer/symbols.js |  25 ----
 3 files changed, 224 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/2dde8a77/lib/common/plugin/Acceleration.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/Acceleration.js b/lib/common/plugin/Acceleration.js
deleted file mode 100644
index d1669b5..0000000
--- a/lib/common/plugin/Acceleration.js
+++ /dev/null
@@ -1,29 +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 Acceleration = function(x, y, z, timestamp) {
-    this.x = x;
-    this.y = y;
-    this.z = z;
-    this.timestamp = timestamp || (new Date()).getTime();
-};
-
-module.exports = Acceleration;

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/2dde8a77/lib/common/plugin/accelerometer.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/accelerometer.js b/lib/common/plugin/accelerometer.js
deleted file mode 100644
index da50487..0000000
--- a/lib/common/plugin/accelerometer.js
+++ /dev/null
@@ -1,170 +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.
- *
-*/
-
-/**
- * This class provides access to device accelerometer data.
- * @constructor
- */
-var argscheck = require('cordova/argscheck'),
-    utils = require("cordova/utils"),
-    exec = require("cordova/exec"),
-    Acceleration = require('cordova/plugin/Acceleration');
-
-// Is the accel sensor running?
-var running = false;
-
-// Keeps reference to watchAcceleration calls.
-var timers = {};
-
-// Array of listeners; used to keep track of when we should call start and stop.
-var listeners = [];
-
-// Last returned acceleration object from native
-var accel = null;
-
-// Tells native to start.
-function start() {
-    exec(function(a) {
-        var tempListeners = listeners.slice(0);
-        accel = new Acceleration(a.x, a.y, a.z, a.timestamp);
-        for (var i = 0, l = tempListeners.length; i < l; i++) {
-            tempListeners[i].win(accel);
-        }
-    }, function(e) {
-        var tempListeners = listeners.slice(0);
-        for (var i = 0, l = tempListeners.length; i < l; i++) {
-            tempListeners[i].fail(e);
-        }
-    }, "Accelerometer", "start", []);
-    running = true;
-}
-
-// Tells native to stop.
-function stop() {
-    exec(null, null, "Accelerometer", "stop", []);
-    running = false;
-}
-
-// Adds a callback pair to the listeners array
-function createCallbackPair(win, fail) {
-    return {win:win, fail:fail};
-}
-
-// Removes a win/fail listener pair from the listeners array
-function removeListeners(l) {
-    var idx = listeners.indexOf(l);
-    if (idx > -1) {
-        listeners.splice(idx, 1);
-        if (listeners.length === 0) {
-            stop();
-        }
-    }
-}
-
-var accelerometer = {
-    /**
-     * Asynchronously acquires the current acceleration.
-     *
-     * @param {Function} successCallback    The function to call when the acceleration data is available
-     * @param {Function} errorCallback      The function to call when there is an error getting the acceleration data. (OPTIONAL)
-     * @param {AccelerationOptions} options The options for getting the accelerometer data such as timeout. (OPTIONAL)
-     */
-    getCurrentAcceleration: function(successCallback, errorCallback, options) {
-        argscheck.checkArgs('fFO', 'accelerometer.getCurrentAcceleration', arguments);
-
-        var p;
-        var win = function(a) {
-            removeListeners(p);
-            successCallback(a);
-        };
-        var fail = function(e) {
-            removeListeners(p);
-            errorCallback && errorCallback(e);
-        };
-
-        p = createCallbackPair(win, fail);
-        listeners.push(p);
-
-        if (!running) {
-            start();
-        }
-    },
-
-    /**
-     * Asynchronously acquires the acceleration repeatedly at a given interval.
-     *
-     * @param {Function} successCallback    The function to call each time the acceleration data is available
-     * @param {Function} errorCallback      The function to call when there is an error getting the acceleration data. (OPTIONAL)
-     * @param {AccelerationOptions} options The options for getting the accelerometer data such as timeout. (OPTIONAL)
-     * @return String                       The watch id that must be passed to #clearWatch to stop watching.
-     */
-    watchAcceleration: function(successCallback, errorCallback, options) {
-        argscheck.checkArgs('fFO', 'accelerometer.watchAcceleration', arguments);
-        // Default interval (10 sec)
-        var frequency = (options && options.frequency && typeof options.frequency == 'number') ? options.frequency : 10000;
-
-        // Keep reference to watch id, and report accel readings as often as defined in frequency
-        var id = utils.createUUID();
-
-        var p = createCallbackPair(function(){}, function(e) {
-            removeListeners(p);
-            errorCallback && errorCallback(e);
-        });
-        listeners.push(p);
-
-        timers[id] = {
-            timer:window.setInterval(function() {
-                if (accel) {
-                    successCallback(accel);
-                }
-            }, frequency),
-            listeners:p
-        };
-
-        if (running) {
-            // If we're already running then immediately invoke the success callback
-            // but only if we have retrieved a value, sample code does not check for null ...
-            if (accel) {
-                successCallback(accel);
-            }
-        } else {
-            start();
-        }
-
-        return id;
-    },
-
-    /**
-     * Clears the specified accelerometer watch.
-     *
-     * @param {String} id       The id of the watch returned from #watchAcceleration.
-     */
-    clearWatch: function(id) {
-        // Stop javascript timer & remove from timer list
-        if (id && timers[id]) {
-            window.clearInterval(timers[id].timer);
-            removeListeners(timers[id].listeners);
-            delete timers[id];
-        }
-    }
-};
-
-module.exports = accelerometer;

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/2dde8a77/lib/common/plugin/accelerometer/symbols.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/accelerometer/symbols.js b/lib/common/plugin/accelerometer/symbols.js
deleted file mode 100644
index 1c6818e..0000000
--- a/lib/common/plugin/accelerometer/symbols.js
+++ /dev/null
@@ -1,25 +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 modulemapper = require('cordova/modulemapper');
-
-modulemapper.defaults('cordova/plugin/Acceleration', 'Acceleration');
-modulemapper.defaults('cordova/plugin/accelerometer', 'navigator.accelerometer');


[03/13] js commit: remove compass APIs for plugin break out

Posted by he...@apache.org.
remove compass APIs for plugin break out


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

Branch: refs/heads/3.0.0
Commit: 7d9d86797ba4ca9cf93e64eda84c25f13a53401f
Parents: 206bb16
Author: hermwong <he...@gmail.com>
Authored: Wed May 8 16:03:37 2013 -0700
Committer: Steven Gill <st...@gmail.com>
Committed: Mon May 13 13:03:09 2013 -0700

----------------------------------------------------------------------
 lib/common/plugin/CompassError.js    |  34 ----------
 lib/common/plugin/CompassHeading.js  |  29 ---------
 lib/common/plugin/compass.js         | 102 ------------------------------
 lib/common/plugin/compass/symbols.js |  26 --------
 4 files changed, 191 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/7d9d8679/lib/common/plugin/CompassError.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/CompassError.js b/lib/common/plugin/CompassError.js
deleted file mode 100644
index 7b5b485..0000000
--- a/lib/common/plugin/CompassError.js
+++ /dev/null
@@ -1,34 +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.
- *
-*/
-
-/**
- *  CompassError.
- *  An error code assigned by an implementation when an error has occurred
- * @constructor
- */
-var CompassError = function(err) {
-    this.code = (err !== undefined ? err : null);
-};
-
-CompassError.COMPASS_INTERNAL_ERR = 0;
-CompassError.COMPASS_NOT_SUPPORTED = 20;
-
-module.exports = CompassError;

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/7d9d8679/lib/common/plugin/CompassHeading.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/CompassHeading.js b/lib/common/plugin/CompassHeading.js
deleted file mode 100644
index 70343ee..0000000
--- a/lib/common/plugin/CompassHeading.js
+++ /dev/null
@@ -1,29 +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 CompassHeading = function(magneticHeading, trueHeading, headingAccuracy, timestamp) {
-  this.magneticHeading = magneticHeading;
-  this.trueHeading = trueHeading;
-  this.headingAccuracy = headingAccuracy;
-  this.timestamp = timestamp || new Date().getTime();
-};
-
-module.exports = CompassHeading;

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/7d9d8679/lib/common/plugin/compass.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/compass.js b/lib/common/plugin/compass.js
deleted file mode 100644
index 896c706..0000000
--- a/lib/common/plugin/compass.js
+++ /dev/null
@@ -1,102 +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 argscheck = require('cordova/argscheck'),
-    exec = require('cordova/exec'),
-    utils = require('cordova/utils'),
-    CompassHeading = require('cordova/plugin/CompassHeading'),
-    CompassError = require('cordova/plugin/CompassError'),
-    timers = {},
-    compass = {
-        /**
-         * Asynchronously acquires the current heading.
-         * @param {Function} successCallback The function to call when the heading
-         * data is available
-         * @param {Function} errorCallback The function to call when there is an error
-         * getting the heading data.
-         * @param {CompassOptions} options The options for getting the heading data (not used).
-         */
-        getCurrentHeading:function(successCallback, errorCallback, options) {
-            argscheck.checkArgs('fFO', 'compass.getCurrentHeading', arguments);
-
-            var win = function(result) {
-                var ch = new CompassHeading(result.magneticHeading, result.trueHeading, result.headingAccuracy, result.timestamp);
-                successCallback(ch);
-            };
-            var fail = errorCallback && function(code) {
-                var ce = new CompassError(code);
-                errorCallback(ce);
-            };
-
-            // Get heading
-            exec(win, fail, "Compass", "getHeading", [options]);
-        },
-
-        /**
-         * Asynchronously acquires the heading repeatedly at a given interval.
-         * @param {Function} successCallback The function to call each time the heading
-         * data is available
-         * @param {Function} errorCallback The function to call when there is an error
-         * getting the heading data.
-         * @param {HeadingOptions} options The options for getting the heading data
-         * such as timeout and the frequency of the watch. For iOS, filter parameter
-         * specifies to watch via a distance filter rather than time.
-         */
-        watchHeading:function(successCallback, errorCallback, options) {
-            argscheck.checkArgs('fFO', 'compass.watchHeading', arguments);
-            // Default interval (100 msec)
-            var frequency = (options !== undefined && options.frequency !== undefined) ? options.frequency : 100;
-            var filter = (options !== undefined && options.filter !== undefined) ? options.filter : 0;
-
-            var id = utils.createUUID();
-            if (filter > 0) {
-                // is an iOS request for watch by filter, no timer needed
-                timers[id] = "iOS";
-                compass.getCurrentHeading(successCallback, errorCallback, options);
-            } else {
-                // Start watch timer to get headings
-                timers[id] = window.setInterval(function() {
-                    compass.getCurrentHeading(successCallback, errorCallback);
-                }, frequency);
-            }
-
-            return id;
-        },
-
-        /**
-         * Clears the specified heading watch.
-         * @param {String} watchId The ID of the watch returned from #watchHeading.
-         */
-        clearWatch:function(id) {
-            // Stop javascript timer & remove from timer list
-            if (id && timers[id]) {
-                if (timers[id] != "iOS") {
-                    clearInterval(timers[id]);
-                } else {
-                    // is iOS watch by filter so call into device to stop
-                    exec(null, null, "Compass", "stopHeading", []);
-                }
-                delete timers[id];
-            }
-        }
-    };
-
-module.exports = compass;

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/7d9d8679/lib/common/plugin/compass/symbols.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/compass/symbols.js b/lib/common/plugin/compass/symbols.js
deleted file mode 100644
index 0ebfd9c..0000000
--- a/lib/common/plugin/compass/symbols.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.
- *
-*/
-
-
-var modulemapper = require('cordova/modulemapper');
-
-modulemapper.clobbers('cordova/plugin/CompassHeading', 'CompassHeading');
-modulemapper.clobbers('cordova/plugin/CompassError', 'CompassError');
-modulemapper.clobbers('cordova/plugin/compass', 'navigator.compass');


[09/13] js commit: remove notification apis from cordova-js

Posted by he...@apache.org.
remove notification apis from cordova-js


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

Branch: refs/heads/3.0.0
Commit: df4a3a31f6a2515e8ab19ca8d1240c940d0c1e12
Parents: 7d503ee
Author: hermwong <he...@gmail.com>
Authored: Tue May 14 14:36:56 2013 -0700
Committer: hermwong <he...@gmail.com>
Committed: Tue May 14 14:36:56 2013 -0700

----------------------------------------------------------------------
 lib/android/plugin/android/notification.js |  74 ---------------
 lib/android/plugin/notification/symbols.js |  25 -----
 lib/common/plugin/notification.js          | 118 ------------------------
 lib/common/plugin/notification/symbols.js  |  24 -----
 4 files changed, 241 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/df4a3a31/lib/android/plugin/android/notification.js
----------------------------------------------------------------------
diff --git a/lib/android/plugin/android/notification.js b/lib/android/plugin/android/notification.js
deleted file mode 100644
index 8936a5c..0000000
--- a/lib/android/plugin/android/notification.js
+++ /dev/null
@@ -1,74 +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 exec = require('cordova/exec');
-
-/**
- * Provides Android enhanced notification API.
- */
-module.exports = {
-    activityStart : function(title, message) {
-        // If title and message not specified then mimic Android behavior of
-        // using default strings.
-        if (typeof title === "undefined" && typeof message == "undefined") {
-            title = "Busy";
-            message = 'Please wait...';
-        }
-
-        exec(null, null, 'Notification', 'activityStart', [ title, message ]);
-    },
-
-    /**
-     * Close an activity dialog
-     */
-    activityStop : function() {
-        exec(null, null, 'Notification', 'activityStop', []);
-    },
-
-    /**
-     * Display a progress dialog with progress bar that goes from 0 to 100.
-     *
-     * @param {String}
-     *            title Title of the progress dialog.
-     * @param {String}
-     *            message Message to display in the dialog.
-     */
-    progressStart : function(title, message) {
-        exec(null, null, 'Notification', 'progressStart', [ title, message ]);
-    },
-
-    /**
-     * Close the progress dialog.
-     */
-    progressStop : function() {
-        exec(null, null, 'Notification', 'progressStop', []);
-    },
-
-    /**
-     * Set the progress dialog value.
-     *
-     * @param {Number}
-     *            value 0-100
-     */
-    progressValue : function(value) {
-        exec(null, null, 'Notification', 'progressValue', [ value ]);
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/df4a3a31/lib/android/plugin/notification/symbols.js
----------------------------------------------------------------------
diff --git a/lib/android/plugin/notification/symbols.js b/lib/android/plugin/notification/symbols.js
deleted file mode 100644
index c639dc2..0000000
--- a/lib/android/plugin/notification/symbols.js
+++ /dev/null
@@ -1,25 +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 modulemapper = require('cordova/modulemapper');
-
-modulemapper.clobbers('cordova/plugin/notification', 'navigator.notification');
-modulemapper.merges('cordova/plugin/android/notification', 'navigator.notification');

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/df4a3a31/lib/common/plugin/notification.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/notification.js b/lib/common/plugin/notification.js
deleted file mode 100644
index 919e050..0000000
--- a/lib/common/plugin/notification.js
+++ /dev/null
@@ -1,118 +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 exec = require('cordova/exec');
-var platform = require('cordova/platform');
-
-/**
- * Provides access to notifications on the device.
- */
-
-module.exports = {
-
-    /**
-     * Open a native alert dialog, with a customizable title and button text.
-     *
-     * @param {String} message              Message to print in the body of the alert
-     * @param {Function} completeCallback   The callback that is called when user clicks on a button.
-     * @param {String} title                Title of the alert dialog (default: Alert)
-     * @param {String} buttonLabel          Label of the close button (default: OK)
-     */
-    alert: function(message, completeCallback, title, buttonLabel) {
-        var _title = (title || "Alert");
-        var _buttonLabel = (buttonLabel || "OK");
-        exec(completeCallback, null, "Notification", "alert", [message, _title, _buttonLabel]);
-    },
-
-    /**
-     * Open a native confirm dialog, with a customizable title and button text.
-     * The result that the user selects is returned to the result callback.
-     *
-     * @param {String} message              Message to print in the body of the alert
-     * @param {Function} resultCallback     The callback that is called when user clicks on a button.
-     * @param {String} title                Title of the alert dialog (default: Confirm)
-     * @param {Array} buttonLabels          Array of the labels of the buttons (default: ['OK', 'Cancel'])
-     */
-    confirm: function(message, resultCallback, title, buttonLabels) {
-        var _title = (title || "Confirm");
-        var _buttonLabels = (buttonLabels || ["OK", "Cancel"]);
-
-        // Strings are deprecated!
-        if (typeof _buttonLabels === 'string') {
-            console.log("Notification.confirm(string, function, string, string) is deprecated.  Use Notification.confirm(string, function, string, array).");
-        }
-
-        // Some platforms take an array of button label names.
-        // Other platforms take a comma separated list.
-        // For compatibility, we convert to the desired type based on the platform.
-        if (platform.id == "android" || platform.id == "ios" || platform.id == "windowsphone" || platform.id == "blackberry10") {
-            if (typeof _buttonLabels === 'string') {
-                var buttonLabelString = _buttonLabels;
-                _buttonLabels = _buttonLabels.split(","); // not crazy about changing the var type here
-            }
-        } else {
-            if (Array.isArray(_buttonLabels)) {
-                var buttonLabelArray = _buttonLabels;
-                _buttonLabels = buttonLabelArray.toString();
-            }
-        }
-        exec(resultCallback, null, "Notification", "confirm", [message, _title, _buttonLabels]);
-    },
-
-    /**
-     * Open a native prompt dialog, with a customizable title and button text.
-     * The following results are returned to the result callback:
-     *  buttonIndex     Index number of the button selected.
-     *  input1          The text entered in the prompt dialog box.
-     *
-     * @param {String} message              Dialog message to display (default: "Prompt message")
-     * @param {Function} resultCallback     The callback that is called when user clicks on a button.
-     * @param {String} title                Title of the dialog (default: "Prompt")
-     * @param {Array} buttonLabels          Array of strings for the button labels (default: ["OK","Cancel"])
-     * @param {String} defaultText          Textbox input value (default: "Default text")
-     */
-    prompt: function(message, resultCallback, title, buttonLabels, defaultText) {
-        var _message = (message || "Prompt message");
-        var _title = (title || "Prompt");
-        var _buttonLabels = (buttonLabels || ["OK","Cancel"]);
-        var _defaultText = (defaultText || "Default text");
-        exec(resultCallback, null, "Notification", "prompt", [_message, _title, _buttonLabels, _defaultText]);
-    },
-
-    /**
-     * Causes the device to vibrate.
-     *
-     * @param {Integer} mills       The number of milliseconds to vibrate for.
-     */
-    vibrate: function(mills) {
-        exec(null, null, "Notification", "vibrate", [mills]);
-    },
-
-    /**
-     * Causes the device to beep.
-     * On Android, the default notification ringtone is played "count" times.
-     *
-     * @param {Integer} count       The number of beeps.
-     */
-    beep: function(count) {
-        exec(null, null, "Notification", "beep", [count]);
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/df4a3a31/lib/common/plugin/notification/symbols.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/notification/symbols.js b/lib/common/plugin/notification/symbols.js
deleted file mode 100644
index e4d249b..0000000
--- a/lib/common/plugin/notification/symbols.js
+++ /dev/null
@@ -1,24 +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 modulemapper = require('cordova/modulemapper');
-
-modulemapper.defaults('cordova/plugin/notification', 'navigator.notification');


[12/13] js commit: remove Coordinates class

Posted by he...@apache.org.
remove Coordinates class


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

Branch: refs/heads/3.0.0
Commit: 5d307fde1405e63f4d714198e04591660705bd07
Parents: 445b258
Author: hermwong <he...@gmail.com>
Authored: Thu May 16 14:28:18 2013 -0700
Committer: hermwong <he...@gmail.com>
Committed: Thu May 16 14:28:18 2013 -0700

----------------------------------------------------------------------
 lib/common/plugin/Coordinates.js | 69 -----------------------------------
 1 file changed, 69 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/5d307fde/lib/common/plugin/Coordinates.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/Coordinates.js b/lib/common/plugin/Coordinates.js
deleted file mode 100644
index 84fdd5b..0000000
--- a/lib/common/plugin/Coordinates.js
+++ /dev/null
@@ -1,69 +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.
- *
-*/
-
-/**
- * This class contains position information.
- * @param {Object} lat
- * @param {Object} lng
- * @param {Object} alt
- * @param {Object} acc
- * @param {Object} head
- * @param {Object} vel
- * @param {Object} altacc
- * @constructor
- */
-var Coordinates = function(lat, lng, alt, acc, head, vel, altacc) {
-    /**
-     * The latitude of the position.
-     */
-    this.latitude = lat;
-    /**
-     * The longitude of the position,
-     */
-    this.longitude = lng;
-    /**
-     * The accuracy of the position.
-     */
-    this.accuracy = acc;
-    /**
-     * The altitude of the position.
-     */
-    this.altitude = (alt !== undefined ? alt : null);
-    /**
-     * The direction the device is moving at the position.
-     */
-    this.heading = (head !== undefined ? head : null);
-    /**
-     * The velocity with which the device is moving at the position.
-     */
-    this.speed = (vel !== undefined ? vel : null);
-
-    if (this.speed === 0 || this.speed === null) {
-        this.heading = NaN;
-    }
-
-    /**
-     * The altitude accuracy of the position.
-     */
-    this.altitudeAccuracy = (altacc !== undefined) ? altacc : null;
-};
-
-module.exports = Coordinates;


[05/13] js commit: Merge branch '3.0.0' of https://git-wip-us.apache.org/repos/asf/cordova-js into 3.0.0

Posted by he...@apache.org.
Merge branch '3.0.0' of https://git-wip-us.apache.org/repos/asf/cordova-js into 3.0.0


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

Branch: refs/heads/3.0.0
Commit: 64dddf419e224b7d0839c5b36fa891b670412e1a
Parents: 7d9d867 575b51f
Author: Steven Gill <st...@gmail.com>
Authored: Mon May 13 13:06:55 2013 -0700
Committer: Steven Gill <st...@gmail.com>
Committed: Mon May 13 13:06:55 2013 -0700

----------------------------------------------------------------------

----------------------------------------------------------------------



[07/13] js commit: Merge remote-tracking branch 'origin' into 3.0.0

Posted by he...@apache.org.
Merge remote-tracking branch 'origin' into 3.0.0


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

Branch: refs/heads/3.0.0
Commit: 5714f9b07d67771510805b5663c6f8ef0d6d4275
Parents: 64dddf4 f0d783f
Author: Steven Gill <st...@gmail.com>
Authored: Tue May 14 14:04:24 2013 -0700
Committer: Steven Gill <st...@gmail.com>
Committed: Tue May 14 14:04:24 2013 -0700

----------------------------------------------------------------------
 Jakefile                                        |  31 +-
 build/packager.js                               |   5 +
 lib/blackberry/platform.js                      |   5 +-
 lib/blackberry/plugin/qnx/InAppBrowser.js       |  86 ---
 lib/blackberry/plugin/qnx/battery.js            |  40 --
 lib/blackberry/plugin/qnx/camera.js             |  32 --
 lib/blackberry/plugin/qnx/capture.js            |  76 ---
 lib/blackberry/plugin/qnx/compass.js            | 162 ------
 lib/blackberry/plugin/qnx/device.js             |  41 --
 lib/blackberry/plugin/qnx/file.js               | 424 --------------
 lib/blackberry/plugin/qnx/fileTransfer.js       | 205 -------
 lib/blackberry/plugin/qnx/magnetometer.js       |  45 --
 lib/blackberry/plugin/qnx/manager.js            |  60 --
 lib/blackberry/plugin/qnx/network.js            |  28 -
 lib/blackberry/plugin/qnx/platform.js           |  44 --
 lib/blackberry10/exec.js                        |  49 ++
 lib/blackberry10/platform.js                    |  37 ++
 lib/blackberry10/plugin/DirectoryEntry.js       |  57 ++
 lib/blackberry10/plugin/DirectoryReader.js      |  47 ++
 lib/blackberry10/plugin/Entry.js                | 112 ++++
 lib/blackberry10/plugin/FileEntry.js            |  47 ++
 lib/blackberry10/plugin/FileReader.js           |  90 +++
 lib/blackberry10/plugin/FileSystem.js           |  27 +
 lib/blackberry10/plugin/FileWriter.js           | 120 ++++
 .../plugin/blackberry10/InAppBrowser.js         |  86 +++
 lib/blackberry10/plugin/blackberry10/capture.js |  76 +++
 lib/blackberry10/plugin/blackberry10/compass.js | 162 ++++++
 lib/blackberry10/plugin/blackberry10/event.js   | 102 ++++
 .../plugin/blackberry10/exception.js            |  74 +++
 .../plugin/blackberry10/fileTransfer.js         | 202 +++++++
 .../plugin/blackberry10/fileUtils.js            |  47 ++
 .../plugin/blackberry10/magnetometer.js         |  45 ++
 lib/blackberry10/plugin/blackberry10/media.js   | 189 +++++++
 lib/blackberry10/plugin/blackberry10/utils.js   | 556 +++++++++++++++++++
 lib/blackberry10/plugin/blackberry10/vibrate.js |  31 ++
 lib/blackberry10/plugin/requestFileSystem.js    |  38 ++
 .../plugin/resolveLocalFileSystemURI.js         |  55 ++
 lib/common/plugin/notification.js               |   2 +-
 lib/scripts/bootstrap-blackberry.js             |  20 +-
 lib/scripts/bootstrap-blackberry10.js           | 136 +++++
 lib/scripts/plugin_loader.js                    |   4 +-
 lib/scripts/require.js                          |  21 +-
 test/blackberry/qnx/test.battery.js             |  72 ---
 test/blackberry/qnx/test.camera.js              |  59 --
 test/blackberry/qnx/test.capture.js             | 222 --------
 test/blackberry/qnx/test.compass.js             |  61 --
 test/blackberry/qnx/test.device.js              |  48 --
 test/blackberry/qnx/test.fileTransfer.js        |  85 ---
 test/blackberry/qnx/test.magnetometer.js        |  80 ---
 test/blackberry/qnx/test.manager.js             |  56 --
 test/blackberry/qnx/test.network.js             |  39 --
 test/blackberry/qnx/test.platform.js            | 123 ----
 test/blackberry/test.exec.js                    |  16 +-
 test/blackberry/test.platform.js                |  25 +-
 test/blackberry10/test.capture.js               | 222 ++++++++
 test/blackberry10/test.compass.js               |  61 ++
 test/blackberry10/test.event.js                 | 188 +++++++
 test/blackberry10/test.magnetometer.js          |  80 +++
 test/runner.js                                  |   2 +-
 test/test.require.js                            |   2 +-
 60 files changed, 3009 insertions(+), 2148 deletions(-)
----------------------------------------------------------------------



[02/13] js commit: remove compass APIs for plugin break out

Posted by he...@apache.org.
remove compass APIs for plugin break out


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

Branch: refs/heads/3.0.0
Commit: 575b51f3b8c3c0c3157ba35af8aabc74449e9e62
Parents: 2dde8a7
Author: hermwong <he...@gmail.com>
Authored: Wed May 8 16:03:37 2013 -0700
Committer: hermwong <he...@gmail.com>
Committed: Wed May 8 16:03:37 2013 -0700

----------------------------------------------------------------------
 lib/common/plugin/CompassError.js    |  34 ----------
 lib/common/plugin/CompassHeading.js  |  29 ---------
 lib/common/plugin/compass.js         | 102 ------------------------------
 lib/common/plugin/compass/symbols.js |  26 --------
 4 files changed, 191 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/575b51f3/lib/common/plugin/CompassError.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/CompassError.js b/lib/common/plugin/CompassError.js
deleted file mode 100644
index 7b5b485..0000000
--- a/lib/common/plugin/CompassError.js
+++ /dev/null
@@ -1,34 +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.
- *
-*/
-
-/**
- *  CompassError.
- *  An error code assigned by an implementation when an error has occurred
- * @constructor
- */
-var CompassError = function(err) {
-    this.code = (err !== undefined ? err : null);
-};
-
-CompassError.COMPASS_INTERNAL_ERR = 0;
-CompassError.COMPASS_NOT_SUPPORTED = 20;
-
-module.exports = CompassError;

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/575b51f3/lib/common/plugin/CompassHeading.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/CompassHeading.js b/lib/common/plugin/CompassHeading.js
deleted file mode 100644
index 70343ee..0000000
--- a/lib/common/plugin/CompassHeading.js
+++ /dev/null
@@ -1,29 +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 CompassHeading = function(magneticHeading, trueHeading, headingAccuracy, timestamp) {
-  this.magneticHeading = magneticHeading;
-  this.trueHeading = trueHeading;
-  this.headingAccuracy = headingAccuracy;
-  this.timestamp = timestamp || new Date().getTime();
-};
-
-module.exports = CompassHeading;

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/575b51f3/lib/common/plugin/compass.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/compass.js b/lib/common/plugin/compass.js
deleted file mode 100644
index 896c706..0000000
--- a/lib/common/plugin/compass.js
+++ /dev/null
@@ -1,102 +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 argscheck = require('cordova/argscheck'),
-    exec = require('cordova/exec'),
-    utils = require('cordova/utils'),
-    CompassHeading = require('cordova/plugin/CompassHeading'),
-    CompassError = require('cordova/plugin/CompassError'),
-    timers = {},
-    compass = {
-        /**
-         * Asynchronously acquires the current heading.
-         * @param {Function} successCallback The function to call when the heading
-         * data is available
-         * @param {Function} errorCallback The function to call when there is an error
-         * getting the heading data.
-         * @param {CompassOptions} options The options for getting the heading data (not used).
-         */
-        getCurrentHeading:function(successCallback, errorCallback, options) {
-            argscheck.checkArgs('fFO', 'compass.getCurrentHeading', arguments);
-
-            var win = function(result) {
-                var ch = new CompassHeading(result.magneticHeading, result.trueHeading, result.headingAccuracy, result.timestamp);
-                successCallback(ch);
-            };
-            var fail = errorCallback && function(code) {
-                var ce = new CompassError(code);
-                errorCallback(ce);
-            };
-
-            // Get heading
-            exec(win, fail, "Compass", "getHeading", [options]);
-        },
-
-        /**
-         * Asynchronously acquires the heading repeatedly at a given interval.
-         * @param {Function} successCallback The function to call each time the heading
-         * data is available
-         * @param {Function} errorCallback The function to call when there is an error
-         * getting the heading data.
-         * @param {HeadingOptions} options The options for getting the heading data
-         * such as timeout and the frequency of the watch. For iOS, filter parameter
-         * specifies to watch via a distance filter rather than time.
-         */
-        watchHeading:function(successCallback, errorCallback, options) {
-            argscheck.checkArgs('fFO', 'compass.watchHeading', arguments);
-            // Default interval (100 msec)
-            var frequency = (options !== undefined && options.frequency !== undefined) ? options.frequency : 100;
-            var filter = (options !== undefined && options.filter !== undefined) ? options.filter : 0;
-
-            var id = utils.createUUID();
-            if (filter > 0) {
-                // is an iOS request for watch by filter, no timer needed
-                timers[id] = "iOS";
-                compass.getCurrentHeading(successCallback, errorCallback, options);
-            } else {
-                // Start watch timer to get headings
-                timers[id] = window.setInterval(function() {
-                    compass.getCurrentHeading(successCallback, errorCallback);
-                }, frequency);
-            }
-
-            return id;
-        },
-
-        /**
-         * Clears the specified heading watch.
-         * @param {String} watchId The ID of the watch returned from #watchHeading.
-         */
-        clearWatch:function(id) {
-            // Stop javascript timer & remove from timer list
-            if (id && timers[id]) {
-                if (timers[id] != "iOS") {
-                    clearInterval(timers[id]);
-                } else {
-                    // is iOS watch by filter so call into device to stop
-                    exec(null, null, "Compass", "stopHeading", []);
-                }
-                delete timers[id];
-            }
-        }
-    };
-
-module.exports = compass;

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/575b51f3/lib/common/plugin/compass/symbols.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/compass/symbols.js b/lib/common/plugin/compass/symbols.js
deleted file mode 100644
index 0ebfd9c..0000000
--- a/lib/common/plugin/compass/symbols.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.
- *
-*/
-
-
-var modulemapper = require('cordova/modulemapper');
-
-modulemapper.clobbers('cordova/plugin/CompassHeading', 'CompassHeading');
-modulemapper.clobbers('cordova/plugin/CompassError', 'CompassError');
-modulemapper.clobbers('cordova/plugin/compass', 'navigator.compass');


[11/13] js commit: Merge branch '3.0.0' of https://git-wip-us.apache.org/repos/asf/cordova-js into 3.0.0

Posted by he...@apache.org.
Merge branch '3.0.0' of https://git-wip-us.apache.org/repos/asf/cordova-js into 3.0.0


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

Branch: refs/heads/3.0.0
Commit: 445b258636090d19b0b50831410423f1d4e00dd8
Parents: 3697fea 75b136a
Author: hermwong <he...@gmail.com>
Authored: Thu May 16 14:27:02 2013 -0700
Committer: hermwong <he...@gmail.com>
Committed: Thu May 16 14:27:02 2013 -0700

----------------------------------------------------------------------
 lib/scripts/plugin_loader.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[06/13] js commit: remove geolocation api from Cordova-JS project

Posted by he...@apache.org.
remove geolocation api from Cordova-JS project


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

Branch: refs/heads/3.0.0
Commit: 74f1a834d2d2a46b83affe7e03b7aa1354d9df72
Parents: 64dddf4
Author: hermwong <he...@gmail.com>
Authored: Mon May 13 13:57:42 2013 -0700
Committer: hermwong <he...@gmail.com>
Committed: Mon May 13 13:57:42 2013 -0700

----------------------------------------------------------------------
 lib/common/plugin/Position.js            |  33 ----
 lib/common/plugin/PositionError.js       |  38 -----
 lib/common/plugin/geolocation.js         | 211 --------------------------
 lib/common/plugin/geolocation/symbols.js |  27 ----
 4 files changed, 309 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/74f1a834/lib/common/plugin/Position.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/Position.js b/lib/common/plugin/Position.js
deleted file mode 100644
index 0f21ba3..0000000
--- a/lib/common/plugin/Position.js
+++ /dev/null
@@ -1,33 +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 Coordinates = require('cordova/plugin/Coordinates');
-
-var Position = function(coords, timestamp) {
-    if (coords) {
-        this.coords = new Coordinates(coords.latitude, coords.longitude, coords.altitude, coords.accuracy, coords.heading, coords.velocity, coords.altitudeAccuracy);
-    } else {
-        this.coords = new Coordinates();
-    }
-    this.timestamp = (timestamp !== undefined) ? timestamp : new Date();
-};
-
-module.exports = Position;

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/74f1a834/lib/common/plugin/PositionError.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/PositionError.js b/lib/common/plugin/PositionError.js
deleted file mode 100644
index 9403f11..0000000
--- a/lib/common/plugin/PositionError.js
+++ /dev/null
@@ -1,38 +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.
- *
-*/
-
-/**
- * Position error object
- *
- * @constructor
- * @param code
- * @param message
- */
-var PositionError = function(code, message) {
-    this.code = code || null;
-    this.message = message || '';
-};
-
-PositionError.PERMISSION_DENIED = 1;
-PositionError.POSITION_UNAVAILABLE = 2;
-PositionError.TIMEOUT = 3;
-
-module.exports = PositionError;

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/74f1a834/lib/common/plugin/geolocation.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/geolocation.js b/lib/common/plugin/geolocation.js
deleted file mode 100644
index 6af92ca..0000000
--- a/lib/common/plugin/geolocation.js
+++ /dev/null
@@ -1,211 +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 argscheck = require('cordova/argscheck'),
-    utils = require('cordova/utils'),
-    exec = require('cordova/exec'),
-    PositionError = require('cordova/plugin/PositionError'),
-    Position = require('cordova/plugin/Position');
-
-var timers = {};   // list of timers in use
-
-// Returns default params, overrides if provided with values
-function parseParameters(options) {
-    var opt = {
-        maximumAge: 0,
-        enableHighAccuracy: false,
-        timeout: Infinity
-    };
-
-    if (options) {
-        if (options.maximumAge !== undefined && !isNaN(options.maximumAge) && options.maximumAge > 0) {
-            opt.maximumAge = options.maximumAge;
-        }
-        if (options.enableHighAccuracy !== undefined) {
-            opt.enableHighAccuracy = options.enableHighAccuracy;
-        }
-        if (options.timeout !== undefined && !isNaN(options.timeout)) {
-            if (options.timeout < 0) {
-                opt.timeout = 0;
-            } else {
-                opt.timeout = options.timeout;
-            }
-        }
-    }
-
-    return opt;
-}
-
-// Returns a timeout failure, closed over a specified timeout value and error callback.
-function createTimeout(errorCallback, timeout) {
-    var t = setTimeout(function() {
-        clearTimeout(t);
-        t = null;
-        errorCallback({
-            code:PositionError.TIMEOUT,
-            message:"Position retrieval timed out."
-        });
-    }, timeout);
-    return t;
-}
-
-var geolocation = {
-    lastPosition:null, // reference to last known (cached) position returned
-    /**
-   * Asynchronously acquires the current position.
-   *
-   * @param {Function} successCallback    The function to call when the position data is available
-   * @param {Function} errorCallback      The function to call when there is an error getting the heading position. (OPTIONAL)
-   * @param {PositionOptions} options     The options for getting the position data. (OPTIONAL)
-   */
-    getCurrentPosition:function(successCallback, errorCallback, options) {
-        argscheck.checkArgs('fFO', 'geolocation.getCurrentPosition', arguments);
-        options = parseParameters(options);
-
-        // Timer var that will fire an error callback if no position is retrieved from native
-        // before the "timeout" param provided expires
-        var timeoutTimer = {timer:null};
-
-        var win = function(p) {
-            clearTimeout(timeoutTimer.timer);
-            if (!(timeoutTimer.timer)) {
-                // Timeout already happened, or native fired error callback for
-                // this geo request.
-                // Don't continue with success callback.
-                return;
-            }
-            var pos = new Position(
-                {
-                    latitude:p.latitude,
-                    longitude:p.longitude,
-                    altitude:p.altitude,
-                    accuracy:p.accuracy,
-                    heading:p.heading,
-                    velocity:p.velocity,
-                    altitudeAccuracy:p.altitudeAccuracy
-                },
-                (p.timestamp === undefined ? new Date() : ((p.timestamp instanceof Date) ? p.timestamp : new Date(p.timestamp)))
-            );
-            geolocation.lastPosition = pos;
-            successCallback(pos);
-        };
-        var fail = function(e) {
-            clearTimeout(timeoutTimer.timer);
-            timeoutTimer.timer = null;
-            var err = new PositionError(e.code, e.message);
-            if (errorCallback) {
-                errorCallback(err);
-            }
-        };
-
-        // Check our cached position, if its timestamp difference with current time is less than the maximumAge, then just
-        // fire the success callback with the cached position.
-        if (geolocation.lastPosition && options.maximumAge && (((new Date()).getTime() - geolocation.lastPosition.timestamp.getTime()) <= options.maximumAge)) {
-            successCallback(geolocation.lastPosition);
-        // If the cached position check failed and the timeout was set to 0, error out with a TIMEOUT error object.
-        } else if (options.timeout === 0) {
-            fail({
-                code:PositionError.TIMEOUT,
-                message:"timeout value in PositionOptions set to 0 and no cached Position object available, or cached Position object's age exceeds provided PositionOptions' maximumAge parameter."
-            });
-        // Otherwise we have to call into native to retrieve a position.
-        } else {
-            if (options.timeout !== Infinity) {
-                // If the timeout value was not set to Infinity (default), then
-                // set up a timeout function that will fire the error callback
-                // if no successful position was retrieved before timeout expired.
-                timeoutTimer.timer = createTimeout(fail, options.timeout);
-            } else {
-                // This is here so the check in the win function doesn't mess stuff up
-                // may seem weird but this guarantees timeoutTimer is
-                // always truthy before we call into native
-                timeoutTimer.timer = true;
-            }
-            exec(win, fail, "Geolocation", "getLocation", [options.enableHighAccuracy, options.maximumAge]);
-        }
-        return timeoutTimer;
-    },
-    /**
-     * Asynchronously watches the geolocation for changes to geolocation.  When a change occurs,
-     * the successCallback is called with the new location.
-     *
-     * @param {Function} successCallback    The function to call each time the location data is available
-     * @param {Function} errorCallback      The function to call when there is an error getting the location data. (OPTIONAL)
-     * @param {PositionOptions} options     The options for getting the location data such as frequency. (OPTIONAL)
-     * @return String                       The watch id that must be passed to #clearWatch to stop watching.
-     */
-    watchPosition:function(successCallback, errorCallback, options) {
-        argscheck.checkArgs('fFO', 'geolocation.getCurrentPosition', arguments);
-        options = parseParameters(options);
-
-        var id = utils.createUUID();
-
-        // Tell device to get a position ASAP, and also retrieve a reference to the timeout timer generated in getCurrentPosition
-        timers[id] = geolocation.getCurrentPosition(successCallback, errorCallback, options);
-
-        var fail = function(e) {
-            clearTimeout(timers[id].timer);
-            var err = new PositionError(e.code, e.message);
-            if (errorCallback) {
-                errorCallback(err);
-            }
-        };
-
-        var win = function(p) {
-            clearTimeout(timers[id].timer);
-            if (options.timeout !== Infinity) {
-                timers[id].timer = createTimeout(fail, options.timeout);
-            }
-            var pos = new Position(
-                {
-                    latitude:p.latitude,
-                    longitude:p.longitude,
-                    altitude:p.altitude,
-                    accuracy:p.accuracy,
-                    heading:p.heading,
-                    velocity:p.velocity,
-                    altitudeAccuracy:p.altitudeAccuracy
-                },
-                (p.timestamp === undefined ? new Date() : ((p.timestamp instanceof Date) ? p.timestamp : new Date(p.timestamp)))
-            );
-            geolocation.lastPosition = pos;
-            successCallback(pos);
-        };
-
-        exec(win, fail, "Geolocation", "addWatch", [id, options.enableHighAccuracy]);
-
-        return id;
-    },
-    /**
-     * Clears the specified heading watch.
-     *
-     * @param {String} id       The ID of the watch returned from #watchPosition
-     */
-    clearWatch:function(id) {
-        if (id && timers[id] !== undefined) {
-            clearTimeout(timers[id].timer);
-            timers[id].timer = false;
-            exec(null, null, "Geolocation", "clearWatch", [id]);
-        }
-    }
-};
-
-module.exports = geolocation;

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/74f1a834/lib/common/plugin/geolocation/symbols.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/geolocation/symbols.js b/lib/common/plugin/geolocation/symbols.js
deleted file mode 100644
index ee31422..0000000
--- a/lib/common/plugin/geolocation/symbols.js
+++ /dev/null
@@ -1,27 +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 modulemapper = require('cordova/modulemapper');
-
-modulemapper.defaults('cordova/plugin/geolocation', 'navigator.geolocation');
-modulemapper.clobbers('cordova/plugin/PositionError', 'PositionError');
-modulemapper.clobbers('cordova/plugin/Position', 'Position');
-modulemapper.clobbers('cordova/plugin/Coordinates', 'Coordinates');


[10/13] js commit: remove notification symbol file from ios

Posted by he...@apache.org.
remove notification symbol file from ios


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

Branch: refs/heads/3.0.0
Commit: 3697fea8609b835bb4fe3d74e57b450a40f5faf8
Parents: df4a3a3
Author: hermwong <he...@gmail.com>
Authored: Tue May 14 15:10:09 2013 -0700
Committer: hermwong <he...@gmail.com>
Committed: Tue May 14 15:10:09 2013 -0700

----------------------------------------------------------------------
 lib/ios/plugin/notification/symbols.js | 25 -------------------------
 1 file changed, 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3697fea8/lib/ios/plugin/notification/symbols.js
----------------------------------------------------------------------
diff --git a/lib/ios/plugin/notification/symbols.js b/lib/ios/plugin/notification/symbols.js
deleted file mode 100644
index c80f18d..0000000
--- a/lib/ios/plugin/notification/symbols.js
+++ /dev/null
@@ -1,25 +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 modulemapper = require('cordova/modulemapper');
-
-modulemapper.clobbers('cordova/plugin/notification', 'navigator.notification');
-modulemapper.merges('cordova/plugin/ios/notification', 'navigator.notification');


[08/13] js commit: Merge branch '3.0.0' of https://git-wip-us.apache.org/repos/asf/cordova-js into 3.0.0

Posted by he...@apache.org.
Merge branch '3.0.0' of https://git-wip-us.apache.org/repos/asf/cordova-js into 3.0.0


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

Branch: refs/heads/3.0.0
Commit: 7d503ee9db11b0344df2ba74b247f3856716cc27
Parents: 5714f9b 74f1a83
Author: Steven Gill <st...@gmail.com>
Authored: Tue May 14 14:12:05 2013 -0700
Committer: Steven Gill <st...@gmail.com>
Committed: Tue May 14 14:12:05 2013 -0700

----------------------------------------------------------------------
 lib/common/plugin/Position.js            |  33 ----
 lib/common/plugin/PositionError.js       |  38 -----
 lib/common/plugin/geolocation.js         | 211 --------------------------
 lib/common/plugin/geolocation/symbols.js |  27 ----
 4 files changed, 309 deletions(-)
----------------------------------------------------------------------



[13/13] js commit: Merge branch '3.0.0' of https://git-wip-us.apache.org/repos/asf/cordova-js into 3.0.0

Posted by he...@apache.org.
Merge branch '3.0.0' of https://git-wip-us.apache.org/repos/asf/cordova-js into 3.0.0


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

Branch: refs/heads/3.0.0
Commit: 6b0579a40bcb0497fc164ff523cac25e43da5d09
Parents: 5d307fd c6482ac
Author: hermwong <he...@gmail.com>
Authored: Thu Jun 13 14:51:09 2013 -0700
Committer: hermwong <he...@gmail.com>
Committed: Thu Jun 13 14:51:09 2013 -0700

----------------------------------------------------------------------
 .reviewboardrc                                  |   8 +
 README.md                                       |  20 +
 lib/android/plugin/android/nativeapiprovider.js |  19 +
 .../plugin/android/promptbasednativeapi.js      |  19 +
 lib/android/plugin/inappbrowser/symbols.js      |  24 -
 lib/blackberry10/platform.js                    |  12 +-
 lib/blackberry10/plugin/FileTransfer.js         | 187 ++++++
 .../plugin/blackberry10/fileTransfer.js         |  51 +-
 lib/common/plugin/Camera.js                     |  73 ---
 lib/common/plugin/CameraConstants.js            |  53 --
 lib/common/plugin/CameraPopoverHandle.js        |  33 -
 lib/common/plugin/CameraPopoverOptions.js       |  37 --
 lib/common/plugin/Contact.js                    | 177 -----
 lib/common/plugin/ContactAddress.js             |  46 --
 lib/common/plugin/ContactError.js               |  42 --
 lib/common/plugin/ContactField.js               |  37 --
 lib/common/plugin/ContactFindOptions.js         |  34 -
 lib/common/plugin/ContactName.js                |  41 --
 lib/common/plugin/ContactOrganization.js        |  44 --
 lib/common/plugin/FileReader.js                 |   6 +-
 lib/common/plugin/GlobalizationError.js         |  41 --
 lib/common/plugin/InAppBrowser.js               |  91 ---
 lib/common/plugin/battery.js                    |  99 ---
 lib/common/plugin/battery/symbols.js            |  24 -
 lib/common/plugin/camera/symbols.js             |  26 -
 lib/common/plugin/contacts.js                   |  76 ---
 lib/common/plugin/contacts/symbols.js           |  31 -
 lib/common/plugin/device.js                     |   2 -
 lib/common/plugin/globalization.js              | 391 -----------
 lib/common/plugin/globalization/symbols.js      |  25 -
 lib/common/plugin/splashscreen.js               |  33 -
 lib/common/plugin/splashscreen/symbols.js       |  24 -
 lib/ios/plugin/CameraPopoverHandle.js           |  34 -
 lib/ios/plugin/inappbrowser/symbols.js          |  24 -
 lib/ios/plugin/ios/Contact.js                   |  51 --
 lib/ios/plugin/ios/contacts.js                  |  62 --
 lib/ios/plugin/ios/contacts/symbols.js          |  26 -
 lib/ios/plugin/ios/geolocation/symbols.js       |  23 -
 lib/ios/plugin/ios/notification.js              |  28 -
 lib/scripts/bootstrap.js                        |   5 +
 lib/scripts/plugin_loader.js                    |  21 +-
 lib/tizen/exec.js                               |  57 +-
 lib/tizen/platform.js                           |  15 +
 lib/tizen/plugin/tizen/Accelerometer.js         |  24 +-
 lib/tizen/plugin/tizen/Battery.js               |  19 +-
 lib/tizen/plugin/tizen/Camera.js                |  80 ++-
 lib/tizen/plugin/tizen/Compass.js               |  32 +-
 lib/tizen/plugin/tizen/Contact.js               | 152 +++--
 lib/tizen/plugin/tizen/ContactUtils.js          | 118 ++--
 lib/tizen/plugin/tizen/Device.js                |  46 +-
 lib/tizen/plugin/tizen/File.js                  | 651 +++++++++++++------
 lib/tizen/plugin/tizen/FileTransfer.js          | 193 +++---
 lib/tizen/plugin/tizen/Media.js                 |  79 ++-
 lib/tizen/plugin/tizen/NetworkStatus.js         |  62 +-
 lib/tizen/plugin/tizen/Notification.js          |  23 +
 55 files changed, 1350 insertions(+), 2301 deletions(-)
----------------------------------------------------------------------



[04/13] js commit: remvoed Accelerometer code

Posted by he...@apache.org.
remvoed Accelerometer code


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

Branch: refs/heads/3.0.0
Commit: 206bb16830875d03ae007fe718faa964e30b5678
Parents: a86559a
Author: Steven Gill <st...@gmail.com>
Authored: Thu May 2 11:59:44 2013 -0700
Committer: Steven Gill <st...@gmail.com>
Committed: Mon May 13 13:03:09 2013 -0700

----------------------------------------------------------------------
 lib/common/plugin/Acceleration.js          |  29 ----
 lib/common/plugin/accelerometer.js         | 170 ------------------------
 lib/common/plugin/accelerometer/symbols.js |  25 ----
 3 files changed, 224 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/206bb168/lib/common/plugin/Acceleration.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/Acceleration.js b/lib/common/plugin/Acceleration.js
deleted file mode 100644
index d1669b5..0000000
--- a/lib/common/plugin/Acceleration.js
+++ /dev/null
@@ -1,29 +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 Acceleration = function(x, y, z, timestamp) {
-    this.x = x;
-    this.y = y;
-    this.z = z;
-    this.timestamp = timestamp || (new Date()).getTime();
-};
-
-module.exports = Acceleration;

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/206bb168/lib/common/plugin/accelerometer.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/accelerometer.js b/lib/common/plugin/accelerometer.js
deleted file mode 100644
index da50487..0000000
--- a/lib/common/plugin/accelerometer.js
+++ /dev/null
@@ -1,170 +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.
- *
-*/
-
-/**
- * This class provides access to device accelerometer data.
- * @constructor
- */
-var argscheck = require('cordova/argscheck'),
-    utils = require("cordova/utils"),
-    exec = require("cordova/exec"),
-    Acceleration = require('cordova/plugin/Acceleration');
-
-// Is the accel sensor running?
-var running = false;
-
-// Keeps reference to watchAcceleration calls.
-var timers = {};
-
-// Array of listeners; used to keep track of when we should call start and stop.
-var listeners = [];
-
-// Last returned acceleration object from native
-var accel = null;
-
-// Tells native to start.
-function start() {
-    exec(function(a) {
-        var tempListeners = listeners.slice(0);
-        accel = new Acceleration(a.x, a.y, a.z, a.timestamp);
-        for (var i = 0, l = tempListeners.length; i < l; i++) {
-            tempListeners[i].win(accel);
-        }
-    }, function(e) {
-        var tempListeners = listeners.slice(0);
-        for (var i = 0, l = tempListeners.length; i < l; i++) {
-            tempListeners[i].fail(e);
-        }
-    }, "Accelerometer", "start", []);
-    running = true;
-}
-
-// Tells native to stop.
-function stop() {
-    exec(null, null, "Accelerometer", "stop", []);
-    running = false;
-}
-
-// Adds a callback pair to the listeners array
-function createCallbackPair(win, fail) {
-    return {win:win, fail:fail};
-}
-
-// Removes a win/fail listener pair from the listeners array
-function removeListeners(l) {
-    var idx = listeners.indexOf(l);
-    if (idx > -1) {
-        listeners.splice(idx, 1);
-        if (listeners.length === 0) {
-            stop();
-        }
-    }
-}
-
-var accelerometer = {
-    /**
-     * Asynchronously acquires the current acceleration.
-     *
-     * @param {Function} successCallback    The function to call when the acceleration data is available
-     * @param {Function} errorCallback      The function to call when there is an error getting the acceleration data. (OPTIONAL)
-     * @param {AccelerationOptions} options The options for getting the accelerometer data such as timeout. (OPTIONAL)
-     */
-    getCurrentAcceleration: function(successCallback, errorCallback, options) {
-        argscheck.checkArgs('fFO', 'accelerometer.getCurrentAcceleration', arguments);
-
-        var p;
-        var win = function(a) {
-            removeListeners(p);
-            successCallback(a);
-        };
-        var fail = function(e) {
-            removeListeners(p);
-            errorCallback && errorCallback(e);
-        };
-
-        p = createCallbackPair(win, fail);
-        listeners.push(p);
-
-        if (!running) {
-            start();
-        }
-    },
-
-    /**
-     * Asynchronously acquires the acceleration repeatedly at a given interval.
-     *
-     * @param {Function} successCallback    The function to call each time the acceleration data is available
-     * @param {Function} errorCallback      The function to call when there is an error getting the acceleration data. (OPTIONAL)
-     * @param {AccelerationOptions} options The options for getting the accelerometer data such as timeout. (OPTIONAL)
-     * @return String                       The watch id that must be passed to #clearWatch to stop watching.
-     */
-    watchAcceleration: function(successCallback, errorCallback, options) {
-        argscheck.checkArgs('fFO', 'accelerometer.watchAcceleration', arguments);
-        // Default interval (10 sec)
-        var frequency = (options && options.frequency && typeof options.frequency == 'number') ? options.frequency : 10000;
-
-        // Keep reference to watch id, and report accel readings as often as defined in frequency
-        var id = utils.createUUID();
-
-        var p = createCallbackPair(function(){}, function(e) {
-            removeListeners(p);
-            errorCallback && errorCallback(e);
-        });
-        listeners.push(p);
-
-        timers[id] = {
-            timer:window.setInterval(function() {
-                if (accel) {
-                    successCallback(accel);
-                }
-            }, frequency),
-            listeners:p
-        };
-
-        if (running) {
-            // If we're already running then immediately invoke the success callback
-            // but only if we have retrieved a value, sample code does not check for null ...
-            if (accel) {
-                successCallback(accel);
-            }
-        } else {
-            start();
-        }
-
-        return id;
-    },
-
-    /**
-     * Clears the specified accelerometer watch.
-     *
-     * @param {String} id       The id of the watch returned from #watchAcceleration.
-     */
-    clearWatch: function(id) {
-        // Stop javascript timer & remove from timer list
-        if (id && timers[id]) {
-            window.clearInterval(timers[id].timer);
-            removeListeners(timers[id].listeners);
-            delete timers[id];
-        }
-    }
-};
-
-module.exports = accelerometer;

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/206bb168/lib/common/plugin/accelerometer/symbols.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/accelerometer/symbols.js b/lib/common/plugin/accelerometer/symbols.js
deleted file mode 100644
index 1c6818e..0000000
--- a/lib/common/plugin/accelerometer/symbols.js
+++ /dev/null
@@ -1,25 +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 modulemapper = require('cordova/modulemapper');
-
-modulemapper.defaults('cordova/plugin/Acceleration', 'Acceleration');
-modulemapper.defaults('cordova/plugin/accelerometer', 'navigator.accelerometer');