updated plugin.xml, native src files

This commit is contained in:
Steven Gill 2013-05-23 14:51:18 -07:00
parent c6174ce211
commit 0b6342e56c
6 changed files with 63 additions and 18 deletions

View File

@ -6,25 +6,31 @@ id="org.apache.cordova.core.CameraLauncher"
version="0.1.0">
<name>Camera</name>
<js-module src="www/CameraConstants.js" name="camera">
<clobbers target="window.camera" />
</js-module>
<js-module src="www/CameraPopoverOptions.js" name="camera">
<clobbers target="window.camera" />
</js-module>
<js-module src="www/Camera.js" name="camera">
<clobbers target="navigator.camera" />
</js-module>
<js-module src="www/CameraConstants.js" name="Camera">
<clobbers target="Camera" />
</js-module>
<js-module src="www/CameraPopoverOptions.js" name="CameraPopoverOptions">
<clobbers target="CameraPopoverOptions" />
</js-module>
<js-module src="www/CameraPopoverHandle.js" name="CameraPopoverHandle">
<merges target="CameraPopoverHandle" />
</js-module>
<!-- android -->
<platform name="android">
<config-file target="res/xml/config.xml" parent="/cordova/plugins">
<plugin name="Camera" value="org.apache.cordova.core"/>
<config-file target="res/xml/config.xml" parent="/*">
<feature name="Camera"
<param name="android-package" value="org.apache.cordova.core"/>
</feature>
</config-file>
<source-file src="CameraLauncher.java" target-dir="org/apache/cordova/core" />
<source-file src="src/android/CameraLauncher.java" target-dir="src/org/apache/cordova/core" />
</platform>
<!-- ios -->
@ -34,6 +40,11 @@ id="org.apache.cordova.core.CameraLauncher"
<param name="ios-package" value="CDVCamera" />
</feature>
</config-file>
<js-module src="www/ios/CameraPopoverHandle.js" name="CameraPopoverHandle">
<merges target="CameraPopoverHandle" />
</js-module>
<header-file src="src/ios/CDVCamera.h" />
<source-file src="src/ios/CDVCamera.m" />
<header-file src="src/ios/CDVJpegHeaderWriter.h" />

View File

@ -20,7 +20,7 @@
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
#import <CoreLocation/CLLocationManager.h>
#import "CDVPlugin.h"
#import <Cordova/CDVPlugin.h>
enum CDVDestinationType {
DestinationTypeDataUrl = 0,

View File

@ -19,9 +19,9 @@
#import "CDVCamera.h"
#import "CDVJpegHeaderWriter.h"
#import "NSArray+Comparisons.h"
#import "NSData+Base64.h"
#import "NSDictionary+Extensions.h"
#import <Cordova/NSArray+Comparisons.h>
#import <CordovaNSData+Base64.h>
#import <Cordova/NSDictionary+Extensions.h>
#import <ImageIO/CGImageProperties.h>
#import <AssetsLibrary/ALAssetRepresentation.h>
#import <ImageIO/CGImageSource.h>

View File

@ -21,8 +21,8 @@
var argscheck = require('cordova/argscheck'),
exec = require('cordova/exec'),
Camera = require('org.apache.cordova.core.CameraConstants'),
CameraPopoverHandle = require('org.apache.cordova.core.CameraPopoverHandle');
Camera = require('org.apache.cordova.core.CameraLauncher.CameraConstants'),
CameraPopoverHandle = require('org.apache.cordova.core.CameraLauncher.CameraPopoverHandle');
var cameraExport = {};

View File

@ -19,7 +19,7 @@
*
*/
var Camera = require('org.apache.cordova.core.CameraConstants');
var Camera = require('org.apache.cordova.core.CameraLauncher.Camera');
/**
* Encapsulates options for iOS Popover image picker

View File

@ -0,0 +1,34 @@
/*
*
* 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');
/**
* A handle to an image picker popover.
*/
var CameraPopoverHandle = function() {
this.setPosition = function(popoverOptions) {
var args = [ popoverOptions ];
exec(null, null, "Camera", "repositionPopover", args);
};
};
module.exports = CameraPopoverHandle;