Return-Path: X-Original-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3763DDCD2 for ; Sat, 6 Oct 2012 09:19:24 +0000 (UTC) Received: (qmail 11569 invoked by uid 500); 6 Oct 2012 09:19:22 -0000 Delivered-To: apmail-incubator-callback-commits-archive@incubator.apache.org Received: (qmail 11172 invoked by uid 500); 6 Oct 2012 09:19:22 -0000 Mailing-List: contact callback-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-commits@incubator.apache.org Received: (qmail 10905 invoked by uid 99); 6 Oct 2012 09:19:21 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Oct 2012 09:19:21 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 989763AD2E; Sat, 6 Oct 2012 09:19:20 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: purplecabbage@apache.org To: callback-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [7/45] js commit: resolve conflicts Message-Id: <20121006091920.989763AD2E@tyr.zones.apache.org> Date: Sat, 6 Oct 2012 09:19:20 +0000 (UTC) resolve conflicts Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/602c0643 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/602c0643 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/602c0643 Branch: refs/heads/master Commit: 602c064372d2ef166fabb87e850c426942b84d0a Parents: ae2ad69 56e6476 Author: Jesse MacFadyen Authored: Fri Oct 5 15:58:47 2012 -0700 Committer: Jesse MacFadyen Committed: Fri Oct 5 15:58:47 2012 -0700 ---------------------------------------------------------------------- .jshintrc | 6 +- build/packager.js | 6 +- lib/android/plugin/android/nativeapiprovider.js | 2 +- lib/common/channel.js | 6 +- lib/common/plugin/FileTransfer.js | 2 +- lib/common/plugin/Media.js | 4 +- lib/common/plugin/MediaError.js | 2 +- lib/common/plugin/battery.js | 1 - lib/cordova.js | 10 +- lib/ios/exec.js | 51 ++++-- lib/ios/plugin/ios/console.js | 23 ++-- lib/ios/plugin/ios/nativecomm.js | 32 ---- lib/webworks/java/platform.js | 4 +- lib/webworks/qnx/platform.js | 21 +++- lib/webworks/qnx/plugin/compass.js | 162 ++++++++++++++++++ lib/webworks/qnx/plugin/manager.js | 4 + lib/webworks/qnx/plugin/qnx/battery.js | 36 ++++ lib/webworks/qnx/plugin/qnx/camera.js | 32 ++++ lib/webworks/qnx/plugin/qnx/capture.js | 76 ++++++++ lib/webworks/qnx/plugin/qnx/compass.js | 45 +++++ lib/webworks/qnx/plugin/qnx/fileTransfer.js | 47 +++++ lib/windows8/plugin/windows8/CameraProxy.js | 16 +- lib/windows8/plugin/windows8/CaptureProxy.js | 60 +++---- lib/windows8/plugin/windows8/MediaFile.js | 12 +- lib/wp7/platform.js | 2 +- 25 files changed, 526 insertions(+), 136 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/602c0643/lib/windows8/plugin/windows8/CameraProxy.js ---------------------------------------------------------------------- diff --cc lib/windows8/plugin/windows8/CameraProxy.js index 6952093,d14c907..43dd2ee --- a/lib/windows8/plugin/windows8/CameraProxy.js +++ b/lib/windows8/plugin/windows8/CameraProxy.js @@@ -97,10 -100,13 +101,12 @@@ module.exports = }, function () { errorCallback("Resize picture error."); }); }, function () { errorCallback("Resize picture error."); }); }); - }; }; + reader.readAsDataURL(filePhoto); - }; ++ var failCB = function () { errorCallback("File not found."); }; @@@ -189,9 -191,6 +191,9 @@@ } else { fileOpenPicker.fileTypeFilter.replaceAll(["*"]); } + var fail = function (fileError) { - errorCallback("FileError, code:" + fileError.code); ++ errorCallback("FileError, code:" + fileError.code); + }; fileOpenPicker.pickSingleFileAsync().then(function (file) { if (file) { if (destinationType == Camera.DestinationType.FILE_URI) { http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/602c0643/lib/windows8/plugin/windows8/CaptureProxy.js ---------------------------------------------------------------------- diff --cc lib/windows8/plugin/windows8/CaptureProxy.js index 51d5ae5,f93f8cb..31df964 --- a/lib/windows8/plugin/windows8/CaptureProxy.js +++ b/lib/windows8/plugin/windows8/CaptureProxy.js @@@ -44,23 -44,12 +44,15 @@@ module.exports = errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); return; } - <<<<<<< HEAD - var cameraCaptureAudioDuration = audioOptions.duration; + - var mediaCaputreSettings; - var initCaptureSettings = function () { - mediaCaputreSettings = null; - mediaCaputreSettings = new Windows.Media.Capture.MediaCaptureInitializationSettings(); - mediaCaputreSettings.streamingCaptureMode = Windows.Media.Capture.StreamingCaptureMode.audio; - }; - ======= ++ var cameraCaptureAudioDuration = audioOptions.duration; var mediaCaptureSettings; var initCaptureSettings = function () { mediaCaptureSettings = null; mediaCaptureSettings = new Windows.Media.Capture.MediaCaptureInitializationSettings(); mediaCaptureSettings.streamingCaptureMode = Windows.Media.Capture.StreamingCaptureMode.audio; - } - >>>>>>> 27d9aedd5bf520f305e20fcf350da2eef244d53d + }; ++ initCaptureSettings(); var mediaCapture = new Windows.Media.Capture.MediaCapture(); mediaCapture.initializeAsync(mediaCaptureSettings).done(function () { @@@ -135,37 -124,32 +127,32 @@@ }, - getFormatData:function (successCallback, errorCallback, args) { - var contentType = args[1]; - Windows.Storage.StorageFile.getFileFromPathAsync(args[0]).then(function (storageFile) { - var mediaTypeFlag = String(contentType).split("/")[0].toLowerCase(); + getFormatData: function (successCallback, errorCallback, args) { + Windows.Storage.StorageFile.getFileFromPathAsync(args[0]).then( + function (storageFile) { + var mediaTypeFlag = String(args[1]).split("/")[0].toLowerCase(); if (mediaTypeFlag === "audio") { - storageFile.properties.getMusicPropertiesAsync().then( - function (audioProperties) { - successCallback(new MediaFileData(null, audioProperties.bitrate, 0, 0, audioProperties.duration / 1000)); - }, function () { - errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); - } - ); - } else if (mediaTypeFlag === "video") { - storageFile.properties.getVideoPropertiesAsync().then( - function (videoProperties) { - successCallback(new MediaFileData(null, videoProperties.bitrate, videoProperties.height, videoProperties.width, videoProperties.duration / 1000)); - }, function () { - errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); - } - ); - } else if (mediaTypeFlag === "image") { - storageFile.properties.getImagePropertiesAsync().then( - function (imageProperties) { - successCallback(new MediaFileData(null, 0, imageProperties.height, imageProperties.width, 0)); - }, function () { - errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); - } - ); - } else { - errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); + storageFile.properties.getMusicPropertiesAsync().then(function (audioProperties) { + successCallback(new MediaFileData(null, audioProperties.bitrate, 0, 0, audioProperties.duration / 1000)); + }, function () { + errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); + }); } + else if (mediaTypeFlag === "video") { + storageFile.properties.getVideoPropertiesAsync().then(function (videoProperties) { + successCallback(new MediaFileData(null, videoProperties.bitrate, videoProperties.height, videoProperties.width, videoProperties.duration / 1000)); + }, function () { + errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); + }); + } + else if (mediaTypeFlag === "image") { + storageFile.properties.getImagePropertiesAsync().then(function (imageProperties) { + successCallback(new MediaFileData(null, 0, imageProperties.height, imageProperties.width, 0)); + }, function () { + errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); + }); + } + else { errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); } }, function () { errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); }