
/**
 * This class provides access to the device camera.
 *
 * @constructor
 */
Camera = function() {
    this.successCallback = null;
    this.errorCallback = null;
    this.options = null;
};

/**
 * Format of image that returned from getPicture.
 *
 * Example: navigator.camera.getPicture(success, fail,
 *              { quality: 80,
 *                destinationType: Camera.DestinationType.DATA_URL,
 *                pictureSourceType: Camera.PictureSourceType.PHOTOLIBRARY})
 */
Camera.DestinationType = {
    DATA_URL: 0,                // Return base64 encoded string
    FILE_URI: 1                 // Return file uri (content://media/external/images/media/2 for Android)
};

/**
 * Source to getPicture from.
 *
 * Example: navigator.camera.getPicture(success, fail,
 *              { quality: 80,
 *                destinationType: Camera.DestinationType.DATA_URL,
 *                pictureSourceType: Camera.PictureSourceType.PHOTOLIBRARY})
 */
Camera.PictureSourceType = {
    PHOTOLIBRARY : 0,           // Choose image from picture library (same as SAVEDPHOTOALBUM for Android)
    CAMERA : 1,                 // Take picture from camera
    SAVEDPHOTOALBUM : 2         // Choose image from picture library (same as PHOTOLIBRARY for Android)
};

/**
 * Gets a picture from source defined by "options.pictureSourceType", and returns the
 * image as defined by the "options.destinationType" option.

 * The defaults are pictureSourceType=CAMERA and destinationType=DATA_URL.
 *
 * @param {Function} successCallback
 * @param {Function} errorCallback
 * @param {Object} options
 */
Camera.prototype.getPicture = function(successCallback, errorCallback, options) {

    // successCallback required
    if (typeof successCallback != "function") {
        console.log("Camera Error: successCallback is not a function");
        return;
    }

    // errorCallback optional
    if (errorCallback && (typeof errorCallback != "function")) {
        console.log("Camera Error: errorCallback is not a function");
        return;
    }

    this.successCallback = successCallback;
    this.errorCallback = errorCallback;
    this.options = options;
    var quality = 80;
    if (options.quality) {
        quality = this.options.quality;
    }
    var destinationType = Camera.DestinationType.DATA_URL;
    if (this.options.destinationType) {
        destinationType = this.options.destinationType;
    }
    var pictureSourceType = Camera.PictureSourceType.CAMERA;
    if (typeof this.options.pictureSourceType == "number") {
        pictureSourceType = this.options.pictureSourceType;
    }
    PhoneGap.execAsync(null, null, "Camera", "takePicture", [quality, destinationType, pictureSourceType]);
};

/**
 * Callback function from native code that is called when image has been captured.
 *
 * @param picture           The base64 encoded string of the image
 */
Camera.prototype.success = function(picture) {
    if (this.successCallback) {
        this.successCallback(picture);
    }
};

/**
 * Callback function from native code that is called when there is an error
 * capturing an image, or the capture is cancelled.
 *
 * @param err               The error message
 */
Camera.prototype.error = function(err) {
    if (this.errorCallback) {
        this.errorCallback(err);
    }
};

PhoneGap.addConstructor(function() {
    if (typeof navigator.camera == "undefined") navigator.camera = new Camera();
});

@@ -413,32 +413,25 @@
             
-pictureS
+s
 ourceType: C
@@ -663,32 +663,91 @@
  for Android)%0A%7D;
+%0ACamera.prototype.DestinationType = Camera.DestinationType;
 %0A%0A/**%0A * Source 
@@ -937,32 +937,25 @@
             
-pictureS
+s
 ourceType: C
@@ -1299,16 +1299,79 @@
 roid)%0A%7D;
+%0ACamera.prototype.PictureSourceType = Camera.PictureSourceType;
 %0A%0A/**%0A *
@@ -1414,32 +1414,25 @@
 by %22options.
-pictureS
+s
 ourceType%22, 
@@ -1529,24 +1529,17 @@
 lts are 
-pictureS
+s
 ourceTyp
@@ -2505,24 +2505,17 @@
     var 
-pictureS
+s
 ourceTyp
@@ -2575,32 +2575,25 @@
 his.options.
-pictureS
+s
 ourceType ==
@@ -2613,24 +2613,17 @@
         
-pictureS
+s
 ourceTyp
@@ -2639,24 +2639,17 @@
 options.
-pictureS
+s
 ourceTyp
@@ -2748,16 +2748,9 @@
 pe, 
-pictureS
+s
 ourc

Use same option name as iPhone.