You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ka...@apache.org on 2014/05/02 20:29:36 UTC

[01/70] Split out cordova-lib: move cordova-plugman files

Repository: cordova-plugman
Updated Branches:
  refs/heads/cordova-lib [created] bea01b366


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/util/config-changes.js
----------------------------------------------------------------------
diff --git a/src/util/config-changes.js b/src/util/config-changes.js
deleted file mode 100644
index 67adfb6..0000000
--- a/src/util/config-changes.js
+++ /dev/null
@@ -1,812 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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 module deals with shared configuration / dependency "stuff". That is:
- * - XML configuration files such as config.xml, AndroidManifest.xml or WMAppManifest.xml.
- * - plist files in iOS
- * - pbxproj files in iOS
- * Essentially, any type of shared resources that we need to handle with awareness
- * of how potentially multiple plugins depend on a single shared resource, should be
- * handled in this module.
- *
- * The implementation uses an object as a hash table, with "leaves" of the table tracking
- * reference counts.
- */
-
-/* jshint node:true, sub:true, unused:true, indent:4  */
-
-var fs   = require('fs'),
-    path = require('path'),
-    glob = require('glob'),
-    plist = require('plist-with-patches'),
-    bplist = require('bplist-parser'),
-    xcode = require('xcode'),
-    et   = require('elementtree'),
-    _ = require('underscore'),
-    xml_helpers = require('./../util/xml-helpers'),
-    platforms = require('./../platforms'),
-    events = require('./../events'),
-    plist_helpers = require('./../util/plist-helpers');
-
-
-// These frameworks are required by cordova-ios by default. We should never add/remove them.
-var keep_these_frameworks = [
-    'MobileCoreServices.framework',
-    'CoreGraphics.framework',
-    'CoreLocation.framework',
-    'AssetsLibrary.framework'
-];
-
-
-exports.PlatformMunger = PlatformMunger;
-
-/******************************************************************************
-Adapters to keep the current refactoring effort to within this file
-******************************************************************************/
-exports.add_plugin_changes = function(platform, project_dir, plugins_dir, plugin_id, plugin_vars, is_top_level, should_increment, cache) {
-    var munger = new PlatformMunger(platform, project_dir, plugins_dir);
-    munger.add_plugin_changes(plugin_id, plugin_vars, is_top_level, should_increment, cache);
-    munger.save_all();
-};
-
-exports.remove_plugin_changes = function(platform, project_dir, plugins_dir, plugin_name, plugin_id, is_top_level, should_decrement) {
-    // TODO: should_decrement parameter is never used, remove it here and wherever called
-    var munger = new PlatformMunger(platform, project_dir, plugins_dir);
-    munger.remove_plugin_changes(plugin_name, plugin_id, is_top_level);
-    munger.save_all();
-};
-
-exports.process = function(plugins_dir, project_dir, platform) {
-    var munger = new PlatformMunger(platform, project_dir, plugins_dir);
-    munger.process();
-    munger.save_all();
-};
-
-exports.get_munge_change = function(munge, keys) {
-    return deep_find.apply(null, arguments);
-}
-
-/******************************************************************************/
-
-
-exports.add_installed_plugin_to_prepare_queue = add_installed_plugin_to_prepare_queue;
-function add_installed_plugin_to_prepare_queue(plugins_dir, plugin, platform, vars, is_top_level) {
-    checkPlatform(platform);
-    var config = exports.get_platform_json(plugins_dir, platform);
-    config.prepare_queue.installed.push({'plugin':plugin, 'vars':vars, 'topLevel':is_top_level});
-    exports.save_platform_json(config, plugins_dir, platform);
-}
-
-exports.add_uninstalled_plugin_to_prepare_queue = add_uninstalled_plugin_to_prepare_queue;
-function add_uninstalled_plugin_to_prepare_queue(plugins_dir, plugin, platform, is_top_level) {
-    checkPlatform(platform);
-
-    var plugin_xml = xml_helpers.parseElementtreeSync(path.join(plugins_dir, plugin, 'plugin.xml'));
-    var config = exports.get_platform_json(plugins_dir, platform);
-    config.prepare_queue.uninstalled.push({'plugin':plugin, 'id':plugin_xml.getroot().attrib['id'], 'topLevel':is_top_level});
-    exports.save_platform_json(config, plugins_dir, platform);
-}
-
-
-/******************************************************************************
-* PlatformMunger class
-*
-* Can deal with config file of a single project.
-* Parsed config files are cached in a ConfigKeeper object.
-******************************************************************************/
-function PlatformMunger(platform, project_dir, plugins_dir) {
-    checkPlatform(platform);
-    this.platform = platform;
-    this.project_dir = project_dir;
-    this.plugins_dir = plugins_dir;
-    this.platform_handler = platforms[platform];
-    this.config_keeper = new ConfigKeeper();
-}
-
-// Write out all unsaved files.
-PlatformMunger.prototype.save_all = PlatformMunger_save_all;
-function PlatformMunger_save_all() {
-    this.config_keeper.save_all();
-}
-
-// Apply a munge object to a single config file.
-// The remove parameter tells whether to add the change or remove it.
-PlatformMunger.prototype.apply_file_munge = PlatformMunger_apply_file_munge;
-function PlatformMunger_apply_file_munge(file, munge, remove) {
-    var self = this;
-    var xml_child;
-
-    if ( file === 'framework' && self.platform === 'ios' ) {
-        // ios pbxproj file
-        var pbxproj = self.config_keeper.get(self.project_dir, self.platform, 'framework');
-        for (var src in munge.parents) {
-            for (xml_child in munge.parents[src]) {
-                var xml = munge.parents[src][xml_child].xml;
-                // Only add the framework if it's not a cordova-ios core framework
-                if (keep_these_frameworks.indexOf(src) == -1) {
-                    // xml_child in this case is whether the framework should use weak or not
-                    if (remove) {
-                        pbxproj.data.removeFramework(src);
-                    } else {
-                        pbxproj.data.addFramework(src, {weak: (xml === 'true')});
-                    }
-                    pbxproj.is_changed = true;
-                }
-            }
-        }
-    } else {
-        // all other types of files
-        for (var selector in munge.parents) {
-            for (xml_child in munge.parents[selector]) {
-                // this xml child is new, graft it (only if config file exists)
-                var config_file = self.config_keeper.get(self.project_dir, self.platform, file);
-                if (config_file.exists) {
-                    if (remove) config_file.prune_child(selector, munge.parents[selector][xml_child]);
-                    else config_file.graft_child(selector, munge.parents[selector][xml_child]);
-                }
-            }
-        }
-    }
-}
-
-
-PlatformMunger.prototype.remove_plugin_changes = remove_plugin_changes;
-function remove_plugin_changes(plugin_name, plugin_id, is_top_level) {
-    var self = this;
-    var platform_config = exports.get_platform_json(self.plugins_dir, self.platform);
-    var plugin_dir = path.join(self.plugins_dir, plugin_name);
-    var plugin_vars = (is_top_level ? platform_config.installed_plugins[plugin_id] : platform_config.dependent_plugins[plugin_id]);
-
-    // get config munge, aka how did this plugin change various config files
-    var config_munge = self.generate_plugin_config_munge(plugin_dir, plugin_vars);
-    // global munge looks at all plugins' changes to config files
-    var global_munge = platform_config.config_munge;
-    var munge = decrement_munge(global_munge, config_munge);
-
-    for (var file in munge.files) {
-        if (file == 'plugins-plist' && self.platform == 'ios') {
-            // TODO: remove this check and <plugins-plist> sections in spec/plugins/../plugin.xml files.
-            events.emit(
-                'warn',
-                'WARNING: Plugin "' + plugin_id + '" uses <plugins-plist> element(s), ' +
-                'which are no longer supported. Support has been removed as of Cordova 3.4.'
-            );
-            continue;
-        }
-        self.apply_file_munge(file, munge.files[file], /* remove = */ true);
-    }
-
-    // Remove from installed_plugins
-    if (is_top_level) {
-        delete platform_config.installed_plugins[plugin_id];
-    } else {
-        delete platform_config.dependent_plugins[plugin_id];
-    }
-
-    // save
-    exports.save_platform_json(platform_config, self.plugins_dir, self.platform);
-}
-
-
-PlatformMunger.prototype.add_plugin_changes = add_plugin_changes;
-function add_plugin_changes(plugin_id, plugin_vars, is_top_level, should_increment) {
-    var self = this;
-    var platform_config = exports.get_platform_json(self.plugins_dir, self.platform);
-    var plugin_dir = path.join(self.plugins_dir, plugin_id);
-
-    var plugin_config = self.config_keeper.get(plugin_dir, '', 'plugin.xml');
-    plugin_id = plugin_config.data.getroot().attrib.id;
-
-    // get config munge, aka how should this plugin change various config files
-    var config_munge = self.generate_plugin_config_munge(plugin_dir, plugin_vars);
-    // global munge looks at all plugins' changes to config files
-
-    // TODO: The should_increment param is only used by cordova-cli and is going away soon.
-    // If should_increment is set to false, avoid modifying the global_munge (use clone)
-    // and apply the entire config_munge because it's already a proper subset of the global_munge.
-    var munge, global_munge;
-    if (should_increment) {
-        global_munge = platform_config.config_munge;
-        munge = increment_munge(global_munge, config_munge);
-    } else {
-        global_munge = clone_munge(platform_config.config_munge);
-        munge = config_munge;
-    }
-
-    for (var file in munge.files) {
-        // TODO: remove this warning some time after 3.4 is out.
-        if (file == 'plugins-plist' && self.platform == 'ios') {
-            events.emit(
-                'warn',
-                'WARNING: Plugin "' + plugin_id + '" uses <plugins-plist> element(s), ' +
-                'which are no longer supported. Support has been removed as of Cordova 3.4.'
-            );
-            continue;
-        }
-        self.apply_file_munge(file, munge.files[file]);
-    }
-
-    // Move to installed_plugins if it is a top-level plugin
-    if (is_top_level) {
-        platform_config.installed_plugins[plugin_id] = plugin_vars || {};
-    } else {
-        platform_config.dependent_plugins[plugin_id] = plugin_vars || {};
-    }
-
-    // save
-    exports.save_platform_json(platform_config, self.plugins_dir, self.platform);
-}
-
-
-// Load the global munge from platform json and apply all of it.
-// Used by cordova prepare to re-generate some config file from platform
-// defaults and the global munge.
-PlatformMunger.prototype.reapply_global_munge = reapply_global_munge ;
-function reapply_global_munge () {
-    var self = this;
-
-    var platform_config = exports.get_platform_json(self.plugins_dir, self.platform);
-    var global_munge = platform_config.config_munge;
-    for (var file in global_munge.files) {
-        // TODO: remove this warning some time after 3.4 is out.
-        if (file == 'plugins-plist' && self.platform == 'ios') {
-            events.emit(
-                'warn',
-                'WARNING: One of your plugins uses <plugins-plist> element(s), ' +
-                'which are no longer supported. Support has been removed as of Cordova 3.4.'
-            );
-            continue;
-        }
-
-        self.apply_file_munge(file, global_munge.files[file]);
-    }
-}
-
-
-// generate_plugin_config_munge
-// Generate the munge object from plugin.xml + vars
-PlatformMunger.prototype.generate_plugin_config_munge = generate_plugin_config_munge;
-function generate_plugin_config_munge(plugin_dir, vars) {
-    var self = this;
-
-    vars = vars || {};
-    // Add PACKAGE_NAME variable into vars
-    if (!vars['PACKAGE_NAME']) {
-        vars['PACKAGE_NAME'] = self.platform_handler.package_name(self.project_dir);
-    }
-
-    var munge = { files: {} };
-    var plugin_config = self.config_keeper.get(plugin_dir, '', 'plugin.xml');
-    var plugin_xml = plugin_config.data;
-
-    var platformTag = plugin_xml.find('platform[@name="' + self.platform + '"]');
-    var changes = [];
-    // add platform-agnostic config changes
-    changes = changes.concat(plugin_xml.findall('config-file'));
-    if (platformTag) {
-        // add platform-specific config changes if they exist
-        changes = changes.concat(platformTag.findall('config-file'));
-
-        // note down pbxproj framework munges in special section of munge obj
-        // CB-5238 this is only for systems frameworks
-        var frameworks = platformTag.findall('framework');
-        frameworks.forEach(function(f) {
-            var custom = f.attrib['custom'];
-            if(!custom) {
-                var file = f.attrib['src'];
-                var weak = ('true' == f.attrib['weak']).toString();
-
-                deep_add(munge, 'framework', file, { xml: weak, count: 1 });
-            }
-        });
-    }
-
-    changes.forEach(function(change) {
-        var target = change.attrib['target'];
-        var parent = change.attrib['parent'];
-        var after = change.attrib['after'];
-        var xmls = change.getchildren();
-		xmls.forEach(function(xml) {
-            // 1. stringify each xml
-            var stringified = (new et.ElementTree(xml)).write({xml_declaration:false});
-            // interp vars
-            if (vars) {
-                Object.keys(vars).forEach(function(key) {
-                    var regExp = new RegExp("\\$" + key, "g");
-                    stringified = stringified.replace(regExp, vars[key]);
-                });
-            }
-            // 2. add into munge
-            deep_add(munge, target, parent, { xml: stringified, count: 1, after: after });
-        });
-    });
-    return munge;
-}
-
-// Go over the prepare queue an apply the config munges for each plugin
-// that has been (un)installed.
-PlatformMunger.prototype.process = PlatformMunger_process;
-function PlatformMunger_process() {
-    var self = this;
-
-    var platform_config = exports.get_platform_json(self.plugins_dir, self.platform);
-
-    // Uninstallation first
-    platform_config.prepare_queue.uninstalled.forEach(function(u) {
-        self.remove_plugin_changes(u.plugin, u.id, u.topLevel);
-    });
-
-    // Now handle installation
-    platform_config.prepare_queue.installed.forEach(function(u) {
-        self.add_plugin_changes(u.plugin, u.vars, u.topLevel, true);
-    });
-
-    platform_config = exports.get_platform_json(self.plugins_dir, self.platform);
-
-    // Empty out installed/ uninstalled queues.
-    platform_config.prepare_queue.uninstalled = [];
-    platform_config.prepare_queue.installed = [];
-    // save platform json
-    exports.save_platform_json(platform_config, self.plugins_dir, self.platform);
-}
-/**** END of PlatformMunger ****/
-
-
-/******************************************************************************
-* ConfigKeeper class
-*
-* Used to load and store config files to avoid re-parsing and writing them out
-* multiple times.
-*
-* The config files are referred to by a fake path constructed as
-* project_dir/platform/file
-* where file is the name used for the file in config munges.
-******************************************************************************/
-function ConfigKeeper() {
-    this._cached = {};
-}
-
-ConfigKeeper.prototype.get = ConfigKeeper_get;
-function ConfigKeeper_get(project_dir, platform, file) {
-    var self = this;
-
-    //This fixes a bug with older plugins - when specifying config xml instead of res/xml/config.xml
-    //https://issues.apache.org/jira/browse/CB-6414
-    if(file == 'config.xml' && platform == 'android'){
-        file = 'res/xml/config.xml';
-    }
-    var fake_path = path.join(project_dir, platform, file);
-
-    if (self._cached[fake_path]) {
-        return self._cached[fake_path];
-    }
-    // File was not cached, need to load.
-    var config_file = new ConfigFile(project_dir, platform, file);
-    self._cached[fake_path] = config_file;
-    return config_file;
-}
-
-
-ConfigKeeper.prototype.save_all = ConfigKeeper_save_all;
-function ConfigKeeper_save_all() {
-    var self = this;
-    Object.keys(self._cached).forEach(function (fake_path) {
-        var config_file = self._cached[fake_path];
-        if (config_file.is_changed) config_file.save();
-    });
-}
-/**** END of ConfigKeeper ****/
-
-// TODO: move save/get_platform_json to be part of ConfigKeeper or ConfigFile
-// For now they are used in many places in plugman and cordova-cli and can
-// save the file bypassing the ConfigKeeper's cache.
-exports.get_platform_json = get_platform_json;
-function get_platform_json(plugins_dir, platform) {
-    checkPlatform(platform);
-
-    var filepath = path.join(plugins_dir, platform + '.json');
-    if (fs.existsSync(filepath)) {
-        return fix_munge(JSON.parse(fs.readFileSync(filepath, 'utf-8')));
-    } else {
-        var config = {
-            prepare_queue:{installed:[], uninstalled:[]},
-            config_munge:{},
-            installed_plugins:{},
-            dependent_plugins:{}
-        };
-        return config;
-    }
-}
-
-exports.save_platform_json = save_platform_json;
-function save_platform_json(config, plugins_dir, platform) {
-    checkPlatform(platform);
-    var filepath = path.join(plugins_dir, platform + '.json');
-    fs.writeFileSync(filepath, JSON.stringify(config, null, 4), 'utf-8');
-}
-
-
-// convert a munge from the old format ([file][parent][xml] = count) to the current one
-function fix_munge(platform_config) {
-    var munge = platform_config.config_munge;
-    if (!munge.files) {
-        var new_munge = { files: {} };
-        for (var file in munge) {
-            for (var selector in munge[file]) {
-                for (var xml_child in munge[file][selector]) {
-                    var val = parseInt(munge[file][selector][xml_child]);
-                    for (var i = 0; i < val; i++) {
-                        deep_add(new_munge, [file, selector, { xml: xml_child, count: val }]);
-                    }
-                }
-            }
-        }
-        platform_config.config_munge = new_munge;
-    }
-
-    return platform_config;
-}
-
-/**** END of ConfigKeeper ****/
-
-
-/******************************************************************************
-* ConfigFile class
-*
-* Can load and keep various types of config files. Provides some functionality
-* specific to some file types such as grafting XML children. In most cases it
-* should be instantiated by ConfigKeeper.
-*
-* For plugin.xml files use as:
-* plugin_config = self.config_keeper.get(plugin_dir, '', 'plugin.xml');
-*
-* TODO: Consider moving it out to a separate file and maybe partially with
-* overrides in platform handlers.
-******************************************************************************/
-function ConfigFile(project_dir, platform, file_tag) {
-    this.project_dir = project_dir;
-    this.platform = platform;
-    this.file_tag = file_tag;
-    this.is_changed = false;
-
-    this.load();
-}
-
-// ConfigFile.load()
-ConfigFile.prototype.load = ConfigFile_load;
-function ConfigFile_load() {
-    var self = this;
-
-    // config file may be in a place not exactly specified in the target
-    var filepath = self.filepath = resolveConfigFilePath(self.project_dir, self.platform, self.file_tag);
-
-    if ( !filepath || !fs.existsSync(filepath) ) {
-        self.exists = false;
-        return;
-    }
-    self.exists = true;
-    var ext = path.extname(filepath);
-    // Windows8 uses an appxmanifest, and wp8 will likely use
-    // the same in a future release
-    if (ext == '.xml' || ext == '.appxmanifest') {
-        self.type = 'xml';
-        self.data = xml_helpers.parseElementtreeSync(filepath);
-    } else if (ext == '.pbxproj') {
-        self.type = 'pbxproj';
-        self.data = xcode.project(filepath);
-        self.data.parseSync();
-    } else {
-        // plist file
-        self.type = 'plist';
-        // TODO: isBinaryPlist() reads the file and then parse re-reads it again.
-        //       We always write out text plist, not binary.
-        //       Do we still need to support binary plist?
-        //       If yes, use plist.parseStringSync() and read the file once.
-        self.plist_module = (isBinaryPlist(filepath) ? bplist : plist);
-        self.data = self.plist_module.parseFileSync(filepath);
-    }
-}
-
-// ConfigFile.save()
-ConfigFile.prototype.save = ConfigFile_save;
-function ConfigFile_save() {
-    var self = this;
-    if (self.type === 'xml') {
-        fs.writeFileSync(self.filepath, self.data.write({indent: 4}), 'utf-8');
-    } else if (self.type === 'pbxproj') {
-        fs.writeFileSync(self.filepath, self.data.writeSync());
-    } else {
-        // plist
-        var regExp = new RegExp("<string>[ \t\r\n]+?</string>", "g");
-        fs.writeFileSync(self.filepath, plist.build(self.data).replace(regExp, "<string></string>"));
-    }
-    self.is_changed = false;
-}
-
-// ConfigFile.graft_child()
-ConfigFile.prototype.graft_child = ConfigFile_graft_child;
-function ConfigFile_graft_child(selector, xml_child) {
-    var self = this;
-    var filepath = self.filepath;
-    var result;
-    if (self.type === 'xml') {
-        var xml_to_graft = [et.XML(xml_child.xml)];
-        result = xml_helpers.graftXML(self.data, xml_to_graft, selector, xml_child.after);
-        if ( !result) {
-            throw new Error('grafting xml at selector "' + selector + '" from "' + filepath + '" during config install went bad :(');
-        }
-    } else {
-        // plist file
-        result = plist_helpers.graftPLIST(self.data, xml_child.xml, selector);
-        if ( !result ) {
-            throw new Error('grafting to plist "' + filepath + '" during config install went bad :(');
-        }
-    }
-    self.is_changed = true;
-}
-
-// ConfigFile.prune_child()
-ConfigFile.prototype.prune_child = ConfigFile_prune_child;
-function ConfigFile_prune_child(selector, xml_child) {
-    var self = this;
-    var filepath = self.filepath;
-    var result;
-    if (self.type === 'xml') {
-        var xml_to_graft = [et.XML(xml_child.xml)];
-        result = xml_helpers.pruneXML(self.data, xml_to_graft, selector);
-    } else {
-        // plist file
-        result = plist_helpers.prunePLIST(self.data, xml_child.xml, selector);
-    }
-    if ( !result) {
-        var err_msg = 'Pruning at selector "' + selector + '" from "' + filepath + '" went bad.';
-        throw new Error(err_msg);
-    }
-    self.is_changed = true;
-}
-/**** END of ConfigFile ****/
-
-
-/******************************************************************************
-* Utility functions
-******************************************************************************/
-
-// Check if we know such platform
-function checkPlatform(platform) {
-    if (!(platform in platforms)) throw new Error('platform "' + platform + '" not recognized.');
-}
-
-// determine if a plist file is binary
-function isBinaryPlist(filename) {
-    // I wish there was a synchronous way to read only the first 6 bytes of a
-    // file. This is wasteful :/
-    var buf = '' + fs.readFileSync(filename, 'utf8');
-    // binary plists start with a magic header, "bplist"
-    return buf.substring(0, 6) === 'bplist';
-}
-
-// Find out the real name of an iOS project
-// TODO: glob is slow, need a better way or caching, or avoid using more than once.
-function getIOSProjectname(project_dir) {
-    var matches = glob.sync(path.join(project_dir, '*.xcodeproj'));
-    var iospath;
-    if (matches.length === 1) {
-        iospath = path.basename(matches[0],'.xcodeproj');
-    } else {
-        var msg;
-        if (matches.length === 0) {
-            msg = 'Does not appear to be an xcode project, no xcode project file in ' + project_dir;
-        }
-        else {
-            msg = 'There are multiple *.xcodeproj dirs in ' + project_dir;
-        }
-        throw new Error(msg);
-    }
-    return iospath;
-}
-
-// Some config-file target attributes are not qualified with a full leading directory, or contain wildcards.
-// Resolve to a real path in this function.
-// TODO: getIOSProjectname is slow because of glob, try to avoid calling it several times per project.
-function resolveConfigFilePath(project_dir, platform, file) {
-    var filepath = path.join(project_dir, file);
-    var matches;
-
-    // .pbxproj file
-    if (file === 'framework') {
-        var proj_name = getIOSProjectname(project_dir);
-        filepath = path.join(project_dir, proj_name + '.xcodeproj', 'project.pbxproj');
-        return filepath;
-    }
-
-    if (file.indexOf('*') > -1) {
-        // handle wildcards in targets using glob.
-        matches = glob.sync(path.join(project_dir, '**', file));
-        if (matches.length) filepath = matches[0];
-        return filepath;
-    }
-
-    // special-case config.xml target that is just "config.xml". This should be resolved to the real location of the file.
-    // TODO: move the logic that contains the locations of config.xml from cordova CLI into plugman.
-    if (file == 'config.xml') {
-        if (platform == 'ubuntu') {
-            filepath = path.join(project_dir, 'config.xml');
-        } else if (platform == 'ios') {
-            var iospath = getIOSProjectname(project_dir);
-            filepath = path.join(project_dir,iospath, 'config.xml');
-        } else if (platform == 'android') {
-            filepath = path.join(project_dir, 'res', 'xml', 'config.xml');
-        } else {
-            matches = glob.sync(path.join(project_dir, '**', 'config.xml'));
-            if (matches.length) filepath = matches[0];
-        }
-        return filepath;
-    }
-
-    // None of the special cases matched, returning project_dir/file.
-    return filepath;
-}
-
-
-/******************************************************************************
-* Munge object manipulations functions
-******************************************************************************/
-
-// add the count of [key1][key2]...[keyN] to obj
-// return true if it didn't exist before
-function deep_add(obj, keys /* or key1, key2 .... */ ) {
-    if ( !Array.isArray(keys) ) {
-        keys = Array.prototype.slice.call(arguments, 1);
-    }
-
-    return process_munge(obj, true/*createParents*/, function (parentArray, k) {
-        var found = _.find(parentArray, function(element) {
-            return element.xml == k.xml;
-        });
-        if (found) {
-            found.after = found.after || k.after;
-            found.count += k.count;
-        } else {
-            parentArray.push(k);
-        }
-        return !found;
-    }, keys);
-}
-
-// decrement the count of [key1][key2]...[keyN] from obj and remove if it reaches 0
-// return true if it was removed or not found
-function deep_remove(obj, keys /* or key1, key2 .... */ ) {
-    if ( !Array.isArray(keys) ) {
-        keys = Array.prototype.slice.call(arguments, 1);
-    }
-
-    var result = process_munge(obj, false/*createParents*/, function (parentArray, k) {
-        var index = -1;
-        var found = _.find(parentArray, function (element) {
-            index++;
-            return element.xml == k.xml;
-        });
-        if (found) {
-            found.count -= k.count;
-            if (found.count > 0) {
-                return false;
-            }
-            else {
-                parentArray.splice(index, 1);
-            }
-        }
-        return undefined;
-    }, keys);
-
-    return typeof result === "undefined" ? true : result;
-}
-
-// search for [key1][key2]...[keyN]
-// return the object or undefined if not found
-function deep_find(obj, keys /* or key1, key2 .... */ ) {
-    if ( !Array.isArray(keys) ) {
-        keys = Array.prototype.slice.call(arguments, 1);
-    }
-
-    return process_munge(obj, false/*createParents?*/, function (parentArray, k) {
-        return _.find(parentArray, function (element) {
-            return element.xml == (k.xml || k);
-        });
-    }, keys);
-}
-
-// Execute func passing it the parent array and the xmlChild key.
-// When createParents is true, add the file and parent items  they are missing
-// When createParents is false, stop and return undefined if the file and/or parent items are missing
-
-function process_munge(obj, createParents, func, keys /* or key1, key2 .... */ ) {
-    if ( !Array.isArray(keys) ) {
-        keys = Array.prototype.slice.call(arguments, 1);
-    }
-    var k = keys[0];
-    if (keys.length == 1) {
-        return func(obj, k);
-    } else if (keys.length == 2) {
-        if (!obj.parents[k] && !createParents) {
-            return undefined;
-        }
-        obj.parents[k] = obj.parents[k] || [];
-        return process_munge(obj.parents[k], createParents, func, keys.slice(1));
-    } else if (keys.length == 3){
-        if (!obj.files[k] && !createParents) {
-            return undefined;
-        }
-        obj.files[k] = obj.files[k] || { parents: {} };
-        return process_munge(obj.files[k], createParents, func, keys.slice(1));
-    } else {
-        throw new Error("Invalid key format. Must contain at most 3 elements (file, parent, xmlChild).");
-    }
-}
-
-// All values from munge are added to base as
-// base[file][selector][child] += base[file][selector][child]
-// Returns a munge object containing values that exist in munge
-// but not in base.
-function increment_munge(base, munge) {
-    var diff = { files: {} };
-
-    for (var file in munge.files) {
-        for (var selector in munge.files[file].parents) {
-            for (var xml_child in munge.files[file].parents[selector]) {
-                var val = munge.files[file].parents[selector][xml_child];
-                // if node not in base, add it to diff and base
-                // else increment it's value in base without adding to diff
-                var newlyAdded = deep_add(base, [file, selector, val]);
-                if (newlyAdded) {
-                    deep_add(diff, file, selector, val);
-                }
-            }
-        }
-    }
-    return diff;
-}
-
-// Update the base munge object as
-// base[file][selector][child] -= base[file][selector][child]
-// nodes that reached zero value are removed from base and added to the returned munge
-// object.
-function decrement_munge(base, munge) {
-    var zeroed = { files: {} };
-
-    for (var file in munge.files) {
-        for (var selector in munge.files[file].parents) {
-            for (var xml_child in munge.files[file].parents[selector]) {
-                var val = munge.files[file].parents[selector][xml_child];
-                // if node not in base, add it to diff and base
-                // else increment it's value in base without adding to diff
-                var removed = deep_remove(base, [file, selector, val]);
-                if (removed) {
-                    deep_add(zeroed, file, selector, val);
-                }
-            }
-        }
-    }
-    return zeroed;
-}
-
-// For better readability where used
-function clone_munge(munge) {
-    return increment_munge({}, munge);
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/util/csproj.js
----------------------------------------------------------------------
diff --git a/src/util/csproj.js b/src/util/csproj.js
deleted file mode 100644
index 1024878..0000000
--- a/src/util/csproj.js
+++ /dev/null
@@ -1,124 +0,0 @@
-var xml_helpers = require('./xml-helpers'),
-    et = require('elementtree'),
-    fs = require('fs'),
-    path = require('path');
-
-function csproj(location) {
-    this.location = location;
-    this.xml = xml_helpers.parseElementtreeSync(location);
-    return this;
-}
-
-csproj.prototype = {
-    write:function() {
-        fs.writeFileSync(this.location, this.xml.write({indent:4}), 'utf-8');
-    },
-
-    addReference:function(relPath) {
-        var item = new et.Element('ItemGroup');
-        var extName = path.extname(relPath);
-
-        var elem = new et.Element('Reference');
-        // add dll file name
-        elem.attrib.Include = path.basename(relPath, extName);
-        // add hint path with full path
-        var hint_path = new et.Element('HintPath');
-        hint_path.text = relPath;
-        elem.append(hint_path);
-
-        if(extName == ".winmd") {
-            var mdFileTag = new et.Element("IsWinMDFile");
-                mdFileTag.text = "true";
-            elem.append(mdFileTag);
-        }
-
-        item.append(elem);
-
-        this.xml.getroot().append(item);
-    },
-
-    removeReference:function(relPath) {
-        var item = new et.Element('ItemGroup');
-        var extName = path.extname(relPath);
-        var includeText = path.basename(relPath,extName);
-        // <ItemGroup>
-        //   <Reference Include="WindowsRuntimeComponent1">
-        var item_groups = this.xml.findall('ItemGroup/Reference[@Include="' + includeText + '"]/..');
-
-        if(item_groups.length > 0 ) {
-            this.xml.getroot().remove(0, item_groups[0]);
-        }
-    },
-
-    addSourceFile:function(relative_path) {
-        relative_path = relative_path.split('/').join('\\');
-        // make ItemGroup to hold file.
-        var item = new et.Element('ItemGroup');
-
-        var extName = path.extname(relative_path);
-        // check if it's a .xaml page
-        if(extName == ".xaml") {
-            var page = new et.Element('Page');
-            var sub_type = new et.Element('SubType');
-
-            sub_type.text = "Designer";
-            page.append(sub_type);
-            page.attrib.Include = relative_path;
-
-            var gen = new et.Element('Generator');
-            gen.text = "MSBuild:Compile";
-            page.append(gen);
-
-            var item_groups = this.xml.findall('ItemGroup');
-            if(item_groups.length == 0) {
-                item.append(page);
-            } else {
-                item_groups[0].append(page);
-            }
-        }
-        else if (extName == ".cs") {
-            var compile = new et.Element('Compile');
-            compile.attrib.Include = relative_path;
-            // check if it's a .xaml.cs page that would depend on a .xaml of the same name
-            if (relative_path.indexOf('.xaml.cs', relative_path.length - 8) > -1) {
-                var dep = new et.Element('DependentUpon');
-                var parts = relative_path.split('\\');
-                var xaml_file = parts[parts.length - 1].substr(0, parts[parts.length - 1].length - 3); // Benn, really !?
-                dep.text = xaml_file;
-                compile.append(dep);
-            }
-            item.append(compile);
-        }
-        else { // otherwise add it normally
-            var compile = new et.Element('Content');
-            compile.attrib.Include = relative_path;
-            item.append(compile);
-        }
-        this.xml.getroot().append(item);
-    },
-
-    removeSourceFile:function(relative_path) {
-        relative_path = relative_path.split('/').join('\\');
-        var item_groups = this.xml.findall('ItemGroup');
-        for (var i = 0, l = item_groups.length; i < l; i++) {
-            var group = item_groups[i];
-            var files = group.findall('Compile').concat(group.findall('Page')).concat(group.findall('Content'));
-            for (var j = 0, k = files.length; j < k; j++) {
-                var file = files[j];
-                if (file.attrib.Include == relative_path) {
-                    // remove file reference
-                    group.remove(0, file);
-                    // remove ItemGroup if empty
-                    var new_group = group.findall('Compile').concat(group.findall('Page')).concat(group.findall('Content'));
-                    if(new_group.length < 1) {
-                        this.xml.getroot().remove(0, group);
-                    }
-                    return true;
-                }
-            }
-        }
-        return false;
-    }
-};
-
-module.exports = csproj;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/util/default-engines.js
----------------------------------------------------------------------
diff --git a/src/util/default-engines.js b/src/util/default-engines.js
deleted file mode 100644
index 5e4f151..0000000
--- a/src/util/default-engines.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var path = require('path');
-
-module.exports = function(project_dir){
-    return {
-        'cordova':
-            { 'platform':'*', 'scriptSrc': path.join(project_dir,'cordova','version') },
-        'cordova-plugman':
-            { 'platform':'*', 'currentVersion': require('../../package.json').version },
-        'cordova-android':
-            { 'platform':'android', 'scriptSrc': path.join(project_dir,'cordova','version') },
-        'cordova-ios':
-            { 'platform':'ios', 'scriptSrc': path.join(project_dir,'cordova','version') },
-        'cordova-blackberry10':
-            { 'platform':'blackberry10', 'scriptSrc': path.join(project_dir,'cordova','version') },
-        'cordova-wp7':
-            { 'platform':'wp7', 'scriptSrc': path.join(project_dir,'cordova','version') },
-        'cordova-wp8':
-            { 'platform':'wp8', 'scriptSrc': path.join(project_dir,'cordova','version') },
-        'cordova-windows8':
-            { 'platform':'windows8', 'scriptSrc': path.join(project_dir,'cordova','version') },
-        'apple-xcode' :
-            { 'platform':'ios', 'scriptSrc':  path.join(project_dir,'cordova','apple_xcode_version') },
-        'apple-ios' :
-            { 'platform':'ios', 'scriptSrc': path.join(project_dir,'cordova','apple_ios_version') },
-        'apple-osx' :
-            { 'platform':'ios', 'scriptSrc': path.join(project_dir,'cordova','apple_osx_version') },
-        'blackberry-ndk' :
-            { 'platform':'blackberry10', 'scriptSrc': path.join(project_dir,'cordova','bb10-ndk-version') },
-        'android-sdk' :
-            { 'platform':'android', 'scriptSrc': path.join(project_dir,'cordova','android_sdk_version') },
-        'windows-os' :
-            { 'platform':'wp7|wp8|windows8', 'scriptSrc': path.join(project_dir,'cordova','win_os_version') },
-        'windows-sdk' :
-            { 'platform':'wp7|wp8|windows8', 'scriptSrc': path.join(project_dir,'cordova','win_sdk_version') }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/util/dependencies.js
----------------------------------------------------------------------
diff --git a/src/util/dependencies.js b/src/util/dependencies.js
deleted file mode 100644
index a297372..0000000
--- a/src/util/dependencies.js
+++ /dev/null
@@ -1,96 +0,0 @@
-var dep_graph = require('dep-graph'),
-    path = require('path'),
-    fs = require('fs'),
-    plugman = require('../../plugman'),
-    config_changes = require('./config-changes'),
-    underscore = require('underscore'),
-    xml_helpers = require('./xml-helpers'),
-    package;
-
-module.exports = package = {
-
-    resolvePath: function(plugin_id, plugins_dir)
-    {
-        return path.join(plugins_dir, plugin_id);
-    },
-
-    resolveConfig: function(plugin_id, plugins_dir)
-    {
-        return path.join(plugins_dir, plugin_id, 'plugin.xml');
-    },
-
-    generate_dependency_info:function(plugins_dir, platform) {
-        var json = config_changes.get_platform_json(plugins_dir, platform);
-
-        // TODO: store whole dependency tree in plugins/[platform].json
-        // in case plugins are forcefully removed...
-        var tlps = [];
-        var graph = new dep_graph();
-        Object.keys(json.installed_plugins).forEach(function(plugin_id) {
-            tlps.push(plugin_id);
-
-            var xml = xml_helpers.parseElementtreeSync( package.resolveConfig(plugin_id, plugins_dir) );
-            var deps = xml.findall('dependency');
-
-            deps && deps.forEach(function(dep) {
-                graph.add(plugin_id, dep.attrib.id);
-            });
-        });
-        Object.keys(json.dependent_plugins).forEach(function(plugin_id) {
-            var xml = xml_helpers.parseElementtreeSync( package.resolveConfig(plugin_id, plugins_dir) );
-            var deps = xml.findall('dependency');
-            deps && deps.forEach(function(dep) {
-                graph.add(plugin_id, dep.attrib.id);
-            });
-        });
-
-        return {
-            graph:graph,
-            top_level_plugins:tlps
-        };
-    },
-
-    // Returns a list of top-level plugins which are (transitively) dependent on the given plugin.
-    dependents: function(plugin_id, plugins_dir, platform) {
-        if(typeof plugins_dir == 'object')
-            var depsInfo = plugins_dir;
-        else
-            var depsInfo = package.generate_dependency_info(plugins_dir, platform);
-
-        var graph = depsInfo.graph;
-        var tlps = depsInfo.top_level_plugins;
-        var dependents = tlps.filter(function(tlp) {
-            return tlp != plugin_id && graph.getChain(tlp).indexOf(plugin_id) >= 0;
-        });
-
-        return dependents;
-    },
-
-    // Returns a list of plugins which the given plugin depends on, for which it is the only dependent.
-    // In other words, if the given plugin were deleted, these dangling dependencies should be deleted too.
-    danglers: function(plugin_id, plugins_dir, platform) {
-        if(typeof plugins_dir == 'object')
-            var depsInfo = plugins_dir;
-        else
-            var depsInfo = package.generate_dependency_info(plugins_dir, platform);
-
-        var graph = depsInfo.graph;
-        var dependencies = graph.getChain(plugin_id);
-
-        var tlps = depsInfo.top_level_plugins;
-        var diff_arr = [];
-        tlps.forEach(function(tlp) {
-            if (tlp != plugin_id) {
-                diff_arr.push(graph.getChain(tlp));
-            }
-        });
-
-        // if this plugin has dependencies, do a set difference to determine which dependencies are not required by other existing plugins
-        diff_arr.unshift(dependencies);
-        var danglers = underscore.difference.apply(null, diff_arr);
-
-        // Ensure no top-level plugins are tagged as danglers.
-        danglers = danglers && danglers.filter(function(x) { return tlps.indexOf(x) < 0; });
-        return danglers;
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/util/metadata.js
----------------------------------------------------------------------
diff --git a/src/util/metadata.js b/src/util/metadata.js
deleted file mode 100644
index cfbb643..0000000
--- a/src/util/metadata.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var fs = require('fs'),
-    path = require('path');
-
-var filename = '.fetch.json';
-
-exports.get_fetch_metadata = function(plugin_dir) {
-    var filepath = path.join(plugin_dir, filename);
-    if (fs.existsSync(filepath)) {
-        return JSON.parse(fs.readFileSync(filepath, 'utf-8'));
-    } else {
-        return {};
-    }
-};
-
-exports.save_fetch_metadata = function(plugin_dir, data) {
-    var filepath = path.join(plugin_dir, '.fetch.json');
-    fs.writeFileSync(filepath, JSON.stringify(data), 'utf-8');
-};
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/util/plist-helpers.js
----------------------------------------------------------------------
diff --git a/src/util/plist-helpers.js b/src/util/plist-helpers.js
deleted file mode 100644
index e1dfbd9..0000000
--- a/src/util/plist-helpers.js
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- *
- * Copyright 2013 Brett Rudd
- *
- * Licensed 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.
- *
-*/
-
-// contains PLIST utility functions
-
-var et = require('elementtree'),
-    plist = require('plist-with-patches');
-
-// adds node to doc at selector
-module.exports = {
-    graftPLIST:function (doc, xml, selector) {
-        var obj = plist.parseStringSync("<plist>"+xml+"</plist>");
-
-        var node = doc[selector];
-        if (node && Array.isArray(node) && Array.isArray(obj))
-            doc[selector] = node.concat(obj);
-        else
-            doc[selector] = obj;
-
-        return true;
-    },
-    // removes node from doc at selector
-    prunePLIST:function(doc, xml, selector) {
-        var obj = plist.parseStringSync("<plist>"+xml+"</plist>");
-
-        pruneOBJECT(doc, selector, obj);
-
-        return true;
-    }
-}
-
-function pruneOBJECT(doc, selector, fragment) {
-    if (Array.isArray(fragment) && Array.isArray(doc[selector])) {
-        var empty = true;
-        for (i in fragment) {
-            for (j in doc[selector]) {
-                empty = pruneOBJECT(doc[selector], j, fragment[i]) && empty;
-            }
-        }
-        if (empty)
-        {
-            delete doc[selector];
-            return true;
-        }
-    }
-    else if (nodeEqual(doc[selector], fragment)) {
-        delete doc[selector];
-        return true;
-    }
-
-    return false;
-}
-
-function nodeEqual(node1, node2) {
-    if (typeof node1 != typeof node2)
-        return false;
-    else if (typeof node1 == 'string') {
-        node2 = escapeRE(node2).replace(new RegExp("\\$[a-zA-Z0-9-_]+","gm"),"(.*?)");
-        return new RegExp('^' + node2 + '$').test(node1);
-    }
-    else {
-        for (var key in node2) {
-            if (!nodeEqual(node1[key], node2[key])) return false;
-        }
-        return true;
-    }
-}
-
-// escape string for use in regex
-function escapeRE(str) {
-     return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\$&");
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/util/plugins.js
----------------------------------------------------------------------
diff --git a/src/util/plugins.js b/src/util/plugins.js
deleted file mode 100644
index 5a5d14a..0000000
--- a/src/util/plugins.js
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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 http = require('http'),
-    os = require('os'),
-    path = require('path'),
-    fs = require('fs'),
-    util = require('util'),
-    shell = require('shelljs'),
-    child_process = require('child_process'),
-    Q = require('q'),
-    xml_helpers = require('./xml-helpers'),
-    events = require('../events'),
-    tmp_dir;
-
-module.exports = {
-    searchAndReplace:require('./search-and-replace'),
-
-    clonePluginGit:function(plugin_git_url, plugins_dir, options) {
-        return module.exports.clonePluginGitRepo(plugin_git_url, plugins_dir, options.subdir, options.git_ref).then(
-            function(dst){
-                // Keep location where we checked out git repo
-                options.plugin_src_dir = tmp_dir;
-                return dst;
-            }
-        );
-    },
-
-    // Fetches plugin information from remote server.
-    // Returns a promise.
-    clonePluginGitRepo:function(plugin_git_url, plugins_dir, subdir, git_ref) {
-
-        if(!shell.which('git')) {
-            return Q.reject(new Error('"git" command line tool is not installed: make sure it is accessible on your PATH.'));
-        }
-        tmp_dir = path.join(os.tmpdir(), 'plugman', 'git', String((new Date).valueOf()));
-
-        shell.rm('-rf', tmp_dir);
-
-        var cmd = util.format('git clone "%s" "%s"', plugin_git_url, tmp_dir);
-        events.emit('verbose', 'Fetching plugin via git-clone command: ' + cmd);
-        var d = Q.defer();
-
-        child_process.exec(cmd, function(err, stdout, stderr) {
-            if (err) {
-                d.reject(err);
-            } else {
-                d.resolve();
-            }
-        });
-        return d.promise.then(function() {
-            events.emit('verbose', 'Plugin "' + plugin_git_url + '" fetched.');
-            // Check out the specified revision, if provided.
-            if (git_ref) {
-                var cmd = util.format('git checkout "%s"', git_ref);
-                var d2 = Q.defer();
-                child_process.exec(cmd, { cwd: tmp_dir }, function(err, stdout, stderr) {
-                    if (err) d2.reject(err);
-                    else d2.resolve();
-                });
-                return d2.promise.then(function() {
-                    events.emit('log', 'Plugin "' + plugin_git_url + '" checked out to git ref "' + git_ref + '".');
-                });
-            }
-        }).then(function() {
-            // Read the plugin.xml file and extract the plugin's ID.
-            tmp_dir = path.join(tmp_dir, subdir);
-            // TODO: what if plugin.xml does not exist?
-            var xml_file = path.join(tmp_dir, 'plugin.xml');
-            var xml = xml_helpers.parseElementtreeSync(xml_file);
-            var plugin_id = xml.getroot().attrib.id;
-
-            // TODO: what if a plugin depended on different subdirectories of the same plugin? this would fail.
-            // should probably copy over entire plugin git repo contents into plugins_dir and handle subdir separately during install.
-            var plugin_dir = path.join(plugins_dir, plugin_id);
-            events.emit('verbose', 'Copying fetched plugin over "' + plugin_dir + '"...');
-            shell.cp('-R', path.join(tmp_dir, '*'), plugin_dir);
-
-            events.emit('verbose', 'Plugin "' + plugin_id + '" fetched.');
-            return plugin_dir;
-        });
-    }
-};
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/util/search-and-replace.js
----------------------------------------------------------------------
diff --git a/src/util/search-and-replace.js b/src/util/search-and-replace.js
deleted file mode 100644
index 39bd9c3..0000000
--- a/src/util/search-and-replace.js
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env node
-/*
- *
- * Copyright 2013 Brett Rudd
- *
- * Licensed 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 glob = require('glob'),
-    fs = require('fs');
-
-module.exports = function searchAndReplace(srcGlob, variables) {
-    var files = glob.sync(srcGlob);
-    for (var i in files) {
-        var file = files[i];
-        if (fs.lstatSync(file).isFile()) {
-            var contents = fs.readFileSync(file, "utf-8");
-            for (var key in variables) {
-                var regExp = new RegExp("\\$" + key, "g");
-                contents = contents.replace(regExp, variables[key]);
-            }
-            fs.writeFileSync(file, contents);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/util/w8jsproj.js
----------------------------------------------------------------------
diff --git a/src/util/w8jsproj.js b/src/util/w8jsproj.js
deleted file mode 100644
index 903a214..0000000
--- a/src/util/w8jsproj.js
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
-  Helper for dealing with Windows Store JS app .jsproj files
-*/
-
-
-var xml_helpers = require('./xml-helpers'),
-    et = require('elementtree'),
-    fs = require('fs'),
-    shell = require('shelljs'),
-    events = require('../events'),
-    path = require('path');
-
-var WindowsStoreProjectTypeGUID = "{BC8A1FFA-BEE3-4634-8014-F334798102B3}";  // any of the below, subtype
-var WinCSharpProjectTypeGUID = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}";    // .csproj
-var WinVBnetProjectTypeGUID = "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}";     // who the ef cares?
-var WinCplusplusProjectTypeGUID = "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}"; // .vcxproj
-
-
-function jsproj(location) {
-    events.emit('verbose','creating jsproj from project at : ' + location);
-    this.location = location;
-    this.xml = xml_helpers.parseElementtreeSync(location);
-    return this;
-}
-
-jsproj.prototype = {
-    location:null,
-    xml:null,
-    plugins_dir:"Plugins",
-    write:function() {
-        fs.writeFileSync(this.location, this.xml.write({indent:4}), 'utf-8');
-    },
-    // add/remove the item group for SDKReference
-    // example :
-    // <ItemGroup><SDKReference Include="Microsoft.VCLibs, version=12.0" /></ItemGroup>
-    addSDKRef:function(incText) {
-        var item_group = new et.Element('ItemGroup');
-        var elem = new et.Element('SDKReference');
-        elem.attrib.Include = incText;
-
-        item_group.append(elem);
-        this.xml.getroot().append(item_group);
-    },
-
-    removeSDKRef:function(incText) {
-        var item_group = this.xml.find('ItemGroup/SDKReference[@Include="' + incText + '"]/..');
-        if(item_group) { // TODO: error handling
-            this.xml.getroot().remove(0, item_group);
-        }
-    },
-
-    addReference:function(relPath,src) {
-
-        events.emit('verbose','addReference::' + relPath);
-
-        var item = new et.Element('ItemGroup');
-        var extName = path.extname(relPath);
-
-        var elem = new et.Element('Reference');
-        // add file name
-        elem.attrib.Include = path.basename(relPath, extName);
-
-        // add hint path with full path
-        var hint_path = new et.Element('HintPath');
-            hint_path.text = relPath;
-
-        elem.append(hint_path);
-
-        if(extName == ".winmd") {
-            var mdFileTag = new et.Element("IsWinMDFile");
-                mdFileTag.text = "true";
-            elem.append(mdFileTag);
-        }
-
-        item.append(elem);
-        this.xml.getroot().append(item);
-    },
-
-    removeReference:function(relPath) {
-        events.emit('verbose','removeReference::' + relPath);
-
-        var extName = path.extname(relPath);
-        var includeText = path.basename(relPath,extName);
-        // <ItemGroup>
-        //   <Reference Include="WindowsRuntimeComponent1">
-        var item_group = this.xml.find('ItemGroup/Reference[@Include="' + includeText + '"]/..');
-
-        if(item_group) { // TODO: erro handling
-            this.xml.getroot().remove(0, item_group);
-        }
-    },
-
-    addSourceFile:function(relative_path) {
-
-        relative_path = relative_path.split('/').join('\\');
-        // make ItemGroup to hold file.
-        var item = new et.Element('ItemGroup');
-
-        var content = new et.Element('Content');
-            content.attrib.Include = relative_path;
-        item.append(content);
-
-        this.xml.getroot().append(item);
-    },
-
-    removeSourceFile:function(relative_path) {
-
-        // path.normalize(relative_path);// ??
-        relative_path = relative_path.split('/').join('\\');
-        // var oneStep = this.xml.findall('ItemGroup/Content[@Include="' + relative_path + '""]/..');
-
-        var item_groups = this.xml.findall('ItemGroup');
-        for (var i = 0, l = item_groups.length; i < l; i++) {
-            var group = item_groups[i];
-            var files = group.findall('Content');
-            for (var j = 0, k = files.length; j < k; j++) {
-                var file = files[j];
-                if (file.attrib.Include == relative_path) {
-                    // remove file reference
-                    group.remove(0, file);
-                    // remove ItemGroup if empty
-                    var new_group = group.findall('Content');
-                    if(new_group.length < 1) {
-                        this.xml.getroot().remove(0, group);
-                    }
-                    return true;
-                }
-            }
-        }
-        return false;
-    },
-    // relative path must include the project file, so we can determine .csproj, .jsproj, .vcxproj...
-    addProjectReference:function(relative_path) {
-        events.emit('verbose','adding project reference to ' + relative_path);
-
-        relative_path = relative_path.split('/').join('\\');
-        // read the solution path from the base directory
-        var solutionPath = shell.ls(path.join(path.dirname(this.location),"*.sln"))[0];// TODO:error handling
-        // note we may not have a solution, in which case just add a project reference, I guess ..
-        // get the project extension to figure out project type
-        var projectExt = path.extname(relative_path);
-
-        var pluginProjectXML = xml_helpers.parseElementtreeSync(relative_path);
-        // find the guid + name of the referenced project
-        var projectGuid = pluginProjectXML.find("PropertyGroup/ProjectGuid").text;
-        var projName = pluginProjectXML.find("PropertyGroup/ProjectName").text;
-
-        var preInsertText = "ProjectSection(ProjectDependencies) = postProject\n\r" +
-                             projectGuid + "=" + projectGuid + "\n\r" +
-                            "EndProjectSection\n\r";
-
-        // read in the solution file
-        var solText = fs.readFileSync(solutionPath,{encoding:"utf8"});
-        var splitText = solText.split("EndProject");
-        if(splitText.length != 2) {
-            throw new Error("too many projects in solution.");
-        }
-
-        var projectTypeGuid = null;
-        if(projectExt == ".vcxproj") {
-            projectTypeGuid = WinCplusplusProjectTypeGUID;
-        }
-        else if(projectExt == ".csproj") {
-            projectTypeGuid = WinCSharpProjectTypeGUID;
-        }
-
-        if(!projectTypeGuid) {
-            throw new Error("unrecognized project type");
-        }
-
-        var postInsertText = 'Project("' + projectTypeGuid + '") = "' +
-                         projName + '", "' + relative_path + '",' +
-                        '"' + projectGuid + '"\n\r EndProject\n\r';
-
-        solText = splitText[0] + preInsertText + "EndProject\n\r" + postInsertText + splitText[1];
-        fs.writeFileSync(solutionPath,solText,{encoding:"utf8"});
-
-
-        // Add the ItemGroup/ProjectReference to the cordova project :
-        // <ItemGroup><ProjectReference Include="blahblah.csproj"/></ItemGroup>
-        var item = new et.Element('ItemGroup');
-
-        var projRef = new et.Element('ProjectReference');
-            projRef.attrib.Include = relative_path;
-            item.append(projRef);
-        this.xml.getroot().append(item);
-
-    },
-    removeProjectReference:function(relative_path) {
-        events.emit('verbose','removing project reference to ' + relative_path);
-
-        // find the guid + name of the referenced project
-        var pluginProjectXML = xml_helpers.parseElementtreeSync(relative_path);
-        var projectGuid = pluginProjectXML.find("PropertyGroup/ProjectGuid").text;
-        var projName = pluginProjectXML.find("PropertyGroup/ProjectName").text;
-
-        // get the project extension to figure out project type
-        var projectExt = path.extname(relative_path);
-        // get the project type
-        var projectTypeGuid = null;
-        if(projectExt == ".vcxproj") {
-            projectTypeGuid = WinCplusplusProjectTypeGUID;
-        }
-        else if(projectExt == ".csproj") {
-            projectTypeGuid = WinCSharpProjectTypeGUID;
-        }
-
-        if(!projectTypeGuid) {
-            throw new Error("unrecognized project type");
-        }
-
-        var preInsertText = "ProjectSection(ProjectDependencies) = postProject\n\r" +
-                             projectGuid + "=" + projectGuid + "\n\r" +
-                            "EndProjectSection\n\r";
-
-        var postInsertText = 'Project("' + projectTypeGuid + '") = "' +
-                              projName + '", "' + relative_path + '",' +
-                              '"' + projectGuid + '"\n\r EndProject\n\r';
-
-        // find and read in the solution file
-        var solutionPath = shell.ls(path.join(path.dirname(this.location),"*.sln"))[0];  // TODO:error handling
-        var solText = fs.readFileSync(solutionPath,{encoding:"utf8"});
-        var splitText = solText.split(preInsertText);
-
-        solText = splitText.join("").split(postInsertText);
-        solText = solText.join("");
-
-        fs.writeFileSync(solutionPath,solText,{encoding:"utf8"});
-
-        // select first ItemsGroups with a ChildNode ProjectReference
-        // ideally select all, and look for @attrib 'Include'= projectFullPath
-        var projectRefNodesPar = this.xml.find("ItemGroup/ProjectReference[@Include='" + relative_path + "']/..");
-        if(projectRefNodesPar) {
-            this.xml.getroot().remove(0, projectRefNodesPar);
-        }
-    }
-};
-
-module.exports = jsproj;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/util/xml-helpers.js
----------------------------------------------------------------------
diff --git a/src/util/xml-helpers.js b/src/util/xml-helpers.js
deleted file mode 100644
index 601ed4d..0000000
--- a/src/util/xml-helpers.js
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-
-/**
- * contains XML utility functions, some of which are specific to elementtree
- */
-
-var fs = require('fs')
-  , path = require('path')
-  , _ = require('underscore')
-  , et = require('elementtree');
-
-module.exports = {
-    moveProjFile: function(origFile, projPath, callback) {
-        var src = path.resolve(projPath, origFile)
-          , dest = src.replace('.orig', '');
-
-        fs.createReadStream(src)
-            .pipe(fs.createWriteStream(dest))
-            .on('close', callback);
-    },
-
-    // compare two et.XML nodes, see if they match
-    // compares tagName, text, attributes and children (recursively)
-    equalNodes: function(one, two) {
-        if (one.tag != two.tag) {
-            return false;
-        } else if (one.text.trim() != two.text.trim()) {
-            return false;
-        } else if (one._children.length != two._children.length) {
-            return false;
-        }
-
-        var oneAttribKeys = Object.keys(one.attrib),
-            twoAttribKeys = Object.keys(two.attrib),
-            i = 0, attribName;
-
-        if (oneAttribKeys.length != twoAttribKeys.length) {
-            return false;
-        }
-
-        for (i; i < oneAttribKeys.length; i++) {
-            attribName = oneAttribKeys[i];
-
-            if (one.attrib[attribName] != two.attrib[attribName]) {
-                return false;
-            }
-        }
-
-        for (i; i < one._children.length; i++) {
-            if (!module.exports.equalNodes(one._children[i], two._children[i])) {
-                return false;
-            }
-        }
-
-        return true;
-    },
-
-    // adds node to doc at selector, creating parent if it doesn't exist
-    graftXML: function(doc, nodes, selector, after) {
-        var parent = resolveParent(doc, selector);
-        if (!parent) {
-            //Try to create the parent recursively if necessary
-            try {
-                var parentToCreate = et.XML("<" + path.basename(selector) + ">"),
-                    parentSelector = path.dirname(selector);
-
-                this.graftXML(doc, [parentToCreate], parentSelector);
-            } catch (e) {
-                return false;
-            }
-            parent = resolveParent(doc, selector);
-            if (!parent) return false;
-        }
-
-        nodes.forEach(function (node) {
-            // check if child is unique first
-            if (uniqueChild(node, parent)) {
-                var children = parent.getchildren();
-                var insertIdx = after ? findInsertIdx(children, after) : children.length;
-
-                //TODO: replace with parent.insert after the bug in ElementTree is fixed
-                parent.getchildren().splice(insertIdx, 0, node);
-            }
-        });
-
-        return true;
-    },
-
-    // removes node from doc at selector
-    pruneXML: function(doc, nodes, selector) {
-        var parent = resolveParent(doc, selector);
-        if (!parent) return false;
-
-        nodes.forEach(function (node) {
-            var matchingKid = null;
-            if ((matchingKid = findChild(node, parent)) != null) {
-                // stupid elementtree takes an index argument it doesn't use
-                // and does not conform to the python lib
-                parent.remove(0, matchingKid);
-            }
-        });
-
-        return true;
-    },
-
-    parseElementtreeSync: function (filename) {
-        var contents = fs.readFileSync(filename, 'utf-8').replace("\ufeff", "");;
-        return new et.ElementTree(et.XML(contents));
-    }
-};
-
-function findChild(node, parent) {
-    var matchingKids = parent.findall(node.tag)
-      , i, j;
-
-    for (i = 0, j = matchingKids.length ; i < j ; i++) {
-        if (module.exports.equalNodes(node, matchingKids[i])) {
-            return matchingKids[i];
-        }
-    }
-    return null;
-}
-
-function uniqueChild(node, parent) {
-    var matchingKids = parent.findall(node.tag)
-      , i = 0;
-
-    if (matchingKids.length == 0) {
-        return true;
-    } else  {
-        for (i; i < matchingKids.length; i++) {
-            if (module.exports.equalNodes(node, matchingKids[i])) {
-                return false;
-            }
-        }
-        return true;
-    }
-}
-
-var ROOT = /^\/([^\/]*)/,
-    ABSOLUTE = /^\/([^\/]*)\/(.*)/;
-function resolveParent(doc, selector) {
-    var parent, tagName, subSelector;
-
-    // handle absolute selector (which elementtree doesn't like)
-    if (ROOT.test(selector)) {
-        tagName = selector.match(ROOT)[1];
-        // test for wildcard "any-tag" root selector
-        if (tagName == '*' || tagName === doc._root.tag) {
-            parent = doc._root;
-
-            // could be an absolute path, but not selecting the root
-            if (ABSOLUTE.test(selector)) {
-                subSelector = selector.match(ABSOLUTE)[2];
-                parent = parent.find(subSelector)
-            }
-        } else {
-            return false;
-        }
-    } else {
-        parent = doc.find(selector)
-    }
-    return parent;
-}
-
-// Find the index at which to insert an entry. After is a ;-separated priority list
-// of tags after which the insertion should be made. E.g. If we need to
-// insert an element C, and the rule is that the order of children has to be
-// As, Bs, Cs. After will be equal to "C;B;A".
-
-function findInsertIdx(children, after) {
-    var childrenTags = children.map(function(child) { return child.tag; });
-    var afters = after.split(";");
-    var afterIndexes = afters.map(function(current) { return childrenTags.lastIndexOf(current); });
-    var foundIndex = _.find(afterIndexes, function(index) { return index != -1; });
-
-    //add to the beginning if no matching nodes are found
-    return typeof foundIndex === 'undefined' ? 0 : foundIndex+1;
-}


[62/70] Remove all cordova-lib files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/DummyPlugin/src/android/DummyPlugin.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/android/DummyPlugin.java b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/android/DummyPlugin.java
deleted file mode 100644
index 5263b0c..0000000
--- a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/android/DummyPlugin.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/DummyPlugin/src/android/TestLib.jar
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/android/TestLib.jar b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/android/TestLib.jar
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/DummyPlugin/src/blackberry10/index.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/blackberry10/index.js b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/blackberry10/index.js
deleted file mode 100644
index 5263b0c..0000000
--- a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/blackberry10/index.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/Custom.framework/someFheader.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/Custom.framework/someFheader.h b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/Custom.framework/someFheader.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/Custom.framework/somebinlib
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/Custom.framework/somebinlib b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/Custom.framework/somebinlib
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/DummyPlugin.bundle
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/DummyPlugin.bundle b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/DummyPlugin.bundle
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/DummyPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/DummyPluginCommand.h b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/DummyPluginCommand.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/DummyPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/DummyPluginCommand.m b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/DummyPluginCommand.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/SourceWithFramework.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/SourceWithFramework.m b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/SourceWithFramework.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/TargetDirTest.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/TargetDirTest.h b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/TargetDirTest.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/TargetDirTest.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/TargetDirTest.m b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/TargetDirTest.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/libsqlite3.dylib
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/libsqlite3.dylib b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/libsqlite3.dylib
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/DummyPlugin/src/tizen/dummer.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/tizen/dummer.js b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/tizen/dummer.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/DummyPlugin/src/windows8/dummer.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/windows8/dummer.js b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/windows8/dummer.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/DummyPlugin/src/wp7/DummyPlugin.cs
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/wp7/DummyPlugin.cs b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/wp7/DummyPlugin.cs
deleted file mode 100644
index 273dc3b..0000000
--- a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/wp7/DummyPlugin.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *
- * Copyright 2013 Benn Mapes
- *
- * Licensed 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.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/DummyPlugin/src/wp8/DummyPlugin.cs
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/wp8/DummyPlugin.cs b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/wp8/DummyPlugin.cs
deleted file mode 100644
index 273dc3b..0000000
--- a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/wp8/DummyPlugin.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *
- * Copyright 2013 Benn Mapes
- *
- * Licensed 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.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/DummyPlugin/www/dummyplugin.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/www/dummyplugin.js b/cordova-lib/spec-plugman/plugins/DummyPlugin/www/dummyplugin.js
deleted file mode 100644
index 5263b0c..0000000
--- a/cordova-lib/spec-plugman/plugins/DummyPlugin/www/dummyplugin.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/DummyPlugin/www/dummyplugin/image.jpg
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/www/dummyplugin/image.jpg b/cordova-lib/spec-plugman/plugins/DummyPlugin/www/dummyplugin/image.jpg
deleted file mode 100644
index 257cc56..0000000
--- a/cordova-lib/spec-plugman/plugins/DummyPlugin/www/dummyplugin/image.jpg
+++ /dev/null
@@ -1 +0,0 @@
-foo

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/EnginePlugin/megaBoringVersion
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/EnginePlugin/megaBoringVersion b/cordova-lib/spec-plugman/plugins/EnginePlugin/megaBoringVersion
deleted file mode 100755
index cbf7911..0000000
--- a/cordova-lib/spec-plugman/plugins/EnginePlugin/megaBoringVersion
+++ /dev/null
@@ -1,23 +0,0 @@
-#! /bin/sh
-
-#
-# 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.
-#
-
-echo 4.0.0
-exit 0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/EnginePlugin/megaFunVersion
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/EnginePlugin/megaFunVersion b/cordova-lib/spec-plugman/plugins/EnginePlugin/megaFunVersion
deleted file mode 100755
index 1e4c706..0000000
--- a/cordova-lib/spec-plugman/plugins/EnginePlugin/megaFunVersion
+++ /dev/null
@@ -1,23 +0,0 @@
-#! /bin/sh
-
-#
-# 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.
-#
-
-echo 1.0.0
-exit 0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/EnginePlugin/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/EnginePlugin/plugin.xml b/cordova-lib/spec-plugman/plugins/EnginePlugin/plugin.xml
deleted file mode 100644
index a58f19e..0000000
--- a/cordova-lib/spec-plugman/plugins/EnginePlugin/plugin.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
-    xmlns="http://www.phonegap.com/ns/plugins/1.0"
-    id="com.cordova.engine"
-    version="1.0.0">
-
-    <name>Engine Choo Choo</name>
-
-    <engines>
-        <engine name="cordova" version=">=2.3.0"/>
-        <engine name="cordova-plugman" version=">=0.10.0" />
-        <engine name="mega-fun-plugin" version=">=1.0.0" scriptSrc="megaFunVersion" platform="*" />
-        <engine name="mega-boring-plugin" version=">=3.0.0" scriptSrc="megaBoringVersion" platform="ios|android" />
-    </engines>
-    
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/EnginePluginAndroid/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/EnginePluginAndroid/plugin.xml b/cordova-lib/spec-plugman/plugins/EnginePluginAndroid/plugin.xml
deleted file mode 100644
index fe2bce2..0000000
--- a/cordova-lib/spec-plugman/plugins/EnginePluginAndroid/plugin.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
-    xmlns="http://www.phonegap.com/ns/plugins/1.0"
-    id="com.cordova.engine"
-    version="1.0.0">
-
-    <name>Engine Choo Choo</name>
-
-    <engines>
-        <engine name="cordova" version=">=3.0.0"/>
-        <engine name="cordova-android" version=">=3.1.0"/>
-        <engine name="android-sdk" version=">=18"/>
-    </engines>
-    
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/EnginePluginiOS/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/EnginePluginiOS/plugin.xml b/cordova-lib/spec-plugman/plugins/EnginePluginiOS/plugin.xml
deleted file mode 100644
index d7a9a8e..0000000
--- a/cordova-lib/spec-plugman/plugins/EnginePluginiOS/plugin.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
-    xmlns="http://www.phonegap.com/ns/plugins/1.0"
-    id="com.cordova.engine"
-    version="1.0.0">
-
-    <name>Engine Choo Choo</name>
-
-    <engines>
-        <engine name="cordova" version=">=3.0.0"/>
-        <engine name="cordova-android" version=">=3.1.0"/>
-        <engine name="apple-ios" version="6.1"/>
-        <engine name="apple-osx" version=">10.0"/>
-        <engine name="apple-xcode" version=">=4.6.3"/>
-    </engines>
-    
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/FaultyPlugin/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/FaultyPlugin/plugin.xml b/cordova-lib/spec-plugman/plugins/FaultyPlugin/plugin.xml
deleted file mode 100644
index 22564e7..0000000
--- a/cordova-lib/spec-plugman/plugins/FaultyPlugin/plugin.xml
+++ /dev/null
@@ -1,161 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="com.phonegap.plugins.faultyplugin"
-    version="0.6.0">
-
-    <name>Faulty Plugin</name>
-
-    <access origin="build.phonegap.com" />
-    <access origin="s3.amazonaws.com" />
-    <!-- file doesn't exist -->
-
-    <config-file target="config.xml" parent="/widget">
-        <asset src="www/main.js" target="faultyplugin/main.js" />
-        <asset src="www/index.js" target="faultyplugin/index.js" />
-    </config-file>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="AndroidManifest.xml" parent="/manifest/application">
-            <activity android:name="com.phonegap.plugins.faultyplugin.FaultyPlugin"
-                      android:label="@string/app_name">
-                <intent-filter>
-                </intent-filter>
-            </activity>
-        </config-file>
-
-        <!-- CDV < 2.0 -->
-        <config-file target="res/xml/plugins.xml" parent="/plugins">
-            <plugin name="FaultyPlugin"
-                value="com.phonegap.plugins.faultyplugin.FaultyPlugin"/>
-        </config-file>
-
-        <!-- CDV 2.0+ (for now) -->
-        <config-file target="res/xml/config.xml" parent="/cordova/plugins">
-            <plugin name="FaultyPlugin"
-                value="com.phonegap.plugins.faultyplugin.FaultyPlugin"/>
-        </config-file>
-
-        <!-- this file doesn't exist -->
-        <source-file src="src/android/NotHere.java"
-                target-dir="src/com/phonegap/plugins/faultyplugin" />
-    </platform>
-    
-    <!-- android -->
-    <platform name="amazon-fireos">
-        <config-file target="AndroidManifest.xml" parent="/manifest/application">
-            <activity android:name="com.phonegap.plugins.faultyplugin.FaultyPlugin"
-                      android:label="@string/app_name">
-                <intent-filter>
-                </intent-filter>
-            </activity>
-        </config-file>
-
-        <!-- CDV < 2.0 -->
-        <config-file target="res/xml/plugins.xml" parent="/plugins">
-            <plugin name="FaultyPlugin"
-                value="com.phonegap.plugins.faultyplugin.FaultyPlugin"/>
-        </config-file>
-
-        <!-- CDV 2.0+ (for now) -->
-        <config-file target="res/xml/config.xml" parent="/cordova/plugins">
-            <plugin name="FaultyPlugin"
-                value="com.phonegap.plugins.faultyplugin.FaultyPlugin"/>
-        </config-file>
-
-        <!-- this file doesn't exist -->
-        <source-file src="src/android/NotHere.java"
-                target-dir="src/com/phonegap/plugins/faultyplugin" />
-    </platform>
-
-    <!-- ios -->
-    <platform name="ios">
-        <!-- /cordova/plugins no longer exists, it is now /widget/plugins -->
-        <!-- this should fail to install on ios -->
-        <config-file target="config.xml" parent="/cordova/plugins">
-            <plugin name="FaultyPlugin"
-                value="FaultyPlugin"/>
-        </config-file>
-
-        <header-file src="src/ios/FaultyPlugin.h" />
-        <source-file src="src/ios/FaultyPlugin.m" />
-        <!-- these files don't exist -->
-        <header-file src="src/ios/FaultyPluginCommand.h" />
-        <source-file src="src/ios/FaultyPluginCommand.m" />
-        <resource-file src="src/ios/IDontExist.bundle" />
-        <framework src="src/ios/Nopers.lib" />
-        <framework src="src/ios/NonExistantCustomFramework.framework" custom="true" />
-    </platform>
-    <platform name="blackberry10">
-        <config-file target="config.xml" parent="/widget">
-            <feature id="cordova.echo" required="true" version="1.0.0.0"/>
-        </config-file>
-
-        <source-file src="src/blackberry10/index.js" target-dir="ext-qnx/cordova.echo" />
-        <!-- these dont exist -->
-        <lib-file src="src/blackberry10/device/echoJnext.so" target-dir="ext-qnx/cordova.echo/device" />
-        <lib-file src="src/blackberry10/simulator/echoJnext.so" target-dir="ext-qnx/cordova.echo/simulator" />
-    </platform>
-
-    <!-- wp7 -->
-    <platform name="wp7">
-        <config-file target="config.xml" parent="/*">
-            <feature name="FaultyPlugin">
-                <param name="wp-package" value="FaultyPlugin"/>
-            </feature>
-        </config-file>
-
-        <source-file src="src/wp7/FaultyPlugin.cs" />
-
-        <!-- this doesn't exist -->
-        <source-file src="src/wp7/NotHere.cs" />
-    </platform>
-
-    <!-- wp8 -->
-    <platform name="wp8">
-        <config-file target="config.xml" parent="/*">
-            <feature name="FaultyPlugin">
-                <param name="wp-package" value="FaultyPlugin"/>
-            </feature>
-        </config-file>
-
-        <source-file src="src/wp8/FaultyPlugin.cs" />
-
-        <!-- this doesn't exist -->
-        <source-file src="src/wp8/NotHere.cs" />
-    </platform>
-
-    <!-- wp8 -->
-    <platform name="windows8">
-        <config-file target="config.xml" parent="/*">
-            <feature name="FaultyPlugin">
-                <param name="windows8-package" value="FaultyPlugin"/>
-            </feature>
-        </config-file>
-
-        <source-file src="src/windows8/faultyPlugin.js" />
-
-        <!-- does not exist -->
-        <source-file src="src/windows8/NotHere.js" />
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/android/FaultyPlugin.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/android/FaultyPlugin.java b/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/android/FaultyPlugin.java
deleted file mode 100644
index 5263b0c..0000000
--- a/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/android/FaultyPlugin.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/blackberry10/client.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/blackberry10/client.js b/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/blackberry10/client.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/ios/FaultyPlugin.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/ios/FaultyPlugin.h b/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/ios/FaultyPlugin.h
deleted file mode 100644
index 6a23ab6..0000000
--- a/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/ios/FaultyPlugin.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-
-//
-//  PhoneGap ! ChildBrowserCommand
-//
-//
-//  Created by Jesse MacFadyen on 10-05-29.
-//  Copyright 2010 Nitobi. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#ifdef PHONEGAP_FRAMEWORK
-	#import <PhoneGap/PGPlugin.h>
-#else
-	#import "PGPlugin.h"
-#endif
-#import "ChildBrowserViewController.h"
-
-
-
-@interface ChildBrowserCommand : PGPlugin <ChildBrowserDelegate>  {
-
-	ChildBrowserViewController* childBrowser;
-}
-
-@property (nonatomic, retain) ChildBrowserViewController *childBrowser;
-
-
-- (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
--(void) onChildLocationChange:(NSString*)newLoc;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/ios/FaultyPlugin.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/ios/FaultyPlugin.m b/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/ios/FaultyPlugin.m
deleted file mode 100644
index 38aaf64..0000000
--- a/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/ios/FaultyPlugin.m
+++ /dev/null
@@ -1,86 +0,0 @@
-//
-
-// 
-//
-//  Created by Jesse MacFadyen on 10-05-29.
-//  Copyright 2010 Nitobi. All rights reserved.
-//  Copyright (c) 2011, IBM Corporation
-//  Copyright 2011, Randy McMillan
-//
-
-#import "ChildBrowserCommand.h"
-
-#ifdef PHONEGAP_FRAMEWORK
-	#import <PhoneGap/PhoneGapViewController.h>
-#else
-	#import "PhoneGapViewController.h"
-#endif
-
-
-@implementation ChildBrowserCommand
-
-@synthesize childBrowser;
-
-- (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options // args: url
-{	
-	
-    if(childBrowser == NULL)
-	{
-		childBrowser = [[ ChildBrowserViewController alloc ] initWithScale:FALSE ];
-		childBrowser.delegate = self;
-	}
-	
-/* // TODO: Work in progress
-	NSString* strOrientations = [ options objectForKey:@"supportedOrientations"];
-	NSArray* supportedOrientations = [strOrientations componentsSeparatedByString:@","];
-*/
-    PhoneGapViewController* cont = (PhoneGapViewController*)[ super appViewController ];
-    childBrowser.supportedOrientations = cont.supportedOrientations;
-    
-    if ([cont respondsToSelector:@selector(presentViewController)]) {
-        //Reference UIViewController.h Line:179 for update to iOS 5 difference - @RandyMcMillan
-        [cont presentViewController:childBrowser animated:YES completion:nil];        
-    } else {
-        [ cont presentModalViewController:childBrowser animated:YES ];
-    }                 
-        
-    NSString *url = (NSString*) [arguments objectAtIndex:0];
-        
-    [childBrowser loadURL:url  ];
-        
-}
-
--(void) close:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options // args: url
-{
-    [ childBrowser closeBrowser];
-	
-}
-
--(void) onClose
-{
-	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onClose();",@""];
-	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
-}
-
--(void) onOpenInSafari
-{
-	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onOpenExternal();",@""];
-	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
-}
-
-
--(void) onChildLocationChange:(NSString*)newLoc
-{
-	
-	NSString* tempLoc = [NSString stringWithFormat:@"%@",newLoc];
-	NSString* encUrl = [tempLoc stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
-	 
-	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onLocationChange('%@');",encUrl];
-	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
-
-}
-
-
-
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/windows8/faultyPlugin.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/windows8/faultyPlugin.js b/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/windows8/faultyPlugin.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/wp7/FaultyPlugin.cs
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/wp7/FaultyPlugin.cs b/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/wp7/FaultyPlugin.cs
deleted file mode 100644
index 5263b0c..0000000
--- a/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/wp7/FaultyPlugin.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/wp8/FaultyPlugin.cs
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/wp8/FaultyPlugin.cs b/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/wp8/FaultyPlugin.cs
deleted file mode 100644
index 5263b0c..0000000
--- a/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/wp8/FaultyPlugin.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/PluginsPlistOnly/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/PluginsPlistOnly/plugin.xml b/cordova-lib/spec-plugman/plugins/PluginsPlistOnly/plugin.xml
deleted file mode 100644
index 0e00504..0000000
--- a/cordova-lib/spec-plugman/plugins/PluginsPlistOnly/plugin.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    id="com.phonegap.plugins.oldskewl"
-    version="0.0.1">
-
-    <name>Old Skewl Plugin using Plists</name>
-
-    <!-- ios -->
-    <platform name="ios">
-        <plugins-plist key="OldSkewl" string="OldSkewlCommand" />
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/VariablePlugin/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/VariablePlugin/plugin.xml b/cordova-lib/spec-plugman/plugins/VariablePlugin/plugin.xml
deleted file mode 100644
index 9eff729..0000000
--- a/cordova-lib/spec-plugman/plugins/VariablePlugin/plugin.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="com.adobe.vars"
-    version="3.0.0">
-
-    <name>Use Variables</name>
-
-    <preference name="API_KEY" />
-
-    <info>Remember that your api key is $API_KEY!</info>
-    <!-- android -->
-    <platform name="android">
-		<config-file target="AndroidManifest.xml" parent="/manifest">
-            <poop name="GoogleMapsApiKey" value="$API_KEY" />
-            <package>$PACKAGE_NAME</package>
-		</config-file>
-		
-    </platform>
-    
-    <!-- amazon fireos -->
-    <platform name="amazon-fireos">
-		<config-file target="AndroidManifest.xml" parent="/manifest">
-            <poop name="GoogleMapsApiKey" value="$API_KEY" />
-            <package>$PACKAGE_NAME</package>
-		</config-file>
-		
-    </platform>
-
-    <!-- ios -->
-    <platform name="ios">
-        <config-file target="config.xml" parent="/widget">
-            <awesome value="$API_KEY" />
-            <cfbundleid>$PACKAGE_NAME</cfbundleid>
-        </config-file>
-        <config-file target="*-Info.plist" parent="APluginNode">
-            <string></string>
-        </config-file>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/WebNotifications/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WebNotifications/plugin.xml b/cordova-lib/spec-plugman/plugins/WebNotifications/plugin.xml
deleted file mode 100644
index b9026f1..0000000
--- a/cordova-lib/spec-plugman/plugins/WebNotifications/plugin.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="com.phonegap.plugins.webnotifications"
-    version="0.0.1">
-
-    <name>Web Notifications</name>
-
-    <asset src="www/webnotifications.js" target="webnotifications.js" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-        <access origin="s3.amazonaws.com" />
-    </config-file>
-	
-    <!-- ios -->
-    <platform name="ios">
-        <config-file target="config.xml" parent="/*/plugins">
-            <plugin name="WebNotifications"
-                value="WebNotifications"/>
-        </config-file>
-
-        <header-file src="src/ios/WebNotifications.h" />
-
-        <source-file src="src/ios/WebNotifications.m" />
-
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/WebNotifications/src/ios/AppDelegate.m.diff
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WebNotifications/src/ios/AppDelegate.m.diff b/cordova-lib/spec-plugman/plugins/WebNotifications/src/ios/AppDelegate.m.diff
deleted file mode 100644
index 754d079..0000000
--- a/cordova-lib/spec-plugman/plugins/WebNotifications/src/ios/AppDelegate.m.diff
+++ /dev/null
@@ -1,18 +0,0 @@
-- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
-{
-    // Note: if app wasn't running, you can still get a LN and then it doesn't call this function,
-    // I think it calls app start but notifies you that LN caused the app start or something like that.
-    
-    //UIApplicationState state = [application applicationState];
-    //BOOL wasForeground = (state == UIApplicationStateActive);
-    
-    //NSString *title = [notification.userInfo objectForKey:@"title"];
-    //NSString *body = [notification.userInfo objectForKey:@"body"];
-    NSString *tag = [notification.userInfo objectForKey:@"tag"];
-    
-    [(WebNotifications*)[self.viewController getCommandInstance:@"WebNotifications"] clickNotification:tag];
-    
-    application.applicationIconBadgeNumber = 0;
-    application.scheduledLocalNotifications = [NSArray arrayWithArray:application.scheduledLocalNotifications]; // "hack" to clear seen notifications
-}
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/WebNotifications/src/ios/WebNotifications.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WebNotifications/src/ios/WebNotifications.h b/cordova-lib/spec-plugman/plugins/WebNotifications/src/ios/WebNotifications.h
deleted file mode 100644
index 1702f40..0000000
--- a/cordova-lib/spec-plugman/plugins/WebNotifications/src/ios/WebNotifications.h
+++ /dev/null
@@ -1,35 +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.
- */
-
-#import <Foundation/Foundation.h>
-#import <Cordova/CDVPlugin.h>
-
-@interface WebNotifications : CDVPlugin {
-}
-
-@property (nonatomic, strong) NSMutableArray* activeNotifications;
-
-- (CDVPlugin*)initWithWebView:(UIWebView*)theWebView;
-
-- (void)createNotification:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
-- (void)closeNotification:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
-
-- (void)clickNotification:(NSString*)tag;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/WebNotifications/src/ios/WebNotifications.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WebNotifications/src/ios/WebNotifications.m b/cordova-lib/spec-plugman/plugins/WebNotifications/src/ios/WebNotifications.m
deleted file mode 100644
index 6f0c11f..0000000
--- a/cordova-lib/spec-plugman/plugins/WebNotifications/src/ios/WebNotifications.m
+++ /dev/null
@@ -1,124 +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.
- */
-
-#define Log(fmt, ...) NSLog((@"%d: %s " fmt), __LINE__, __PRETTY_FUNCTION__, ##__VA_ARGS__);
-
-#import "WebNotifications.h"
-#import "MainViewController.h"
-
-@implementation WebNotifications
-
-@synthesize activeNotifications;
-
-- (CDVPlugin*)initWithWebView:(UIWebView*)theWebView
-{
-    self = [super init];
-    if (self) {
-        self.activeNotifications = [NSMutableArray array];
-    }
-    return self;
-}
-
-- (void)createNotification:(CDVInvokedUrlCommand*)command
-{
-    NSDictionary* options = [command.arguments objectAtIndex:0];
-
-    // w3c options:
-	NSString *title = [options objectForKey:@"title"];
-	NSString *body = [options objectForKey:@"body"];
-	NSString *tag = [options objectForKey:@"tag"];
-    //NSString *iconUrl = [options objectForKey:@"iconUrl"]; // Not supported
-    
-    // cordova option extensions:
-    NSUInteger delay = [[options objectForKey:@"delay"] unsignedIntegerValue];
-    NSString *soundUrl = [options objectForKey:@"soundUrl"];
-    NSInteger badgeNumber = [[options objectForKey:@"badgeNumber"] intValue];
-    
-    Log(@"addNotification title: %@  body: %@  tag: %@  delay: %u  badge: %u", title, body, tag, delay, badgeNumber);
-    
-    //NSString *action = [options objectForKey:@"action"];
-    //bool hasAction = ([[options objectForKey:@"hasAction"] intValue] == 1) ? YES : NO;
-    //alertAction
-    
-	UILocalNotification *notif = [[UILocalNotification alloc] init];
-	notif.alertBody = [NSString stringWithFormat:@"[%@] %@: %@", tag, title, body];
-    notif.timeZone = [NSTimeZone defaultTimeZone];
-    
-    notif.soundName = soundUrl;
-    notif.applicationIconBadgeNumber = badgeNumber;
-	
-	NSDictionary *userDict = [NSDictionary dictionaryWithObjectsAndKeys:title,@"title",body,@"body",tag,@"tag",nil];
-    notif.userInfo = userDict;
-	
-    if (delay != 0) {
-        notif.fireDate = [[NSDate date] addTimeInterval:delay];
-        //notif.repeatInterval = [[repeatDict objectForKey: repeat] intValue];
-        
-        [[UIApplication sharedApplication] scheduleLocalNotification:notif];
-    } else {
-        [[UIApplication sharedApplication] presentLocalNotificationNow:notif];
-    }
-    
-    [self.activeNotifications addObject:notif];
-}
-
-- (void)closeNotification:(CDVInvokedUrlCommand*)command
-{
-//    command.callbackId;
-    NSDictionary* options = [command.arguments objectAtIndex:0];
-    NSString *tag = [options objectForKey:@"tag"];
-
-    NSArray *notifications = [[UIApplication sharedApplication] scheduledLocalNotifications];
-    for (UILocalNotification *notification in notifications) {
-        if ([[notification.userInfo objectForKey:@"tag"] isEqualToString:tag]) {
-            Log(@"Cancelling notification with tag: %@", tag);
-            [[UIApplication sharedApplication] cancelLocalNotification:notification];
-            [self.activeNotifications removeObject:notification];
-            [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:0] callbackId:command.callbackId];
-        }
-    }
-    [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:0] callbackId:command.callbackId];
-}
-
-- (void)clickNotification:(NSString*)tag {
-    NSString *jsCallBack;
-    
-    jsCallBack = [NSString stringWithFormat:@"window.Notification.callOnclickByTag('%@')", tag];
-    [((CDVViewController*)self.viewController).webView stringByEvaluatingJavaScriptFromString:jsCallBack];
-    
-    NSArray *scheduledNotifications = [[UIApplication sharedApplication] scheduledLocalNotifications];
-    NSMutableArray *toDiscard = [NSMutableArray array];
-    for (UILocalNotification *notification in self.activeNotifications) {
-        if (![scheduledNotifications containsObject:notification]) {
-            // This notification is active, but no longer scheduled, so it must be displayed
-            jsCallBack = [NSString stringWithFormat:@"window.Notification.callOncloseByTag('%@')", [notification.userInfo objectForKey:@"tag"]];
-            [((CDVViewController*)self.viewController).webView stringByEvaluatingJavaScriptFromString:jsCallBack];
-            [toDiscard addObject:notification];
-        }
-    }
-    [self.activeNotifications removeObjectsInArray:toDiscard];
-}
-
-/*
-- (void)cancelAllNotifications:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options {
-	[[UIApplication sharedApplication] cancelAllLocalNotifications];
-}
-*/
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/WebNotifications/www/webnotifications.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WebNotifications/www/webnotifications.js b/cordova-lib/spec-plugman/plugins/WebNotifications/www/webnotifications.js
deleted file mode 100644
index 6597337..0000000
--- a/cordova-lib/spec-plugman/plugins/WebNotifications/www/webnotifications.js
+++ /dev/null
@@ -1,123 +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.
- */
-
-/*
- * The W3C window.Notification API: http://www.w3.org/TR/notifications/
- */
-if (typeof window.Notification == 'undefined') {
-
-    /**
-     * Creates and shows a new notification.
-     * @param title
-     * @param options
-     */
-    window.Notification = function(title, options) {
-        options = options || {};
-
-        this.title = title || 'defaultTitle';
-
-        // w3c options:
-        this.body = options.body || '';
-        this.tag = options.tag || 'defaultTag';
-        this.iconUrl = options.iconUrl || '';
-        // titleDir, bodyDir are not supported
-
-        // cordova option extensions:
-        this.delay = options.delay || 0;
-        this.soundUrl = options.soundUrl || '';
-        this.badgeNumber = options.badgeNumber || 0;
-
-        // there must be one unique notification per tag, so close any existing outstanding notifications
-        if (window.Notification.active[this.tag])
-            window.Notification.active[this.tag].close();
-        window.Notification.active[this.tag] = this;
-
-        // Spec claims these must be defined
-        this.onclick = options.onclick;
-        this.onerror = options.onerror;
-        this.onclose = options.onclose;
-        this.onshow = options.onshow;
-        if (this.onshow) {
-            console.log("Warning, WebNotifications plugin will never call onshow"); // this may change on other platforms
-        }
-
-        var self = this;
-        cordova.exec(null, function(error) {
-            if (self.onerror) {
-                self.onerror(error);
-            }
-        }, 'WebNotifications', 'createNotification', [{
-            tag: this.tag,
-            title: this.title,
-            body: this.body,
-            delay: this.delay,
-        }]);
-    };
-
-    // TODO: change name to something internal looking?
-    window.Notification.permission = 'granted';
-
-    window.Notification.requestPermission = function(callback) {
-        setTimeout(function() {
-            callback(window.Notification.permission);
-        }, 0);
-    };
-
-    // Not part of the W3C API. Used by the native side to call onclick handlers.
-    // TODO: change name to something internal looking?
-    window.Notification.callOnclickByTag = function(tag) {
-        var notification = window.Notification.active[tag];
-        if (notification && notification.onclick && typeof notification.onclick == 'function') {
-            notification.onclick(tag);
-        }
-        delete window.Notification.active[tag];
-    };
-
-    window.Notification.callOncloseByTag = function(tag) {
-        var notification = window.Notification.active[tag];
-        if (notification && notification.onclose && typeof notification.onclose == 'function') {
-            notification.onclose(tag);
-        }
-        delete window.Notification.active[tag];
-    };
-
-    // A global map of notifications by tag, so their onclick callbacks can be called.
-    // TODO: change name to something internal looking?
-    window.Notification.active = {};
-
-    /**
-     * Dismiss a notification.
-     */
-    window.Notification.prototype.close = function() {
-        var self = this;
-        cordova.exec(function() {
-            if (self.onclose) {
-                self.onclose();
-            }
-            delete window.Notification[self.tag];
-        }, function(error) {
-            if (self.onerror) {
-                self.onerror(error);
-            }
-            delete window.Notification[self.tag];
-        }, 'WebNotifications', 'closeNotification', [{
-            tag: this.tag,
-        }]);
-    };
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/WeblessPlugin/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/plugin.xml b/cordova-lib/spec-plugman/plugins/WeblessPlugin/plugin.xml
deleted file mode 100644
index 5522d22..0000000
--- a/cordova-lib/spec-plugman/plugins/WeblessPlugin/plugin.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="com.phonegap.plugins.weblessplugin"
-    version="0.6.0">
-
-    <name>Webless Plugin</name>
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-        <access origin="s3.amazonaws.com" />
-    </config-file>
-	
-    <!-- android -->
-    <platform name="android">
-        <config-file target="AndroidManifest.xml" parent="/manifest/application">
-            <activity android:name="com.phonegap.plugins.weblessplugin.WeblessPlugin"
-                      android:label="@string/app_name">
-                <intent-filter>
-                </intent-filter>
-            </activity>
-        </config-file>
-
-        <!-- CDV < 2.0 -->
-        <config-file target="res/xml/plugins.xml" parent="/plugins">
-            <plugin name="WeblessPlugin"
-                value="com.phonegap.plugins.weblessplugin.WeblessPlugin"/>
-        </config-file>
-
-        <!-- CDV 2.0+ (for now) -->
-        <config-file target="res/xml/config.xml" parent="/cordova/plugins">
-            <plugin name="WeblessPlugin"
-                value="com.phonegap.plugins.weblessplugin.WeblessPlugin"/>
-        </config-file>
-
-        <source-file src="src/android/WeblessPlugin.java"
-                target-dir="src/com/phonegap/plugins/weblessplugin" />
-    </platform>
-
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV < 2.4 -->
-        <plugins-plist key="com.phonegap.plugins.weblessplugin"
-            string="WeblessPluginCommand" />
-        <!-- CDV 2.4 had a /cordova/plugins instead of /widget/plugins so ignored! -->
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="/widget/plugins">
-            <plugin name="WeblessPlugin"
-                value="WeblessPluginCommand"/>
-        </config-file>
-
-        <resource-file src="src/ios/WeblessPlugin.bundle" />
-        <resource-file src="src/ios/WeblessPluginViewController.xib" />
-
-        <header-file src="src/ios/WeblessPluginCommand.h" />
-        <header-file src="src/ios/WeblessPluginViewController.h" />
-
-        <source-file src="src/ios/WeblessPluginCommand.m" />
-        <source-file src="src/ios/WeblessPluginViewController.m" />
-
-        <!-- framework for testing (not actual dependency of WeblessPlugin -->
-        <framework src="libsqlite3.dylib" />
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/android/WeblessPlugin.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/android/WeblessPlugin.java b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/android/WeblessPlugin.java
deleted file mode 100644
index 5263b0c..0000000
--- a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/android/WeblessPlugin.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_left.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_left.png b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_left.png
deleted file mode 100644
index 530e12b..0000000
Binary files a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_left.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_left@2x.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_left@2x.png b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_left@2x.png
deleted file mode 100644
index 530e12b..0000000
Binary files a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_left@2x.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_right.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_right.png b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_right.png
deleted file mode 100644
index 8b3d855..0000000
Binary files a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_right.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_right@2x.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_right@2x.png b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_right@2x.png
deleted file mode 100644
index 8b3d855..0000000
Binary files a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_right@2x.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/but_refresh.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/but_refresh.png b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/but_refresh.png
deleted file mode 100644
index 309b6bd..0000000
Binary files a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/but_refresh.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/but_refresh@2x.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/but_refresh@2x.png b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/but_refresh@2x.png
deleted file mode 100644
index 309b6bd..0000000
Binary files a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/but_refresh@2x.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/compass.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/compass.png b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/compass.png
deleted file mode 100644
index 46a8901..0000000
Binary files a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/compass.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/compass@2x.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/compass@2x.png b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/compass@2x.png
deleted file mode 100644
index 46a8901..0000000
Binary files a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/compass@2x.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginCommand.h b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginCommand.h
deleted file mode 100644
index 6a23ab6..0000000
--- a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginCommand.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-
-//
-//  PhoneGap ! ChildBrowserCommand
-//
-//
-//  Created by Jesse MacFadyen on 10-05-29.
-//  Copyright 2010 Nitobi. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#ifdef PHONEGAP_FRAMEWORK
-	#import <PhoneGap/PGPlugin.h>
-#else
-	#import "PGPlugin.h"
-#endif
-#import "ChildBrowserViewController.h"
-
-
-
-@interface ChildBrowserCommand : PGPlugin <ChildBrowserDelegate>  {
-
-	ChildBrowserViewController* childBrowser;
-}
-
-@property (nonatomic, retain) ChildBrowserViewController *childBrowser;
-
-
-- (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
--(void) onChildLocationChange:(NSString*)newLoc;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginCommand.m b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginCommand.m
deleted file mode 100644
index 38aaf64..0000000
--- a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginCommand.m
+++ /dev/null
@@ -1,86 +0,0 @@
-//
-
-// 
-//
-//  Created by Jesse MacFadyen on 10-05-29.
-//  Copyright 2010 Nitobi. All rights reserved.
-//  Copyright (c) 2011, IBM Corporation
-//  Copyright 2011, Randy McMillan
-//
-
-#import "ChildBrowserCommand.h"
-
-#ifdef PHONEGAP_FRAMEWORK
-	#import <PhoneGap/PhoneGapViewController.h>
-#else
-	#import "PhoneGapViewController.h"
-#endif
-
-
-@implementation ChildBrowserCommand
-
-@synthesize childBrowser;
-
-- (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options // args: url
-{	
-	
-    if(childBrowser == NULL)
-	{
-		childBrowser = [[ ChildBrowserViewController alloc ] initWithScale:FALSE ];
-		childBrowser.delegate = self;
-	}
-	
-/* // TODO: Work in progress
-	NSString* strOrientations = [ options objectForKey:@"supportedOrientations"];
-	NSArray* supportedOrientations = [strOrientations componentsSeparatedByString:@","];
-*/
-    PhoneGapViewController* cont = (PhoneGapViewController*)[ super appViewController ];
-    childBrowser.supportedOrientations = cont.supportedOrientations;
-    
-    if ([cont respondsToSelector:@selector(presentViewController)]) {
-        //Reference UIViewController.h Line:179 for update to iOS 5 difference - @RandyMcMillan
-        [cont presentViewController:childBrowser animated:YES completion:nil];        
-    } else {
-        [ cont presentModalViewController:childBrowser animated:YES ];
-    }                 
-        
-    NSString *url = (NSString*) [arguments objectAtIndex:0];
-        
-    [childBrowser loadURL:url  ];
-        
-}
-
--(void) close:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options // args: url
-{
-    [ childBrowser closeBrowser];
-	
-}
-
--(void) onClose
-{
-	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onClose();",@""];
-	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
-}
-
--(void) onOpenInSafari
-{
-	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onOpenExternal();",@""];
-	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
-}
-
-
--(void) onChildLocationChange:(NSString*)newLoc
-{
-	
-	NSString* tempLoc = [NSString stringWithFormat:@"%@",newLoc];
-	NSString* encUrl = [tempLoc stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
-	 
-	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onLocationChange('%@');",encUrl];
-	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
-
-}
-
-
-
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.h b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.h
deleted file mode 100644
index d6fc139..0000000
--- a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-
-//
-//  ChildBrowserViewController.h
-//
-//  Created by Jesse MacFadyen on 21/07/09.
-//  Copyright 2009 Nitobi. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-@protocol ChildBrowserDelegate<NSObject>
-
-
-
-/*
- *  onChildLocationChanging:newLoc
- *  
- *  Discussion:
- *    Invoked when a new page has loaded
- */
--(void) onChildLocationChange:(NSString*)newLoc;
--(void) onOpenInSafari;
--(void) onClose;
-@end
-
-
-@interface ChildBrowserViewController : UIViewController < UIWebViewDelegate > {
-	IBOutlet UIWebView* webView;
-	IBOutlet UIBarButtonItem* closeBtn;
-	IBOutlet UIBarButtonItem* refreshBtn;
-	IBOutlet UILabel* addressLabel;
-	IBOutlet UIBarButtonItem* backBtn;
-	IBOutlet UIBarButtonItem* fwdBtn;
-	IBOutlet UIBarButtonItem* safariBtn;
-	IBOutlet UIActivityIndicatorView* spinner;
-	BOOL scaleEnabled;
-	BOOL isImage;
-	NSString* imageURL;
-	NSArray* supportedOrientations;
-	id <ChildBrowserDelegate> delegate;
-}
-
-@property (nonatomic, retain)id <ChildBrowserDelegate> delegate;
-@property (nonatomic, retain) 	NSArray* supportedOrientations;
-@property(retain) NSString* imageURL;
-@property(assign) BOOL isImage;
-
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation; 
-- (ChildBrowserViewController*)initWithScale:(BOOL)enabled;
-- (IBAction)onDoneButtonPress:(id)sender;
-- (IBAction)onSafariButtonPress:(id)sender;
-- (void)loadURL:(NSString*)url;
--(void)closeBrowser;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.m b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.m
deleted file mode 100644
index 167ef98..0000000
--- a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.m
+++ /dev/null
@@ -1,239 +0,0 @@
-//
-//  ChildBrowserViewController.m
-//
-//  Created by Jesse MacFadyen on 21/07/09.
-//  Copyright 2009 Nitobi. All rights reserved.
-//  Copyright (c) 2011, IBM Corporation
-//  Copyright 2011, Randy McMillan
-//
-
-#import "ChildBrowserViewController.h"
-
-
-@implementation ChildBrowserViewController
-
-@synthesize imageURL;
-@synthesize supportedOrientations;
-@synthesize isImage;
-@synthesize delegate;
-
-/*
- // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
-- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
-    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
-        // Custom initialization
-    }
-    return self;
-}
-*/
-
-+ (NSString*) resolveImageResource:(NSString*)resource
-{
-	NSString* systemVersion = [[UIDevice currentDevice] systemVersion];
-	BOOL isLessThaniOS4 = ([systemVersion compare:@"4.0" options:NSNumericSearch] == NSOrderedAscending);
-	
-	// the iPad image (nor retina) differentiation code was not in 3.x, and we have to explicitly set the path
-	if (isLessThaniOS4)
-	{
-        return [NSString stringWithFormat:@"%@.png", resource];
-	}
-	
-	return resource;
-}
-
-
-- (ChildBrowserViewController*)initWithScale:(BOOL)enabled
-{
-    self = [super init];
-	
-	
-	scaleEnabled = enabled;
-	
-	return self;	
-}
-
-// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    
-	refreshBtn.image = [UIImage imageNamed:[[self class] resolveImageResource:@"ChildBrowser.bundle/but_refresh"]];
-	backBtn.image = [UIImage imageNamed:[[self class] resolveImageResource:@"ChildBrowser.bundle/arrow_left"]];
-	fwdBtn.image = [UIImage imageNamed:[[self class] resolveImageResource:@"ChildBrowser.bundle/arrow_right"]];
-	safariBtn.image = [UIImage imageNamed:[[self class] resolveImageResource:@"ChildBrowser.bundle/compass"]];
-
-	webView.delegate = self;
-	webView.scalesPageToFit = TRUE;
-	webView.backgroundColor = [UIColor whiteColor];
-	NSLog(@"View did load");
-}
-
-
-
-
-
-- (void)didReceiveMemoryWarning {
-	// Releases the view if it doesn't have a superview.
-    [super didReceiveMemoryWarning];
-	
-	// Release any cached data, images, etc that aren't in use.
-}
-
-- (void)viewDidUnload {
-	// Release any retained subviews of the main view.
-	// e.g. self.myOutlet = nil;
-	NSLog(@"View did UN-load");
-}
-
-
-- (void)dealloc {
-
-	webView.delegate = nil;
-	
-	[webView release];
-	[closeBtn release];
-	[refreshBtn release];
-	[addressLabel release];
-	[backBtn release];
-	[fwdBtn release];
-	[safariBtn release];
-	[spinner release];
-	[ supportedOrientations release];
-	[super dealloc];
-}
-
--(void)closeBrowser
-{
-	
-	if(delegate != NULL)
-	{
-		[delegate onClose];		
-	}
-    if ([self respondsToSelector:@selector(presentingViewController)]) { 
-        //Reference UIViewController.h Line:179 for update to iOS 5 difference - @RandyMcMillan
-        [[self presentingViewController] dismissViewControllerAnimated:YES completion:nil];
-    } else {
-        [[self parentViewController] dismissModalViewControllerAnimated:YES];
-    }
-}
-
--(IBAction) onDoneButtonPress:(id)sender
-{
-	[ self closeBrowser];
-
-    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]];
-    [webView loadRequest:request];
-}
-
-
--(IBAction) onSafariButtonPress:(id)sender
-{
-	
-	if(delegate != NULL)
-	{
-		[delegate onOpenInSafari];		
-	}
-	
-	if(isImage)
-	{
-		NSURL* pURL = [[ [NSURL alloc] initWithString:imageURL ] autorelease];
-		[ [ UIApplication sharedApplication ] openURL:pURL  ];
-	}
-	else
-	{
-		NSURLRequest *request = webView.request;
-		[[UIApplication sharedApplication] openURL:request.URL];
-	}
-
-	 
-}
-
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation 
-{
-	BOOL autoRotate = [self.supportedOrientations count] > 1; // autorotate if only more than 1 orientation supported
-	if (autoRotate)
-	{
-		if ([self.supportedOrientations containsObject:
-			 [NSNumber numberWithInt:interfaceOrientation]]) {
-			return YES;
-		}
-    }
-	
-	return NO;
-}
-
-
-
-
-- (void)loadURL:(NSString*)url
-{
-	NSLog(@"Opening Url : %@",url);
-	 
-	if( [url hasSuffix:@".png" ]  || 
-	    [url hasSuffix:@".jpg" ]  || 
-		[url hasSuffix:@".jpeg" ] || 
-		[url hasSuffix:@".bmp" ]  || 
-		[url hasSuffix:@".gif" ]  )
-	{
-		[ imageURL release ];
-		imageURL = [url copy];
-		isImage = YES;
-		NSString* htmlText = @"<html><body style='background-color:#333;margin:0px;padding:0px;'><img style='min-height:200px;margin:0px;padding:0px;width:100%;height:auto;' alt='' src='IMGSRC'/></body></html>";
-		htmlText = [ htmlText stringByReplacingOccurrencesOfString:@"IMGSRC" withString:url ];
-
-		[webView loadHTMLString:htmlText baseURL:[NSURL URLWithString:@""]];
-		
-	}
-	else
-	{
-		imageURL = @"";
-		isImage = NO;
-		NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:url]];
-		[webView loadRequest:request];
-	}
-	webView.hidden = NO;
-}
-
-
-- (void)webViewDidStartLoad:(UIWebView *)sender {
-	addressLabel.text = @"Loading...";
-	backBtn.enabled = webView.canGoBack;
-	fwdBtn.enabled = webView.canGoForward;
-	
-	[ spinner startAnimating ];
-	
-}
-
-- (void)webViewDidFinishLoad:(UIWebView *)sender 
-{
-	NSURLRequest *request = webView.request;
-	NSLog(@"New Address is : %@",request.URL.absoluteString);
-	addressLabel.text = request.URL.absoluteString;
-	backBtn.enabled = webView.canGoBack;
-	fwdBtn.enabled = webView.canGoForward;
-	[ spinner stopAnimating ];
-	
-	if(delegate != NULL)
-	{
-		[delegate onChildLocationChange:request.URL.absoluteString];		
-	}
-
-}
-
-- (void)webView:(UIWebView *)wv didFailLoadWithError:(NSError *)error {
-    NSLog (@"webView:didFailLoadWithError");
-    [spinner stopAnimating];
-    addressLabel.text = @"Failed";
-    if (error != NULL) {
-        UIAlertView *errorAlert = [[UIAlertView alloc]
-                                   initWithTitle: [error localizedDescription]
-                                   message: [error localizedFailureReason]
-                                   delegate:nil
-                                   cancelButtonTitle:@"OK"
-                                   otherButtonTitles:nil];
-        [errorAlert show];
-        [errorAlert release];
-    }
-}
-
-
-@end


[29/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/ios-plist/SampleApp.xcodeproj/project.orig.pbxproj
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/ios-plist/SampleApp.xcodeproj/project.orig.pbxproj b/cordova-lib/spec-plugman/projects/ios-plist/SampleApp.xcodeproj/project.orig.pbxproj
new file mode 100644
index 0000000..a4d87f9
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/ios-plist/SampleApp.xcodeproj/project.orig.pbxproj
@@ -0,0 +1,498 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A463F14DB0A1B007FEAC7 /* Foundation.framework */; };
+		571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464114DB0A1B007FEAC7 /* UIKit.framework */; };
+		571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */; };
+		571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464514DB0A1B007FEAC7 /* AddressBook.framework */; };
+		571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */; };
+		571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */; };
+		571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */; };
+		571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */; };
+		571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */; };
+		571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465114DB0A1B007FEAC7 /* QuartzCore.framework */; };
+		571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */; };
+		571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */; };
+		571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465714DB0A1B007FEAC7 /* CoreMedia.framework */; };
+		571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */; };
+		571A466014DB0A1B007FEAC7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A465F14DB0A1B007FEAC7 /* main.m */; };
+		571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A466214DB0A1B007FEAC7 /* PhoneGap.framework */; };
+		571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466614DB0A1B007FEAC7 /* Localizable.strings */; };
+		571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466A14DB0A1B007FEAC7 /* Localizable.strings */; };
+		571A466F14DB0A1B007FEAC7 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A466E14DB0A1B007FEAC7 /* icon.png */; };
+		571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467014DB0A1B007FEAC7 /* icon@2x.png */; };
+		571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467214DB0A1B007FEAC7 /* icon-72.png */; };
+		571A467614DB0A1B007FEAC7 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467514DB0A1B007FEAC7 /* Default.png */; };
+		571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467714DB0A1B007FEAC7 /* Default@2x.png */; };
+		571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 571A467914DB0A1B007FEAC7 /* Capture.bundle */; };
+		571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */ = {isa = PBXBuildFile; fileRef = 571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */; };
+		571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A467F14DB0A1B007FEAC7 /* AppDelegate.m */; };
+		571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A468214DB0A1B007FEAC7 /* MainViewController.m */; };
+		571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 571A468414DB0A1B007FEAC7 /* MainViewController.xib */; };
+		577FC36614DB0B620082BA7B /* www in Resources */ = {isa = PBXBuildFile; fileRef = 577FC36514DB0B620082BA7B /* www */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		571A463B14DB0A1B007FEAC7 /* ChildApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChildApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		571A463F14DB0A1B007FEAC7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+		571A464114DB0A1B007FEAC7 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+		571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+		571A464514DB0A1B007FEAC7 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
+		571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
+		571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
+		571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
+		571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
+		571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
+		571A465114DB0A1B007FEAC7 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
+		571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
+		571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
+		571A465714DB0A1B007FEAC7 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
+		571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ChildApp-Info.plist"; sourceTree = "<group>"; };
+		571A465D14DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		571A465F14DB0A1B007FEAC7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+		571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ChildApp-Prefix.pch"; sourceTree = "<group>"; };
+		571A466214DB0A1B007FEAC7 /* PhoneGap.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PhoneGap.framework; path = /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework; sourceTree = "<absolute>"; };
+		571A466714DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/Localizable.strings; sourceTree = "<group>"; };
+		571A466B14DB0A1B007FEAC7 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Resources/es.lproj/Localizable.strings; sourceTree = "<group>"; };
+		571A466E14DB0A1B007FEAC7 /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon.png; path = Resources/icons/icon.png; sourceTree = "<group>"; };
+		571A467014DB0A1B007FEAC7 /* icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon@2x.png"; path = "Resources/icons/icon@2x.png"; sourceTree = "<group>"; };
+		571A467214DB0A1B007FEAC7 /* icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon-72.png"; path = "Resources/icons/icon-72.png"; sourceTree = "<group>"; };
+		571A467514DB0A1B007FEAC7 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/splash/Default.png; sourceTree = "<group>"; };
+		571A467714DB0A1B007FEAC7 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "Resources/splash/Default@2x.png"; sourceTree = "<group>"; };
+		571A467914DB0A1B007FEAC7 /* Capture.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Capture.bundle; path = Resources/Capture.bundle; sourceTree = "<group>"; };
+		571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = PhoneGap.plist; sourceTree = "<group>"; };
+		571A467E14DB0A1B007FEAC7 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Classes/AppDelegate.h; sourceTree = "<group>"; };
+		571A467F14DB0A1B007FEAC7 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Classes/AppDelegate.m; sourceTree = "<group>"; };
+		571A468114DB0A1B007FEAC7 /* MainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainViewController.h; path = Classes/MainViewController.h; sourceTree = "<group>"; };
+		571A468214DB0A1B007FEAC7 /* MainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = Classes/MainViewController.m; sourceTree = "<group>"; };
+		571A468414DB0A1B007FEAC7 /* MainViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainViewController.xib; path = Classes/MainViewController.xib; sourceTree = "<group>"; };
+		571A468714DB0A1B007FEAC7 /* README */ = {isa = PBXFileReference; lastKnownFileType = text; name = README; path = Plugins/README; sourceTree = "<group>"; };
+		577FC36514DB0B620082BA7B /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		571A463514DB0A1B007FEAC7 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */,
+				571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */,
+				571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */,
+				571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */,
+				571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */,
+				571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */,
+				571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */,
+				571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */,
+				571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */,
+				571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */,
+				571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */,
+				571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */,
+				571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */,
+				571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		571A463814DB0A1B007FEAC7 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		571A462D14DB0A1A007FEAC7 = {
+			isa = PBXGroup;
+			children = (
+				577FC36514DB0B620082BA7B /* www */,
+				571A465914DB0A1B007FEAC7 /* ChildApp */,
+				571A463E14DB0A1B007FEAC7 /* Frameworks */,
+				571A463C14DB0A1B007FEAC7 /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		571A463C14DB0A1B007FEAC7 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				571A463B14DB0A1B007FEAC7 /* ChildApp.app */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		571A463E14DB0A1B007FEAC7 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				571A463F14DB0A1B007FEAC7 /* Foundation.framework */,
+				571A464114DB0A1B007FEAC7 /* UIKit.framework */,
+				571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */,
+				571A464514DB0A1B007FEAC7 /* AddressBook.framework */,
+				571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */,
+				571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */,
+				571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */,
+				571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */,
+				571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */,
+				571A465114DB0A1B007FEAC7 /* QuartzCore.framework */,
+				571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */,
+				571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */,
+				571A465714DB0A1B007FEAC7 /* CoreMedia.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		571A465914DB0A1B007FEAC7 /* ChildApp */ = {
+			isa = PBXGroup;
+			children = (
+				571A466214DB0A1B007FEAC7 /* PhoneGap.framework */,
+				571A466414DB0A1B007FEAC7 /* Resources */,
+				571A467D14DB0A1B007FEAC7 /* Classes */,
+				571A468614DB0A1B007FEAC7 /* Plugins */,
+				571A465A14DB0A1B007FEAC7 /* Supporting Files */,
+			);
+			path = ChildApp;
+			sourceTree = "<group>";
+		};
+		571A465A14DB0A1B007FEAC7 /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */,
+				571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */,
+				571A465F14DB0A1B007FEAC7 /* main.m */,
+				571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */,
+				571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */,
+				571A468414DB0A1B007FEAC7 /* MainViewController.xib */,
+			);
+			name = "Supporting Files";
+			sourceTree = "<group>";
+		};
+		571A466414DB0A1B007FEAC7 /* Resources */ = {
+			isa = PBXGroup;
+			children = (
+				571A467914DB0A1B007FEAC7 /* Capture.bundle */,
+				571A466514DB0A1B007FEAC7 /* en.lproj */,
+				571A466914DB0A1B007FEAC7 /* es.lproj */,
+				571A466D14DB0A1B007FEAC7 /* icons */,
+				571A467414DB0A1B007FEAC7 /* splash */,
+			);
+			name = Resources;
+			sourceTree = "<group>";
+		};
+		571A466514DB0A1B007FEAC7 /* en.lproj */ = {
+			isa = PBXGroup;
+			children = (
+				571A466614DB0A1B007FEAC7 /* Localizable.strings */,
+			);
+			name = en.lproj;
+			sourceTree = "<group>";
+		};
+		571A466914DB0A1B007FEAC7 /* es.lproj */ = {
+			isa = PBXGroup;
+			children = (
+				571A466A14DB0A1B007FEAC7 /* Localizable.strings */,
+			);
+			name = es.lproj;
+			sourceTree = "<group>";
+		};
+		571A466D14DB0A1B007FEAC7 /* icons */ = {
+			isa = PBXGroup;
+			children = (
+				571A466E14DB0A1B007FEAC7 /* icon.png */,
+				571A467014DB0A1B007FEAC7 /* icon@2x.png */,
+				571A467214DB0A1B007FEAC7 /* icon-72.png */,
+			);
+			name = icons;
+			sourceTree = "<group>";
+		};
+		571A467414DB0A1B007FEAC7 /* splash */ = {
+			isa = PBXGroup;
+			children = (
+				571A467514DB0A1B007FEAC7 /* Default.png */,
+				571A467714DB0A1B007FEAC7 /* Default@2x.png */,
+			);
+			name = splash;
+			sourceTree = "<group>";
+		};
+		571A467D14DB0A1B007FEAC7 /* Classes */ = {
+			isa = PBXGroup;
+			children = (
+				571A467E14DB0A1B007FEAC7 /* AppDelegate.h */,
+				571A467F14DB0A1B007FEAC7 /* AppDelegate.m */,
+				571A468114DB0A1B007FEAC7 /* MainViewController.h */,
+				571A468214DB0A1B007FEAC7 /* MainViewController.m */,
+			);
+			name = Classes;
+			sourceTree = "<group>";
+		};
+		571A468614DB0A1B007FEAC7 /* Plugins */ = {
+			isa = PBXGroup;
+			children = (
+				571A468714DB0A1B007FEAC7 /* README */,
+			);
+			name = Plugins;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		571A463A14DB0A1B007FEAC7 /* ChildApp */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */;
+			buildPhases = (
+				571A463414DB0A1B007FEAC7 /* Sources */,
+				571A463514DB0A1B007FEAC7 /* Frameworks */,
+				571A463614DB0A1B007FEAC7 /* Resources */,
+				571A463714DB0A1B007FEAC7 /* Sources */,
+				571A463814DB0A1B007FEAC7 /* Frameworks */,
+				571A463914DB0A1B007FEAC7 /* ShellScript */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = ChildApp;
+			productName = ChildApp;
+			productReference = 571A463B14DB0A1B007FEAC7 /* ChildApp.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		571A462F14DB0A1A007FEAC7 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0420;
+			};
+			buildConfigurationList = 571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				es,
+			);
+			mainGroup = 571A462D14DB0A1A007FEAC7;
+			productRefGroup = 571A463C14DB0A1B007FEAC7 /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				571A463A14DB0A1B007FEAC7 /* ChildApp */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		571A463614DB0A1B007FEAC7 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */,
+				571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */,
+				571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */,
+				571A466F14DB0A1B007FEAC7 /* icon.png in Resources */,
+				571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */,
+				571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */,
+				571A467614DB0A1B007FEAC7 /* Default.png in Resources */,
+				571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */,
+				571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */,
+				571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */,
+				571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */,
+				577FC36614DB0B620082BA7B /* www in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		571A463914DB0A1B007FEAC7 /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/bash;
+			shellScript = "\n\t\t\t\t\t\t\t\tif [ ! -d \"$PROJECT_DIR/www\" ] ; then\n\t\t\t\t\t\t\t\t\tcp -R /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework/www \"$PROJECT_DIR\"\n\t\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\t\t# detect www folder reference in project, if missing, print warning\n\t\t\t\t\t\t\t\tgrep \"{isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = \\\"<group>\\\"; };\" \"$PROJECT_DIR/$PROJECT_NAME.xcodeproj/project.pbxproj\"\n\t\t\t\t\t\t\t\trc=$? \n\t\t\t\t\t\t\t\tif [ $rc != 0 ] ; then\n\t\t\t\t\t\t\t\techo -e \"warning: Missing - Add $PROJECT_DIR/www as a folder reference in your project. Just drag and drop the folder into your project, into the Project Navigator of Xcode 4. Make sure you select the second radio-button: 'Create folder references for any added folders' (which will create a blue folder)\" 1>&2\n\t\t\t\t\t\t\t\tfi\t\t\t\t\t\t\t";
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		571A463414DB0A1B007FEAC7 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				571A466014DB0A1B007FEAC7 /* main.m in Sources */,
+				571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */,
+				571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		571A463714DB0A1B007FEAC7 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+		571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				571A465D14DB0A1B007FEAC7 /* en */,
+			);
+			name = InfoPlist.strings;
+			sourceTree = "<group>";
+		};
+		571A466614DB0A1B007FEAC7 /* Localizable.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				571A466714DB0A1B007FEAC7 /* en */,
+			);
+			name = Localizable.strings;
+			sourceTree = "<group>";
+		};
+		571A466A14DB0A1B007FEAC7 /* Localizable.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				571A466B14DB0A1B007FEAC7 /* es */,
+			);
+			name = Localizable.strings;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		571A468814DB0A1B007FEAC7 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+				CLANG_ENABLE_OBJC_ARC = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_VERSION = com.apple.compilers.llvmgcc42;
+				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
+				SDKROOT = iphoneos;
+			};
+			name = Debug;
+		};
+		571A468914DB0A1B007FEAC7 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+				CLANG_ENABLE_OBJC_ARC = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_VERSION = com.apple.compilers.llvmgcc42;
+				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
+				SDKROOT = iphoneos;
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		571A468B14DB0A1B007FEAC7 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = YES;
+				COPY_PHASE_STRIP = NO;
+				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
+				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
+				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
+				OTHER_LDFLAGS = (
+					"-weak_framework",
+					UIKit,
+					"-weak_framework",
+					AVFoundation,
+					"-weak_framework",
+					CoreMedia,
+					"-weak_library",
+					/usr/lib/libSystem.B.dylib,
+				);
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				TARGETED_DEVICE_FAMILY = "1,2";
+				WRAPPER_EXTENSION = app;
+			};
+			name = Debug;
+		};
+		571A468C14DB0A1B007FEAC7 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = YES;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
+				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
+				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
+				OTHER_LDFLAGS = (
+					"-weak_framework",
+					UIKit,
+					"-weak_framework",
+					AVFoundation,
+					"-weak_framework",
+					CoreMedia,
+					"-weak_library",
+					/usr/lib/libSystem.B.dylib,
+				);
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VALIDATE_PRODUCT = YES;
+				WRAPPER_EXTENSION = app;
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				571A468814DB0A1B007FEAC7 /* Debug */,
+				571A468914DB0A1B007FEAC7 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				571A468B14DB0A1B007FEAC7 /* Debug */,
+				571A468C14DB0A1B007FEAC7 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 571A462F14DB0A1A007FEAC7 /* Project object */;
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/ios-plist/SampleApp.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/ios-plist/SampleApp.xcodeproj/project.pbxproj b/cordova-lib/spec-plugman/projects/ios-plist/SampleApp.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..a4d87f9
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/ios-plist/SampleApp.xcodeproj/project.pbxproj
@@ -0,0 +1,498 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A463F14DB0A1B007FEAC7 /* Foundation.framework */; };
+		571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464114DB0A1B007FEAC7 /* UIKit.framework */; };
+		571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */; };
+		571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464514DB0A1B007FEAC7 /* AddressBook.framework */; };
+		571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */; };
+		571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */; };
+		571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */; };
+		571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */; };
+		571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */; };
+		571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465114DB0A1B007FEAC7 /* QuartzCore.framework */; };
+		571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */; };
+		571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */; };
+		571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465714DB0A1B007FEAC7 /* CoreMedia.framework */; };
+		571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */; };
+		571A466014DB0A1B007FEAC7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A465F14DB0A1B007FEAC7 /* main.m */; };
+		571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A466214DB0A1B007FEAC7 /* PhoneGap.framework */; };
+		571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466614DB0A1B007FEAC7 /* Localizable.strings */; };
+		571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466A14DB0A1B007FEAC7 /* Localizable.strings */; };
+		571A466F14DB0A1B007FEAC7 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A466E14DB0A1B007FEAC7 /* icon.png */; };
+		571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467014DB0A1B007FEAC7 /* icon@2x.png */; };
+		571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467214DB0A1B007FEAC7 /* icon-72.png */; };
+		571A467614DB0A1B007FEAC7 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467514DB0A1B007FEAC7 /* Default.png */; };
+		571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467714DB0A1B007FEAC7 /* Default@2x.png */; };
+		571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 571A467914DB0A1B007FEAC7 /* Capture.bundle */; };
+		571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */ = {isa = PBXBuildFile; fileRef = 571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */; };
+		571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A467F14DB0A1B007FEAC7 /* AppDelegate.m */; };
+		571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A468214DB0A1B007FEAC7 /* MainViewController.m */; };
+		571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 571A468414DB0A1B007FEAC7 /* MainViewController.xib */; };
+		577FC36614DB0B620082BA7B /* www in Resources */ = {isa = PBXBuildFile; fileRef = 577FC36514DB0B620082BA7B /* www */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		571A463B14DB0A1B007FEAC7 /* ChildApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChildApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		571A463F14DB0A1B007FEAC7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+		571A464114DB0A1B007FEAC7 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+		571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+		571A464514DB0A1B007FEAC7 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
+		571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
+		571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
+		571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
+		571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
+		571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
+		571A465114DB0A1B007FEAC7 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
+		571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
+		571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
+		571A465714DB0A1B007FEAC7 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
+		571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ChildApp-Info.plist"; sourceTree = "<group>"; };
+		571A465D14DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		571A465F14DB0A1B007FEAC7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+		571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ChildApp-Prefix.pch"; sourceTree = "<group>"; };
+		571A466214DB0A1B007FEAC7 /* PhoneGap.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PhoneGap.framework; path = /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework; sourceTree = "<absolute>"; };
+		571A466714DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/Localizable.strings; sourceTree = "<group>"; };
+		571A466B14DB0A1B007FEAC7 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Resources/es.lproj/Localizable.strings; sourceTree = "<group>"; };
+		571A466E14DB0A1B007FEAC7 /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon.png; path = Resources/icons/icon.png; sourceTree = "<group>"; };
+		571A467014DB0A1B007FEAC7 /* icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon@2x.png"; path = "Resources/icons/icon@2x.png"; sourceTree = "<group>"; };
+		571A467214DB0A1B007FEAC7 /* icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon-72.png"; path = "Resources/icons/icon-72.png"; sourceTree = "<group>"; };
+		571A467514DB0A1B007FEAC7 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/splash/Default.png; sourceTree = "<group>"; };
+		571A467714DB0A1B007FEAC7 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "Resources/splash/Default@2x.png"; sourceTree = "<group>"; };
+		571A467914DB0A1B007FEAC7 /* Capture.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Capture.bundle; path = Resources/Capture.bundle; sourceTree = "<group>"; };
+		571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = PhoneGap.plist; sourceTree = "<group>"; };
+		571A467E14DB0A1B007FEAC7 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Classes/AppDelegate.h; sourceTree = "<group>"; };
+		571A467F14DB0A1B007FEAC7 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Classes/AppDelegate.m; sourceTree = "<group>"; };
+		571A468114DB0A1B007FEAC7 /* MainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainViewController.h; path = Classes/MainViewController.h; sourceTree = "<group>"; };
+		571A468214DB0A1B007FEAC7 /* MainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = Classes/MainViewController.m; sourceTree = "<group>"; };
+		571A468414DB0A1B007FEAC7 /* MainViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainViewController.xib; path = Classes/MainViewController.xib; sourceTree = "<group>"; };
+		571A468714DB0A1B007FEAC7 /* README */ = {isa = PBXFileReference; lastKnownFileType = text; name = README; path = Plugins/README; sourceTree = "<group>"; };
+		577FC36514DB0B620082BA7B /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		571A463514DB0A1B007FEAC7 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */,
+				571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */,
+				571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */,
+				571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */,
+				571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */,
+				571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */,
+				571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */,
+				571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */,
+				571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */,
+				571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */,
+				571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */,
+				571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */,
+				571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */,
+				571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		571A463814DB0A1B007FEAC7 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		571A462D14DB0A1A007FEAC7 = {
+			isa = PBXGroup;
+			children = (
+				577FC36514DB0B620082BA7B /* www */,
+				571A465914DB0A1B007FEAC7 /* ChildApp */,
+				571A463E14DB0A1B007FEAC7 /* Frameworks */,
+				571A463C14DB0A1B007FEAC7 /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		571A463C14DB0A1B007FEAC7 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				571A463B14DB0A1B007FEAC7 /* ChildApp.app */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		571A463E14DB0A1B007FEAC7 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				571A463F14DB0A1B007FEAC7 /* Foundation.framework */,
+				571A464114DB0A1B007FEAC7 /* UIKit.framework */,
+				571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */,
+				571A464514DB0A1B007FEAC7 /* AddressBook.framework */,
+				571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */,
+				571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */,
+				571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */,
+				571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */,
+				571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */,
+				571A465114DB0A1B007FEAC7 /* QuartzCore.framework */,
+				571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */,
+				571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */,
+				571A465714DB0A1B007FEAC7 /* CoreMedia.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		571A465914DB0A1B007FEAC7 /* ChildApp */ = {
+			isa = PBXGroup;
+			children = (
+				571A466214DB0A1B007FEAC7 /* PhoneGap.framework */,
+				571A466414DB0A1B007FEAC7 /* Resources */,
+				571A467D14DB0A1B007FEAC7 /* Classes */,
+				571A468614DB0A1B007FEAC7 /* Plugins */,
+				571A465A14DB0A1B007FEAC7 /* Supporting Files */,
+			);
+			path = ChildApp;
+			sourceTree = "<group>";
+		};
+		571A465A14DB0A1B007FEAC7 /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */,
+				571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */,
+				571A465F14DB0A1B007FEAC7 /* main.m */,
+				571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */,
+				571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */,
+				571A468414DB0A1B007FEAC7 /* MainViewController.xib */,
+			);
+			name = "Supporting Files";
+			sourceTree = "<group>";
+		};
+		571A466414DB0A1B007FEAC7 /* Resources */ = {
+			isa = PBXGroup;
+			children = (
+				571A467914DB0A1B007FEAC7 /* Capture.bundle */,
+				571A466514DB0A1B007FEAC7 /* en.lproj */,
+				571A466914DB0A1B007FEAC7 /* es.lproj */,
+				571A466D14DB0A1B007FEAC7 /* icons */,
+				571A467414DB0A1B007FEAC7 /* splash */,
+			);
+			name = Resources;
+			sourceTree = "<group>";
+		};
+		571A466514DB0A1B007FEAC7 /* en.lproj */ = {
+			isa = PBXGroup;
+			children = (
+				571A466614DB0A1B007FEAC7 /* Localizable.strings */,
+			);
+			name = en.lproj;
+			sourceTree = "<group>";
+		};
+		571A466914DB0A1B007FEAC7 /* es.lproj */ = {
+			isa = PBXGroup;
+			children = (
+				571A466A14DB0A1B007FEAC7 /* Localizable.strings */,
+			);
+			name = es.lproj;
+			sourceTree = "<group>";
+		};
+		571A466D14DB0A1B007FEAC7 /* icons */ = {
+			isa = PBXGroup;
+			children = (
+				571A466E14DB0A1B007FEAC7 /* icon.png */,
+				571A467014DB0A1B007FEAC7 /* icon@2x.png */,
+				571A467214DB0A1B007FEAC7 /* icon-72.png */,
+			);
+			name = icons;
+			sourceTree = "<group>";
+		};
+		571A467414DB0A1B007FEAC7 /* splash */ = {
+			isa = PBXGroup;
+			children = (
+				571A467514DB0A1B007FEAC7 /* Default.png */,
+				571A467714DB0A1B007FEAC7 /* Default@2x.png */,
+			);
+			name = splash;
+			sourceTree = "<group>";
+		};
+		571A467D14DB0A1B007FEAC7 /* Classes */ = {
+			isa = PBXGroup;
+			children = (
+				571A467E14DB0A1B007FEAC7 /* AppDelegate.h */,
+				571A467F14DB0A1B007FEAC7 /* AppDelegate.m */,
+				571A468114DB0A1B007FEAC7 /* MainViewController.h */,
+				571A468214DB0A1B007FEAC7 /* MainViewController.m */,
+			);
+			name = Classes;
+			sourceTree = "<group>";
+		};
+		571A468614DB0A1B007FEAC7 /* Plugins */ = {
+			isa = PBXGroup;
+			children = (
+				571A468714DB0A1B007FEAC7 /* README */,
+			);
+			name = Plugins;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		571A463A14DB0A1B007FEAC7 /* ChildApp */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */;
+			buildPhases = (
+				571A463414DB0A1B007FEAC7 /* Sources */,
+				571A463514DB0A1B007FEAC7 /* Frameworks */,
+				571A463614DB0A1B007FEAC7 /* Resources */,
+				571A463714DB0A1B007FEAC7 /* Sources */,
+				571A463814DB0A1B007FEAC7 /* Frameworks */,
+				571A463914DB0A1B007FEAC7 /* ShellScript */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = ChildApp;
+			productName = ChildApp;
+			productReference = 571A463B14DB0A1B007FEAC7 /* ChildApp.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		571A462F14DB0A1A007FEAC7 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0420;
+			};
+			buildConfigurationList = 571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				es,
+			);
+			mainGroup = 571A462D14DB0A1A007FEAC7;
+			productRefGroup = 571A463C14DB0A1B007FEAC7 /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				571A463A14DB0A1B007FEAC7 /* ChildApp */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		571A463614DB0A1B007FEAC7 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */,
+				571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */,
+				571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */,
+				571A466F14DB0A1B007FEAC7 /* icon.png in Resources */,
+				571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */,
+				571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */,
+				571A467614DB0A1B007FEAC7 /* Default.png in Resources */,
+				571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */,
+				571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */,
+				571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */,
+				571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */,
+				577FC36614DB0B620082BA7B /* www in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		571A463914DB0A1B007FEAC7 /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/bash;
+			shellScript = "\n\t\t\t\t\t\t\t\tif [ ! -d \"$PROJECT_DIR/www\" ] ; then\n\t\t\t\t\t\t\t\t\tcp -R /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework/www \"$PROJECT_DIR\"\n\t\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\t\t# detect www folder reference in project, if missing, print warning\n\t\t\t\t\t\t\t\tgrep \"{isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = \\\"<group>\\\"; };\" \"$PROJECT_DIR/$PROJECT_NAME.xcodeproj/project.pbxproj\"\n\t\t\t\t\t\t\t\trc=$? \n\t\t\t\t\t\t\t\tif [ $rc != 0 ] ; then\n\t\t\t\t\t\t\t\techo -e \"warning: Missing - Add $PROJECT_DIR/www as a folder reference in your project. Just drag and drop the folder into your project, into the Project Navigator of Xcode 4. Make sure you select the second radio-button: 'Create folder references for any added folders' (which will create a blue folder)\" 1>&2\n\t\t\t\t\t\t\t\tfi\t\t\t\t\t\t\t";
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		571A463414DB0A1B007FEAC7 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				571A466014DB0A1B007FEAC7 /* main.m in Sources */,
+				571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */,
+				571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		571A463714DB0A1B007FEAC7 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+		571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				571A465D14DB0A1B007FEAC7 /* en */,
+			);
+			name = InfoPlist.strings;
+			sourceTree = "<group>";
+		};
+		571A466614DB0A1B007FEAC7 /* Localizable.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				571A466714DB0A1B007FEAC7 /* en */,
+			);
+			name = Localizable.strings;
+			sourceTree = "<group>";
+		};
+		571A466A14DB0A1B007FEAC7 /* Localizable.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				571A466B14DB0A1B007FEAC7 /* es */,
+			);
+			name = Localizable.strings;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		571A468814DB0A1B007FEAC7 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+				CLANG_ENABLE_OBJC_ARC = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_VERSION = com.apple.compilers.llvmgcc42;
+				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
+				SDKROOT = iphoneos;
+			};
+			name = Debug;
+		};
+		571A468914DB0A1B007FEAC7 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+				CLANG_ENABLE_OBJC_ARC = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_VERSION = com.apple.compilers.llvmgcc42;
+				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
+				SDKROOT = iphoneos;
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		571A468B14DB0A1B007FEAC7 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = YES;
+				COPY_PHASE_STRIP = NO;
+				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
+				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
+				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
+				OTHER_LDFLAGS = (
+					"-weak_framework",
+					UIKit,
+					"-weak_framework",
+					AVFoundation,
+					"-weak_framework",
+					CoreMedia,
+					"-weak_library",
+					/usr/lib/libSystem.B.dylib,
+				);
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				TARGETED_DEVICE_FAMILY = "1,2";
+				WRAPPER_EXTENSION = app;
+			};
+			name = Debug;
+		};
+		571A468C14DB0A1B007FEAC7 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = YES;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
+				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
+				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
+				OTHER_LDFLAGS = (
+					"-weak_framework",
+					UIKit,
+					"-weak_framework",
+					AVFoundation,
+					"-weak_framework",
+					CoreMedia,
+					"-weak_library",
+					/usr/lib/libSystem.B.dylib,
+				);
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VALIDATE_PRODUCT = YES;
+				WRAPPER_EXTENSION = app;
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				571A468814DB0A1B007FEAC7 /* Debug */,
+				571A468914DB0A1B007FEAC7 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				571A468B14DB0A1B007FEAC7 /* Debug */,
+				571A468C14DB0A1B007FEAC7 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 571A462F14DB0A1A007FEAC7 /* Project object */;
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/ios-plist/SampleApp/PhoneGap.plist
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/ios-plist/SampleApp/PhoneGap.plist b/cordova-lib/spec-plugman/projects/ios-plist/SampleApp/PhoneGap.plist
new file mode 100644
index 0000000..5ffe25e
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/ios-plist/SampleApp/PhoneGap.plist
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>TopActivityIndicator</key>
+	<string>gray</string>
+	<key>EnableLocation</key>
+	<false/>
+	<key>EnableViewportScale</key>
+	<false/>
+	<key>AutoHideSplashScreen</key>
+	<true/>
+	<key>ShowSplashScreenSpinner</key>
+	<true/>
+	<key>MediaPlaybackRequiresUserAction</key>
+	<false/>
+	<key>AllowInlineMediaPlayback</key>
+	<false/>
+	<key>OpenAllWhitelistURLsInWebView</key>
+	<false/>
+	<key>ExternalHosts</key>
+	<array/>
+	<key>Plugins</key>
+	<dict>
+		<key>com.phonegap.accelerometer</key>
+		<string>PGAccelerometer</string>
+		<key>com.phonegap.camera</key>
+		<string>PGCamera</string>
+		<key>com.phonegap.connection</key>
+		<string>PGConnection</string>
+		<key>com.phonegap.contacts</key>
+		<string>PGContacts</string>
+		<key>com.phonegap.debugconsole</key>
+		<string>PGDebugConsole</string>
+		<key>com.phonegap.file</key>
+		<string>PGFile</string>
+		<key>com.phonegap.filetransfer</key>
+		<string>PGFileTransfer</string>
+		<key>com.phonegap.geolocation</key>
+		<string>PGLocation</string>
+		<key>com.phonegap.notification</key>
+		<string>PGNotification</string>
+		<key>com.phonegap.media</key>
+		<string>PGSound</string>
+		<key>com.phonegap.mediacapture</key>
+		<string>PGCapture</string>
+		<key>com.phonegap.splashscreen</key>
+		<string>PGSplashScreen</string>
+		<key>com.phonegap.battery</key>
+		<string>PGBattery</string>
+	</dict>
+</dict>
+</plist>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/ios-plist/SampleApp/SampleApp-Info.plist
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/ios-plist/SampleApp/SampleApp-Info.plist b/cordova-lib/spec-plugman/projects/ios-plist/SampleApp/SampleApp-Info.plist
new file mode 100644
index 0000000..08b9ee3
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/ios-plist/SampleApp/SampleApp-Info.plist
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!--
+#
+# 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.
+#
+-->
+<plist version="1.0">
+<dict>
+	<key>CFBundleIcons</key>
+	<dict>
+		<key>CFBundlePrimaryIcon</key>
+		<dict>
+			<key>CFBundleIconFiles</key>
+			<array>
+                <string>icon.png</string>
+                <string>icon@2x.png</string>
+                <string>icon-72.png</string>
+                <string>icon-72@2x.png</string>
+			</array>
+			<key>UIPrerenderedIcon</key>
+			<false/>
+		</dict>
+	</dict>
+	<key>UISupportedInterfaceOrientations~ipad</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+	</array>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleDisplayName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundleExecutable</key>
+	<string>${EXECUTABLE_NAME}</string>
+	<key>CFBundleIconFile</key>
+	<string>icon.png</string>
+	<key>CFBundleIdentifier</key>
+	<string>com.example.friendstring</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1.0</string>
+	<key>LSRequiresIPhoneOS</key>
+	<true/>
+	<key>NSMainNibFile</key>
+	<string></string>
+	<key>NSMainNibFile~ipad</key>
+	<string></string>
+	<key>AppId</key>
+	<string>$APP_ID</string>
+</dict>
+</plist>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/ios-plist/www/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/ios-plist/www/.gitkeep b/cordova-lib/spec-plugman/projects/ios-plist/www/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/multiple-children/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/multiple-children/AndroidManifest.xml b/cordova-lib/spec-plugman/projects/multiple-children/AndroidManifest.xml
new file mode 100644
index 0000000..0c52803
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/multiple-children/AndroidManifest.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
+      package="com.alunny.childapp" android:versionName="1.1" android:versionCode="5">
+    <supports-screens
+    	android:largeScreens="true"
+    	android:normalScreens="true"
+    	android:smallScreens="true"
+    	android:xlargeScreens="true"
+    	android:resizeable="true"
+    	android:anyDensity="true"
+    	/>
+
+    <uses-permission android:name="android.permission.CAMERA" />
+    <uses-permission android:name="android.permission.VIBRATE" />
+    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
+    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
+    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.RECEIVE_SMS" />
+    <uses-permission android:name="android.permission.RECORD_AUDIO" />
+    <uses-permission android:name="android.permission.RECORD_VIDEO"/>
+    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
+    <uses-permission android:name="android.permission.READ_CONTACTS" />
+    <uses-permission android:name="android.permission.WRITE_CONTACTS" />   
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />   
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
+    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
+
+    <uses-feature android:name="android.hardware.camera" />
+    <uses-feature android:name="android.hardware.camera.autofocus" />
+
+    <application android:icon="@drawable/icon" android:label="@string/app_name"
+    	android:debuggable="true">
+		<activity android:name="ChildApp" android:label="@string/app_name" 
+				  android:configChanges="orientation|keyboardHidden">
+			<intent-filter>
+				<action android:name="android.intent.action.MAIN" />
+				<category android:name="android.intent.category.LAUNCHER" />
+			</intent-filter>
+        </activity>
+        <activity android:name="com.phonegap.DroidGap" android:label="@string/app_name" 
+            	  android:configChanges="orientation|keyboardHidden">
+        	<intent-filter>
+        	</intent-filter>
+        </activity>
+    </application>
+
+	<uses-sdk android:minSdkVersion="5" />
+</manifest> 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/multiple-children/res/xml/plugins.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/multiple-children/res/xml/plugins.xml b/cordova-lib/spec-plugman/projects/multiple-children/res/xml/plugins.xml
new file mode 100644
index 0000000..9cee85e
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/multiple-children/res/xml/plugins.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<plugins>
+    <plugin name="App" value="com.phonegap.App"/>
+    <plugin name="Geolocation" value="com.phonegap.GeoBroker"/>
+    <plugin name="Device" value="com.phonegap.Device"/>
+    <plugin name="Accelerometer" value="com.phonegap.AccelListener"/>
+    <plugin name="Compass" value="com.phonegap.CompassListener"/>
+    <plugin name="Media" value="com.phonegap.AudioHandler"/>
+    <plugin name="Camera" value="com.phonegap.CameraLauncher"/>
+    <plugin name="Contacts" value="com.phonegap.ContactManager"/>
+    <plugin name="Crypto" value="com.phonegap.CryptoHandler"/>
+    <plugin name="File" value="com.phonegap.FileUtils"/>
+    <plugin name="Network Status" value="com.phonegap.NetworkManager"/>
+    <plugin name="Notification" value="com.phonegap.Notification"/>
+    <plugin name="Storage" value="com.phonegap.Storage"/>
+    <plugin name="Temperature" value="com.phonegap.TempListener"/>
+    <plugin name="FileTransfer" value="com.phonegap.FileTransfer"/>
+    <plugin name="Capture" value="com.phonegap.Capture"/>
+</plugins>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/tizen/www/config.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/tizen/www/config.xml b/cordova-lib/spec-plugman/projects/tizen/www/config.xml
new file mode 100644
index 0000000..788f6d4
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/tizen/www/config.xml
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='utf-8'?>
+<widget id="TizenTestPackage"></widget>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/windows8/CordovaApp_TemporaryKey.pfx
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/windows8/CordovaApp_TemporaryKey.pfx b/cordova-lib/spec-plugman/projects/windows8/CordovaApp_TemporaryKey.pfx
new file mode 100644
index 0000000..4df1e37
Binary files /dev/null and b/cordova-lib/spec-plugman/projects/windows8/CordovaApp_TemporaryKey.pfx differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/windows8/TestApp.jsproj
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/windows8/TestApp.jsproj b/cordova-lib/spec-plugman/projects/windows8/TestApp.jsproj
new file mode 100644
index 0000000..d508c3f
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/windows8/TestApp.jsproj
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|AnyCPU">
+      <Configuration>Debug</Configuration>
+      <Platform>AnyCPU</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|ARM">
+      <Configuration>Debug</Configuration>
+      <Platform>ARM</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x86">
+      <Configuration>Debug</Configuration>
+      <Platform>x86</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|AnyCPU">
+      <Configuration>Release</Configuration>
+      <Platform>AnyCPU</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|ARM">
+      <Configuration>Release</Configuration>
+      <Platform>ARM</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x86">
+      <Configuration>Release</Configuration>
+      <Platform>x86</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>efffab2f-bfc5-4eda-b545-45ef4995f55a</ProjectGuid>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '11.0'">
+    <VisualStudioVersion>11.0</VisualStudioVersion>
+  </PropertyGroup>
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).Default.props" />
+  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).props" />
+  <PropertyGroup>
+    <TargetPlatformIdentifier>Windows</TargetPlatformIdentifier>
+    <TargetPlatformVersion>8.0</TargetPlatformVersion>
+    <DefaultLanguage>en-US</DefaultLanguage>
+    <PackageCertificateKeyFile>CordovaApp_TemporaryKey.pfx</PackageCertificateKeyFile>
+  </PropertyGroup>
+  <ItemGroup>
+    <AppxManifest Include="package.appxmanifest">
+      <SubType>Designer</SubType>
+    </AppxManifest>
+    <Content Include="www\cordova-2.6.0.js" />
+    <Content Include="www\css\index.css" />
+    <Content Include="www\img\logo.png" />
+    <Content Include="www\img\smalllogo.png" />
+    <Content Include="www\img\splashscreen.png" />
+    <Content Include="www\img\storelogo.png" />
+    <Content Include="www\index.html" />
+    <Content Include="www\js\index.js" />
+    <None Include="CordovaApp_TemporaryKey.pfx" />
+  </ItemGroup>
+  <ItemGroup>
+    <SDKReference Include="Microsoft.WinJS.1.0, Version=1.0" />
+  </ItemGroup>
+  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).targets" />
+  <!-- To modify your build process, add your task inside one of the targets below then uncomment
+       that target and the DisableFastUpToDateCheck PropertyGroup. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  <PropertyGroup>
+    <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
+  </PropertyGroup>
+  -->
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/windows8/TestApp.sln
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/windows8/TestApp.sln b/cordova-lib/spec-plugman/projects/windows8/TestApp.sln
new file mode 100644
index 0000000..6c1ea33
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/windows8/TestApp.sln
@@ -0,0 +1,46 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "TestApp", "TestApp.jsproj", "{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Debug|ARM = Debug|ARM
+		Debug|x64 = Debug|x64
+		Debug|x86 = Debug|x86
+		Release|Any CPU = Release|Any CPU
+		Release|ARM = Release|ARM
+		Release|x64 = Release|x64
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|ARM.ActiveCfg = Debug|ARM
+		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|ARM.Build.0 = Debug|ARM
+		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|ARM.Deploy.0 = Debug|ARM
+		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x64.ActiveCfg = Debug|x64
+		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x64.Build.0 = Debug|x64
+		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x64.Deploy.0 = Debug|x64
+		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x86.ActiveCfg = Debug|x86
+		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x86.Build.0 = Debug|x86
+		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x86.Deploy.0 = Debug|x86
+		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|Any CPU.Build.0 = Release|Any CPU
+		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|Any CPU.Deploy.0 = Release|Any CPU
+		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|ARM.ActiveCfg = Release|ARM
+		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|ARM.Build.0 = Release|ARM
+		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|ARM.Deploy.0 = Release|ARM
+		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x64.ActiveCfg = Release|x64
+		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x64.Build.0 = Release|x64
+		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x64.Deploy.0 = Release|x64
+		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x86.ActiveCfg = Release|x86
+		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x86.Build.0 = Release|x86
+		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x86.Deploy.0 = Release|x86
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/windows8/package.appxmanifest
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/windows8/package.appxmanifest b/cordova-lib/spec-plugman/projects/windows8/package.appxmanifest
new file mode 100644
index 0000000..62c8f28
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/windows8/package.appxmanifest
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
+  <Identity Name="efffab2f-bfc5-4eda-b545-45ef4995f55a" Version="1.0.0.0" Publisher="CN=Jesse" />
+  <Properties>
+    <DisplayName>CordovaApp</DisplayName>
+    <PublisherDisplayName>Jesse</PublisherDisplayName>
+    <Logo>images\storelogo.png</Logo>
+  </Properties>
+  <Prerequisites>
+    <OSMinVersion>6.2.1</OSMinVersion>
+    <OSMaxVersionTested>6.2.1</OSMaxVersionTested>
+  </Prerequisites>
+  <Resources>
+    <Resource Language="x-generate" />
+  </Resources>
+  <Applications>
+    <Application Id="App" StartPage="www/index.html">
+      <VisualElements DisplayName="CordovaApp" Logo="www\img\logo.png" SmallLogo="www\img\smalllogo.png" Description="CordovaApp" ForegroundText="light" BackgroundColor="#464646">
+        <DefaultTile ShowName="allLogos" />
+        <SplashScreen Image="www\img\splashscreen.png" />
+      </VisualElements>
+    </Application>
+  </Applications>
+  <Capabilities>
+    <Capability Name="internetClient" />
+  </Capabilities>
+</Package>
\ No newline at end of file


[49/70] Remove all cordova-lib files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/util/plugins.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/util/plugins.spec.js b/cordova-lib/spec-plugman/util/plugins.spec.js
deleted file mode 100644
index 63d0aac..0000000
--- a/cordova-lib/spec-plugman/util/plugins.spec.js
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/usr/bin/env node
-/*
- *
- *
- * Licensed 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 http   = require('http'),
-    osenv  = require('osenv'),
-    path   = require('path'),
-    fs     = require('fs'),
-    temp   = path.join(osenv.tmpdir(), 'plugman'),
-    shell  = require('shelljs'),
-    child_process = require('child_process'),
-    plugins = require('../../src/util/plugins'),
-    xml_helpers = require('../../src/util/xml-helpers');
-
-describe('plugins utility module', function(){
-    describe('clonePluginGitRepo', function(){
-        var fake_id = 'VillageDrunkard';
-        var execSpy, cp_spy, xml_spy, done;
-        beforeEach(function() {
-            execSpy = spyOn(child_process, 'exec').andCallFake(function(cmd, opts, cb) {
-                if (!cb) cb = opts;
-                cb(null, 'git output');
-            });
-            spyOn(shell, 'which').andReturn(true);
-            cp_spy = spyOn(shell, 'cp');
-            xml_spy = spyOn(xml_helpers, 'parseElementtreeSync').andReturn({
-                getroot:function() {
-                    return {
-                        attrib:{id:fake_id}
-                    };
-                }
-            });
-            done = false;
-        });
-        it('should shell out to git clone with correct arguments', function(){
-            var plugin_git_url = 'https://github.com/imhotep/ChildBrowser';
-            var callback = jasmine.createSpy();
-
-            runs(function() {
-                plugins.clonePluginGitRepo(plugin_git_url, temp, '.', undefined)
-                .then(function(val) { done = val; }, function(err) { done = err; });
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 500);
-            runs(function() {
-                expect(execSpy).toHaveBeenCalled();
-                var git_clone_regex = new RegExp('^git clone "' + plugin_git_url + '" ".*"$', 'gi');
-                expect(execSpy.mostRecentCall.args[0]).toMatch(git_clone_regex);
-
-                expect(done).toMatch(new RegExp(path.sep + fake_id + '$'));
-            });
-        });
-        it('should take into account subdirectory argument when copying over final repository into plugins+plugin_id directory', function() {
-            var plugin_git_url = 'https://github.com/imhotep/ChildBrowser';
-            var fake_subdir = 'TheBrainRecoilsInHorror';
-            runs(function() {
-                plugins.clonePluginGitRepo(plugin_git_url, temp, fake_subdir)
-                .then(function(val) { done = val || true; }, function(err) { done = err; });
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 500);
-            runs(function() {
-                var expected_subdir_cp_path = new RegExp(fake_subdir + '[\\\\\\/]\\*$', 'gi');
-                expect(cp_spy.mostRecentCall.args[1]).toMatch(expected_subdir_cp_path);
-                expect(cp_spy.mostRecentCall.args[2]).toEqual(path.join(temp, fake_id));
-            });
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/util/xml-helpers.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/util/xml-helpers.spec.js b/cordova-lib/spec-plugman/util/xml-helpers.spec.js
deleted file mode 100644
index edcdedb..0000000
--- a/cordova-lib/spec-plugman/util/xml-helpers.spec.js
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- *
- *
- * Licensed 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 path = require('path')
-  , xml_helpers = require('../../src/util/xml-helpers')
-  , et = require('elementtree')
-
-  , title = et.XML('<title>HELLO</title>')
-  , usesNetworkOne = et.XML('<uses-permission ' +
-			'android:name="PACKAGE_NAME.permission.C2D_MESSAGE"/>')
-  , usesNetworkTwo = et.XML("<uses-permission android:name=\
-            \"PACKAGE_NAME.permission.C2D_MESSAGE\" />")
-  , usesReceive = et.XML("<uses-permission android:name=\
-            \"com.google.android.c2dm.permission.RECEIVE\"/>")
-  , helloTagOne = et.XML("<h1>HELLO</h1>")
-  , goodbyeTag = et.XML("<h1>GOODBYE</h1>")
-  , helloTagTwo = et.XML("<h1>  HELLO  </h1>");
-
-
-describe('xml-helpers', function(){
-    describe('equalNodes', function() {
-        it('should return false for different tags', function(){
-            expect(xml_helpers.equalNodes(usesNetworkOne, title)).toBe(false);
-        });
-
-        it('should return true for identical tags', function(){
-            expect(xml_helpers.equalNodes(usesNetworkOne, usesNetworkTwo)).toBe(true);
-        });
-
-        it('should return false for different attributes', function(){
-            expect(xml_helpers.equalNodes(usesNetworkOne, usesReceive)).toBe(false);
-        });
-
-        it('should distinguish between text', function(){
-            expect(xml_helpers.equalNodes(helloTagOne, goodbyeTag)).toBe(false);
-        });
-
-        it('should ignore whitespace in text', function(){
-            expect(xml_helpers.equalNodes(helloTagOne, helloTagTwo)).toBe(true);
-        });
-
-        describe('should compare children', function(){
-            it('by child quantity', function(){
-                var one = et.XML('<i><b>o</b></i>'),
-                    two = et.XML('<i><b>o</b><u></u></i>');
-
-                expect(xml_helpers.equalNodes(one, two)).toBe(false);
-            });
-
-            it('by child equality', function(){
-                var one = et.XML('<i><b>o</b></i>'),
-                    two = et.XML('<i><u></u></i>'),
-                    uno = et.XML('<i>\n<b>o</b>\n</i>');
-
-                expect(xml_helpers.equalNodes(one, uno)).toBe(true);
-                expect(xml_helpers.equalNodes(one, two)).toBe(false);
-            });
-        });
-    });
-    describe('pruneXML', function() {
-        var config_xml;
-
-        beforeEach(function() {
-            config_xml = xml_helpers.parseElementtreeSync(path.join(__dirname, '..', 'projects', 'android_two', 'res', 'xml', 'config.xml'));
-        });
-
-        it('should remove any children that match the specified selector', function() {
-            var children = config_xml.findall('plugins/plugin');
-            xml_helpers.pruneXML(config_xml, children, 'plugins');
-            expect(config_xml.find('plugins').getchildren().length).toEqual(0);
-        });
-        it('should do nothing if the children cannot be found', function() {
-            var children = [title];
-            xml_helpers.pruneXML(config_xml, children, 'plugins');
-            expect(config_xml.find('plugins').getchildren().length).toEqual(17);
-        });
-        it('should be able to handle absolute selectors', function() {
-            var children = config_xml.findall('plugins/plugin');
-            xml_helpers.pruneXML(config_xml, children, '/cordova/plugins');
-            expect(config_xml.find('plugins').getchildren().length).toEqual(0);
-        });
-        it('should be able to handle absolute selectors with wildcards', function() {
-            var children = config_xml.findall('plugins/plugin');
-            xml_helpers.pruneXML(config_xml, children, '/*/plugins');
-            expect(config_xml.find('plugins').getchildren().length).toEqual(0);
-        });
-    });
-
-    describe('graftXML', function() {
-        var config_xml, plugin_xml;
-
-        beforeEach(function() {
-            config_xml = xml_helpers.parseElementtreeSync(path.join(__dirname, '..', 'projects', 'android_two', 'res', 'xml', 'config.xml'));
-            plugin_xml = xml_helpers.parseElementtreeSync(path.join(__dirname, '..', 'plugins', 'ChildBrowser', 'plugin.xml'));
-        });
-
-        it('should add children to the specified selector', function() {
-            var children = plugin_xml.find('config-file').getchildren();
-            xml_helpers.graftXML(config_xml, children, 'plugins');
-            expect(config_xml.find('plugins').getchildren().length).toEqual(19);
-        });
-        it('should be able to handle absolute selectors', function() {
-            var children = plugin_xml.find('config-file').getchildren();
-            xml_helpers.graftXML(config_xml, children, '/cordova');
-            expect(config_xml.findall('access').length).toEqual(3);
-        });
-        it('should be able to handle absolute selectors with wildcards', function() {
-            var children = plugin_xml.find('config-file').getchildren();
-            xml_helpers.graftXML(config_xml, children, '/*');
-            expect(config_xml.findall('access').length).toEqual(3);
-        });
-
-        it('for simple XPath paths, the parent should be created if not present', function () {
-            var doc = new et.ElementTree(et.XML('<widget>')),
-                children = [et.XML('<rim:permits> super_awesome_permission </rim:permits>')],
-                selector= "/widget/rim:permissions";
-            expect(xml_helpers.graftXML(doc, children, selector)).toBe(true);
-            expect(et.tostring(doc.getroot())).toContain("<rim:permissions><rim:permits> super_awesome_permission </rim:permits></rim:permissions>");
-        });
-
-        it('returns false for more complicated selectors', function () {
-            var doc = new et.ElementTree(et.XML('<widget>')),
-                children = [et.XML('<rim:permits> super_awesome_permission </rim:permits>')],
-                selector= "/bookstore/book[price>35]/title";
-            expect(xml_helpers.graftXML(doc, children, selector)).toBe(false);
-        });
-
-        it('appends children after the specified sibling', function () {
-            var doc = new et.ElementTree(et.XML('<widget><A/><B/><C/></widget>')),
-                children = [et.XML('<B id="new"/>'), et.XML('<B id="new2"/>')],
-                selector= "/widget",
-                after= "B;A";
-            expect(xml_helpers.graftXML(doc, children, selector, after)).toBe(true);
-            expect(et.tostring(doc.getroot())).toContain('<B /><B id="new" /><B id="new2" />');
-        });
-
-        it('appends children after the 2nd priority sibling if the 1st one is missing', function () {
-            var doc = new et.ElementTree(et.XML('<widget><A/><C/></widget>')),
-                children = [et.XML('<B id="new"/>'), et.XML('<B id="new2"/>')],
-                selector= "/widget",
-                after= "B;A";
-            expect(xml_helpers.graftXML(doc, children, selector, after)).toBe(true);
-            expect(et.tostring(doc.getroot())).toContain('<A /><B id="new" /><B id="new2" />');
-        });
-
-        it('inserts children at the beginning if specified sibling is missing', function () {
-            var doc = new et.ElementTree(et.XML('<widget><B/><C/></widget>')),
-                children = [et.XML('<A id="new"/>'), et.XML('<A id="new2"/>')],
-                selector= "/widget",
-                after= "A";
-            expect(xml_helpers.graftXML(doc, children, selector, after)).toBe(true);
-            expect(et.tostring(doc.getroot())).toContain('<widget><A id="new" /><A id="new2" />');
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/wrappers.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/wrappers.spec.js b/cordova-lib/spec-plugman/wrappers.spec.js
deleted file mode 100644
index 3e61eb7..0000000
--- a/cordova-lib/spec-plugman/wrappers.spec.js
+++ /dev/null
@@ -1,40 +0,0 @@
-var Q = require('q'),
-    plugman = require('../plugman');
-
-describe('callback wrapper', function() {
-    var calls = ['install', 'uninstall', 'fetch', 'config', 'owner', 'adduser', 'publish', 'unpublish', 'search', 'info', 'create', 'platform'];
-    for (var i = 0; i < calls.length; i++) {
-        var call = calls[i];
-
-        describe('`' + call + '`', function() {
-            var raw;
-            beforeEach(function() {
-                raw = spyOn(plugman.raw, call);
-            });
-
-            it('should work with no callback and success', function() {
-                raw.andReturn(Q());
-                plugman[call]();
-                expect(raw).toHaveBeenCalled();
-            });
-
-            it('should call the callback on success', function(done) {
-                raw.andReturn(Q(1));
-                plugman[call](function(err) {
-                    expect(err).toBeUndefined();
-                    done();
-                });
-            });
-
-            it('should call the callback with the error on failure', function(done) {
-                var err = new Error('junk');
-                raw.andCallFake(function() { return Q.reject(err)});
-                plugman[call](function(err) {
-                    expect(err).toEqual(err);
-                    done();
-                });
-            });
-        });
-    }
-});
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/adduser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/adduser.js b/cordova-lib/src/plugman/adduser.js
deleted file mode 100644
index b83a676..0000000
--- a/cordova-lib/src/plugman/adduser.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var registry = require('./registry/registry')
-
-module.exports = function() {
-    return registry.adduser(null);
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/config.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/config.js b/cordova-lib/src/plugman/config.js
deleted file mode 100644
index e892425..0000000
--- a/cordova-lib/src/plugman/config.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var registry = require('./registry/registry')
-
-module.exports = function(params) {
-    return registry.config(params)
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/create.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/create.js b/cordova-lib/src/plugman/create.js
deleted file mode 100644
index 7db67b7..0000000
--- a/cordova-lib/src/plugman/create.js
+++ /dev/null
@@ -1,81 +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 Q = require('q'),
-    fs = require('fs'),
-    path = require('path'),
-    shell = require('shelljs'),
-    et = require('elementtree');
-
-module.exports = function create( name, id, version, pluginPath, options ) {
-    var cwd = pluginPath + "/" + name + "/",
-        docDir = path.join(__dirname, '..', 'doc/'),
-        baseJS,
-        root,
-        pluginName,
-        clobber,
-        jsMod,
-        pluginxml;
-
-    //check we are not already in a plugin
-    if( fs.existsSync( cwd + 'plugin.xml' ) ) {
-        return Q.reject( new Error( 'plugin.xml already exists. Are you already in a plugin?' ) );
-    }
-
-    //Create a plugin.xml file
-    root = et.Element( 'plugin' );
-    root.set( 'xmlns', 'http://apache.org/cordova/ns/plugins/1.0' );
-    root.set( 'xmlns:android', 'http://schemas.android.com/apk/res/android' );
-    root.set( 'id', id );
-    root.set( 'version', version );
-
-    //Add the name tag
-    pluginName = et.XML( "<name>" );
-    pluginName.text = name;
-    root.append( pluginName );
-
-    //loop through the options( variables ) for other tags
-    for( var key in options ) {
-        var temp = et.XML( "<" + key + ">");
-        temp.text = options[ key ];
-        root.append( temp );
-    }
-
-    //setup the directory structure
-    shell.mkdir( '-p', cwd + "www" );
-    shell.mkdir( '-p', cwd + "src" );
-
-    //create a base plugin.js file
-    baseJS = fs.readFileSync( docDir + 'base.js', 'utf-8').replace( /%pluginName%/g, name );
-    fs.writeFileSync( cwd + 'www/' + name + '.js', baseJS, 'utf-8' );
-    //Add it to the xml as a js module
-    jsMod = et.Element( 'js-module' );
-    jsMod.set( 'src', 'www/' + name + '.js' );
-    jsMod.set( 'name', name );
-
-    clobber = et.Element( 'clobbers' );
-    clobber.set( 'target', 'cordova.plugins.' + name );
-    jsMod.append( clobber );
-
-    root.append( jsMod );
-
-    //Write out the plugin.xml file
-    fs.writeFileSync( cwd + "plugin.xml", new et.ElementTree( root ).write( {indent: 4} ), 'utf-8' );
-
-    return Q();
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/events.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/events.js b/cordova-lib/src/plugman/events.js
deleted file mode 100644
index ed78839..0000000
--- a/cordova-lib/src/plugman/events.js
+++ /dev/null
@@ -1,2 +0,0 @@
-
-module.exports = new (require('events').EventEmitter)();

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/fetch.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/fetch.js b/cordova-lib/src/plugman/fetch.js
deleted file mode 100644
index 9948b7f..0000000
--- a/cordova-lib/src/plugman/fetch.js
+++ /dev/null
@@ -1,175 +0,0 @@
-var shell   = require('shelljs'),
-    fs      = require('fs'),
-    url     = require('url'),
-    plugins = require('./util/plugins'),
-    xml_helpers = require('./util/xml-helpers'),
-    events = require('./events'),
-    metadata = require('./util/metadata'),
-    path    = require('path'),
-    Q       = require('q'),
-    registry = require('./registry/registry');
-// XXX: leave the require('../plugman') because jasmine shits itself if you declare it up top
-// possible options: link, subdir, git_ref, client, expected_id
-// Returns a promise.
-module.exports = function fetchPlugin(plugin_src, plugins_dir, options) {
-    // Ensure the containing directory exists.
-    shell.mkdir('-p', plugins_dir);
-
-    options = options || {};
-    options.subdir = options.subdir || '.';
-    options.searchpath = options.searchpath || [];
-    if ( typeof options.searchpath === 'string' ) {
-        options.searchpath = options.searchpath.split(path.delimiter);
-    }
-
-    // clone from git repository
-    var uri = url.parse(plugin_src);
-
-    // If the hash exists, it has the form from npm: http://foo.com/bar#git-ref[:subdir]
-    // NB: No leading or trailing slash on the subdir.
-    if (uri.hash) {
-        var result = uri.hash.match(/^#([^:]*)(?::\/?(.*?)\/?)?$/);
-        if (result) {
-            if (result[1])
-                options.git_ref = result[1];
-            if(result[2])
-                options.subdir = result[2];
-
-            // Recurse and exit with the new options and truncated URL.
-            var new_dir = plugin_src.substring(0, plugin_src.indexOf('#'));
-            return fetchPlugin(new_dir, plugins_dir, options);
-        }
-    }
-
-    // If it looks like a network URL, git clone it.
-    if ( uri.protocol && uri.protocol != 'file:' && uri.protocol != 'c:' && !plugin_src.match(/^\w+:\\/)) {
-        events.emit('log', 'Fetching plugin "' + plugin_src + '" via git clone');
-        if (options.link) {
-            return Q.reject(new Error('--link is not supported for git URLs'));
-        } else {
-            var data = {
-                source: {
-                    type: 'git',
-                    url:  plugin_src,
-                    subdir: options.subdir,
-                    ref: options.git_ref
-                }
-            };
-
-            return plugins.clonePluginGit(plugin_src, plugins_dir, options)
-            .then(function(dir) {
-                return checkID(options.expected_id, dir);
-            })
-            .then(function(dir) {
-                metadata.save_fetch_metadata(dir, data);
-                return dir;
-            });
-        }
-    } else {
-        // If it's not a network URL, it's either a local path or a plugin ID.
-
-        var p,  // The Q promise to be returned.
-            linkable = true,
-            plugin_dir = path.join(plugin_src, options.subdir);
-
-        if (fs.existsSync(plugin_dir)) {
-            p = Q(plugin_dir);
-        } else {
-            // If there is no such local path, it's a plugin id.
-            // First look for it in the local search path (if provided).
-            var local_dir = findLocalPlugin(plugin_src, options.searchpath);
-            if (local_dir) {
-                p = Q(local_dir);
-                events.emit('verbose', 'Found ' + plugin_src + ' at ' + local_dir);
-            } else {
-                // If not found in local search path, fetch from the registry.
-                linkable = false;
-                events.emit('log', 'Fetching plugin "' + plugin_src + '" via plugin registry');
-                p = registry.fetch([plugin_src], options.client);
-            }
-        }
-
-        return p
-        .then(function(dir) {
-                options.plugin_src_dir = dir;
-
-                return copyPlugin(dir, plugins_dir, options.link && linkable);
-            })
-        .then(function(dir) {
-                return checkID(options.expected_id, dir);
-            });
-    }
-};
-
-function readId(dir) {
-    var xml_path = path.join(dir, 'plugin.xml');
-    var et = xml_helpers.parseElementtreeSync(path.join(dir, 'plugin.xml'));
-    var plugin_id = et.getroot().attrib.id;
-    return plugin_id;
-}
-
-// Helper function for checking expected plugin IDs against reality.
-function checkID(expected_id, dir) {
-    if ( expected_id ) {
-        var id = readId(dir);
-        if (expected_id != id) {
-            throw new Error('Expected fetched plugin to have ID "' + expected_id + '" but got "' + id + '".');
-        }
-    }
-    return dir;
-}
-
-var idCache = Object.create(null);
-// Look for plugin in local search path.
-function findLocalPlugin(plugin_id, searchpath) {
-    function tryPath(p) {
-        if (!(p in idCache)) {
-            var id = null;
-            if (fs.existsSync(path.join(p, 'plugin.xml'))) {
-                id = readId(p);
-            }
-            idCache[p] = id;
-        }
-        return (plugin_id === idCache[p]);
-    }
-
-    for (var i = 0; i < searchpath.length; i++) {
-        // Allow search path to point right to a plugin.
-        if (tryPath(searchpath[i])) {
-            return searchpath[i];
-        }
-        var files = fs.readdirSync(searchpath[i]);
-        for (var j = 0; j < files.length; j++) {
-            var pluginPath = path.join(searchpath[i], files[j]);
-            if (tryPath(pluginPath)) {
-                return pluginPath;
-            }
-        }
-    }
-    return null;
-}
-
-
-// Copy or link a plugin from plugin_dir to plugins_dir/plugin_id.
-function copyPlugin(plugin_dir, plugins_dir, link) {
-    var plugin_id = readId(plugin_dir);
-    var dest = path.join(plugins_dir, plugin_id);
-    shell.rm('-rf', dest);
-    if (link) {
-        events.emit('verbose', 'Linking plugin "' + plugin_dir + '" => "' + dest + '"');
-        fs.symlinkSync(plugin_dir, dest, 'dir');
-    } else {
-        shell.mkdir('-p', dest);
-        events.emit('verbose', 'Copying plugin "' + plugin_dir + '" => "' + dest + '"');
-        shell.cp('-R', path.join(plugin_dir, '*') , dest);
-    }
-
-    var data = {
-        source: {
-        type: 'local',
-              path: plugin_dir
-        }
-    };
-    metadata.save_fetch_metadata(dest, data);
-    return dest;
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/info.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/info.js b/cordova-lib/src/plugman/info.js
deleted file mode 100644
index 34c2af7..0000000
--- a/cordova-lib/src/plugman/info.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var registry = require('./registry/registry')
-
-// Returns a promise.
-module.exports = function(plugin) {
-    return registry.info(plugin);
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/install.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/install.js b/cordova-lib/src/plugman/install.js
deleted file mode 100644
index cce145d..0000000
--- a/cordova-lib/src/plugman/install.js
+++ /dev/null
@@ -1,629 +0,0 @@
-var path = require('path'),
-    fs   = require('fs'),
-    action_stack = require('./util/action-stack'),
-    dep_graph = require('dep-graph'),
-    elementtree = require('elementtree'),
-    child_process = require('child_process'),
-    semver = require('semver'),
-    config_changes = require('./util/config-changes'),
-    xml_helpers = require('./util/xml-helpers'),
-    Q = require('q'),
-    platform_modules = require('./platforms'),
-    os = require('os'),
-    underscore = require('underscore'),
-    shell   = require('shelljs'),
-    events = require('./events'),
-    plugman = require('../plugman'),
-    isWindows = (os.platform().substr(0,3) === 'win');
-
-/* INSTALL FLOW
-   ------------
-   There are four functions install "flows" through. Here is an attempt at
-   providing a high-level logic flow overview.
-   1. module.exports (installPlugin)
-     a) checks that the platform is supported
-     b) invokes possiblyFetch
-   2. possiblyFetch
-     a) checks that the plugin is fetched. if so, calls runInstall
-     b) if not, invokes plugman.fetch, and when done, calls runInstall
-   3. runInstall
-     a) checks if the plugin is already installed. if so, calls back (done).
-     b) if possible, will check the version of the project and make sure it is compatible with the plugin (checks <engine> tags)
-     c) makes sure that any variables required by the plugin are specified. if they are not specified, plugman will throw or callback with an error.
-     d) if dependencies are listed in the plugin, it will recurse for each dependent plugin and call possiblyFetch (2) on each one. When each dependent plugin is successfully installed, it will then proceed to call handleInstall (4)
-   4. handleInstall
-     a) queues up actions into a queue (asset, source-file, headers, etc)
-     b) processes the queue
-     c) calls back (done)
-*/
-
-// possible options: subdir, cli_variables, www_dir
-// Returns a promise.
-module.exports = function installPlugin(platform, project_dir, id, plugins_dir, options) {
-    options = options || {};
-    options.is_top_level = true;
-    plugins_dir = plugins_dir || path.join(project_dir, 'cordova', 'plugins');
-
-    if (!platform_modules[platform]) {
-        return Q.reject(new Error(platform + " not supported."));
-    }
-
-    var current_stack = new action_stack();
-
-    return possiblyFetch(id, plugins_dir, options)
-    .then(function(plugin_dir) {
-        return runInstall(current_stack, platform, project_dir, plugin_dir, plugins_dir, options);
-    });
-};
-
-// possible options: subdir, cli_variables, www_dir, git_ref, is_top_level
-// Returns a promise.
-function possiblyFetch(id, plugins_dir, options) {
-
-    // if plugin is a relative path, check if it already exists
-    var plugin_src_dir = path.join(plugins_dir, id);
-    if( isAbsolutePath(id) )
-        plugin_src_dir = id;
-
-    // Check that the plugin has already been fetched.
-    if (fs.existsSync(plugin_src_dir)) {
-        return Q(plugin_src_dir);
-    }
-
-    var opts = underscore.extend({}, options, {
-        link: false,
-        client: 'plugman'
-    });
-
-    // if plugin doesnt exist, use fetch to get it.
-    return plugman.raw.fetch(id, plugins_dir, opts);
-}
-
-function checkEngines(engines) {
-
-    for(var i = 0; i < engines.length; i++) {
-        var engine = engines[i];
-
-        if(semver.satisfies(engine.currentVersion, engine.minVersion) || engine.currentVersion === null){
-            // engine ok!
-        }else{
-            return Q.reject(new Error('Plugin doesn\'t support this project\'s '+engine.name+' version. '+engine.name+': ' + engine.currentVersion + ', failed version requirement: ' + engine.minVersion));
-        }
-    }
-
-    return Q(true);
-}
-
-function cleanVersionOutput(version, name){
-    var out = version.trim();
-    var rc_index = out.indexOf('rc');
-    var dev_index = out.indexOf('dev');
-    if (rc_index > -1) {
-        out = out.substr(0, rc_index) + '-' + out.substr(rc_index);
-    }
-
-    // put a warning about using the dev branch
-    if (dev_index > -1) {
-        // some platform still lists dev branches as just dev, set to null and continue
-        if(out=="dev"){
-            out = null;
-        }
-        events.emit('verbose', name+' has been detected as using a development branch. Attemping to install anyways.');
-    }
-
-    // add extra period/digits to conform to semver - some version scripts will output
-    // just a major or major minor version number
-    var majorReg = /\d+/,
-        minorReg = /\d+\.\d+/,
-        patchReg = /\d+\.\d+\.\d+/;
-
-    if(patchReg.test(out)){
-
-    }else if(minorReg.test(out)){
-        out = out.match(minorReg)[0]+'.0';
-    }else if(majorReg.test(out)){
-        out = out.match(majorReg)[0]+'.0.0';
-    }
-
-    return out;
-}
-
-// exec engine scripts in order to get the current engine version
-// Returns a promise for the array of engines.
-function callEngineScripts(engines) {
-    var engineScriptVersion;
-
-    return Q.all(
-        engines.map(function(engine){
-            // CB-5192; on Windows scriptSrc doesn't have file extension so we shouldn't check whether the script exists
-
-            var scriptPath = engine.scriptSrc ? '"' + engine.scriptSrc + '"' : null;
-
-            if(scriptPath && (isWindows || fs.existsSync(engine.scriptSrc)) ) {
-
-                var d = Q.defer();
-                if(!isWindows) { // not required on Windows
-                    fs.chmodSync(engine.scriptSrc, '755');
-                }
-                child_process.exec(scriptPath, function(error, stdout, stderr) {
-                    if (error) {
-                        events.emit('warn', engine.name +' version check failed ('+ scriptPath +'), continuing anyways.');
-                        engine.currentVersion = null;
-                    } else {
-                        engine.currentVersion = cleanVersionOutput(stdout, engine.name);
-                    }
-
-                    d.resolve(engine);
-                });
-                return d.promise;
-
-            } else {
-
-                if(engine.currentVersion) {
-                    engine.currentVersion = cleanVersionOutput(engine.currentVersion, engine.name)
-                } else {
-                    events.emit('warn', engine.name +' version not detected (lacks script '+ scriptPath +' ), continuing.');
-                }
-
-                return Q(engine);
-            }
-        })
-    );
-}
-
-// return only the engines we care about/need
-function getEngines(pluginElement, platform, project_dir, plugin_dir){
-    var engines = pluginElement.findall('engines/engine');
-    var defaultEngines = require('./util/default-engines')(project_dir);
-    var uncheckedEngines = [];
-    var cordovaEngineIndex, cordovaPlatformEngineIndex, theName, platformIndex, defaultPlatformIndex;
-    // load in known defaults and update when necessary
-
-    engines.forEach(function(engine){
-        theName = engine.attrib["name"];
-
-        // check to see if the engine is listed as a default engine
-        if(defaultEngines[theName]){
-            // make sure engine is for platform we are installing on
-            defaultPlatformIndex = defaultEngines[theName].platform.indexOf(platform);
-            if(defaultPlatformIndex > -1 || defaultEngines[theName].platform === '*'){
-                defaultEngines[theName].minVersion = defaultEngines[theName].minVersion ? defaultEngines[theName].minVersion : engine.attrib["version"];
-                defaultEngines[theName].currentVersion = defaultEngines[theName].currentVersion ? defaultEngines[theName].currentVersion : null;
-                defaultEngines[theName].scriptSrc = defaultEngines[theName].scriptSrc ? defaultEngines[theName].scriptSrc : null;
-                defaultEngines[theName].name = theName;
-
-                // set the indices so we can pop the cordova engine when needed
-                if(theName==='cordova') cordovaEngineIndex = uncheckedEngines.length;
-                if(theName==='cordova-'+platform) cordovaPlatformEngineIndex = uncheckedEngines.length;
-
-                uncheckedEngines.push(defaultEngines[theName]);
-            }
-        // check for other engines
-        }else{
-            platformIndex = engine.attrib["platform"].indexOf(platform);
-            if(platformIndex > -1 || engine.attrib["platform"] === '*'){
-                uncheckedEngines.push({ 'name': theName, 'platform': engine.attrib["platform"], 'scriptSrc':path.resolve(plugin_dir, engine.attrib["scriptSrc"]), 'minVersion' :  engine.attrib["version"]});
-            }
-        }
-    });
-
-    // make sure we check for platform req's and not just cordova reqs
-    if(cordovaEngineIndex && cordovaPlatformEngineIndex) uncheckedEngines.pop(cordovaEngineIndex);
-    return uncheckedEngines;
-}
-
-
-function isPluginInstalled(plugins_dir, platform, plugin_id) {
-    var platform_config = config_changes.get_platform_json(plugins_dir, platform);
-    for (var installed_plugin_id in platform_config.installed_plugins) {
-        if (installed_plugin_id == plugin_id) {
-            return true;
-        }
-    }
-    for (var installed_plugin_id in platform_config.dependent_plugins) {
-        if (installed_plugin_id == plugin_id) {
-            return true;
-        }
-    }
-    return false;
-}
-
-// possible options: cli_variables, www_dir, is_top_level
-// Returns a promise.
-var runInstall = module.exports.runInstall = function runInstall(actions, platform, project_dir, plugin_dir, plugins_dir, options) {
-    var xml_path     = path.join(plugin_dir, 'plugin.xml')
-      , plugin_et    = xml_helpers.parseElementtreeSync(xml_path)
-      , filtered_variables = {};
-    var name         = plugin_et.findall('name').text;
-    var plugin_id    = plugin_et.getroot().attrib['id'];
-
-    options = options || {};
-    options.graph = options.graph || new dep_graph();
-
-    if (isPluginInstalled(plugins_dir, platform, plugin_id)) {
-        if (options.is_top_level) {
-            events.emit('results', 'Plugin "' + plugin_id + '" already installed on ' + platform + '.');
-        } else {
-            events.emit('verbose', 'Dependent plugin "' + plugin_id + '" already installed on ' + platform + '.');
-        }
-        return Q();
-    }
-    events.emit('log', 'Installing "' + plugin_id + '" for ' + platform);
-
-    var theEngines = getEngines(plugin_et, platform, project_dir, plugin_dir);
-
-    var install = {
-        actions: actions,
-        platform: platform,
-        project_dir: project_dir,
-        plugins_dir: plugins_dir,
-        top_plugin_id: plugin_id,
-        top_plugin_dir: plugin_dir
-    }
-
-    return callEngineScripts(theEngines)
-    .then(checkEngines)
-    .then(
-        function() {
-            // checking preferences, if certain variables are not provided, we should throw.
-            var prefs = plugin_et.findall('./preference') || [];
-            prefs = prefs.concat(plugin_et.findall('./platform[@name="'+platform+'"]/preference'));
-            var missing_vars = [];
-            prefs.forEach(function (pref) {
-                var key = pref.attrib["name"].toUpperCase();
-                options.cli_variables = options.cli_variables || {};
-                if (options.cli_variables[key] === undefined)
-                    missing_vars.push(key)
-                else
-                    filtered_variables[key] = options.cli_variables[key]
-            });
-            install.filtered_variables = filtered_variables;
-
-            if (missing_vars.length > 0) {
-                throw new Error('Variable(s) missing: ' + missing_vars.join(", "));
-            }
-
-            // Check for dependencies
-            var dependencies = plugin_et.findall('dependency') || [];
-            dependencies = dependencies.concat(plugin_et.findall('./platform[@name="'+platform+'"]/dependency'));
-            if(dependencies && dependencies.length) {
-                return installDependencies(install, dependencies, options);
-            }
-            return Q(true);
-        }
-    ).then(
-        function(){
-            var install_plugin_dir = path.join(plugins_dir, plugin_id);
-
-            // may need to copy to destination...
-            if ( !fs.existsSync(install_plugin_dir) ) {
-                copyPlugin(plugin_dir, plugins_dir, options.link);
-            }
-
-            return handleInstall(actions, plugin_id, plugin_et, platform, project_dir, plugins_dir, install_plugin_dir, filtered_variables, options.www_dir, options.is_top_level);
-        }
-    ).fail(
-        function (error) {
-            events.emit('warn', "Failed to install '"+plugin_id+"':"+ error.stack);
-            throw error;
-        }
-    );
-}
-
-function installDependencies(install, dependencies, options) {
-    events.emit('verbose', 'Dependencies detected, iterating through them...');
-
-    var top_plugins = path.join(options.plugin_src_dir || install.top_plugin_dir, '..')
-
-    // Add directory of top-level plugin to search path
-    options.searchpath = options.searchpath || [];
-    if( top_plugins != install.plugins_dir && options.searchpath.indexOf(top_plugins) == -1 )
-        options.searchpath.push(top_plugins);
-
-    // Search for dependency by Id is:
-    // a) Look for {$top_plugins}/{$depId} directory
-    // b) Scan the top level plugin directory {$top_plugins} for matching id (searchpath)
-    // c) Fetch from registry
-
-    return dependencies.reduce(function(soFar, depXml) {
-        return soFar.then(
-            function() {
-                var dep = {
-                    id: depXml.attrib.id,
-                    subdir: depXml.attrib.subdir || '',
-                    url: depXml.attrib.url || '',
-                    git_ref: depXml.attrib.commit
-                }
-
-                if (dep.subdir.length) {
-                    dep.subdir = path.normalize(dep.subdir);
-                }
-
-                if (!dep.id) {
-                    throw new Error('<dependency> tag is missing id attribute: ' + elementtree.tostring(depXml, {xml_declaration:false}));
-                }
-
-                // We build the dependency graph only to be able to detect cycles, getChain will throw an error if it detects one
-                options.graph.add(install.top_plugin_id, dep.id);
-                options.graph.getChain(install.top_plugin_id);
-
-                return tryFetchDependency(dep, install, options)
-                .then(
-                    function(url){
-                        dep.url = url;
-                        return installDependency(dep, install, options);
-                    }
-                );
-            }
-        );
-
-    }, Q(true));
-}
-
-function tryFetchDependency(dep, install, options) {
-
-    // Handle relative dependency paths by expanding and resolving them.
-    // The easy case of relative paths is to have a URL of '.' and a different subdir.
-    // TODO: Implement the hard case of different repo URLs, rather than the special case of
-    // same-repo-different-subdir.
-    if ( dep.url == '.' ) {
-
-        // Look up the parent plugin's fetch metadata and determine the correct URL.
-        var fetchdata = require('./util/metadata').get_fetch_metadata(install.top_plugin_dir);
-        if (!fetchdata || !(fetchdata.source && fetchdata.source.type)) {
-
-            var relativePath = dep.subdir || dep.id;
-
-            events.emit('warn', 'No fetch metadata found for plugin ' + install.top_plugin_id + '. checking for ' + relativePath + ' in '+ options.searchpath.join(','));
-
-            return Q(relativePath);
-        }
-
-        // Now there are two cases here: local directory, and git URL.
-        var d = Q.defer();
-
-        if (fetchdata.source.type === 'local') {
-
-            dep.url = fetchdata.source.path;
-
-            child_process.exec('git rev-parse --show-toplevel', { cwd:dep.url }, function(err, stdout, stderr) {
-                if (err) {
-                    if (err.code == 128) {
-                        return d.reject(new Error('Plugin ' + dep.id + ' is not in git repository. All plugins must be in a git repository.'));
-                    } else {
-                        return d.reject(new Error('Failed to locate git repository for ' + dep.id + ' plugin.'));
-                    }
-                }
-                return d.resolve(stdout.trim());
-            });
-
-            return d.promise.then(function(git_repo) {
-                //Clear out the subdir since the url now contains it
-                var url = path.join(git_repo, dep.subdir);
-                dep.subdir = "";
-                return Q(url);
-            }).fail(function(error){
-//console.log("Failed to resolve url='.': " + error);
-                return Q(dep.url);
-            });
-
-        } else if (fetchdata.source.type === 'git') {
-            return Q(fetchdata.source.url);
-        } else if (fetchdata.source.type === 'dir') {
-
-            // Note: With fetch() independant from install()
-            // $md5 = md5(uri)
-            // Need a Hash(uri) --> $tmpDir/cordova-fetch/git-hostname.com-$md5/
-            // plugin[id].install.source --> searchpath that matches fetch uri
-
-            // mapping to a directory of OS containing fetched plugins
-            var tmpDir = fetchdata.source.url;
-            tmpDir = tmpDir.replace('$tmpDir', os.tmpdir());
-
-            var pluginSrc = '';
-            if(dep.subdir.length) {
-                // Plugin is relative to directory
-                pluginSrc = path.join(tmpDir, dep.subdir);
-            }
-
-            // Try searchpath in dir, if that fails re-fetch
-            if( !pluginSrc.length || !fs.existsSync(pluginSrc) ) {
-                pluginSrc = dep.id;
-
-                // Add search path
-                if( options.searchpath.indexOf(tmpDir) == -1 )
-                    options.searchpath.unshift(tmpDir); // place at top of search
-            }
-
-            return Q( pluginSrc );
-        }
-    }
-
-    // Test relative to parent folder
-    if( dep.url && isRelativePath(dep.url) ) {
-        var relativePath = path.resolve(install.top_plugin_dir, '../' + dep.url);
-
-        if( fs.existsSync(relativePath) ) {
-           dep.url = relativePath;
-        }
-    }
-
-    // CB-4770: registry fetching
-    if(dep.url === undefined) {
-        dep.url = dep.id;
-    }
-
-    return Q(dep.url);
-}
-
-function installDependency(dep, install, options) {
-
-    dep.install_dir = path.join(install.plugins_dir, dep.id);
-
-    if ( fs.existsSync(dep.install_dir) ) {
-        events.emit('verbose', 'Dependent plugin "' + dep.id + '" already fetched, using that version.');
-        var opts = underscore.extend({}, options, {
-            cli_variables: install.filtered_variables,
-            is_top_level: false
-        });
-
-       return runInstall(install.actions, install.platform, install.project_dir, dep.install_dir, install.plugins_dir, opts);
-
-    } else {
-        events.emit('verbose', 'Dependent plugin "' + dep.id + '" not fetched, retrieving then installing.');
-
-        var opts = underscore.extend({}, options, {
-            cli_variables: install.filtered_variables,
-            is_top_level: false,
-            subdir: dep.subdir,
-            git_ref: dep.git_ref,
-            expected_id: dep.id
-        });
-
-        var dep_src = dep.url.length ? dep.url : dep.id;
-
-        return possiblyFetch(dep_src, install.plugins_dir, opts)
-        .then(
-            function(plugin_dir) {
-                return runInstall(install.actions, install.platform, install.project_dir, plugin_dir, install.plugins_dir, opts);
-            }
-        );
-    };
-}
-
-function handleInstall(actions, plugin_id, plugin_et, platform, project_dir, plugins_dir, plugin_dir, filtered_variables, www_dir, is_top_level) {
-
-    // @tests - important this event is checked spec/install.spec.js
-    events.emit('verbose', 'Install start for "' + plugin_id + '" on ' + platform + '.');
-
-    var handler = platform_modules[platform];
-    www_dir = www_dir || handler.www_dir(project_dir);
-
-    var platformTag = plugin_et.find('./platform[@name="'+platform+'"]');
-    var assets = plugin_et.findall('asset');
-    if (platformTag) {
-
-
-        var sourceFiles = platformTag.findall('./source-file'),
-            headerFiles = platformTag.findall('./header-file'),
-            resourceFiles = platformTag.findall('./resource-file'),
-            frameworkFiles = platformTag.findall('./framework[@custom="true"]'), // CB-5238 adding only custom frameworks
-            libFiles = platformTag.findall('./lib-file'),
-            assets = assets.concat(platformTag.findall('./asset'));
-
-        // queue up native stuff
-        sourceFiles && sourceFiles.forEach(function(item) {
-            actions.push(actions.createAction(handler["source-file"].install,
-                                              [item, plugin_dir, project_dir, plugin_id],
-                                              handler["source-file"].uninstall,
-                                              [item, project_dir, plugin_id]));
-        });
-
-        headerFiles && headerFiles.forEach(function(item) {
-            actions.push(actions.createAction(handler["header-file"].install,
-                                             [item, plugin_dir, project_dir, plugin_id],
-                                             handler["header-file"].uninstall,
-                                             [item, project_dir, plugin_id]));
-        });
-
-        resourceFiles && resourceFiles.forEach(function(item) {
-            actions.push(actions.createAction(handler["resource-file"].install,
-                                              [item, plugin_dir, project_dir, plugin_id],
-                                              handler["resource-file"].uninstall,
-                                              [item, project_dir, plugin_id]));
-        });
-        // CB-5238 custom frameworks only
-        frameworkFiles && frameworkFiles.forEach(function(item) {
-            actions.push(actions.createAction(handler["framework"].install,
-                                             [item, plugin_dir, project_dir, plugin_id],
-                                             handler["framework"].uninstall,
-                                             [item, project_dir, plugin_id]));
-        });
-
-        libFiles && libFiles.forEach(function(item) {
-            actions.push(actions.createAction(handler["lib-file"].install,
-                                                [item, plugin_dir, project_dir, plugin_id],
-                                                handler["lib-file"].uninstall,
-                                                [item, project_dir, plugin_id]));
-
-        });
-    }
-
-    // run through the action stack
-    return actions.process(platform, project_dir)
-    .then(function(err) {
-        // queue up the plugin so prepare knows what to do.
-        config_changes.add_installed_plugin_to_prepare_queue(plugins_dir, plugin_id, platform, filtered_variables, is_top_level);
-        // call prepare after a successful install
-        plugman.prepare(project_dir, platform, plugins_dir, www_dir);
-
-        events.emit('verbose', 'Install complete for ' + plugin_id + ' on ' + platform + '.');
-        // WIN!
-        // Log out plugin INFO element contents in case additional install steps are necessary
-        var info = plugin_et.findall('./info');
-        if(info.length) {
-            events.emit('results', interp_vars(filtered_variables, info[0].text));
-        }
-        info = (platformTag ? platformTag.findall('./info') : []);
-        if(info.length) {
-            events.emit('results', interp_vars(filtered_variables, info[0].text));
-        }
-    });
-}
-
-function interp_vars(vars, text) {
-    vars && Object.keys(vars).forEach(function(key) {
-        var regExp = new RegExp("\\$" + key, "g");
-        text = text.replace(regExp, vars[key]);
-    });
-    return text;
-}
-
-function isAbsolutePath(path) {
-    return path && (path[0] === '/' || path[0] === '\\' || path.indexOf(':\\') > 0 );
-}
-
-function isRelativePath(path) {
-    return !isAbsolutePath();
-}
-
-function readId(plugin_dir) {
-    var xml_path = path.join(plugin_dir, 'plugin.xml');
-    events.emit('verbose', 'Fetch is reading plugin.xml from location "' + xml_path + '"...');
-    var et = xml_helpers.parseElementtreeSync(xml_path);
-
-    return et.getroot().attrib.id;
-}
-
-// Copy or link a plugin from plugin_dir to plugins_dir/plugin_id.
-function copyPlugin(plugin_src_dir, plugins_dir, link) {
-    var plugin_id = readId(plugin_src_dir);
-    var dest = path.join(plugins_dir, plugin_id);
-    shell.rm('-rf', dest);
-
-    if (link) {
-        events.emit('verbose', 'Symlinking from location "' + plugin_src_dir + '" to location "' + dest + '"');
-        fs.symlinkSync(plugin_src_dir, dest, 'dir');
-    } else {
-        shell.mkdir('-p', dest);
-        events.emit('verbose', 'Copying from location "' + plugin_src_dir + '" to location "' + dest + '"');
-        shell.cp('-R', path.join(plugin_src_dir, '*') , dest);
-    }
-
-    return dest;
-}
-
-function isPluginInstalled(plugins_dir, platform, plugin_id) {
-    var platform_config = config_changes.get_platform_json(plugins_dir, platform);
-    for (var installed_plugin_id in platform_config.installed_plugins) {
-        if (installed_plugin_id == plugin_id) {
-            return true;
-        }
-    }
-    for (var installed_plugin_id in platform_config.dependent_plugins) {
-        if (installed_plugin_id == plugin_id) {
-            return true;
-        }
-    }
-    return false;
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/owner.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/owner.js b/cordova-lib/src/plugman/owner.js
deleted file mode 100644
index 9eaf152..0000000
--- a/cordova-lib/src/plugman/owner.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var registry = require('./registry/registry');
-
-// Returns a promise.
-module.exports = function(args) {
-    return registry.owner(args);
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/platform.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platform.js b/cordova-lib/src/plugman/platform.js
deleted file mode 100644
index c80ac75..0000000
--- a/cordova-lib/src/plugman/platform.js
+++ /dev/null
@@ -1,119 +0,0 @@
-var Q = require('q'),
-    et = require('elementtree'),
-    fs = require('fs'),
-    shell = require('shelljs'),
-    path = require('path');
-
-module.exports = {
-    add: function( platformName ) {
-        var pluginxml,
-            platform;
-
-        //check to make sure we are in the plugin first
-        if( !fs.existsSync( 'plugin.xml' ) ) {
-            return Q.reject( new Error( "can't find a plugin.xml.  Are you in the plugin?" ) );
-        }
-
-        //Get the current plugin.xml file
-        pluginxml = et.parse( fs.readFileSync('plugin.xml', 'utf-8') );
-
-        //Check if this platform exists
-        if( pluginxml.find("./platform/[@name='"+ platformName +"']") ) {
-            return Q.reject( new Error( "platform: " + platformName + " already added"  ) );
-        }
-
-        //Get the platform specific elements
-        platform = doPlatform( platformName, pluginxml.find("./name").text, pluginxml.getroot().get( "id" ) );
-
-        //Make sure we support it
-        if( !platform ) {
-            return Q.reject( new Error( "platform: " + platformName + " not yet supported"  ) );
-        }
-
-        pluginxml.getroot().append( platform.getroot() );
-
-        fs.writeFileSync( "plugin.xml", pluginxml.write( "plugin.xml", {indent: 4} ), 'utf-8' );
-        return Q();
-    },
-    remove: function( platformName ) {
-        //check to make sure we are in the plugin first
-        if( !fs.existsSync( 'plugin.xml' ) ) {
-            return Q.reject( new Error( "can't find a plugin.xml.  Are you in the plugin?" ) );
-        }
-
-        //Get the current plugin.xml file
-        pluginxml = et.parse( fs.readFileSync('plugin.xml', 'utf-8') );
-
-        //Check if this platform exists
-        if( !pluginxml.find("./platform/[@name='"+ platformName +"']") ) {
-            return Q.reject( new Error( "platform: " + platformName + " hasn't been added"  ) );
-        }
-
-        //Remove the Platform in question
-        pluginxml.getroot().remove( 0, pluginxml.find("./platform/[@name='"+ platformName +"']") );
-
-        //Rewrite the plugin.xml file back out
-        fs.writeFileSync( "plugin.xml", pluginxml.write( "plugin.xml", {indent: 4} ), 'utf-8' );
-
-        //Remove the src/"platform"
-        shell.rm( '-rf', 'src/' + platformName );
-
-        return Q();
-    }
-};
-
-function doPlatform( platformName, pluginName, pluginID, pluginVersion ) {
-    var docDir = path.join(__dirname, '..', 'doc/platforms/' + platformName + "/"),
-        platformFile = docDir + platformName + ".xml",
-        platform;
-
-    if( !fs.existsSync( platformFile ) ) {
-        return false;
-    }
-
-    platform = fs.readFileSync( platformFile, 'utf-8' )
-                .replace( /%pluginName%/g, pluginName )
-                .replace( /%pluginID%/g, pluginID )
-                .replace( /%packageName%/g, pluginID.replace( /[.]/g, '/' ) );
-    platform = new et.ElementTree( et.XML( platform ) );
-
-    doPlatformBase( docDir, platformName, pluginName, pluginID, pluginVersion );
-
-    return platform;
-}
-
-function doPlatformBase( docDir, platformName, pluginName, pluginID, pluginVersion ) {
-    //Create the default plugin file
-    var baseFiles = [],
-        i = 0;
-
-    switch( platformName ) {
-    case 'android':
-        baseFiles.push (
-            {
-                file: fs.readFileSync( docDir + "base.java", "utf-8" )
-                    .replace( /%pluginName%/g, pluginName )
-                    .replace( /%pluginID%/g, pluginID ),
-                extension: "java"
-            }
-        );
-
-        break;
-    case 'ios':
-        baseFiles.push(
-            {
-                file: fs.readFileSync( docDir + "base.m", "utf-8" )
-                    .replace( /%pluginName%/g, pluginName ),
-                extension: "m"
-            }
-        );
-        break;
-    }
-
-    shell.mkdir( '-p', 'src/' + platformName );
-
-    for( i; i < baseFiles.length; i++ ) {
-        fs.writeFileSync( 'src/' + platformName + '/' + pluginName + '.' + baseFiles[ i ].extension, baseFiles[ i ].file, 'utf-8' );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/platform_operation.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platform_operation.js b/cordova-lib/src/plugman/platform_operation.js
deleted file mode 100644
index e17f5db..0000000
--- a/cordova-lib/src/plugman/platform_operation.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var platform = require('./platform');
-
-module.exports = function( args ) {
-    return platform[ args.operation ]( args.platform_name );
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/platforms.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms.js b/cordova-lib/src/plugman/platforms.js
deleted file mode 100644
index a2ad634..0000000
--- a/cordova-lib/src/plugman/platforms.js
+++ /dev/null
@@ -1,12 +0,0 @@
-module.exports = {
-    'android': require('./platforms/android'),
-    'amazon-fireos': require('./platforms/amazon-fireos'),
-    'ios': require('./platforms/ios'),
-    'blackberry10': require('./platforms/blackberry10'),
-    'wp7': require('./platforms/wp7'),
-    'wp8': require('./platforms/wp8'),
-    'windows8' : require('./platforms/windows8'),
-    'firefoxos': require('./platforms/firefoxos'),
-    'ubuntu': require('./platforms/ubuntu'),
-    'tizen': require('./platforms/tizen')
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/platforms/amazon-fireos.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/amazon-fireos.js b/cordova-lib/src/plugman/platforms/amazon-fireos.js
deleted file mode 100644
index adfc847..0000000
--- a/cordova-lib/src/plugman/platforms/amazon-fireos.js
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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 fs = require('fs')  // use existsSync in 0.6.x
-   , path = require('path')
-   , common = require('./common')
-   , events = require('../events')
-   , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
-
-module.exports = {
-    www_dir:function(project_dir) {
-        return path.join(project_dir, 'assets', 'www');
-    },
-    // reads the package name out of the Android Manifest file
-    // @param string project_dir the absolute path to the directory containing the project
-    // @return string the name of the package
-    package_name:function (project_dir) {
-        var mDoc = xml_helpers.parseElementtreeSync(path.join(project_dir, 'AndroidManifest.xml'));
-
-        return mDoc._root.attrib['package'];
-    },
-    "source-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
-            common.copyFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
-            common.deleteJava(project_dir, dest);
-        }
-    },
-    "header-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'header-fileinstall is not supported for amazon-fireos');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'header-file.uninstall is not supported for amazon-fireos');
-        }
-    },
-    "lib-file":{
-        install:function(lib_el, plugin_dir, project_dir, plugin_id) {
-            var src = lib_el.attrib.src;
-            var dest = path.join("libs", path.basename(src));
-            common.copyFile(plugin_dir, src, project_dir, dest);
-        },
-        uninstall:function(lib_el, project_dir, plugin_id) {
-            var src = lib_el.attrib.src;
-            var dest = path.join("libs", path.basename(src));
-            common.removeFile(project_dir, dest);
-        }
-    },
-    "resource-file":{
-        install:function(el, plugin_dir, project_dir, plugin_id) {
-            var src = el.attrib.src;
-            var target = el.attrib.target;
-            events.emit('verbose', 'Copying resource file ' + src + ' to ' + target);
-            common.copyFile(plugin_dir, src, project_dir, target);
-        },
-        uninstall:function(el, project_dir, plugin_id) {
-            var target = el.attrib.target;
-            common.removeFile(project_dir, target);
-        }
-    },
-    "framework": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.install is not supported for amazon-fireos');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.uninstall is not supported for amazon-fireos');
-        }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/platforms/android.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/android.js b/cordova-lib/src/plugman/platforms/android.js
deleted file mode 100644
index c323790..0000000
--- a/cordova-lib/src/plugman/platforms/android.js
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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 fs = require('fs')  // use existsSync in 0.6.x
-   , path = require('path')
-   , common = require('./common')
-   , events = require('../events')
-   , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
-
-module.exports = {
-    www_dir:function(project_dir) {
-        return path.join(project_dir, 'assets', 'www');
-    },
-    // reads the package name out of the Android Manifest file
-    // @param string project_dir the absolute path to the directory containing the project
-    // @return string the name of the package
-    package_name:function (project_dir) {
-        var mDoc = xml_helpers.parseElementtreeSync(path.join(project_dir, 'AndroidManifest.xml'));
-
-        return mDoc._root.attrib['package'];
-    },
-    "source-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
-
-            common.copyNewFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
-            common.deleteJava(project_dir, dest);
-        }
-    },
-    "header-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'header-file.install is not supported for android');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'header-file.uninstall is not supported for android');
-        }
-    },
-    "lib-file":{
-        install:function(lib_el, plugin_dir, project_dir, plugin_id) {
-            var src = lib_el.attrib.src;
-            var dest = path.join("libs", path.basename(src));
-            common.copyFile(plugin_dir, src, project_dir, dest);
-        },
-        uninstall:function(lib_el, project_dir, plugin_id) {
-            var src = lib_el.attrib.src;
-            var dest = path.join("libs", path.basename(src));
-            common.removeFile(project_dir, dest);
-        }
-    },
-    "resource-file":{
-        install:function(el, plugin_dir, project_dir, plugin_id) {
-            var src = el.attrib.src;
-            var target = el.attrib.target;
-            events.emit('verbose', 'Copying resource file ' + src + ' to ' + target);
-            common.copyFile(plugin_dir, src, project_dir, path.normalize(target));
-        },
-        uninstall:function(el, project_dir, plugin_id) {
-            var target = el.attrib.target;
-            common.removeFile(project_dir, path.normalize(target));
-        }
-    },
-    "framework": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.install is not supported for android');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.uninstall is not supported for android');
-        }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/platforms/blackberry10.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/blackberry10.js b/cordova-lib/src/plugman/platforms/blackberry10.js
deleted file mode 100644
index 9e370b6..0000000
--- a/cordova-lib/src/plugman/platforms/blackberry10.js
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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 fs = require('fs')  // use existsSync in 0.6.x
-   , path = require('path')
-   , common = require('./common')
-   , events = require('../events')
-   , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
-
-var TARGETS = ["device", "simulator"];
-
-module.exports = {
-    www_dir:function(project_dir) {
-        return path.join(project_dir, 'www');
-    },
-    package_name:function(project_dir) {
-        var config_path = path.join(module.exports.www_dir(project_dir), 'config.xml');
-        var widget_doc = xml_helpers.parseElementtreeSync(config_path);
-        return widget_doc._root.attrib['id'];
-    },
-    "source-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            var src = source_el.attrib['src'];
-            var target = source_el.attrib['target-dir'] || plugin_id;
-            TARGETS.forEach(function(arch) {
-                var dest = path.join("native", arch, "chrome", "plugin", target, path.basename(src));
-
-                common.copyNewFile(plugin_dir, src, project_dir, dest);
-            });
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            var src = source_el.attrib['src'];
-            var target = source_el.attrib['target-dir'] || plugin_id;
-            TARGETS.forEach(function(arch) {
-                var dest = path.join("native", arch, "chrome", "plugin", target, path.basename(src));
-                common.removeFile(project_dir, dest);
-            });
-        }
-    },
-    "header-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'header-file.install is not supported for blackberry');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'header-file.uninstall is not supported for blackberry');
-        }
-    },
-    "lib-file":{
-        install:function(lib_el, plugin_dir, project_dir, plugin_id) {
-            var src = lib_el.attrib.src;
-            var arch = lib_el.attrib.arch;
-            var dest = path.join("native", arch, "plugins", "jnext", path.basename(src));
-            common.copyFile(plugin_dir, src, project_dir, dest);
-        },
-        uninstall:function(lib_el, project_dir, plugin_id) {
-            var src = lib_el.attrib.src;
-            var arch = lib_el.attrib.arch;
-            var dest = path.join("native", arch, "plugins", "jnext", path.basename(src));
-            common.removeFile(project_dir, dest);
-        }
-    },
-    "resource-file":{
-        install:function(el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'resource-file.install is not supported for blackberry');
-        },
-        uninstall:function(el, project_dir, plugin_id) {
-            events.emit('verbose', 'resource-file.uninstall is not supported for blackberry');
-        }
-    },
-    "framework": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.install is not supported for blackberry');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.uninstall is not supported for blackberry');
-        }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/platforms/common.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/common.js b/cordova-lib/src/plugman/platforms/common.js
deleted file mode 100644
index 399da00..0000000
--- a/cordova-lib/src/plugman/platforms/common.js
+++ /dev/null
@@ -1,94 +0,0 @@
-var shell = require('shelljs'),
-    path  = require('path'),
-    fs    = require('fs'),
-    common;
-
-module.exports = common = {
-    // helper for resolving source paths from plugin.xml
-    resolveSrcPath:function(plugin_dir, relative_path) {
-        var full_path = path.resolve(plugin_dir, relative_path);
-        return full_path;
-    },
-    // helper for resolving target paths from plugin.xml into a cordova project
-    resolveTargetPath:function(project_dir, relative_path) {
-        var full_path = path.resolve(project_dir, relative_path);
-        return full_path;
-    },
-    // Many times we simply need to copy shit over, knowing if a source path doesnt exist or if a target path already exists
-    copyFile:function(plugin_dir, src, project_dir, dest) {
-        src = module.exports.resolveSrcPath(plugin_dir, src);
-        if (!fs.existsSync(src)) throw new Error('"' + src + '" not found!');
-        dest = module.exports.resolveTargetPath(project_dir, dest);
-        shell.mkdir('-p', path.dirname(dest));
-
-        // XXX shelljs decides to create a directory when -R|-r is used which sucks. http://goo.gl/nbsjq
-        if(fs.statSync(src).isDirectory()) {
-            shell.cp('-Rf', src+'/*', dest);
-        } else {
-            shell.cp('-f', src, dest);
-        }
-    },
-    // Same as copy file but throws error if target exists
-    copyNewFile:function(plugin_dir, src, project_dir, dest) {
-        var target_path = common.resolveTargetPath(project_dir, dest);
-        if (fs.existsSync(target_path))
-            throw new Error('"' + target_path + '" already exists!');
-
-        common.copyFile(plugin_dir, src, project_dir, dest);
-    },
-    // checks if file exists and then deletes. Error if doesn't exist
-    removeFile:function(project_dir, src) {
-        var file = module.exports.resolveSrcPath(project_dir, src);
-        shell.rm('-Rf', file);
-    },
-    // deletes file/directory without checking
-    removeFileF:function(file) {
-        shell.rm('-Rf', file);
-    },
-    // Sometimes we want to remove some java, and prune any unnecessary empty directories
-    deleteJava:function(project_dir, destFile) {
-        var file = path.resolve(project_dir, destFile);
-        if (!fs.existsSync(file)) return;
-
-        common.removeFileF(file);
-
-        // check if directory is empty
-        var curDir = path.dirname(file);
-
-        while(curDir !== path.resolve(project_dir, 'src')) {
-            if(fs.existsSync(curDir) && fs.readdirSync(curDir) == 0) {
-                fs.rmdirSync(curDir);
-                curDir = path.resolve(curDir, '..');
-            } else {
-                // directory not empty...do nothing
-                break;
-            }
-        }
-    },
-    // handle <asset> elements
-    asset:{
-        install:function(asset_el, plugin_dir, www_dir) {
-            var src = asset_el.attrib.src;
-            var target = asset_el.attrib.target;
-
-            if (!src) {
-                throw new Error('<asset> tag without required "src" attribute');
-            }
-            if (!target) {
-                throw new Error('<asset> tag without required "target" attribute');
-            }
-
-            common.copyFile(plugin_dir, src, www_dir, target);
-        },
-        uninstall:function(asset_el, www_dir, plugin_id) {
-            var target = asset_el.attrib.target || asset_el.attrib.src;
-
-            if (!target) {
-                throw new Error('<asset> tag without required "target" attribute');
-            }
-
-            common.removeFile(www_dir, target);
-            common.removeFileF(path.resolve(www_dir, 'plugins', plugin_id));
-        }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/platforms/firefoxos.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/firefoxos.js b/cordova-lib/src/plugman/platforms/firefoxos.js
deleted file mode 100644
index efbeba9..0000000
--- a/cordova-lib/src/plugman/platforms/firefoxos.js
+++ /dev/null
@@ -1,72 +0,0 @@
-var path = require('path')
-    , fs = require('fs')
-    , common = require('./common')
-    , events = require('../events')
-    , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
-
-module.exports = {
-    www_dir: function(project_dir) {
-        return path.join(project_dir, 'www');
-    },
-    package_name:function(project_dir) {
-        // preferred location if cordova >= 3.4
-        var preferred_path = path.join(project_dir, 'config.xml');
-        if (!fs.existsSync(preferred_path)) {
-            // older location
-            old_config_path = path.join(module.exports.www_dir(project_dir), 'config.xml');
-            if (!fs.existsSync(old_config_path)) {
-                // output newer location and fail reading
-                config_path = preferred_path;
-                events.emit('verbose', 'unable to find '+config_path);
-            } else {
-                config_path = old_config_path;
-            }
-        } else {
-            config_path = preferred_path;
-        }
-        var widget_doc = xml_helpers.parseElementtreeSync(config_path);
-        return widget_doc._root.attrib['id'];
-    },
-    "source-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
-            common.copyFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
-            common.removeFile(project_dir, dest);
-        }
-    },
-    "header-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'header-fileinstall is not supported for firefoxos');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'header-file.uninstall is not supported for firefoxos');
-        }
-    },
-    "resource-file":{
-        install:function(el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'resource-file.install is not supported for firefoxos');
-        },
-        uninstall:function(el, project_dir, plugin_id) {
-            events.emit('verbose', 'resource-file.uninstall is not supported for firefoxos');
-        }
-    },
-    "framework": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.install is not supported for firefoxos');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.uninstall is not supported for firefoxos');
-        }
-    },
-    "lib-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.install is not supported for firefoxos');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.uninstall is not supported for firefoxos');
-        }
-    }
-};


[57/70] Remove all cordova-lib files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/src/ios/EPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/src/ios/EPluginCommand.h b/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/src/ios/EPluginCommand.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/src/ios/EPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/src/ios/EPluginCommand.m b/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/src/ios/EPluginCommand.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/www/plugin-e.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/www/plugin-e.js b/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/www/plugin-e.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/plugin.xml b/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/plugin.xml
deleted file mode 100644
index 57d96d9..0000000
--- a/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/plugin.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="E"
-    version="0.6.0">
-
-    <name>Plugin E</name>
-
-    <asset src="www/plugin-e.js" target="plugin-e.js" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-    </config-file>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="plugins">
-            <plugin name="E"
-                value="com.phonegap.E.E"/>
-        </config-file>
-
-        <source-file src="src/android/E.java"
-                target-dir="src/com/phonegap/E" />
-    </platform>
-
-        
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="plugins">
-            <plugin name="E"
-                value="EPluginCommand"/>
-        </config-file>
-
-        <header-file src="src/ios/EPluginCommand.h" />
-        <source-file src="src/ios/EPluginCommand.m"/>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/android/E.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/android/E.java b/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/android/E.java
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/ios/EPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/ios/EPluginCommand.h b/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/ios/EPluginCommand.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/ios/EPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/ios/EPluginCommand.m b/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/ios/EPluginCommand.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/www/plugin-e.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/www/plugin-e.js b/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/www/plugin-e.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/multiple-children/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/multiple-children/plugin.xml b/cordova-lib/spec-plugman/plugins/multiple-children/plugin.xml
deleted file mode 100644
index fd10a04..0000000
--- a/cordova-lib/spec-plugman/plugins/multiple-children/plugin.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="com.pushwoosh.plugins.pushwoosh"
-    version="3.0.0">
-
-    <name>Pushwoosh</name>
-
-    <!-- android -->
-    <platform name="android">
-		<config-file target="AndroidManifest.xml" parent="/manifest">
-			<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
-			
-			<!--library-->
-			<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
-			
-			<!-- GCM connects to Google Services. -->
-			<uses-permission android:name="android.permission.INTERNET"/>
-			
-			<!-- GCM requires a Google account. -->
-			<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
-			
-			<!-- Keeps the processor from sleeping when a message is received. -->
-			<uses-permission android:name="android.permission.WAKE_LOCK"/>
-			
-			<!--
-			 Creates a custom permission so only this app can receive its messages.
-			 
-			 NOTE: the permission *must* be called PACKAGE.permission.C2D_MESSAGE,
-			 where PACKAGE is the application's package name.
-			 -->
-			<permission
-			android:name="$PACKAGE_NAME.permission.C2D_MESSAGE"
-			android:protectionLevel="signature"/>
-			<uses-permission
-			android:name="$PACKAGE_NAME.permission.C2D_MESSAGE"/>
-			
-			<!-- This app has permission to register and receive data message. -->
-			<uses-permission
-			android:name="com.google.android.c2dm.permission.RECEIVE"/>
-		</config-file>
-		
-		<config-file target="AndroidManifest.xml" parent="/manifest/application/activity">
-			<intent-filter>
-				<action android:name="$PACKAGE_NAME.MESSAGE"/>
-				<category android:name="android.intent.category.DEFAULT"/>
-			</intent-filter>
-		</config-file>
-
-		<config-file target="AndroidManifest.xml" parent="/manifest/application">
-			<activity android:name="com.arellomobile.android.push.PushWebview"/>
-			
-			<activity android:name="com.arellomobile.android.push.MessageActivity"/>
-			
-			<activity android:name="com.arellomobile.android.push.PushHandlerActivity"/>
-			
-			<!--
-			 BroadcastReceiver that will receive intents from GCM
-			 services and handle them to the custom IntentService.
-			 
-			 The com.google.android.c2dm.permission.SEND permission is necessary
-			 so only GCM services can send data messages for the app.
-			 -->
-			<receiver
-				android:name="com.google.android.gcm.GCMBroadcastReceiver"
-				android:permission="com.google.android.c2dm.permission.SEND">
-				<intent-filter>
-					<!-- Receives the actual messages. -->
-					<action android:name="com.google.android.c2dm.intent.RECEIVE"/>
-					<!-- Receives the registration id. -->
-					<action android:name="com.google.android.c2dm.intent.REGISTRATION"/>
-					<category android:name="$PACKAGE_NAME"/>
-				</intent-filter>
-			</receiver>
-			
-			<!--
-			 Application-specific subclass of PushGCMIntentService that will
-			 handle received messages.
-			 -->
-			<service android:name="com.arellomobile.android.push.PushGCMIntentService"/>        					
-			
-		</config-file>
-		
-		<config-file target="res/xml/plugins.xml" parent="/plugins">
-            <plugin name="PushNotification"
-			value="com.pushwoosh.test.plugin.pushnotifications.PushNotifications" onload="true"/>
-        </config-file>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/shared-deps-multi-child/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/shared-deps-multi-child/plugin.xml b/cordova-lib/spec-plugman/plugins/shared-deps-multi-child/plugin.xml
deleted file mode 100644
index 6c17476..0000000
--- a/cordova-lib/spec-plugman/plugins/shared-deps-multi-child/plugin.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="ca.filmaj.shareddeps"
-    version="1.0.0">
-
-    <name>Sharing Dependencies with the Multi-Child Plugin, woo</name>
-
-    <!-- android -->
-    <platform name="android">
-		<config-file target="AndroidManifest.xml" parent="/manifest">
-			<uses-permission android:name="android.permission.INTERNET"/>
-		</config-file>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/prepare.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/prepare.spec.js b/cordova-lib/spec-plugman/prepare.spec.js
deleted file mode 100644
index 6adaf9a..0000000
--- a/cordova-lib/spec-plugman/prepare.spec.js
+++ /dev/null
@@ -1,59 +0,0 @@
-var platforms = require('../src/platforms'),
-    prepare = require('../src/prepare'),
-    common  = require('../src/platforms/common');
-    fs      = require('fs'),
-    os      = require('osenv'),
-    path    = require('path'),
-    shell   = require('shelljs'),
-    config_changes = require('../src/util/config-changes'),
-    temp    = __dirname,
-    plugins_dir = path.join(temp, 'plugins');
-
-var json = path.join(temp, 'assets', 'www', 'cordova_plugins.json');
-var js = path.join(temp, 'assets', 'www', 'cordova_plugins.js');
-
-describe('prepare', function() {
-    var proc, platform_json, write, mkdir, rm;
-    beforeEach(function() {
-        rm = spyOn(shell, 'rm');
-        mkdir = spyOn(shell, 'mkdir');
-        proc = spyOn(config_changes, 'process');
-        platform_json = spyOn(config_changes, 'get_platform_json').andReturn({installed_plugins:{},dependent_plugins:{},prepare_queue:{uninstalled:[]}});
-        write = spyOn(fs, 'writeFileSync');
-    });
-    it('should create cordova_plugins.js file in a custom www directory', function() {
-        var custom_www = path.join(temp, 'assets', 'custom_www'),
-            js = path.join(temp, 'assets', 'custom_www', 'cordova_plugins.js');
-        prepare(temp, 'android', plugins_dir, custom_www);
-        expect(write).toHaveBeenCalledWith(js, jasmine.any(String), 'utf-8');
-    });
-    describe('handling of js-modules', function() {
-        var copySpy;
-        beforeEach(function() {
-            copySpy = spyOn(common, 'copyFile');
-            platform_json.andReturn({
-                installed_plugins: {plugin_one: '', plugin_two: ''},
-                dependent_plugins: {}, prepare_queue: {uninstalled:[]}
-            });
-        });
-        describe('uninstallation/removal', function() {
-            var existsSync;
-            beforeEach(function() {
-                existsSync = spyOn(fs, 'existsSync').andReturn(true);
-                platform_json.andReturn({installed_plugins:{},dependent_plugins:{},prepare_queue:{uninstalled:[{
-                    plugin:'nickelback',
-                    id:'nickelback',
-                    topLevel:true
-                }]}});
-            });
-            it('should remove any www/plugins directories related to plugins being queued for removal', function() {
-                prepare(temp, 'android', plugins_dir);
-                expect(rm).toHaveBeenCalledWith('-rf', path.join(temp, 'assets', 'www', 'plugins', 'nickelback'));
-            });
-        });
-    });
-    it('should call into config-changes\' process method to do config processing', function() {
-        prepare(temp, 'android', plugins_dir);
-        expect(proc).toHaveBeenCalledWith(plugins_dir, temp, 'android');
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/.gitkeep b/cordova-lib/spec-plugman/projects/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_install/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_install/AndroidManifest.xml b/cordova-lib/spec-plugman/projects/android_install/AndroidManifest.xml
deleted file mode 100644
index b5fea9d..0000000
--- a/cordova-lib/spec-plugman/projects/android_install/AndroidManifest.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<manifest android:versionCode="5" android:versionName="1.1" android:windowSoftInputMode="adjustPan" package="cordova.test.uninstall" xmlns:android="http://schemas.android.com/apk/res/android">
-    <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
-    <application android:debuggable="true" android:icon="@drawable/icon" android:label="@string/app_name">
-        <activity android:configChanges="orientation|keyboardHidden" android:label="@string/app_name" android:name="ChildApp">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-        <activity android:configChanges="orientation|keyboardHidden" android:label="@string/app_name" android:name="com.phonegap.DroidGap">
-            <intent-filter>
-            </intent-filter>
-        </activity>
-        <activity android:label="@string/app_name" android:name="com.phonegap.plugins.dummyplugin.DummyPlugin">
-            <intent-filter />
-        </activity>
-    </application>
-    <uses-sdk android:minSdkVersion="5" />
-</manifest>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_install/cordova/android_sdk_version
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_install/cordova/android_sdk_version b/cordova-lib/spec-plugman/projects/android_install/cordova/android_sdk_version
deleted file mode 100644
index 0ab155c..0000000
--- a/cordova-lib/spec-plugman/projects/android_install/cordova/android_sdk_version
+++ /dev/null
@@ -1 +0,0 @@
-echo 18.0.9
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_install/cordova/version
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_install/cordova/version b/cordova-lib/spec-plugman/projects/android_install/cordova/version
deleted file mode 100644
index 01f68fd..0000000
--- a/cordova-lib/spec-plugman/projects/android_install/cordova/version
+++ /dev/null
@@ -1 +0,0 @@
-echo 9.0.0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_install/cordova/version.bat
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_install/cordova/version.bat b/cordova-lib/spec-plugman/projects/android_install/cordova/version.bat
deleted file mode 100644
index c637d7c..0000000
--- a/cordova-lib/spec-plugman/projects/android_install/cordova/version.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-@ECHO OFF
-echo 9.0.0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_one/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/AndroidManifest.xml b/cordova-lib/spec-plugman/projects/android_one/AndroidManifest.xml
deleted file mode 100644
index 0979b02..0000000
--- a/cordova-lib/spec-plugman/projects/android_one/AndroidManifest.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
-      package="com.alunny.childapp" android:versionName="1.1" android:versionCode="5">
-    <supports-screens
-    	android:largeScreens="true"
-    	android:normalScreens="true"
-    	android:smallScreens="true"
-    	android:xlargeScreens="true"
-    	android:resizeable="true"
-    	android:anyDensity="true"
-    	/>
-
-    <uses-permission android:name="android.permission.CAMERA" />
-    <uses-permission android:name="android.permission.VIBRATE" />
-    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
-    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
-    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
-    <uses-permission android:name="android.permission.INTERNET" />
-    <uses-permission android:name="android.permission.RECEIVE_SMS" />
-    <uses-permission android:name="android.permission.RECORD_AUDIO" />
-    <uses-permission android:name="android.permission.RECORD_VIDEO"/>
-    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
-    <uses-permission android:name="android.permission.READ_CONTACTS" />
-    <uses-permission android:name="android.permission.WRITE_CONTACTS" />   
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />   
-    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
-    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
-    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
-
-    <uses-feature android:name="android.hardware.camera" />
-    <uses-feature android:name="android.hardware.camera.autofocus" />
-    
-    <appid value="$APP_ID" />
-
-    <application android:icon="@drawable/icon" android:label="@string/app_name"
-    	android:debuggable="true">
-		<activity android:name="ChildApp" android:label="@string/app_name" 
-				  android:configChanges="orientation|keyboardHidden">
-			<intent-filter>
-				<action android:name="android.intent.action.MAIN" />
-				<category android:name="android.intent.category.LAUNCHER" />
-			</intent-filter>
-        </activity>
-        <activity android:name="com.phonegap.DroidGap" android:label="@string/app_name" 
-            	  android:configChanges="orientation|keyboardHidden">
-        	<intent-filter>
-        	</intent-filter>
-        </activity>
-    </application>
-
-	<uses-sdk android:minSdkVersion="5" />
-</manifest> 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_one/assets/www/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/assets/www/.gitkeep b/cordova-lib/spec-plugman/projects/android_one/assets/www/.gitkeep
deleted file mode 100644
index e69de29..0000000


[18/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/src/ios/CDVContact.m
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/src/ios/CDVContact.m b/spec/plugins/Contacts/src/ios/CDVContact.m
deleted file mode 100644
index 82704ea..0000000
--- a/spec/plugins/Contacts/src/ios/CDVContact.m
+++ /dev/null
@@ -1,1752 +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.
- */
-
-#import "CDVContact.h"
-#import <Cordova/NSDictionary+Extensions.h>
-
-#define DATE_OR_NULL(dateObj) ((aDate != nil) ? (id)([aDate descriptionWithLocale:[NSLocale currentLocale]]) : (id)([NSNull null]))
-#define IS_VALID_VALUE(value) ((value != nil) && (![value isKindOfClass:[NSNull class]]))
-
-static NSDictionary* org_apache_cordova_contacts_W3CtoAB = nil;
-static NSDictionary* org_apache_cordova_contacts_ABtoW3C = nil;
-static NSSet* org_apache_cordova_contacts_W3CtoNull = nil;
-static NSDictionary* org_apache_cordova_contacts_objectAndProperties = nil;
-static NSDictionary* org_apache_cordova_contacts_defaultFields = nil;
-
-@implementation CDVContact : NSObject
-
-                             @synthesize returnFields;
-
-- (id)init
-{
-    if ((self = [super init]) != nil) {
-        ABRecordRef rec = ABPersonCreate();
-        self.record = rec;
-        if (rec) {
-            CFRelease(rec);
-        }
-    }
-    return self;
-}
-
-- (id)initFromABRecord:(ABRecordRef)aRecord
-{
-    if ((self = [super init]) != nil) {
-        self.record = aRecord;
-    }
-    return self;
-}
-
-/* synthesize 'record' ourselves to have retain properties for CF types */
-
-- (void)setRecord:(ABRecordRef)aRecord
-{
-    if (record != NULL) {
-        CFRelease(record);
-    }
-    if (aRecord != NULL) {
-        record = CFRetain(aRecord);
-    }
-}
-
-- (ABRecordRef)record
-{
-    return record;
-}
-
-/* Rather than creating getters and setters for each AddressBook (AB) Property, generic methods are used to deal with
- * simple properties,  MultiValue properties( phone numbers and emails) and MultiValueDictionary properties (Ims and addresses).
- * The dictionaries below are used to translate between the W3C identifiers and the AB properties.   Using the dictionaries,
- * allows looping through sets of properties to extract from or set into the W3C dictionary to/from the ABRecord.
- */
-
-/* The two following dictionaries translate between W3C properties and AB properties.  It currently mixes both
- * Properties (kABPersonAddressProperty for example) and Strings (kABPersonAddressStreetKey) so users should be aware of
- * what types of values are expected.
- * a bit.
-*/
-+ (NSDictionary*)defaultABtoW3C
-{
-    if (org_apache_cordova_contacts_ABtoW3C == nil) {
-        org_apache_cordova_contacts_ABtoW3C = [NSDictionary dictionaryWithObjectsAndKeys:
-            kW3ContactNickname, [NSNumber numberWithInt:kABPersonNicknameProperty],
-            kW3ContactGivenName, [NSNumber numberWithInt:kABPersonFirstNameProperty],
-            kW3ContactFamilyName, [NSNumber numberWithInt:kABPersonLastNameProperty],
-            kW3ContactMiddleName, [NSNumber numberWithInt:kABPersonMiddleNameProperty],
-            kW3ContactHonorificPrefix, [NSNumber numberWithInt:kABPersonPrefixProperty],
-            kW3ContactHonorificSuffix, [NSNumber numberWithInt:kABPersonSuffixProperty],
-            kW3ContactPhoneNumbers, [NSNumber numberWithInt:kABPersonPhoneProperty],
-            kW3ContactAddresses, [NSNumber numberWithInt:kABPersonAddressProperty],
-            kW3ContactStreetAddress, kABPersonAddressStreetKey,
-            kW3ContactLocality, kABPersonAddressCityKey,
-            kW3ContactRegion, kABPersonAddressStateKey,
-            kW3ContactPostalCode, kABPersonAddressZIPKey,
-            kW3ContactCountry, kABPersonAddressCountryKey,
-            kW3ContactEmails, [NSNumber numberWithInt:kABPersonEmailProperty],
-            kW3ContactIms, [NSNumber numberWithInt:kABPersonInstantMessageProperty],
-            kW3ContactOrganizations, [NSNumber numberWithInt:kABPersonOrganizationProperty],
-            kW3ContactOrganizationName, [NSNumber numberWithInt:kABPersonOrganizationProperty],
-            kW3ContactTitle, [NSNumber numberWithInt:kABPersonJobTitleProperty],
-            kW3ContactDepartment, [NSNumber numberWithInt:kABPersonDepartmentProperty],
-            kW3ContactBirthday, [NSNumber numberWithInt:kABPersonBirthdayProperty],
-            kW3ContactUrls, [NSNumber numberWithInt:kABPersonURLProperty],
-            kW3ContactNote, [NSNumber numberWithInt:kABPersonNoteProperty],
-            nil];
-    }
-
-    return org_apache_cordova_contacts_ABtoW3C;
-}
-
-+ (NSDictionary*)defaultW3CtoAB
-{
-    if (org_apache_cordova_contacts_W3CtoAB == nil) {
-        org_apache_cordova_contacts_W3CtoAB = [NSDictionary dictionaryWithObjectsAndKeys:
-            [NSNumber numberWithInt:kABPersonNicknameProperty], kW3ContactNickname,
-            [NSNumber numberWithInt:kABPersonFirstNameProperty], kW3ContactGivenName,
-            [NSNumber numberWithInt:kABPersonLastNameProperty], kW3ContactFamilyName,
-            [NSNumber numberWithInt:kABPersonMiddleNameProperty], kW3ContactMiddleName,
-            [NSNumber numberWithInt:kABPersonPrefixProperty], kW3ContactHonorificPrefix,
-            [NSNumber numberWithInt:kABPersonSuffixProperty], kW3ContactHonorificSuffix,
-            [NSNumber numberWithInt:kABPersonPhoneProperty], kW3ContactPhoneNumbers,
-            [NSNumber numberWithInt:kABPersonAddressProperty], kW3ContactAddresses,
-            kABPersonAddressStreetKey, kW3ContactStreetAddress,
-            kABPersonAddressCityKey, kW3ContactLocality,
-            kABPersonAddressStateKey, kW3ContactRegion,
-            kABPersonAddressZIPKey, kW3ContactPostalCode,
-            kABPersonAddressCountryKey, kW3ContactCountry,
-            [NSNumber numberWithInt:kABPersonEmailProperty], kW3ContactEmails,
-            [NSNumber numberWithInt:kABPersonInstantMessageProperty], kW3ContactIms,
-            [NSNumber numberWithInt:kABPersonOrganizationProperty], kW3ContactOrganizations,
-            [NSNumber numberWithInt:kABPersonJobTitleProperty], kW3ContactTitle,
-            [NSNumber numberWithInt:kABPersonDepartmentProperty], kW3ContactDepartment,
-            [NSNumber numberWithInt:kABPersonBirthdayProperty], kW3ContactBirthday,
-            [NSNumber numberWithInt:kABPersonNoteProperty], kW3ContactNote,
-            [NSNumber numberWithInt:kABPersonURLProperty], kW3ContactUrls,
-            kABPersonInstantMessageUsernameKey, kW3ContactImValue,
-            kABPersonInstantMessageServiceKey, kW3ContactImType,
-            [NSNull null], kW3ContactFieldType,     /* include entries in dictionary to indicate ContactField properties */
-            [NSNull null], kW3ContactFieldValue,
-            [NSNull null], kW3ContactFieldPrimary,
-            [NSNull null], kW3ContactFieldId,
-            [NSNumber numberWithInt:kABPersonOrganizationProperty], kW3ContactOrganizationName,      /* careful, name is used multiple times*/
-            nil];
-    }
-    return org_apache_cordova_contacts_W3CtoAB;
-}
-
-+ (NSSet*)defaultW3CtoNull
-{
-    // these are values that have no AddressBook Equivalent OR have not been implemented yet
-    if (org_apache_cordova_contacts_W3CtoNull == nil) {
-        org_apache_cordova_contacts_W3CtoNull = [NSSet setWithObjects:kW3ContactDisplayName,
-            kW3ContactCategories, kW3ContactFormattedName, nil];
-    }
-    return org_apache_cordova_contacts_W3CtoNull;
-}
-
-/*
- *	The objectAndProperties dictionary contains the all of the properties of the W3C Contact Objects specified by the key
- *	Used in calcReturnFields, and various extract<Property> methods
- */
-+ (NSDictionary*)defaultObjectAndProperties
-{
-    if (org_apache_cordova_contacts_objectAndProperties == nil) {
-        org_apache_cordova_contacts_objectAndProperties = [NSDictionary dictionaryWithObjectsAndKeys:
-            [NSArray arrayWithObjects:kW3ContactGivenName, kW3ContactFamilyName,
-            kW3ContactMiddleName, kW3ContactHonorificPrefix, kW3ContactHonorificSuffix, kW3ContactFormattedName, nil], kW3ContactName,
-            [NSArray arrayWithObjects:kW3ContactStreetAddress, kW3ContactLocality, kW3ContactRegion,
-            kW3ContactPostalCode, kW3ContactCountry, /*kW3ContactAddressFormatted,*/ nil], kW3ContactAddresses,
-            [NSArray arrayWithObjects:kW3ContactOrganizationName, kW3ContactTitle, kW3ContactDepartment, nil], kW3ContactOrganizations,
-            [NSArray arrayWithObjects:kW3ContactFieldType, kW3ContactFieldValue, kW3ContactFieldPrimary, nil], kW3ContactPhoneNumbers,
-            [NSArray arrayWithObjects:kW3ContactFieldType, kW3ContactFieldValue, kW3ContactFieldPrimary, nil], kW3ContactEmails,
-            [NSArray arrayWithObjects:kW3ContactFieldType, kW3ContactFieldValue, kW3ContactFieldPrimary, nil], kW3ContactPhotos,
-            [NSArray arrayWithObjects:kW3ContactFieldType, kW3ContactFieldValue, kW3ContactFieldPrimary, nil], kW3ContactUrls,
-            [NSArray arrayWithObjects:kW3ContactImValue, kW3ContactImType, nil], kW3ContactIms,
-            nil];
-    }
-    return org_apache_cordova_contacts_objectAndProperties;
-}
-
-+ (NSDictionary*)defaultFields
-{
-    if (org_apache_cordova_contacts_defaultFields == nil) {
-        org_apache_cordova_contacts_defaultFields = [NSDictionary dictionaryWithObjectsAndKeys:
-            [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactName], kW3ContactName,
-            [NSNull null], kW3ContactNickname,
-            [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactAddresses], kW3ContactAddresses,
-            [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactOrganizations], kW3ContactOrganizations,
-            [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactPhoneNumbers], kW3ContactPhoneNumbers,
-            [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactEmails], kW3ContactEmails,
-            [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactIms], kW3ContactIms,
-            [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactPhotos], kW3ContactPhotos,
-            [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactUrls], kW3ContactUrls,
-            [NSNull null], kW3ContactBirthday,
-            [NSNull null], kW3ContactNote,
-            nil];
-    }
-    return org_apache_cordova_contacts_defaultFields;
-}
-
-/*  Translate W3C Contact data into ABRecordRef
- *
- *	New contact information comes in as a NSMutableDictionary.  All Null entries in Contact object are set
- *	as [NSNull null] in the dictionary when translating from the JSON input string of Contact data. However, if
- *  user did not set a value within a Contact object or sub-object (by not using the object constructor) some data
- *	may not exist.
- *  bUpdate = YES indicates this is a save of an existing record
- */
-- (bool)setFromContactDict:(NSDictionary*)aContact asUpdate:(BOOL)bUpdate
-{
-    if (![aContact isKindOfClass:[NSDictionary class]]) {
-        return FALSE; // can't do anything if no dictionary!
-    }
-
-    ABRecordRef person = self.record;
-    bool bSuccess = TRUE;
-    CFErrorRef error;
-
-    // set name info
-    // iOS doesn't have displayName - might have to pull parts from it to create name
-    bool bName = false;
-    NSDictionary* dict = [aContact valueForKey:kW3ContactName];
-    if ([dict isKindOfClass:[NSDictionary class]]) {
-        bName = true;
-        NSArray* propArray = [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactName];
-
-        for (id i in propArray) {
-            if (![(NSString*)i isEqualToString : kW3ContactFormattedName]) { // kW3ContactFormattedName is generated from ABRecordCopyCompositeName() and can't be set
-                [self setValue:[dict valueForKey:i] forProperty:(ABPropertyID)[(NSNumber*)[[CDVContact defaultW3CtoAB] objectForKey:i] intValue]
-                      inRecord:person asUpdate:bUpdate];
-            }
-        }
-    }
-
-    id nn = [aContact valueForKey:kW3ContactNickname];
-    if (![nn isKindOfClass:[NSNull class]]) {
-        bName = true;
-        [self setValue:nn forProperty:kABPersonNicknameProperty inRecord:person asUpdate:bUpdate];
-    }
-    if (!bName) {
-        // if no name or nickname - try and use displayName as W3Contact must have displayName or ContactName
-        [self setValue:[aContact valueForKey:kW3ContactDisplayName] forProperty:kABPersonNicknameProperty
-              inRecord:person asUpdate:bUpdate];
-    }
-
-    // set phoneNumbers
-    // NSLog(@"setting phoneNumbers");
-    NSArray* array = [aContact valueForKey:kW3ContactPhoneNumbers];
-    if ([array isKindOfClass:[NSArray class]]) {
-        [self setMultiValueStrings:array forProperty:kABPersonPhoneProperty inRecord:person asUpdate:bUpdate];
-    }
-    // set Emails
-    // NSLog(@"setting emails");
-    array = [aContact valueForKey:kW3ContactEmails];
-    if ([array isKindOfClass:[NSArray class]]) {
-        [self setMultiValueStrings:array forProperty:kABPersonEmailProperty inRecord:person asUpdate:bUpdate];
-    }
-    // set Urls
-    // NSLog(@"setting urls");
-    array = [aContact valueForKey:kW3ContactUrls];
-    if ([array isKindOfClass:[NSArray class]]) {
-        [self setMultiValueStrings:array forProperty:kABPersonURLProperty inRecord:person asUpdate:bUpdate];
-    }
-
-    // set multivalue dictionary properties
-    // set addresses:  streetAddress, locality, region, postalCode, country
-    // set ims:  value = username, type = servicetype
-    // iOS addresses and im are a MultiValue Properties with label, value=dictionary of  info, and id
-    // NSLog(@"setting addresses");
-    error = nil;
-    array = [aContact valueForKey:kW3ContactAddresses];
-    if ([array isKindOfClass:[NSArray class]]) {
-        [self setMultiValueDictionary:array forProperty:kABPersonAddressProperty inRecord:person asUpdate:bUpdate];
-    }
-    // ims
-    // NSLog(@"setting ims");
-    array = [aContact valueForKey:kW3ContactIms];
-    if ([array isKindOfClass:[NSArray class]]) {
-        [self setMultiValueDictionary:array forProperty:kABPersonInstantMessageProperty inRecord:person asUpdate:bUpdate];
-    }
-
-    // organizations
-    // W3C ContactOrganization has pref, type, name, title, department
-    // iOS only supports name, title, department
-    // NSLog(@"setting organizations");
-    // TODO this may need work - should Organization information be removed when array is empty??
-    array = [aContact valueForKey:kW3ContactOrganizations];  // iOS only supports one organization - use first one
-    if ([array isKindOfClass:[NSArray class]]) {
-        BOOL bRemove = NO;
-        NSDictionary* dict = nil;
-        if ([array count] > 0) {
-            dict = [array objectAtIndex:0];
-        } else {
-            // remove the organization info entirely
-            bRemove = YES;
-        }
-        if ([dict isKindOfClass:[NSDictionary class]] || (bRemove == YES)) {
-            [self setValue:(bRemove ? @"" : [dict valueForKey:@"name"]) forProperty:kABPersonOrganizationProperty inRecord:person asUpdate:bUpdate];
-            [self setValue:(bRemove ? @"" : [dict valueForKey:kW3ContactTitle]) forProperty:kABPersonJobTitleProperty inRecord:person asUpdate:bUpdate];
-            [self setValue:(bRemove ? @"" : [dict valueForKey:kW3ContactDepartment]) forProperty:kABPersonDepartmentProperty inRecord:person asUpdate:bUpdate];
-        }
-    }
-    // add dates
-    // Dates come in as milliseconds in NSNumber Object
-    id ms = [aContact valueForKey:kW3ContactBirthday];
-    NSDate* aDate = nil;
-    if (ms && [ms isKindOfClass:[NSNumber class]]) {
-        double msValue = [ms doubleValue];
-        msValue = msValue / 1000;
-        aDate = [NSDate dateWithTimeIntervalSince1970:msValue];
-    }
-    if ((aDate != nil) || [ms isKindOfClass:[NSString class]]) {
-        [self setValue:aDate != nil ? aDate:ms forProperty:kABPersonBirthdayProperty inRecord:person asUpdate:bUpdate];
-    }
-    // don't update creation date
-    // modification date will get updated when save
-    // anniversary is removed from W3C Contact api Dec 9, 2010 spec - don't waste time on it yet
-
-    // kABPersonDateProperty
-
-    // kABPersonAnniversaryLabel
-
-    // iOS doesn't have gender - ignore
-    // note
-    [self setValue:[aContact valueForKey:kW3ContactNote] forProperty:kABPersonNoteProperty inRecord:person asUpdate:bUpdate];
-
-    // iOS doesn't have preferredName- ignore
-
-    // photo
-    array = [aContact valueForKey:kW3ContactPhotos];
-    if ([array isKindOfClass:[NSArray class]]) {
-        if (bUpdate && ([array count] == 0)) {
-            // remove photo
-            bSuccess = ABPersonRemoveImageData(person, &error);
-        } else if ([array count] > 0) {
-            NSDictionary* dict = [array objectAtIndex:0]; // currently only support one photo
-            if ([dict isKindOfClass:[NSDictionary class]]) {
-                id value = [dict objectForKey:kW3ContactFieldValue];
-                if ([value isKindOfClass:[NSString class]]) {
-                    if (bUpdate && ([value length] == 0)) {
-                        // remove the current image
-                        bSuccess = ABPersonRemoveImageData(person, &error);
-                    } else {
-                        // use this image
-                        // don't know if string is encoded or not so first unencode it then encode it again
-                        NSString* cleanPath = [value stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
-                        NSURL* photoUrl = [NSURL URLWithString:[cleanPath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
-                        // caller is responsible for checking for a connection, if no connection this will fail
-                        NSError* err = nil;
-                        NSData* data = nil;
-                        if (photoUrl) {
-                            data = [NSData dataWithContentsOfURL:photoUrl options:NSDataReadingUncached error:&err];
-                        }
-                        if (data && ([data length] > 0)) {
-                            bSuccess = ABPersonSetImageData(person, (__bridge CFDataRef)data, &error);
-                        }
-                        if (!data || !bSuccess) {
-                            NSLog(@"error setting contact image: %@", (err != nil ? [err localizedDescription] : @""));
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    // TODO WebURLs
-
-    // TODO timezone
-
-    return bSuccess;
-}
-
-/* Set item into an AddressBook Record for the specified property.
- * aValue - the value to set into the address book (code checks for null or [NSNull null]
- * aProperty - AddressBook property ID
- * aRecord - the record to update
- * bUpdate - whether this is a possible update vs a new entry
- * RETURN
- *	true - property was set (or input value as null)
- *	false - property was not set
- */
-- (bool)setValue:(id)aValue forProperty:(ABPropertyID)aProperty inRecord:(ABRecordRef)aRecord asUpdate:(BOOL)bUpdate
-{
-    bool bSuccess = true;  // if property was null, just ignore and return success
-    CFErrorRef error;
-
-    if (aValue && ![aValue isKindOfClass:[NSNull class]]) {
-        if (bUpdate && ([aValue isKindOfClass:[NSString class]] && ([aValue length] == 0))) { // if updating, empty string means to delete
-            aValue = NULL;
-        } // really only need to set if different - more efficient to just update value or compare and only set if necessary???
-        bSuccess = ABRecordSetValue(aRecord, aProperty, (__bridge CFTypeRef)aValue, &error);
-        if (!bSuccess) {
-            NSLog(@"error setting %d property", aProperty);
-        }
-    }
-
-    return bSuccess;
-}
-
-- (bool)removeProperty:(ABPropertyID)aProperty inRecord:(ABRecordRef)aRecord
-{
-    CFErrorRef err;
-    bool bSuccess = ABRecordRemoveValue(aRecord, aProperty, &err);
-
-    if (!bSuccess) {
-        CFStringRef errDescription = CFErrorCopyDescription(err);
-        NSLog(@"Unable to remove property %d: %@", aProperty, errDescription);
-        CFRelease(errDescription);
-    }
-    return bSuccess;
-}
-
-- (bool)addToMultiValue:(ABMultiValueRef)multi fromDictionary:dict
-{
-    bool bSuccess = FALSE;
-    id value = [dict valueForKey:kW3ContactFieldValue];
-
-    if (IS_VALID_VALUE(value)) {
-        CFStringRef label = [CDVContact convertContactTypeToPropertyLabel:[dict valueForKey:kW3ContactFieldType]];
-        bSuccess = ABMultiValueAddValueAndLabel(multi, (__bridge CFTypeRef)value, label, NULL);
-        if (!bSuccess) {
-            NSLog(@"Error setting Value: %@ and label: %@", value, label);
-        }
-    }
-    return bSuccess;
-}
-
-- (ABMultiValueRef)allocStringMultiValueFromArray:array
-{
-    ABMutableMultiValueRef multi = ABMultiValueCreateMutable(kABMultiStringPropertyType);
-
-    for (NSDictionary* dict in array) {
-        [self addToMultiValue:multi fromDictionary:dict];
-    }
-
-    return multi;  // caller is responsible for releasing multi
-}
-
-- (bool)setValue:(CFTypeRef)value forProperty:(ABPropertyID)prop inRecord:(ABRecordRef)person
-{
-    CFErrorRef error;
-    bool bSuccess = ABRecordSetValue(person, prop, value, &error);
-
-    if (!bSuccess) {
-        NSLog(@"Error setting value for property: %d", prop);
-    }
-    return bSuccess;
-}
-
-/* Set MultiValue string properties into Address Book Record.
- * NSArray* fieldArray - array of dictionaries containing W3C properties to be set into record
- * ABPropertyID prop - the property to be set (generally used for phones and emails)
- * ABRecordRef  person - the record to set values into
- * BOOL bUpdate - whether or not to update date or set as new.
- *	When updating:
- *	  empty array indicates to remove entire property
- *	  empty string indicates to remove
- *    [NSNull null] do not modify (keep existing record value)
- * RETURNS
- * bool false indicates error
- *
- * used for phones and emails
- */
-- (bool)setMultiValueStrings:(NSArray*)fieldArray forProperty:(ABPropertyID)prop inRecord:(ABRecordRef)person asUpdate:(BOOL)bUpdate
-{
-    bool bSuccess = TRUE;
-    ABMutableMultiValueRef multi = nil;
-
-    if (!bUpdate) {
-        multi = [self allocStringMultiValueFromArray:fieldArray];
-        bSuccess = [self setValue:multi forProperty:prop inRecord:person];
-    } else if (bUpdate && ([fieldArray count] == 0)) {
-        // remove entire property
-        bSuccess = [self removeProperty:prop inRecord:person];
-    } else { // check for and apply changes
-        ABMultiValueRef copy = ABRecordCopyValue(person, prop);
-        if (copy != nil) {
-            multi = ABMultiValueCreateMutableCopy(copy);
-            CFRelease(copy);
-
-            for (NSDictionary* dict in fieldArray) {
-                id val;
-                NSString* label = nil;
-                val = [dict valueForKey:kW3ContactFieldValue];
-                label = (__bridge NSString*)[CDVContact convertContactTypeToPropertyLabel:[dict valueForKey:kW3ContactFieldType]];
-                if (IS_VALID_VALUE(val)) {
-                    // is an update,  find index of entry with matching id, if values are different, update.
-                    id idValue = [dict valueForKey:kW3ContactFieldId];
-                    int identifier = [idValue isKindOfClass:[NSNumber class]] ? [idValue intValue] : -1;
-                    CFIndex i = identifier >= 0 ? ABMultiValueGetIndexForIdentifier(multi, identifier) : kCFNotFound;
-                    if (i != kCFNotFound) {
-                        if ([val length] == 0) {
-                            // remove both value and label
-                            ABMultiValueRemoveValueAndLabelAtIndex(multi, i);
-                        } else {
-                            NSString* valueAB = (__bridge_transfer NSString*)ABMultiValueCopyValueAtIndex(multi, i);
-                            NSString* labelAB = (__bridge_transfer NSString*)ABMultiValueCopyLabelAtIndex(multi, i);
-                            if ((valueAB == nil) || ![val isEqualToString:valueAB]) {
-                                ABMultiValueReplaceValueAtIndex(multi, (__bridge CFTypeRef)val, i);
-                            }
-                            if ((labelAB == nil) || ![label isEqualToString:labelAB]) {
-                                ABMultiValueReplaceLabelAtIndex(multi, (__bridge CFStringRef)label, i);
-                            }
-                        }
-                    } else {
-                        // is a new value - insert
-                        [self addToMultiValue:multi fromDictionary:dict];
-                    }
-                } // end of if value
-            } // end of for
-        } else { // adding all new value(s)
-            multi = [self allocStringMultiValueFromArray:fieldArray];
-        }
-        // set the (updated) copy as the new value
-        bSuccess = [self setValue:multi forProperty:prop inRecord:person];
-    }
-
-    if (multi) {
-        CFRelease(multi);
-    }
-
-    return bSuccess;
-}
-
-// used for ims and addresses
-- (ABMultiValueRef)allocDictMultiValueFromArray:array forProperty:(ABPropertyID)prop
-{
-    ABMutableMultiValueRef multi = ABMultiValueCreateMutable(kABMultiDictionaryPropertyType);
-    NSMutableDictionary* newDict;
-    NSMutableDictionary* addDict;
-
-    for (NSDictionary* dict in array) {
-        newDict = [self translateW3Dict:dict forProperty:prop];
-        addDict = [NSMutableDictionary dictionaryWithCapacity:2];
-        if (newDict) { // create a new dictionary with a Label and Value, value is the dictionary previously created
-            // June, 2011 W3C Contact spec adds type into ContactAddress book
-            // get the type out of the original dictionary for address
-            NSString* addrType = (NSString*)[dict valueForKey:kW3ContactFieldType];
-            if (!addrType) {
-                addrType = (NSString*)kABOtherLabel;
-            }
-            NSObject* typeValue = ((prop == kABPersonInstantMessageProperty) ? (NSObject*)kABOtherLabel : addrType);
-            // NSLog(@"typeValue: %@", typeValue);
-            [addDict setObject:typeValue forKey:kW3ContactFieldType];    //  im labels will be set as Other and address labels as type from dictionary
-            [addDict setObject:newDict forKey:kW3ContactFieldValue];
-            [self addToMultiValue:multi fromDictionary:addDict];
-        }
-    }
-
-    return multi; // caller is responsible for releasing
-}
-
-// used for ims and addresses to convert W3 dictionary of values to AB Dictionary
-// got messier when June, 2011 W3C Contact spec added type field into ContactAddress
-- (NSMutableDictionary*)translateW3Dict:(NSDictionary*)dict forProperty:(ABPropertyID)prop
-{
-    NSArray* propArray = [[CDVContact defaultObjectAndProperties] valueForKey:[[CDVContact defaultABtoW3C] objectForKey:[NSNumber numberWithInt:prop]]];
-
-    NSMutableDictionary* newDict = [NSMutableDictionary dictionaryWithCapacity:1];
-    id value;
-
-    for (NSString* key in propArray) { // for each W3 Contact key get the value
-        if (((value = [dict valueForKey:key]) != nil) && ![value isKindOfClass:[NSNull class]]) {
-            // if necessary convert the W3 value to AB Property label
-            NSString* setValue = value;
-            if ([CDVContact needsConversion:key]) { // IM types must be converted
-                setValue = (NSString*)[CDVContact convertContactTypeToPropertyLabel:value];
-                // IMs must have a valid AB value!
-                if ((prop == kABPersonInstantMessageProperty) && [setValue isEqualToString:(NSString*)kABOtherLabel]) {
-                    setValue = @""; // try empty string
-                }
-            }
-            // set the AB value into the dictionary
-            [newDict setObject:setValue forKey:(NSString*)[[CDVContact defaultW3CtoAB] valueForKey:(NSString*)key]];
-        }
-    }
-
-    if ([newDict count] == 0) {
-        newDict = nil; // no items added
-    }
-    return newDict;
-}
-
-/* set multivalue dictionary properties into an AddressBook Record
- * NSArray* array - array of dictionaries containing the W3C properties to set into the record
- * ABPropertyID prop - the property id for the multivalue dictionary (addresses and ims)
- * ABRecordRef person - the record to set the values into
- * BOOL bUpdate - YES if this is an update to an existing record
- *	When updating:
- *	  empty array indicates to remove entire property
- *	  value/label == "" indicates to remove
- *    value/label == [NSNull null] do not modify (keep existing record value)
- * RETURN
- *   bool false indicates fatal error
- *
- *  iOS addresses and im are a MultiValue Properties with label, value=dictionary of  info, and id
- *  set addresses:  streetAddress, locality, region, postalCode, country
- *  set ims:  value = username, type = servicetype
- *  there are some special cases in here for ims - needs cleanup / simplification
- *
- */
-- (bool)setMultiValueDictionary:(NSArray*)array forProperty:(ABPropertyID)prop inRecord:(ABRecordRef)person asUpdate:(BOOL)bUpdate
-{
-    bool bSuccess = FALSE;
-    ABMutableMultiValueRef multi = nil;
-
-    if (!bUpdate) {
-        multi = [self allocDictMultiValueFromArray:array forProperty:prop];
-        bSuccess = [self setValue:multi forProperty:prop inRecord:person];
-    } else if (bUpdate && ([array count] == 0)) {
-        // remove property
-        bSuccess = [self removeProperty:prop inRecord:person];
-    } else { // check for and apply changes
-        ABMultiValueRef copy = ABRecordCopyValue(person, prop);
-        if (copy) {
-            multi = ABMultiValueCreateMutableCopy(copy);
-            CFRelease(copy);
-            // get the W3C values for this property
-            NSArray* propArray = [[CDVContact defaultObjectAndProperties] valueForKey:[[CDVContact defaultABtoW3C] objectForKey:[NSNumber numberWithInt:prop]]];
-            id value;
-            id valueAB;
-
-            for (NSDictionary* field in array) {
-                NSMutableDictionary* dict;
-                // find the index for the current property
-                id idValue = [field valueForKey:kW3ContactFieldId];
-                int identifier = [idValue isKindOfClass:[NSNumber class]] ? [idValue intValue] : -1;
-                CFIndex idx = identifier >= 0 ? ABMultiValueGetIndexForIdentifier(multi, identifier) : kCFNotFound;
-                BOOL bUpdateLabel = NO;
-                if (idx != kCFNotFound) {
-                    dict = [NSMutableDictionary dictionaryWithCapacity:1];
-                    // NSDictionary* existingDictionary = (NSDictionary*)ABMultiValueCopyValueAtIndex(multi, idx);
-                    CFTypeRef existingDictionary = ABMultiValueCopyValueAtIndex(multi, idx);
-                    NSString* existingABLabel = (__bridge_transfer NSString*)ABMultiValueCopyLabelAtIndex(multi, idx);
-                    NSString* testLabel = [field valueForKey:kW3ContactFieldType];
-                    // fixes cb-143 where setting empty label could cause address to not be removed
-                    //   (because empty label would become 'other'  in convertContactTypeToPropertyLabel
-                    //   which may not have matched existing label thus resulting in an incorrect updating of the label
-                    //   and the address not getting removed at the end of the for loop)
-                    if (testLabel && [testLabel isKindOfClass:[NSString class]] && ([testLabel length] > 0)) {
-                        CFStringRef w3cLabel = [CDVContact convertContactTypeToPropertyLabel:testLabel];
-                        if (w3cLabel && ![existingABLabel isEqualToString:(__bridge NSString*)w3cLabel]) {
-                            // replace the label
-                            ABMultiValueReplaceLabelAtIndex(multi, w3cLabel, idx);
-                            bUpdateLabel = YES;
-                        }
-                    } // else was invalid or empty label string so do not update
-
-                    for (id k in propArray) {
-                        value = [field valueForKey:k];
-                        bool bSet = (value != nil && ![value isKindOfClass:[NSNull class]] && ([value isKindOfClass:[NSString class]] && [value length] > 0));
-                        // if there is a contact value, put it into dictionary
-                        if (bSet) {
-                            NSString* setValue = [CDVContact needsConversion:(NSString*)k] ? (NSString*)[CDVContact convertContactTypeToPropertyLabel:value] : value;
-                            [dict setObject:setValue forKey:(NSString*)[[CDVContact defaultW3CtoAB] valueForKey:(NSString*)k]];
-                        } else if ((value == nil) || ([value isKindOfClass:[NSString class]] && ([value length] != 0))) {
-                            // value not provided in contact dictionary - if prop exists in AB dictionary, preserve it
-                            valueAB = [(__bridge NSDictionary*)existingDictionary valueForKey : [[CDVContact defaultW3CtoAB] valueForKey:k]];
-                            if (valueAB != nil) {
-                                [dict setValue:valueAB forKey:[[CDVContact defaultW3CtoAB] valueForKey:k]];
-                            }
-                        } // else if value == "" it will not be added into updated dict and thus removed
-                    } // end of for loop (moving here fixes cb-143, need to end for loop before replacing or removing multivalue)
-
-                    if ([dict count] > 0) {
-                        // something was added into new dict,
-                        ABMultiValueReplaceValueAtIndex(multi, (__bridge CFTypeRef)dict, idx);
-                    } else if (!bUpdateLabel) {
-                        // nothing added into new dict and no label change so remove this property entry
-                        ABMultiValueRemoveValueAndLabelAtIndex(multi, idx);
-                    }
-
-                    CFRelease(existingDictionary);
-                } else {
-                    // not found in multivalue so add it
-                    dict = [self translateW3Dict:field forProperty:prop];
-                    if (dict) {
-                        NSMutableDictionary* addDict = [NSMutableDictionary dictionaryWithCapacity:2];
-                        // get the type out of the original dictionary for address
-                        NSObject* typeValue = ((prop == kABPersonInstantMessageProperty) ? (NSObject*)kABOtherLabel : (NSString*)[field valueForKey:kW3ContactFieldType]);
-                        // NSLog(@"typeValue: %@", typeValue);
-                        [addDict setObject:typeValue forKey:kW3ContactFieldType];        //  im labels will be set as Other and address labels as type from dictionary
-                        [addDict setObject:dict forKey:kW3ContactFieldValue];
-                        [self addToMultiValue:multi fromDictionary:addDict];
-                    }
-                }
-            } // end of looping through dictionaries
-
-            // set the (updated) copy as the new value
-            bSuccess = [self setValue:multi forProperty:prop inRecord:person];
-        }
-    } // end of copy and apply changes
-    if (multi) {
-        CFRelease(multi);
-    }
-
-    return bSuccess;
-}
-
-/* Determine which W3C labels need to be converted
- */
-+ (BOOL)needsConversion:(NSString*)W3Label
-{
-    BOOL bConvert = NO;
-
-    if ([W3Label isEqualToString:kW3ContactFieldType] || [W3Label isEqualToString:kW3ContactImType]) {
-        bConvert = YES;
-    }
-    return bConvert;
-}
-
-/* Translation of property type labels  contact API ---> iPhone
- *
- *	phone:  work, home, other, mobile, fax, pager -->
- *		kABWorkLabel, kABHomeLabel, kABOtherLabel, kABPersonPhoneMobileLabel, kABPersonHomeFAXLabel || kABPersonHomeFAXLabel, kABPersonPhonePagerLabel
- *	emails:  work, home, other ---> kABWorkLabel, kABHomeLabel, kABOtherLabel
- *	ims: aim, gtalk, icq, xmpp, msn, skype, qq, yahoo --> kABPersonInstantMessageService + (AIM, ICG, MSN, Yahoo).  No support for gtalk, xmpp, skype, qq
- * addresses: work, home, other --> kABWorkLabel, kABHomeLabel, kABOtherLabel
- *
- *
- */
-+ (CFStringRef)convertContactTypeToPropertyLabel:(NSString*)label
-{
-    CFStringRef type;
-
-    if ([label isKindOfClass:[NSNull class]] || ![label isKindOfClass:[NSString class]]) {
-        type = NULL; // no label
-    } else if ([label caseInsensitiveCompare:kW3ContactWorkLabel] == NSOrderedSame) {
-        type = kABWorkLabel;
-    } else if ([label caseInsensitiveCompare:kW3ContactHomeLabel] == NSOrderedSame) {
-        type = kABHomeLabel;
-    } else if ([label caseInsensitiveCompare:kW3ContactOtherLabel] == NSOrderedSame) {
-        type = kABOtherLabel;
-    } else if ([label caseInsensitiveCompare:kW3ContactPhoneMobileLabel] == NSOrderedSame) {
-        type = kABPersonPhoneMobileLabel;
-    } else if ([label caseInsensitiveCompare:kW3ContactPhonePagerLabel] == NSOrderedSame) {
-        type = kABPersonPhonePagerLabel;
-    } else if ([label caseInsensitiveCompare:kW3ContactImAIMLabel] == NSOrderedSame) {
-        type = kABPersonInstantMessageServiceAIM;
-    } else if ([label caseInsensitiveCompare:kW3ContactImICQLabel] == NSOrderedSame) {
-        type = kABPersonInstantMessageServiceICQ;
-    } else if ([label caseInsensitiveCompare:kW3ContactImMSNLabel] == NSOrderedSame) {
-        type = kABPersonInstantMessageServiceMSN;
-    } else if ([label caseInsensitiveCompare:kW3ContactImYahooLabel] == NSOrderedSame) {
-        type = kABPersonInstantMessageServiceYahoo;
-    } else if ([label caseInsensitiveCompare:kW3ContactUrlProfile] == NSOrderedSame) {
-        type = kABPersonHomePageLabel;
-    } else {
-        type = kABOtherLabel;
-    }
-
-    return type;
-}
-
-+ (NSString*)convertPropertyLabelToContactType:(NSString*)label
-{
-    NSString* type = nil;
-
-    if (label != nil) { // improve efficiency......
-        if ([label isEqualToString:(NSString*)kABPersonPhoneMobileLabel]) {
-            type = kW3ContactPhoneMobileLabel;
-        } else if ([label isEqualToString:(NSString*)kABPersonPhoneHomeFAXLabel] ||
-            [label isEqualToString:(NSString*)kABPersonPhoneWorkFAXLabel]) {
-            type = kW3ContactPhoneFaxLabel;
-        } else if ([label isEqualToString:(NSString*)kABPersonPhonePagerLabel]) {
-            type = kW3ContactPhonePagerLabel;
-        } else if ([label isEqualToString:(NSString*)kABHomeLabel]) {
-            type = kW3ContactHomeLabel;
-        } else if ([label isEqualToString:(NSString*)kABWorkLabel]) {
-            type = kW3ContactWorkLabel;
-        } else if ([label isEqualToString:(NSString*)kABOtherLabel]) {
-            type = kW3ContactOtherLabel;
-        } else if ([label isEqualToString:(NSString*)kABPersonInstantMessageServiceAIM]) {
-            type = kW3ContactImAIMLabel;
-        } else if ([label isEqualToString:(NSString*)kABPersonInstantMessageServiceICQ]) {
-            type = kW3ContactImICQLabel;
-        } else if ([label isEqualToString:(NSString*)kABPersonInstantMessageServiceJabber]) {
-            type = kW3ContactOtherLabel;
-        } else if ([label isEqualToString:(NSString*)kABPersonInstantMessageServiceMSN]) {
-            type = kW3ContactImMSNLabel;
-        } else if ([label isEqualToString:(NSString*)kABPersonInstantMessageServiceYahoo]) {
-            type = kW3ContactImYahooLabel;
-        } else if ([label isEqualToString:(NSString*)kABPersonHomePageLabel]) {
-            type = kW3ContactUrlProfile;
-        } else {
-            type = kW3ContactOtherLabel;
-        }
-    }
-    return type;
-}
-
-/* Check if the input label is a valid W3C ContactField.type. This is used when searching,
- * only search field types if the search string is a valid type.  If we converted any search
- * string to a ABPropertyLabel it could convert to kABOtherLabel which is probably not want
- * the user wanted to search for and could skew the results.
- */
-+ (BOOL)isValidW3ContactType:(NSString*)label
-{
-    BOOL isValid = NO;
-
-    if ([label isKindOfClass:[NSNull class]] || ![label isKindOfClass:[NSString class]]) {
-        isValid = NO; // no label
-    } else if ([label caseInsensitiveCompare:kW3ContactWorkLabel] == NSOrderedSame) {
-        isValid = YES;
-    } else if ([label caseInsensitiveCompare:kW3ContactHomeLabel] == NSOrderedSame) {
-        isValid = YES;
-    } else if ([label caseInsensitiveCompare:kW3ContactOtherLabel] == NSOrderedSame) {
-        isValid = YES;
-    } else if ([label caseInsensitiveCompare:kW3ContactPhoneMobileLabel] == NSOrderedSame) {
-        isValid = YES;
-    } else if ([label caseInsensitiveCompare:kW3ContactPhonePagerLabel] == NSOrderedSame) {
-        isValid = YES;
-    } else if ([label caseInsensitiveCompare:kW3ContactImAIMLabel] == NSOrderedSame) {
-        isValid = YES;
-    } else if ([label caseInsensitiveCompare:kW3ContactImICQLabel] == NSOrderedSame) {
-        isValid = YES;
-    } else if ([label caseInsensitiveCompare:kW3ContactImMSNLabel] == NSOrderedSame) {
-        isValid = YES;
-    } else if ([label caseInsensitiveCompare:kW3ContactImYahooLabel] == NSOrderedSame) {
-        isValid = YES;
-    } else {
-        isValid = NO;
-    }
-
-    return isValid;
-}
-
-/* Create a new Contact Dictionary object from an ABRecordRef that contains information in a format such that
- * it can be returned to JavaScript callback as JSON object string.
- * Uses:
- * ABRecordRef set into Contact Object
- * NSDictionary withFields indicates which fields to return from the AddressBook Record
- *
- * JavaScript Contact:
- * @param {DOMString} id unique identifier
- * @param {DOMString} displayName
- * @param {ContactName} name
- * @param {DOMString} nickname
- * @param {ContactField[]} phoneNumbers array of phone numbers
- * @param {ContactField[]} emails array of email addresses
- * @param {ContactAddress[]} addresses array of addresses
- * @param {ContactField[]} ims instant messaging user ids
- * @param {ContactOrganization[]} organizations
- * @param {DOMString} published date contact was first created
- * @param {DOMString} updated date contact was last updated
- * @param {DOMString} birthday contact's birthday
- * @param (DOMString} anniversary contact's anniversary
- * @param {DOMString} gender contact's gender
- * @param {DOMString} note user notes about contact
- * @param {DOMString} preferredUsername
- * @param {ContactField[]} photos
- * @param {ContactField[]} tags
- * @param {ContactField[]} relationships
- * @param {ContactField[]} urls contact's web sites
- * @param {ContactAccounts[]} accounts contact's online accounts
- * @param {DOMString} timezone UTC time zone offset
- * @param {DOMString} connected
- */
-
-- (NSDictionary*)toDictionary:(NSDictionary*)withFields
-{
-    // if not a person type record bail out for now
-    if (ABRecordGetRecordType(self.record) != kABPersonType) {
-        return NULL;
-    }
-    id value = nil;
-    self.returnFields = withFields;
-
-    NSMutableDictionary* nc = [NSMutableDictionary dictionaryWithCapacity:1];  // new contact dictionary to fill in from ABRecordRef
-    // id
-    [nc setObject:[NSNumber numberWithInt:ABRecordGetRecordID(self.record)] forKey:kW3ContactId];
-    if (self.returnFields == nil) {
-        // if no returnFields specified, W3C says to return empty contact (but Cordova will at least return id)
-        return nc;
-    }
-    if ([self.returnFields objectForKey:kW3ContactDisplayName]) {
-        // displayname requested -  iOS doesn't have so return null
-        [nc setObject:[NSNull null] forKey:kW3ContactDisplayName];
-        // may overwrite below if requested ContactName and there are no values
-    }
-    // nickname
-    if ([self.returnFields valueForKey:kW3ContactNickname]) {
-        value = (__bridge_transfer NSString*)ABRecordCopyValue(self.record, kABPersonNicknameProperty);
-        [nc setObject:(value != nil) ? value:[NSNull null] forKey:kW3ContactNickname];
-    }
-
-    // name dictionary
-    // NSLog(@"getting name info");
-    NSObject* data = [self extractName];
-    if (data != nil) {
-        [nc setObject:data forKey:kW3ContactName];
-    }
-    if ([self.returnFields objectForKey:kW3ContactDisplayName] && ((data == nil) || ([(NSDictionary*)data objectForKey : kW3ContactFormattedName] == [NSNull null]))) {
-        // user asked for displayName which iOS doesn't support but there is no other name data being returned
-        // try and use Composite Name so some name is returned
-        id tryName = (__bridge_transfer NSString*)ABRecordCopyCompositeName(self.record);
-        if (tryName != nil) {
-            [nc setObject:tryName forKey:kW3ContactDisplayName];
-        } else {
-            // use nickname or empty string
-            value = (__bridge_transfer NSString*)ABRecordCopyValue(self.record, kABPersonNicknameProperty);
-            [nc setObject:(value != nil) ? value:@"" forKey:kW3ContactDisplayName];
-        }
-    }
-    // phoneNumbers array
-    // NSLog(@"getting phoneNumbers");
-    value = [self extractMultiValue:kW3ContactPhoneNumbers];
-    if (value != nil) {
-        [nc setObject:value forKey:kW3ContactPhoneNumbers];
-    }
-    // emails array
-    // NSLog(@"getting emails");
-    value = [self extractMultiValue:kW3ContactEmails];
-    if (value != nil) {
-        [nc setObject:value forKey:kW3ContactEmails];
-    }
-    // urls array
-    value = [self extractMultiValue:kW3ContactUrls];
-    if (value != nil) {
-        [nc setObject:value forKey:kW3ContactUrls];
-    }
-    // addresses array
-    // NSLog(@"getting addresses");
-    value = [self extractAddresses];
-    if (value != nil) {
-        [nc setObject:value forKey:kW3ContactAddresses];
-    }
-    // im array
-    // NSLog(@"getting ims");
-    value = [self extractIms];
-    if (value != nil) {
-        [nc setObject:value forKey:kW3ContactIms];
-    }
-    // organization array (only info for one organization in iOS)
-    // NSLog(@"getting organizations");
-    value = [self extractOrganizations];
-    if (value != nil) {
-        [nc setObject:value forKey:kW3ContactOrganizations];
-    }
-
-    // for simple properties, could make this a bit more efficient by storing all simple properties in a single
-    // array in the returnFields dictionary and setting them via a for loop through the array
-
-    // add dates
-    // NSLog(@"getting dates");
-    NSNumber* ms;
-
-    /** Contact Revision field removed from June 16, 2011 version of specification
-
-    if ([self.returnFields valueForKey:kW3ContactUpdated]){
-        ms = [self getDateAsNumber: kABPersonModificationDateProperty];
-        if (!ms){
-            // try and get published date
-            ms = [self getDateAsNumber: kABPersonCreationDateProperty];
-        }
-        if (ms){
-            [nc setObject:  ms forKey:kW3ContactUpdated];
-        }
-
-    }
-    */
-
-    if ([self.returnFields valueForKey:kW3ContactBirthday]) {
-        ms = [self getDateAsNumber:kABPersonBirthdayProperty];
-        if (ms) {
-            [nc setObject:ms forKey:kW3ContactBirthday];
-        }
-    }
-
-    /*  Anniversary removed from 12-09-2010 W3C Contacts api spec
-     if ([self.returnFields valueForKey:kW3ContactAnniversary]){
-        // Anniversary date is stored in a multivalue property
-        ABMultiValueRef multi = ABRecordCopyValue(self.record, kABPersonDateProperty);
-        if (multi){
-            CFStringRef label = nil;
-            CFIndex count = ABMultiValueGetCount(multi);
-            // see if contains an Anniversary date
-            for(CFIndex i=0; i<count; i++){
-                label = ABMultiValueCopyLabelAtIndex(multi, i);
-                if(label && [(NSString*)label isEqualToString:(NSString*)kABPersonAnniversaryLabel]){
-                    CFDateRef aDate = ABMultiValueCopyValueAtIndex(multi, i);
-                    if(aDate){
-                        [nc setObject: (NSString*)aDate forKey: kW3ContactAnniversary];
-                        CFRelease(aDate);
-                    }
-                    CFRelease(label);
-                    break;
-                }
-            }
-            CFRelease(multi);
-        }
-    }*/
-
-    if ([self.returnFields valueForKey:kW3ContactNote]) {
-        // note
-        value = (__bridge_transfer NSString*)ABRecordCopyValue(self.record, kABPersonNoteProperty);
-        [nc setObject:(value != nil) ? value:[NSNull null] forKey:kW3ContactNote];
-    }
-
-    if ([self.returnFields valueForKey:kW3ContactPhotos]) {
-        value = [self extractPhotos];
-        [nc setObject:(value != nil) ? value:[NSNull null] forKey:kW3ContactPhotos];
-    }
-
-    /* TimeZone removed from June 16, 2011 Contacts spec
-     *
-    if ([self.returnFields valueForKey:kW3ContactTimezone]){
-        [NSTimeZone resetSystemTimeZone];
-        NSTimeZone* currentTZ = [NSTimeZone localTimeZone];
-        NSInteger seconds = [currentTZ secondsFromGMT];
-        NSString* tz = [NSString stringWithFormat:@"%2d:%02u",  seconds/3600, seconds % 3600 ];
-        [nc setObject:tz forKey:kW3ContactTimezone];
-    }
-    */
-    // TODO WebURLs
-    // [nc setObject:[NSNull null] forKey:kW3ContactUrls];
-    // online accounts - not available on iOS
-
-    return nc;
-}
-
-- (NSNumber*)getDateAsNumber:(ABPropertyID)datePropId
-{
-    NSNumber* msDate = nil;
-    NSDate* aDate = nil;
-    CFTypeRef cfDate = ABRecordCopyValue(self.record, datePropId);
-
-    if (cfDate) {
-        aDate = (__bridge NSDate*)cfDate;
-        msDate = [NSNumber numberWithDouble:([aDate timeIntervalSince1970] * 1000)];
-        CFRelease(cfDate);
-    }
-    return msDate;
-}
-
-/* Create Dictionary to match JavaScript ContactName object:
- *	formatted - ABRecordCopyCompositeName
- *	familyName
- *	givenName
- *	middleName
- *	honorificPrefix
- *	honorificSuffix
-*/
-
-- (NSObject*)extractName
-{
-    NSArray* fields = [self.returnFields objectForKey:kW3ContactName];
-
-    if (fields == nil) { // no name fields requested
-        return nil;
-    }
-
-    NSMutableDictionary* newName = [NSMutableDictionary dictionaryWithCapacity:6];
-    id value;
-
-    for (NSString* i in fields) {
-        if ([i isEqualToString:kW3ContactFormattedName]) {
-            value = (__bridge_transfer NSString*)ABRecordCopyCompositeName(self.record);
-            [newName setObject:(value != nil) ? value:[NSNull null] forKey:kW3ContactFormattedName];
-        } else {
-            // W3CtoAB returns NSNumber for AB name properties, get intValue and cast to ABPropertyID)
-            value = (__bridge_transfer NSString*)ABRecordCopyValue(self.record, (ABPropertyID)[[[CDVContact defaultW3CtoAB] valueForKey:i] intValue]);
-            [newName setObject:(value != nil) ? value:[NSNull null] forKey:(NSString*)i];
-        }
-    }
-
-    return newName;
-}
-
-/* Create array of Dictionaries to match JavaScript ContactField object for simple multiValue properties phoneNumbers, emails
- * Input: (NSString*) W3Contact Property name
- * type
- *		for phoneNumbers type is one of (work,home,other, mobile, fax, pager)
- *		for emails type is one of (work,home, other)
- * value - phone number or email address
- * (bool) primary (not supported on iphone)
- * id
-*/
-- (NSObject*)extractMultiValue:(NSString*)propertyId
-{
-    NSArray* fields = [self.returnFields objectForKey:propertyId];
-
-    if (fields == nil) {
-        return nil;
-    }
-    ABMultiValueRef multi = nil;
-    NSObject* valuesArray = nil;
-    NSNumber* propNumber = [[CDVContact defaultW3CtoAB] valueForKey:propertyId];
-    ABPropertyID propId = [propNumber intValue];
-    multi = ABRecordCopyValue(self.record, propId);
-    // multi = ABRecordCopyValue(self.record, (ABPropertyID)[[[Contact defaultW3CtoAB] valueForKey:propertyId] intValue]);
-    CFIndex count = multi != nil ? ABMultiValueGetCount(multi) : 0;
-    id value;
-    if (count) {
-        valuesArray = [NSMutableArray arrayWithCapacity:count];
-
-        for (CFIndex i = 0; i < count; i++) {
-            NSMutableDictionary* newDict = [NSMutableDictionary dictionaryWithCapacity:4];
-            if ([fields containsObject:kW3ContactFieldType]) {
-                NSString* label = (__bridge_transfer NSString*)ABMultiValueCopyLabelAtIndex(multi, i);
-                value = [CDVContact convertPropertyLabelToContactType:label];
-                [newDict setObject:(value != nil) ? value:[NSNull null]   forKey:kW3ContactFieldType];
-            }
-            if ([fields containsObject:kW3ContactFieldValue]) {
-                value = (__bridge_transfer NSString*)ABMultiValueCopyValueAtIndex(multi, i);
-                [newDict setObject:(value != nil) ? value:[NSNull null] forKey:kW3ContactFieldValue];
-            }
-            if ([fields containsObject:kW3ContactFieldPrimary]) {
-                [newDict setObject:[NSNumber numberWithBool:(BOOL)NO] forKey:kW3ContactFieldPrimary];   // iOS doesn't support primary so set all to false
-            }
-            // always set id
-            value = [NSNumber numberWithUnsignedInt:ABMultiValueGetIdentifierAtIndex(multi, i)];
-            [newDict setObject:(value != nil) ? value:[NSNull null] forKey:kW3ContactFieldId];
-            [(NSMutableArray*)valuesArray addObject : newDict];
-        }
-    } else {
-        valuesArray = [NSNull null];
-    }
-    if (multi) {
-        CFRelease(multi);
-    }
-
-    return valuesArray;
-}
-
-/* Create array of Dictionaries to match JavaScript ContactAddress object for addresses
- *  pref - not supported
- *  type - address type
- *	formatted  - formatted for mailing label (what about localization?)
- *	streetAddress
- *	locality
- *	region;
- *	postalCode
- *	country
- *	id
- *
- *	iOS addresses are a MultiValue Properties with label, value=dictionary of address info, and id
- */
-- (NSObject*)extractAddresses
-{
-    NSArray* fields = [self.returnFields objectForKey:kW3ContactAddresses];
-
-    if (fields == nil) { // no name fields requested
-        return nil;
-    }
-    CFStringRef value;
-    NSObject* addresses;
-    ABMultiValueRef multi = ABRecordCopyValue(self.record, kABPersonAddressProperty);
-    CFIndex count = multi ? ABMultiValueGetCount(multi) : 0;
-    if (count) {
-        addresses = [NSMutableArray arrayWithCapacity:count];
-
-        for (CFIndex i = 0; i < count; i++) {
-            NSMutableDictionary* newAddress = [NSMutableDictionary dictionaryWithCapacity:7];
-            // if we got this far, at least some address info is being requested.
-
-            // Always set id
-            id identifier = [NSNumber numberWithUnsignedInt:ABMultiValueGetIdentifierAtIndex(multi, i)];
-            [newAddress setObject:(identifier != nil) ? identifier:[NSNull null] forKey:kW3ContactFieldId];
-            // set the type label
-            NSString* label = (__bridge_transfer NSString*)ABMultiValueCopyLabelAtIndex(multi, i);
-
-            [newAddress setObject:(label != nil) ? (NSObject*)[[CDVContact class] convertPropertyLabelToContactType:label]:[NSNull null] forKey:kW3ContactFieldType];
-            // set the pref - iOS doesn't support so set to default of false
-            [newAddress setObject:@"false" forKey:kW3ContactFieldPrimary];
-            // get dictionary of values for this address
-            CFDictionaryRef dict = (CFDictionaryRef)ABMultiValueCopyValueAtIndex(multi, i);
-
-            for (id k in fields) {
-                bool bFound;
-                id key = [[CDVContact defaultW3CtoAB] valueForKey:k];
-                if (key && ![k isKindOfClass:[NSNull class]]) {
-                    bFound = CFDictionaryGetValueIfPresent(dict, (__bridge const void*)key, (void*)&value);
-                    if (bFound && (value != NULL)) {
-                        CFRetain(value);
-                        [newAddress setObject:(__bridge id)value forKey:k];
-                        CFRelease(value);
-                    } else {
-                        [newAddress setObject:[NSNull null] forKey:k];
-                    }
-                } else {
-                    // was a property that iPhone doesn't support
-                    [newAddress setObject:[NSNull null] forKey:k];
-                }
-            }
-
-            if ([newAddress count] > 0) { // ?? this will always be true since we set id,label,primary field??
-                [(NSMutableArray*)addresses addObject : newAddress];
-            }
-            CFRelease(dict);
-        } // end of loop through addresses
-    } else {
-        addresses = [NSNull null];
-    }
-    if (multi) {
-        CFRelease(multi);
-    }
-
-    return addresses;
-}
-
-/* Create array of Dictionaries to match JavaScript ContactField object for ims
- * type one of [aim, gtalk, icq, xmpp, msn, skype, qq, yahoo] needs other as well
- * value
- * (bool) primary
- * id
- *
- *	iOS IMs are a MultiValue Properties with label, value=dictionary of IM details (service, username), and id
- */
-- (NSObject*)extractIms
-{
-    NSArray* fields = [self.returnFields objectForKey:kW3ContactIms];
-
-    if (fields == nil) { // no name fields requested
-        return nil;
-    }
-    NSObject* imArray;
-    ABMultiValueRef multi = ABRecordCopyValue(self.record, kABPersonInstantMessageProperty);
-    CFIndex count = multi ? ABMultiValueGetCount(multi) : 0;
-    if (count) {
-        imArray = [NSMutableArray arrayWithCapacity:count];
-
-        for (CFIndex i = 0; i < ABMultiValueGetCount(multi); i++) {
-            NSMutableDictionary* newDict = [NSMutableDictionary dictionaryWithCapacity:3];
-            // iOS has label property (work, home, other) for each IM but W3C contact API doesn't use
-            CFDictionaryRef dict = (CFDictionaryRef)ABMultiValueCopyValueAtIndex(multi, i);
-            CFStringRef value;  // all values should be CFStringRefs / NSString*
-            bool bFound;
-            if ([fields containsObject:kW3ContactFieldValue]) {
-                // value = user name
-                bFound = CFDictionaryGetValueIfPresent(dict, kABPersonInstantMessageUsernameKey, (void*)&value);
-                if (bFound && (value != NULL)) {
-                    CFRetain(value);
-                    [newDict setObject:(__bridge id)value forKey:kW3ContactFieldValue];
-                    CFRelease(value);
-                } else {
-                    [newDict setObject:[NSNull null] forKey:kW3ContactFieldValue];
-                }
-            }
-            if ([fields containsObject:kW3ContactFieldType]) {
-                bFound = CFDictionaryGetValueIfPresent(dict, kABPersonInstantMessageServiceKey, (void*)&value);
-                if (bFound && (value != NULL)) {
-                    CFRetain(value);
-                    [newDict setObject:(id)[[CDVContact class] convertPropertyLabelToContactType : (__bridge NSString*)value] forKey:kW3ContactFieldType];
-                    CFRelease(value);
-                } else {
-                    [newDict setObject:[NSNull null] forKey:kW3ContactFieldType];
-                }
-            }
-            // always set ID
-            id identifier = [NSNumber numberWithUnsignedInt:ABMultiValueGetIdentifierAtIndex(multi, i)];
-            [newDict setObject:(identifier != nil) ? identifier:[NSNull null] forKey:kW3ContactFieldId];
-
-            [(NSMutableArray*)imArray addObject : newDict];
-            CFRelease(dict);
-        }
-    } else {
-        imArray = [NSNull null];
-    }
-
-    if (multi) {
-        CFRelease(multi);
-    }
-    return imArray;
-}
-
-/* Create array of Dictionaries to match JavaScript ContactOrganization object
- *	pref - not supported in iOS
- *  type - not supported in iOS
- *  name
- *	department
- *	title
- */
-
-- (NSObject*)extractOrganizations
-{
-    NSArray* fields = [self.returnFields objectForKey:kW3ContactOrganizations];
-
-    if (fields == nil) { // no name fields requested
-        return nil;
-    }
-    NSObject* array = nil;
-    NSMutableDictionary* newDict = [NSMutableDictionary dictionaryWithCapacity:5];
-    id value;
-    int validValueCount = 0;
-
-    for (id i in fields) {
-        id key = [[CDVContact defaultW3CtoAB] valueForKey:i];
-        if (key && [key isKindOfClass:[NSNumber class]]) {
-            value = (__bridge_transfer NSString*)ABRecordCopyValue(self.record, (ABPropertyID)[[[CDVContact defaultW3CtoAB] valueForKey:i] intValue]);
-            if (value != nil) {
-                // if there are no organization values we should return null for organization
-                // this counter keeps indicates if any organization values have been set
-                validValueCount++;
-            }
-            [newDict setObject:(value != nil) ? value:[NSNull null] forKey:i];
-        } else { // not a key iOS supports, set to null
-            [newDict setObject:[NSNull null] forKey:i];
-        }
-    }
-
-    if (([newDict count] > 0) && (validValueCount > 0)) {
-        // add pref and type
-        // they are not supported by iOS and thus these values never change
-        [newDict setObject:@"false" forKey:kW3ContactFieldPrimary];
-        [newDict setObject:[NSNull null] forKey:kW3ContactFieldType];
-        array = [NSMutableArray arrayWithCapacity:1];
-        [(NSMutableArray*)array addObject : newDict];
-    } else {
-        array = [NSNull null];
-    }
-    return array;
-}
-
-// W3C Contacts expects an array of photos.  Can return photos in more than one format, currently
-// just returning the default format
-// Save the photo data into tmp directory and return FileURI - temp directory is deleted upon application exit
-- (NSObject*)extractPhotos
-{
-    NSMutableArray* photos = nil;
-
-    if (ABPersonHasImageData(self.record)) {
-        CFDataRef photoData = ABPersonCopyImageData(self.record);
-        NSData* data = (__bridge NSData*)photoData;
-        // write to temp directory and store URI in photos array
-        // get the temp directory path
-        NSString* docsPath = [NSTemporaryDirectory()stringByStandardizingPath];
-        NSError* err = nil;
-        NSString* filePath = [NSString stringWithFormat:@"%@/photo_XXXXX", docsPath];
-        char template[filePath.length + 1];
-        strcpy(template, [filePath cStringUsingEncoding:NSASCIIStringEncoding]);
-        mkstemp(template);
-        filePath = [[NSFileManager defaultManager]
-            stringWithFileSystemRepresentation:template
-                                        length:strlen(template)];
-
-        // save file
-        if ([data writeToFile:filePath options:NSAtomicWrite error:&err]) {
-            photos = [NSMutableArray arrayWithCapacity:1];
-            NSMutableDictionary* newDict = [NSMutableDictionary dictionaryWithCapacity:2];
-            [newDict setObject:filePath forKey:kW3ContactFieldValue];
-            [newDict setObject:@"url" forKey:kW3ContactFieldType];
-            [newDict setObject:@"false" forKey:kW3ContactFieldPrimary];
-            [photos addObject:newDict];
-        }
-
-        CFRelease(photoData);
-    }
-    return photos;
-}
-
-/**
- *	given an array of W3C Contact field names, create a dictionary of field names to extract
- *	if field name represents an object, return all properties for that object:  "name" - returns all properties in ContactName
- *	if field name is an explicit property, return only those properties:  "name.givenName - returns a ContactName with only ContactName.givenName
- *  if field contains ONLY ["*"] return all fields
- *	dictionary format:
- *	key is W3Contact #define
- *		value is NSMutableArray* for complex keys:  name,addresses,organizations, phone, emails, ims
- *		value is [NSNull null] for simple keys
-*/
-+ (NSDictionary*)calcReturnFields:(NSArray*)fieldsArray // NSLog(@"getting self.returnFields");
-{
-    NSMutableDictionary* d = [NSMutableDictionary dictionaryWithCapacity:1];
-
-    if ((fieldsArray != nil) && [fieldsArray isKindOfClass:[NSArray class]]) {
-        if (([fieldsArray count] == 1) && [[fieldsArray objectAtIndex:0] isEqualToString:@"*"]) {
-            return [CDVContact defaultFields];  // return all fields
-        }
-
-        for (id i in fieldsArray) {
-            NSMutableArray* keys = nil;
-            NSString* fieldStr = nil;
-            if ([i isKindOfClass:[NSNumber class]]) {
-                fieldStr = [i stringValue];
-            } else {
-                fieldStr = i;
-            }
-
-            // see if this is specific property request in object - object.property
-            NSArray* parts = [fieldStr componentsSeparatedByString:@"."]; // returns original string if no separator found
-            NSString* name = [parts objectAtIndex:0];
-            NSString* property = nil;
-            if ([parts count] > 1) {
-                property = [parts objectAtIndex:1];
-            }
-            // see if this is a complex field by looking for its array of properties in objectAndProperties dictionary
-            id fields = [[CDVContact defaultObjectAndProperties] objectForKey:name];
-
-            // if find complex name (name,addresses,organizations, phone, emails, ims) in fields, add name as key
-            // with array of associated properties as the value
-            if ((fields != nil) && (property == nil)) { // request was for full object
-                keys = [NSMutableArray arrayWithArray:fields];
-                if (keys != nil) {
-                    [d setObject:keys forKey:name]; // will replace if prop array already exists
-                }
-            } else if ((fields != nil) && (property != nil)) {
-                // found an individual property request  in form of name.property
-                // verify is real property name by using it as key in W3CtoAB
-                id abEquiv = [[CDVContact defaultW3CtoAB] objectForKey:property];
-                if (abEquiv || [[CDVContact defaultW3CtoNull] containsObject:property]) {
-                    // if existing array add to it
-                    if ((keys = [d objectForKey:name]) != nil) {
-                        [keys addObject:property];
-                    } else {
-                        keys = [NSMutableArray arrayWithObject:property];
-                        [d setObject:keys forKey:name];
-                    }
-                } else {
-                    NSLog(@"Contacts.find -- request for invalid property ignored: %@.%@", name, property);
-                }
-            } else { // is an individual property, verify is real property name by using it as key in W3CtoAB
-                id valid = [[CDVContact defaultW3CtoAB] objectForKey:name];
-                if (valid || [[CDVContact defaultW3CtoNull] containsObject:name]) {
-                    [d setObject:[NSNull null] forKey:name];
-                }
-            }
-        }
-    }
-    if ([d count] == 0) {
-        // no array or nothing in the array. W3C spec says to return nothing
-        return nil;   // [Contact defaultFields];
-    }
-    return d;
-}
-
-/*
- * Search for the specified value in each of the fields specified in the searchFields dictionary.
- * NSString* value - the string value to search for (need clarification from W3C on how to search for dates)
- * NSDictionary* searchFields - a dictionary created via calcReturnFields where the key is the top level W3C
- *	object and the object is the array of specific fields within that object or null if it is a single property
- * RETURNS
- *	YES as soon as a match is found in any of the fields
- *	NO - the specified value does not exist in any of the fields in this contact
- *
- *  Note: I'm not a fan of returning in the middle of methods but have done it some in this method in order to
- *    keep the code simpler. bgibson
- */
-- (BOOL)foundValue:(NSString*)testValue inFields:(NSDictionary*)searchFields
-{
-    BOOL bFound = NO;
-
-    if ((testValue == nil) || ![testValue isKindOfClass:[NSString class]] || ([testValue length] == 0)) {
-        // nothing to find so return NO
-        return NO;
-    }
-    NSInteger valueAsInt = [testValue integerValue];
-
-    // per W3C spec, always include id in search
-    int recordId = ABRecordGetRecordID(self.record);
-    if (valueAsInt && (recordId == valueAsInt)) {
-        return YES;
-    }
-
-    if (searchFields == nil) {
-        // no fields to search
-        return NO;
-    }
-
-    if ([searchFields valueForKey:kW3ContactNickname]) {
-        bFound = [self testStringValue:testValue forW3CProperty:kW3ContactNickname];
-        if (bFound == YES) {
-            return bFound;
-        }
-    }
-
-    if ([searchFields valueForKeyIsArray:kW3ContactName]) {
-        // test name fields.  All are string properties obtained via ABRecordCopyValue except kW3ContactFormattedName
-        NSArray* fields = [searchFields valueForKey:kW3ContactName];
-
-        for (NSString* testItem in fields) {
-            if ([testItem isEqualToString:kW3ContactFormattedName]) {
-                NSString* propValue = (__bridge_transfer NSString*)ABRecordCopyCompositeName(self.record);
-                if ((propValue != nil) && ([propValue length] > 0)) {
-                    NSRange range = [propValue rangeOfString:testValue options:NSCaseInsensitiveSearch];
-                    bFound = (range.location != NSNotFound);
-                    propValue = nil;
-                }
-            } else {
-                bFound = [self testStringValue:testValue forW3CProperty:testItem];
-            }
-
-            if (bFound) {
-                break;
-            }
-        }
-    }
-    if (!bFound && [searchFields valueForKeyIsArray:kW3ContactPhoneNumbers]) {
-        bFound = [self searchContactFields:(NSArray*)[searchFields valueForKey:kW3ContactPhoneNumbers]
-                       forMVStringProperty:kABPersonPhoneProperty withValue:testValue];
-    }
-    if (!bFound && [searchFields valueForKeyIsArray:kW3ContactEmails]) {
-        bFound = [self searchContactFields:(NSArray*)[searchFields valueForKey:kW3ContactEmails]
-                       forMVStringProperty:kABPersonEmailProperty withValue:testValue];
-    }
-
-    if (!bFound && [searchFields valueForKeyIsArray:kW3ContactAddresses]) {
-        bFound = [self searchContactFields:[searchFields valueForKey:kW3ContactAddresses]
-                   forMVDictionaryProperty:kABPersonAddressProperty withValue:testValue];
-    }
-
-    if (!bFound && [searchFields valueForKeyIsArray:kW3ContactIms]) {
-        bFound = [self searchContactFields:[searchFields valueForKey:kW3ContactIms]
-                   forMVDictionaryProperty:kABPersonInstantMessageProperty withValue:testValue];
-    }
-
-    if (!bFound && [searchFields valueForKeyIsArray:kW3ContactOrganizations]) {
-        NSArray* fields = [searchFields valueForKey:kW3ContactOrganizations];
-
-        for (NSString* testItem in fields) {
-            bFound = [self testStringValue:testValue forW3CProperty:testItem];
-            if (bFound == YES) {
-                break;
-            }
-        }
-    }
-    if (!bFound && [searchFields valueForKey:kW3ContactNote]) {
-        bFound = [self testStringValue:testValue forW3CProperty:kW3ContactNote];
-    }
-
-    // if searching for a date field is requested, get the date field as a localized string then look for match against testValue in date string
-    // searching for photos is not supported
-    if (!bFound && [searchFields valueForKey:kW3ContactBirthday]) {
-        bFound = [self testDateValue:testValue forW3CProperty:kW3ContactBirthday];
-    }
-    if (!bFound && [searchFields valueForKeyIsArray:kW3ContactUrls]) {
-        bFound = [self searchContactFields:(NSArray*)[searchFields valueForKey:kW3ContactUrls]
-                       forMVStringProperty:kABPersonURLProperty withValue:testValue];
-    }
-
-    return bFound;
-}
-
-/*
- * Test for the existence of a given string within the value of a ABPersonRecord string property based on the W3c property name.
- *
- * IN:
- *	NSString* testValue - the value to find - search is case insensitive
- *  NSString* property - the W3c property string
- * OUT:
- * BOOL YES if the given string was found within the property value
- *		NO if the testValue was not found, W3C property string was invalid or the AddressBook property was not a string
- */
-- (BOOL)testStringValue:(NSString*)testValue forW3CProperty:(NSString*)property
-{
-    BOOL bFound = NO;
-
-    if ([[CDVContact defaultW3CtoAB] valueForKeyIsNumber:property]) {
-        ABPropertyID propId = [[[CDVContact defaultW3CtoAB] objectForKey:property] intValue];
-        if (ABPersonGetTypeOfProperty(propId) == kABStringPropertyType) {
-            NSString* propValue = (__bridge_transfer NSString*)ABRecordCopyValue(self.record, propId);
-            if ((propValue != nil) && ([propValue length] > 0)) {
-                NSPredicate* containPred = [NSPredicate predicateWithFormat:@"SELF contains[cd] %@", testValue];
-                bFound = [containPred evaluateWithObject:propValue];
-                // NSRange range = [propValue rangeOfString:testValue options: NSCaseInsensitiveSearch];
-                // bFound = (range.location != NSNotFound);
-            }
-        }
-    }
-    return bFound;
-}
-
-/*
- * Test for the existence of a given Date string within the value of a ABPersonRecord datetime property based on the W3c property name.
- *
- * IN:
- *	NSString* testValue - the value to find - search is case insensitive
- *  NSString* property - the W3c property string
- * OUT:
- * BOOL YES if the given string was found within the localized date string value
- *		NO if the testValue was not found, W3C property string was invalid or the AddressBook property was not a DateTime
- */
-- (BOOL)testDateValue:(NSString*)testValue forW3CProperty:(NSString*)property
-{
-    BOOL bFound = NO;
-
-    if ([[CDVContact defaultW3CtoAB] valueForKeyIsNumber:property]) {
-        ABPropertyID propId = [[[CDVContact defaultW3CtoAB] objectForKey:property] intValue];
-        if (ABPersonGetTypeOfProperty(propId) == kABDateTimePropertyType) {
-            NSDate* date = (__bridge_transfer NSDate*)ABRecordCopyValue(self.record, propId);
-            if (date != nil) {
-                NSString* dateString = [date descriptionWithLocale:[NSLocale currentLocale]];
-                NSPredicate* containPred = [NSPredicate predicateWithFormat:@"SELF contains[cd] %@", testValue];
-                bFound = [containPred evaluateWithObject:dateString];
-            }
-        }
-    }
-    return bFound;
-}
-
-/*
- * Search the specified fields within an AddressBook multivalue string property for the specified test value.
- * Used for phoneNumbers, emails and urls.
- * IN:
- *	NSArray* fields - the fields to search for within the multistring property (value and/or type)
- *	ABPropertyID - the property to search
- *	NSString* testValue - the value to search for. Will convert between W3C types and AB types.  Will only
- *		search for types if the testValue is a valid ContactField type.
- * OUT:
- *	YES if the test value was found in one of the specified fields
- *	NO if the test value was not found
- */
-- (BOOL)searchContactFields:(NSArray*)fields forMVStringProperty:(ABPropertyID)propId withValue:testValue
-{
-    BOOL bFound = NO;
-
-    for (NSString* type in fields) {
-        NSString* testString = nil;
-        if ([type isEqualToString:kW3ContactFieldType]) {
-            if ([CDVContact isValidW3ContactType:testValue]) {
-                // only search types if the filter string is a valid ContactField.type
-                testString = (NSString*)[CDVContact convertContactTypeToPropertyLabel:testValue];
-            }
-        } else {
-            testString = testValue;
-        }
-
-        if (testString != nil) {
-            bFound = [self testMultiValueStrings:testString forProperty:propId ofType:type];
-        }
-        if (bFound == YES) {
-            break;
-        }
-    }
-
-    return bFound;
-}
-
-/*
- * Searches a multiString value of the specified type for the specified test value.
- *
- * IN:
- *	NSString* testValue - the value to test for
- *	ABPropertyID propId - the property id of the multivalue property to search
- *	NSString* type - the W3C contact type to search for (value or type)
- * OUT:
- * YES is the test value was found
- * NO if the test value was not found
- */
-- (BOOL)testMultiValueStrings:(NSString*)testValue forProperty:(ABPropertyID)propId ofType:(NSString*)type
-{
-    BOOL bFound = NO;
-
-    if (ABPersonGetTypeOfProperty(propId) == kABMultiStringPropertyType) {
-        NSArray* valueArray = nil;
-        if ([type isEqualToString:kW3ContactFieldType]) {
-            valueArray = [self labelsForProperty:propId inRecord:self.record];
-        } else if ([type isEqualToString:kW3ContactFieldValue]) {
-            valueArray = [self valuesForProperty:propId inRecord:self.record];
-        }
-        if (valueArray) {
-            NSString* valuesAsString = [valueArray componentsJoinedByString:@" "];
-            NSPredicate* containPred = [NSPredicate predicateWithFormat:@"SELF contains[cd] %@", testValue];
-            bFound = [containPred evaluateWithObject:valuesAsString];
-        }
-    }
-    return bFound;
-}
-
-/*
- * Returns the array of values for a multivalue string property of the specified property id
- */
-- (__autoreleasing NSArray*)valuesForProperty:(ABPropertyID)propId inRecord:(ABRecordRef)aRecord
-{
-    ABMultiValueRef multi = ABRecordCopyValue(aRecord, propId);
-    NSArray* values = (__bridge_transfer NSArray*)ABMultiValueCopyArrayOfAllValues(multi);
-
-    CFRelease(multi);
-    return values;
-}
-
-/*
- * Returns the array of labels for a multivalue string property of the specified property id
- */
-- (NSArray*)labelsForProperty:(ABPropertyID)propId inRecord:(ABRecordRef)aRecord
-{
-    ABMultiValueRef multi = ABRecordCopyValue(aRecord, propId);
-    CFIndex count = ABMultiValueGetCount(multi);
-    NSMutableArray* labels = [NSMutableArray arrayWithCapacity:count];
-
-    for (int i = 0; i < count; i++) {
-        NSString* label = (__bridge_transfer NSString*)ABMultiValueCopyLabelAtIndex(multi, i);
-        if (label) {
-            [labels addObject:label];
-        }
-    }
-
-    CFRelease(multi);
-    return labels;
-}
-
-/* search for values within MultiValue Dictionary properties Address or IM property
- * IN:
- * (NSArray*) fields - the array of W3C field names to search within
- * (ABPropertyID) propId - the AddressBook property that returns a multivalue dictionary
- * (NSString*) testValue - the string to search for within the specified fields
- *
- */
-- (BOOL)searchContactFields:(NSArray*)fields forMVDictionaryProperty:(ABPropertyID)propId withValue:(NSString*)testValue
-{
-    BOOL bFound = NO;
-
-    NSArray* values = [self valuesForProperty:propId inRecord:self.record];  // array of dictionaries (as CFDictionaryRef)
-    int dictCount = [values count];
-
-    // for ims dictionary contains with service (w3C type) and username (W3c value)
-    // for addresses dictionary contains street, city, state, zip, country
-    for (int i = 0; i < dictCount; i++) {
-        CFDictionaryRef dict = (__bridge CFDictionaryRef)[values objectAtIndex:i];
-
-        for (NSString* member in fields) {
-            NSString* abKey = [[CDVContact defaultW3CtoAB] valueForKey:member]; // im and address fields are all strings
-            CFStringRef abValue = nil;
-            if (abKey) {
-                NSString* testString = nil;
-                if ([member isEqualToString:kW3ContactImType]) {
-                    if ([CDVContact isValidW3ContactType:testValue]) {
-                        // only search service/types if the filter string is a valid ContactField.type
-                        testString = (NSString*)[CDVContact convertContactTypeToPropertyLabel:testValue];
-                    }
-                } else {
-                    testString = testValue;
-                }
-                if (testString != nil) {
-                    BOOL bExists = CFDictionaryGetValueIfPresent(dict, (__bridge const void*)abKey, (void*)&abValue);
-                    if (bExists) {
-                        CFRetain(abValue);
-                        NSPredicate* containPred = [NSPredicate predicateWithFormat:@"SELF contains[cd] %@", testString];
-                        bFound = [containPred evaluateWithObject:(__bridge id)abValue];
-                        CFRelease(abValue);
-                    }
-                }
-            }
-            if (bFound == YES) {
-                break;
-            }
-        } // end of for each member in fields
-
-        if (bFound == YES) {
-            break;
-        }
-    } // end of for each dictionary
-
-    return bFound;
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/src/ios/CDVContacts.h
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/src/ios/CDVContacts.h b/spec/plugins/Contacts/src/ios/CDVContacts.h
deleted file mode 100644
index e3deb21..0000000
--- a/spec/plugins/Contacts/src/ios/CDVContacts.h
+++ /dev/null
@@ -1,151 +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.
- */
-
-#import <Foundation/Foundation.h>
-#import <AddressBook/ABAddressBook.h>
-#import <AddressBookUI/AddressBookUI.h>
-#import <Cordova/CDVPlugin.h>
-#import "CDVContact.h"
-
-@interface CDVContacts : CDVPlugin <ABNewPersonViewControllerDelegate,
-                         ABPersonViewControllerDelegate,
-                         ABPeoplePickerNavigationControllerDelegate
-                         >
-{
-    ABAddressBookRef addressBook;
-}
-
-/*
- * newContact - create a new contact via the GUI
- *
- * arguments:
- *	1: successCallback: this is the javascript function that will be called with the newly created contactId
- */
-- (void)newContact:(CDVInvokedUrlCommand*)command;
-
-/*
- * displayContact  - IN PROGRESS
- *
- * arguments:
- *	1: recordID of the contact to display in the iPhone contact display
- *	2: successCallback - currently not used
- *  3: error callback
- * options:
- *	allowsEditing: set to true to allow the user to edit the contact - currently not supported
- */
-- (void)displayContact:(CDVInvokedUrlCommand*)command;
-
-/*
- * chooseContact
- *
- * arguments:
- *	1: this is the javascript function that will be called with the contact data as a JSON object (as the first param)
- * options:
- *	allowsEditing: set to true to not choose the contact, but to edit it in the iPhone contact editor
- */
-- (void)chooseContact:(CDVInvokedUrlCommand*)command;
-
-- (void)newPersonViewController:(ABNewPersonViewController*)newPersonViewController didCompleteWithNewPerson:(ABRecordRef)person;
-- (BOOL)personViewController:(ABPersonViewController*)personViewController shouldPerformDefaultActionForPerson:(ABRecordRef)person
-                    property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifierForValue;
-
-/*
- * search - searches for contacts.  Only person records are currently supported.
- *
- * arguments:
- *  1: successcallback - this is the javascript function that will be called with the array of found contacts
- *  2:  errorCallback - optional javascript function to be called in the event of an error with an error code.
- * options:  dictionary containing ContactFields and ContactFindOptions
- *	fields - ContactFields array
- *  findOptions - ContactFindOptions object as dictionary
- *
- */
-- (void)search:(CDVInvokedUrlCommand*)command;
-
-/*
- * save - saves a new contact or updates and existing contact
- *
- * arguments:
- *  1: success callback - this is the javascript function that will be called with the JSON representation of the saved contact
- *		search calls a fixed navigator.service.contacts._findCallback which then calls the success callback stored before making the call into obj-c
- */
-- (void)save:(CDVInvokedUrlCommand*)command;
-
-/*
- * remove - removes a contact from the address book
- *
- * arguments:
- *  1:  1: successcallback - this is the javascript function that will be called with a (now) empty contact object
- *
- * options:  dictionary containing Contact object to remove
- *	contact - Contact object as dictionary
- */
-- (void)remove:(CDVInvokedUrlCommand*)command;
-
-// - (void) dealloc;
-
-@end
-
-@interface CDVContactsPicker : ABPeoplePickerNavigationController
-{
-    BOOL allowsEditing;
-    NSString* callbackId;
-    NSDictionary* options;
-    NSDictionary* pickedContactDictionary;
-}
-
-@property BOOL allowsEditing;
-@property (copy) NSString* callbackId;
-@property (nonatomic, strong) NSDictionary* options;
-@property (nonatomic, strong) NSDictionary* pickedContactDictionary;
-
-@end
-
-@interface CDVNewContactsController : ABNewPersonViewController
-{
-    NSString* callbackId;
-}
-@property (copy) NSString* callbackId;
-@end
-
-/* ABPersonViewController does not have any UI to dismiss.  Adding navigationItems to it does not work properly,  the navigationItems are lost when the app goes into the background.
-    The solution was to create an empty NavController in front of the ABPersonViewController. This
-    causes the ABPersonViewController to have a back button. By subclassing the ABPersonViewController,
-    we can override viewWillDisappear and take down the entire NavigationController at that time.
- */
-@interface CDVDisplayContactViewController : ABPersonViewController
-{}
-@property (nonatomic, strong) CDVPlugin* contactsPlugin;
-
-@end
-@interface CDVAddressBookAccessError : NSObject
-{}
-@property (assign) CDVContactError errorCode;
-- (CDVAddressBookAccessError*)initWithCode:(CDVContactError)code;
-@end
-
-typedef void (^ CDVAddressBookWorkerBlock)(
-    ABAddressBookRef         addressBook,
-    CDVAddressBookAccessError* error
-    );
-@interface CDVAddressBookHelper : NSObject
-{}
-
-- (void)createAddressBook:(CDVAddressBookWorkerBlock)workerBlock;
-@end


[21/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/ChildBrowser/src/ios/ChildBrowserViewController.xib
----------------------------------------------------------------------
diff --git a/spec/plugins/ChildBrowser/src/ios/ChildBrowserViewController.xib b/spec/plugins/ChildBrowser/src/ios/ChildBrowserViewController.xib
deleted file mode 100644
index cc8dd65..0000000
--- a/spec/plugins/ChildBrowser/src/ios/ChildBrowserViewController.xib
+++ /dev/null
@@ -1,875 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
-	<data>
-		<int key="IBDocument.SystemTarget">768</int>
-		<string key="IBDocument.SystemVersion">10K540</string>
-		<string key="IBDocument.InterfaceBuilderVersion">851</string>
-		<string key="IBDocument.AppKitVersion">1038.36</string>
-		<string key="IBDocument.HIToolboxVersion">461.00</string>
-		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
-			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-			<string key="NS.object.0">141</string>
-		</object>
-		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
-			<bool key="EncodedWithXMLCoder">YES</bool>
-		</object>
-		<object class="NSArray" key="IBDocument.PluginDependencies">
-			<bool key="EncodedWithXMLCoder">YES</bool>
-			<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-		</object>
-		<object class="NSMutableDictionary" key="IBDocument.Metadata">
-			<bool key="EncodedWithXMLCoder">YES</bool>
-			<object class="NSArray" key="dict.sortedKeys" id="0">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-			</object>
-			<object class="NSMutableArray" key="dict.values">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-			</object>
-		</object>
-		<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
-			<bool key="EncodedWithXMLCoder">YES</bool>
-			<object class="IBProxyObject" id="372490531">
-				<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
-				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-			</object>
-			<object class="IBProxyObject" id="975951072">
-				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
-				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-			</object>
-			<object class="IBUIView" id="191373211">
-				<nil key="NSNextResponder"/>
-				<int key="NSvFlags">292</int>
-				<object class="NSMutableArray" key="NSSubviews">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<object class="IBUIWebView" id="345761693">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">-2147483374</int>
-						<string key="NSFrameSize">{480, 229}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<reference key="NSNextKeyView" ref="471899933"/>
-						<object class="NSColor" key="IBUIBackgroundColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MCAwIDAAA</bytes>
-						</object>
-						<bool key="IBUIClipsSubviews">YES</bool>
-						<bool key="IBUIMultipleTouchEnabled">YES</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<int key="IBUIDataDetectorTypes">1</int>
-						<bool key="IBUIDetectsPhoneNumbers">YES</bool>
-					</object>
-					<object class="IBUIToolbar" id="471899933">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">266</int>
-						<string key="NSFrame">{{0, 256}, {480, 44}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<reference key="NSNextKeyView" ref="349240355"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<int key="IBUIBarStyle">1</int>
-						<object class="NSMutableArray" key="IBUIItems">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<object class="IBUIBarButtonItem" id="966737436">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<int key="IBUIStyle">1</int>
-								<reference key="IBUIToolbar" ref="471899933"/>
-								<int key="IBUISystemItemIdentifier">0</int>
-							</object>
-							<object class="IBUIBarButtonItem" id="312951844">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="471899933"/>
-								<int key="IBUISystemItemIdentifier">5</int>
-							</object>
-							<object class="IBUIBarButtonItem" id="615970053">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="471899933"/>
-							</object>
-							<object class="IBUIBarButtonItem" id="111711024">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="471899933"/>
-								<int key="IBUISystemItemIdentifier">5</int>
-							</object>
-							<object class="IBUIBarButtonItem" id="227415391">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<float key="IBUIWidth">32</float>
-								<reference key="IBUIToolbar" ref="471899933"/>
-							</object>
-							<object class="IBUIBarButtonItem" id="766205236">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="471899933"/>
-								<int key="IBUISystemItemIdentifier">5</int>
-							</object>
-							<object class="IBUIBarButtonItem" id="283287216">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<float key="IBUIWidth">32</float>
-								<reference key="IBUIToolbar" ref="471899933"/>
-							</object>
-							<object class="IBUIBarButtonItem" id="129413107">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="471899933"/>
-								<int key="IBUISystemItemIdentifier">5</int>
-							</object>
-							<object class="IBUIBarButtonItem" id="1046195837">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<float key="IBUIWidth">32</float>
-								<reference key="IBUIToolbar" ref="471899933"/>
-							</object>
-							<object class="IBUIBarButtonItem" id="667527307">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="471899933"/>
-								<int key="IBUISystemItemIdentifier">5</int>
-							</object>
-						</object>
-					</object>
-					<object class="IBUILabel" id="349240355">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">270</int>
-						<string key="NSFrame">{{5, 230}, {418, 21}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<reference key="NSNextKeyView" ref="89602979"/>
-						<object class="NSColor" key="IBUIBackgroundColor">
-							<int key="NSColorSpace">4</int>
-							<bytes key="NSWhite">MC42NjY2NjY2OSAwAA</bytes>
-						</object>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClipsSubviews">YES</bool>
-						<bool key="IBUIUserInteractionEnabled">NO</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<string key="IBUIText">Loading...</string>
-						<object class="NSFont" key="IBUIFont">
-							<string key="NSName">Helvetica</string>
-							<double key="NSSize">13</double>
-							<int key="NSfFlags">16</int>
-						</object>
-						<object class="NSColor" key="IBUITextColor">
-							<int key="NSColorSpace">3</int>
-							<bytes key="NSWhite">MQA</bytes>
-						</object>
-						<nil key="IBUIHighlightedColor"/>
-						<int key="IBUIBaselineAdjustment">1</int>
-						<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
-						<float key="IBUIMinimumFontSize">10</float>
-					</object>
-					<object class="IBUIActivityIndicatorView" id="89602979">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">-2147483383</int>
-						<string key="NSFrame">{{454, 231}, {20, 20}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<bool key="IBUIUserInteractionEnabled">NO</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-					</object>
-				</object>
-				<string key="NSFrame">{{0, 20}, {480, 300}}</string>
-				<reference key="NSNextKeyView" ref="345761693"/>
-				<object class="NSColor" key="IBUIBackgroundColor">
-					<int key="NSColorSpace">3</int>
-					<bytes key="NSWhite">MC41AA</bytes>
-					<object class="NSColorSpace" key="NSCustomColorSpace">
-						<int key="NSID">2</int>
-					</object>
-				</object>
-				<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
-				<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
-					<int key="interfaceOrientation">3</int>
-				</object>
-				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-			</object>
-		</object>
-		<object class="IBObjectContainer" key="IBDocument.Objects">
-			<object class="NSMutableArray" key="connectionRecords">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">webView</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="345761693"/>
-					</object>
-					<int key="connectionID">17</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">addressLabel</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="349240355"/>
-					</object>
-					<int key="connectionID">18</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">backBtn</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="227415391"/>
-					</object>
-					<int key="connectionID">19</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">fwdBtn</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="283287216"/>
-					</object>
-					<int key="connectionID">22</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">refreshBtn</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="615970053"/>
-					</object>
-					<int key="connectionID">23</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">onDoneButtonPress:</string>
-						<reference key="source" ref="966737436"/>
-						<reference key="destination" ref="372490531"/>
-					</object>
-					<int key="connectionID">26</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">reload</string>
-						<reference key="source" ref="615970053"/>
-						<reference key="destination" ref="345761693"/>
-					</object>
-					<int key="connectionID">27</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">goBack</string>
-						<reference key="source" ref="227415391"/>
-						<reference key="destination" ref="345761693"/>
-					</object>
-					<int key="connectionID">28</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">goForward</string>
-						<reference key="source" ref="283287216"/>
-						<reference key="destination" ref="345761693"/>
-					</object>
-					<int key="connectionID">29</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">onSafariButtonPress:</string>
-						<reference key="source" ref="1046195837"/>
-						<reference key="destination" ref="372490531"/>
-					</object>
-					<int key="connectionID">31</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">view</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="191373211"/>
-					</object>
-					<int key="connectionID">35</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">spinner</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="89602979"/>
-					</object>
-					<int key="connectionID">36</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">safariBtn</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="1046195837"/>
-					</object>
-					<int key="connectionID">40</int>
-				</object>
-			</object>
-			<object class="IBMutableOrderedSet" key="objectRecords">
-				<object class="NSArray" key="orderedObjects">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<object class="IBObjectRecord">
-						<int key="objectID">0</int>
-						<reference key="object" ref="0"/>
-						<reference key="children" ref="1000"/>
-						<nil key="parent"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">1</int>
-						<reference key="object" ref="191373211"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="471899933"/>
-							<reference ref="349240355"/>
-							<reference ref="89602979"/>
-							<reference ref="345761693"/>
-						</object>
-						<reference key="parent" ref="0"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">-1</int>
-						<reference key="object" ref="372490531"/>
-						<reference key="parent" ref="0"/>
-						<string key="objectName">File's Owner</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">-2</int>
-						<reference key="object" ref="975951072"/>
-						<reference key="parent" ref="0"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">4</int>
-						<reference key="object" ref="345761693"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">6</int>
-						<reference key="object" ref="471899933"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="966737436"/>
-							<reference ref="615970053"/>
-							<reference ref="227415391"/>
-							<reference ref="283287216"/>
-							<reference ref="1046195837"/>
-							<reference ref="111711024"/>
-							<reference ref="129413107"/>
-							<reference ref="312951844"/>
-							<reference ref="667527307"/>
-							<reference ref="766205236"/>
-						</object>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">7</int>
-						<reference key="object" ref="966737436"/>
-						<reference key="parent" ref="471899933"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">8</int>
-						<reference key="object" ref="615970053"/>
-						<reference key="parent" ref="471899933"/>
-						<string key="objectName">Bar Button Item (Reload)</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">9</int>
-						<reference key="object" ref="227415391"/>
-						<reference key="parent" ref="471899933"/>
-						<string key="objectName">Bar Button Item (Go Back)</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">10</int>
-						<reference key="object" ref="283287216"/>
-						<reference key="parent" ref="471899933"/>
-						<string key="objectName">Bar Button Item (Go Forward)</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">11</int>
-						<reference key="object" ref="1046195837"/>
-						<reference key="parent" ref="471899933"/>
-						<string key="objectName">Bar Button Item (Safari)</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">13</int>
-						<reference key="object" ref="349240355"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">14</int>
-						<reference key="object" ref="111711024"/>
-						<reference key="parent" ref="471899933"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">15</int>
-						<reference key="object" ref="129413107"/>
-						<reference key="parent" ref="471899933"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">32</int>
-						<reference key="object" ref="89602979"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">37</int>
-						<reference key="object" ref="312951844"/>
-						<reference key="parent" ref="471899933"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">38</int>
-						<reference key="object" ref="667527307"/>
-						<reference key="parent" ref="471899933"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">39</int>
-						<reference key="object" ref="766205236"/>
-						<reference key="parent" ref="471899933"/>
-					</object>
-				</object>
-			</object>
-			<object class="NSMutableDictionary" key="flattenedProperties">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="NSArray" key="dict.sortedKeys">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<string>-1.CustomClassName</string>
-					<string>-2.CustomClassName</string>
-					<string>1.IBEditorWindowLastContentRect</string>
-					<string>1.IBPluginDependency</string>
-					<string>10.IBPluginDependency</string>
-					<string>11.IBPluginDependency</string>
-					<string>13.IBPluginDependency</string>
-					<string>13.IBViewBoundsToFrameTransform</string>
-					<string>14.IBPluginDependency</string>
-					<string>15.IBPluginDependency</string>
-					<string>32.IBPluginDependency</string>
-					<string>32.IBViewBoundsToFrameTransform</string>
-					<string>37.IBPluginDependency</string>
-					<string>38.IBPluginDependency</string>
-					<string>39.IBPluginDependency</string>
-					<string>4.IBPluginDependency</string>
-					<string>4.IBViewBoundsToFrameTransform</string>
-					<string>6.IBPluginDependency</string>
-					<string>6.IBViewBoundsToFrameTransform</string>
-					<string>7.IBPluginDependency</string>
-					<string>8.IBPluginDependency</string>
-					<string>9.IBPluginDependency</string>
-				</object>
-				<object class="NSMutableArray" key="dict.values">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<string>ChildBrowserViewController</string>
-					<string>UIResponder</string>
-					<string>{{250, 643}, {480, 320}}</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<object class="NSAffineTransform">
-						<bytes key="NSTransformStruct">P4AAAL+AAABCoAAAwygAAA</bytes>
-					</object>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<object class="NSAffineTransform">
-						<bytes key="NSTransformStruct">P4AAAL+AAABD5gAAw3kAAA</bytes>
-					</object>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<object class="NSAffineTransform">
-						<bytes key="NSTransformStruct">P4AAAL+AAABB8AAAwwUAAA</bytes>
-					</object>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<object class="NSAffineTransform">
-						<bytes key="NSTransformStruct">P4AAAL+AAAAAAAAAw10AAA</bytes>
-					</object>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-				</object>
-			</object>
-			<object class="NSMutableDictionary" key="unlocalizedProperties">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<reference key="dict.sortedKeys" ref="0"/>
-				<object class="NSMutableArray" key="dict.values">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-				</object>
-			</object>
-			<nil key="activeLocalization"/>
-			<object class="NSMutableDictionary" key="localizations">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<reference key="dict.sortedKeys" ref="0"/>
-				<object class="NSMutableArray" key="dict.values">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-				</object>
-			</object>
-			<nil key="sourceID"/>
-			<int key="maxID">40</int>
-		</object>
-		<object class="IBClassDescriber" key="IBDocument.Classes">
-			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="IBPartialClassDescription">
-					<string key="className">ChildBrowserViewController</string>
-					<string key="superclassName">UIViewController</string>
-					<object class="NSMutableDictionary" key="actions">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>onDoneButtonPress:</string>
-							<string>onSafariButtonPress:</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>id</string>
-							<string>id</string>
-						</object>
-					</object>
-					<object class="NSMutableDictionary" key="actionInfosByName">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>onDoneButtonPress:</string>
-							<string>onSafariButtonPress:</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<object class="IBActionInfo">
-								<string key="name">onDoneButtonPress:</string>
-								<string key="candidateClassName">id</string>
-							</object>
-							<object class="IBActionInfo">
-								<string key="name">onSafariButtonPress:</string>
-								<string key="candidateClassName">id</string>
-							</object>
-						</object>
-					</object>
-					<object class="NSMutableDictionary" key="outlets">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>addressLabel</string>
-							<string>backBtn</string>
-							<string>closeBtn</string>
-							<string>delegate</string>
-							<string>fwdBtn</string>
-							<string>refreshBtn</string>
-							<string>safariBtn</string>
-							<string>spinner</string>
-							<string>webView</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>UILabel</string>
-							<string>UIBarButtonItem</string>
-							<string>UIBarButtonItem</string>
-							<string>id</string>
-							<string>UIBarButtonItem</string>
-							<string>UIBarButtonItem</string>
-							<string>UIBarButtonItem</string>
-							<string>UIActivityIndicatorView</string>
-							<string>UIWebView</string>
-						</object>
-					</object>
-					<object class="NSMutableDictionary" key="toOneOutletInfosByName">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>addressLabel</string>
-							<string>backBtn</string>
-							<string>closeBtn</string>
-							<string>delegate</string>
-							<string>fwdBtn</string>
-							<string>refreshBtn</string>
-							<string>safariBtn</string>
-							<string>spinner</string>
-							<string>webView</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<object class="IBToOneOutletInfo">
-								<string key="name">addressLabel</string>
-								<string key="candidateClassName">UILabel</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">backBtn</string>
-								<string key="candidateClassName">UIBarButtonItem</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">closeBtn</string>
-								<string key="candidateClassName">UIBarButtonItem</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">delegate</string>
-								<string key="candidateClassName">id</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">fwdBtn</string>
-								<string key="candidateClassName">UIBarButtonItem</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">refreshBtn</string>
-								<string key="candidateClassName">UIBarButtonItem</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">safariBtn</string>
-								<string key="candidateClassName">UIBarButtonItem</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">spinner</string>
-								<string key="candidateClassName">UIActivityIndicatorView</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">webView</string>
-								<string key="candidateClassName">UIWebView</string>
-							</object>
-						</object>
-					</object>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">Plugins/ChildBrowser/ChildBrowserViewController.h</string>
-					</object>
-				</object>
-			</object>
-			<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSError.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">QuartzCore.framework/Headers/CAAnimation.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">QuartzCore.framework/Headers/CALayer.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier" id="485348283">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIActivityIndicatorView</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIActivityIndicatorView.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIBarButtonItem</string>
-					<string key="superclassName">UIBarItem</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIBarButtonItem.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIBarItem</string>
-					<string key="superclassName">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIBarItem.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UILabel</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UILabel.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIResponder</string>
-					<string key="superclassName">NSObject</string>
-					<reference key="sourceIdentifier" ref="485348283"/>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UISearchBar</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UISearchDisplayController</string>
-					<string key="superclassName">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIToolbar</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIToolbar.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIView</string>
-					<string key="superclassName">UIResponder</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIViewController</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">MediaPlayer.framework/Headers/MPMoviePlayerViewController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIViewController</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIViewController</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIViewController</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIViewController</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIViewController</string>
-					<string key="superclassName">UIResponder</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIWebView</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIWebView.h</string>
-					</object>
-				</object>
-			</object>
-		</object>
-		<int key="IBDocument.localizationMode">0</int>
-		<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
-		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
-			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
-			<integer value="768" key="NS.object.0"/>
-		</object>
-		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
-			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
-			<integer value="1056" key="NS.object.0"/>
-		</object>
-		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
-			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
-			<integer value="3000" key="NS.object.0"/>
-		</object>
-		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
-		<nil key="IBDocument.LastKnownRelativeProjectPath"/>
-		<int key="IBDocument.defaultPropertyAccessControl">3</int>
-		<string key="IBCocoaTouchPluginVersion">141</string>
-	</data>
-</archive>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/ChildBrowser/src/ios/TargetDirTest.h
----------------------------------------------------------------------
diff --git a/spec/plugins/ChildBrowser/src/ios/TargetDirTest.h b/spec/plugins/ChildBrowser/src/ios/TargetDirTest.h
deleted file mode 100644
index 60a1403..0000000
--- a/spec/plugins/ChildBrowser/src/ios/TargetDirTest.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-
- 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/ChildBrowser/src/ios/TargetDirTest.m
----------------------------------------------------------------------
diff --git a/spec/plugins/ChildBrowser/src/ios/TargetDirTest.m b/spec/plugins/ChildBrowser/src/ios/TargetDirTest.m
deleted file mode 100644
index 8d1c8b6..0000000
--- a/spec/plugins/ChildBrowser/src/ios/TargetDirTest.m
+++ /dev/null
@@ -1 +0,0 @@
- 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/ChildBrowser/src/ios/preserveDirs/PreserveDirsTest.h
----------------------------------------------------------------------
diff --git a/spec/plugins/ChildBrowser/src/ios/preserveDirs/PreserveDirsTest.h b/spec/plugins/ChildBrowser/src/ios/preserveDirs/PreserveDirsTest.h
deleted file mode 100644
index 60a1403..0000000
--- a/spec/plugins/ChildBrowser/src/ios/preserveDirs/PreserveDirsTest.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-
- 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/ChildBrowser/src/ios/preserveDirs/PreserveDirsTest.m
----------------------------------------------------------------------
diff --git a/spec/plugins/ChildBrowser/src/ios/preserveDirs/PreserveDirsTest.m b/spec/plugins/ChildBrowser/src/ios/preserveDirs/PreserveDirsTest.m
deleted file mode 100644
index 8d1c8b6..0000000
--- a/spec/plugins/ChildBrowser/src/ios/preserveDirs/PreserveDirsTest.m
+++ /dev/null
@@ -1 +0,0 @@
- 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/ChildBrowser/www/childbrowser.js
----------------------------------------------------------------------
diff --git a/spec/plugins/ChildBrowser/www/childbrowser.js b/spec/plugins/ChildBrowser/www/childbrowser.js
deleted file mode 100644
index 5263b0c..0000000
--- a/spec/plugins/ChildBrowser/www/childbrowser.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/ChildBrowser/www/childbrowser/image.jpg
----------------------------------------------------------------------
diff --git a/spec/plugins/ChildBrowser/www/childbrowser/image.jpg b/spec/plugins/ChildBrowser/www/childbrowser/image.jpg
deleted file mode 100644
index 257cc56..0000000
--- a/spec/plugins/ChildBrowser/www/childbrowser/image.jpg
+++ /dev/null
@@ -1 +0,0 @@
-foo

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/ChildBrowser/www/childbrowser_file.html
----------------------------------------------------------------------
diff --git a/spec/plugins/ChildBrowser/www/childbrowser_file.html b/spec/plugins/ChildBrowser/www/childbrowser_file.html
deleted file mode 100644
index 6de7b8c..0000000
--- a/spec/plugins/ChildBrowser/www/childbrowser_file.html
+++ /dev/null
@@ -1 +0,0 @@
-This is a test file.

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/ConfigTestPlugin/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/ConfigTestPlugin/plugin.xml b/spec/plugins/ConfigTestPlugin/plugin.xml
deleted file mode 100644
index 54b4895..0000000
--- a/spec/plugins/ConfigTestPlugin/plugin.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="com.phonegap.configtest"
-    version="3.0.0">
-
-    <name>Does Code Fil Write Even Work? Hopefully the Tests Will Tell Us</name>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="/widget">
-            <poop/>
-        </config-file>
-        <config-file target="res/xml/config.xml" parent="/widget">
-            <poop/>
-        </config-file>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/plugin.xml b/spec/plugins/Contacts/plugin.xml
deleted file mode 100644
index 7328f1a..0000000
--- a/spec/plugins/Contacts/plugin.xml
+++ /dev/null
@@ -1,143 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-           id="org.apache.cordova.core.contacts"
-      version="0.1.0">
-    <name>Contacts</name>
-
-
-    <js-module src="www/contacts.js" name="contacts">
-        <clobbers target="navigator.contacts" />
-    </js-module>
-
-    <js-module src="www/Contact.js" name="Contact">
-        <clobbers target="Contact" />
-    </js-module>
-
-    <js-module src="www/ContactAddress.js" name="ContactAddress">
-        <clobbers target="ContactAddress" />
-    </js-module>
-
-    <js-module src="www/ContactError.js" name="ContactError">
-        <clobbers target="ContactError" />
-    </js-module>
-
-    <js-module src="www/ContactField.js" name="ContactField">
-        <clobbers target="ContactField" />
-    </js-module>
-
-    <js-module src="www/ContactFindOptions.js" name="ContactFindOptions">
-        <clobbers target="ContactFindOptions" />
-    </js-module>
-
-    <js-module src="www/ContactName.js" name="ContactName">
-        <clobbers target="ContactName" />
-    </js-module>
-
-    <js-module src="www/ContactOrganization.js" name="ContactOrganization">
-        <clobbers target="ContactOrganization" />
-    </js-module>
-
-
-
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="/*">
-            <feature name="Contacts">
-                <param name="android-package" value="org.apache.cordova.core.ContactManager"/>
-            </feature>
-        </config-file>
-
-        <config-file target="AndroidManifest.xml" parent="/*">
-            <uses-permission android:name="android.permission.READ_CONTACTS" />
-            <uses-permission android:name="android.permission.WRITE_CONTACTS" />
-            <uses-permission android:name="android.permission.GET_ACCOUNTS" />
-        </config-file>
-
-        <source-file src="src/android/ContactAccessor.java" target-dir="src/org/apache/cordova/core" />
-        <source-file src="src/android/ContactAccessorSdk5.java" target-dir="src/org/apache/cordova/core" />
-        <source-file src="src/android/ContactManager.java" target-dir="src/org/apache/cordova/core" />
-    </platform>
-
-    <!-- ios -->
-    <platform name="ios">
-        <config-file target="config.xml" parent="/*">
-            <feature name="Contacts">
-                <param name="ios-package" value="CDVContacts"/>
-            </feature>
-        </config-file>
-
-        <js-module src="www/ios/contacts.js" name="contacts">
-            <merges target="navigator.contacts" />
-        </js-module>
-
-        <js-module src="www/ios/Contact.js" name="Contact">
-            <merges target="Contact" />
-        </js-module>
-
-        <header-file src="src/ios/CDVContacts.h" />
-        <source-file src="src/ios/CDVContacts.m" />
-        <header-file src="src/ios/CDVContact.h" />
-        <source-file src="src/ios/CDVContact.m" />
-    </platform>
-
-    <!-- blackberry10 -->
-    <platform name="blackberry10">
-        <config-file target="www/config.xml" parent="/widget">
-            <feature name="Contacts" value="Contacts"/>
-        </config-file>
-        <config-file target="www/config.xml" parent="/widget">
-            <rim:permissions>
-            </rim:permissions>
-        </config-file>
-        <config-file target="www/config.xml" parent="/widget/rim:permissions">
-            <rim:permit>access_pimdomain_contacts</rim:permit>
-        </config-file>
-        <source-file src="src/blackberry10/index.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactActivity.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactAddress.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/contactConsts.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactError.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactField.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactFindOptions.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactName.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactNews.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactOrganization.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactPhoto.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/contactUtils.js" target-dir="Contacts"></source-file>
-        <dependency id="com.blackberry.utils" url="https://github.com/blackberry/cordova-blackberry-plugins.git" commit="plugins" subdir="plugin/com.blackberry.utils"/>
-        <dependency id="org.apache.cordova.blackberry10.pimlib" url="https://github.com/blackberry/cordova-blackberry-plugins.git" commit="plugins" subdir="/plugin/org.apache.cordova.blackberry10.pimlib/"/>
-    </platform>
-
-    <!-- wp7 -->
-    <platform name="wp7">
-        <config-file target="config.xml" parent="/*">
-            <feature name="Contacts">
-                <param name="wp-package" value="Contacts"/>
-            </feature>
-        </config-file>
-
-        <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Capabilities">
-            <Capability Name="ID_CAP_CONTACTS" />
-        </config-file>
-
-        <source-file src="src/wp/Contacts.cs" />
-    </platform>
-
-    <!-- wp8 -->
-    <platform name="wp8">
-        <config-file target="config.xml" parent="/*">
-            <feature name="Contacts">
-                <param name="wp-package" value="Contacts"/>
-            </feature>
-        </config-file>
-
-        <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Capabilities">
-            <Capability Name="ID_CAP_CONTACTS" />
-        </config-file>
-
-        <source-file src="src/wp/Contacts.cs" />
-    </platform>
-
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/src/android/ContactAccessor.java
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/src/android/ContactAccessor.java b/spec/plugins/Contacts/src/android/ContactAccessor.java
deleted file mode 100644
index 24ef9c6..0000000
--- a/spec/plugins/Contacts/src/android/ContactAccessor.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed 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.
- */
-
-package org.apache.cordova.core;
-
-import java.util.HashMap;
-
-import android.util.Log;
-import android.webkit.WebView;
-
-import org.apache.cordova.CordovaInterface;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-/**
- * This abstract class defines SDK-independent API for communication with
- * Contacts Provider. The actual implementation used by the application depends
- * on the level of API available on the device. If the API level is Cupcake or
- * Donut, we want to use the {@link ContactAccessorSdk3_4} class. If it is
- * Eclair or higher, we want to use {@link ContactAccessorSdk5}.
- */
-public abstract class ContactAccessor {
-
-    protected final String LOG_TAG = "ContactsAccessor";
-    protected CordovaInterface mApp;
-    protected WebView mView;
-
-    /**
-     * Check to see if the data associated with the key is required to
-     * be populated in the Contact object.
-     * @param key
-     * @param map created by running buildPopulationSet.
-     * @return true if the key data is required
-     */
-    protected boolean isRequired(String key, HashMap<String,Boolean> map) {
-        Boolean retVal = map.get(key);
-        return (retVal == null) ? false : retVal.booleanValue();
-    }
-
-    /**
-     * Create a hash map of what data needs to be populated in the Contact object
-     * @param fields the list of fields to populate
-     * @return the hash map of required data
-     */
-    protected HashMap<String,Boolean> buildPopulationSet(JSONArray fields) {
-        HashMap<String,Boolean> map = new HashMap<String,Boolean>();
-
-        String key;
-        try {
-            if (fields.length() == 1 && fields.getString(0).equals("*")) {
-                map.put("displayName", true);
-                map.put("name", true);
-                map.put("nickname", true);
-                map.put("phoneNumbers", true);
-                map.put("emails", true);
-                map.put("addresses", true);
-                map.put("ims", true);
-                map.put("organizations", true);
-                map.put("birthday", true);
-                map.put("note", true);
-                map.put("urls", true);
-                map.put("photos", true);
-                map.put("categories", true);
-           } 
-            else {
-                for (int i=0; i<fields.length(); i++) {
-                    key = fields.getString(i);
-                    if (key.startsWith("displayName")) {
-                        map.put("displayName", true);
-                    }
-                    else if (key.startsWith("name")) {
-                        map.put("displayName", true);
-                        map.put("name", true);
-                    }
-                    else if (key.startsWith("nickname")) {
-                        map.put("nickname", true);
-                    }
-                    else if (key.startsWith("phoneNumbers")) {
-                        map.put("phoneNumbers", true);
-                    }
-                    else if (key.startsWith("emails")) {
-                        map.put("emails", true);
-                    }
-                    else if (key.startsWith("addresses")) {
-                        map.put("addresses", true);
-                    }
-                    else if (key.startsWith("ims")) {
-                        map.put("ims", true);
-                    }
-                    else if (key.startsWith("organizations")) {
-                        map.put("organizations", true);
-                    }
-                    else if (key.startsWith("birthday")) {
-                        map.put("birthday", true);
-                    }
-                    else if (key.startsWith("note")) {
-                        map.put("note", true);
-                    }
-                    else if (key.startsWith("urls")) {
-                        map.put("urls", true);
-                    }
-                    else if (key.startsWith("photos")) {
-                        map.put("photos", true);
-                    }
-                    else if (key.startsWith("categories")) {
-                        map.put("categories", true);
-                    }
-                }
-            }
-       }
-        catch (JSONException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        }
-        return map;
-    }
-
-    /**
-     * Convenience method to get a string from a JSON object.  Saves a
-     * lot of try/catch writing.
-     * If the property is not found in the object null will be returned.
-     *
-     * @param obj contact object to search
-     * @param property to be looked up
-     * @return The value of the property
-     */
-    protected String getJsonString(JSONObject obj, String property) {
-        String value = null;
-        try {
-            if (obj != null) {
-                value = obj.getString(property);
-                if (value.equals("null")) {
-                    Log.d(LOG_TAG, property + " is string called 'null'");
-                    value = null;
-                }
-            }
-       }
-        catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get = " + e.getMessage());
-        }
-        return value;
-    }
-
-    /**
-     * Handles adding a JSON Contact object into the database.
-     * @return TODO
-     */
-    public abstract String save(JSONObject contact);
-
-    /**
-     * Handles searching through SDK-specific contacts API.
-     */
-    public abstract JSONArray search(JSONArray filter, JSONObject options);
-
-    /**
-     * Handles searching through SDK-specific contacts API.
-     * @throws JSONException
-     */
-    public abstract JSONObject getContactById(String id) throws JSONException;
-
-    /**
-     * Handles removing a contact from the database.
-     */
-    public abstract boolean remove(String id);
-
-   /**
-     * A class that represents the where clause to be used in the database query 
-     */
-    class WhereOptions {
-        private String where;
-        private String[] whereArgs;
-        public void setWhere(String where) {
-            this.where = where;
-        }
-        public String getWhere() {
-            return where;
-        }
-        public void setWhereArgs(String[] whereArgs) {
-            this.whereArgs = whereArgs;
-        }
-        public String[] getWhereArgs() {
-            return whereArgs;
-        }
-    }
-}


[10/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_one/assets/www/cordova.js
----------------------------------------------------------------------
diff --git a/spec/projects/android_one/assets/www/cordova.js b/spec/projects/android_one/assets/www/cordova.js
deleted file mode 100644
index 000791b..0000000
--- a/spec/projects/android_one/assets/www/cordova.js
+++ /dev/null
@@ -1,6848 +0,0 @@
-// Platform: android
-// 2.7.0rc1-12-ga86559a
-/*
- 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.
-*/
-;(function() {
-var CORDOVA_JS_BUILD_LABEL = '2.7.0rc1-12-ga86559a';
-// file: lib/scripts/require.js
-
-var require,
-    define;
-
-(function () {
-    var modules = {};
-    // Stack of moduleIds currently being built.
-    var requireStack = [];
-    // Map of module ID -> index into requireStack of modules currently being built.
-    var inProgressModules = {};
-
-    function build(module) {
-        var factory = module.factory;
-        module.exports = {};
-        delete module.factory;
-        factory(require, module.exports, module);
-        return module.exports;
-    }
-
-    require = function (id) {
-        if (!modules[id]) {
-            throw "module " + id + " not found";
-        } else if (id in inProgressModules) {
-            var cycle = requireStack.slice(inProgressModules[id]).join('->') + '->' + id;
-            throw "Cycle in require graph: " + cycle;
-        }
-        if (modules[id].factory) {
-            try {
-                inProgressModules[id] = requireStack.length;
-                requireStack.push(id);
-                return build(modules[id]);
-            } finally {
-                delete inProgressModules[id];
-                requireStack.pop();
-            }
-        }
-        return modules[id].exports;
-    };
-
-    define = function (id, factory) {
-        if (modules[id]) {
-            throw "module " + id + " already defined";
-        }
-
-        modules[id] = {
-            id: id,
-            factory: factory
-        };
-    };
-
-    define.remove = function (id) {
-        delete modules[id];
-    };
-
-    define.moduleMap = modules;
-})();
-
-//Export for use in node
-if (typeof module === "object" && typeof require === "function") {
-    module.exports.require = require;
-    module.exports.define = define;
-}
-
-// file: lib/cordova.js
-define("cordova", function(require, exports, module) {
-
-
-var channel = require('cordova/channel');
-
-/**
- * Listen for DOMContentLoaded and notify our channel subscribers.
- */
-document.addEventListener('DOMContentLoaded', function() {
-    channel.onDOMContentLoaded.fire();
-}, false);
-if (document.readyState == 'complete' || document.readyState == 'interactive') {
-    channel.onDOMContentLoaded.fire();
-}
-
-/**
- * Intercept calls to addEventListener + removeEventListener and handle deviceready,
- * resume, and pause events.
- */
-var m_document_addEventListener = document.addEventListener;
-var m_document_removeEventListener = document.removeEventListener;
-var m_window_addEventListener = window.addEventListener;
-var m_window_removeEventListener = window.removeEventListener;
-
-/**
- * Houses custom event handlers to intercept on document + window event listeners.
- */
-var documentEventHandlers = {},
-    windowEventHandlers = {};
-
-document.addEventListener = function(evt, handler, capture) {
-    var e = evt.toLowerCase();
-    if (typeof documentEventHandlers[e] != 'undefined') {
-        documentEventHandlers[e].subscribe(handler);
-    } else {
-        m_document_addEventListener.call(document, evt, handler, capture);
-    }
-};
-
-window.addEventListener = function(evt, handler, capture) {
-    var e = evt.toLowerCase();
-    if (typeof windowEventHandlers[e] != 'undefined') {
-        windowEventHandlers[e].subscribe(handler);
-    } else {
-        m_window_addEventListener.call(window, evt, handler, capture);
-    }
-};
-
-document.removeEventListener = function(evt, handler, capture) {
-    var e = evt.toLowerCase();
-    // If unsubscribing from an event that is handled by a plugin
-    if (typeof documentEventHandlers[e] != "undefined") {
-        documentEventHandlers[e].unsubscribe(handler);
-    } else {
-        m_document_removeEventListener.call(document, evt, handler, capture);
-    }
-};
-
-window.removeEventListener = function(evt, handler, capture) {
-    var e = evt.toLowerCase();
-    // If unsubscribing from an event that is handled by a plugin
-    if (typeof windowEventHandlers[e] != "undefined") {
-        windowEventHandlers[e].unsubscribe(handler);
-    } else {
-        m_window_removeEventListener.call(window, evt, handler, capture);
-    }
-};
-
-function createEvent(type, data) {
-    var event = document.createEvent('Events');
-    event.initEvent(type, false, false);
-    if (data) {
-        for (var i in data) {
-            if (data.hasOwnProperty(i)) {
-                event[i] = data[i];
-            }
-        }
-    }
-    return event;
-}
-
-if(typeof window.console === "undefined") {
-    window.console = {
-        log:function(){}
-    };
-}
-
-var cordova = {
-    define:define,
-    require:require,
-    /**
-     * Methods to add/remove your own addEventListener hijacking on document + window.
-     */
-    addWindowEventHandler:function(event) {
-        return (windowEventHandlers[event] = channel.create(event));
-    },
-    addStickyDocumentEventHandler:function(event) {
-        return (documentEventHandlers[event] = channel.createSticky(event));
-    },
-    addDocumentEventHandler:function(event) {
-        return (documentEventHandlers[event] = channel.create(event));
-    },
-    removeWindowEventHandler:function(event) {
-        delete windowEventHandlers[event];
-    },
-    removeDocumentEventHandler:function(event) {
-        delete documentEventHandlers[event];
-    },
-    /**
-     * Retrieve original event handlers that were replaced by Cordova
-     *
-     * @return object
-     */
-    getOriginalHandlers: function() {
-        return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener},
-        'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}};
-    },
-    /**
-     * Method to fire event from native code
-     * bNoDetach is required for events which cause an exception which needs to be caught in native code
-     */
-    fireDocumentEvent: function(type, data, bNoDetach) {
-        var evt = createEvent(type, data);
-        if (typeof documentEventHandlers[type] != 'undefined') {
-            if( bNoDetach ) {
-              documentEventHandlers[type].fire(evt);
-            }
-            else {
-              setTimeout(function() {
-                  // Fire deviceready on listeners that were registered before cordova.js was loaded.
-                  if (type == 'deviceready') {
-                      document.dispatchEvent(evt);
-                  }
-                  documentEventHandlers[type].fire(evt);
-              }, 0);
-            }
-        } else {
-            document.dispatchEvent(evt);
-        }
-    },
-    fireWindowEvent: function(type, data) {
-        var evt = createEvent(type,data);
-        if (typeof windowEventHandlers[type] != 'undefined') {
-            setTimeout(function() {
-                windowEventHandlers[type].fire(evt);
-            }, 0);
-        } else {
-            window.dispatchEvent(evt);
-        }
-    },
-
-    /**
-     * Plugin callback mechanism.
-     */
-    // Randomize the starting callbackId to avoid collisions after refreshing or navigating.
-    // This way, it's very unlikely that any new callback would get the same callbackId as an old callback.
-    callbackId: Math.floor(Math.random() * 2000000000),
-    callbacks:  {},
-    callbackStatus: {
-        NO_RESULT: 0,
-        OK: 1,
-        CLASS_NOT_FOUND_EXCEPTION: 2,
-        ILLEGAL_ACCESS_EXCEPTION: 3,
-        INSTANTIATION_EXCEPTION: 4,
-        MALFORMED_URL_EXCEPTION: 5,
-        IO_EXCEPTION: 6,
-        INVALID_ACTION: 7,
-        JSON_EXCEPTION: 8,
-        ERROR: 9
-    },
-
-    /**
-     * Called by native code when returning successful result from an action.
-     */
-    callbackSuccess: function(callbackId, args) {
-        try {
-            cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback);
-        } catch (e) {
-            console.log("Error in error callback: " + callbackId + " = "+e);
-        }
-    },
-
-    /**
-     * Called by native code when returning error result from an action.
-     */
-    callbackError: function(callbackId, args) {
-        // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative.
-        // Derive success from status.
-        try {
-            cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback);
-        } catch (e) {
-            console.log("Error in error callback: " + callbackId + " = "+e);
-        }
-    },
-
-    /**
-     * Called by native code when returning the result from an action.
-     */
-    callbackFromNative: function(callbackId, success, status, args, keepCallback) {
-        var callback = cordova.callbacks[callbackId];
-        if (callback) {
-            if (success && status == cordova.callbackStatus.OK) {
-                callback.success && callback.success.apply(null, args);
-            } else if (!success) {
-                callback.fail && callback.fail.apply(null, args);
-            }
-
-            // Clear callback if not expecting any more results
-            if (!keepCallback) {
-                delete cordova.callbacks[callbackId];
-            }
-        }
-    },
-    addConstructor: function(func) {
-        channel.onCordovaReady.subscribe(function() {
-            try {
-                func();
-            } catch(e) {
-                console.log("Failed to run constructor: " + e);
-            }
-        });
-    }
-};
-
-// Register pause, resume and deviceready channels as events on document.
-channel.onPause = cordova.addDocumentEventHandler('pause');
-channel.onResume = cordova.addDocumentEventHandler('resume');
-channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');
-
-module.exports = cordova;
-
-});
-
-// file: lib/common/argscheck.js
-define("cordova/argscheck", function(require, exports, module) {
-
-var exec = require('cordova/exec');
-var utils = require('cordova/utils');
-
-var moduleExports = module.exports;
-
-var typeMap = {
-    'A': 'Array',
-    'D': 'Date',
-    'N': 'Number',
-    'S': 'String',
-    'F': 'Function',
-    'O': 'Object'
-};
-
-function extractParamName(callee, argIndex) {
-  return (/.*?\((.*?)\)/).exec(callee)[1].split(', ')[argIndex];
-}
-
-function checkArgs(spec, functionName, args, opt_callee) {
-    if (!moduleExports.enableChecks) {
-        return;
-    }
-    var errMsg = null;
-    var typeName;
-    for (var i = 0; i < spec.length; ++i) {
-        var c = spec.charAt(i),
-            cUpper = c.toUpperCase(),
-            arg = args[i];
-        // Asterix means allow anything.
-        if (c == '*') {
-            continue;
-        }
-        typeName = utils.typeName(arg);
-        if ((arg === null || arg === undefined) && c == cUpper) {
-            continue;
-        }
-        if (typeName != typeMap[cUpper]) {
-            errMsg = 'Expected ' + typeMap[cUpper];
-            break;
-        }
-    }
-    if (errMsg) {
-        errMsg += ', but got ' + typeName + '.';
-        errMsg = 'Wrong type for parameter "' + extractParamName(opt_callee || args.callee, i) + '" of ' + functionName + ': ' + errMsg;
-        // Don't log when running jake test.
-        if (typeof jasmine == 'undefined') {
-            console.error(errMsg);
-        }
-        throw TypeError(errMsg);
-    }
-}
-
-function getValue(value, defaultValue) {
-    return value === undefined ? defaultValue : value;
-}
-
-moduleExports.checkArgs = checkArgs;
-moduleExports.getValue = getValue;
-moduleExports.enableChecks = true;
-
-
-});
-
-// file: lib/common/builder.js
-define("cordova/builder", function(require, exports, module) {
-
-var utils = require('cordova/utils');
-
-function each(objects, func, context) {
-    for (var prop in objects) {
-        if (objects.hasOwnProperty(prop)) {
-            func.apply(context, [objects[prop], prop]);
-        }
-    }
-}
-
-function clobber(obj, key, value) {
-    exports.replaceHookForTesting(obj, key);
-    obj[key] = value;
-    // Getters can only be overridden by getters.
-    if (obj[key] !== value) {
-        utils.defineGetter(obj, key, function() {
-            return value;
-        });
-    }
-}
-
-function assignOrWrapInDeprecateGetter(obj, key, value, message) {
-    if (message) {
-        utils.defineGetter(obj, key, function() {
-            console.log(message);
-            delete obj[key];
-            clobber(obj, key, value);
-            return value;
-        });
-    } else {
-        clobber(obj, key, value);
-    }
-}
-
-function include(parent, objects, clobber, merge) {
-    each(objects, function (obj, key) {
-        try {
-          var result = obj.path ? require(obj.path) : {};
-
-          if (clobber) {
-              // Clobber if it doesn't exist.
-              if (typeof parent[key] === 'undefined') {
-                  assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
-              } else if (typeof obj.path !== 'undefined') {
-                  // If merging, merge properties onto parent, otherwise, clobber.
-                  if (merge) {
-                      recursiveMerge(parent[key], result);
-                  } else {
-                      assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
-                  }
-              }
-              result = parent[key];
-          } else {
-            // Overwrite if not currently defined.
-            if (typeof parent[key] == 'undefined') {
-              assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
-            } else {
-              // Set result to what already exists, so we can build children into it if they exist.
-              result = parent[key];
-            }
-          }
-
-          if (obj.children) {
-            include(result, obj.children, clobber, merge);
-          }
-        } catch(e) {
-          utils.alert('Exception building cordova JS globals: ' + e + ' for key "' + key + '"');
-        }
-    });
-}
-
-/**
- * Merge properties from one object onto another recursively.  Properties from
- * the src object will overwrite existing target property.
- *
- * @param target Object to merge properties into.
- * @param src Object to merge properties from.
- */
-function recursiveMerge(target, src) {
-    for (var prop in src) {
-        if (src.hasOwnProperty(prop)) {
-            if (target.prototype && target.prototype.constructor === target) {
-                // If the target object is a constructor override off prototype.
-                clobber(target.prototype, prop, src[prop]);
-            } else {
-                if (typeof src[prop] === 'object' && typeof target[prop] === 'object') {
-                    recursiveMerge(target[prop], src[prop]);
-                } else {
-                    clobber(target, prop, src[prop]);
-                }
-            }
-        }
-    }
-}
-
-exports.buildIntoButDoNotClobber = function(objects, target) {
-    include(target, objects, false, false);
-};
-exports.buildIntoAndClobber = function(objects, target) {
-    include(target, objects, true, false);
-};
-exports.buildIntoAndMerge = function(objects, target) {
-    include(target, objects, true, true);
-};
-exports.recursiveMerge = recursiveMerge;
-exports.assignOrWrapInDeprecateGetter = assignOrWrapInDeprecateGetter;
-exports.replaceHookForTesting = function() {};
-
-});
-
-// file: lib/common/channel.js
-define("cordova/channel", function(require, exports, module) {
-
-var utils = require('cordova/utils'),
-    nextGuid = 1;
-
-/**
- * Custom pub-sub "channel" that can have functions subscribed to it
- * This object is used to define and control firing of events for
- * cordova initialization, as well as for custom events thereafter.
- *
- * The order of events during page load and Cordova startup is as follows:
- *
- * onDOMContentLoaded*         Internal event that is received when the web page is loaded and parsed.
- * onNativeReady*              Internal event that indicates the Cordova native side is ready.
- * onCordovaReady*             Internal event fired when all Cordova JavaScript objects have been created.
- * onCordovaInfoReady*         Internal event fired when device properties are available.
- * onCordovaConnectionReady*   Internal event fired when the connection property has been set.
- * onDeviceReady*              User event fired to indicate that Cordova is ready
- * onResume                    User event fired to indicate a start/resume lifecycle event
- * onPause                     User event fired to indicate a pause lifecycle event
- * onDestroy*                  Internal event fired when app is being destroyed (User should use window.onunload event, not this one).
- *
- * The events marked with an * are sticky. Once they have fired, they will stay in the fired state.
- * All listeners that subscribe after the event is fired will be executed right away.
- *
- * The only Cordova events that user code should register for are:
- *      deviceready           Cordova native code is initialized and Cordova APIs can be called from JavaScript
- *      pause                 App has moved to background
- *      resume                App has returned to foreground
- *
- * Listeners can be registered as:
- *      document.addEventListener("deviceready", myDeviceReadyListener, false);
- *      document.addEventListener("resume", myResumeListener, false);
- *      document.addEventListener("pause", myPauseListener, false);
- *
- * The DOM lifecycle events should be used for saving and restoring state
- *      window.onload
- *      window.onunload
- *
- */
-
-/**
- * Channel
- * @constructor
- * @param type  String the channel name
- */
-var Channel = function(type, sticky) {
-    this.type = type;
-    // Map of guid -> function.
-    this.handlers = {};
-    // 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired.
-    this.state = sticky ? 1 : 0;
-    // Used in sticky mode to remember args passed to fire().
-    this.fireArgs = null;
-    // Used by onHasSubscribersChange to know if there are any listeners.
-    this.numHandlers = 0;
-    // Function that is called when the first listener is subscribed, or when
-    // the last listener is unsubscribed.
-    this.onHasSubscribersChange = null;
-},
-    channel = {
-        /**
-         * Calls the provided function only after all of the channels specified
-         * have been fired. All channels must be sticky channels.
-         */
-        join: function(h, c) {
-            var len = c.length,
-                i = len,
-                f = function() {
-                    if (!(--i)) h();
-                };
-            for (var j=0; j<len; j++) {
-                if (c[j].state === 0) {
-                    throw Error('Can only use join with sticky channels.');
-                }
-                c[j].subscribe(f);
-            }
-            if (!len) h();
-        },
-        create: function(type) {
-            return channel[type] = new Channel(type, false);
-        },
-        createSticky: function(type) {
-            return channel[type] = new Channel(type, true);
-        },
-
-        /**
-         * cordova Channels that must fire before "deviceready" is fired.
-         */
-        deviceReadyChannelsArray: [],
-        deviceReadyChannelsMap: {},
-
-        /**
-         * Indicate that a feature needs to be initialized before it is ready to be used.
-         * This holds up Cordova's "deviceready" event until the feature has been initialized
-         * and Cordova.initComplete(feature) is called.
-         *
-         * @param feature {String}     The unique feature name
-         */
-        waitForInitialization: function(feature) {
-            if (feature) {
-                var c = channel[feature] || this.createSticky(feature);
-                this.deviceReadyChannelsMap[feature] = c;
-                this.deviceReadyChannelsArray.push(c);
-            }
-        },
-
-        /**
-         * Indicate that initialization code has completed and the feature is ready to be used.
-         *
-         * @param feature {String}     The unique feature name
-         */
-        initializationComplete: function(feature) {
-            var c = this.deviceReadyChannelsMap[feature];
-            if (c) {
-                c.fire();
-            }
-        }
-    };
-
-function forceFunction(f) {
-    if (typeof f != 'function') throw "Function required as first argument!";
-}
-
-/**
- * Subscribes the given function to the channel. Any time that
- * Channel.fire is called so too will the function.
- * Optionally specify an execution context for the function
- * and a guid that can be used to stop subscribing to the channel.
- * Returns the guid.
- */
-Channel.prototype.subscribe = function(f, c) {
-    // need a function to call
-    forceFunction(f);
-    if (this.state == 2) {
-        f.apply(c || this, this.fireArgs);
-        return;
-    }
-
-    var func = f,
-        guid = f.observer_guid;
-    if (typeof c == "object") { func = utils.close(c, f); }
-
-    if (!guid) {
-        // first time any channel has seen this subscriber
-        guid = '' + nextGuid++;
-    }
-    func.observer_guid = guid;
-    f.observer_guid = guid;
-
-    // Don't add the same handler more than once.
-    if (!this.handlers[guid]) {
-        this.handlers[guid] = func;
-        this.numHandlers++;
-        if (this.numHandlers == 1) {
-            this.onHasSubscribersChange && this.onHasSubscribersChange();
-        }
-    }
-};
-
-/**
- * Unsubscribes the function with the given guid from the channel.
- */
-Channel.prototype.unsubscribe = function(f) {
-    // need a function to unsubscribe
-    forceFunction(f);
-
-    var guid = f.observer_guid,
-        handler = this.handlers[guid];
-    if (handler) {
-        delete this.handlers[guid];
-        this.numHandlers--;
-        if (this.numHandlers === 0) {
-            this.onHasSubscribersChange && this.onHasSubscribersChange();
-        }
-    }
-};
-
-/**
- * Calls all functions subscribed to this channel.
- */
-Channel.prototype.fire = function(e) {
-    var fail = false,
-        fireArgs = Array.prototype.slice.call(arguments);
-    // Apply stickiness.
-    if (this.state == 1) {
-        this.state = 2;
-        this.fireArgs = fireArgs;
-    }
-    if (this.numHandlers) {
-        // Copy the values first so that it is safe to modify it from within
-        // callbacks.
-        var toCall = [];
-        for (var item in this.handlers) {
-            toCall.push(this.handlers[item]);
-        }
-        for (var i = 0; i < toCall.length; ++i) {
-            toCall[i].apply(this, fireArgs);
-        }
-        if (this.state == 2 && this.numHandlers) {
-            this.numHandlers = 0;
-            this.handlers = {};
-            this.onHasSubscribersChange && this.onHasSubscribersChange();
-        }
-    }
-};
-
-
-// defining them here so they are ready super fast!
-// DOM event that is received when the web page is loaded and parsed.
-channel.createSticky('onDOMContentLoaded');
-
-// Event to indicate the Cordova native side is ready.
-channel.createSticky('onNativeReady');
-
-// Event to indicate that all Cordova JavaScript objects have been created
-// and it's time to run plugin constructors.
-channel.createSticky('onCordovaReady');
-
-// Event to indicate that device properties are available
-channel.createSticky('onCordovaInfoReady');
-
-// Event to indicate that the connection property has been set.
-channel.createSticky('onCordovaConnectionReady');
-
-// Event to indicate that all automatically loaded JS plugins are loaded and ready.
-channel.createSticky('onPluginsReady');
-
-// Event to indicate that Cordova is ready
-channel.createSticky('onDeviceReady');
-
-// Event to indicate a resume lifecycle event
-channel.create('onResume');
-
-// Event to indicate a pause lifecycle event
-channel.create('onPause');
-
-// Event to indicate a destroy lifecycle event
-channel.createSticky('onDestroy');
-
-// Channels that must fire before "deviceready" is fired.
-channel.waitForInitialization('onCordovaReady');
-channel.waitForInitialization('onCordovaConnectionReady');
-channel.waitForInitialization('onDOMContentLoaded');
-
-module.exports = channel;
-
-});
-
-// file: lib/common/commandProxy.js
-define("cordova/commandProxy", function(require, exports, module) {
-
-
-// internal map of proxy function
-var CommandProxyMap = {};
-
-module.exports = {
-
-    // example: cordova.commandProxy.add("Accelerometer",{getCurrentAcceleration: function(successCallback, errorCallback, options) {...},...);
-    add:function(id,proxyObj) {
-        console.log("adding proxy for " + id);
-        CommandProxyMap[id] = proxyObj;
-        return proxyObj;
-    },
-
-    // cordova.commandProxy.remove("Accelerometer");
-    remove:function(id) {
-        var proxy = CommandProxyMap[id];
-        delete CommandProxyMap[id];
-        CommandProxyMap[id] = null;
-        return proxy;
-    },
-
-    get:function(service,action) {
-        return ( CommandProxyMap[service] ? CommandProxyMap[service][action] : null );
-    }
-};
-});
-
-// file: lib/android/exec.js
-define("cordova/exec", function(require, exports, module) {
-
-/**
- * Execute a cordova command.  It is up to the native side whether this action
- * is synchronous or asynchronous.  The native side can return:
- *      Synchronous: PluginResult object as a JSON string
- *      Asynchronous: Empty string ""
- * If async, the native side will cordova.callbackSuccess or cordova.callbackError,
- * depending upon the result of the action.
- *
- * @param {Function} success    The success callback
- * @param {Function} fail       The fail callback
- * @param {String} service      The name of the service to use
- * @param {String} action       Action to be run in cordova
- * @param {String[]} [args]     Zero or more arguments to pass to the method
- */
-var cordova = require('cordova'),
-    nativeApiProvider = require('cordova/plugin/android/nativeapiprovider'),
-    utils = require('cordova/utils'),
-    jsToNativeModes = {
-        PROMPT: 0,
-        JS_OBJECT: 1,
-        // This mode is currently for benchmarking purposes only. It must be enabled
-        // on the native side through the ENABLE_LOCATION_CHANGE_EXEC_MODE
-        // constant within CordovaWebViewClient.java before it will work.
-        LOCATION_CHANGE: 2
-    },
-    nativeToJsModes = {
-        // Polls for messages using the JS->Native bridge.
-        POLLING: 0,
-        // For LOAD_URL to be viable, it would need to have a work-around for
-        // the bug where the soft-keyboard gets dismissed when a message is sent.
-        LOAD_URL: 1,
-        // For the ONLINE_EVENT to be viable, it would need to intercept all event
-        // listeners (both through addEventListener and window.ononline) as well
-        // as set the navigator property itself.
-        ONLINE_EVENT: 2,
-        // Uses reflection to access private APIs of the WebView that can send JS
-        // to be executed.
-        // Requires Android 3.2.4 or above.
-        PRIVATE_API: 3
-    },
-    jsToNativeBridgeMode,  // Set lazily.
-    nativeToJsBridgeMode = nativeToJsModes.ONLINE_EVENT,
-    pollEnabled = false,
-    messagesFromNative = [];
-
-function androidExec(success, fail, service, action, args) {
-    // Set default bridge modes if they have not already been set.
-    // By default, we use the failsafe, since addJavascriptInterface breaks too often
-    if (jsToNativeBridgeMode === undefined) {
-        androidExec.setJsToNativeBridgeMode(jsToNativeModes.JS_OBJECT);
-    }
-
-    // Process any ArrayBuffers in the args into a string.
-    for (var i = 0; i < args.length; i++) {
-        if (utils.typeName(args[i]) == 'ArrayBuffer') {
-            args[i] = window.btoa(String.fromCharCode.apply(null, new Uint8Array(args[i])));
-        }
-    }
-
-    var callbackId = service + cordova.callbackId++,
-        argsJson = JSON.stringify(args);
-
-    if (success || fail) {
-        cordova.callbacks[callbackId] = {success:success, fail:fail};
-    }
-
-    if (jsToNativeBridgeMode == jsToNativeModes.LOCATION_CHANGE) {
-        window.location = 'http://cdv_exec/' + service + '#' + action + '#' + callbackId + '#' + argsJson;
-    } else {
-        var messages = nativeApiProvider.get().exec(service, action, callbackId, argsJson);
-        // If argsJson was received by Java as null, try again with the PROMPT bridge mode.
-        // This happens in rare circumstances, such as when certain Unicode characters are passed over the bridge on a Galaxy S2.  See CB-2666.
-        if (jsToNativeBridgeMode == jsToNativeModes.JS_OBJECT && messages === "@Null arguments.") {
-            androidExec.setJsToNativeBridgeMode(jsToNativeModes.PROMPT);
-            androidExec(success, fail, service, action, args);
-            androidExec.setJsToNativeBridgeMode(jsToNativeModes.JS_OBJECT);
-            return;
-        } else {
-            androidExec.processMessages(messages);
-        }
-    }
-}
-
-function pollOnce() {
-    var msg = nativeApiProvider.get().retrieveJsMessages();
-    androidExec.processMessages(msg);
-}
-
-function pollingTimerFunc() {
-    if (pollEnabled) {
-        pollOnce();
-        setTimeout(pollingTimerFunc, 50);
-    }
-}
-
-function hookOnlineApis() {
-    function proxyEvent(e) {
-        cordova.fireWindowEvent(e.type);
-    }
-    // The network module takes care of firing online and offline events.
-    // It currently fires them only on document though, so we bridge them
-    // to window here (while first listening for exec()-related online/offline
-    // events).
-    window.addEventListener('online', pollOnce, false);
-    window.addEventListener('offline', pollOnce, false);
-    cordova.addWindowEventHandler('online');
-    cordova.addWindowEventHandler('offline');
-    document.addEventListener('online', proxyEvent, false);
-    document.addEventListener('offline', proxyEvent, false);
-}
-
-hookOnlineApis();
-
-androidExec.jsToNativeModes = jsToNativeModes;
-androidExec.nativeToJsModes = nativeToJsModes;
-
-androidExec.setJsToNativeBridgeMode = function(mode) {
-    if (mode == jsToNativeModes.JS_OBJECT && !window._cordovaNative) {
-        console.log('Falling back on PROMPT mode since _cordovaNative is missing. Expected for Android 3.2 and lower only.');
-        mode = jsToNativeModes.PROMPT;
-    }
-    nativeApiProvider.setPreferPrompt(mode == jsToNativeModes.PROMPT);
-    jsToNativeBridgeMode = mode;
-};
-
-androidExec.setNativeToJsBridgeMode = function(mode) {
-    if (mode == nativeToJsBridgeMode) {
-        return;
-    }
-    if (nativeToJsBridgeMode == nativeToJsModes.POLLING) {
-        pollEnabled = false;
-    }
-
-    nativeToJsBridgeMode = mode;
-    // Tell the native side to switch modes.
-    nativeApiProvider.get().setNativeToJsBridgeMode(mode);
-
-    if (mode == nativeToJsModes.POLLING) {
-        pollEnabled = true;
-        setTimeout(pollingTimerFunc, 1);
-    }
-};
-
-// Processes a single message, as encoded by NativeToJsMessageQueue.java.
-function processMessage(message) {
-    try {
-        var firstChar = message.charAt(0);
-        if (firstChar == 'J') {
-            eval(message.slice(1));
-        } else if (firstChar == 'S' || firstChar == 'F') {
-            var success = firstChar == 'S';
-            var keepCallback = message.charAt(1) == '1';
-            var spaceIdx = message.indexOf(' ', 2);
-            var status = +message.slice(2, spaceIdx);
-            var nextSpaceIdx = message.indexOf(' ', spaceIdx + 1);
-            var callbackId = message.slice(spaceIdx + 1, nextSpaceIdx);
-            var payloadKind = message.charAt(nextSpaceIdx + 1);
-            var payload;
-            if (payloadKind == 's') {
-                payload = message.slice(nextSpaceIdx + 2);
-            } else if (payloadKind == 't') {
-                payload = true;
-            } else if (payloadKind == 'f') {
-                payload = false;
-            } else if (payloadKind == 'N') {
-                payload = null;
-            } else if (payloadKind == 'n') {
-                payload = +message.slice(nextSpaceIdx + 2);
-            } else if (payloadKind == 'A') {
-                var data = message.slice(nextSpaceIdx + 2);
-                var bytes = window.atob(data);
-                var arraybuffer = new Uint8Array(bytes.length);
-                for (var i = 0; i < bytes.length; i++) {
-                    arraybuffer[i] = bytes.charCodeAt(i);
-                }
-                payload = arraybuffer.buffer;
-            } else if (payloadKind == 'S') {
-                payload = window.atob(message.slice(nextSpaceIdx + 2));
-            } else {
-                payload = JSON.parse(message.slice(nextSpaceIdx + 1));
-            }
-            cordova.callbackFromNative(callbackId, success, status, [payload], keepCallback);
-        } else {
-            console.log("processMessage failed: invalid message:" + message);
-        }
-    } catch (e) {
-        console.log("processMessage failed: Message: " + message);
-        console.log("processMessage failed: Error: " + e);
-        console.log("processMessage failed: Stack: " + e.stack);
-    }
-}
-
-// This is called from the NativeToJsMessageQueue.java.
-androidExec.processMessages = function(messages) {
-    if (messages) {
-        messagesFromNative.push(messages);
-        // Check for the reentrant case, and enqueue the message if that's the case.
-        if (messagesFromNative.length > 1) {
-            return;
-        }
-        while (messagesFromNative.length) {
-            // Don't unshift until the end so that reentrancy can be detected.
-            messages = messagesFromNative[0];
-            // The Java side can send a * message to indicate that it
-            // still has messages waiting to be retrieved.
-            if (messages == '*') {
-                messagesFromNative.shift();
-                window.setTimeout(pollOnce, 0);
-                return;
-            }
-
-            var spaceIdx = messages.indexOf(' ');
-            var msgLen = +messages.slice(0, spaceIdx);
-            var message = messages.substr(spaceIdx + 1, msgLen);
-            messages = messages.slice(spaceIdx + msgLen + 1);
-            processMessage(message);
-            if (messages) {
-                messagesFromNative[0] = messages;
-            } else {
-                messagesFromNative.shift();
-            }
-        }
-    }
-};
-
-module.exports = androidExec;
-
-});
-
-// file: lib/common/modulemapper.js
-define("cordova/modulemapper", function(require, exports, module) {
-
-var builder = require('cordova/builder'),
-    moduleMap = define.moduleMap,
-    symbolList,
-    deprecationMap;
-
-exports.reset = function() {
-    symbolList = [];
-    deprecationMap = {};
-};
-
-function addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) {
-    if (!(moduleName in moduleMap)) {
-        throw new Error('Module ' + moduleName + ' does not exist.');
-    }
-    symbolList.push(strategy, moduleName, symbolPath);
-    if (opt_deprecationMessage) {
-        deprecationMap[symbolPath] = opt_deprecationMessage;
-    }
-}
-
-// Note: Android 2.3 does have Function.bind().
-exports.clobbers = function(moduleName, symbolPath, opt_deprecationMessage) {
-    addEntry('c', moduleName, symbolPath, opt_deprecationMessage);
-};
-
-exports.merges = function(moduleName, symbolPath, opt_deprecationMessage) {
-    addEntry('m', moduleName, symbolPath, opt_deprecationMessage);
-};
-
-exports.defaults = function(moduleName, symbolPath, opt_deprecationMessage) {
-    addEntry('d', moduleName, symbolPath, opt_deprecationMessage);
-};
-
-function prepareNamespace(symbolPath, context) {
-    if (!symbolPath) {
-        return context;
-    }
-    var parts = symbolPath.split('.');
-    var cur = context;
-    for (var i = 0, part; part = parts[i]; ++i) {
-        cur = cur[part] = cur[part] || {};
-    }
-    return cur;
-}
-
-exports.mapModules = function(context) {
-    var origSymbols = {};
-    context.CDV_origSymbols = origSymbols;
-    for (var i = 0, len = symbolList.length; i < len; i += 3) {
-        var strategy = symbolList[i];
-        var moduleName = symbolList[i + 1];
-        var symbolPath = symbolList[i + 2];
-        var lastDot = symbolPath.lastIndexOf('.');
-        var namespace = symbolPath.substr(0, lastDot);
-        var lastName = symbolPath.substr(lastDot + 1);
-
-        var module = require(moduleName);
-        var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null;
-        var parentObj = prepareNamespace(namespace, context);
-        var target = parentObj[lastName];
-
-        if (strategy == 'm' && target) {
-            builder.recursiveMerge(target, module);
-        } else if ((strategy == 'd' && !target) || (strategy != 'd')) {
-            if (!(symbolPath in origSymbols)) {
-                origSymbols[symbolPath] = target;
-            }
-            builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg);
-        }
-    }
-};
-
-exports.getOriginalSymbol = function(context, symbolPath) {
-    var origSymbols = context.CDV_origSymbols;
-    if (origSymbols && (symbolPath in origSymbols)) {
-        return origSymbols[symbolPath];
-    }
-    var parts = symbolPath.split('.');
-    var obj = context;
-    for (var i = 0; i < parts.length; ++i) {
-        obj = obj && obj[parts[i]];
-    }
-    return obj;
-};
-
-exports.loadMatchingModules = function(matchingRegExp) {
-    for (var k in moduleMap) {
-        if (matchingRegExp.exec(k)) {
-            require(k);
-        }
-    }
-};
-
-exports.reset();
-
-
-});
-
-// file: lib/android/platform.js
-define("cordova/platform", function(require, exports, module) {
-
-module.exports = {
-    id: "android",
-    initialize:function() {
-        var channel = require("cordova/channel"),
-            cordova = require('cordova'),
-            exec = require('cordova/exec'),
-            modulemapper = require('cordova/modulemapper');
-
-        modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
-        modulemapper.clobbers('cordova/plugin/android/app', 'navigator.app');
-
-        modulemapper.mapModules(window);
-
-        // Inject a listener for the backbutton on the document.
-        var backButtonChannel = cordova.addDocumentEventHandler('backbutton');
-        backButtonChannel.onHasSubscribersChange = function() {
-            // If we just attached the first handler or detached the last handler,
-            // let native know we need to override the back button.
-            exec(null, null, "App", "overrideBackbutton", [this.numHandlers == 1]);
-        };
-
-        // Add hardware MENU and SEARCH button handlers
-        cordova.addDocumentEventHandler('menubutton');
-        cordova.addDocumentEventHandler('searchbutton');
-
-        // Let native code know we are all done on the JS side.
-        // Native code will then un-hide the WebView.
-        channel.join(function() {
-            exec(null, null, "App", "show", []);
-        }, [channel.onCordovaReady]);
-    }
-};
-
-});
-
-// file: lib/common/plugin/Acceleration.js
-define("cordova/plugin/Acceleration", function(require, exports, module) {
-
-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;
-
-});
-
-// file: lib/common/plugin/Camera.js
-define("cordova/plugin/Camera", function(require, exports, module) {
-
-var argscheck = require('cordova/argscheck'),
-    exec = require('cordova/exec'),
-    Camera = require('cordova/plugin/CameraConstants'),
-    CameraPopoverHandle = require('cordova/plugin/CameraPopoverHandle');
-
-var cameraExport = {};
-
-// Tack on the Camera Constants to the base camera plugin.
-for (var key in Camera) {
-    cameraExport[key] = Camera[key];
-}
-
-/**
- * Gets a picture from source defined by "options.sourceType", and returns the
- * image as defined by the "options.destinationType" option.
-
- * The defaults are sourceType=CAMERA and destinationType=FILE_URI.
- *
- * @param {Function} successCallback
- * @param {Function} errorCallback
- * @param {Object} options
- */
-cameraExport.getPicture = function(successCallback, errorCallback, options) {
-    argscheck.checkArgs('fFO', 'Camera.getPicture', arguments);
-    options = options || {};
-    var getValue = argscheck.getValue;
-
-    var quality = getValue(options.quality, 50);
-    var destinationType = getValue(options.destinationType, Camera.DestinationType.FILE_URI);
-    var sourceType = getValue(options.sourceType, Camera.PictureSourceType.CAMERA);
-    var targetWidth = getValue(options.targetWidth, -1);
-    var targetHeight = getValue(options.targetHeight, -1);
-    var encodingType = getValue(options.encodingType, Camera.EncodingType.JPEG);
-    var mediaType = getValue(options.mediaType, Camera.MediaType.PICTURE);
-    var allowEdit = !!options.allowEdit;
-    var correctOrientation = !!options.correctOrientation;
-    var saveToPhotoAlbum = !!options.saveToPhotoAlbum;
-    var popoverOptions = getValue(options.popoverOptions, null);
-    var cameraDirection = getValue(options.cameraDirection, Camera.Direction.BACK);
-
-    var args = [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType,
-                mediaType, allowEdit, correctOrientation, saveToPhotoAlbum, popoverOptions, cameraDirection];
-
-    exec(successCallback, errorCallback, "Camera", "takePicture", args);
-    return new CameraPopoverHandle();
-};
-
-cameraExport.cleanup = function(successCallback, errorCallback) {
-    exec(successCallback, errorCallback, "Camera", "cleanup", []);
-};
-
-module.exports = cameraExport;
-
-});
-
-// file: lib/common/plugin/CameraConstants.js
-define("cordova/plugin/CameraConstants", function(require, exports, module) {
-
-module.exports = {
-  DestinationType:{
-    DATA_URL: 0,         // Return base64 encoded string
-    FILE_URI: 1,         // Return file uri (content://media/external/images/media/2 for Android)
-    NATIVE_URI: 2        // Return native uri (eg. asset-library://... for iOS)
-  },
-  EncodingType:{
-    JPEG: 0,             // Return JPEG encoded image
-    PNG: 1               // Return PNG encoded image
-  },
-  MediaType:{
-    PICTURE: 0,          // allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType
-    VIDEO: 1,            // allow selection of video only, ONLY RETURNS URL
-    ALLMEDIA : 2         // allow selection from all media types
-  },
-  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)
-  },
-  PopoverArrowDirection:{
-      ARROW_UP : 1,        // matches iOS UIPopoverArrowDirection constants to specify arrow location on popover
-      ARROW_DOWN : 2,
-      ARROW_LEFT : 4,
-      ARROW_RIGHT : 8,
-      ARROW_ANY : 15
-  },
-  Direction:{
-      BACK: 0,
-      FRONT: 1
-  }
-};
-
-});
-
-// file: lib/common/plugin/CameraPopoverHandle.js
-define("cordova/plugin/CameraPopoverHandle", function(require, exports, module) {
-
-var exec = require('cordova/exec');
-
-/**
- * A handle to an image picker popover.
- */
-var CameraPopoverHandle = function() {
-    this.setPosition = function(popoverOptions) {
-        console.log('CameraPopoverHandle.setPosition is only supported on iOS.');
-    };
-};
-
-module.exports = CameraPopoverHandle;
-
-});
-
-// file: lib/common/plugin/CameraPopoverOptions.js
-define("cordova/plugin/CameraPopoverOptions", function(require, exports, module) {
-
-var Camera = require('cordova/plugin/CameraConstants');
-
-/**
- * Encapsulates options for iOS Popover image picker
- */
-var CameraPopoverOptions = function(x,y,width,height,arrowDir){
-    // information of rectangle that popover should be anchored to
-    this.x = x || 0;
-    this.y = y || 32;
-    this.width = width || 320;
-    this.height = height || 480;
-    // The direction of the popover arrow
-    this.arrowDir = arrowDir || Camera.PopoverArrowDirection.ARROW_ANY;
-};
-
-module.exports = CameraPopoverOptions;
-
-});
-
-// file: lib/common/plugin/CaptureAudioOptions.js
-define("cordova/plugin/CaptureAudioOptions", function(require, exports, module) {
-
-/**
- * Encapsulates all audio capture operation configuration options.
- */
-var CaptureAudioOptions = function(){
-    // Upper limit of sound clips user can record. Value must be equal or greater than 1.
-    this.limit = 1;
-    // Maximum duration of a single sound clip in seconds.
-    this.duration = 0;
-};
-
-module.exports = CaptureAudioOptions;
-
-});
-
-// file: lib/common/plugin/CaptureError.js
-define("cordova/plugin/CaptureError", function(require, exports, module) {
-
-/**
- * The CaptureError interface encapsulates all errors in the Capture API.
- */
-var CaptureError = function(c) {
-   this.code = c || null;
-};
-
-// Camera or microphone failed to capture image or sound.
-CaptureError.CAPTURE_INTERNAL_ERR = 0;
-// Camera application or audio capture application is currently serving other capture request.
-CaptureError.CAPTURE_APPLICATION_BUSY = 1;
-// Invalid use of the API (e.g. limit parameter has value less than one).
-CaptureError.CAPTURE_INVALID_ARGUMENT = 2;
-// User exited camera application or audio capture application before capturing anything.
-CaptureError.CAPTURE_NO_MEDIA_FILES = 3;
-// The requested capture operation is not supported.
-CaptureError.CAPTURE_NOT_SUPPORTED = 20;
-
-module.exports = CaptureError;
-
-});
-
-// file: lib/common/plugin/CaptureImageOptions.js
-define("cordova/plugin/CaptureImageOptions", function(require, exports, module) {
-
-/**
- * Encapsulates all image capture operation configuration options.
- */
-var CaptureImageOptions = function(){
-    // Upper limit of images user can take. Value must be equal or greater than 1.
-    this.limit = 1;
-};
-
-module.exports = CaptureImageOptions;
-
-});
-
-// file: lib/common/plugin/CaptureVideoOptions.js
-define("cordova/plugin/CaptureVideoOptions", function(require, exports, module) {
-
-/**
- * Encapsulates all video capture operation configuration options.
- */
-var CaptureVideoOptions = function(){
-    // Upper limit of videos user can record. Value must be equal or greater than 1.
-    this.limit = 1;
-    // Maximum duration of a single video clip in seconds.
-    this.duration = 0;
-};
-
-module.exports = CaptureVideoOptions;
-
-});
-
-// file: lib/common/plugin/CompassError.js
-define("cordova/plugin/CompassError", function(require, exports, module) {
-
-/**
- *  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;
-
-});
-
-// file: lib/common/plugin/CompassHeading.js
-define("cordova/plugin/CompassHeading", function(require, exports, module) {
-
-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;
-
-});
-
-// file: lib/common/plugin/ConfigurationData.js
-define("cordova/plugin/ConfigurationData", function(require, exports, module) {
-
-/**
- * Encapsulates a set of parameters that the capture device supports.
- */
-function ConfigurationData() {
-    // The ASCII-encoded string in lower case representing the media type.
-    this.type = null;
-    // The height attribute represents height of the image or video in pixels.
-    // In the case of a sound clip this attribute has value 0.
-    this.height = 0;
-    // The width attribute represents width of the image or video in pixels.
-    // In the case of a sound clip this attribute has value 0
-    this.width = 0;
-}
-
-module.exports = ConfigurationData;
-
-});
-
-// file: lib/common/plugin/Connection.js
-define("cordova/plugin/Connection", function(require, exports, module) {
-
-/**
- * Network status
- */
-module.exports = {
-        UNKNOWN: "unknown",
-        ETHERNET: "ethernet",
-        WIFI: "wifi",
-        CELL_2G: "2g",
-        CELL_3G: "3g",
-        CELL_4G: "4g",
-        CELL:"cellular",
-        NONE: "none"
-};
-
-});
-
-// file: lib/common/plugin/Contact.js
-define("cordova/plugin/Contact", function(require, exports, module) {
-
-var argscheck = require('cordova/argscheck'),
-    exec = require('cordova/exec'),
-    ContactError = require('cordova/plugin/ContactError'),
-    utils = require('cordova/utils');
-
-/**
-* Converts primitives into Complex Object
-* Currently only used for Date fields
-*/
-function convertIn(contact) {
-    var value = contact.birthday;
-    try {
-      contact.birthday = new Date(parseFloat(value));
-    } catch (exception){
-      console.log("Cordova Contact convertIn error: exception creating date.");
-    }
-    return contact;
-}
-
-/**
-* Converts Complex objects into primitives
-* Only conversion at present is for Dates.
-**/
-
-function convertOut(contact) {
-    var value = contact.birthday;
-    if (value !== null) {
-        // try to make it a Date object if it is not already
-        if (!utils.isDate(value)){
-            try {
-                value = new Date(value);
-            } catch(exception){
-                value = null;
-            }
-        }
-        if (utils.isDate(value)){
-            value = value.valueOf(); // convert to milliseconds
-        }
-        contact.birthday = value;
-    }
-    return contact;
-}
-
-/**
-* Contains information about a single contact.
-* @constructor
-* @param {DOMString} id unique identifier
-* @param {DOMString} displayName
-* @param {ContactName} name
-* @param {DOMString} nickname
-* @param {Array.<ContactField>} phoneNumbers array of phone numbers
-* @param {Array.<ContactField>} emails array of email addresses
-* @param {Array.<ContactAddress>} addresses array of addresses
-* @param {Array.<ContactField>} ims instant messaging user ids
-* @param {Array.<ContactOrganization>} organizations
-* @param {DOMString} birthday contact's birthday
-* @param {DOMString} note user notes about contact
-* @param {Array.<ContactField>} photos
-* @param {Array.<ContactField>} categories
-* @param {Array.<ContactField>} urls contact's web sites
-*/
-var Contact = function (id, displayName, name, nickname, phoneNumbers, emails, addresses,
-    ims, organizations, birthday, note, photos, categories, urls) {
-    this.id = id || null;
-    this.rawId = null;
-    this.displayName = displayName || null;
-    this.name = name || null; // ContactName
-    this.nickname = nickname || null;
-    this.phoneNumbers = phoneNumbers || null; // ContactField[]
-    this.emails = emails || null; // ContactField[]
-    this.addresses = addresses || null; // ContactAddress[]
-    this.ims = ims || null; // ContactField[]
-    this.organizations = organizations || null; // ContactOrganization[]
-    this.birthday = birthday || null;
-    this.note = note || null;
-    this.photos = photos || null; // ContactField[]
-    this.categories = categories || null; // ContactField[]
-    this.urls = urls || null; // ContactField[]
-};
-
-/**
-* Removes contact from device storage.
-* @param successCB success callback
-* @param errorCB error callback
-*/
-Contact.prototype.remove = function(successCB, errorCB) {
-    argscheck.checkArgs('FF', 'Contact.remove', arguments);
-    var fail = errorCB && function(code) {
-        errorCB(new ContactError(code));
-    };
-    if (this.id === null) {
-        fail(ContactError.UNKNOWN_ERROR);
-    }
-    else {
-        exec(successCB, fail, "Contacts", "remove", [this.id]);
-    }
-};
-
-/**
-* Creates a deep copy of this Contact.
-* With the contact ID set to null.
-* @return copy of this Contact
-*/
-Contact.prototype.clone = function() {
-    var clonedContact = utils.clone(this);
-    clonedContact.id = null;
-    clonedContact.rawId = null;
-
-    function nullIds(arr) {
-        if (arr) {
-            for (var i = 0; i < arr.length; ++i) {
-                arr[i].id = null;
-            }
-        }
-    }
-
-    // Loop through and clear out any id's in phones, emails, etc.
-    nullIds(clonedContact.phoneNumbers);
-    nullIds(clonedContact.emails);
-    nullIds(clonedContact.addresses);
-    nullIds(clonedContact.ims);
-    nullIds(clonedContact.organizations);
-    nullIds(clonedContact.categories);
-    nullIds(clonedContact.photos);
-    nullIds(clonedContact.urls);
-    return clonedContact;
-};
-
-/**
-* Persists contact to device storage.
-* @param successCB success callback
-* @param errorCB error callback
-*/
-Contact.prototype.save = function(successCB, errorCB) {
-    argscheck.checkArgs('FFO', 'Contact.save', arguments);
-    var fail = errorCB && function(code) {
-        errorCB(new ContactError(code));
-    };
-    var success = function(result) {
-        if (result) {
-            if (successCB) {
-                var fullContact = require('cordova/plugin/contacts').create(result);
-                successCB(convertIn(fullContact));
-            }
-        }
-        else {
-            // no Entry object returned
-            fail(ContactError.UNKNOWN_ERROR);
-        }
-    };
-    var dupContact = convertOut(utils.clone(this));
-    exec(success, fail, "Contacts", "save", [dupContact]);
-};
-
-
-module.exports = Contact;
-
-});
-
-// file: lib/common/plugin/ContactAddress.js
-define("cordova/plugin/ContactAddress", function(require, exports, module) {
-
-/**
-* Contact address.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code
-* @param formatted // NOTE: not a W3C standard
-* @param streetAddress
-* @param locality
-* @param region
-* @param postalCode
-* @param country
-*/
-
-var ContactAddress = function(pref, type, formatted, streetAddress, locality, region, postalCode, country) {
-    this.id = null;
-    this.pref = (typeof pref != 'undefined' ? pref : false);
-    this.type = type || null;
-    this.formatted = formatted || null;
-    this.streetAddress = streetAddress || null;
-    this.locality = locality || null;
-    this.region = region || null;
-    this.postalCode = postalCode || null;
-    this.country = country || null;
-};
-
-module.exports = ContactAddress;
-
-});
-
-// file: lib/common/plugin/ContactError.js
-define("cordova/plugin/ContactError", function(require, exports, module) {
-
-/**
- *  ContactError.
- *  An error code assigned by an implementation when an error has occurred
- * @constructor
- */
-var ContactError = function(err) {
-    this.code = (typeof err != 'undefined' ? err : null);
-};
-
-/**
- * Error codes
- */
-ContactError.UNKNOWN_ERROR = 0;
-ContactError.INVALID_ARGUMENT_ERROR = 1;
-ContactError.TIMEOUT_ERROR = 2;
-ContactError.PENDING_OPERATION_ERROR = 3;
-ContactError.IO_ERROR = 4;
-ContactError.NOT_SUPPORTED_ERROR = 5;
-ContactError.PERMISSION_DENIED_ERROR = 20;
-
-module.exports = ContactError;
-
-});
-
-// file: lib/common/plugin/ContactField.js
-define("cordova/plugin/ContactField", function(require, exports, module) {
-
-/**
-* Generic contact field.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
-* @param type
-* @param value
-* @param pref
-*/
-var ContactField = function(type, value, pref) {
-    this.id = null;
-    this.type = (type && type.toString()) || null;
-    this.value = (value && value.toString()) || null;
-    this.pref = (typeof pref != 'undefined' ? pref : false);
-};
-
-module.exports = ContactField;
-
-});
-
-// file: lib/common/plugin/ContactFindOptions.js
-define("cordova/plugin/ContactFindOptions", function(require, exports, module) {
-
-/**
- * ContactFindOptions.
- * @constructor
- * @param filter used to match contacts against
- * @param multiple boolean used to determine if more than one contact should be returned
- */
-
-var ContactFindOptions = function(filter, multiple) {
-    this.filter = filter || '';
-    this.multiple = (typeof multiple != 'undefined' ? multiple : false);
-};
-
-module.exports = ContactFindOptions;
-
-});
-
-// file: lib/common/plugin/ContactName.js
-define("cordova/plugin/ContactName", function(require, exports, module) {
-
-/**
-* Contact name.
-* @constructor
-* @param formatted // NOTE: not part of W3C standard
-* @param familyName
-* @param givenName
-* @param middle
-* @param prefix
-* @param suffix
-*/
-var ContactName = function(formatted, familyName, givenName, middle, prefix, suffix) {
-    this.formatted = formatted || null;
-    this.familyName = familyName || null;
-    this.givenName = givenName || null;
-    this.middleName = middle || null;
-    this.honorificPrefix = prefix || null;
-    this.honorificSuffix = suffix || null;
-};
-
-module.exports = ContactName;
-
-});
-
-// file: lib/common/plugin/ContactOrganization.js
-define("cordova/plugin/ContactOrganization", function(require, exports, module) {
-
-/**
-* Contact organization.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
-* @param name
-* @param dept
-* @param title
-* @param startDate
-* @param endDate
-* @param location
-* @param desc
-*/
-
-var ContactOrganization = function(pref, type, name, dept, title) {
-    this.id = null;
-    this.pref = (typeof pref != 'undefined' ? pref : false);
-    this.type = type || null;
-    this.name = name || null;
-    this.department = dept || null;
-    this.title = title || null;
-};
-
-module.exports = ContactOrganization;
-
-});
-
-// file: lib/common/plugin/Coordinates.js
-define("cordova/plugin/Coordinates", function(require, exports, module) {
-
-/**
- * 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;
-
-});
-
-// file: lib/common/plugin/DirectoryEntry.js
-define("cordova/plugin/DirectoryEntry", function(require, exports, module) {
-
-var argscheck = require('cordova/argscheck'),
-    utils = require('cordova/utils'),
-    exec = require('cordova/exec'),
-    Entry = require('cordova/plugin/Entry'),
-    FileError = require('cordova/plugin/FileError'),
-    DirectoryReader = require('cordova/plugin/DirectoryReader');
-
-/**
- * An interface representing a directory on the file system.
- *
- * {boolean} isFile always false (readonly)
- * {boolean} isDirectory always true (readonly)
- * {DOMString} name of the directory, excluding the path leading to it (readonly)
- * {DOMString} fullPath the absolute full path to the directory (readonly)
- * TODO: implement this!!! {FileSystem} filesystem on which the directory resides (readonly)
- */
-var DirectoryEntry = function(name, fullPath) {
-     DirectoryEntry.__super__.constructor.call(this, false, true, name, fullPath);
-};
-
-utils.extend(DirectoryEntry, Entry);
-
-/**
- * Creates a new DirectoryReader to read entries from this directory
- */
-DirectoryEntry.prototype.createReader = function() {
-    return new DirectoryReader(this.fullPath);
-};
-
-/**
- * Creates or looks up a directory
- *
- * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a directory
- * @param {Flags} options to create or exclusively create the directory
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.getDirectory = function(path, options, successCallback, errorCallback) {
-    argscheck.checkArgs('sOFF', 'DirectoryEntry.getDirectory', arguments);
-    var win = successCallback && function(result) {
-        var entry = new DirectoryEntry(result.name, result.fullPath);
-        successCallback(entry);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "getDirectory", [this.fullPath, path, options]);
-};
-
-/**
- * Deletes a directory and all of it's contents
- *
- * @param {Function} successCallback is called with no parameters
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.removeRecursively = function(successCallback, errorCallback) {
-    argscheck.checkArgs('FF', 'DirectoryEntry.removeRecursively', arguments);
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(successCallback, fail, "File", "removeRecursively", [this.fullPath]);
-};
-
-/**
- * Creates or looks up a file
- *
- * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a file
- * @param {Flags} options to create or exclusively create the file
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.getFile = function(path, options, successCallback, errorCallback) {
-    argscheck.checkArgs('sOFF', 'DirectoryEntry.getFile', arguments);
-    var win = successCallback && function(result) {
-        var FileEntry = require('cordova/plugin/FileEntry');
-        var entry = new FileEntry(result.name, result.fullPath);
-        successCallback(entry);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "getFile", [this.fullPath, path, options]);
-};
-
-module.exports = DirectoryEntry;
-
-});
-
-// file: lib/common/plugin/DirectoryReader.js
-define("cordova/plugin/DirectoryReader", function(require, exports, module) {
-
-var exec = require('cordova/exec'),
-    FileError = require('cordova/plugin/FileError') ;
-
-/**
- * An interface that lists the files and directories in a directory.
- */
-function DirectoryReader(path) {
-    this.path = path || null;
-}
-
-/**
- * Returns a list of entries from a directory.
- *
- * @param {Function} successCallback is called with a list of entries
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryReader.prototype.readEntries = function(successCallback, errorCallback) {
-    var win = typeof successCallback !== 'function' ? null : function(result) {
-        var retVal = [];
-        for (var i=0; i<result.length; i++) {
-            var entry = null;
-            if (result[i].isDirectory) {
-                entry = new (require('cordova/plugin/DirectoryEntry'))();
-            }
-            else if (result[i].isFile) {
-                entry = new (require('cordova/plugin/FileEntry'))();
-            }
-            entry.isDirectory = result[i].isDirectory;
-            entry.isFile = result[i].isFile;
-            entry.name = result[i].name;
-            entry.fullPath = result[i].fullPath;
-            retVal.push(entry);
-        }
-        successCallback(retVal);
-    };
-    var fail = typeof errorCallback !== 'function' ? null : function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "readEntries", [this.path]);
-};
-
-module.exports = DirectoryReader;
-
-});
-
-// file: lib/common/plugin/Entry.js
-define("cordova/plugin/Entry", function(require, exports, module) {
-
-var argscheck = require('cordova/argscheck'),
-    exec = require('cordova/exec'),
-    FileError = require('cordova/plugin/FileError'),
-    Metadata = require('cordova/plugin/Metadata');
-
-/**
- * Represents a file or directory on the local file system.
- *
- * @param isFile
- *            {boolean} true if Entry is a file (readonly)
- * @param isDirectory
- *            {boolean} true if Entry is a directory (readonly)
- * @param name
- *            {DOMString} name of the file or directory, excluding the path
- *            leading to it (readonly)
- * @param fullPath
- *            {DOMString} the absolute full path to the file or directory
- *            (readonly)
- */
-function Entry(isFile, isDirectory, name, fullPath, fileSystem) {
-    this.isFile = !!isFile;
-    this.isDirectory = !!isDirectory;
-    this.name = name || '';
-    this.fullPath = fullPath || '';
-    this.filesystem = fileSystem || null;
-}
-
-/**
- * Look up the metadata of the entry.
- *
- * @param successCallback
- *            {Function} is called with a Metadata object
- * @param errorCallback
- *            {Function} is called with a FileError
- */
-Entry.prototype.getMetadata = function(successCallback, errorCallback) {
-    argscheck.checkArgs('FF', 'Entry.getMetadata', arguments);
-    var success = successCallback && function(lastModified) {
-        var metadata = new Metadata(lastModified);
-        successCallback(metadata);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-
-    exec(success, fail, "File", "getMetadata", [this.fullPath]);
-};
-
-/**
- * Set the metadata of the entry.
- *
- * @param successCallback
- *            {Function} is called with a Metadata object
- * @param errorCallback
- *            {Function} is called with a FileError
- * @param metadataObject
- *            {Object} keys and values to set
- */
-Entry.prototype.setMetadata = function(successCallback, errorCallback, metadataObject) {
-    argscheck.checkArgs('FFO', 'Entry.setMetadata', arguments);
-    exec(successCallback, errorCallback, "File", "setMetadata", [this.fullPath, metadataObject]);
-};
-
-/**
- * Move a file or directory to a new location.
- *
- * @param parent
- *            {DirectoryEntry} the directory to which to move this entry
- * @param newName
- *            {DOMString} new name of the entry, defaults to the current name
- * @param successCallback
- *            {Function} called with the new DirectoryEntry object
- * @param errorCallback
- *            {Function} called with a FileError
- */
-Entry.prototype.moveTo = function(parent, newName, successCallback, errorCallback) {
-    argscheck.checkArgs('oSFF', 'Entry.moveTo', arguments);
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    // source path
-    var srcPath = this.fullPath,
-        // entry name
-        name = newName || this.name,
-        success = function(entry) {
-            if (entry) {
-                if (successCallback) {
-                    // create appropriate Entry object
-                    var result = (entry.isDirectory) ? new (require('cordova/plugin/DirectoryEntry'))(entry.name, entry.fullPath) : new (require('cordova/plugin/FileEntry'))(entry.name, entry.fullPath);
-                    successCallback(result);
-                }
-            }
-            else {
-                // no Entry object returned
-                fail && fail(FileError.NOT_FOUND_ERR);
-            }
-        };
-
-    // copy
-    exec(success, fail, "File", "moveTo", [srcPath, parent.fullPath, name]);
-};
-
-/**
- * Copy a directory to a different location.
- *
- * @param parent
- *            {DirectoryEntry} the directory to which to copy the entry
- * @param newName
- *            {DOMString} new name of the entry, defaults to the current name
- * @param successCallback
- *            {Function} called with the new Entry object
- * @param errorCallback
- *            {Function} called with a FileError
- */
-Entry.prototype.copyTo = function(parent, newName, successCallback, errorCallback) {
-    argscheck.checkArgs('oSFF', 'Entry.copyTo', arguments);
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-
-        // source path
-    var srcPath = this.fullPath,
-        // entry name
-        name = newName || this.name,
-        // success callback
-        success = function(entry) {
-            if (entry) {
-                if (successCallback) {
-                    // create appropriate Entry object
-                    var result = (entry.isDirectory) ? new (require('cordova/plugin/DirectoryEntry'))(entry.name, entry.fullPath) : new (require('cordova/plugin/FileEntry'))(entry.name, entry.fullPath);
-                    successCallback(result);
-                }
-            }
-            else {
-                // no Entry object returned
-                fail && fail(FileError.NOT_FOUND_ERR);
-            }
-        };
-
-    // copy
-    exec(success, fail, "File", "copyTo", [srcPath, parent.fullPath, name]);
-};
-
-/**
- * Return a URL that can be used to identify this entry.
- */
-Entry.prototype.toURL = function() {
-    // fullPath attribute contains the full URL
-    return this.fullPath;
-};
-
-/**
- * Returns a URI that can be used to identify this entry.
- *
- * @param {DOMString} mimeType for a FileEntry, the mime type to be used to interpret the file, when loaded through this URI.
- * @return uri
- */
-Entry.prototype.toURI = function(mimeType) {
-    console.log("DEPRECATED: Update your code to use 'toURL'");
-    // fullPath attribute contains the full URI
-    return this.toURL();
-};
-
-/**
- * Remove a file or directory. It is an error to attempt to delete a
- * directory that is not empty. It is an error to attempt to delete a
- * root directory of a file system.
- *
- * @param successCallback {Function} called with no parameters
- * @param errorCallback {Function} called with a FileError
- */
-Entry.prototype.remove = function(successCallback, errorCallback) {
-    argscheck.checkArgs('FF', 'Entry.remove', arguments);
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(successCallback, fail, "File", "remove", [this.fullPath]);
-};
-
-/**
- * Look up the parent DirectoryEntry of this entry.
- *
- * @param successCallback {Function} called with the parent DirectoryEntry object
- * @param errorCallback {Function} called with a FileError
- */
-Entry.prototype.getParent = function(successCallback, errorCallback) {
-    argscheck.checkArgs('FF', 'Entry.getParent', arguments);
-    var win = successCallback && function(result) {
-        var DirectoryEntry = require('cordova/plugin/DirectoryEntry');
-        var entry = new DirectoryEntry(result.name, result.fullPath);
-        successCallback(entry);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "getParent", [this.fullPath]);
-};
-
-module.exports = Entry;
-
-});
-
-// file: lib/common/plugin/File.js
-define("cordova/plugin/File", function(require, exports, module) {
-
-/**
- * Constructor.
- * name {DOMString} name of the file, without path information
- * fullPath {DOMString} the full path of the file, including the name
- * type {DOMString} mime type
- * lastModifiedDate {Date} last modified date
- * size {Number} size of the file in bytes
- */
-
-var File = function(name, fullPath, type, lastModifiedDate, size){
-    this.name = name || '';
-    this.fullPath = fullPath || null;
-    this.type = type || null;
-    this.lastModifiedDate = lastModifiedDate || null;
-    this.size = size || 0;
-
-    // These store the absolute start and end for slicing the file.
-    this.start = 0;
-    this.end = this.size;
-};
-
-/**
- * Returns a "slice" of the file. Since Cordova Files don't contain the actual
- * content, this really returns a File with adjusted start and end.
- * Slices of slices are supported.
- * start {Number} The index at which to start the slice (inclusive).
- * end {Number} The index at which to end the slice (exclusive).
- */
-File.prototype.slice = function(start, end) {
-    var size = this.end - this.start;
-    var newStart = 0;
-    var newEnd = size;
-    if (arguments.length) {
-        if (start < 0) {
-            newStart = Math.max(size + start, 0);
-        } else {
-            newStart = Math.min(size, start);
-        }
-    }
-
-    if (arguments.length >= 2) {
-        if (end < 0) {
-            newEnd = Math.max(size + end, 0);
-        } else {
-            newEnd = Math.min(end, size);
-        }
-    }
-
-    var newFile = new File(this.name, this.fullPath, this.type, this.lastModifiedData, this.size);
-    newFile.start = this.start + newStart;
-    newFile.end = this.start + newEnd;
-    return newFile;
-};
-
-
-module.exports = File;
-
-});
-
-// file: lib/common/plugin/FileEntry.js
-define("cordova/plugin/FileEntry", function(require, exports, module) {
-
-var utils = require('cordova/utils'),
-    exec = require('cordova/exec'),
-    Entry = require('cordova/plugin/Entry'),
-    FileWriter = require('cordova/plugin/FileWriter'),
-    File = require('cordova/plugin/File'),
-    FileError = require('cordova/plugin/FileError');
-
-/**
- * An interface representing a file on the file system.
- *
- * {boolean} isFile always true (readonly)
- * {boolean} isDirectory always false (readonly)
- * {DOMString} name of the file, excluding the path leading to it (readonly)
- * {DOMString} fullPath the absolute full path to the file (readonly)
- * {FileSystem} filesystem on which the file resides (readonly)
- */
-var FileEntry = function(name, fullPath) {
-     FileEntry.__super__.constructor.apply(this, [true, false, name, fullPath]);
-};
-
-utils.extend(FileEntry, Entry);
-
-/**
- * Creates a new FileWriter associated with the file that this FileEntry represents.
- *
- * @param {Function} successCallback is called with the new FileWriter
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.createWriter = function(successCallback, errorCallback) {
-    this.file(function(filePointer) {
-        var writer = new FileWriter(filePointer);
-
-        if (writer.fileName === null || writer.fileName === "") {
-            errorCallback && errorCallback(new FileError(FileError.INVALID_STATE_ERR));
-        } else {
-            successCallback && successCallback(writer);
-        }
-    }, errorCallback);
-};
-
-/**
- * Returns a File that represents the current state of the file that this FileEntry represents.
- *
- * @param {Function} successCallback is called with the new File object
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.file = function(successCallback, errorCallback) {
-    var win = successCallback && function(f) {
-        var file = new File(f.name, f.fullPath, f.type, f.lastModifiedDate, f.size);
-        successCallback(file);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "getFileMetadata", [this.fullPath]);
-};
-
-
-module.exports = FileEntry;
-
-});
-
-// file: lib/common/plugin/FileError.js
-define("cordova/plugin/FileError", function(require, exports, module) {
-
-/**
- * FileError
- */
-function FileError(error) {
-  this.code = error || null;
-}
-
-// File error codes
-// Found in DOMException
-FileError.NOT_FOUND_ERR = 1;
-FileError.SECURITY_ERR = 2;
-FileError.ABORT_ERR = 3;
-
-// Added by File API specification
-FileError.NOT_READABLE_ERR = 4;
-FileError.ENCODING_ERR = 5;
-FileError.NO_MODIFICATION_ALLOWED_ERR = 6;
-FileError.INVALID_STATE_ERR = 7;
-FileError.SYNTAX_ERR = 8;
-FileError.INVALID_MODIFICATION_ERR = 9;
-FileError.QUOTA_EXCEEDED_ERR = 10;
-FileError.TYPE_MISMATCH_ERR = 11;
-FileError.PATH_EXISTS_ERR = 12;
-
-module.exports = FileError;
-
-});
-
-// file: lib/common/plugin/FileReader.js
-define("cordova/plugin/FileReader", function(require, exports, module) {
-
-var exec = require('cordova/exec'),
-    modulemapper = require('cordova/modulemapper'),
-    utils = require('cordova/utils'),
-    File = require('cordova/plugin/File'),
-    FileError = require('cordova/plugin/FileError'),
-    ProgressEvent = require('cordova/plugin/ProgressEvent'),
-    origFileReader = modulemapper.getOriginalSymbol(this, 'FileReader');
-
-/**
- * This class reads the mobile device file system.
- *
- * For Android:
- *      The root directory is the root of the file system.
- *      To read from the SD card, the file name is "sdcard/my_file.txt"
- * @constructor
- */
-var FileReader = function() {
-    this._readyState = 0;
-    this._error = null;
-    this._result = null;
-    this._fileName = '';
-    this._realReader = origFileReader ? new origFileReader() : {};
-};
-
-// States
-FileReader.EMPTY = 0;
-FileReader.LOADING = 1;
-FileReader.DONE = 2;
-
-utils.defineGetter(FileReader.prototype, 'readyState', function() {
-    return this._fileName ? this._readyState : this._realReader.readyState;
-});
-
-utils.defineGetter(FileReader.prototype, 'error', function() {
-    return this._fileName ? this._error: this._realReader.error;
-});
-
-utils.defineGetter(FileReader.prototype, 'result', function() {
-    return this._fileName ? this._result: this._realReader.result;
-});
-
-function defineEvent(eventName) {
-    utils.defineGetterSetter(FileReader.prototype, eventName, function() {
-        return this._realReader[eventName] || null;
-    }, function(value) {
-        this._realReader[eventName] = value;
-    });
-}
-defineEvent('onloadstart');    // When the read starts.
-defineEvent('onprogress');     // While reading (and decoding) file or fileBlob data, and reporting partial file data (progress.loaded/progress.total)
-defineEvent('onload');         // When the read has successfully completed.
-defineEvent('onerror');        // When the read has failed (see errors).
-defineEvent('onloadend');      // When the request has completed (either in success or failure).
-defineEvent('onabort');        // When the read has been aborted. For instance, by invoking the abort() method.
-
-function initRead(reader, file) {
-    // Already loading something
-    if (reader.readyState == FileReader.LOADING) {
-      throw new FileError(FileError.INVALID_STATE_ERR);
-    }
-
-    reader._result = null;
-    reader._error = null;
-    reader._readyState = FileReader.LOADING;
-
-    if (typeof file == 'string') {
-        // Deprecated in Cordova 2.4.
-        console.warn('Using a string argument with FileReader.readAs functions is deprecated.');
-        reader._fileName = file;
-    } else if (typeof file.fullPath == 'string') {
-        reader._fileName = file.fullPath;
-    } else {
-        reader._fileName = '';
-        return true;
-    }
-
-    reader.onloadstart && reader.onloadstart(new ProgressEvent("loadstart", {target:reader}));
-}
-
-/**
- * Abort reading file.
- */
-FileReader.prototype.abort = function() {
-    if (origFileReader && !this._fileName) {
-        return this._realReader.abort();
-    }
-    this._result = null;
-
-    if (this._readyState == FileReader.DONE || this._readyState == FileReader.EMPTY) {
-      return;
-    }
-
-    this._readyState = FileReader.DONE;
-
-    // If abort callback
-    if (typeof this.onabort === 'function') {
-        this.onabort(new ProgressEvent('abort', {target:this}));
-    }
-    // If load end callback
-    if (typeof this.onloadend === 'function') {
-        this.onloadend(new ProgressEvent('loadend', {target:this}));
-    }
-};
-
-/**
- * Read text file.
- *
- * @param file          {File} File object containing file properties
- * @param encoding      [Optional] (see http://www.iana.org/assignments/character-sets)
- */
-FileReader.prototype.readAsText = function(file, encoding) {
-    if (initRead(this, file)) {
-        return this._realReader.readAsText(file, encoding);
-    }
-
-    // Default encoding is UTF-8
-    var enc = encoding ? encoding : "UTF-8";
-    var me = this;
-    var execArgs = [this._fileName, enc, file.start, file.end];
-
-    // Read file
-    exec(
-        // Success callback
-        function(r) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // Save result
-            me._result = r;
-
-            // If onload callback
-            if (typeof me.onload === "function") {
-                me.onload(new ProgressEvent("load", {target:me}));
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        },
-        // Error callback
-        function(e) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            // null result
-            me._result = null;
-
-            // Save error
-            me._error = new FileError(e);
-
-            // If onerror callback
-            if (typeof me.onerror === "function") {
-                me.onerror(new ProgressEvent("error", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        }, "File", "readAsText", execArgs);
-};
-
-
-/**
- * Read file and return data as a base64 encoded data url.
- * A data url is of the form:
- *      data:[<mediatype>][;base64],<data>
- *
- * @param file          {File} File object containing file properties
- */
-FileReader.prototype.readAsDataURL = function(file) {
-    if (initRead(this, file)) {
-        return this._realReader.readAsDataURL(file);
-    }
-
-    var me = this;
-    var execArgs = [this._fileName, file.start, file.end];
-
-    // Read file
-    exec(
-        // Success callback
-        function(r) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            // Save result
-            me._result = r;
-
-            // If onload callback
-            if (typeof me.onload === "function") {
-                me.onload(new ProgressEvent("load", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        },
-        // Error callback
-        function(e) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            me._result = null;
-
-            // Save error
-            me._error = new FileError(e);
-
-            // If onerror callback
-            if (typeof me.onerror === "function") {
-                me.onerror(new ProgressEvent("error", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        }, "File", "readAsDataURL", execArgs);
-};
-
-/**
- * Read file and return data as a binary data.
- *
- * @param file          {File} File object containing file properties
- */
-FileReader.prototype.readAsBinaryString = function(file) {
-    if (initRead(this, file)) {
-        return this._realReader.readAsBinaryString(file);
-    }
-
-    var me = this;
-    var execArgs = [this._fileName, file.start, file.end];
-
-    // Read file
-    exec(
-        // Success callback
-        function(r) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            me._result = r;
-
-            // If onload callback
-            if (typeof me.onload === "function") {
-                me.onload(new ProgressEvent("load", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        },
-        // Error callback
-        function(e) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            me._result = null;
-
-            // Save error
-            me._error = new FileError(e);
-
-            // If onerror callback
-            if (typeof me.onerror === "function") {
-                me.onerror(new ProgressEvent("error", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        }, "File", "readAsBinaryString", execArgs);
-};
-
-/**
- * Read file and return data as a binary data.
- *
- * @param file          {File} File object containing file properties
- */
-FileReader.prototype.readAsArrayBuffer = function(file) {
-    if (initRead(this, file)) {
-        return this._realReader.readAsArrayBuffer(file);
-    }
-
-    var me = this;
-    var execArgs = [this._fileName, file.start, file.end];
-
-    // Read file
-    exec(
-        // Success callback
-        function(r) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            me._result = r;
-
-            // If onload callback
-            if (typeof me.onload === "function") {
-                me.onload(new ProgressEvent("load", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        },
-        // Error callback
-        function(e) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            me._result = null;
-
-            // Save error
-            me.

<TRUNCATED>
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_one/cordova/appinfo.jar
----------------------------------------------------------------------
diff --git a/spec/projects/android_one/cordova/appinfo.jar b/spec/projects/android_one/cordova/appinfo.jar
deleted file mode 100644
index 583776d..0000000
Binary files a/spec/projects/android_one/cordova/appinfo.jar and /dev/null differ


[43/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/src/android/ContactAccessorSdk5.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/android/ContactAccessorSdk5.java b/cordova-lib/spec-plugman/plugins/Contacts/src/android/ContactAccessorSdk5.java
new file mode 100644
index 0000000..46440ba
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/src/android/ContactAccessorSdk5.java
@@ -0,0 +1,2183 @@
+/*
+       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.
+*/
+
+package org.apache.cordova.core;
+
+import android.accounts.Account;
+import android.accounts.AccountManager;
+import android.content.ContentProviderOperation;
+import android.content.ContentProviderResult;
+import android.content.ContentUris;
+import android.content.ContentValues;
+import android.content.OperationApplicationException;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.RemoteException;
+import android.provider.ContactsContract;
+import android.util.Log;
+import android.webkit.WebView;
+
+import org.apache.cordova.CordovaInterface;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.io.ByteArrayOutputStream;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+//import android.app.Activity;
+//import android.content.Context;
+
+/**
+ * An implementation of {@link ContactAccessor} that uses current Contacts API.
+ * This class should be used on Eclair or beyond, but would not work on any earlier
+ * release of Android.  As a matter of fact, it could not even be loaded.
+ * <p>
+ * This implementation has several advantages:
+ * <ul>
+ * <li>It sees contacts from multiple accounts.
+ * <li>It works with aggregated contacts. So for example, if the contact is the result
+ * of aggregation of two raw contacts from different accounts, it may return the name from
+ * one and the phone number from the other.
+ * <li>It is efficient because it uses the more efficient current API.
+ * <li>Not obvious in this particular example, but it has access to new kinds
+ * of data available exclusively through the new APIs. Exercise for the reader: add support
+ * for nickname (see {@link android.provider.ContactsContract.CommonDataKinds.Nickname}) or
+ * social status updates (see {@link android.provider.ContactsContract.StatusUpdates}).
+ * </ul>
+ */
+
+public class ContactAccessorSdk5 extends ContactAccessor {
+
+    /**
+     * Keep the photo size under the 1 MB blog limit.
+     */
+    private static final long MAX_PHOTO_SIZE = 1048576;
+
+    private static final String EMAIL_REGEXP = ".+@.+\\.+.+"; /* <anything>@<anything>.<anything>*/
+
+    /**
+     * A static map that converts the JavaScript property name to Android database column name.
+     */
+    private static final Map<String, String> dbMap = new HashMap<String, String>();
+    static {
+        dbMap.put("id", ContactsContract.Data.CONTACT_ID);
+        dbMap.put("displayName", ContactsContract.Contacts.DISPLAY_NAME);
+        dbMap.put("name", ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME);
+        dbMap.put("name.formatted", ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME);
+        dbMap.put("name.familyName", ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME);
+        dbMap.put("name.givenName", ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME);
+        dbMap.put("name.middleName", ContactsContract.CommonDataKinds.StructuredName.MIDDLE_NAME);
+        dbMap.put("name.honorificPrefix", ContactsContract.CommonDataKinds.StructuredName.PREFIX);
+        dbMap.put("name.honorificSuffix", ContactsContract.CommonDataKinds.StructuredName.SUFFIX);
+        dbMap.put("nickname", ContactsContract.CommonDataKinds.Nickname.NAME);
+        dbMap.put("phoneNumbers", ContactsContract.CommonDataKinds.Phone.NUMBER);
+        dbMap.put("phoneNumbers.value", ContactsContract.CommonDataKinds.Phone.NUMBER);
+        dbMap.put("emails", ContactsContract.CommonDataKinds.Email.DATA);
+        dbMap.put("emails.value", ContactsContract.CommonDataKinds.Email.DATA);
+        dbMap.put("addresses", ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS);
+        dbMap.put("addresses.formatted", ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS);
+        dbMap.put("addresses.streetAddress", ContactsContract.CommonDataKinds.StructuredPostal.STREET);
+        dbMap.put("addresses.locality", ContactsContract.CommonDataKinds.StructuredPostal.CITY);
+        dbMap.put("addresses.region", ContactsContract.CommonDataKinds.StructuredPostal.REGION);
+        dbMap.put("addresses.postalCode", ContactsContract.CommonDataKinds.StructuredPostal.POSTCODE);
+        dbMap.put("addresses.country", ContactsContract.CommonDataKinds.StructuredPostal.COUNTRY);
+        dbMap.put("ims", ContactsContract.CommonDataKinds.Im.DATA);
+        dbMap.put("ims.value", ContactsContract.CommonDataKinds.Im.DATA);
+        dbMap.put("organizations", ContactsContract.CommonDataKinds.Organization.COMPANY);
+        dbMap.put("organizations.name", ContactsContract.CommonDataKinds.Organization.COMPANY);
+        dbMap.put("organizations.department", ContactsContract.CommonDataKinds.Organization.DEPARTMENT);
+        dbMap.put("organizations.title", ContactsContract.CommonDataKinds.Organization.TITLE);
+        dbMap.put("birthday", ContactsContract.CommonDataKinds.Event.CONTENT_ITEM_TYPE);
+        dbMap.put("note", ContactsContract.CommonDataKinds.Note.NOTE);
+        dbMap.put("photos.value", ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE);
+        //dbMap.put("categories.value", null);
+        dbMap.put("urls", ContactsContract.CommonDataKinds.Website.URL);
+        dbMap.put("urls.value", ContactsContract.CommonDataKinds.Website.URL);
+    }
+
+    /**
+     * Create an contact accessor.
+     */
+    public ContactAccessorSdk5(WebView view, CordovaInterface context) {
+        mApp = context;
+        mView = view;
+    }
+
+    /**
+     * This method takes the fields required and search options in order to produce an
+     * array of contacts that matches the criteria provided.
+     * @param fields an array of items to be used as search criteria
+     * @param options that can be applied to contact searching
+     * @return an array of contacts
+     */
+    @Override
+    public JSONArray search(JSONArray fields, JSONObject options) {
+        // Get the find options
+        String searchTerm = "";
+        int limit = Integer.MAX_VALUE;
+        boolean multiple = true;
+
+        if (options != null) {
+            searchTerm = options.optString("filter");
+            if (searchTerm.length() == 0) {
+                searchTerm = "%";
+            }
+            else {
+                searchTerm = "%" + searchTerm + "%";
+            }
+            
+            try {
+                multiple = options.getBoolean("multiple");
+                if (!multiple) {
+                    limit = 1;
+                }
+            } catch (JSONException e) {
+                // Multiple was not specified so we assume the default is true.
+            }
+        }
+        else {
+            searchTerm = "%";
+        }
+        
+
+        //Log.d(LOG_TAG, "Search Term = " + searchTerm);
+        //Log.d(LOG_TAG, "Field Length = " + fields.length());
+        //Log.d(LOG_TAG, "Fields = " + fields.toString());
+
+        // Loop through the fields the user provided to see what data should be returned.
+        HashMap<String, Boolean> populate = buildPopulationSet(fields);
+
+        // Build the ugly where clause and where arguments for one big query.
+        WhereOptions whereOptions = buildWhereClause(fields, searchTerm);
+
+        // Get all the id's where the search term matches the fields passed in.
+        Cursor idCursor = mApp.getActivity().getContentResolver().query(ContactsContract.Data.CONTENT_URI,
+                new String[] { ContactsContract.Data.CONTACT_ID },
+                whereOptions.getWhere(),
+                whereOptions.getWhereArgs(),
+                ContactsContract.Data.CONTACT_ID + " ASC");
+
+        // Create a set of unique ids
+        Set<String> contactIds = new HashSet<String>();
+        int idColumn = -1;
+        while (idCursor.moveToNext()) {
+            if (idColumn < 0) {
+                idColumn = idCursor.getColumnIndex(ContactsContract.Data.CONTACT_ID);
+            }
+            contactIds.add(idCursor.getString(idColumn));
+        }
+        idCursor.close();
+
+        // Build a query that only looks at ids
+        WhereOptions idOptions = buildIdClause(contactIds, searchTerm);
+
+        // Determine which columns we should be fetching.
+        HashSet<String> columnsToFetch = new HashSet<String>();
+        columnsToFetch.add(ContactsContract.Data.CONTACT_ID);
+        columnsToFetch.add(ContactsContract.Data.RAW_CONTACT_ID);
+        columnsToFetch.add(ContactsContract.Data.MIMETYPE);
+        
+        if (isRequired("displayName", populate)) {
+            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME);            
+        }
+        if (isRequired("name", populate)) {
+            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME);
+            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME);
+            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredName.MIDDLE_NAME);
+            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredName.PREFIX);
+            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredName.SUFFIX);
+        }
+        if (isRequired("phoneNumbers", populate)) {
+            columnsToFetch.add(ContactsContract.CommonDataKinds.Phone._ID);
+            columnsToFetch.add(ContactsContract.CommonDataKinds.Phone.NUMBER);
+            columnsToFetch.add(ContactsContract.CommonDataKinds.Phone.TYPE);
+        }
+        if (isRequired("emails", populate)) {
+            columnsToFetch.add(ContactsContract.CommonDataKinds.Email._ID);
+            columnsToFetch.add(ContactsContract.CommonDataKinds.Email.DATA);
+            columnsToFetch.add(ContactsContract.CommonDataKinds.Email.TYPE);
+        }
+        if (isRequired("addresses", populate)) {
+            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredPostal._ID);
+            columnsToFetch.add(ContactsContract.CommonDataKinds.Organization.TYPE);
+            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS);
+            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredPostal.STREET);
+            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredPostal.CITY);
+            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredPostal.REGION);
+            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredPostal.POSTCODE);
+            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredPostal.COUNTRY);
+        }
+        if (isRequired("organizations", populate)) {
+            columnsToFetch.add(ContactsContract.CommonDataKinds.Organization._ID);
+            columnsToFetch.add(ContactsContract.CommonDataKinds.Organization.TYPE);
+            columnsToFetch.add(ContactsContract.CommonDataKinds.Organization.DEPARTMENT);
+            columnsToFetch.add(ContactsContract.CommonDataKinds.Organization.COMPANY);
+            columnsToFetch.add(ContactsContract.CommonDataKinds.Organization.TITLE);
+        }
+        if (isRequired("ims", populate)) {
+            columnsToFetch.add(ContactsContract.CommonDataKinds.Im._ID);
+            columnsToFetch.add(ContactsContract.CommonDataKinds.Im.DATA);
+            columnsToFetch.add(ContactsContract.CommonDataKinds.Im.TYPE);
+        }
+        if (isRequired("note", populate)) {
+            columnsToFetch.add(ContactsContract.CommonDataKinds.Note.NOTE);
+        }
+        if (isRequired("nickname", populate)) {
+            columnsToFetch.add(ContactsContract.CommonDataKinds.Nickname.NAME);
+        }
+        if (isRequired("urls", populate)) {
+            columnsToFetch.add(ContactsContract.CommonDataKinds.Website._ID);
+            columnsToFetch.add(ContactsContract.CommonDataKinds.Website.URL);
+            columnsToFetch.add(ContactsContract.CommonDataKinds.Website.TYPE);
+        }
+        if (isRequired("birthday", populate)) {
+            columnsToFetch.add(ContactsContract.CommonDataKinds.Event.START_DATE);
+            columnsToFetch.add(ContactsContract.CommonDataKinds.Event.TYPE);
+        }
+        if (isRequired("photos", populate)) {
+            columnsToFetch.add(ContactsContract.CommonDataKinds.Photo._ID);
+        }
+        
+        // Do the id query
+        Cursor c = mApp.getActivity().getContentResolver().query(ContactsContract.Data.CONTENT_URI,
+                columnsToFetch.toArray(new String[] {}),
+                idOptions.getWhere(),
+                idOptions.getWhereArgs(),
+                ContactsContract.Data.CONTACT_ID + " ASC");
+
+        JSONArray contacts = populateContactArray(limit, populate, c);
+        return contacts;
+    }
+
+    /**
+     * A special search that finds one contact by id
+     *
+     * @param id   contact to find by id
+     * @return     a JSONObject representing the contact
+     * @throws JSONException
+     */
+    public JSONObject getContactById(String id) throws JSONException {
+        // Do the id query
+        Cursor c = mApp.getActivity().getContentResolver().query(ContactsContract.Data.CONTENT_URI,
+                null,
+                ContactsContract.Data.CONTACT_ID + " = ? ",
+                new String[] { id },
+                ContactsContract.Data.CONTACT_ID + " ASC");
+
+        JSONArray fields = new JSONArray();
+        fields.put("*");
+
+        HashMap<String, Boolean> populate = buildPopulationSet(fields);
+
+        JSONArray contacts = populateContactArray(1, populate, c);
+
+        if (contacts.length() == 1) {
+            return contacts.getJSONObject(0);
+        } else {
+            return null;
+        }
+    }
+
+    /**
+     * Creates an array of contacts from the cursor you pass in
+     *
+     * @param limit        max number of contacts for the array
+     * @param populate     whether or not you should populate a certain value
+     * @param c            the cursor
+     * @return             a JSONArray of contacts
+     */
+    private JSONArray populateContactArray(int limit,
+            HashMap<String, Boolean> populate, Cursor c) {
+
+        String contactId = "";
+        String rawId = "";
+        String oldContactId = "";
+        boolean newContact = true;
+        String mimetype = "";
+
+        JSONArray contacts = new JSONArray();
+        JSONObject contact = new JSONObject();
+        JSONArray organizations = new JSONArray();
+        JSONArray addresses = new JSONArray();
+        JSONArray phones = new JSONArray();
+        JSONArray emails = new JSONArray();
+        JSONArray ims = new JSONArray();
+        JSONArray websites = new JSONArray();
+        JSONArray photos = new JSONArray();
+
+        // Column indices
+        int colContactId = c.getColumnIndex(ContactsContract.Data.CONTACT_ID);
+        int colRawContactId = c.getColumnIndex(ContactsContract.Data.RAW_CONTACT_ID);
+        int colMimetype = c.getColumnIndex(ContactsContract.Data.MIMETYPE);
+        int colDisplayName = c.getColumnIndex(ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME);
+        int colNote = c.getColumnIndex(ContactsContract.CommonDataKinds.Note.NOTE);
+        int colNickname = c.getColumnIndex(ContactsContract.CommonDataKinds.Nickname.NAME);
+        int colBirthday = c.getColumnIndex(ContactsContract.CommonDataKinds.Event.START_DATE);
+        int colEventType = c.getColumnIndex(ContactsContract.CommonDataKinds.Event.TYPE);
+
+        if (c.getCount() > 0) {
+            while (c.moveToNext() && (contacts.length() <= (limit - 1))) {
+                try {
+                    contactId = c.getString(colContactId);
+                    rawId = c.getString(colRawContactId);
+
+                    // If we are in the first row set the oldContactId
+                    if (c.getPosition() == 0) {
+                        oldContactId = contactId;
+                    }
+
+                    // When the contact ID changes we need to push the Contact object
+                    // to the array of contacts and create new objects.
+                    if (!oldContactId.equals(contactId)) {
+                        // Populate the Contact object with it's arrays
+                        // and push the contact into the contacts array
+                        contacts.put(populateContact(contact, organizations, addresses, phones,
+                                emails, ims, websites, photos));
+
+                        // Clean up the objects
+                        contact = new JSONObject();
+                        organizations = new JSONArray();
+                        addresses = new JSONArray();
+                        phones = new JSONArray();
+                        emails = new JSONArray();
+                        ims = new JSONArray();
+                        websites = new JSONArray();
+                        photos = new JSONArray();
+
+                        // Set newContact to true as we are starting to populate a new contact
+                        newContact = true;
+                    }
+
+                    // When we detect a new contact set the ID and display name.
+                    // These fields are available in every row in the result set returned.
+                    if (newContact) {
+                        newContact = false;
+                        contact.put("id", contactId);
+                        contact.put("rawId", rawId);
+                    }
+
+                    // Grab the mimetype of the current row as it will be used in a lot of comparisons
+                    mimetype = c.getString(colMimetype);
+                    
+                    if (mimetype.equals(ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE)) {
+                        contact.put("displayName", c.getString(colDisplayName));
+                    }
+
+                    if (mimetype.equals(ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE)
+                            && isRequired("name", populate)) {
+                        contact.put("name", nameQuery(c));
+                    }
+                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE)
+                            && isRequired("phoneNumbers", populate)) {
+                        phones.put(phoneQuery(c));
+                    }
+                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE)
+                            && isRequired("emails", populate)) {
+                        emails.put(emailQuery(c));
+                    }
+                    else if (mimetype.equals(ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE)
+                            && isRequired("addresses", populate)) {
+                        addresses.put(addressQuery(c));
+                    }
+                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE)
+                            && isRequired("organizations", populate)) {
+                        organizations.put(organizationQuery(c));
+                    }
+                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE)
+                            && isRequired("ims", populate)) {
+                        ims.put(imQuery(c));
+                    }
+                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Note.CONTENT_ITEM_TYPE)
+                            && isRequired("note", populate)) {
+                        contact.put("note", c.getString(colNote));
+                    }
+                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Nickname.CONTENT_ITEM_TYPE)
+                            && isRequired("nickname", populate)) {
+                        contact.put("nickname", c.getString(colNickname));
+                    }
+                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Website.CONTENT_ITEM_TYPE)
+                            && isRequired("urls", populate)) {
+                        websites.put(websiteQuery(c));
+                    }
+                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Event.CONTENT_ITEM_TYPE)) {
+                        if (isRequired("birthday", populate) &&
+                                ContactsContract.CommonDataKinds.Event.TYPE_BIRTHDAY == c.getInt(colEventType)) {
+                            contact.put("birthday", c.getString(colBirthday));
+                        }
+                    }
+                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE)
+                            && isRequired("photos", populate)) {
+                        photos.put(photoQuery(c, contactId));
+                    }
+                } catch (JSONException e) {
+                    Log.e(LOG_TAG, e.getMessage(), e);
+                }
+
+                // Set the old contact ID
+                oldContactId = contactId;
+
+            }
+            
+            // Push the last contact into the contacts array
+            if (contacts.length() < limit) {
+                contacts.put(populateContact(contact, organizations, addresses, phones,
+                        emails, ims, websites, photos));
+            }
+        }
+        c.close();
+        return contacts;
+    }
+
+    /**
+     * Builds a where clause all all the ids passed into the method
+     * @param contactIds a set of unique contact ids
+     * @param searchTerm what to search for
+     * @return an object containing the selection and selection args
+     */
+    private WhereOptions buildIdClause(Set<String> contactIds, String searchTerm) {
+        WhereOptions options = new WhereOptions();
+
+        // If the user is searching for every contact then short circuit the method
+        // and return a shorter where clause to be searched.
+        if (searchTerm.equals("%")) {
+            options.setWhere("(" + ContactsContract.Data.CONTACT_ID + " LIKE ? )");
+            options.setWhereArgs(new String[] { searchTerm });
+            return options;
+        }
+
+        // This clause means that there are specific ID's to be populated
+        Iterator<String> it = contactIds.iterator();
+        StringBuffer buffer = new StringBuffer("(");
+
+        while (it.hasNext()) {
+            buffer.append("'" + it.next() + "'");
+            if (it.hasNext()) {
+                buffer.append(",");
+            }
+        }
+        buffer.append(")");
+
+        options.setWhere(ContactsContract.Data.CONTACT_ID + " IN " + buffer.toString());
+        options.setWhereArgs(null);
+
+        return options;
+    }
+
+    /**
+     * Create a new contact using a JSONObject to hold all the data.
+     * @param contact
+     * @param organizations array of organizations
+     * @param addresses array of addresses
+     * @param phones array of phones
+     * @param emails array of emails
+     * @param ims array of instant messenger addresses
+     * @param websites array of websites
+     * @param photos
+     * @return
+     */
+    private JSONObject populateContact(JSONObject contact, JSONArray organizations,
+            JSONArray addresses, JSONArray phones, JSONArray emails,
+            JSONArray ims, JSONArray websites, JSONArray photos) {
+        try {
+            // Only return the array if it has at least one entry
+            if (organizations.length() > 0) {
+                contact.put("organizations", organizations);
+            }
+            if (addresses.length() > 0) {
+                contact.put("addresses", addresses);
+            }
+            if (phones.length() > 0) {
+                contact.put("phoneNumbers", phones);
+            }
+            if (emails.length() > 0) {
+                contact.put("emails", emails);
+            }
+            if (ims.length() > 0) {
+                contact.put("ims", ims);
+            }
+            if (websites.length() > 0) {
+                contact.put("urls", websites);
+            }
+            if (photos.length() > 0) {
+                contact.put("photos", photos);
+            }
+        } catch (JSONException e) {
+            Log.e(LOG_TAG, e.getMessage(), e);
+        }
+        return contact;
+    }
+
+  /**
+   * Take the search criteria passed into the method and create a SQL WHERE clause.
+   * @param fields the properties to search against
+   * @param searchTerm the string to search for
+   * @return an object containing the selection and selection args
+   */
+  private WhereOptions buildWhereClause(JSONArray fields, String searchTerm) {
+
+    ArrayList<String> where = new ArrayList<String>();
+    ArrayList<String> whereArgs = new ArrayList<String>();
+
+    WhereOptions options = new WhereOptions();
+
+        /*
+         * Special case where the user wants all fields returned
+         */
+        if (isWildCardSearch(fields)) {
+            // Get all contacts with all properties
+            if ("%".equals(searchTerm)) {
+                options.setWhere("(" + ContactsContract.Contacts.DISPLAY_NAME + " LIKE ? )");
+                options.setWhereArgs(new String[] { searchTerm });
+                return options;
+            } else {
+                // Get all contacts that match the filter but return all properties
+                where.add("(" + dbMap.get("displayName") + " LIKE ? )");
+                whereArgs.add(searchTerm);
+                where.add("(" + dbMap.get("name") + " LIKE ? AND "
+                        + ContactsContract.Data.MIMETYPE + " = ? )");
+                whereArgs.add(searchTerm);
+                whereArgs.add(ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE);
+                where.add("(" + dbMap.get("nickname") + " LIKE ? AND "
+                        + ContactsContract.Data.MIMETYPE + " = ? )");
+                whereArgs.add(searchTerm);
+                whereArgs.add(ContactsContract.CommonDataKinds.Nickname.CONTENT_ITEM_TYPE);
+                where.add("(" + dbMap.get("phoneNumbers") + " LIKE ? AND "
+                        + ContactsContract.Data.MIMETYPE + " = ? )");
+                whereArgs.add(searchTerm);
+                whereArgs.add(ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE);
+                where.add("(" + dbMap.get("emails") + " LIKE ? AND "
+                        + ContactsContract.Data.MIMETYPE + " = ? )");
+                whereArgs.add(searchTerm);
+                whereArgs.add(ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE);
+                where.add("(" + dbMap.get("addresses") + " LIKE ? AND "
+                        + ContactsContract.Data.MIMETYPE + " = ? )");
+                whereArgs.add(searchTerm);
+                whereArgs.add(ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE);
+                where.add("(" + dbMap.get("ims") + " LIKE ? AND "
+                        + ContactsContract.Data.MIMETYPE + " = ? )");
+                whereArgs.add(searchTerm);
+                whereArgs.add(ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE);
+                where.add("(" + dbMap.get("organizations") + " LIKE ? AND "
+                        + ContactsContract.Data.MIMETYPE + " = ? )");
+                whereArgs.add(searchTerm);
+                whereArgs.add(ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE);
+                where.add("(" + dbMap.get("note") + " LIKE ? AND "
+                        + ContactsContract.Data.MIMETYPE + " = ? )");
+                whereArgs.add(searchTerm);
+                whereArgs.add(ContactsContract.CommonDataKinds.Note.CONTENT_ITEM_TYPE);
+                where.add("(" + dbMap.get("urls") + " LIKE ? AND "
+                        + ContactsContract.Data.MIMETYPE + " = ? )");
+                whereArgs.add(searchTerm);
+                whereArgs.add(ContactsContract.CommonDataKinds.Website.CONTENT_ITEM_TYPE);
+            }
+        }
+
+        /*
+         * Special case for when the user wants all the contacts but
+         */
+        if ("%".equals(searchTerm)) {
+            options.setWhere("(" + ContactsContract.Contacts.DISPLAY_NAME + " LIKE ? )");
+            options.setWhereArgs(new String[] { searchTerm });
+            return options;
+        }
+
+        String key;
+        try {
+            //Log.d(LOG_TAG, "How many fields do we have = " + fields.length());
+            for (int i = 0; i < fields.length(); i++) {
+                key = fields.getString(i);
+
+                if (key.equals("id")) {
+                    where.add("(" + dbMap.get(key) + " = ? )");
+                    whereArgs.add(searchTerm.substring(1, searchTerm.length() - 1));
+                }
+                else if (key.startsWith("displayName")) {
+                    where.add("(" + dbMap.get(key) + " LIKE ? )");
+                    whereArgs.add(searchTerm);
+                }
+                else if (key.startsWith("name")) {
+                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
+                            + ContactsContract.Data.MIMETYPE + " = ? )");
+                    whereArgs.add(searchTerm);
+                    whereArgs.add(ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE);
+                }
+                else if (key.startsWith("nickname")) {
+                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
+                            + ContactsContract.Data.MIMETYPE + " = ? )");
+                    whereArgs.add(searchTerm);
+                    whereArgs.add(ContactsContract.CommonDataKinds.Nickname.CONTENT_ITEM_TYPE);
+                }
+                else if (key.startsWith("phoneNumbers")) {
+                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
+                            + ContactsContract.Data.MIMETYPE + " = ? )");
+                    whereArgs.add(searchTerm);
+                    whereArgs.add(ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE);
+                }
+                else if (key.startsWith("emails")) {
+                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
+                            + ContactsContract.Data.MIMETYPE + " = ? )");
+                    whereArgs.add(searchTerm);
+                    whereArgs.add(ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE);
+                }
+                else if (key.startsWith("addresses")) {
+                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
+                            + ContactsContract.Data.MIMETYPE + " = ? )");
+                    whereArgs.add(searchTerm);
+                    whereArgs.add(ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE);
+                }
+                else if (key.startsWith("ims")) {
+                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
+                            + ContactsContract.Data.MIMETYPE + " = ? )");
+                    whereArgs.add(searchTerm);
+                    whereArgs.add(ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE);
+                }
+                else if (key.startsWith("organizations")) {
+                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
+                            + ContactsContract.Data.MIMETYPE + " = ? )");
+                    whereArgs.add(searchTerm);
+                    whereArgs.add(ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE);
+                }
+                //        else if (key.startsWith("birthday")) {
+//          where.add("(" + dbMap.get(key) + " LIKE ? AND "
+//              + ContactsContract.Data.MIMETYPE + " = ? )");
+//        }
+                else if (key.startsWith("note")) {
+                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
+                            + ContactsContract.Data.MIMETYPE + " = ? )");
+                    whereArgs.add(searchTerm);
+                    whereArgs.add(ContactsContract.CommonDataKinds.Note.CONTENT_ITEM_TYPE);
+                }
+                else if (key.startsWith("urls")) {
+                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
+                            + ContactsContract.Data.MIMETYPE + " = ? )");
+                    whereArgs.add(searchTerm);
+                    whereArgs.add(ContactsContract.CommonDataKinds.Website.CONTENT_ITEM_TYPE);
+                }
+            }
+        } catch (JSONException e) {
+            Log.e(LOG_TAG, e.getMessage(), e);
+        }
+
+        // Creating the where string
+        StringBuffer selection = new StringBuffer();
+        for (int i = 0; i < where.size(); i++) {
+            selection.append(where.get(i));
+            if (i != (where.size() - 1)) {
+                selection.append(" OR ");
+            }
+        }
+        options.setWhere(selection.toString());
+
+        // Creating the where args array
+        String[] selectionArgs = new String[whereArgs.size()];
+        for (int i = 0; i < whereArgs.size(); i++) {
+            selectionArgs[i] = whereArgs.get(i);
+        }
+        options.setWhereArgs(selectionArgs);
+
+        return options;
+    }
+
+    /**
+     * If the user passes in the '*' wildcard character for search then they want all fields for each contact
+     *
+     * @param fields
+     * @return true if wildcard search requested, false otherwise
+     */
+    private boolean isWildCardSearch(JSONArray fields) {
+        // Only do a wildcard search if we are passed ["*"]
+        if (fields.length() == 1) {
+            try {
+                if ("*".equals(fields.getString(0))) {
+                    return true;
+                }
+            } catch (JSONException e) {
+                return false;
+            }
+        }
+        return false;
+    }
+
+    /**
+    * Create a ContactOrganization JSONObject
+    * @param cursor the current database row
+    * @return a JSONObject representing a ContactOrganization
+    */
+    private JSONObject organizationQuery(Cursor cursor) {
+        JSONObject organization = new JSONObject();
+        try {
+            organization.put("id", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Organization._ID)));
+            organization.put("pref", false); // Android does not store pref attribute
+            organization.put("type", getOrgType(cursor.getInt(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Organization.TYPE))));
+            organization.put("department", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Organization.DEPARTMENT)));
+            organization.put("name", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Organization.COMPANY)));
+            organization.put("title", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Organization.TITLE)));
+        } catch (JSONException e) {
+            Log.e(LOG_TAG, e.getMessage(), e);
+        }
+        return organization;
+    }
+
+    /**
+     * Create a ContactAddress JSONObject
+     * @param cursor the current database row
+     * @return a JSONObject representing a ContactAddress
+     */
+    private JSONObject addressQuery(Cursor cursor) {
+        JSONObject address = new JSONObject();
+        try {
+            address.put("id", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal._ID)));
+            address.put("pref", false); // Android does not store pref attribute
+            address.put("type", getAddressType(cursor.getInt(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Organization.TYPE))));
+            address.put("formatted", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS)));
+            address.put("streetAddress", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal.STREET)));
+            address.put("locality", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal.CITY)));
+            address.put("region", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal.REGION)));
+            address.put("postalCode", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal.POSTCODE)));
+            address.put("country", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal.COUNTRY)));
+        } catch (JSONException e) {
+            Log.e(LOG_TAG, e.getMessage(), e);
+        }
+        return address;
+    }
+
+    /**
+     * Create a ContactName JSONObject
+     * @param cursor the current database row
+     * @return a JSONObject representing a ContactName
+     */
+    private JSONObject nameQuery(Cursor cursor) {
+        JSONObject contactName = new JSONObject();
+        try {
+            String familyName = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME));
+            String givenName = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME));
+            String middleName = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredName.MIDDLE_NAME));
+            String honorificPrefix = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredName.PREFIX));
+            String honorificSuffix = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredName.SUFFIX));
+
+            // Create the formatted name
+            StringBuffer formatted = new StringBuffer("");
+            if (honorificPrefix != null) {
+                formatted.append(honorificPrefix + " ");
+            }
+            if (givenName != null) {
+                formatted.append(givenName + " ");
+            }
+            if (middleName != null) {
+                formatted.append(middleName + " ");
+            }
+            if (familyName != null) {
+                formatted.append(familyName);
+            }
+            if (honorificSuffix != null) {
+                formatted.append(" " + honorificSuffix);
+            }
+
+            contactName.put("familyName", familyName);
+            contactName.put("givenName", givenName);
+            contactName.put("middleName", middleName);
+            contactName.put("honorificPrefix", honorificPrefix);
+            contactName.put("honorificSuffix", honorificSuffix);
+            contactName.put("formatted", formatted);
+        } catch (JSONException e) {
+            Log.e(LOG_TAG, e.getMessage(), e);
+        }
+        return contactName;
+    }
+
+    /**
+     * Create a ContactField JSONObject
+     * @param cursor the current database row
+     * @return a JSONObject representing a ContactField
+     */
+    private JSONObject phoneQuery(Cursor cursor) {
+        JSONObject phoneNumber = new JSONObject();
+        try {
+            phoneNumber.put("id", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone._ID)));
+            phoneNumber.put("pref", false); // Android does not store pref attribute
+            phoneNumber.put("value", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER)));
+            phoneNumber.put("type", getPhoneType(cursor.getInt(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.TYPE))));
+        } catch (JSONException e) {
+            Log.e(LOG_TAG, e.getMessage(), e);
+        } catch (Exception excp) {
+            Log.e(LOG_TAG, excp.getMessage(), excp);
+        }
+        return phoneNumber;
+    }
+
+    /**
+     * Create a ContactField JSONObject
+     * @param cursor the current database row
+     * @return a JSONObject representing a ContactField
+     */
+    private JSONObject emailQuery(Cursor cursor) {
+        JSONObject email = new JSONObject();
+        try {
+            email.put("id", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Email._ID)));
+            email.put("pref", false); // Android does not store pref attribute
+            email.put("value", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Email.DATA)));
+            email.put("type", getContactType(cursor.getInt(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Email.TYPE))));
+        } catch (JSONException e) {
+            Log.e(LOG_TAG, e.getMessage(), e);
+        }
+        return email;
+    }
+
+    /**
+     * Create a ContactField JSONObject
+     * @param cursor the current database row
+     * @return a JSONObject representing a ContactField
+     */
+    private JSONObject imQuery(Cursor cursor) {
+        JSONObject im = new JSONObject();
+        try {
+            im.put("id", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Im._ID)));
+            im.put("pref", false); // Android does not store pref attribute
+            im.put("value", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Im.DATA)));
+            im.put("type", getImType(cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Im.PROTOCOL))));
+        } catch (JSONException e) {
+            Log.e(LOG_TAG, e.getMessage(), e);
+        }
+        return im;
+    }
+
+    /**
+     * Create a ContactField JSONObject
+     * @param cursor the current database row
+     * @return a JSONObject representing a ContactField
+     */
+    private JSONObject websiteQuery(Cursor cursor) {
+        JSONObject website = new JSONObject();
+        try {
+            website.put("id", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Website._ID)));
+            website.put("pref", false); // Android does not store pref attribute
+            website.put("value", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Website.URL)));
+            website.put("type", getContactType(cursor.getInt(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Website.TYPE))));
+        } catch (JSONException e) {
+            Log.e(LOG_TAG, e.getMessage(), e);
+        }
+        return website;
+    }
+
+    /**
+     * Create a ContactField JSONObject
+     * @param contactId
+     * @return a JSONObject representing a ContactField
+     */
+    private JSONObject photoQuery(Cursor cursor, String contactId) {
+        JSONObject photo = new JSONObject();
+        try {
+            photo.put("id", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Photo._ID)));
+            photo.put("pref", false);
+            photo.put("type", "url");
+            Uri person = ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI, (new Long(contactId)));
+            Uri photoUri = Uri.withAppendedPath(person, ContactsContract.Contacts.Photo.CONTENT_DIRECTORY);
+            photo.put("value", photoUri.toString());
+        } catch (JSONException e) {
+            Log.e(LOG_TAG, e.getMessage(), e);
+        }
+        return photo;
+    }
+
+    @Override
+    /**
+     * This method will save a contact object into the devices contacts database.
+     *
+     * @param contact the contact to be saved.
+     * @returns the id if the contact is successfully saved, null otherwise.
+     */
+    public String save(JSONObject contact) {
+        AccountManager mgr = AccountManager.get(mApp.getActivity());
+        Account[] accounts = mgr.getAccounts();
+        String accountName = null;
+        String accountType = null;
+
+        if (accounts.length == 1) {
+            accountName = accounts[0].name;
+            accountType = accounts[0].type;
+        }
+        else if (accounts.length > 1) {
+            for (Account a : accounts) {
+                if (a.type.contains("eas") && a.name.matches(EMAIL_REGEXP)) /*Exchange ActiveSync*/{
+                    accountName = a.name;
+                    accountType = a.type;
+                    break;
+                }
+            }
+            if (accountName == null) {
+                for (Account a : accounts) {
+                    if (a.type.contains("com.google") && a.name.matches(EMAIL_REGEXP)) /*Google sync provider*/{
+                        accountName = a.name;
+                        accountType = a.type;
+                        break;
+                    }
+                }
+            }
+            if (accountName == null) {
+                for (Account a : accounts) {
+                    if (a.name.matches(EMAIL_REGEXP)) /*Last resort, just look for an email address...*/{
+                        accountName = a.name;
+                        accountType = a.type;
+                        break;
+                    }
+                }
+            }
+        }
+
+        String id = getJsonString(contact, "id");
+        if (id == null) {
+            // Create new contact
+            return createNewContact(contact, accountType, accountName);
+        } else {
+            // Modify existing contact
+            return modifyContact(id, contact, accountType, accountName);
+        }
+    }
+
+    /**
+     * Creates a new contact and stores it in the database
+     *
+     * @param id the raw contact id which is required for linking items to the contact
+     * @param contact the contact to be saved
+     * @param account the account to be saved under
+     */
+    private String modifyContact(String id, JSONObject contact, String accountType, String accountName) {
+        // Get the RAW_CONTACT_ID which is needed to insert new values in an already existing contact.
+        // But not needed to update existing values.
+        int rawId = (new Integer(getJsonString(contact, "rawId"))).intValue();
+
+        // Create a list of attributes to add to the contact database
+        ArrayList<ContentProviderOperation> ops = new ArrayList<ContentProviderOperation>();
+
+        //Add contact type
+        ops.add(ContentProviderOperation.newUpdate(ContactsContract.RawContacts.CONTENT_URI)
+                .withValue(ContactsContract.RawContacts.ACCOUNT_TYPE, accountType)
+                .withValue(ContactsContract.RawContacts.ACCOUNT_NAME, accountName)
+                .build());
+
+        // Modify name
+        JSONObject name;
+        try {
+            String displayName = getJsonString(contact, "displayName");
+            name = contact.getJSONObject("name");
+            if (displayName != null || name != null) {
+                ContentProviderOperation.Builder builder = ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
+                        .withSelection(ContactsContract.Data.CONTACT_ID + "=? AND " +
+                                ContactsContract.Data.MIMETYPE + "=?",
+                                new String[] { id, ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE });
+
+                if (displayName != null) {
+                    builder.withValue(ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME, displayName);
+                }
+
+                String familyName = getJsonString(name, "familyName");
+                if (familyName != null) {
+                    builder.withValue(ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME, familyName);
+                }
+                String middleName = getJsonString(name, "middleName");
+                if (middleName != null) {
+                    builder.withValue(ContactsContract.CommonDataKinds.StructuredName.MIDDLE_NAME, middleName);
+                }
+                String givenName = getJsonString(name, "givenName");
+                if (givenName != null) {
+                    builder.withValue(ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME, givenName);
+                }
+                String honorificPrefix = getJsonString(name, "honorificPrefix");
+                if (honorificPrefix != null) {
+                    builder.withValue(ContactsContract.CommonDataKinds.StructuredName.PREFIX, honorificPrefix);
+                }
+                String honorificSuffix = getJsonString(name, "honorificSuffix");
+                if (honorificSuffix != null) {
+                    builder.withValue(ContactsContract.CommonDataKinds.StructuredName.SUFFIX, honorificSuffix);
+                }
+
+                ops.add(builder.build());
+            }
+        } catch (JSONException e1) {
+            Log.d(LOG_TAG, "Could not get name");
+        }
+
+        // Modify phone numbers
+        JSONArray phones = null;
+        try {
+            phones = contact.getJSONArray("phoneNumbers");
+            if (phones != null) {
+                // Delete all the phones
+                if (phones.length() == 0) {
+                    ops.add(ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI)
+                            .withSelection(ContactsContract.Data.RAW_CONTACT_ID + "=? AND " +
+                                    ContactsContract.Data.MIMETYPE + "=?",
+                                    new String[] { "" + rawId, ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE })
+                            .build());
+                }
+                // Modify or add a phone
+                else {
+                    for (int i = 0; i < phones.length(); i++) {
+                        JSONObject phone = (JSONObject) phones.get(i);
+                        String phoneId = getJsonString(phone, "id");
+                        // This is a new phone so do a DB insert
+                        if (phoneId == null) {
+                            ContentValues contentValues = new ContentValues();
+                            contentValues.put(ContactsContract.Data.RAW_CONTACT_ID, rawId);
+                            contentValues.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE);
+                            contentValues.put(ContactsContract.CommonDataKinds.Phone.NUMBER, getJsonString(phone, "value"));
+                            contentValues.put(ContactsContract.CommonDataKinds.Phone.TYPE, getPhoneType(getJsonString(phone, "type")));
+
+                            ops.add(ContentProviderOperation.newInsert(
+                                    ContactsContract.Data.CONTENT_URI).withValues(contentValues).build());
+                        }
+                        // This is an existing phone so do a DB update
+                        else {
+                            ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
+                                    .withSelection(ContactsContract.CommonDataKinds.Phone._ID + "=? AND " +
+                                            ContactsContract.Data.MIMETYPE + "=?",
+                                            new String[] { phoneId, ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE })
+                                    .withValue(ContactsContract.CommonDataKinds.Phone.NUMBER, getJsonString(phone, "value"))
+                                    .withValue(ContactsContract.CommonDataKinds.Phone.TYPE, getPhoneType(getJsonString(phone, "type")))
+                                    .build());
+                        }
+                    }
+                }
+            }
+        } catch (JSONException e) {
+            Log.d(LOG_TAG, "Could not get phone numbers");
+        }
+
+        // Modify emails
+        JSONArray emails = null;
+        try {
+            emails = contact.getJSONArray("emails");
+            if (emails != null) {
+                // Delete all the emails
+                if (emails.length() == 0) {
+                    ops.add(ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI)
+                            .withSelection(ContactsContract.Data.RAW_CONTACT_ID + "=? AND " +
+                                    ContactsContract.Data.MIMETYPE + "=?",
+                                    new String[] { "" + rawId, ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE })
+                            .build());
+                }
+                // Modify or add a email
+                else {
+                    for (int i = 0; i < emails.length(); i++) {
+                        JSONObject email = (JSONObject) emails.get(i);
+                        String emailId = getJsonString(email, "id");
+                        // This is a new email so do a DB insert
+                        if (emailId == null) {
+                            ContentValues contentValues = new ContentValues();
+                            contentValues.put(ContactsContract.Data.RAW_CONTACT_ID, rawId);
+                            contentValues.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE);
+                            contentValues.put(ContactsContract.CommonDataKinds.Email.DATA, getJsonString(email, "value"));
+                            contentValues.put(ContactsContract.CommonDataKinds.Email.TYPE, getContactType(getJsonString(email, "type")));
+
+                            ops.add(ContentProviderOperation.newInsert(
+                                    ContactsContract.Data.CONTENT_URI).withValues(contentValues).build());
+                        }
+                        // This is an existing email so do a DB update
+                        else {
+                        	String emailValue=getJsonString(email, "value");
+                        	if(!emailValue.isEmpty()) {
+                                ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
+                                    .withSelection(ContactsContract.CommonDataKinds.Email._ID + "=? AND " +
+                                            ContactsContract.Data.MIMETYPE + "=?",
+                                            new String[] { emailId, ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE })
+                                    .withValue(ContactsContract.CommonDataKinds.Email.DATA, getJsonString(email, "value"))
+                                    .withValue(ContactsContract.CommonDataKinds.Email.TYPE, getContactType(getJsonString(email, "type")))
+                                    .build());
+                        	} else {
+                                ops.add(ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI)
+                                        .withSelection(ContactsContract.CommonDataKinds.Email._ID + "=? AND " +
+                                                ContactsContract.Data.MIMETYPE + "=?",
+                                                new String[] { emailId, ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE })
+                                        .build());
+                        	}
+                        }
+                    }
+                }
+            }
+        } catch (JSONException e) {
+            Log.d(LOG_TAG, "Could not get emails");
+        }
+
+        // Modify addresses
+        JSONArray addresses = null;
+        try {
+            addresses = contact.getJSONArray("addresses");
+            if (addresses != null) {
+                // Delete all the addresses
+                if (addresses.length() == 0) {
+                    ops.add(ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI)
+                            .withSelection(ContactsContract.Data.RAW_CONTACT_ID + "=? AND " +
+                                    ContactsContract.Data.MIMETYPE + "=?",
+                                    new String[] { "" + rawId, ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE })
+                            .build());
+                }
+                // Modify or add a address
+                else {
+                    for (int i = 0; i < addresses.length(); i++) {
+                        JSONObject address = (JSONObject) addresses.get(i);
+                        String addressId = getJsonString(address, "id");
+                        // This is a new address so do a DB insert
+                        if (addressId == null) {
+                            ContentValues contentValues = new ContentValues();
+                            contentValues.put(ContactsContract.Data.RAW_CONTACT_ID, rawId);
+                            contentValues.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE);
+                            contentValues.put(ContactsContract.CommonDataKinds.StructuredPostal.TYPE, getAddressType(getJsonString(address, "type")));
+                            contentValues.put(ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS, getJsonString(address, "formatted"));
+                            contentValues.put(ContactsContract.CommonDataKinds.StructuredPostal.STREET, getJsonString(address, "streetAddress"));
+                            contentValues.put(ContactsContract.CommonDataKinds.StructuredPostal.CITY, getJsonString(address, "locality"));
+                            contentValues.put(ContactsContract.CommonDataKinds.StructuredPostal.REGION, getJsonString(address, "region"));
+                            contentValues.put(ContactsContract.CommonDataKinds.StructuredPostal.POSTCODE, getJsonString(address, "postalCode"));
+                            contentValues.put(ContactsContract.CommonDataKinds.StructuredPostal.COUNTRY, getJsonString(address, "country"));
+
+                            ops.add(ContentProviderOperation.newInsert(
+                                    ContactsContract.Data.CONTENT_URI).withValues(contentValues).build());
+                        }
+                        // This is an existing address so do a DB update
+                        else {
+                            ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
+                                    .withSelection(ContactsContract.CommonDataKinds.StructuredPostal._ID + "=? AND " +
+                                            ContactsContract.Data.MIMETYPE + "=?",
+                                            new String[] { addressId, ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE })
+                                    .withValue(ContactsContract.CommonDataKinds.StructuredPostal.TYPE, getAddressType(getJsonString(address, "type")))
+                                    .withValue(ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS, getJsonString(address, "formatted"))
+                                    .withValue(ContactsContract.CommonDataKinds.StructuredPostal.STREET, getJsonString(address, "streetAddress"))
+                                    .withValue(ContactsContract.CommonDataKinds.StructuredPostal.CITY, getJsonString(address, "locality"))
+                                    .withValue(ContactsContract.CommonDataKinds.StructuredPostal.REGION, getJsonString(address, "region"))
+                                    .withValue(ContactsContract.CommonDataKinds.StructuredPostal.POSTCODE, getJsonString(address, "postalCode"))
+                                    .withValue(ContactsContract.CommonDataKinds.StructuredPostal.COUNTRY, getJsonString(address, "country"))
+                                    .build());
+                        }
+                    }
+                }
+            }
+        } catch (JSONException e) {
+            Log.d(LOG_TAG, "Could not get addresses");
+        }
+
+        // Modify organizations
+        JSONArray organizations = null;
+        try {
+            organizations = contact.getJSONArray("organizations");
+            if (organizations != null) {
+                // Delete all the organizations
+                if (organizations.length() == 0) {
+                    ops.add(ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI)
+                            .withSelection(ContactsContract.Data.RAW_CONTACT_ID + "=? AND " +
+                                    ContactsContract.Data.MIMETYPE + "=?",
+                                    new String[] { "" + rawId, ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE })
+                            .build());
+                }
+                // Modify or add a organization
+                else {
+                    for (int i = 0; i < organizations.length(); i++) {
+                        JSONObject org = (JSONObject) organizations.get(i);
+                        String orgId = getJsonString(org, "id");
+                        // This is a new organization so do a DB insert
+                        if (orgId == null) {
+                            ContentValues contentValues = new ContentValues();
+                            contentValues.put(ContactsContract.Data.RAW_CONTACT_ID, rawId);
+                            contentValues.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE);
+                            contentValues.put(ContactsContract.CommonDataKinds.Organization.TYPE, getOrgType(getJsonString(org, "type")));
+                            contentValues.put(ContactsContract.CommonDataKinds.Organization.DEPARTMENT, getJsonString(org, "department"));
+                            contentValues.put(ContactsContract.CommonDataKinds.Organization.COMPANY, getJsonString(org, "name"));
+                            contentValues.put(ContactsContract.CommonDataKinds.Organization.TITLE, getJsonString(org, "title"));
+
+                            ops.add(ContentProviderOperation.newInsert(
+                                    ContactsContract.Data.CONTENT_URI).withValues(contentValues).build());
+                        }
+                        // This is an existing organization so do a DB update
+                        else {
+                            ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
+                                    .withSelection(ContactsContract.CommonDataKinds.Organization._ID + "=? AND " +
+                                            ContactsContract.Data.MIMETYPE + "=?",
+                                            new String[] { orgId, ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE })
+                                    .withValue(ContactsContract.CommonDataKinds.Organization.TYPE, getOrgType(getJsonString(org, "type")))
+                                    .withValue(ContactsContract.CommonDataKinds.Organization.DEPARTMENT, getJsonString(org, "department"))
+                                    .withValue(ContactsContract.CommonDataKinds.Organization.COMPANY, getJsonString(org, "name"))
+                                    .withValue(ContactsContract.CommonDataKinds.Organization.TITLE, getJsonString(org, "title"))
+                                    .build());
+                        }
+                    }
+                }
+            }
+        } catch (JSONException e) {
+            Log.d(LOG_TAG, "Could not get organizations");
+        }
+
+        // Modify IMs
+        JSONArray ims = null;
+        try {
+            ims = contact.getJSONArray("ims");
+            if (ims != null) {
+                // Delete all the ims
+                if (ims.length() == 0) {
+                    ops.add(ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI)
+                            .withSelection(ContactsContract.Data.RAW_CONTACT_ID + "=? AND " +
+                                    ContactsContract.Data.MIMETYPE + "=?",
+                                    new String[] { "" + rawId, ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE })
+                            .build());
+                }
+                // Modify or add a im
+                else {
+                    for (int i = 0; i < ims.length(); i++) {
+                        JSONObject im = (JSONObject) ims.get(i);
+                        String imId = getJsonString(im, "id");
+                        // This is a new IM so do a DB insert
+                        if (imId == null) {
+                            ContentValues contentValues = new ContentValues();
+                            contentValues.put(ContactsContract.Data.RAW_CONTACT_ID, rawId);
+                            contentValues.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE);
+                            contentValues.put(ContactsContract.CommonDataKinds.Im.DATA, getJsonString(im, "value"));
+                            contentValues.put(ContactsContract.CommonDataKinds.Im.TYPE, getImType(getJsonString(im, "type")));
+
+                            ops.add(ContentProviderOperation.newInsert(
+                                    ContactsContract.Data.CONTENT_URI).withValues(contentValues).build());
+                        }
+                        // This is an existing IM so do a DB update
+                        else {
+                            ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
+                                    .withSelection(ContactsContract.CommonDataKinds.Im._ID + "=? AND " +
+                                            ContactsContract.Data.MIMETYPE + "=?",
+                                            new String[] { imId, ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE })
+                                    .withValue(ContactsContract.CommonDataKinds.Im.DATA, getJsonString(im, "value"))
+                                    .withValue(ContactsContract.CommonDataKinds.Im.TYPE, getContactType(getJsonString(im, "type")))
+                                    .build());
+                        }
+                    }
+                }
+            }
+        } catch (JSONException e) {
+            Log.d(LOG_TAG, "Could not get emails");
+        }
+
+        // Modify note
+        String note = getJsonString(contact, "note");
+        ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
+                .withSelection(ContactsContract.Data.CONTACT_ID + "=? AND " +
+                        ContactsContract.Data.MIMETYPE + "=?",
+                        new String[] { id, ContactsContract.CommonDataKinds.Note.CONTENT_ITEM_TYPE })
+                .withValue(ContactsContract.CommonDataKinds.Note.NOTE, note)
+                .build());
+
+        // Modify nickname
+        String nickname = getJsonString(contact, "nickname");
+        if (nickname != null) {
+            ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
+                    .withSelection(ContactsContract.Data.CONTACT_ID + "=? AND " +
+                            ContactsContract.Data.MIMETYPE + "=?",
+                            new String[] { id, ContactsContract.CommonDataKinds.Nickname.CONTENT_ITEM_TYPE })
+                    .withValue(ContactsContract.CommonDataKinds.Nickname.NAME, nickname)
+                    .build());
+        }
+
+        // Modify urls
+        JSONArray websites = null;
+        try {
+            websites = contact.getJSONArray("urls");
+            if (websites != null) {
+                // Delete all the websites
+                if (websites.length() == 0) {
+                    Log.d(LOG_TAG, "This means we should be deleting all the phone numbers.");
+                    ops.add(ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI)
+                            .withSelection(ContactsContract.Data.RAW_CONTACT_ID + "=? AND " +
+                                    ContactsContract.Data.MIMETYPE + "=?",
+                                    new String[] { "" + rawId, ContactsContract.CommonDataKinds.Website.CONTENT_ITEM_TYPE })
+                            .build());
+                }
+                // Modify or add a website
+                else {
+                    for (int i = 0; i < websites.length(); i++) {
+                        JSONObject website = (JSONObject) websites.get(i);
+                        String websiteId = getJsonString(website, "id");
+                        // This is a new website so do a DB insert
+                        if (websiteId == null) {
+                            ContentValues contentValues = new ContentValues();
+                            contentValues.put(ContactsContract.Data.RAW_CONTACT_ID, rawId);
+                            contentValues.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Website.CONTENT_ITEM_TYPE);
+                            contentValues.put(ContactsContract.CommonDataKinds.Website.DATA, getJsonString(website, "value"));
+                            contentValues.put(ContactsContract.CommonDataKinds.Website.TYPE, getContactType(getJsonString(website, "type")));
+
+                            ops.add(ContentProviderOperation.newInsert(
+                                    ContactsContract.Data.CONTENT_URI).withValues(contentValues).build());
+                        }
+                        // This is an existing website so do a DB update
+                        else {
+                            ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
+                                    .withSelection(ContactsContract.CommonDataKinds.Website._ID + "=? AND " +
+                                            ContactsContract.Data.MIMETYPE + "=?",
+                                            new String[] { websiteId, ContactsContract.CommonDataKinds.Website.CONTENT_ITEM_TYPE })
+                                    .withValue(ContactsContract.CommonDataKinds.Website.DATA, getJsonString(website, "value"))
+                                    .withValue(ContactsContract.CommonDataKinds.Website.TYPE, getContactType(getJsonString(website, "type")))
+                                    .build());
+                        }
+                    }
+                }
+            }
+        } catch (JSONException e) {
+            Log.d(LOG_TAG, "Could not get websites");
+        }
+
+        // Modify birthday
+        String birthday = getJsonString(contact, "birthday");
+        if (birthday != null) {
+            ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
+                    .withSelection(ContactsContract.Data.CONTACT_ID + "=? AND " +
+                            ContactsContract.Data.MIMETYPE + "=? AND " +
+                            ContactsContract.CommonDataKinds.Event.TYPE + "=?",
+                            new String[] { id, ContactsContract.CommonDataKinds.Event.CONTENT_ITEM_TYPE, new String("" + ContactsContract.CommonDataKinds.Event.TYPE_BIRTHDAY) })
+                    .withValue(ContactsContract.CommonDataKinds.Event.TYPE, ContactsContract.CommonDataKinds.Event.TYPE_BIRTHDAY)
+                    .withValue(ContactsContract.CommonDataKinds.Event.START_DATE, birthday)
+                    .build());
+        }
+
+        // Modify photos
+        JSONArray photos = null;
+        try {
+            photos = contact.getJSONArray("photos");
+            if (photos != null) {
+                // Delete all the photos
+                if (photos.length() == 0) {
+                    ops.add(ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI)
+                            .withSelection(ContactsContract.Data.RAW_CONTACT_ID + "=? AND " +
+                                    ContactsContract.Data.MIMETYPE + "=?",
+                                    new String[] { "" + rawId, ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE })
+                            .build());
+                }
+                // Modify or add a photo
+                else {
+                    for (int i = 0; i < photos.length(); i++) {
+                        JSONObject photo = (JSONObject) photos.get(i);
+                        String photoId = getJsonString(photo, "id");
+                        byte[] bytes = getPhotoBytes(getJsonString(photo, "value"));
+                        // This is a new photo so do a DB insert
+                        if (photoId == null) {
+                            ContentValues contentValues = new ContentValues();
+                            contentValues.put(ContactsContract.Data.RAW_CONTACT_ID, rawId);
+                            contentValues.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE);
+                            contentValues.put(ContactsContract.Data.IS_SUPER_PRIMARY, 1);
+                            contentValues.put(ContactsContract.CommonDataKinds.Photo.PHOTO, bytes);
+
+                            ops.add(ContentProviderOperation.newInsert(
+                                    ContactsContract.Data.CONTENT_URI).withValues(contentValues).build());
+                        }
+                        // This is an existing photo so do a DB update
+                        else {
+                            ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
+                                    .withSelection(ContactsContract.CommonDataKinds.Photo._ID + "=? AND " +
+                                            ContactsContract.Data.MIMETYPE + "=?",
+                                            new String[] { photoId, ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE })
+                                    .withValue(ContactsContract.Data.IS_SUPER_PRIMARY, 1)
+                                    .withValue(ContactsContract.CommonDataKinds.Photo.PHOTO, bytes)
+                                    .build());
+                        }
+                    }
+                }
+            }
+        } catch (JSONException e) {
+            Log.d(LOG_TAG, "Could not get photos");
+        }
+
+        boolean retVal = true;
+
+        //Modify contact
+        try {
+            mApp.getActivity().getContentResolver().applyBatch(ContactsContract.AUTHORITY, ops);
+        } catch (RemoteException e) {
+            Log.e(LOG_TAG, e.getMessage(), e);
+            Log.e(LOG_TAG, Log.getStackTraceString(e), e);
+            retVal = false;
+        } catch (OperationApplicationException e) {
+            Log.e(LOG_TAG, e.getMessage(), e);
+            Log.e(LOG_TAG, Log.getStackTraceString(e), e);
+            retVal = false;
+        }
+
+        // if the save was a success return the contact ID
+        if (retVal) {
+            return id;
+        } else {
+            return null;
+        }
+    }
+
+    /**
+     * Add a website to a list of database actions to be performed
+     *
+     * @param ops the list of database actions
+     * @param website the item to be inserted
+     */
+    private void insertWebsite(ArrayList<ContentProviderOperation> ops,
+            JSONObject website) {
+        ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
+                .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
+                .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Website.CONTENT_ITEM_TYPE)
+                .withValue(ContactsContract.CommonDataKinds.Website.DATA, getJsonString(website, "value"))
+                .withValue(ContactsContract.CommonDataKinds.Website.TYPE, getContactType(getJsonString(website, "type")))
+                .build());
+    }
+
+    /**
+     * Add an im to a list of database actions to be performed
+     *
+     * @param ops the list of database actions
+     * @param im the item to be inserted
+     */
+    private void insertIm(ArrayList<ContentProviderOperation> ops, JSONObject im) {
+        ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
+                .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
+                .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE)
+                .withValue(ContactsContract.CommonDataKinds.Im.DATA, getJsonString(im, "value"))
+                .withValue(ContactsContract.CommonDataKinds.Im.TYPE, getImType(getJsonString(im, "type")))
+                .build());
+    }
+
+    /**
+     * Add an organization to a list of database actions to be performed
+     *
+     * @param ops the list of database actions
+     * @param org the item to be inserted
+     */
+    private void insertOrganization(ArrayList<ContentProviderOperation> ops,
+            JSONObject org) {
+        ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
+                .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
+                .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE)
+                .withValue(ContactsContract.CommonDataKinds.Organization.TYPE, getOrgType(getJsonString(org, "type")))
+                .withValue(ContactsContract.CommonDataKinds.Organization.DEPARTMENT, getJsonString(org, "department"))
+                .withValue(ContactsContract.CommonDataKinds.Organization.COMPANY, getJsonString(org, "name"))
+                .withValue(ContactsContract.CommonDataKinds.Organization.TITLE, getJsonString(org, "title"))
+                .build());
+    }
+
+    /**
+     * Add an address to a list of database actions to be performed
+     *
+     * @param ops the list of database actions
+     * @param address the item to be inserted
+     */
+    private void insertAddress(ArrayList<ContentProviderOperation> ops,
+            JSONObject address) {
+        ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
+                .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
+                .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE)
+                .withValue(ContactsContract.CommonDataKinds.StructuredPostal.TYPE, getAddressType(getJsonString(address, "type")))
+                .withValue(ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS, getJsonString(address, "formatted"))
+                .withValue(ContactsContract.CommonDataKinds.StructuredPostal.STREET, getJsonString(address, "streetAddress"))
+                .withValue(ContactsContract.CommonDataKinds.StructuredPostal.CITY, getJsonString(address, "locality"))
+                .withValue(ContactsContract.CommonDataKinds.StructuredPostal.REGION, getJsonString(address, "region"))
+                .withValue(ContactsContract.CommonDataKinds.StructuredPostal.POSTCODE, getJsonString(address, "postalCode"))
+                .withValue(ContactsContract.CommonDataKinds.StructuredPostal.COUNTRY, getJsonString(address, "country"))
+                .build());
+    }
+
+    /**
+     * Add an email to a list of database actions to be performed
+     *
+     * @param ops the list of database actions
+     * @param email the item to be inserted
+     */
+    private void insertEmail(ArrayList<ContentProviderOperation> ops,
+            JSONObject email) {
+        ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
+                .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
+                .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE)
+                .withValue(ContactsContract.CommonDataKinds.Email.DATA, getJsonString(email, "value"))
+                .withValue(ContactsContract.CommonDataKinds.Email.TYPE, getContactType(getJsonString(email, "type")))
+                .build());
+    }
+
+    /**
+     * Add a phone to a list of database actions to be performed
+     *
+     * @param ops the list of database actions
+     * @param phone the item to be inserted
+     */
+    private void insertPhone(ArrayList<ContentProviderOperation> ops,
+            JSONObject phone) {
+        ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
+                .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
+                .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE)
+                .withValue(ContactsContract.CommonDataKinds.Phone.NUMBER, getJsonString(phone, "value"))
+                .withValue(ContactsContract.CommonDataKinds.Phone.TYPE, getPhoneType(getJsonString(phone, "type")))
+                .build());
+    }
+
+    /**
+     * Add a phone to a list of database actions to be performed
+     *
+     * @param ops the list of database actions
+     * @param phone the item to be inserted
+     */
+    private void insertPhoto(ArrayList<ContentProviderOperation> ops,
+            JSONObject photo) {
+        byte[] bytes = getPhotoBytes(getJsonString(photo, "value"));
+        ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
+                .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
+                .withValue(ContactsContract.Data.IS_SUPER_PRIMARY, 1)
+                .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE)
+                .withValue(ContactsContract.CommonDataKinds.Photo.PHOTO, bytes)
+                .build());
+    }
+
+    /**
+     * Gets the raw bytes from the supplied filename
+     *
+     * @param filename the file to read the bytes from
+     * @return a byte array
+     * @throws IOException
+     */
+    private byte[] getPhotoBytes(String filename) {
+        ByteArrayOutputStream buffer = new ByteArrayOutputStream();
+        try {
+            int bytesRead = 0;
+            long totalBytesRead = 0;
+            byte[] data = new byte[8192];
+            InputStream in = getPathFromUri(filename);
+
+            while ((bytesRead = in.read(data, 0, data.length)) != -1 && totalBytesRead <= MAX_PHOTO_SIZE) {
+                buffer.write(data, 0, bytesRead);
+                totalBytesRead += bytesRead;
+            }
+
+            in.close();
+            buffer.flush();
+        } catch (FileNotFoundException e) {
+            Log.e(LOG_TAG, e.getMessage(), e);
+        } catch (IOException e) {
+            Log.e(LOG_TAG, e.getMessage(), e);
+        }
+        return buffer.toByteArray();
+    }
+
+    /**
+       * Get an input stream based on file path or uri content://, http://, file://
+       *
+       * @param path
+       * @return an input stream
+     * @throws IOException
+       */
+    private InputStream getPathFromUri(String path) throws IOException {
+        if (path.startsWith("content:")) {
+            Uri uri = Uri.parse(path);
+            return mApp.getActivity().getContentResolver().openInputStream(uri);
+        }
+        if (path.startsWith("http:") || path.startsWith("https:") || path.startsWith("file:")) {
+            URL url = new URL(path);
+            return url.openStream();
+        }
+        else {
+            return new FileInputStream(path);
+        }
+    }
+
+    /**
+     * Creates a new contact and stores it in the database
+     *
+     * @param contact the contact to be saved
+     * @param account the account to be saved under
+     */
+    private String createNewContact(JSONObject contact, String accountType, String accountName) {
+        // Create a list of attributes to add to the contact database
+        ArrayList<ContentProviderOperation> ops = new ArrayList<ContentProviderOperation>();
+
+        //Add contact type
+        ops.add(ContentProviderOperation.newInsert(ContactsContract.RawContacts.CONTENT_URI)
+                .withValue(ContactsContract.RawContacts.ACCOUNT_TYPE, accountType)
+                .withValue(ContactsContract.RawContacts.ACCOUNT_NAME, accountName)
+                .build());
+
+        // Add name
+        try {
+            JSONObject name = contact.optJSONObject("name");
+            String displayName = contact.getString("displayName");
+            if (displayName != null || name != null) {
+                ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
+                        .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
+                        .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE)
+                        .withValue(ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME, displayName)
+                        .withValue(ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME, getJsonString(name, "familyName"))
+                        .withValue(ContactsContract.CommonDataKinds.StructuredName.MIDDLE_NAME, getJsonString(name, "middleName"))
+                        .withValue(ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME, getJsonString(name, "givenName"))
+                        .withValue(ContactsContract.CommonDataKinds.StructuredName.PREFIX, getJsonString(name, "honorificPrefix"))
+                        .withValue(ContactsContract.CommonDataKinds.StructuredName.SUFFIX, getJsonString(name, "honorificSuffix"))
+                        .build());
+            }
+        } catch (JSONException e) {
+            Log.d(LOG_TAG, "Could not get name object");
+        }
+
+        //Add phone numbers
+        JSONArray phones = null;
+        try {
+            phones = contact.getJSONArray("phoneNumbers");
+            if (phones != null) {
+                for (int i = 0; i < phones.length(); i++) {
+                    JSONObject phone = (JSONObject) phones.get(i);
+                    insertPhone(ops, phone);
+                }
+            }
+        } catch (JSONException e) {
+            Log.d(LOG_TAG, "Could not get phone numbers");
+        }
+
+        // Add emails
+        JSONArray emails = null;
+        try {
+            emails = contact.getJSONArray("emails");
+            if (emails != null) {
+                for (int i = 0; i < emails.length(); i++) {
+                    JSONObject email = (JSONObject) emails.get(i);
+                    insertEmail(ops, email);
+                }
+            }
+        } catch (JSONException e) {
+            Log.d(LOG_TAG, "Could not get emails");
+        }
+
+        // Add addresses
+        JSONArray addresses = null;
+        try {
+            addresses = contact.getJSONArray("addresses");
+            if (addresses != null) {
+                for (int i = 0; i < addresses.length(); i++) {
+                    JSONObject address = (JSONObject) addresses.get(i);
+                    insertAddress(ops, address);
+                }
+            }
+        } catch (JSONException e) {
+            Log.d(LOG_TAG, "Could not get addresses");
+        }
+
+        // Add organizations
+        JSONArray organizations = null;
+        try {
+            organizations = contact.getJSONArray("organizations");
+            if (organizations != null) {
+                for (int i = 0; i < organizations.length(); i++) {
+                    JSONObject org = (JSONObject) organizations.get(i);
+                    insertOrganization(ops, org);
+                }
+            }
+        } catch (JSONException e) {
+            Log.d(LOG_TAG, "Could not get organizations");
+        }
+
+        // Add IMs
+        JSONArray ims = null;
+        try {
+            ims = contact.getJSONArray("ims");
+            if (ims != null) {
+                for (int i = 0; i < ims.length(); i++) {
+                    JSONObject im = (JSONObject) ims.get(i);
+                    insertIm(ops, im);
+                }
+            }
+        } catch (JSONEx

<TRUNCATED>

[64/70] Remove all cordova-lib files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContact.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContact.m b/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContact.m
deleted file mode 100644
index 82704ea..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContact.m
+++ /dev/null
@@ -1,1752 +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.
- */
-
-#import "CDVContact.h"
-#import <Cordova/NSDictionary+Extensions.h>
-
-#define DATE_OR_NULL(dateObj) ((aDate != nil) ? (id)([aDate descriptionWithLocale:[NSLocale currentLocale]]) : (id)([NSNull null]))
-#define IS_VALID_VALUE(value) ((value != nil) && (![value isKindOfClass:[NSNull class]]))
-
-static NSDictionary* org_apache_cordova_contacts_W3CtoAB = nil;
-static NSDictionary* org_apache_cordova_contacts_ABtoW3C = nil;
-static NSSet* org_apache_cordova_contacts_W3CtoNull = nil;
-static NSDictionary* org_apache_cordova_contacts_objectAndProperties = nil;
-static NSDictionary* org_apache_cordova_contacts_defaultFields = nil;
-
-@implementation CDVContact : NSObject
-
-                             @synthesize returnFields;
-
-- (id)init
-{
-    if ((self = [super init]) != nil) {
-        ABRecordRef rec = ABPersonCreate();
-        self.record = rec;
-        if (rec) {
-            CFRelease(rec);
-        }
-    }
-    return self;
-}
-
-- (id)initFromABRecord:(ABRecordRef)aRecord
-{
-    if ((self = [super init]) != nil) {
-        self.record = aRecord;
-    }
-    return self;
-}
-
-/* synthesize 'record' ourselves to have retain properties for CF types */
-
-- (void)setRecord:(ABRecordRef)aRecord
-{
-    if (record != NULL) {
-        CFRelease(record);
-    }
-    if (aRecord != NULL) {
-        record = CFRetain(aRecord);
-    }
-}
-
-- (ABRecordRef)record
-{
-    return record;
-}
-
-/* Rather than creating getters and setters for each AddressBook (AB) Property, generic methods are used to deal with
- * simple properties,  MultiValue properties( phone numbers and emails) and MultiValueDictionary properties (Ims and addresses).
- * The dictionaries below are used to translate between the W3C identifiers and the AB properties.   Using the dictionaries,
- * allows looping through sets of properties to extract from or set into the W3C dictionary to/from the ABRecord.
- */
-
-/* The two following dictionaries translate between W3C properties and AB properties.  It currently mixes both
- * Properties (kABPersonAddressProperty for example) and Strings (kABPersonAddressStreetKey) so users should be aware of
- * what types of values are expected.
- * a bit.
-*/
-+ (NSDictionary*)defaultABtoW3C
-{
-    if (org_apache_cordova_contacts_ABtoW3C == nil) {
-        org_apache_cordova_contacts_ABtoW3C = [NSDictionary dictionaryWithObjectsAndKeys:
-            kW3ContactNickname, [NSNumber numberWithInt:kABPersonNicknameProperty],
-            kW3ContactGivenName, [NSNumber numberWithInt:kABPersonFirstNameProperty],
-            kW3ContactFamilyName, [NSNumber numberWithInt:kABPersonLastNameProperty],
-            kW3ContactMiddleName, [NSNumber numberWithInt:kABPersonMiddleNameProperty],
-            kW3ContactHonorificPrefix, [NSNumber numberWithInt:kABPersonPrefixProperty],
-            kW3ContactHonorificSuffix, [NSNumber numberWithInt:kABPersonSuffixProperty],
-            kW3ContactPhoneNumbers, [NSNumber numberWithInt:kABPersonPhoneProperty],
-            kW3ContactAddresses, [NSNumber numberWithInt:kABPersonAddressProperty],
-            kW3ContactStreetAddress, kABPersonAddressStreetKey,
-            kW3ContactLocality, kABPersonAddressCityKey,
-            kW3ContactRegion, kABPersonAddressStateKey,
-            kW3ContactPostalCode, kABPersonAddressZIPKey,
-            kW3ContactCountry, kABPersonAddressCountryKey,
-            kW3ContactEmails, [NSNumber numberWithInt:kABPersonEmailProperty],
-            kW3ContactIms, [NSNumber numberWithInt:kABPersonInstantMessageProperty],
-            kW3ContactOrganizations, [NSNumber numberWithInt:kABPersonOrganizationProperty],
-            kW3ContactOrganizationName, [NSNumber numberWithInt:kABPersonOrganizationProperty],
-            kW3ContactTitle, [NSNumber numberWithInt:kABPersonJobTitleProperty],
-            kW3ContactDepartment, [NSNumber numberWithInt:kABPersonDepartmentProperty],
-            kW3ContactBirthday, [NSNumber numberWithInt:kABPersonBirthdayProperty],
-            kW3ContactUrls, [NSNumber numberWithInt:kABPersonURLProperty],
-            kW3ContactNote, [NSNumber numberWithInt:kABPersonNoteProperty],
-            nil];
-    }
-
-    return org_apache_cordova_contacts_ABtoW3C;
-}
-
-+ (NSDictionary*)defaultW3CtoAB
-{
-    if (org_apache_cordova_contacts_W3CtoAB == nil) {
-        org_apache_cordova_contacts_W3CtoAB = [NSDictionary dictionaryWithObjectsAndKeys:
-            [NSNumber numberWithInt:kABPersonNicknameProperty], kW3ContactNickname,
-            [NSNumber numberWithInt:kABPersonFirstNameProperty], kW3ContactGivenName,
-            [NSNumber numberWithInt:kABPersonLastNameProperty], kW3ContactFamilyName,
-            [NSNumber numberWithInt:kABPersonMiddleNameProperty], kW3ContactMiddleName,
-            [NSNumber numberWithInt:kABPersonPrefixProperty], kW3ContactHonorificPrefix,
-            [NSNumber numberWithInt:kABPersonSuffixProperty], kW3ContactHonorificSuffix,
-            [NSNumber numberWithInt:kABPersonPhoneProperty], kW3ContactPhoneNumbers,
-            [NSNumber numberWithInt:kABPersonAddressProperty], kW3ContactAddresses,
-            kABPersonAddressStreetKey, kW3ContactStreetAddress,
-            kABPersonAddressCityKey, kW3ContactLocality,
-            kABPersonAddressStateKey, kW3ContactRegion,
-            kABPersonAddressZIPKey, kW3ContactPostalCode,
-            kABPersonAddressCountryKey, kW3ContactCountry,
-            [NSNumber numberWithInt:kABPersonEmailProperty], kW3ContactEmails,
-            [NSNumber numberWithInt:kABPersonInstantMessageProperty], kW3ContactIms,
-            [NSNumber numberWithInt:kABPersonOrganizationProperty], kW3ContactOrganizations,
-            [NSNumber numberWithInt:kABPersonJobTitleProperty], kW3ContactTitle,
-            [NSNumber numberWithInt:kABPersonDepartmentProperty], kW3ContactDepartment,
-            [NSNumber numberWithInt:kABPersonBirthdayProperty], kW3ContactBirthday,
-            [NSNumber numberWithInt:kABPersonNoteProperty], kW3ContactNote,
-            [NSNumber numberWithInt:kABPersonURLProperty], kW3ContactUrls,
-            kABPersonInstantMessageUsernameKey, kW3ContactImValue,
-            kABPersonInstantMessageServiceKey, kW3ContactImType,
-            [NSNull null], kW3ContactFieldType,     /* include entries in dictionary to indicate ContactField properties */
-            [NSNull null], kW3ContactFieldValue,
-            [NSNull null], kW3ContactFieldPrimary,
-            [NSNull null], kW3ContactFieldId,
-            [NSNumber numberWithInt:kABPersonOrganizationProperty], kW3ContactOrganizationName,      /* careful, name is used multiple times*/
-            nil];
-    }
-    return org_apache_cordova_contacts_W3CtoAB;
-}
-
-+ (NSSet*)defaultW3CtoNull
-{
-    // these are values that have no AddressBook Equivalent OR have not been implemented yet
-    if (org_apache_cordova_contacts_W3CtoNull == nil) {
-        org_apache_cordova_contacts_W3CtoNull = [NSSet setWithObjects:kW3ContactDisplayName,
-            kW3ContactCategories, kW3ContactFormattedName, nil];
-    }
-    return org_apache_cordova_contacts_W3CtoNull;
-}
-
-/*
- *	The objectAndProperties dictionary contains the all of the properties of the W3C Contact Objects specified by the key
- *	Used in calcReturnFields, and various extract<Property> methods
- */
-+ (NSDictionary*)defaultObjectAndProperties
-{
-    if (org_apache_cordova_contacts_objectAndProperties == nil) {
-        org_apache_cordova_contacts_objectAndProperties = [NSDictionary dictionaryWithObjectsAndKeys:
-            [NSArray arrayWithObjects:kW3ContactGivenName, kW3ContactFamilyName,
-            kW3ContactMiddleName, kW3ContactHonorificPrefix, kW3ContactHonorificSuffix, kW3ContactFormattedName, nil], kW3ContactName,
-            [NSArray arrayWithObjects:kW3ContactStreetAddress, kW3ContactLocality, kW3ContactRegion,
-            kW3ContactPostalCode, kW3ContactCountry, /*kW3ContactAddressFormatted,*/ nil], kW3ContactAddresses,
-            [NSArray arrayWithObjects:kW3ContactOrganizationName, kW3ContactTitle, kW3ContactDepartment, nil], kW3ContactOrganizations,
-            [NSArray arrayWithObjects:kW3ContactFieldType, kW3ContactFieldValue, kW3ContactFieldPrimary, nil], kW3ContactPhoneNumbers,
-            [NSArray arrayWithObjects:kW3ContactFieldType, kW3ContactFieldValue, kW3ContactFieldPrimary, nil], kW3ContactEmails,
-            [NSArray arrayWithObjects:kW3ContactFieldType, kW3ContactFieldValue, kW3ContactFieldPrimary, nil], kW3ContactPhotos,
-            [NSArray arrayWithObjects:kW3ContactFieldType, kW3ContactFieldValue, kW3ContactFieldPrimary, nil], kW3ContactUrls,
-            [NSArray arrayWithObjects:kW3ContactImValue, kW3ContactImType, nil], kW3ContactIms,
-            nil];
-    }
-    return org_apache_cordova_contacts_objectAndProperties;
-}
-
-+ (NSDictionary*)defaultFields
-{
-    if (org_apache_cordova_contacts_defaultFields == nil) {
-        org_apache_cordova_contacts_defaultFields = [NSDictionary dictionaryWithObjectsAndKeys:
-            [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactName], kW3ContactName,
-            [NSNull null], kW3ContactNickname,
-            [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactAddresses], kW3ContactAddresses,
-            [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactOrganizations], kW3ContactOrganizations,
-            [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactPhoneNumbers], kW3ContactPhoneNumbers,
-            [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactEmails], kW3ContactEmails,
-            [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactIms], kW3ContactIms,
-            [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactPhotos], kW3ContactPhotos,
-            [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactUrls], kW3ContactUrls,
-            [NSNull null], kW3ContactBirthday,
-            [NSNull null], kW3ContactNote,
-            nil];
-    }
-    return org_apache_cordova_contacts_defaultFields;
-}
-
-/*  Translate W3C Contact data into ABRecordRef
- *
- *	New contact information comes in as a NSMutableDictionary.  All Null entries in Contact object are set
- *	as [NSNull null] in the dictionary when translating from the JSON input string of Contact data. However, if
- *  user did not set a value within a Contact object or sub-object (by not using the object constructor) some data
- *	may not exist.
- *  bUpdate = YES indicates this is a save of an existing record
- */
-- (bool)setFromContactDict:(NSDictionary*)aContact asUpdate:(BOOL)bUpdate
-{
-    if (![aContact isKindOfClass:[NSDictionary class]]) {
-        return FALSE; // can't do anything if no dictionary!
-    }
-
-    ABRecordRef person = self.record;
-    bool bSuccess = TRUE;
-    CFErrorRef error;
-
-    // set name info
-    // iOS doesn't have displayName - might have to pull parts from it to create name
-    bool bName = false;
-    NSDictionary* dict = [aContact valueForKey:kW3ContactName];
-    if ([dict isKindOfClass:[NSDictionary class]]) {
-        bName = true;
-        NSArray* propArray = [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactName];
-
-        for (id i in propArray) {
-            if (![(NSString*)i isEqualToString : kW3ContactFormattedName]) { // kW3ContactFormattedName is generated from ABRecordCopyCompositeName() and can't be set
-                [self setValue:[dict valueForKey:i] forProperty:(ABPropertyID)[(NSNumber*)[[CDVContact defaultW3CtoAB] objectForKey:i] intValue]
-                      inRecord:person asUpdate:bUpdate];
-            }
-        }
-    }
-
-    id nn = [aContact valueForKey:kW3ContactNickname];
-    if (![nn isKindOfClass:[NSNull class]]) {
-        bName = true;
-        [self setValue:nn forProperty:kABPersonNicknameProperty inRecord:person asUpdate:bUpdate];
-    }
-    if (!bName) {
-        // if no name or nickname - try and use displayName as W3Contact must have displayName or ContactName
-        [self setValue:[aContact valueForKey:kW3ContactDisplayName] forProperty:kABPersonNicknameProperty
-              inRecord:person asUpdate:bUpdate];
-    }
-
-    // set phoneNumbers
-    // NSLog(@"setting phoneNumbers");
-    NSArray* array = [aContact valueForKey:kW3ContactPhoneNumbers];
-    if ([array isKindOfClass:[NSArray class]]) {
-        [self setMultiValueStrings:array forProperty:kABPersonPhoneProperty inRecord:person asUpdate:bUpdate];
-    }
-    // set Emails
-    // NSLog(@"setting emails");
-    array = [aContact valueForKey:kW3ContactEmails];
-    if ([array isKindOfClass:[NSArray class]]) {
-        [self setMultiValueStrings:array forProperty:kABPersonEmailProperty inRecord:person asUpdate:bUpdate];
-    }
-    // set Urls
-    // NSLog(@"setting urls");
-    array = [aContact valueForKey:kW3ContactUrls];
-    if ([array isKindOfClass:[NSArray class]]) {
-        [self setMultiValueStrings:array forProperty:kABPersonURLProperty inRecord:person asUpdate:bUpdate];
-    }
-
-    // set multivalue dictionary properties
-    // set addresses:  streetAddress, locality, region, postalCode, country
-    // set ims:  value = username, type = servicetype
-    // iOS addresses and im are a MultiValue Properties with label, value=dictionary of  info, and id
-    // NSLog(@"setting addresses");
-    error = nil;
-    array = [aContact valueForKey:kW3ContactAddresses];
-    if ([array isKindOfClass:[NSArray class]]) {
-        [self setMultiValueDictionary:array forProperty:kABPersonAddressProperty inRecord:person asUpdate:bUpdate];
-    }
-    // ims
-    // NSLog(@"setting ims");
-    array = [aContact valueForKey:kW3ContactIms];
-    if ([array isKindOfClass:[NSArray class]]) {
-        [self setMultiValueDictionary:array forProperty:kABPersonInstantMessageProperty inRecord:person asUpdate:bUpdate];
-    }
-
-    // organizations
-    // W3C ContactOrganization has pref, type, name, title, department
-    // iOS only supports name, title, department
-    // NSLog(@"setting organizations");
-    // TODO this may need work - should Organization information be removed when array is empty??
-    array = [aContact valueForKey:kW3ContactOrganizations];  // iOS only supports one organization - use first one
-    if ([array isKindOfClass:[NSArray class]]) {
-        BOOL bRemove = NO;
-        NSDictionary* dict = nil;
-        if ([array count] > 0) {
-            dict = [array objectAtIndex:0];
-        } else {
-            // remove the organization info entirely
-            bRemove = YES;
-        }
-        if ([dict isKindOfClass:[NSDictionary class]] || (bRemove == YES)) {
-            [self setValue:(bRemove ? @"" : [dict valueForKey:@"name"]) forProperty:kABPersonOrganizationProperty inRecord:person asUpdate:bUpdate];
-            [self setValue:(bRemove ? @"" : [dict valueForKey:kW3ContactTitle]) forProperty:kABPersonJobTitleProperty inRecord:person asUpdate:bUpdate];
-            [self setValue:(bRemove ? @"" : [dict valueForKey:kW3ContactDepartment]) forProperty:kABPersonDepartmentProperty inRecord:person asUpdate:bUpdate];
-        }
-    }
-    // add dates
-    // Dates come in as milliseconds in NSNumber Object
-    id ms = [aContact valueForKey:kW3ContactBirthday];
-    NSDate* aDate = nil;
-    if (ms && [ms isKindOfClass:[NSNumber class]]) {
-        double msValue = [ms doubleValue];
-        msValue = msValue / 1000;
-        aDate = [NSDate dateWithTimeIntervalSince1970:msValue];
-    }
-    if ((aDate != nil) || [ms isKindOfClass:[NSString class]]) {
-        [self setValue:aDate != nil ? aDate:ms forProperty:kABPersonBirthdayProperty inRecord:person asUpdate:bUpdate];
-    }
-    // don't update creation date
-    // modification date will get updated when save
-    // anniversary is removed from W3C Contact api Dec 9, 2010 spec - don't waste time on it yet
-
-    // kABPersonDateProperty
-
-    // kABPersonAnniversaryLabel
-
-    // iOS doesn't have gender - ignore
-    // note
-    [self setValue:[aContact valueForKey:kW3ContactNote] forProperty:kABPersonNoteProperty inRecord:person asUpdate:bUpdate];
-
-    // iOS doesn't have preferredName- ignore
-
-    // photo
-    array = [aContact valueForKey:kW3ContactPhotos];
-    if ([array isKindOfClass:[NSArray class]]) {
-        if (bUpdate && ([array count] == 0)) {
-            // remove photo
-            bSuccess = ABPersonRemoveImageData(person, &error);
-        } else if ([array count] > 0) {
-            NSDictionary* dict = [array objectAtIndex:0]; // currently only support one photo
-            if ([dict isKindOfClass:[NSDictionary class]]) {
-                id value = [dict objectForKey:kW3ContactFieldValue];
-                if ([value isKindOfClass:[NSString class]]) {
-                    if (bUpdate && ([value length] == 0)) {
-                        // remove the current image
-                        bSuccess = ABPersonRemoveImageData(person, &error);
-                    } else {
-                        // use this image
-                        // don't know if string is encoded or not so first unencode it then encode it again
-                        NSString* cleanPath = [value stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
-                        NSURL* photoUrl = [NSURL URLWithString:[cleanPath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
-                        // caller is responsible for checking for a connection, if no connection this will fail
-                        NSError* err = nil;
-                        NSData* data = nil;
-                        if (photoUrl) {
-                            data = [NSData dataWithContentsOfURL:photoUrl options:NSDataReadingUncached error:&err];
-                        }
-                        if (data && ([data length] > 0)) {
-                            bSuccess = ABPersonSetImageData(person, (__bridge CFDataRef)data, &error);
-                        }
-                        if (!data || !bSuccess) {
-                            NSLog(@"error setting contact image: %@", (err != nil ? [err localizedDescription] : @""));
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    // TODO WebURLs
-
-    // TODO timezone
-
-    return bSuccess;
-}
-
-/* Set item into an AddressBook Record for the specified property.
- * aValue - the value to set into the address book (code checks for null or [NSNull null]
- * aProperty - AddressBook property ID
- * aRecord - the record to update
- * bUpdate - whether this is a possible update vs a new entry
- * RETURN
- *	true - property was set (or input value as null)
- *	false - property was not set
- */
-- (bool)setValue:(id)aValue forProperty:(ABPropertyID)aProperty inRecord:(ABRecordRef)aRecord asUpdate:(BOOL)bUpdate
-{
-    bool bSuccess = true;  // if property was null, just ignore and return success
-    CFErrorRef error;
-
-    if (aValue && ![aValue isKindOfClass:[NSNull class]]) {
-        if (bUpdate && ([aValue isKindOfClass:[NSString class]] && ([aValue length] == 0))) { // if updating, empty string means to delete
-            aValue = NULL;
-        } // really only need to set if different - more efficient to just update value or compare and only set if necessary???
-        bSuccess = ABRecordSetValue(aRecord, aProperty, (__bridge CFTypeRef)aValue, &error);
-        if (!bSuccess) {
-            NSLog(@"error setting %d property", aProperty);
-        }
-    }
-
-    return bSuccess;
-}
-
-- (bool)removeProperty:(ABPropertyID)aProperty inRecord:(ABRecordRef)aRecord
-{
-    CFErrorRef err;
-    bool bSuccess = ABRecordRemoveValue(aRecord, aProperty, &err);
-
-    if (!bSuccess) {
-        CFStringRef errDescription = CFErrorCopyDescription(err);
-        NSLog(@"Unable to remove property %d: %@", aProperty, errDescription);
-        CFRelease(errDescription);
-    }
-    return bSuccess;
-}
-
-- (bool)addToMultiValue:(ABMultiValueRef)multi fromDictionary:dict
-{
-    bool bSuccess = FALSE;
-    id value = [dict valueForKey:kW3ContactFieldValue];
-
-    if (IS_VALID_VALUE(value)) {
-        CFStringRef label = [CDVContact convertContactTypeToPropertyLabel:[dict valueForKey:kW3ContactFieldType]];
-        bSuccess = ABMultiValueAddValueAndLabel(multi, (__bridge CFTypeRef)value, label, NULL);
-        if (!bSuccess) {
-            NSLog(@"Error setting Value: %@ and label: %@", value, label);
-        }
-    }
-    return bSuccess;
-}
-
-- (ABMultiValueRef)allocStringMultiValueFromArray:array
-{
-    ABMutableMultiValueRef multi = ABMultiValueCreateMutable(kABMultiStringPropertyType);
-
-    for (NSDictionary* dict in array) {
-        [self addToMultiValue:multi fromDictionary:dict];
-    }
-
-    return multi;  // caller is responsible for releasing multi
-}
-
-- (bool)setValue:(CFTypeRef)value forProperty:(ABPropertyID)prop inRecord:(ABRecordRef)person
-{
-    CFErrorRef error;
-    bool bSuccess = ABRecordSetValue(person, prop, value, &error);
-
-    if (!bSuccess) {
-        NSLog(@"Error setting value for property: %d", prop);
-    }
-    return bSuccess;
-}
-
-/* Set MultiValue string properties into Address Book Record.
- * NSArray* fieldArray - array of dictionaries containing W3C properties to be set into record
- * ABPropertyID prop - the property to be set (generally used for phones and emails)
- * ABRecordRef  person - the record to set values into
- * BOOL bUpdate - whether or not to update date or set as new.
- *	When updating:
- *	  empty array indicates to remove entire property
- *	  empty string indicates to remove
- *    [NSNull null] do not modify (keep existing record value)
- * RETURNS
- * bool false indicates error
- *
- * used for phones and emails
- */
-- (bool)setMultiValueStrings:(NSArray*)fieldArray forProperty:(ABPropertyID)prop inRecord:(ABRecordRef)person asUpdate:(BOOL)bUpdate
-{
-    bool bSuccess = TRUE;
-    ABMutableMultiValueRef multi = nil;
-
-    if (!bUpdate) {
-        multi = [self allocStringMultiValueFromArray:fieldArray];
-        bSuccess = [self setValue:multi forProperty:prop inRecord:person];
-    } else if (bUpdate && ([fieldArray count] == 0)) {
-        // remove entire property
-        bSuccess = [self removeProperty:prop inRecord:person];
-    } else { // check for and apply changes
-        ABMultiValueRef copy = ABRecordCopyValue(person, prop);
-        if (copy != nil) {
-            multi = ABMultiValueCreateMutableCopy(copy);
-            CFRelease(copy);
-
-            for (NSDictionary* dict in fieldArray) {
-                id val;
-                NSString* label = nil;
-                val = [dict valueForKey:kW3ContactFieldValue];
-                label = (__bridge NSString*)[CDVContact convertContactTypeToPropertyLabel:[dict valueForKey:kW3ContactFieldType]];
-                if (IS_VALID_VALUE(val)) {
-                    // is an update,  find index of entry with matching id, if values are different, update.
-                    id idValue = [dict valueForKey:kW3ContactFieldId];
-                    int identifier = [idValue isKindOfClass:[NSNumber class]] ? [idValue intValue] : -1;
-                    CFIndex i = identifier >= 0 ? ABMultiValueGetIndexForIdentifier(multi, identifier) : kCFNotFound;
-                    if (i != kCFNotFound) {
-                        if ([val length] == 0) {
-                            // remove both value and label
-                            ABMultiValueRemoveValueAndLabelAtIndex(multi, i);
-                        } else {
-                            NSString* valueAB = (__bridge_transfer NSString*)ABMultiValueCopyValueAtIndex(multi, i);
-                            NSString* labelAB = (__bridge_transfer NSString*)ABMultiValueCopyLabelAtIndex(multi, i);
-                            if ((valueAB == nil) || ![val isEqualToString:valueAB]) {
-                                ABMultiValueReplaceValueAtIndex(multi, (__bridge CFTypeRef)val, i);
-                            }
-                            if ((labelAB == nil) || ![label isEqualToString:labelAB]) {
-                                ABMultiValueReplaceLabelAtIndex(multi, (__bridge CFStringRef)label, i);
-                            }
-                        }
-                    } else {
-                        // is a new value - insert
-                        [self addToMultiValue:multi fromDictionary:dict];
-                    }
-                } // end of if value
-            } // end of for
-        } else { // adding all new value(s)
-            multi = [self allocStringMultiValueFromArray:fieldArray];
-        }
-        // set the (updated) copy as the new value
-        bSuccess = [self setValue:multi forProperty:prop inRecord:person];
-    }
-
-    if (multi) {
-        CFRelease(multi);
-    }
-
-    return bSuccess;
-}
-
-// used for ims and addresses
-- (ABMultiValueRef)allocDictMultiValueFromArray:array forProperty:(ABPropertyID)prop
-{
-    ABMutableMultiValueRef multi = ABMultiValueCreateMutable(kABMultiDictionaryPropertyType);
-    NSMutableDictionary* newDict;
-    NSMutableDictionary* addDict;
-
-    for (NSDictionary* dict in array) {
-        newDict = [self translateW3Dict:dict forProperty:prop];
-        addDict = [NSMutableDictionary dictionaryWithCapacity:2];
-        if (newDict) { // create a new dictionary with a Label and Value, value is the dictionary previously created
-            // June, 2011 W3C Contact spec adds type into ContactAddress book
-            // get the type out of the original dictionary for address
-            NSString* addrType = (NSString*)[dict valueForKey:kW3ContactFieldType];
-            if (!addrType) {
-                addrType = (NSString*)kABOtherLabel;
-            }
-            NSObject* typeValue = ((prop == kABPersonInstantMessageProperty) ? (NSObject*)kABOtherLabel : addrType);
-            // NSLog(@"typeValue: %@", typeValue);
-            [addDict setObject:typeValue forKey:kW3ContactFieldType];    //  im labels will be set as Other and address labels as type from dictionary
-            [addDict setObject:newDict forKey:kW3ContactFieldValue];
-            [self addToMultiValue:multi fromDictionary:addDict];
-        }
-    }
-
-    return multi; // caller is responsible for releasing
-}
-
-// used for ims and addresses to convert W3 dictionary of values to AB Dictionary
-// got messier when June, 2011 W3C Contact spec added type field into ContactAddress
-- (NSMutableDictionary*)translateW3Dict:(NSDictionary*)dict forProperty:(ABPropertyID)prop
-{
-    NSArray* propArray = [[CDVContact defaultObjectAndProperties] valueForKey:[[CDVContact defaultABtoW3C] objectForKey:[NSNumber numberWithInt:prop]]];
-
-    NSMutableDictionary* newDict = [NSMutableDictionary dictionaryWithCapacity:1];
-    id value;
-
-    for (NSString* key in propArray) { // for each W3 Contact key get the value
-        if (((value = [dict valueForKey:key]) != nil) && ![value isKindOfClass:[NSNull class]]) {
-            // if necessary convert the W3 value to AB Property label
-            NSString* setValue = value;
-            if ([CDVContact needsConversion:key]) { // IM types must be converted
-                setValue = (NSString*)[CDVContact convertContactTypeToPropertyLabel:value];
-                // IMs must have a valid AB value!
-                if ((prop == kABPersonInstantMessageProperty) && [setValue isEqualToString:(NSString*)kABOtherLabel]) {
-                    setValue = @""; // try empty string
-                }
-            }
-            // set the AB value into the dictionary
-            [newDict setObject:setValue forKey:(NSString*)[[CDVContact defaultW3CtoAB] valueForKey:(NSString*)key]];
-        }
-    }
-
-    if ([newDict count] == 0) {
-        newDict = nil; // no items added
-    }
-    return newDict;
-}
-
-/* set multivalue dictionary properties into an AddressBook Record
- * NSArray* array - array of dictionaries containing the W3C properties to set into the record
- * ABPropertyID prop - the property id for the multivalue dictionary (addresses and ims)
- * ABRecordRef person - the record to set the values into
- * BOOL bUpdate - YES if this is an update to an existing record
- *	When updating:
- *	  empty array indicates to remove entire property
- *	  value/label == "" indicates to remove
- *    value/label == [NSNull null] do not modify (keep existing record value)
- * RETURN
- *   bool false indicates fatal error
- *
- *  iOS addresses and im are a MultiValue Properties with label, value=dictionary of  info, and id
- *  set addresses:  streetAddress, locality, region, postalCode, country
- *  set ims:  value = username, type = servicetype
- *  there are some special cases in here for ims - needs cleanup / simplification
- *
- */
-- (bool)setMultiValueDictionary:(NSArray*)array forProperty:(ABPropertyID)prop inRecord:(ABRecordRef)person asUpdate:(BOOL)bUpdate
-{
-    bool bSuccess = FALSE;
-    ABMutableMultiValueRef multi = nil;
-
-    if (!bUpdate) {
-        multi = [self allocDictMultiValueFromArray:array forProperty:prop];
-        bSuccess = [self setValue:multi forProperty:prop inRecord:person];
-    } else if (bUpdate && ([array count] == 0)) {
-        // remove property
-        bSuccess = [self removeProperty:prop inRecord:person];
-    } else { // check for and apply changes
-        ABMultiValueRef copy = ABRecordCopyValue(person, prop);
-        if (copy) {
-            multi = ABMultiValueCreateMutableCopy(copy);
-            CFRelease(copy);
-            // get the W3C values for this property
-            NSArray* propArray = [[CDVContact defaultObjectAndProperties] valueForKey:[[CDVContact defaultABtoW3C] objectForKey:[NSNumber numberWithInt:prop]]];
-            id value;
-            id valueAB;
-
-            for (NSDictionary* field in array) {
-                NSMutableDictionary* dict;
-                // find the index for the current property
-                id idValue = [field valueForKey:kW3ContactFieldId];
-                int identifier = [idValue isKindOfClass:[NSNumber class]] ? [idValue intValue] : -1;
-                CFIndex idx = identifier >= 0 ? ABMultiValueGetIndexForIdentifier(multi, identifier) : kCFNotFound;
-                BOOL bUpdateLabel = NO;
-                if (idx != kCFNotFound) {
-                    dict = [NSMutableDictionary dictionaryWithCapacity:1];
-                    // NSDictionary* existingDictionary = (NSDictionary*)ABMultiValueCopyValueAtIndex(multi, idx);
-                    CFTypeRef existingDictionary = ABMultiValueCopyValueAtIndex(multi, idx);
-                    NSString* existingABLabel = (__bridge_transfer NSString*)ABMultiValueCopyLabelAtIndex(multi, idx);
-                    NSString* testLabel = [field valueForKey:kW3ContactFieldType];
-                    // fixes cb-143 where setting empty label could cause address to not be removed
-                    //   (because empty label would become 'other'  in convertContactTypeToPropertyLabel
-                    //   which may not have matched existing label thus resulting in an incorrect updating of the label
-                    //   and the address not getting removed at the end of the for loop)
-                    if (testLabel && [testLabel isKindOfClass:[NSString class]] && ([testLabel length] > 0)) {
-                        CFStringRef w3cLabel = [CDVContact convertContactTypeToPropertyLabel:testLabel];
-                        if (w3cLabel && ![existingABLabel isEqualToString:(__bridge NSString*)w3cLabel]) {
-                            // replace the label
-                            ABMultiValueReplaceLabelAtIndex(multi, w3cLabel, idx);
-                            bUpdateLabel = YES;
-                        }
-                    } // else was invalid or empty label string so do not update
-
-                    for (id k in propArray) {
-                        value = [field valueForKey:k];
-                        bool bSet = (value != nil && ![value isKindOfClass:[NSNull class]] && ([value isKindOfClass:[NSString class]] && [value length] > 0));
-                        // if there is a contact value, put it into dictionary
-                        if (bSet) {
-                            NSString* setValue = [CDVContact needsConversion:(NSString*)k] ? (NSString*)[CDVContact convertContactTypeToPropertyLabel:value] : value;
-                            [dict setObject:setValue forKey:(NSString*)[[CDVContact defaultW3CtoAB] valueForKey:(NSString*)k]];
-                        } else if ((value == nil) || ([value isKindOfClass:[NSString class]] && ([value length] != 0))) {
-                            // value not provided in contact dictionary - if prop exists in AB dictionary, preserve it
-                            valueAB = [(__bridge NSDictionary*)existingDictionary valueForKey : [[CDVContact defaultW3CtoAB] valueForKey:k]];
-                            if (valueAB != nil) {
-                                [dict setValue:valueAB forKey:[[CDVContact defaultW3CtoAB] valueForKey:k]];
-                            }
-                        } // else if value == "" it will not be added into updated dict and thus removed
-                    } // end of for loop (moving here fixes cb-143, need to end for loop before replacing or removing multivalue)
-
-                    if ([dict count] > 0) {
-                        // something was added into new dict,
-                        ABMultiValueReplaceValueAtIndex(multi, (__bridge CFTypeRef)dict, idx);
-                    } else if (!bUpdateLabel) {
-                        // nothing added into new dict and no label change so remove this property entry
-                        ABMultiValueRemoveValueAndLabelAtIndex(multi, idx);
-                    }
-
-                    CFRelease(existingDictionary);
-                } else {
-                    // not found in multivalue so add it
-                    dict = [self translateW3Dict:field forProperty:prop];
-                    if (dict) {
-                        NSMutableDictionary* addDict = [NSMutableDictionary dictionaryWithCapacity:2];
-                        // get the type out of the original dictionary for address
-                        NSObject* typeValue = ((prop == kABPersonInstantMessageProperty) ? (NSObject*)kABOtherLabel : (NSString*)[field valueForKey:kW3ContactFieldType]);
-                        // NSLog(@"typeValue: %@", typeValue);
-                        [addDict setObject:typeValue forKey:kW3ContactFieldType];        //  im labels will be set as Other and address labels as type from dictionary
-                        [addDict setObject:dict forKey:kW3ContactFieldValue];
-                        [self addToMultiValue:multi fromDictionary:addDict];
-                    }
-                }
-            } // end of looping through dictionaries
-
-            // set the (updated) copy as the new value
-            bSuccess = [self setValue:multi forProperty:prop inRecord:person];
-        }
-    } // end of copy and apply changes
-    if (multi) {
-        CFRelease(multi);
-    }
-
-    return bSuccess;
-}
-
-/* Determine which W3C labels need to be converted
- */
-+ (BOOL)needsConversion:(NSString*)W3Label
-{
-    BOOL bConvert = NO;
-
-    if ([W3Label isEqualToString:kW3ContactFieldType] || [W3Label isEqualToString:kW3ContactImType]) {
-        bConvert = YES;
-    }
-    return bConvert;
-}
-
-/* Translation of property type labels  contact API ---> iPhone
- *
- *	phone:  work, home, other, mobile, fax, pager -->
- *		kABWorkLabel, kABHomeLabel, kABOtherLabel, kABPersonPhoneMobileLabel, kABPersonHomeFAXLabel || kABPersonHomeFAXLabel, kABPersonPhonePagerLabel
- *	emails:  work, home, other ---> kABWorkLabel, kABHomeLabel, kABOtherLabel
- *	ims: aim, gtalk, icq, xmpp, msn, skype, qq, yahoo --> kABPersonInstantMessageService + (AIM, ICG, MSN, Yahoo).  No support for gtalk, xmpp, skype, qq
- * addresses: work, home, other --> kABWorkLabel, kABHomeLabel, kABOtherLabel
- *
- *
- */
-+ (CFStringRef)convertContactTypeToPropertyLabel:(NSString*)label
-{
-    CFStringRef type;
-
-    if ([label isKindOfClass:[NSNull class]] || ![label isKindOfClass:[NSString class]]) {
-        type = NULL; // no label
-    } else if ([label caseInsensitiveCompare:kW3ContactWorkLabel] == NSOrderedSame) {
-        type = kABWorkLabel;
-    } else if ([label caseInsensitiveCompare:kW3ContactHomeLabel] == NSOrderedSame) {
-        type = kABHomeLabel;
-    } else if ([label caseInsensitiveCompare:kW3ContactOtherLabel] == NSOrderedSame) {
-        type = kABOtherLabel;
-    } else if ([label caseInsensitiveCompare:kW3ContactPhoneMobileLabel] == NSOrderedSame) {
-        type = kABPersonPhoneMobileLabel;
-    } else if ([label caseInsensitiveCompare:kW3ContactPhonePagerLabel] == NSOrderedSame) {
-        type = kABPersonPhonePagerLabel;
-    } else if ([label caseInsensitiveCompare:kW3ContactImAIMLabel] == NSOrderedSame) {
-        type = kABPersonInstantMessageServiceAIM;
-    } else if ([label caseInsensitiveCompare:kW3ContactImICQLabel] == NSOrderedSame) {
-        type = kABPersonInstantMessageServiceICQ;
-    } else if ([label caseInsensitiveCompare:kW3ContactImMSNLabel] == NSOrderedSame) {
-        type = kABPersonInstantMessageServiceMSN;
-    } else if ([label caseInsensitiveCompare:kW3ContactImYahooLabel] == NSOrderedSame) {
-        type = kABPersonInstantMessageServiceYahoo;
-    } else if ([label caseInsensitiveCompare:kW3ContactUrlProfile] == NSOrderedSame) {
-        type = kABPersonHomePageLabel;
-    } else {
-        type = kABOtherLabel;
-    }
-
-    return type;
-}
-
-+ (NSString*)convertPropertyLabelToContactType:(NSString*)label
-{
-    NSString* type = nil;
-
-    if (label != nil) { // improve efficiency......
-        if ([label isEqualToString:(NSString*)kABPersonPhoneMobileLabel]) {
-            type = kW3ContactPhoneMobileLabel;
-        } else if ([label isEqualToString:(NSString*)kABPersonPhoneHomeFAXLabel] ||
-            [label isEqualToString:(NSString*)kABPersonPhoneWorkFAXLabel]) {
-            type = kW3ContactPhoneFaxLabel;
-        } else if ([label isEqualToString:(NSString*)kABPersonPhonePagerLabel]) {
-            type = kW3ContactPhonePagerLabel;
-        } else if ([label isEqualToString:(NSString*)kABHomeLabel]) {
-            type = kW3ContactHomeLabel;
-        } else if ([label isEqualToString:(NSString*)kABWorkLabel]) {
-            type = kW3ContactWorkLabel;
-        } else if ([label isEqualToString:(NSString*)kABOtherLabel]) {
-            type = kW3ContactOtherLabel;
-        } else if ([label isEqualToString:(NSString*)kABPersonInstantMessageServiceAIM]) {
-            type = kW3ContactImAIMLabel;
-        } else if ([label isEqualToString:(NSString*)kABPersonInstantMessageServiceICQ]) {
-            type = kW3ContactImICQLabel;
-        } else if ([label isEqualToString:(NSString*)kABPersonInstantMessageServiceJabber]) {
-            type = kW3ContactOtherLabel;
-        } else if ([label isEqualToString:(NSString*)kABPersonInstantMessageServiceMSN]) {
-            type = kW3ContactImMSNLabel;
-        } else if ([label isEqualToString:(NSString*)kABPersonInstantMessageServiceYahoo]) {
-            type = kW3ContactImYahooLabel;
-        } else if ([label isEqualToString:(NSString*)kABPersonHomePageLabel]) {
-            type = kW3ContactUrlProfile;
-        } else {
-            type = kW3ContactOtherLabel;
-        }
-    }
-    return type;
-}
-
-/* Check if the input label is a valid W3C ContactField.type. This is used when searching,
- * only search field types if the search string is a valid type.  If we converted any search
- * string to a ABPropertyLabel it could convert to kABOtherLabel which is probably not want
- * the user wanted to search for and could skew the results.
- */
-+ (BOOL)isValidW3ContactType:(NSString*)label
-{
-    BOOL isValid = NO;
-
-    if ([label isKindOfClass:[NSNull class]] || ![label isKindOfClass:[NSString class]]) {
-        isValid = NO; // no label
-    } else if ([label caseInsensitiveCompare:kW3ContactWorkLabel] == NSOrderedSame) {
-        isValid = YES;
-    } else if ([label caseInsensitiveCompare:kW3ContactHomeLabel] == NSOrderedSame) {
-        isValid = YES;
-    } else if ([label caseInsensitiveCompare:kW3ContactOtherLabel] == NSOrderedSame) {
-        isValid = YES;
-    } else if ([label caseInsensitiveCompare:kW3ContactPhoneMobileLabel] == NSOrderedSame) {
-        isValid = YES;
-    } else if ([label caseInsensitiveCompare:kW3ContactPhonePagerLabel] == NSOrderedSame) {
-        isValid = YES;
-    } else if ([label caseInsensitiveCompare:kW3ContactImAIMLabel] == NSOrderedSame) {
-        isValid = YES;
-    } else if ([label caseInsensitiveCompare:kW3ContactImICQLabel] == NSOrderedSame) {
-        isValid = YES;
-    } else if ([label caseInsensitiveCompare:kW3ContactImMSNLabel] == NSOrderedSame) {
-        isValid = YES;
-    } else if ([label caseInsensitiveCompare:kW3ContactImYahooLabel] == NSOrderedSame) {
-        isValid = YES;
-    } else {
-        isValid = NO;
-    }
-
-    return isValid;
-}
-
-/* Create a new Contact Dictionary object from an ABRecordRef that contains information in a format such that
- * it can be returned to JavaScript callback as JSON object string.
- * Uses:
- * ABRecordRef set into Contact Object
- * NSDictionary withFields indicates which fields to return from the AddressBook Record
- *
- * JavaScript Contact:
- * @param {DOMString} id unique identifier
- * @param {DOMString} displayName
- * @param {ContactName} name
- * @param {DOMString} nickname
- * @param {ContactField[]} phoneNumbers array of phone numbers
- * @param {ContactField[]} emails array of email addresses
- * @param {ContactAddress[]} addresses array of addresses
- * @param {ContactField[]} ims instant messaging user ids
- * @param {ContactOrganization[]} organizations
- * @param {DOMString} published date contact was first created
- * @param {DOMString} updated date contact was last updated
- * @param {DOMString} birthday contact's birthday
- * @param (DOMString} anniversary contact's anniversary
- * @param {DOMString} gender contact's gender
- * @param {DOMString} note user notes about contact
- * @param {DOMString} preferredUsername
- * @param {ContactField[]} photos
- * @param {ContactField[]} tags
- * @param {ContactField[]} relationships
- * @param {ContactField[]} urls contact's web sites
- * @param {ContactAccounts[]} accounts contact's online accounts
- * @param {DOMString} timezone UTC time zone offset
- * @param {DOMString} connected
- */
-
-- (NSDictionary*)toDictionary:(NSDictionary*)withFields
-{
-    // if not a person type record bail out for now
-    if (ABRecordGetRecordType(self.record) != kABPersonType) {
-        return NULL;
-    }
-    id value = nil;
-    self.returnFields = withFields;
-
-    NSMutableDictionary* nc = [NSMutableDictionary dictionaryWithCapacity:1];  // new contact dictionary to fill in from ABRecordRef
-    // id
-    [nc setObject:[NSNumber numberWithInt:ABRecordGetRecordID(self.record)] forKey:kW3ContactId];
-    if (self.returnFields == nil) {
-        // if no returnFields specified, W3C says to return empty contact (but Cordova will at least return id)
-        return nc;
-    }
-    if ([self.returnFields objectForKey:kW3ContactDisplayName]) {
-        // displayname requested -  iOS doesn't have so return null
-        [nc setObject:[NSNull null] forKey:kW3ContactDisplayName];
-        // may overwrite below if requested ContactName and there are no values
-    }
-    // nickname
-    if ([self.returnFields valueForKey:kW3ContactNickname]) {
-        value = (__bridge_transfer NSString*)ABRecordCopyValue(self.record, kABPersonNicknameProperty);
-        [nc setObject:(value != nil) ? value:[NSNull null] forKey:kW3ContactNickname];
-    }
-
-    // name dictionary
-    // NSLog(@"getting name info");
-    NSObject* data = [self extractName];
-    if (data != nil) {
-        [nc setObject:data forKey:kW3ContactName];
-    }
-    if ([self.returnFields objectForKey:kW3ContactDisplayName] && ((data == nil) || ([(NSDictionary*)data objectForKey : kW3ContactFormattedName] == [NSNull null]))) {
-        // user asked for displayName which iOS doesn't support but there is no other name data being returned
-        // try and use Composite Name so some name is returned
-        id tryName = (__bridge_transfer NSString*)ABRecordCopyCompositeName(self.record);
-        if (tryName != nil) {
-            [nc setObject:tryName forKey:kW3ContactDisplayName];
-        } else {
-            // use nickname or empty string
-            value = (__bridge_transfer NSString*)ABRecordCopyValue(self.record, kABPersonNicknameProperty);
-            [nc setObject:(value != nil) ? value:@"" forKey:kW3ContactDisplayName];
-        }
-    }
-    // phoneNumbers array
-    // NSLog(@"getting phoneNumbers");
-    value = [self extractMultiValue:kW3ContactPhoneNumbers];
-    if (value != nil) {
-        [nc setObject:value forKey:kW3ContactPhoneNumbers];
-    }
-    // emails array
-    // NSLog(@"getting emails");
-    value = [self extractMultiValue:kW3ContactEmails];
-    if (value != nil) {
-        [nc setObject:value forKey:kW3ContactEmails];
-    }
-    // urls array
-    value = [self extractMultiValue:kW3ContactUrls];
-    if (value != nil) {
-        [nc setObject:value forKey:kW3ContactUrls];
-    }
-    // addresses array
-    // NSLog(@"getting addresses");
-    value = [self extractAddresses];
-    if (value != nil) {
-        [nc setObject:value forKey:kW3ContactAddresses];
-    }
-    // im array
-    // NSLog(@"getting ims");
-    value = [self extractIms];
-    if (value != nil) {
-        [nc setObject:value forKey:kW3ContactIms];
-    }
-    // organization array (only info for one organization in iOS)
-    // NSLog(@"getting organizations");
-    value = [self extractOrganizations];
-    if (value != nil) {
-        [nc setObject:value forKey:kW3ContactOrganizations];
-    }
-
-    // for simple properties, could make this a bit more efficient by storing all simple properties in a single
-    // array in the returnFields dictionary and setting them via a for loop through the array
-
-    // add dates
-    // NSLog(@"getting dates");
-    NSNumber* ms;
-
-    /** Contact Revision field removed from June 16, 2011 version of specification
-
-    if ([self.returnFields valueForKey:kW3ContactUpdated]){
-        ms = [self getDateAsNumber: kABPersonModificationDateProperty];
-        if (!ms){
-            // try and get published date
-            ms = [self getDateAsNumber: kABPersonCreationDateProperty];
-        }
-        if (ms){
-            [nc setObject:  ms forKey:kW3ContactUpdated];
-        }
-
-    }
-    */
-
-    if ([self.returnFields valueForKey:kW3ContactBirthday]) {
-        ms = [self getDateAsNumber:kABPersonBirthdayProperty];
-        if (ms) {
-            [nc setObject:ms forKey:kW3ContactBirthday];
-        }
-    }
-
-    /*  Anniversary removed from 12-09-2010 W3C Contacts api spec
-     if ([self.returnFields valueForKey:kW3ContactAnniversary]){
-        // Anniversary date is stored in a multivalue property
-        ABMultiValueRef multi = ABRecordCopyValue(self.record, kABPersonDateProperty);
-        if (multi){
-            CFStringRef label = nil;
-            CFIndex count = ABMultiValueGetCount(multi);
-            // see if contains an Anniversary date
-            for(CFIndex i=0; i<count; i++){
-                label = ABMultiValueCopyLabelAtIndex(multi, i);
-                if(label && [(NSString*)label isEqualToString:(NSString*)kABPersonAnniversaryLabel]){
-                    CFDateRef aDate = ABMultiValueCopyValueAtIndex(multi, i);
-                    if(aDate){
-                        [nc setObject: (NSString*)aDate forKey: kW3ContactAnniversary];
-                        CFRelease(aDate);
-                    }
-                    CFRelease(label);
-                    break;
-                }
-            }
-            CFRelease(multi);
-        }
-    }*/
-
-    if ([self.returnFields valueForKey:kW3ContactNote]) {
-        // note
-        value = (__bridge_transfer NSString*)ABRecordCopyValue(self.record, kABPersonNoteProperty);
-        [nc setObject:(value != nil) ? value:[NSNull null] forKey:kW3ContactNote];
-    }
-
-    if ([self.returnFields valueForKey:kW3ContactPhotos]) {
-        value = [self extractPhotos];
-        [nc setObject:(value != nil) ? value:[NSNull null] forKey:kW3ContactPhotos];
-    }
-
-    /* TimeZone removed from June 16, 2011 Contacts spec
-     *
-    if ([self.returnFields valueForKey:kW3ContactTimezone]){
-        [NSTimeZone resetSystemTimeZone];
-        NSTimeZone* currentTZ = [NSTimeZone localTimeZone];
-        NSInteger seconds = [currentTZ secondsFromGMT];
-        NSString* tz = [NSString stringWithFormat:@"%2d:%02u",  seconds/3600, seconds % 3600 ];
-        [nc setObject:tz forKey:kW3ContactTimezone];
-    }
-    */
-    // TODO WebURLs
-    // [nc setObject:[NSNull null] forKey:kW3ContactUrls];
-    // online accounts - not available on iOS
-
-    return nc;
-}
-
-- (NSNumber*)getDateAsNumber:(ABPropertyID)datePropId
-{
-    NSNumber* msDate = nil;
-    NSDate* aDate = nil;
-    CFTypeRef cfDate = ABRecordCopyValue(self.record, datePropId);
-
-    if (cfDate) {
-        aDate = (__bridge NSDate*)cfDate;
-        msDate = [NSNumber numberWithDouble:([aDate timeIntervalSince1970] * 1000)];
-        CFRelease(cfDate);
-    }
-    return msDate;
-}
-
-/* Create Dictionary to match JavaScript ContactName object:
- *	formatted - ABRecordCopyCompositeName
- *	familyName
- *	givenName
- *	middleName
- *	honorificPrefix
- *	honorificSuffix
-*/
-
-- (NSObject*)extractName
-{
-    NSArray* fields = [self.returnFields objectForKey:kW3ContactName];
-
-    if (fields == nil) { // no name fields requested
-        return nil;
-    }
-
-    NSMutableDictionary* newName = [NSMutableDictionary dictionaryWithCapacity:6];
-    id value;
-
-    for (NSString* i in fields) {
-        if ([i isEqualToString:kW3ContactFormattedName]) {
-            value = (__bridge_transfer NSString*)ABRecordCopyCompositeName(self.record);
-            [newName setObject:(value != nil) ? value:[NSNull null] forKey:kW3ContactFormattedName];
-        } else {
-            // W3CtoAB returns NSNumber for AB name properties, get intValue and cast to ABPropertyID)
-            value = (__bridge_transfer NSString*)ABRecordCopyValue(self.record, (ABPropertyID)[[[CDVContact defaultW3CtoAB] valueForKey:i] intValue]);
-            [newName setObject:(value != nil) ? value:[NSNull null] forKey:(NSString*)i];
-        }
-    }
-
-    return newName;
-}
-
-/* Create array of Dictionaries to match JavaScript ContactField object for simple multiValue properties phoneNumbers, emails
- * Input: (NSString*) W3Contact Property name
- * type
- *		for phoneNumbers type is one of (work,home,other, mobile, fax, pager)
- *		for emails type is one of (work,home, other)
- * value - phone number or email address
- * (bool) primary (not supported on iphone)
- * id
-*/
-- (NSObject*)extractMultiValue:(NSString*)propertyId
-{
-    NSArray* fields = [self.returnFields objectForKey:propertyId];
-
-    if (fields == nil) {
-        return nil;
-    }
-    ABMultiValueRef multi = nil;
-    NSObject* valuesArray = nil;
-    NSNumber* propNumber = [[CDVContact defaultW3CtoAB] valueForKey:propertyId];
-    ABPropertyID propId = [propNumber intValue];
-    multi = ABRecordCopyValue(self.record, propId);
-    // multi = ABRecordCopyValue(self.record, (ABPropertyID)[[[Contact defaultW3CtoAB] valueForKey:propertyId] intValue]);
-    CFIndex count = multi != nil ? ABMultiValueGetCount(multi) : 0;
-    id value;
-    if (count) {
-        valuesArray = [NSMutableArray arrayWithCapacity:count];
-
-        for (CFIndex i = 0; i < count; i++) {
-            NSMutableDictionary* newDict = [NSMutableDictionary dictionaryWithCapacity:4];
-            if ([fields containsObject:kW3ContactFieldType]) {
-                NSString* label = (__bridge_transfer NSString*)ABMultiValueCopyLabelAtIndex(multi, i);
-                value = [CDVContact convertPropertyLabelToContactType:label];
-                [newDict setObject:(value != nil) ? value:[NSNull null]   forKey:kW3ContactFieldType];
-            }
-            if ([fields containsObject:kW3ContactFieldValue]) {
-                value = (__bridge_transfer NSString*)ABMultiValueCopyValueAtIndex(multi, i);
-                [newDict setObject:(value != nil) ? value:[NSNull null] forKey:kW3ContactFieldValue];
-            }
-            if ([fields containsObject:kW3ContactFieldPrimary]) {
-                [newDict setObject:[NSNumber numberWithBool:(BOOL)NO] forKey:kW3ContactFieldPrimary];   // iOS doesn't support primary so set all to false
-            }
-            // always set id
-            value = [NSNumber numberWithUnsignedInt:ABMultiValueGetIdentifierAtIndex(multi, i)];
-            [newDict setObject:(value != nil) ? value:[NSNull null] forKey:kW3ContactFieldId];
-            [(NSMutableArray*)valuesArray addObject : newDict];
-        }
-    } else {
-        valuesArray = [NSNull null];
-    }
-    if (multi) {
-        CFRelease(multi);
-    }
-
-    return valuesArray;
-}
-
-/* Create array of Dictionaries to match JavaScript ContactAddress object for addresses
- *  pref - not supported
- *  type - address type
- *	formatted  - formatted for mailing label (what about localization?)
- *	streetAddress
- *	locality
- *	region;
- *	postalCode
- *	country
- *	id
- *
- *	iOS addresses are a MultiValue Properties with label, value=dictionary of address info, and id
- */
-- (NSObject*)extractAddresses
-{
-    NSArray* fields = [self.returnFields objectForKey:kW3ContactAddresses];
-
-    if (fields == nil) { // no name fields requested
-        return nil;
-    }
-    CFStringRef value;
-    NSObject* addresses;
-    ABMultiValueRef multi = ABRecordCopyValue(self.record, kABPersonAddressProperty);
-    CFIndex count = multi ? ABMultiValueGetCount(multi) : 0;
-    if (count) {
-        addresses = [NSMutableArray arrayWithCapacity:count];
-
-        for (CFIndex i = 0; i < count; i++) {
-            NSMutableDictionary* newAddress = [NSMutableDictionary dictionaryWithCapacity:7];
-            // if we got this far, at least some address info is being requested.
-
-            // Always set id
-            id identifier = [NSNumber numberWithUnsignedInt:ABMultiValueGetIdentifierAtIndex(multi, i)];
-            [newAddress setObject:(identifier != nil) ? identifier:[NSNull null] forKey:kW3ContactFieldId];
-            // set the type label
-            NSString* label = (__bridge_transfer NSString*)ABMultiValueCopyLabelAtIndex(multi, i);
-
-            [newAddress setObject:(label != nil) ? (NSObject*)[[CDVContact class] convertPropertyLabelToContactType:label]:[NSNull null] forKey:kW3ContactFieldType];
-            // set the pref - iOS doesn't support so set to default of false
-            [newAddress setObject:@"false" forKey:kW3ContactFieldPrimary];
-            // get dictionary of values for this address
-            CFDictionaryRef dict = (CFDictionaryRef)ABMultiValueCopyValueAtIndex(multi, i);
-
-            for (id k in fields) {
-                bool bFound;
-                id key = [[CDVContact defaultW3CtoAB] valueForKey:k];
-                if (key && ![k isKindOfClass:[NSNull class]]) {
-                    bFound = CFDictionaryGetValueIfPresent(dict, (__bridge const void*)key, (void*)&value);
-                    if (bFound && (value != NULL)) {
-                        CFRetain(value);
-                        [newAddress setObject:(__bridge id)value forKey:k];
-                        CFRelease(value);
-                    } else {
-                        [newAddress setObject:[NSNull null] forKey:k];
-                    }
-                } else {
-                    // was a property that iPhone doesn't support
-                    [newAddress setObject:[NSNull null] forKey:k];
-                }
-            }
-
-            if ([newAddress count] > 0) { // ?? this will always be true since we set id,label,primary field??
-                [(NSMutableArray*)addresses addObject : newAddress];
-            }
-            CFRelease(dict);
-        } // end of loop through addresses
-    } else {
-        addresses = [NSNull null];
-    }
-    if (multi) {
-        CFRelease(multi);
-    }
-
-    return addresses;
-}
-
-/* Create array of Dictionaries to match JavaScript ContactField object for ims
- * type one of [aim, gtalk, icq, xmpp, msn, skype, qq, yahoo] needs other as well
- * value
- * (bool) primary
- * id
- *
- *	iOS IMs are a MultiValue Properties with label, value=dictionary of IM details (service, username), and id
- */
-- (NSObject*)extractIms
-{
-    NSArray* fields = [self.returnFields objectForKey:kW3ContactIms];
-
-    if (fields == nil) { // no name fields requested
-        return nil;
-    }
-    NSObject* imArray;
-    ABMultiValueRef multi = ABRecordCopyValue(self.record, kABPersonInstantMessageProperty);
-    CFIndex count = multi ? ABMultiValueGetCount(multi) : 0;
-    if (count) {
-        imArray = [NSMutableArray arrayWithCapacity:count];
-
-        for (CFIndex i = 0; i < ABMultiValueGetCount(multi); i++) {
-            NSMutableDictionary* newDict = [NSMutableDictionary dictionaryWithCapacity:3];
-            // iOS has label property (work, home, other) for each IM but W3C contact API doesn't use
-            CFDictionaryRef dict = (CFDictionaryRef)ABMultiValueCopyValueAtIndex(multi, i);
-            CFStringRef value;  // all values should be CFStringRefs / NSString*
-            bool bFound;
-            if ([fields containsObject:kW3ContactFieldValue]) {
-                // value = user name
-                bFound = CFDictionaryGetValueIfPresent(dict, kABPersonInstantMessageUsernameKey, (void*)&value);
-                if (bFound && (value != NULL)) {
-                    CFRetain(value);
-                    [newDict setObject:(__bridge id)value forKey:kW3ContactFieldValue];
-                    CFRelease(value);
-                } else {
-                    [newDict setObject:[NSNull null] forKey:kW3ContactFieldValue];
-                }
-            }
-            if ([fields containsObject:kW3ContactFieldType]) {
-                bFound = CFDictionaryGetValueIfPresent(dict, kABPersonInstantMessageServiceKey, (void*)&value);
-                if (bFound && (value != NULL)) {
-                    CFRetain(value);
-                    [newDict setObject:(id)[[CDVContact class] convertPropertyLabelToContactType : (__bridge NSString*)value] forKey:kW3ContactFieldType];
-                    CFRelease(value);
-                } else {
-                    [newDict setObject:[NSNull null] forKey:kW3ContactFieldType];
-                }
-            }
-            // always set ID
-            id identifier = [NSNumber numberWithUnsignedInt:ABMultiValueGetIdentifierAtIndex(multi, i)];
-            [newDict setObject:(identifier != nil) ? identifier:[NSNull null] forKey:kW3ContactFieldId];
-
-            [(NSMutableArray*)imArray addObject : newDict];
-            CFRelease(dict);
-        }
-    } else {
-        imArray = [NSNull null];
-    }
-
-    if (multi) {
-        CFRelease(multi);
-    }
-    return imArray;
-}
-
-/* Create array of Dictionaries to match JavaScript ContactOrganization object
- *	pref - not supported in iOS
- *  type - not supported in iOS
- *  name
- *	department
- *	title
- */
-
-- (NSObject*)extractOrganizations
-{
-    NSArray* fields = [self.returnFields objectForKey:kW3ContactOrganizations];
-
-    if (fields == nil) { // no name fields requested
-        return nil;
-    }
-    NSObject* array = nil;
-    NSMutableDictionary* newDict = [NSMutableDictionary dictionaryWithCapacity:5];
-    id value;
-    int validValueCount = 0;
-
-    for (id i in fields) {
-        id key = [[CDVContact defaultW3CtoAB] valueForKey:i];
-        if (key && [key isKindOfClass:[NSNumber class]]) {
-            value = (__bridge_transfer NSString*)ABRecordCopyValue(self.record, (ABPropertyID)[[[CDVContact defaultW3CtoAB] valueForKey:i] intValue]);
-            if (value != nil) {
-                // if there are no organization values we should return null for organization
-                // this counter keeps indicates if any organization values have been set
-                validValueCount++;
-            }
-            [newDict setObject:(value != nil) ? value:[NSNull null] forKey:i];
-        } else { // not a key iOS supports, set to null
-            [newDict setObject:[NSNull null] forKey:i];
-        }
-    }
-
-    if (([newDict count] > 0) && (validValueCount > 0)) {
-        // add pref and type
-        // they are not supported by iOS and thus these values never change
-        [newDict setObject:@"false" forKey:kW3ContactFieldPrimary];
-        [newDict setObject:[NSNull null] forKey:kW3ContactFieldType];
-        array = [NSMutableArray arrayWithCapacity:1];
-        [(NSMutableArray*)array addObject : newDict];
-    } else {
-        array = [NSNull null];
-    }
-    return array;
-}
-
-// W3C Contacts expects an array of photos.  Can return photos in more than one format, currently
-// just returning the default format
-// Save the photo data into tmp directory and return FileURI - temp directory is deleted upon application exit
-- (NSObject*)extractPhotos
-{
-    NSMutableArray* photos = nil;
-
-    if (ABPersonHasImageData(self.record)) {
-        CFDataRef photoData = ABPersonCopyImageData(self.record);
-        NSData* data = (__bridge NSData*)photoData;
-        // write to temp directory and store URI in photos array
-        // get the temp directory path
-        NSString* docsPath = [NSTemporaryDirectory()stringByStandardizingPath];
-        NSError* err = nil;
-        NSString* filePath = [NSString stringWithFormat:@"%@/photo_XXXXX", docsPath];
-        char template[filePath.length + 1];
-        strcpy(template, [filePath cStringUsingEncoding:NSASCIIStringEncoding]);
-        mkstemp(template);
-        filePath = [[NSFileManager defaultManager]
-            stringWithFileSystemRepresentation:template
-                                        length:strlen(template)];
-
-        // save file
-        if ([data writeToFile:filePath options:NSAtomicWrite error:&err]) {
-            photos = [NSMutableArray arrayWithCapacity:1];
-            NSMutableDictionary* newDict = [NSMutableDictionary dictionaryWithCapacity:2];
-            [newDict setObject:filePath forKey:kW3ContactFieldValue];
-            [newDict setObject:@"url" forKey:kW3ContactFieldType];
-            [newDict setObject:@"false" forKey:kW3ContactFieldPrimary];
-            [photos addObject:newDict];
-        }
-
-        CFRelease(photoData);
-    }
-    return photos;
-}
-
-/**
- *	given an array of W3C Contact field names, create a dictionary of field names to extract
- *	if field name represents an object, return all properties for that object:  "name" - returns all properties in ContactName
- *	if field name is an explicit property, return only those properties:  "name.givenName - returns a ContactName with only ContactName.givenName
- *  if field contains ONLY ["*"] return all fields
- *	dictionary format:
- *	key is W3Contact #define
- *		value is NSMutableArray* for complex keys:  name,addresses,organizations, phone, emails, ims
- *		value is [NSNull null] for simple keys
-*/
-+ (NSDictionary*)calcReturnFields:(NSArray*)fieldsArray // NSLog(@"getting self.returnFields");
-{
-    NSMutableDictionary* d = [NSMutableDictionary dictionaryWithCapacity:1];
-
-    if ((fieldsArray != nil) && [fieldsArray isKindOfClass:[NSArray class]]) {
-        if (([fieldsArray count] == 1) && [[fieldsArray objectAtIndex:0] isEqualToString:@"*"]) {
-            return [CDVContact defaultFields];  // return all fields
-        }
-
-        for (id i in fieldsArray) {
-            NSMutableArray* keys = nil;
-            NSString* fieldStr = nil;
-            if ([i isKindOfClass:[NSNumber class]]) {
-                fieldStr = [i stringValue];
-            } else {
-                fieldStr = i;
-            }
-
-            // see if this is specific property request in object - object.property
-            NSArray* parts = [fieldStr componentsSeparatedByString:@"."]; // returns original string if no separator found
-            NSString* name = [parts objectAtIndex:0];
-            NSString* property = nil;
-            if ([parts count] > 1) {
-                property = [parts objectAtIndex:1];
-            }
-            // see if this is a complex field by looking for its array of properties in objectAndProperties dictionary
-            id fields = [[CDVContact defaultObjectAndProperties] objectForKey:name];
-
-            // if find complex name (name,addresses,organizations, phone, emails, ims) in fields, add name as key
-            // with array of associated properties as the value
-            if ((fields != nil) && (property == nil)) { // request was for full object
-                keys = [NSMutableArray arrayWithArray:fields];
-                if (keys != nil) {
-                    [d setObject:keys forKey:name]; // will replace if prop array already exists
-                }
-            } else if ((fields != nil) && (property != nil)) {
-                // found an individual property request  in form of name.property
-                // verify is real property name by using it as key in W3CtoAB
-                id abEquiv = [[CDVContact defaultW3CtoAB] objectForKey:property];
-                if (abEquiv || [[CDVContact defaultW3CtoNull] containsObject:property]) {
-                    // if existing array add to it
-                    if ((keys = [d objectForKey:name]) != nil) {
-                        [keys addObject:property];
-                    } else {
-                        keys = [NSMutableArray arrayWithObject:property];
-                        [d setObject:keys forKey:name];
-                    }
-                } else {
-                    NSLog(@"Contacts.find -- request for invalid property ignored: %@.%@", name, property);
-                }
-            } else { // is an individual property, verify is real property name by using it as key in W3CtoAB
-                id valid = [[CDVContact defaultW3CtoAB] objectForKey:name];
-                if (valid || [[CDVContact defaultW3CtoNull] containsObject:name]) {
-                    [d setObject:[NSNull null] forKey:name];
-                }
-            }
-        }
-    }
-    if ([d count] == 0) {
-        // no array or nothing in the array. W3C spec says to return nothing
-        return nil;   // [Contact defaultFields];
-    }
-    return d;
-}
-
-/*
- * Search for the specified value in each of the fields specified in the searchFields dictionary.
- * NSString* value - the string value to search for (need clarification from W3C on how to search for dates)
- * NSDictionary* searchFields - a dictionary created via calcReturnFields where the key is the top level W3C
- *	object and the object is the array of specific fields within that object or null if it is a single property
- * RETURNS
- *	YES as soon as a match is found in any of the fields
- *	NO - the specified value does not exist in any of the fields in this contact
- *
- *  Note: I'm not a fan of returning in the middle of methods but have done it some in this method in order to
- *    keep the code simpler. bgibson
- */
-- (BOOL)foundValue:(NSString*)testValue inFields:(NSDictionary*)searchFields
-{
-    BOOL bFound = NO;
-
-    if ((testValue == nil) || ![testValue isKindOfClass:[NSString class]] || ([testValue length] == 0)) {
-        // nothing to find so return NO
-        return NO;
-    }
-    NSInteger valueAsInt = [testValue integerValue];
-
-    // per W3C spec, always include id in search
-    int recordId = ABRecordGetRecordID(self.record);
-    if (valueAsInt && (recordId == valueAsInt)) {
-        return YES;
-    }
-
-    if (searchFields == nil) {
-        // no fields to search
-        return NO;
-    }
-
-    if ([searchFields valueForKey:kW3ContactNickname]) {
-        bFound = [self testStringValue:testValue forW3CProperty:kW3ContactNickname];
-        if (bFound == YES) {
-            return bFound;
-        }
-    }
-
-    if ([searchFields valueForKeyIsArray:kW3ContactName]) {
-        // test name fields.  All are string properties obtained via ABRecordCopyValue except kW3ContactFormattedName
-        NSArray* fields = [searchFields valueForKey:kW3ContactName];
-
-        for (NSString* testItem in fields) {
-            if ([testItem isEqualToString:kW3ContactFormattedName]) {
-                NSString* propValue = (__bridge_transfer NSString*)ABRecordCopyCompositeName(self.record);
-                if ((propValue != nil) && ([propValue length] > 0)) {
-                    NSRange range = [propValue rangeOfString:testValue options:NSCaseInsensitiveSearch];
-                    bFound = (range.location != NSNotFound);
-                    propValue = nil;
-                }
-            } else {
-                bFound = [self testStringValue:testValue forW3CProperty:testItem];
-            }
-
-            if (bFound) {
-                break;
-            }
-        }
-    }
-    if (!bFound && [searchFields valueForKeyIsArray:kW3ContactPhoneNumbers]) {
-        bFound = [self searchContactFields:(NSArray*)[searchFields valueForKey:kW3ContactPhoneNumbers]
-                       forMVStringProperty:kABPersonPhoneProperty withValue:testValue];
-    }
-    if (!bFound && [searchFields valueForKeyIsArray:kW3ContactEmails]) {
-        bFound = [self searchContactFields:(NSArray*)[searchFields valueForKey:kW3ContactEmails]
-                       forMVStringProperty:kABPersonEmailProperty withValue:testValue];
-    }
-
-    if (!bFound && [searchFields valueForKeyIsArray:kW3ContactAddresses]) {
-        bFound = [self searchContactFields:[searchFields valueForKey:kW3ContactAddresses]
-                   forMVDictionaryProperty:kABPersonAddressProperty withValue:testValue];
-    }
-
-    if (!bFound && [searchFields valueForKeyIsArray:kW3ContactIms]) {
-        bFound = [self searchContactFields:[searchFields valueForKey:kW3ContactIms]
-                   forMVDictionaryProperty:kABPersonInstantMessageProperty withValue:testValue];
-    }
-
-    if (!bFound && [searchFields valueForKeyIsArray:kW3ContactOrganizations]) {
-        NSArray* fields = [searchFields valueForKey:kW3ContactOrganizations];
-
-        for (NSString* testItem in fields) {
-            bFound = [self testStringValue:testValue forW3CProperty:testItem];
-            if (bFound == YES) {
-                break;
-            }
-        }
-    }
-    if (!bFound && [searchFields valueForKey:kW3ContactNote]) {
-        bFound = [self testStringValue:testValue forW3CProperty:kW3ContactNote];
-    }
-
-    // if searching for a date field is requested, get the date field as a localized string then look for match against testValue in date string
-    // searching for photos is not supported
-    if (!bFound && [searchFields valueForKey:kW3ContactBirthday]) {
-        bFound = [self testDateValue:testValue forW3CProperty:kW3ContactBirthday];
-    }
-    if (!bFound && [searchFields valueForKeyIsArray:kW3ContactUrls]) {
-        bFound = [self searchContactFields:(NSArray*)[searchFields valueForKey:kW3ContactUrls]
-                       forMVStringProperty:kABPersonURLProperty withValue:testValue];
-    }
-
-    return bFound;
-}
-
-/*
- * Test for the existence of a given string within the value of a ABPersonRecord string property based on the W3c property name.
- *
- * IN:
- *	NSString* testValue - the value to find - search is case insensitive
- *  NSString* property - the W3c property string
- * OUT:
- * BOOL YES if the given string was found within the property value
- *		NO if the testValue was not found, W3C property string was invalid or the AddressBook property was not a string
- */
-- (BOOL)testStringValue:(NSString*)testValue forW3CProperty:(NSString*)property
-{
-    BOOL bFound = NO;
-
-    if ([[CDVContact defaultW3CtoAB] valueForKeyIsNumber:property]) {
-        ABPropertyID propId = [[[CDVContact defaultW3CtoAB] objectForKey:property] intValue];
-        if (ABPersonGetTypeOfProperty(propId) == kABStringPropertyType) {
-            NSString* propValue = (__bridge_transfer NSString*)ABRecordCopyValue(self.record, propId);
-            if ((propValue != nil) && ([propValue length] > 0)) {
-                NSPredicate* containPred = [NSPredicate predicateWithFormat:@"SELF contains[cd] %@", testValue];
-                bFound = [containPred evaluateWithObject:propValue];
-                // NSRange range = [propValue rangeOfString:testValue options: NSCaseInsensitiveSearch];
-                // bFound = (range.location != NSNotFound);
-            }
-        }
-    }
-    return bFound;
-}
-
-/*
- * Test for the existence of a given Date string within the value of a ABPersonRecord datetime property based on the W3c property name.
- *
- * IN:
- *	NSString* testValue - the value to find - search is case insensitive
- *  NSString* property - the W3c property string
- * OUT:
- * BOOL YES if the given string was found within the localized date string value
- *		NO if the testValue was not found, W3C property string was invalid or the AddressBook property was not a DateTime
- */
-- (BOOL)testDateValue:(NSString*)testValue forW3CProperty:(NSString*)property
-{
-    BOOL bFound = NO;
-
-    if ([[CDVContact defaultW3CtoAB] valueForKeyIsNumber:property]) {
-        ABPropertyID propId = [[[CDVContact defaultW3CtoAB] objectForKey:property] intValue];
-        if (ABPersonGetTypeOfProperty(propId) == kABDateTimePropertyType) {
-            NSDate* date = (__bridge_transfer NSDate*)ABRecordCopyValue(self.record, propId);
-            if (date != nil) {
-                NSString* dateString = [date descriptionWithLocale:[NSLocale currentLocale]];
-                NSPredicate* containPred = [NSPredicate predicateWithFormat:@"SELF contains[cd] %@", testValue];
-                bFound = [containPred evaluateWithObject:dateString];
-            }
-        }
-    }
-    return bFound;
-}
-
-/*
- * Search the specified fields within an AddressBook multivalue string property for the specified test value.
- * Used for phoneNumbers, emails and urls.
- * IN:
- *	NSArray* fields - the fields to search for within the multistring property (value and/or type)
- *	ABPropertyID - the property to search
- *	NSString* testValue - the value to search for. Will convert between W3C types and AB types.  Will only
- *		search for types if the testValue is a valid ContactField type.
- * OUT:
- *	YES if the test value was found in one of the specified fields
- *	NO if the test value was not found
- */
-- (BOOL)searchContactFields:(NSArray*)fields forMVStringProperty:(ABPropertyID)propId withValue:testValue
-{
-    BOOL bFound = NO;
-
-    for (NSString* type in fields) {
-        NSString* testString = nil;
-        if ([type isEqualToString:kW3ContactFieldType]) {
-            if ([CDVContact isValidW3ContactType:testValue]) {
-                // only search types if the filter string is a valid ContactField.type
-                testString = (NSString*)[CDVContact convertContactTypeToPropertyLabel:testValue];
-            }
-        } else {
-            testString = testValue;
-        }
-
-        if (testString != nil) {
-            bFound = [self testMultiValueStrings:testString forProperty:propId ofType:type];
-        }
-        if (bFound == YES) {
-            break;
-        }
-    }
-
-    return bFound;
-}
-
-/*
- * Searches a multiString value of the specified type for the specified test value.
- *
- * IN:
- *	NSString* testValue - the value to test for
- *	ABPropertyID propId - the property id of the multivalue property to search
- *	NSString* type - the W3C contact type to search for (value or type)
- * OUT:
- * YES is the test value was found
- * NO if the test value was not found
- */
-- (BOOL)testMultiValueStrings:(NSString*)testValue forProperty:(ABPropertyID)propId ofType:(NSString*)type
-{
-    BOOL bFound = NO;
-
-    if (ABPersonGetTypeOfProperty(propId) == kABMultiStringPropertyType) {
-        NSArray* valueArray = nil;
-        if ([type isEqualToString:kW3ContactFieldType]) {
-            valueArray = [self labelsForProperty:propId inRecord:self.record];
-        } else if ([type isEqualToString:kW3ContactFieldValue]) {
-            valueArray = [self valuesForProperty:propId inRecord:self.record];
-        }
-        if (valueArray) {
-            NSString* valuesAsString = [valueArray componentsJoinedByString:@" "];
-            NSPredicate* containPred = [NSPredicate predicateWithFormat:@"SELF contains[cd] %@", testValue];
-            bFound = [containPred evaluateWithObject:valuesAsString];
-        }
-    }
-    return bFound;
-}
-
-/*
- * Returns the array of values for a multivalue string property of the specified property id
- */
-- (__autoreleasing NSArray*)valuesForProperty:(ABPropertyID)propId inRecord:(ABRecordRef)aRecord
-{
-    ABMultiValueRef multi = ABRecordCopyValue(aRecord, propId);
-    NSArray* values = (__bridge_transfer NSArray*)ABMultiValueCopyArrayOfAllValues(multi);
-
-    CFRelease(multi);
-    return values;
-}
-
-/*
- * Returns the array of labels for a multivalue string property of the specified property id
- */
-- (NSArray*)labelsForProperty:(ABPropertyID)propId inRecord:(ABRecordRef)aRecord
-{
-    ABMultiValueRef multi = ABRecordCopyValue(aRecord, propId);
-    CFIndex count = ABMultiValueGetCount(multi);
-    NSMutableArray* labels = [NSMutableArray arrayWithCapacity:count];
-
-    for (int i = 0; i < count; i++) {
-        NSString* label = (__bridge_transfer NSString*)ABMultiValueCopyLabelAtIndex(multi, i);
-        if (label) {
-            [labels addObject:label];
-        }
-    }
-
-    CFRelease(multi);
-    return labels;
-}
-
-/* search for values within MultiValue Dictionary properties Address or IM property
- * IN:
- * (NSArray*) fields - the array of W3C field names to search within
- * (ABPropertyID) propId - the AddressBook property that returns a multivalue dictionary
- * (NSString*) testValue - the string to search for within the specified fields
- *
- */
-- (BOOL)searchContactFields:(NSArray*)fields forMVDictionaryProperty:(ABPropertyID)propId withValue:(NSString*)testValue
-{
-    BOOL bFound = NO;
-
-    NSArray* values = [self valuesForProperty:propId inRecord:self.record];  // array of dictionaries (as CFDictionaryRef)
-    int dictCount = [values count];
-
-    // for ims dictionary contains with service (w3C type) and username (W3c value)
-    // for addresses dictionary contains street, city, state, zip, country
-    for (int i = 0; i < dictCount; i++) {
-        CFDictionaryRef dict = (__bridge CFDictionaryRef)[values objectAtIndex:i];
-
-        for (NSString* member in fields) {
-            NSString* abKey = [[CDVContact defaultW3CtoAB] valueForKey:member]; // im and address fields are all strings
-            CFStringRef abValue = nil;
-            if (abKey) {
-                NSString* testString = nil;
-                if ([member isEqualToString:kW3ContactImType]) {
-                    if ([CDVContact isValidW3ContactType:testValue]) {
-                        // only search service/types if the filter string is a valid ContactField.type
-                        testString = (NSString*)[CDVContact convertContactTypeToPropertyLabel:testValue];
-                    }
-                } else {
-                    testString = testValue;
-                }
-                if (testString != nil) {
-                    BOOL bExists = CFDictionaryGetValueIfPresent(dict, (__bridge const void*)abKey, (void*)&abValue);
-                    if (bExists) {
-                        CFRetain(abValue);
-                        NSPredicate* containPred = [NSPredicate predicateWithFormat:@"SELF contains[cd] %@", testString];
-                        bFound = [containPred evaluateWithObject:(__bridge id)abValue];
-                        CFRelease(abValue);
-                    }
-                }
-            }
-            if (bFound == YES) {
-                break;
-            }
-        } // end of for each member in fields
-
-        if (bFound == YES) {
-            break;
-        }
-    } // end of for each dictionary
-
-    return bFound;
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContacts.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContacts.h b/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContacts.h
deleted file mode 100644
index e3deb21..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContacts.h
+++ /dev/null
@@ -1,151 +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.
- */
-
-#import <Foundation/Foundation.h>
-#import <AddressBook/ABAddressBook.h>
-#import <AddressBookUI/AddressBookUI.h>
-#import <Cordova/CDVPlugin.h>
-#import "CDVContact.h"
-
-@interface CDVContacts : CDVPlugin <ABNewPersonViewControllerDelegate,
-                         ABPersonViewControllerDelegate,
-                         ABPeoplePickerNavigationControllerDelegate
-                         >
-{
-    ABAddressBookRef addressBook;
-}
-
-/*
- * newContact - create a new contact via the GUI
- *
- * arguments:
- *	1: successCallback: this is the javascript function that will be called with the newly created contactId
- */
-- (void)newContact:(CDVInvokedUrlCommand*)command;
-
-/*
- * displayContact  - IN PROGRESS
- *
- * arguments:
- *	1: recordID of the contact to display in the iPhone contact display
- *	2: successCallback - currently not used
- *  3: error callback
- * options:
- *	allowsEditing: set to true to allow the user to edit the contact - currently not supported
- */
-- (void)displayContact:(CDVInvokedUrlCommand*)command;
-
-/*
- * chooseContact
- *
- * arguments:
- *	1: this is the javascript function that will be called with the contact data as a JSON object (as the first param)
- * options:
- *	allowsEditing: set to true to not choose the contact, but to edit it in the iPhone contact editor
- */
-- (void)chooseContact:(CDVInvokedUrlCommand*)command;
-
-- (void)newPersonViewController:(ABNewPersonViewController*)newPersonViewController didCompleteWithNewPerson:(ABRecordRef)person;
-- (BOOL)personViewController:(ABPersonViewController*)personViewController shouldPerformDefaultActionForPerson:(ABRecordRef)person
-                    property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifierForValue;
-
-/*
- * search - searches for contacts.  Only person records are currently supported.
- *
- * arguments:
- *  1: successcallback - this is the javascript function that will be called with the array of found contacts
- *  2:  errorCallback - optional javascript function to be called in the event of an error with an error code.
- * options:  dictionary containing ContactFields and ContactFindOptions
- *	fields - ContactFields array
- *  findOptions - ContactFindOptions object as dictionary
- *
- */
-- (void)search:(CDVInvokedUrlCommand*)command;
-
-/*
- * save - saves a new contact or updates and existing contact
- *
- * arguments:
- *  1: success callback - this is the javascript function that will be called with the JSON representation of the saved contact
- *		search calls a fixed navigator.service.contacts._findCallback which then calls the success callback stored before making the call into obj-c
- */
-- (void)save:(CDVInvokedUrlCommand*)command;
-
-/*
- * remove - removes a contact from the address book
- *
- * arguments:
- *  1:  1: successcallback - this is the javascript function that will be called with a (now) empty contact object
- *
- * options:  dictionary containing Contact object to remove
- *	contact - Contact object as dictionary
- */
-- (void)remove:(CDVInvokedUrlCommand*)command;
-
-// - (void) dealloc;
-
-@end
-
-@interface CDVContactsPicker : ABPeoplePickerNavigationController
-{
-    BOOL allowsEditing;
-    NSString* callbackId;
-    NSDictionary* options;
-    NSDictionary* pickedContactDictionary;
-}
-
-@property BOOL allowsEditing;
-@property (copy) NSString* callbackId;
-@property (nonatomic, strong) NSDictionary* options;
-@property (nonatomic, strong) NSDictionary* pickedContactDictionary;
-
-@end
-
-@interface CDVNewContactsController : ABNewPersonViewController
-{
-    NSString* callbackId;
-}
-@property (copy) NSString* callbackId;
-@end
-
-/* ABPersonViewController does not have any UI to dismiss.  Adding navigationItems to it does not work properly,  the navigationItems are lost when the app goes into the background.
-    The solution was to create an empty NavController in front of the ABPersonViewController. This
-    causes the ABPersonViewController to have a back button. By subclassing the ABPersonViewController,
-    we can override viewWillDisappear and take down the entire NavigationController at that time.
- */
-@interface CDVDisplayContactViewController : ABPersonViewController
-{}
-@property (nonatomic, strong) CDVPlugin* contactsPlugin;
-
-@end
-@interface CDVAddressBookAccessError : NSObject
-{}
-@property (assign) CDVContactError errorCode;
-- (CDVAddressBookAccessError*)initWithCode:(CDVContactError)code;
-@end
-
-typedef void (^ CDVAddressBookWorkerBlock)(
-    ABAddressBookRef         addressBook,
-    CDVAddressBookAccessError* error
-    );
-@interface CDVAddressBookHelper : NSObject
-{}
-
-- (void)createAddressBook:(CDVAddressBookWorkerBlock)workerBlock;
-@end


[42/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/src/android/ContactManager.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/android/ContactManager.java b/cordova-lib/spec-plugman/plugins/Contacts/src/android/ContactManager.java
new file mode 100755
index 0000000..1c086e1
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/src/android/ContactManager.java
@@ -0,0 +1,122 @@
+/*
+       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.
+*/
+package org.apache.cordova.core;
+
+import org.apache.cordova.CallbackContext;
+import org.apache.cordova.CordovaPlugin;
+import org.apache.cordova.PluginResult;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+import android.util.Log;
+
+public class ContactManager extends CordovaPlugin {
+
+    private ContactAccessor contactAccessor;
+    private static final String LOG_TAG = "Contact Query";
+
+    public static final int UNKNOWN_ERROR = 0;
+    public static final int INVALID_ARGUMENT_ERROR = 1;
+    public static final int TIMEOUT_ERROR = 2;
+    public static final int PENDING_OPERATION_ERROR = 3;
+    public static final int IO_ERROR = 4;
+    public static final int NOT_SUPPORTED_ERROR = 5;
+    public static final int PERMISSION_DENIED_ERROR = 20;
+
+    /**
+     * Constructor.
+     */
+    public ContactManager() {
+    }
+
+    /**
+     * Executes the request and returns PluginResult.
+     *
+     * @param action            The action to execute.
+     * @param args              JSONArray of arguments for the plugin.
+     * @param callbackContext   The callback context used when calling back into JavaScript.
+     * @return                  True if the action was valid, false otherwise.
+     */
+    public boolean execute(String action, JSONArray args, final CallbackContext callbackContext) throws JSONException {
+        /**
+         * Check to see if we are on an Android 1.X device.  If we are return an error as we
+         * do not support this as of Cordova 1.0.
+         */
+        if (android.os.Build.VERSION.RELEASE.startsWith("1.")) {
+            callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, ContactManager.NOT_SUPPORTED_ERROR));
+            return true;
+        }
+
+        /**
+         * Only create the contactAccessor after we check the Android version or the program will crash
+         * older phones.
+         */
+        if (this.contactAccessor == null) {
+            this.contactAccessor = new ContactAccessorSdk5(this.webView, this.cordova);
+        }
+
+        if (action.equals("search")) {
+            final JSONArray filter = args.getJSONArray(0);
+            final JSONObject options = args.getJSONObject(1);
+            this.cordova.getThreadPool().execute(new Runnable() {
+                public void run() {
+                    JSONArray res = contactAccessor.search(filter, options);
+                    callbackContext.success(res);
+                }
+            });
+        }
+        else if (action.equals("save")) {
+            final JSONObject contact = args.getJSONObject(0);
+            this.cordova.getThreadPool().execute(new Runnable() {
+                public void run() {
+                    JSONObject res = null;
+                    String id = contactAccessor.save(contact);
+                    if (id != null) {
+                        try {
+                            res = contactAccessor.getContactById(id);
+                        } catch (JSONException e) {
+                            Log.e(LOG_TAG, "JSON fail.", e);
+                        }
+                    }
+                    if (res != null) {
+                        callbackContext.success(res);
+                    } else {
+                        callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, UNKNOWN_ERROR));
+                    }
+                }
+            });
+        }
+        else if (action.equals("remove")) {
+            final String contactId = args.getString(0);
+            this.cordova.getThreadPool().execute(new Runnable() {
+                public void run() {
+                    if (contactAccessor.remove(contactId)) {
+                        callbackContext.success();
+                    } else {
+                        callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, UNKNOWN_ERROR));
+                    }
+                }
+            });
+        }
+        else {
+            return false;
+        }
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactActivity.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactActivity.js b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactActivity.js
new file mode 100644
index 0000000..f0f82b3
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactActivity.js
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2012 Research In Motion Limited.
+ *
+ * Licensed 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 ContactActivity = function (args) {
+    this.direction = args.direction || null;
+    this.description = args.description || "";
+    this.mimeType = args.mimeType || "";
+    this.timestamp = new Date(parseInt(args.timestamp, 10)) || null;
+};
+
+Object.defineProperty(ContactActivity, "INCOMING", {"value": true});
+Object.defineProperty(ContactActivity, "OUTGOING", {"value": false});
+
+module.exports = ContactActivity;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactAddress.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactAddress.js b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactAddress.js
new file mode 100644
index 0000000..1ba9fe4
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactAddress.js
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2012 Research In Motion Limited.
+ *
+ * Licensed 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 ContactAddress = function (properties) {
+    this.type = properties && properties.type ? properties.type : "";
+    this.streetAddress = properties && properties.streetAddress ? properties.streetAddress : "";
+    this.streetOther = properties && properties.streetOther ? properties.streetOther : "";
+    this.locality = properties && properties.locality ? properties.locality : "";
+    this.region = properties && properties.region ? properties.region : "";
+    this.postalCode = properties && properties.postalCode ? properties.postalCode : "";
+    this.country = properties && properties.country ? properties.country : "";
+};
+
+Object.defineProperty(ContactAddress, "HOME", {"value": "home"});
+Object.defineProperty(ContactAddress, "WORK", {"value": "work"});
+Object.defineProperty(ContactAddress, "OTHER", {"value": "other"});
+
+module.exports = ContactAddress;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactError.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactError.js b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactError.js
new file mode 100644
index 0000000..f20f85e
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactError.js
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2012 Research In Motion Limited.
+ *
+ * Licensed 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 ContactError = function (code, msg) {
+    this.code = code;
+    this.message = msg;
+};
+
+Object.defineProperty(ContactError, "UNKNOWN_ERROR", { "value": 0 });
+Object.defineProperty(ContactError, "INVALID_ARGUMENT_ERROR", { "value": 1 });
+Object.defineProperty(ContactError, "TIMEOUT_ERROR", { "value": 2 });
+Object.defineProperty(ContactError, "PENDING_OPERATION_ERROR", { "value": 3 });
+Object.defineProperty(ContactError, "IO_ERROR", { "value": 4 });
+Object.defineProperty(ContactError, "NOT_SUPPORTED_ERROR", { "value": 5 });
+Object.defineProperty(ContactError, "PERMISSION_DENIED_ERROR", { "value": 20 });
+
+module.exports = ContactError;
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactField.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactField.js b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactField.js
new file mode 100644
index 0000000..aad735c
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactField.js
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2012 Research In Motion Limited.
+ *
+ * Licensed 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 ContactField = function (type, value) {
+    this.type = type || "";
+    this.value = value || "";
+};
+
+Object.defineProperty(ContactField, "HOME", {"value": "home"});
+Object.defineProperty(ContactField, "WORK", {"value": "work"});
+Object.defineProperty(ContactField, "OTHER", {"value": "other"});
+Object.defineProperty(ContactField, "MOBILE", {"value": "mobile"});
+Object.defineProperty(ContactField, "DIRECT", {"value": "direct"});
+
+module.exports = ContactField;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactFindOptions.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactFindOptions.js b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactFindOptions.js
new file mode 100644
index 0000000..8be830d
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactFindOptions.js
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2012 Research In Motion Limited.
+ *
+ * Licensed 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.
+ */
+
+/**
+ * ContactFindOptions.
+ * @constructor
+ * @param filter search fields
+ * @param sort sort fields and order
+ * @param limit max number of contacts to return
+ * @param favorite if set, only favorite contacts will be returned
+ */
+
+var ContactFindOptions = function (filter, sort, limit, favorite) {
+    this.filter = filter || null;
+    this.sort = sort || null;
+    this.limit = limit || -1; // -1 for returning all results
+    this.favorite = favorite || false;
+    this.includeAccounts = [];
+    this.excludeAccounts = [];
+};
+
+Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_GIVEN_NAME", { "value": 0 });
+Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_FAMILY_NAME", { "value": 1 });
+Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_ORGANIZATION_NAME", { "value": 2 });
+Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_PHONE", { "value": 3 });
+Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_EMAIL", { "value": 4 });
+Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_BBMPIN", { "value": 5 });
+Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_LINKEDIN", { "value": 6 });
+Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_TWITTER", { "value": 7 });
+Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_VIDEO_CHAT", { "value": 8 });
+
+Object.defineProperty(ContactFindOptions, "SORT_FIELD_GIVEN_NAME", { "value": 0 });
+Object.defineProperty(ContactFindOptions, "SORT_FIELD_FAMILY_NAME", { "value": 1 });
+Object.defineProperty(ContactFindOptions, "SORT_FIELD_ORGANIZATION_NAME", { "value": 2 });
+
+module.exports = ContactFindOptions;
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactName.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactName.js b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactName.js
new file mode 100644
index 0000000..9b74753
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactName.js
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2012 Research In Motion Limited.
+ *
+ * Licensed 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.
+ */
+
+function toFormattedName(properties) {
+    var formatted = "";
+    if (properties && properties.givenName) {
+        formatted = properties.givenName;
+        if (properties && properties.familyName) {
+            formatted += " " + properties.familyName;
+        }
+    }
+    return formatted;
+}
+
+var ContactName = function (properties) {
+    this.familyName = properties && properties.familyName ? properties.familyName : "";
+    this.givenName = properties && properties.givenName ? properties.givenName : "";
+    this.formatted = toFormattedName(properties);
+    this.middleName = properties && properties.middleName ? properties.middleName : "";
+    this.honorificPrefix = properties && properties.honorificPrefix ? properties.honorificPrefix : "";
+    this.honorificSuffix = properties && properties.honorificSuffix ? properties.honorificSuffix : "";
+    this.phoneticFamilyName = properties && properties.phoneticFamilyName ? properties.phoneticFamilyName : "";
+    this.phoneticGivenName = properties && properties.phoneticGivenName ? properties.phoneticGivenName : "";
+};
+
+module.exports = ContactName;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactNews.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactNews.js b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactNews.js
new file mode 100644
index 0000000..9fb86dc
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactNews.js
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2012 Research In Motion Limited.
+ *
+ * Licensed 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 ContactNews = function (args) {
+    this.title = args.title || "";
+    this.body = args.body || "";
+    this.articleSource = args.articleSource || "";
+    this.companies = args.companies || [];
+    this.publishedAt = new Date(parseInt(args.publishedAt, 10)) || null;
+    this.uri = args.uri || "";
+    this.type = args.type || "";
+};
+
+module.exports = ContactNews;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactOrganization.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactOrganization.js b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactOrganization.js
new file mode 100644
index 0000000..987310f
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactOrganization.js
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2012 Research In Motion Limited.
+ *
+ * Licensed 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 ContactOrganization = function (properties) {
+    this.name = properties && properties.name ? properties.name : "";
+    this.department = properties && properties.department ? properties.department : "";
+    this.title = properties && properties.title ? properties.title : "";
+};
+
+module.exports = ContactOrganization;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactPhoto.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactPhoto.js b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactPhoto.js
new file mode 100644
index 0000000..eeaa263
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactPhoto.js
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2012 Research In Motion Limited.
+ *
+ * Licensed 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 ContactPhoto = function (originalFilePath, pref) {
+    this.originalFilePath = originalFilePath || "";
+    this.pref = pref || false;
+    this.largeFilePath = "";
+    this.smallFilePath = "";
+};
+
+module.exports = ContactPhoto;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/contactConsts.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/contactConsts.js b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/contactConsts.js
new file mode 100644
index 0000000..ef25206
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/contactConsts.js
@@ -0,0 +1,225 @@
+/*
+* Copyright 2012 Research In Motion Limited.
+*
+* Licensed 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 ATTRIBUTE_KIND,
+    ATTRIBUTE_SUBKIND,
+    kindAttributeMap = {},
+    subKindAttributeMap = {},
+    _TITLE = 26,
+    _START_DATE = 43,
+    _END_DATE = 44;
+
+function populateKindAttributeMap() {
+    ATTRIBUTE_KIND = {
+        Invalid: 0,
+        Phone: 1,
+        Fax: 2,
+        Pager: 3,
+        Email: 4,
+        Website: 5,
+        Feed: 6,
+        Profile: 7,
+        Family: 8,
+        Person: 9,
+        Date: 10,
+        Group: 11,
+        Name: 12,
+        StockSymbol: 13,
+        Ranking: 14,
+        OrganizationAffiliation: 15,
+        Education: 16,
+        Note: 17,
+        InstantMessaging: 18,
+        VideoChat: 19,
+        ConnectionCount: 20,
+        Hidden: 21,
+        Biography: 22,
+        Sound: 23,
+        Notification: 24,
+        MessageSound: 25,
+        MessageNotification: 26
+    };
+
+    kindAttributeMap[ATTRIBUTE_KIND.Phone] = "phoneNumbers";
+    kindAttributeMap[ATTRIBUTE_KIND.Fax] = "faxNumbers";
+    kindAttributeMap[ATTRIBUTE_KIND.Pager] = "pagerNumber";
+    kindAttributeMap[ATTRIBUTE_KIND.Email] = "emails";
+    kindAttributeMap[ATTRIBUTE_KIND.Website] = "urls";
+    kindAttributeMap[ATTRIBUTE_KIND.Profile] = "socialNetworks";
+    kindAttributeMap[ATTRIBUTE_KIND.OrganizationAffiliation] = "organizations";
+    kindAttributeMap[ATTRIBUTE_KIND.Education] = "education";
+    kindAttributeMap[ATTRIBUTE_KIND.Note] = "note";
+    kindAttributeMap[ATTRIBUTE_KIND.InstantMessaging] = "ims";
+    kindAttributeMap[ATTRIBUTE_KIND.VideoChat] = "videoChat";
+    kindAttributeMap[ATTRIBUTE_KIND.Sound] = "ringtone";
+}
+
+function populateSubKindAttributeMap() {
+    ATTRIBUTE_SUBKIND = {
+        Invalid: 0,
+        Other: 1,
+        Home: 2,
+        Work: 3,
+        PhoneMobile: 4,
+        FaxDirect: 5,
+        Blog: 6,
+        WebsiteResume: 7,
+        WebsitePortfolio: 8,
+        WebsitePersonal: 9,
+        WebsiteCompany: 10,
+        ProfileFacebook: 11,
+        ProfileTwitter: 12,
+        ProfileLinkedIn: 13,
+        ProfileGist: 14,
+        ProfileTungle: 15,
+        FamilySpouse: 16,
+        FamilyChild: 17,
+        FamilyParent: 18,
+        PersonManager: 19,
+        PersonAssistant: 20,
+        DateBirthday: 21,
+        DateAnniversary: 22,
+        GroupDepartment: 23,
+        NameGiven: 24,
+        NameSurname: 25,
+        Title: _TITLE,
+        NameSuffix: 27,
+        NameMiddle: 28,
+        NameNickname: 29,
+        NameAlias: 30,
+        NameDisplayName: 31,
+        NamePhoneticGiven: 32,
+        NamePhoneticSurname: 33,
+        StockSymbolNyse: 34,
+        StockSymbolNasdaq: 35,
+        StockSymbolTse: 36,
+        StockSymbolLse: 37,
+        StockSymbolTsx: 38,
+        RankingKlout: 39,
+        RankingTrstRank: 40,
+        OrganizationAffiliationName: 41,
+        OrganizationAffiliationPhoneticName: 42,
+        OrganizationAffiliationTitle: _TITLE,
+        StartDate: _START_DATE,
+        EndDate: _END_DATE,
+        OrganizationAffiliationDetails: 45,
+        EducationInstitutionName: 46,
+        EducationStartDate: _START_DATE,
+        EducationEndDate: _END_DATE,
+        EducationDegree: 47,
+        EducationConcentration: 48,
+        EducationActivities: 49,
+        EducationNotes: 50,
+        InstantMessagingBbmPin: 51,
+        InstantMessagingAim: 52,
+        InstantMessagingAliwangwang: 53,
+        InstantMessagingGoogleTalk: 54,
+        InstantMessagingSametime: 55,
+        InstantMessagingIcq: 56,
+        InstantMessagingIrc: 57,
+        InstantMessagingJabber: 58,
+        InstantMessagingMsLcs: 59,
+        InstantMessagingMsn: 60,
+        InstantMessagingQq: 61,
+        InstantMessagingSkype: 62,
+        InstantMessagingYahooMessenger: 63,
+        InstantMessagingYahooMessengerJapan: 64,
+        VideoChatBbPlaybook: 65,
+        HiddenLinkedIn: 66,
+        HiddenFacebook: 67,
+        HiddenTwitter: 68,
+        ConnectionCountLinkedIn: 69,
+        ConnectionCountFacebook: 70,
+        ConnectionCountTwitter: 71,
+        HiddenChecksum: 72,
+        HiddenSpeedDial: 73,
+        BiographyFacebook: 74,
+        BiographyTwitter: 75,
+        BiographyLinkedIn: 76,
+        SoundRingtone: 77,
+        SimContactType: 78,
+        EcoID: 79,
+        Personal: 80,
+        StockSymbolAll: 81,
+        NotificationVibration: 82,
+        NotificationLED: 83,
+        MessageNotificationVibration: 84,
+        MessageNotificationLED: 85,
+        MessageNotificationDuringCall: 86,
+        VideoChatPin: 87
+    };
+
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.Other] = "other";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.Home] = "home";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.Work] = "work";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.PhoneMobile] = "mobile";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.FaxDirect] = "direct";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.Blog] = "blog";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.WebsiteResume] = "resume";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.WebsitePortfolio] = "portfolio";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.WebsitePersonal] = "personal";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.WebsiteCompany] = "company";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.ProfileFacebook] = "facebook";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.ProfileTwitter] = "twitter";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.ProfileLinkedIn] = "linkedin";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.ProfileGist] = "gist";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.ProfileTungle] = "tungle";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.DateBirthday] = "birthday";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.DateAnniversary] = "anniversary";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.NameGiven] = "givenName";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.NameSurname] = "familyName";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.Title] = "honorificPrefix";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.NameSuffix] = "honorificSuffix";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.NameMiddle] = "middleName";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.NamePhoneticGiven] = "phoneticGivenName";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.NamePhoneticSurname] = "phoneticFamilyName";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.NameNickname] = "nickname";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.NameDisplayName] = "displayName";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.OrganizationAffiliationName] = "name";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.OrganizationAffiliationDetails] = "department";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.Title] = "title";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingBbmPin] = "BbmPin";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingAim] = "Aim";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingAliwangwang] = "Aliwangwang";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingGoogleTalk] = "GoogleTalk";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingSametime] = "Sametime";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingIcq] = "Icq";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingJabber] = "Jabber";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingMsLcs] = "MsLcs";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingSkype] = "Skype";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingYahooMessenger] = "YahooMessenger";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingYahooMessengerJapan] = "YahooMessegerJapan";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.VideoChatBbPlaybook] = "BbPlaybook";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.SoundRingtone] = "ringtone";
+    subKindAttributeMap[ATTRIBUTE_SUBKIND.Personal] = "personal";
+}
+
+module.exports = {
+    getKindAttributeMap: function () {
+        if (!ATTRIBUTE_KIND) {
+            populateKindAttributeMap();
+        }
+
+        return kindAttributeMap;
+    },
+    getSubKindAttributeMap: function () {
+        if (!ATTRIBUTE_SUBKIND) {
+            populateSubKindAttributeMap();
+        }
+
+        return subKindAttributeMap;
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/contactUtils.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/contactUtils.js b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/contactUtils.js
new file mode 100644
index 0000000..cd022c4
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/contactUtils.js
@@ -0,0 +1,223 @@
+/*
+ * Copyright 2012 Research In Motion Limited.
+ *
+ * Licensed 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 self,
+    ContactFindOptions = require("./ContactFindOptions"),
+    ContactError = require("./ContactError"),
+    ContactName = require("./ContactName"),
+    ContactOrganization = require("./ContactOrganization"),
+    ContactAddress = require("./ContactAddress"),
+    ContactField = require("./ContactField"),
+    contactConsts = require("./contactConsts"),
+    ContactPhoto = require("./ContactPhoto"),
+    ContactNews = require("./ContactNews"),
+    ContactActivity = require("./ContactActivity");
+
+function populateFieldArray(contactProps, field, ClassName) {
+    if (contactProps[field]) {
+        var list = [],
+        obj;
+
+        contactProps[field].forEach(function (args) {
+            if (ClassName === ContactField) {
+                list.push(new ClassName(args.type, args.value));
+            } else if (ClassName === ContactPhoto) {
+                obj = new ContactPhoto(args.originalFilePath, args.pref);
+                obj.largeFilePath = args.largeFilePath;
+                obj.smallFilePath = args.smallFilePath;
+                list.push(obj);
+            } else if (ClassName === ContactNews) {
+                obj = new ContactNews(args);
+                list.push(obj);
+            } else if (ClassName === ContactActivity) {
+                obj = new ContactActivity(args);
+                list.push(obj);
+            } else {
+                list.push(new ClassName(args));
+            }
+        });
+        contactProps[field] = list;
+    }
+}
+
+function populateDate(contactProps, field) {
+    if (contactProps[field]) {
+        contactProps[field] = new Date(contactProps[field]);
+    }
+}
+
+function validateFindArguments(findOptions) {
+    var error = false;
+    
+    // findOptions is mandatory
+    if (!findOptions) {
+        error = true;
+    } else {
+        // findOptions.filter is optional
+        if (findOptions.filter) {
+            findOptions.filter.forEach(function (f) {
+                switch (f.fieldName) {
+                case ContactFindOptions.SEARCH_FIELD_GIVEN_NAME:
+                case ContactFindOptions.SEARCH_FIELD_FAMILY_NAME:
+                case ContactFindOptions.SEARCH_FIELD_ORGANIZATION_NAME:
+                case ContactFindOptions.SEARCH_FIELD_PHONE:
+                case ContactFindOptions.SEARCH_FIELD_EMAIL:
+                case ContactFindOptions.SEARCH_FIELD_BBMPIN:
+                case ContactFindOptions.SEARCH_FIELD_LINKEDIN:
+                case ContactFindOptions.SEARCH_FIELD_TWITTER:
+                case ContactFindOptions.SEARCH_FIELD_VIDEO_CHAT:
+                    break;
+                default:
+                    error = true;
+                }
+
+                if (!f.fieldValue) {
+                    error = true;
+                }
+            });
+        } 
+
+        //findOptions.limit is optional
+        if (findOptions.limit) {
+            if (typeof findOptions.limit !== "number") {
+                error = true;
+            } 
+        } 
+
+        //findOptions.favorite is optional
+        if (findOptions.favorite) {
+            if (typeof findOptions.favorite !== "boolean") {
+                error = true;
+            }
+        }
+
+        // findOptions.sort is optional
+        if (!error && findOptions.sort && Array.isArray(findOptions.sort)) {
+            findOptions.sort.forEach(function (s) {
+                switch (s.fieldName) {
+                case ContactFindOptions.SORT_FIELD_GIVEN_NAME:
+                case ContactFindOptions.SORT_FIELD_FAMILY_NAME:
+                case ContactFindOptions.SORT_FIELD_ORGANIZATION_NAME:
+                    break;
+                default:
+                    error = true;
+                }
+
+                if (s.desc === undefined || typeof s.desc !== "boolean") {
+                    error = true;
+                }
+            });
+        }
+
+        if (!error && findOptions.includeAccounts) {
+            if (!Array.isArray(findOptions.includeAccounts)) {
+                error = true;
+            } else {
+                findOptions.includeAccounts.forEach(function (acct) {
+                    if (!error && (!acct.id || window.isNaN(window.parseInt(acct.id, 10)))) {
+                        error = true;
+                    }
+                });
+            }
+        }
+
+        if (!error && findOptions.excludeAccounts) {
+            if (!Array.isArray(findOptions.excludeAccounts)) {
+                error = true;
+            } else {
+                findOptions.excludeAccounts.forEach(function (acct) {
+                    if (!error && (!acct.id || window.isNaN(window.parseInt(acct.id, 10)))) {
+                        error = true;
+                    }
+                });
+            }
+        }
+    }
+    return !error;
+}
+
+function validateContactsPickerFilter(filter) {
+    var isValid = true,
+        availableFields = {};
+
+    if (typeof(filter) === "undefined") {
+        isValid = false;
+    } else {
+        if (filter && Array.isArray(filter)) {
+            availableFields = contactConsts.getKindAttributeMap();
+            filter.forEach(function (e) {
+                isValid = isValid && Object.getOwnPropertyNames(availableFields).reduce(
+                    function (found, key) {
+                        return found || availableFields[key] === e;
+                    }, false);
+            });
+        }
+    }
+
+    return isValid;
+}
+
+function validateContactsPickerOptions(options) {
+    var isValid = false,
+        mode = options.mode;
+
+    if (typeof(options) === "undefined") {
+        isValid = false;
+    } else {
+        isValid = mode === ContactPickerOptions.MODE_SINGLE || mode === ContactPickerOptions.MODE_MULTIPLE || mode === ContactPickerOptions.MODE_ATTRIBUTE;
+
+        // if mode is attribute, fields must be defined
+        if (mode === ContactPickerOptions.MODE_ATTRIBUTE && !validateContactsPickerFilter(options.fields)) {
+            isValid = false;
+        }
+    }
+
+    return isValid;
+}
+
+self = module.exports = {
+    populateContact: function (contact) {
+        if (contact.name) {
+            contact.name = new ContactName(contact.name);
+        }
+
+        populateFieldArray(contact, "addresses", ContactAddress);
+        populateFieldArray(contact, "organizations", ContactOrganization);
+        populateFieldArray(contact, "emails", ContactField);
+        populateFieldArray(contact, "phoneNumbers", ContactField);
+        populateFieldArray(contact, "faxNumbers", ContactField);
+        populateFieldArray(contact, "pagerNumbers", ContactField);
+        populateFieldArray(contact, "ims", ContactField);
+        populateFieldArray(contact, "socialNetworks", ContactField);
+        populateFieldArray(contact, "urls", ContactField);
+        populateFieldArray(contact, "photos", ContactPhoto);
+        populateFieldArray(contact, "news", ContactNews);
+        populateFieldArray(contact, "activities", ContactActivity);
+        // TODO categories
+
+        populateDate(contact, "birthday");
+        populateDate(contact, "anniversary");
+    },
+    invokeErrorCallback: function (errorCallback, code) {
+        if (errorCallback) {
+            errorCallback(new ContactError(code));
+        }
+    },
+    validateFindArguments: validateFindArguments,
+    validateContactsPickerFilter: validateContactsPickerFilter,
+    validateContactsPickerOptions: validateContactsPickerOptions
+};
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/index.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/index.js b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/index.js
new file mode 100644
index 0000000..09a4bd2
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/index.js
@@ -0,0 +1,374 @@
+/*
+ * Copyright 2013 Research In Motion Limited.
+ *
+ * Licensed 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 pimContacts,
+    contactUtils = require("./contactUtils"),
+    contactConsts = require("./contactConsts"),
+    ContactError = require("./ContactError"),
+    ContactName = require("./ContactName"),
+    ContactFindOptions = require("./ContactFindOptions"),
+    noop = function () {};
+
+function getAccountFilters(options) {
+    if (options.includeAccounts) {
+        options.includeAccounts = options.includeAccounts.map(function (acct) {
+            return acct.id.toString();
+        });
+    }
+
+    if (options.excludeAccounts) {
+        options.excludeAccounts = options.excludeAccounts.map(function (acct) {
+            return acct.id.toString();
+        });
+    }
+}
+
+function populateSearchFields(fields) {
+    var i,
+        l,
+        key,
+        searchFieldsObject = {},
+        searchFields = [];
+
+    for (i = 0, l = fields.length; i < l; i++) {
+        if (fields[i] === "*") {
+            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_GIVEN_NAME] = true;
+            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_FAMILY_NAME] = true;
+            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_PHONE] = true;
+            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_EMAIL] = true;
+            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_ORGANIZATION_NAME] = true;
+        } else if (fields[i] === "displayName" || fields[i] === "name") {
+            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_GIVEN_NAME] = true;
+            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_FAMILY_NAME] = true;
+        } else if (fields[i] === "nickname") {
+            // not supported by Cascades
+        } else if (fields[i] === "phoneNumbers") {
+            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_PHONE] = true;
+        } else if (fields[i] === "emails") {
+            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_EMAIL] = true;
+        } else if (field === "addresses") {
+            // not supported by Cascades
+        } else if (field === "ims") {
+            // not supported by Cascades
+        } else if (field === "organizations") {
+            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_ORGANIZATION_NAME] = true;
+        } else if (field === "birthday") {
+            // not supported by Cascades
+        } else if (field === "note") {
+            // not supported by Cascades
+        } else if (field === "photos") {
+            // not supported by Cascades
+        } else if (field === "categories") {
+            // not supported by Cascades
+        } else if (field === "urls") {
+            // not supported by Cascades
+        }
+    }
+
+    for (key in searchFieldsObject) {
+        if (searchFieldsObject.hasOwnProperty(key)) {
+            searchFields.push(window.parseInt(key));
+        }
+    }
+
+    return searchFields;
+}
+
+function convertBirthday(birthday) {
+    //Convert date string from native to milliseconds since epoch for cordova-js
+    var birthdayInfo;
+    if (birthday) {
+        birthdayInfo = birthday.split("-");
+        return new Date(birthdayInfo[0], birthdayInfo[1] - 1, birthdayInfo[2]).getTime();
+    } else {
+        return null;
+    }
+}
+
+function processJnextSaveData(result, JnextData) {
+    var data = JnextData,
+        birthdayInfo;
+
+    if (data._success === true) {
+        data.birthday = convertBirthday(data.birthday);
+        result.callbackOk(data, false);
+    } else {
+        result.callbackError(data.code, false);
+    }
+}
+
+function processJnextRemoveData(result, JnextData) {
+    var data = JnextData;
+
+    if (data._success === true) {
+        result.callbackOk(data);
+    } else {
+        result.callbackError(ContactError.UNKNOWN_ERROR, false);
+    }
+}
+
+function processJnextFindData(eventId, eventHandler, JnextData) {
+    var data = JnextData,
+        i,
+        l,
+        more = false,
+        resultsObject = {},
+        birthdayInfo;
+
+    if (data.contacts) {
+        for (i = 0, l = data.contacts.length; i < l; i++) {
+            data.contacts[i].birthday = convertBirthday(data.contacts[i].birthday);
+            data.contacts[i].name = new ContactName(data.contacts[i].name);
+        }
+    } else {
+        data.contacts = []; // if JnextData.contacts return null, return an empty array
+    }
+
+    if (data._success === true) {
+        eventHandler.error = false;
+    }
+
+    if (eventHandler.multiple) {
+        // Concatenate results; do not add the same contacts
+        for (i = 0, l = eventHandler.searchResult.length; i < l; i++) {
+            resultsObject[eventHandler.searchResult[i].id] = true;
+        }
+
+        for (i = 0, l = data.contacts.length; i < l; i++) {
+            if (resultsObject[data.contacts[i].id]) {
+                // Already existing
+            } else {
+                eventHandler.searchResult.push(data.contacts[i]);
+            }
+        }
+
+        // check if more search is required
+        eventHandler.searchFieldIndex++;
+        if (eventHandler.searchFieldIndex < eventHandler.searchFields.length) {
+            more = true;
+        }
+    } else {
+        eventHandler.searchResult = data.contacts;
+    }
+
+    if (more) {
+        pimContacts.getInstance().invokeJnextSearch(eventId);
+    } else {
+        if (eventHandler.error) {
+            eventHandler.result.callbackError(data.code, false);
+        } else {
+            eventHandler.result.callbackOk(eventHandler.searchResult, false);
+        }
+    }
+}
+
+module.exports = {
+    search: function (successCb, failCb, args, env) {
+        var cordovaFindOptions = {},
+            result = new PluginResult(args, env),
+            key;
+
+        for (key in args) {
+            if (args.hasOwnProperty(key)) {
+                cordovaFindOptions[key] = JSON.parse(decodeURIComponent(args[key]));
+            }
+        }
+
+        pimContacts.getInstance().find(cordovaFindOptions, result, processJnextFindData);
+        result.noResult(true);
+    },
+    save: function (successCb, failCb, args, env) {
+        var attributes = {},
+            result = new PluginResult(args, env),
+            key,
+            nativeEmails = [];
+
+        attributes = JSON.parse(decodeURIComponent(args[0]));
+
+        //convert birthday format for our native .so file
+        if (attributes.birthday) {
+            attributes.birthday = new Date(attributes.birthday).toDateString();
+        }
+
+        if (attributes.emails) {
+            attributes.emails.forEach(function (email) {
+                if (email.value) {
+                    if (email.type) {
+                        nativeEmails.push({ "type" : email.type, "value" : email.value });
+                    } else {
+                        nativeEmails.push({ "type" : "home", "value" : email.value });
+                    }
+                }
+            });
+            attributes.emails = nativeEmails;
+        }
+
+        if (attributes.id !== null) {
+            attributes.id = window.parseInt(attributes.id);
+        }
+
+        attributes._eventId = result.callbackId;
+        pimContacts.getInstance().save(attributes, result, processJnextSaveData);
+        result.noResult(true);
+    },
+    remove: function (successCb, failCb, args, env) {
+        var result = new PluginResult(args, env),
+            attributes = {
+                "contactId": window.parseInt(JSON.parse(decodeURIComponent(args[0]))),
+                "_eventId": result.callbackId
+            };
+
+        if (!window.isNaN(attributes.contactId)) {
+            pimContacts.getInstance().remove(attributes, result, processJnextRemoveData);
+            result.noResult(true);
+        } else {
+            result.error(ContactError.UNKNOWN_ERROR);
+            result.noResult(false);
+        }
+    }
+};
+
+///////////////////////////////////////////////////////////////////
+// JavaScript wrapper for JNEXT plugin
+///////////////////////////////////////////////////////////////////
+
+JNEXT.PimContacts = function ()
+{
+    var self = this,
+        hasInstance = false;
+
+    self.find = function (cordovaFindOptions, pluginResult, handler) {
+        //register find eventHandler for when JNEXT onEvent fires
+        self.eventHandlers[cordovaFindOptions.callbackId] = {
+            "result" : pluginResult,
+            "action" : "find",
+            "multiple" : cordovaFindOptions[1].filter ? true : false,
+            "fields" : cordovaFindOptions[0],
+            "searchFilter" : cordovaFindOptions[1].filter,
+            "searchFields" : cordovaFindOptions[1].filter ? populateSearchFields(cordovaFindOptions[0]) : null,
+            "searchFieldIndex" : 0,
+            "searchResult" : [],
+            "handler" : handler,
+            "error" : true
+        };
+
+        self.invokeJnextSearch(cordovaFindOptions.callbackId);
+        return "";
+    };
+
+    self.invokeJnextSearch = function(eventId) {
+        var jnextArgs = {},
+            findHandler = self.eventHandlers[eventId];
+
+        jnextArgs._eventId = eventId;
+        jnextArgs.fields = findHandler.fields;
+        jnextArgs.options = {};
+        jnextArgs.options.filter = [];
+
+        if (findHandler.multiple) {
+            jnextArgs.options.filter.push({
+                "fieldName" : findHandler.searchFields[findHandler.searchFieldIndex],
+                "fieldValue" : findHandler.searchFilter
+            });
+            //findHandler.searchFieldIndex++;
+        }
+
+        JNEXT.invoke(self.m_id, "find " + JSON.stringify(jnextArgs));
+    }
+
+    self.getContact = function (args) {
+        return JSON.parse(JNEXT.invoke(self.m_id, "getContact " + JSON.stringify(args)));
+    };
+
+    self.save = function (args, pluginResult, handler) {
+        //register save eventHandler for when JNEXT onEvent fires
+        self.eventHandlers[args._eventId] = {
+            "result" : pluginResult,
+            "action" : "save",
+            "handler" : handler
+        };
+        JNEXT.invoke(self.m_id, "save " + JSON.stringify(args));
+        return "";
+    };
+
+    self.remove = function (args, pluginResult, handler) {
+        //register remove eventHandler for when JNEXT onEvent fires
+        self.eventHandlers[args._eventId] = {
+            "result" : pluginResult,
+            "action" : "remove",
+            "handler" : handler
+        };
+        JNEXT.invoke(self.m_id, "remove " + JSON.stringify(args));
+        return "";
+    };
+
+    self.getId = function () {
+        return self.m_id;
+    };
+
+    self.getContactAccounts = function () {
+        var value = JNEXT.invoke(self.m_id, "getContactAccounts");
+        return JSON.parse(value);
+    };
+
+    self.init = function () {
+        if (!JNEXT.require("libpimcontacts")) {
+            return false;
+        }
+
+        self.m_id = JNEXT.createObject("libpimcontacts.PimContacts");
+
+        if (self.m_id === "") {
+            return false;
+        }
+
+        JNEXT.registerEvents(self);
+    };
+
+    // Handle data coming back from JNEXT native layer. Each async function registers a handler and a PluginResult object.
+    // When JNEXT fires onEvent we parse the result string  back into JSON and trigger the appropriate handler (eventHandlers map
+    // uses callbackId as key), along with the actual data coming back from the native layer. Each function may have its own way of
+    // processing native data so we do not do any processing here.
+
+    self.onEvent = function (strData) {
+        var arData = strData.split(" "),
+            strEventDesc = arData[0],
+            eventHandler,
+            args = {};
+
+        if (strEventDesc === "result") {
+            args.result = escape(strData.split(" ").slice(2).join(" "));
+            eventHandler = self.eventHandlers[arData[1]];
+            if (eventHandler.action === "save" || eventHandler.action === "remove") {
+                eventHandler.handler(eventHandler.result, JSON.parse(decodeURIComponent(args.result)));
+            } else if (eventHandler.action === "find") {
+                eventHandler.handler(arData[1], eventHandler, JSON.parse(decodeURIComponent(args.result)));
+            }
+        }
+    };
+
+    self.m_id = "";
+    self.eventHandlers = {};
+
+    self.getInstance = function () {
+        if (!hasInstance) {
+            self.init();
+            hasInstance = true;
+        }
+        return self;
+    };
+};
+
+pimContacts = new JNEXT.PimContacts();

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/plugin.xml b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/plugin.xml
new file mode 100644
index 0000000..d163585
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/plugin.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
+    id="org.apache.cordova.core.Contacts"
+    version="0.0.1">
+
+    <name>Contacts</name>
+
+    <platform name="blackberry10">
+        <config-file target="www/config.xml" parent="/widget">
+            <feature name="Contacts" value="Contacts"/>
+        </config-file>
+        <source-file src="src/blackberry10/index.js" target-dir="Contacts"></source-file>
+        <source-file src="src/blackberry10/ContactActivity.js" target-dir="Contacts"></source-file>
+        <source-file src="src/blackberry10/ContactAddress.js" target-dir="Contacts"></source-file>
+        <source-file src="src/blackberry10/contactConsts.js" target-dir="Contacts"></source-file>
+        <source-file src="src/blackberry10/ContactError.js" target-dir="Contacts"></source-file>
+        <source-file src="src/blackberry10/ContactField.js" target-dir="Contacts"></source-file>
+        <source-file src="src/blackberry10/ContactFindOptions.js" target-dir="Contacts"></source-file>
+        <source-file src="src/blackberry10/ContactName.js" target-dir="Contacts"></source-file>
+        <source-file src="src/blackberry10/ContactNews.js" target-dir="Contacts"></source-file>
+        <source-file src="src/blackberry10/ContactOrganization.js" target-dir="Contacts"></source-file>
+        <source-file src="src/blackberry10/ContactPhoto.js" target-dir="Contacts"></source-file>
+        <source-file src="src/blackberry10/contactUtils.js" target-dir="Contacts"></source-file>
+      </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContact.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContact.h b/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContact.h
new file mode 100644
index 0000000..5187efc
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContact.h
@@ -0,0 +1,136 @@
+/*
+ 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.
+ */
+
+#import <Foundation/Foundation.h>
+#import <AddressBook/ABAddressBook.h>
+#import <AddressBookUI/AddressBookUI.h>
+
+enum CDVContactError {
+    UNKNOWN_ERROR = 0,
+    INVALID_ARGUMENT_ERROR = 1,
+    TIMEOUT_ERROR = 2,
+    PENDING_OPERATION_ERROR = 3,
+    IO_ERROR = 4,
+    NOT_SUPPORTED_ERROR = 5,
+    PERMISSION_DENIED_ERROR = 20
+};
+typedef NSUInteger CDVContactError;
+
+@interface CDVContact : NSObject {
+    ABRecordRef record;         // the ABRecord associated with this contact
+    NSDictionary* returnFields; // dictionary of fields to return when performing search
+}
+
+@property (nonatomic, assign) ABRecordRef record;
+@property (nonatomic, strong) NSDictionary* returnFields;
+
++ (NSDictionary*)defaultABtoW3C;
++ (NSDictionary*)defaultW3CtoAB;
++ (NSSet*)defaultW3CtoNull;
++ (NSDictionary*)defaultObjectAndProperties;
++ (NSDictionary*)defaultFields;
+
++ (NSDictionary*)calcReturnFields:(NSArray*)fields;
+- (id)init;
+- (id)initFromABRecord:(ABRecordRef)aRecord;
+- (bool)setFromContactDict:(NSDictionary*)aContact asUpdate:(BOOL)bUpdate;
+
++ (BOOL)needsConversion:(NSString*)W3Label;
++ (CFStringRef)convertContactTypeToPropertyLabel:(NSString*)label;
++ (NSString*)convertPropertyLabelToContactType:(NSString*)label;
++ (BOOL)isValidW3ContactType:(NSString*)label;
+- (bool)setValue:(id)aValue forProperty:(ABPropertyID)aProperty inRecord:(ABRecordRef)aRecord asUpdate:(BOOL)bUpdate;
+
+- (NSDictionary*)toDictionary:(NSDictionary*)withFields;
+- (NSNumber*)getDateAsNumber:(ABPropertyID)datePropId;
+- (NSObject*)extractName;
+- (NSObject*)extractMultiValue:(NSString*)propertyId;
+- (NSObject*)extractAddresses;
+- (NSObject*)extractIms;
+- (NSObject*)extractOrganizations;
+- (NSObject*)extractPhotos;
+
+- (NSMutableDictionary*)translateW3Dict:(NSDictionary*)dict forProperty:(ABPropertyID)prop;
+- (bool)setMultiValueStrings:(NSArray*)fieldArray forProperty:(ABPropertyID)prop inRecord:(ABRecordRef)person asUpdate:(BOOL)bUpdate;
+- (bool)setMultiValueDictionary:(NSArray*)array forProperty:(ABPropertyID)prop inRecord:(ABRecordRef)person asUpdate:(BOOL)bUpdate;
+- (ABMultiValueRef)allocStringMultiValueFromArray:array;
+- (ABMultiValueRef)allocDictMultiValueFromArray:array forProperty:(ABPropertyID)prop;
+- (BOOL)foundValue:(NSString*)testValue inFields:(NSDictionary*)searchFields;
+- (BOOL)testStringValue:(NSString*)testValue forW3CProperty:(NSString*)property;
+- (BOOL)testDateValue:(NSString*)testValue forW3CProperty:(NSString*)property;
+- (BOOL)searchContactFields:(NSArray*)fields forMVStringProperty:(ABPropertyID)propId withValue:testValue;
+- (BOOL)testMultiValueStrings:(NSString*)testValue forProperty:(ABPropertyID)propId ofType:(NSString*)type;
+- (NSArray*)valuesForProperty:(ABPropertyID)propId inRecord:(ABRecordRef)aRecord;
+- (NSArray*)labelsForProperty:(ABPropertyID)propId inRecord:(ABRecordRef)aRecord;
+- (BOOL)searchContactFields:(NSArray*)fields forMVDictionaryProperty:(ABPropertyID)propId withValue:(NSString*)testValue;
+
+@end
+
+// generic ContactField types
+#define kW3ContactFieldType @"type"
+#define kW3ContactFieldValue @"value"
+#define kW3ContactFieldPrimary @"pref"
+// Various labels for ContactField types
+#define kW3ContactWorkLabel @"work"
+#define kW3ContactHomeLabel @"home"
+#define kW3ContactOtherLabel @"other"
+#define kW3ContactPhoneFaxLabel @"fax"
+#define kW3ContactPhoneMobileLabel @"mobile"
+#define kW3ContactPhonePagerLabel @"pager"
+#define kW3ContactUrlBlog @"blog"
+#define kW3ContactUrlProfile @"profile"
+#define kW3ContactImAIMLabel @"aim"
+#define kW3ContactImICQLabel @"icq"
+#define kW3ContactImMSNLabel @"msn"
+#define kW3ContactImYahooLabel @"yahoo"
+#define kW3ContactFieldId @"id"
+// special translation for IM field value and type
+#define kW3ContactImType @"type"
+#define kW3ContactImValue @"value"
+
+// Contact object
+#define kW3ContactId @"id"
+#define kW3ContactName @"name"
+#define kW3ContactFormattedName @"formatted"
+#define kW3ContactGivenName @"givenName"
+#define kW3ContactFamilyName @"familyName"
+#define kW3ContactMiddleName @"middleName"
+#define kW3ContactHonorificPrefix @"honorificPrefix"
+#define kW3ContactHonorificSuffix @"honorificSuffix"
+#define kW3ContactDisplayName @"displayName"
+#define kW3ContactNickname @"nickname"
+#define kW3ContactPhoneNumbers @"phoneNumbers"
+#define kW3ContactAddresses @"addresses"
+#define kW3ContactAddressFormatted @"formatted"
+#define kW3ContactStreetAddress @"streetAddress"
+#define kW3ContactLocality @"locality"
+#define kW3ContactRegion @"region"
+#define kW3ContactPostalCode @"postalCode"
+#define kW3ContactCountry @"country"
+#define kW3ContactEmails @"emails"
+#define kW3ContactIms @"ims"
+#define kW3ContactOrganizations @"organizations"
+#define kW3ContactOrganizationName @"name"
+#define kW3ContactTitle @"title"
+#define kW3ContactDepartment @"department"
+#define kW3ContactBirthday @"birthday"
+#define kW3ContactNote @"note"
+#define kW3ContactPhotos @"photos"
+#define kW3ContactCategories @"categories"
+#define kW3ContactUrls @"urls"


[44/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserCommand.h b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserCommand.h
new file mode 100644
index 0000000..6a23ab6
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserCommand.h
@@ -0,0 +1,49 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed 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.
+ *
+*/
+
+//
+//  PhoneGap ! ChildBrowserCommand
+//
+//
+//  Created by Jesse MacFadyen on 10-05-29.
+//  Copyright 2010 Nitobi. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#ifdef PHONEGAP_FRAMEWORK
+	#import <PhoneGap/PGPlugin.h>
+#else
+	#import "PGPlugin.h"
+#endif
+#import "ChildBrowserViewController.h"
+
+
+
+@interface ChildBrowserCommand : PGPlugin <ChildBrowserDelegate>  {
+
+	ChildBrowserViewController* childBrowser;
+}
+
+@property (nonatomic, retain) ChildBrowserViewController *childBrowser;
+
+
+- (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
+-(void) onChildLocationChange:(NSString*)newLoc;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserCommand.m b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserCommand.m
new file mode 100644
index 0000000..38aaf64
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserCommand.m
@@ -0,0 +1,86 @@
+//
+
+// 
+//
+//  Created by Jesse MacFadyen on 10-05-29.
+//  Copyright 2010 Nitobi. All rights reserved.
+//  Copyright (c) 2011, IBM Corporation
+//  Copyright 2011, Randy McMillan
+//
+
+#import "ChildBrowserCommand.h"
+
+#ifdef PHONEGAP_FRAMEWORK
+	#import <PhoneGap/PhoneGapViewController.h>
+#else
+	#import "PhoneGapViewController.h"
+#endif
+
+
+@implementation ChildBrowserCommand
+
+@synthesize childBrowser;
+
+- (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options // args: url
+{	
+	
+    if(childBrowser == NULL)
+	{
+		childBrowser = [[ ChildBrowserViewController alloc ] initWithScale:FALSE ];
+		childBrowser.delegate = self;
+	}
+	
+/* // TODO: Work in progress
+	NSString* strOrientations = [ options objectForKey:@"supportedOrientations"];
+	NSArray* supportedOrientations = [strOrientations componentsSeparatedByString:@","];
+*/
+    PhoneGapViewController* cont = (PhoneGapViewController*)[ super appViewController ];
+    childBrowser.supportedOrientations = cont.supportedOrientations;
+    
+    if ([cont respondsToSelector:@selector(presentViewController)]) {
+        //Reference UIViewController.h Line:179 for update to iOS 5 difference - @RandyMcMillan
+        [cont presentViewController:childBrowser animated:YES completion:nil];        
+    } else {
+        [ cont presentModalViewController:childBrowser animated:YES ];
+    }                 
+        
+    NSString *url = (NSString*) [arguments objectAtIndex:0];
+        
+    [childBrowser loadURL:url  ];
+        
+}
+
+-(void) close:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options // args: url
+{
+    [ childBrowser closeBrowser];
+	
+}
+
+-(void) onClose
+{
+	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onClose();",@""];
+	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
+}
+
+-(void) onOpenInSafari
+{
+	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onOpenExternal();",@""];
+	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
+}
+
+
+-(void) onChildLocationChange:(NSString*)newLoc
+{
+	
+	NSString* tempLoc = [NSString stringWithFormat:@"%@",newLoc];
+	NSString* encUrl = [tempLoc stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
+	 
+	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onLocationChange('%@');",encUrl];
+	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
+
+}
+
+
+
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserViewController.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserViewController.h b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserViewController.h
new file mode 100644
index 0000000..d6fc139
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserViewController.h
@@ -0,0 +1,73 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed 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.
+ *
+*/
+
+//
+//  ChildBrowserViewController.h
+//
+//  Created by Jesse MacFadyen on 21/07/09.
+//  Copyright 2009 Nitobi. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@protocol ChildBrowserDelegate<NSObject>
+
+
+
+/*
+ *  onChildLocationChanging:newLoc
+ *  
+ *  Discussion:
+ *    Invoked when a new page has loaded
+ */
+-(void) onChildLocationChange:(NSString*)newLoc;
+-(void) onOpenInSafari;
+-(void) onClose;
+@end
+
+
+@interface ChildBrowserViewController : UIViewController < UIWebViewDelegate > {
+	IBOutlet UIWebView* webView;
+	IBOutlet UIBarButtonItem* closeBtn;
+	IBOutlet UIBarButtonItem* refreshBtn;
+	IBOutlet UILabel* addressLabel;
+	IBOutlet UIBarButtonItem* backBtn;
+	IBOutlet UIBarButtonItem* fwdBtn;
+	IBOutlet UIBarButtonItem* safariBtn;
+	IBOutlet UIActivityIndicatorView* spinner;
+	BOOL scaleEnabled;
+	BOOL isImage;
+	NSString* imageURL;
+	NSArray* supportedOrientations;
+	id <ChildBrowserDelegate> delegate;
+}
+
+@property (nonatomic, retain)id <ChildBrowserDelegate> delegate;
+@property (nonatomic, retain) 	NSArray* supportedOrientations;
+@property(retain) NSString* imageURL;
+@property(assign) BOOL isImage;
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation; 
+- (ChildBrowserViewController*)initWithScale:(BOOL)enabled;
+- (IBAction)onDoneButtonPress:(id)sender;
+- (IBAction)onSafariButtonPress:(id)sender;
+- (void)loadURL:(NSString*)url;
+-(void)closeBrowser;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserViewController.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserViewController.m b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserViewController.m
new file mode 100644
index 0000000..167ef98
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserViewController.m
@@ -0,0 +1,239 @@
+//
+//  ChildBrowserViewController.m
+//
+//  Created by Jesse MacFadyen on 21/07/09.
+//  Copyright 2009 Nitobi. All rights reserved.
+//  Copyright (c) 2011, IBM Corporation
+//  Copyright 2011, Randy McMillan
+//
+
+#import "ChildBrowserViewController.h"
+
+
+@implementation ChildBrowserViewController
+
+@synthesize imageURL;
+@synthesize supportedOrientations;
+@synthesize isImage;
+@synthesize delegate;
+
+/*
+ // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
+- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
+    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
+        // Custom initialization
+    }
+    return self;
+}
+*/
+
++ (NSString*) resolveImageResource:(NSString*)resource
+{
+	NSString* systemVersion = [[UIDevice currentDevice] systemVersion];
+	BOOL isLessThaniOS4 = ([systemVersion compare:@"4.0" options:NSNumericSearch] == NSOrderedAscending);
+	
+	// the iPad image (nor retina) differentiation code was not in 3.x, and we have to explicitly set the path
+	if (isLessThaniOS4)
+	{
+        return [NSString stringWithFormat:@"%@.png", resource];
+	}
+	
+	return resource;
+}
+
+
+- (ChildBrowserViewController*)initWithScale:(BOOL)enabled
+{
+    self = [super init];
+	
+	
+	scaleEnabled = enabled;
+	
+	return self;	
+}
+
+// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    
+	refreshBtn.image = [UIImage imageNamed:[[self class] resolveImageResource:@"ChildBrowser.bundle/but_refresh"]];
+	backBtn.image = [UIImage imageNamed:[[self class] resolveImageResource:@"ChildBrowser.bundle/arrow_left"]];
+	fwdBtn.image = [UIImage imageNamed:[[self class] resolveImageResource:@"ChildBrowser.bundle/arrow_right"]];
+	safariBtn.image = [UIImage imageNamed:[[self class] resolveImageResource:@"ChildBrowser.bundle/compass"]];
+
+	webView.delegate = self;
+	webView.scalesPageToFit = TRUE;
+	webView.backgroundColor = [UIColor whiteColor];
+	NSLog(@"View did load");
+}
+
+
+
+
+
+- (void)didReceiveMemoryWarning {
+	// Releases the view if it doesn't have a superview.
+    [super didReceiveMemoryWarning];
+	
+	// Release any cached data, images, etc that aren't in use.
+}
+
+- (void)viewDidUnload {
+	// Release any retained subviews of the main view.
+	// e.g. self.myOutlet = nil;
+	NSLog(@"View did UN-load");
+}
+
+
+- (void)dealloc {
+
+	webView.delegate = nil;
+	
+	[webView release];
+	[closeBtn release];
+	[refreshBtn release];
+	[addressLabel release];
+	[backBtn release];
+	[fwdBtn release];
+	[safariBtn release];
+	[spinner release];
+	[ supportedOrientations release];
+	[super dealloc];
+}
+
+-(void)closeBrowser
+{
+	
+	if(delegate != NULL)
+	{
+		[delegate onClose];		
+	}
+    if ([self respondsToSelector:@selector(presentingViewController)]) { 
+        //Reference UIViewController.h Line:179 for update to iOS 5 difference - @RandyMcMillan
+        [[self presentingViewController] dismissViewControllerAnimated:YES completion:nil];
+    } else {
+        [[self parentViewController] dismissModalViewControllerAnimated:YES];
+    }
+}
+
+-(IBAction) onDoneButtonPress:(id)sender
+{
+	[ self closeBrowser];
+
+    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]];
+    [webView loadRequest:request];
+}
+
+
+-(IBAction) onSafariButtonPress:(id)sender
+{
+	
+	if(delegate != NULL)
+	{
+		[delegate onOpenInSafari];		
+	}
+	
+	if(isImage)
+	{
+		NSURL* pURL = [[ [NSURL alloc] initWithString:imageURL ] autorelease];
+		[ [ UIApplication sharedApplication ] openURL:pURL  ];
+	}
+	else
+	{
+		NSURLRequest *request = webView.request;
+		[[UIApplication sharedApplication] openURL:request.URL];
+	}
+
+	 
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation 
+{
+	BOOL autoRotate = [self.supportedOrientations count] > 1; // autorotate if only more than 1 orientation supported
+	if (autoRotate)
+	{
+		if ([self.supportedOrientations containsObject:
+			 [NSNumber numberWithInt:interfaceOrientation]]) {
+			return YES;
+		}
+    }
+	
+	return NO;
+}
+
+
+
+
+- (void)loadURL:(NSString*)url
+{
+	NSLog(@"Opening Url : %@",url);
+	 
+	if( [url hasSuffix:@".png" ]  || 
+	    [url hasSuffix:@".jpg" ]  || 
+		[url hasSuffix:@".jpeg" ] || 
+		[url hasSuffix:@".bmp" ]  || 
+		[url hasSuffix:@".gif" ]  )
+	{
+		[ imageURL release ];
+		imageURL = [url copy];
+		isImage = YES;
+		NSString* htmlText = @"<html><body style='background-color:#333;margin:0px;padding:0px;'><img style='min-height:200px;margin:0px;padding:0px;width:100%;height:auto;' alt='' src='IMGSRC'/></body></html>";
+		htmlText = [ htmlText stringByReplacingOccurrencesOfString:@"IMGSRC" withString:url ];
+
+		[webView loadHTMLString:htmlText baseURL:[NSURL URLWithString:@""]];
+		
+	}
+	else
+	{
+		imageURL = @"";
+		isImage = NO;
+		NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:url]];
+		[webView loadRequest:request];
+	}
+	webView.hidden = NO;
+}
+
+
+- (void)webViewDidStartLoad:(UIWebView *)sender {
+	addressLabel.text = @"Loading...";
+	backBtn.enabled = webView.canGoBack;
+	fwdBtn.enabled = webView.canGoForward;
+	
+	[ spinner startAnimating ];
+	
+}
+
+- (void)webViewDidFinishLoad:(UIWebView *)sender 
+{
+	NSURLRequest *request = webView.request;
+	NSLog(@"New Address is : %@",request.URL.absoluteString);
+	addressLabel.text = request.URL.absoluteString;
+	backBtn.enabled = webView.canGoBack;
+	fwdBtn.enabled = webView.canGoForward;
+	[ spinner stopAnimating ];
+	
+	if(delegate != NULL)
+	{
+		[delegate onChildLocationChange:request.URL.absoluteString];		
+	}
+
+}
+
+- (void)webView:(UIWebView *)wv didFailLoadWithError:(NSError *)error {
+    NSLog (@"webView:didFailLoadWithError");
+    [spinner stopAnimating];
+    addressLabel.text = @"Failed";
+    if (error != NULL) {
+        UIAlertView *errorAlert = [[UIAlertView alloc]
+                                   initWithTitle: [error localizedDescription]
+                                   message: [error localizedFailureReason]
+                                   delegate:nil
+                                   cancelButtonTitle:@"OK"
+                                   otherButtonTitles:nil];
+        [errorAlert show];
+        [errorAlert release];
+    }
+}
+
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserViewController.xib
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserViewController.xib b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserViewController.xib
new file mode 100644
index 0000000..cc8dd65
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserViewController.xib
@@ -0,0 +1,875 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
+	<data>
+		<int key="IBDocument.SystemTarget">768</int>
+		<string key="IBDocument.SystemVersion">10K540</string>
+		<string key="IBDocument.InterfaceBuilderVersion">851</string>
+		<string key="IBDocument.AppKitVersion">1038.36</string>
+		<string key="IBDocument.HIToolboxVersion">461.00</string>
+		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+			<string key="NS.object.0">141</string>
+		</object>
+		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+		</object>
+		<object class="NSArray" key="IBDocument.PluginDependencies">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+		</object>
+		<object class="NSMutableDictionary" key="IBDocument.Metadata">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="NSArray" key="dict.sortedKeys" id="0">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+			</object>
+			<object class="NSMutableArray" key="dict.values">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+			</object>
+		</object>
+		<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="IBProxyObject" id="372490531">
+				<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+			</object>
+			<object class="IBProxyObject" id="975951072">
+				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+			</object>
+			<object class="IBUIView" id="191373211">
+				<nil key="NSNextResponder"/>
+				<int key="NSvFlags">292</int>
+				<object class="NSMutableArray" key="NSSubviews">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="IBUIWebView" id="345761693">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">-2147483374</int>
+						<string key="NSFrameSize">{480, 229}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSNextKeyView" ref="471899933"/>
+						<object class="NSColor" key="IBUIBackgroundColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MCAwIDAAA</bytes>
+						</object>
+						<bool key="IBUIClipsSubviews">YES</bool>
+						<bool key="IBUIMultipleTouchEnabled">YES</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<int key="IBUIDataDetectorTypes">1</int>
+						<bool key="IBUIDetectsPhoneNumbers">YES</bool>
+					</object>
+					<object class="IBUIToolbar" id="471899933">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">266</int>
+						<string key="NSFrame">{{0, 256}, {480, 44}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSNextKeyView" ref="349240355"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<int key="IBUIBarStyle">1</int>
+						<object class="NSMutableArray" key="IBUIItems">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="IBUIBarButtonItem" id="966737436">
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<int key="IBUIStyle">1</int>
+								<reference key="IBUIToolbar" ref="471899933"/>
+								<int key="IBUISystemItemIdentifier">0</int>
+							</object>
+							<object class="IBUIBarButtonItem" id="312951844">
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<reference key="IBUIToolbar" ref="471899933"/>
+								<int key="IBUISystemItemIdentifier">5</int>
+							</object>
+							<object class="IBUIBarButtonItem" id="615970053">
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<reference key="IBUIToolbar" ref="471899933"/>
+							</object>
+							<object class="IBUIBarButtonItem" id="111711024">
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<reference key="IBUIToolbar" ref="471899933"/>
+								<int key="IBUISystemItemIdentifier">5</int>
+							</object>
+							<object class="IBUIBarButtonItem" id="227415391">
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<float key="IBUIWidth">32</float>
+								<reference key="IBUIToolbar" ref="471899933"/>
+							</object>
+							<object class="IBUIBarButtonItem" id="766205236">
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<reference key="IBUIToolbar" ref="471899933"/>
+								<int key="IBUISystemItemIdentifier">5</int>
+							</object>
+							<object class="IBUIBarButtonItem" id="283287216">
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<float key="IBUIWidth">32</float>
+								<reference key="IBUIToolbar" ref="471899933"/>
+							</object>
+							<object class="IBUIBarButtonItem" id="129413107">
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<reference key="IBUIToolbar" ref="471899933"/>
+								<int key="IBUISystemItemIdentifier">5</int>
+							</object>
+							<object class="IBUIBarButtonItem" id="1046195837">
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<float key="IBUIWidth">32</float>
+								<reference key="IBUIToolbar" ref="471899933"/>
+							</object>
+							<object class="IBUIBarButtonItem" id="667527307">
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<reference key="IBUIToolbar" ref="471899933"/>
+								<int key="IBUISystemItemIdentifier">5</int>
+							</object>
+						</object>
+					</object>
+					<object class="IBUILabel" id="349240355">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">270</int>
+						<string key="NSFrame">{{5, 230}, {418, 21}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSNextKeyView" ref="89602979"/>
+						<object class="NSColor" key="IBUIBackgroundColor">
+							<int key="NSColorSpace">4</int>
+							<bytes key="NSWhite">MC42NjY2NjY2OSAwAA</bytes>
+						</object>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClipsSubviews">YES</bool>
+						<bool key="IBUIUserInteractionEnabled">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<string key="IBUIText">Loading...</string>
+						<object class="NSFont" key="IBUIFont">
+							<string key="NSName">Helvetica</string>
+							<double key="NSSize">13</double>
+							<int key="NSfFlags">16</int>
+						</object>
+						<object class="NSColor" key="IBUITextColor">
+							<int key="NSColorSpace">3</int>
+							<bytes key="NSWhite">MQA</bytes>
+						</object>
+						<nil key="IBUIHighlightedColor"/>
+						<int key="IBUIBaselineAdjustment">1</int>
+						<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
+						<float key="IBUIMinimumFontSize">10</float>
+					</object>
+					<object class="IBUIActivityIndicatorView" id="89602979">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">-2147483383</int>
+						<string key="NSFrame">{{454, 231}, {20, 20}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<bool key="IBUIUserInteractionEnabled">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+					</object>
+				</object>
+				<string key="NSFrame">{{0, 20}, {480, 300}}</string>
+				<reference key="NSNextKeyView" ref="345761693"/>
+				<object class="NSColor" key="IBUIBackgroundColor">
+					<int key="NSColorSpace">3</int>
+					<bytes key="NSWhite">MC41AA</bytes>
+					<object class="NSColorSpace" key="NSCustomColorSpace">
+						<int key="NSID">2</int>
+					</object>
+				</object>
+				<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+				<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
+					<int key="interfaceOrientation">3</int>
+				</object>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+			</object>
+		</object>
+		<object class="IBObjectContainer" key="IBDocument.Objects">
+			<object class="NSMutableArray" key="connectionRecords">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">webView</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="345761693"/>
+					</object>
+					<int key="connectionID">17</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">addressLabel</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="349240355"/>
+					</object>
+					<int key="connectionID">18</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">backBtn</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="227415391"/>
+					</object>
+					<int key="connectionID">19</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">fwdBtn</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="283287216"/>
+					</object>
+					<int key="connectionID">22</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">refreshBtn</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="615970053"/>
+					</object>
+					<int key="connectionID">23</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">onDoneButtonPress:</string>
+						<reference key="source" ref="966737436"/>
+						<reference key="destination" ref="372490531"/>
+					</object>
+					<int key="connectionID">26</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">reload</string>
+						<reference key="source" ref="615970053"/>
+						<reference key="destination" ref="345761693"/>
+					</object>
+					<int key="connectionID">27</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">goBack</string>
+						<reference key="source" ref="227415391"/>
+						<reference key="destination" ref="345761693"/>
+					</object>
+					<int key="connectionID">28</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">goForward</string>
+						<reference key="source" ref="283287216"/>
+						<reference key="destination" ref="345761693"/>
+					</object>
+					<int key="connectionID">29</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">onSafariButtonPress:</string>
+						<reference key="source" ref="1046195837"/>
+						<reference key="destination" ref="372490531"/>
+					</object>
+					<int key="connectionID">31</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">view</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="191373211"/>
+					</object>
+					<int key="connectionID">35</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">spinner</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="89602979"/>
+					</object>
+					<int key="connectionID">36</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">safariBtn</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="1046195837"/>
+					</object>
+					<int key="connectionID">40</int>
+				</object>
+			</object>
+			<object class="IBMutableOrderedSet" key="objectRecords">
+				<object class="NSArray" key="orderedObjects">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="IBObjectRecord">
+						<int key="objectID">0</int>
+						<reference key="object" ref="0"/>
+						<reference key="children" ref="1000"/>
+						<nil key="parent"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">1</int>
+						<reference key="object" ref="191373211"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="471899933"/>
+							<reference ref="349240355"/>
+							<reference ref="89602979"/>
+							<reference ref="345761693"/>
+						</object>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-1</int>
+						<reference key="object" ref="372490531"/>
+						<reference key="parent" ref="0"/>
+						<string key="objectName">File's Owner</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-2</int>
+						<reference key="object" ref="975951072"/>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">4</int>
+						<reference key="object" ref="345761693"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">6</int>
+						<reference key="object" ref="471899933"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="966737436"/>
+							<reference ref="615970053"/>
+							<reference ref="227415391"/>
+							<reference ref="283287216"/>
+							<reference ref="1046195837"/>
+							<reference ref="111711024"/>
+							<reference ref="129413107"/>
+							<reference ref="312951844"/>
+							<reference ref="667527307"/>
+							<reference ref="766205236"/>
+						</object>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">7</int>
+						<reference key="object" ref="966737436"/>
+						<reference key="parent" ref="471899933"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">8</int>
+						<reference key="object" ref="615970053"/>
+						<reference key="parent" ref="471899933"/>
+						<string key="objectName">Bar Button Item (Reload)</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">9</int>
+						<reference key="object" ref="227415391"/>
+						<reference key="parent" ref="471899933"/>
+						<string key="objectName">Bar Button Item (Go Back)</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">10</int>
+						<reference key="object" ref="283287216"/>
+						<reference key="parent" ref="471899933"/>
+						<string key="objectName">Bar Button Item (Go Forward)</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">11</int>
+						<reference key="object" ref="1046195837"/>
+						<reference key="parent" ref="471899933"/>
+						<string key="objectName">Bar Button Item (Safari)</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">13</int>
+						<reference key="object" ref="349240355"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">14</int>
+						<reference key="object" ref="111711024"/>
+						<reference key="parent" ref="471899933"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">15</int>
+						<reference key="object" ref="129413107"/>
+						<reference key="parent" ref="471899933"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">32</int>
+						<reference key="object" ref="89602979"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">37</int>
+						<reference key="object" ref="312951844"/>
+						<reference key="parent" ref="471899933"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">38</int>
+						<reference key="object" ref="667527307"/>
+						<reference key="parent" ref="471899933"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">39</int>
+						<reference key="object" ref="766205236"/>
+						<reference key="parent" ref="471899933"/>
+					</object>
+				</object>
+			</object>
+			<object class="NSMutableDictionary" key="flattenedProperties">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="NSArray" key="dict.sortedKeys">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>-1.CustomClassName</string>
+					<string>-2.CustomClassName</string>
+					<string>1.IBEditorWindowLastContentRect</string>
+					<string>1.IBPluginDependency</string>
+					<string>10.IBPluginDependency</string>
+					<string>11.IBPluginDependency</string>
+					<string>13.IBPluginDependency</string>
+					<string>13.IBViewBoundsToFrameTransform</string>
+					<string>14.IBPluginDependency</string>
+					<string>15.IBPluginDependency</string>
+					<string>32.IBPluginDependency</string>
+					<string>32.IBViewBoundsToFrameTransform</string>
+					<string>37.IBPluginDependency</string>
+					<string>38.IBPluginDependency</string>
+					<string>39.IBPluginDependency</string>
+					<string>4.IBPluginDependency</string>
+					<string>4.IBViewBoundsToFrameTransform</string>
+					<string>6.IBPluginDependency</string>
+					<string>6.IBViewBoundsToFrameTransform</string>
+					<string>7.IBPluginDependency</string>
+					<string>8.IBPluginDependency</string>
+					<string>9.IBPluginDependency</string>
+				</object>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>ChildBrowserViewController</string>
+					<string>UIResponder</string>
+					<string>{{250, 643}, {480, 320}}</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<object class="NSAffineTransform">
+						<bytes key="NSTransformStruct">P4AAAL+AAABCoAAAwygAAA</bytes>
+					</object>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<object class="NSAffineTransform">
+						<bytes key="NSTransformStruct">P4AAAL+AAABD5gAAw3kAAA</bytes>
+					</object>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<object class="NSAffineTransform">
+						<bytes key="NSTransformStruct">P4AAAL+AAABB8AAAwwUAAA</bytes>
+					</object>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<object class="NSAffineTransform">
+						<bytes key="NSTransformStruct">P4AAAL+AAAAAAAAAw10AAA</bytes>
+					</object>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				</object>
+			</object>
+			<object class="NSMutableDictionary" key="unlocalizedProperties">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<reference key="dict.sortedKeys" ref="0"/>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+				</object>
+			</object>
+			<nil key="activeLocalization"/>
+			<object class="NSMutableDictionary" key="localizations">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<reference key="dict.sortedKeys" ref="0"/>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+				</object>
+			</object>
+			<nil key="sourceID"/>
+			<int key="maxID">40</int>
+		</object>
+		<object class="IBClassDescriber" key="IBDocument.Classes">
+			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBPartialClassDescription">
+					<string key="className">ChildBrowserViewController</string>
+					<string key="superclassName">UIViewController</string>
+					<object class="NSMutableDictionary" key="actions">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>onDoneButtonPress:</string>
+							<string>onSafariButtonPress:</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>id</string>
+							<string>id</string>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="actionInfosByName">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>onDoneButtonPress:</string>
+							<string>onSafariButtonPress:</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="IBActionInfo">
+								<string key="name">onDoneButtonPress:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">onSafariButtonPress:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="outlets">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>addressLabel</string>
+							<string>backBtn</string>
+							<string>closeBtn</string>
+							<string>delegate</string>
+							<string>fwdBtn</string>
+							<string>refreshBtn</string>
+							<string>safariBtn</string>
+							<string>spinner</string>
+							<string>webView</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>UILabel</string>
+							<string>UIBarButtonItem</string>
+							<string>UIBarButtonItem</string>
+							<string>id</string>
+							<string>UIBarButtonItem</string>
+							<string>UIBarButtonItem</string>
+							<string>UIBarButtonItem</string>
+							<string>UIActivityIndicatorView</string>
+							<string>UIWebView</string>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="toOneOutletInfosByName">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>addressLabel</string>
+							<string>backBtn</string>
+							<string>closeBtn</string>
+							<string>delegate</string>
+							<string>fwdBtn</string>
+							<string>refreshBtn</string>
+							<string>safariBtn</string>
+							<string>spinner</string>
+							<string>webView</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="IBToOneOutletInfo">
+								<string key="name">addressLabel</string>
+								<string key="candidateClassName">UILabel</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">backBtn</string>
+								<string key="candidateClassName">UIBarButtonItem</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">closeBtn</string>
+								<string key="candidateClassName">UIBarButtonItem</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">delegate</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">fwdBtn</string>
+								<string key="candidateClassName">UIBarButtonItem</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">refreshBtn</string>
+								<string key="candidateClassName">UIBarButtonItem</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">safariBtn</string>
+								<string key="candidateClassName">UIBarButtonItem</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">spinner</string>
+								<string key="candidateClassName">UIActivityIndicatorView</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">webView</string>
+								<string key="candidateClassName">UIWebView</string>
+							</object>
+						</object>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">Plugins/ChildBrowser/ChildBrowserViewController.h</string>
+					</object>
+				</object>
+			</object>
+			<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSError.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">QuartzCore.framework/Headers/CAAnimation.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">QuartzCore.framework/Headers/CALayer.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier" id="485348283">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIActivityIndicatorView</string>
+					<string key="superclassName">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIActivityIndicatorView.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIBarButtonItem</string>
+					<string key="superclassName">UIBarItem</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIBarButtonItem.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIBarItem</string>
+					<string key="superclassName">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIBarItem.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UILabel</string>
+					<string key="superclassName">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UILabel.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIResponder</string>
+					<string key="superclassName">NSObject</string>
+					<reference key="sourceIdentifier" ref="485348283"/>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UISearchBar</string>
+					<string key="superclassName">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UISearchDisplayController</string>
+					<string key="superclassName">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIToolbar</string>
+					<string key="superclassName">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIToolbar.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIView</string>
+					<string key="superclassName">UIResponder</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIViewController</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">MediaPlayer.framework/Headers/MPMoviePlayerViewController.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIViewController</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIViewController</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIViewController</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIViewController</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIViewController</string>
+					<string key="superclassName">UIResponder</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIWebView</string>
+					<string key="superclassName">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIWebView.h</string>
+					</object>
+				</object>
+			</object>
+		</object>
+		<int key="IBDocument.localizationMode">0</int>
+		<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+			<integer value="768" key="NS.object.0"/>
+		</object>
+		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+			<integer value="1056" key="NS.object.0"/>
+		</object>
+		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+			<integer value="3000" key="NS.object.0"/>
+		</object>
+		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+		<nil key="IBDocument.LastKnownRelativeProjectPath"/>
+		<int key="IBDocument.defaultPropertyAccessControl">3</int>
+		<string key="IBCocoaTouchPluginVersion">141</string>
+	</data>
+</archive>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/TargetDirTest.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/TargetDirTest.h b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/TargetDirTest.h
new file mode 100644
index 0000000..60a1403
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/TargetDirTest.h
@@ -0,0 +1,20 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed 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.
+ *
+*/
+
+ 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/TargetDirTest.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/TargetDirTest.m b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/TargetDirTest.m
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/TargetDirTest.m
@@ -0,0 +1 @@
+ 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/preserveDirs/PreserveDirsTest.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/preserveDirs/PreserveDirsTest.h b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/preserveDirs/PreserveDirsTest.h
new file mode 100644
index 0000000..60a1403
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/preserveDirs/PreserveDirsTest.h
@@ -0,0 +1,20 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed 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.
+ *
+*/
+
+ 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/preserveDirs/PreserveDirsTest.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/preserveDirs/PreserveDirsTest.m b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/preserveDirs/PreserveDirsTest.m
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/preserveDirs/PreserveDirsTest.m
@@ -0,0 +1 @@
+ 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/ChildBrowser/www/childbrowser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/www/childbrowser.js b/cordova-lib/spec-plugman/plugins/ChildBrowser/www/childbrowser.js
new file mode 100644
index 0000000..5263b0c
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/ChildBrowser/www/childbrowser.js
@@ -0,0 +1,19 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed 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.
+ *
+*/
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/ChildBrowser/www/childbrowser/image.jpg
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/www/childbrowser/image.jpg b/cordova-lib/spec-plugman/plugins/ChildBrowser/www/childbrowser/image.jpg
new file mode 100644
index 0000000..257cc56
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/ChildBrowser/www/childbrowser/image.jpg
@@ -0,0 +1 @@
+foo

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/ChildBrowser/www/childbrowser_file.html
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/www/childbrowser_file.html b/cordova-lib/spec-plugman/plugins/ChildBrowser/www/childbrowser_file.html
new file mode 100644
index 0000000..6de7b8c
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/ChildBrowser/www/childbrowser_file.html
@@ -0,0 +1 @@
+This is a test file.

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/ConfigTestPlugin/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ConfigTestPlugin/plugin.xml b/cordova-lib/spec-plugman/plugins/ConfigTestPlugin/plugin.xml
new file mode 100644
index 0000000..54b4895
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/ConfigTestPlugin/plugin.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="com.phonegap.configtest"
+    version="3.0.0">
+
+    <name>Does Code Fil Write Even Work? Hopefully the Tests Will Tell Us</name>
+
+    <!-- android -->
+    <platform name="android">
+        <config-file target="res/xml/config.xml" parent="/widget">
+            <poop/>
+        </config-file>
+        <config-file target="res/xml/config.xml" parent="/widget">
+            <poop/>
+        </config-file>
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/plugin.xml b/cordova-lib/spec-plugman/plugins/Contacts/plugin.xml
new file mode 100644
index 0000000..7328f1a
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/plugin.xml
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+           id="org.apache.cordova.core.contacts"
+      version="0.1.0">
+    <name>Contacts</name>
+
+
+    <js-module src="www/contacts.js" name="contacts">
+        <clobbers target="navigator.contacts" />
+    </js-module>
+
+    <js-module src="www/Contact.js" name="Contact">
+        <clobbers target="Contact" />
+    </js-module>
+
+    <js-module src="www/ContactAddress.js" name="ContactAddress">
+        <clobbers target="ContactAddress" />
+    </js-module>
+
+    <js-module src="www/ContactError.js" name="ContactError">
+        <clobbers target="ContactError" />
+    </js-module>
+
+    <js-module src="www/ContactField.js" name="ContactField">
+        <clobbers target="ContactField" />
+    </js-module>
+
+    <js-module src="www/ContactFindOptions.js" name="ContactFindOptions">
+        <clobbers target="ContactFindOptions" />
+    </js-module>
+
+    <js-module src="www/ContactName.js" name="ContactName">
+        <clobbers target="ContactName" />
+    </js-module>
+
+    <js-module src="www/ContactOrganization.js" name="ContactOrganization">
+        <clobbers target="ContactOrganization" />
+    </js-module>
+
+
+
+
+    <!-- android -->
+    <platform name="android">
+        <config-file target="res/xml/config.xml" parent="/*">
+            <feature name="Contacts">
+                <param name="android-package" value="org.apache.cordova.core.ContactManager"/>
+            </feature>
+        </config-file>
+
+        <config-file target="AndroidManifest.xml" parent="/*">
+            <uses-permission android:name="android.permission.READ_CONTACTS" />
+            <uses-permission android:name="android.permission.WRITE_CONTACTS" />
+            <uses-permission android:name="android.permission.GET_ACCOUNTS" />
+        </config-file>
+
+        <source-file src="src/android/ContactAccessor.java" target-dir="src/org/apache/cordova/core" />
+        <source-file src="src/android/ContactAccessorSdk5.java" target-dir="src/org/apache/cordova/core" />
+        <source-file src="src/android/ContactManager.java" target-dir="src/org/apache/cordova/core" />
+    </platform>
+
+    <!-- ios -->
+    <platform name="ios">
+        <config-file target="config.xml" parent="/*">
+            <feature name="Contacts">
+                <param name="ios-package" value="CDVContacts"/>
+            </feature>
+        </config-file>
+
+        <js-module src="www/ios/contacts.js" name="contacts">
+            <merges target="navigator.contacts" />
+        </js-module>
+
+        <js-module src="www/ios/Contact.js" name="Contact">
+            <merges target="Contact" />
+        </js-module>
+
+        <header-file src="src/ios/CDVContacts.h" />
+        <source-file src="src/ios/CDVContacts.m" />
+        <header-file src="src/ios/CDVContact.h" />
+        <source-file src="src/ios/CDVContact.m" />
+    </platform>
+
+    <!-- blackberry10 -->
+    <platform name="blackberry10">
+        <config-file target="www/config.xml" parent="/widget">
+            <feature name="Contacts" value="Contacts"/>
+        </config-file>
+        <config-file target="www/config.xml" parent="/widget">
+            <rim:permissions>
+            </rim:permissions>
+        </config-file>
+        <config-file target="www/config.xml" parent="/widget/rim:permissions">
+            <rim:permit>access_pimdomain_contacts</rim:permit>
+        </config-file>
+        <source-file src="src/blackberry10/index.js" target-dir="Contacts"></source-file>
+        <source-file src="src/blackberry10/ContactActivity.js" target-dir="Contacts"></source-file>
+        <source-file src="src/blackberry10/ContactAddress.js" target-dir="Contacts"></source-file>
+        <source-file src="src/blackberry10/contactConsts.js" target-dir="Contacts"></source-file>
+        <source-file src="src/blackberry10/ContactError.js" target-dir="Contacts"></source-file>
+        <source-file src="src/blackberry10/ContactField.js" target-dir="Contacts"></source-file>
+        <source-file src="src/blackberry10/ContactFindOptions.js" target-dir="Contacts"></source-file>
+        <source-file src="src/blackberry10/ContactName.js" target-dir="Contacts"></source-file>
+        <source-file src="src/blackberry10/ContactNews.js" target-dir="Contacts"></source-file>
+        <source-file src="src/blackberry10/ContactOrganization.js" target-dir="Contacts"></source-file>
+        <source-file src="src/blackberry10/ContactPhoto.js" target-dir="Contacts"></source-file>
+        <source-file src="src/blackberry10/contactUtils.js" target-dir="Contacts"></source-file>
+        <dependency id="com.blackberry.utils" url="https://github.com/blackberry/cordova-blackberry-plugins.git" commit="plugins" subdir="plugin/com.blackberry.utils"/>
+        <dependency id="org.apache.cordova.blackberry10.pimlib" url="https://github.com/blackberry/cordova-blackberry-plugins.git" commit="plugins" subdir="/plugin/org.apache.cordova.blackberry10.pimlib/"/>
+    </platform>
+
+    <!-- wp7 -->
+    <platform name="wp7">
+        <config-file target="config.xml" parent="/*">
+            <feature name="Contacts">
+                <param name="wp-package" value="Contacts"/>
+            </feature>
+        </config-file>
+
+        <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Capabilities">
+            <Capability Name="ID_CAP_CONTACTS" />
+        </config-file>
+
+        <source-file src="src/wp/Contacts.cs" />
+    </platform>
+
+    <!-- wp8 -->
+    <platform name="wp8">
+        <config-file target="config.xml" parent="/*">
+            <feature name="Contacts">
+                <param name="wp-package" value="Contacts"/>
+            </feature>
+        </config-file>
+
+        <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Capabilities">
+            <Capability Name="ID_CAP_CONTACTS" />
+        </config-file>
+
+        <source-file src="src/wp/Contacts.cs" />
+    </platform>
+
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/src/android/ContactAccessor.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/android/ContactAccessor.java b/cordova-lib/spec-plugman/plugins/Contacts/src/android/ContactAccessor.java
new file mode 100644
index 0000000..24ef9c6
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/src/android/ContactAccessor.java
@@ -0,0 +1,198 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed 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.
+ */
+
+package org.apache.cordova.core;
+
+import java.util.HashMap;
+
+import android.util.Log;
+import android.webkit.WebView;
+
+import org.apache.cordova.CordovaInterface;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+/**
+ * This abstract class defines SDK-independent API for communication with
+ * Contacts Provider. The actual implementation used by the application depends
+ * on the level of API available on the device. If the API level is Cupcake or
+ * Donut, we want to use the {@link ContactAccessorSdk3_4} class. If it is
+ * Eclair or higher, we want to use {@link ContactAccessorSdk5}.
+ */
+public abstract class ContactAccessor {
+
+    protected final String LOG_TAG = "ContactsAccessor";
+    protected CordovaInterface mApp;
+    protected WebView mView;
+
+    /**
+     * Check to see if the data associated with the key is required to
+     * be populated in the Contact object.
+     * @param key
+     * @param map created by running buildPopulationSet.
+     * @return true if the key data is required
+     */
+    protected boolean isRequired(String key, HashMap<String,Boolean> map) {
+        Boolean retVal = map.get(key);
+        return (retVal == null) ? false : retVal.booleanValue();
+    }
+
+    /**
+     * Create a hash map of what data needs to be populated in the Contact object
+     * @param fields the list of fields to populate
+     * @return the hash map of required data
+     */
+    protected HashMap<String,Boolean> buildPopulationSet(JSONArray fields) {
+        HashMap<String,Boolean> map = new HashMap<String,Boolean>();
+
+        String key;
+        try {
+            if (fields.length() == 1 && fields.getString(0).equals("*")) {
+                map.put("displayName", true);
+                map.put("name", true);
+                map.put("nickname", true);
+                map.put("phoneNumbers", true);
+                map.put("emails", true);
+                map.put("addresses", true);
+                map.put("ims", true);
+                map.put("organizations", true);
+                map.put("birthday", true);
+                map.put("note", true);
+                map.put("urls", true);
+                map.put("photos", true);
+                map.put("categories", true);
+           } 
+            else {
+                for (int i=0; i<fields.length(); i++) {
+                    key = fields.getString(i);
+                    if (key.startsWith("displayName")) {
+                        map.put("displayName", true);
+                    }
+                    else if (key.startsWith("name")) {
+                        map.put("displayName", true);
+                        map.put("name", true);
+                    }
+                    else if (key.startsWith("nickname")) {
+                        map.put("nickname", true);
+                    }
+                    else if (key.startsWith("phoneNumbers")) {
+                        map.put("phoneNumbers", true);
+                    }
+                    else if (key.startsWith("emails")) {
+                        map.put("emails", true);
+                    }
+                    else if (key.startsWith("addresses")) {
+                        map.put("addresses", true);
+                    }
+                    else if (key.startsWith("ims")) {
+                        map.put("ims", true);
+                    }
+                    else if (key.startsWith("organizations")) {
+                        map.put("organizations", true);
+                    }
+                    else if (key.startsWith("birthday")) {
+                        map.put("birthday", true);
+                    }
+                    else if (key.startsWith("note")) {
+                        map.put("note", true);
+                    }
+                    else if (key.startsWith("urls")) {
+                        map.put("urls", true);
+                    }
+                    else if (key.startsWith("photos")) {
+                        map.put("photos", true);
+                    }
+                    else if (key.startsWith("categories")) {
+                        map.put("categories", true);
+                    }
+                }
+            }
+       }
+        catch (JSONException e) {
+            Log.e(LOG_TAG, e.getMessage(), e);
+        }
+        return map;
+    }
+
+    /**
+     * Convenience method to get a string from a JSON object.  Saves a
+     * lot of try/catch writing.
+     * If the property is not found in the object null will be returned.
+     *
+     * @param obj contact object to search
+     * @param property to be looked up
+     * @return The value of the property
+     */
+    protected String getJsonString(JSONObject obj, String property) {
+        String value = null;
+        try {
+            if (obj != null) {
+                value = obj.getString(property);
+                if (value.equals("null")) {
+                    Log.d(LOG_TAG, property + " is string called 'null'");
+                    value = null;
+                }
+            }
+       }
+        catch (JSONException e) {
+            Log.d(LOG_TAG, "Could not get = " + e.getMessage());
+        }
+        return value;
+    }
+
+    /**
+     * Handles adding a JSON Contact object into the database.
+     * @return TODO
+     */
+    public abstract String save(JSONObject contact);
+
+    /**
+     * Handles searching through SDK-specific contacts API.
+     */
+    public abstract JSONArray search(JSONArray filter, JSONObject options);
+
+    /**
+     * Handles searching through SDK-specific contacts API.
+     * @throws JSONException
+     */
+    public abstract JSONObject getContactById(String id) throws JSONException;
+
+    /**
+     * Handles removing a contact from the database.
+     */
+    public abstract boolean remove(String id);
+
+   /**
+     * A class that represents the where clause to be used in the database query 
+     */
+    class WhereOptions {
+        private String where;
+        private String[] whereArgs;
+        public void setWhere(String where) {
+            this.where = where;
+        }
+        public String getWhere() {
+            return where;
+        }
+        public void setWhereArgs(String[] whereArgs) {
+            this.whereArgs = whereArgs;
+        }
+        public String[] getWhereArgs() {
+            return whereArgs;
+        }
+    }
+}


[26/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/util/plugins.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/util/plugins.spec.js b/cordova-lib/spec-plugman/util/plugins.spec.js
new file mode 100644
index 0000000..63d0aac
--- /dev/null
+++ b/cordova-lib/spec-plugman/util/plugins.spec.js
@@ -0,0 +1,82 @@
+#!/usr/bin/env node
+/*
+ *
+ *
+ * Licensed 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 http   = require('http'),
+    osenv  = require('osenv'),
+    path   = require('path'),
+    fs     = require('fs'),
+    temp   = path.join(osenv.tmpdir(), 'plugman'),
+    shell  = require('shelljs'),
+    child_process = require('child_process'),
+    plugins = require('../../src/util/plugins'),
+    xml_helpers = require('../../src/util/xml-helpers');
+
+describe('plugins utility module', function(){
+    describe('clonePluginGitRepo', function(){
+        var fake_id = 'VillageDrunkard';
+        var execSpy, cp_spy, xml_spy, done;
+        beforeEach(function() {
+            execSpy = spyOn(child_process, 'exec').andCallFake(function(cmd, opts, cb) {
+                if (!cb) cb = opts;
+                cb(null, 'git output');
+            });
+            spyOn(shell, 'which').andReturn(true);
+            cp_spy = spyOn(shell, 'cp');
+            xml_spy = spyOn(xml_helpers, 'parseElementtreeSync').andReturn({
+                getroot:function() {
+                    return {
+                        attrib:{id:fake_id}
+                    };
+                }
+            });
+            done = false;
+        });
+        it('should shell out to git clone with correct arguments', function(){
+            var plugin_git_url = 'https://github.com/imhotep/ChildBrowser';
+            var callback = jasmine.createSpy();
+
+            runs(function() {
+                plugins.clonePluginGitRepo(plugin_git_url, temp, '.', undefined)
+                .then(function(val) { done = val; }, function(err) { done = err; });
+            });
+            waitsFor(function() { return done; }, 'promise never resolved', 500);
+            runs(function() {
+                expect(execSpy).toHaveBeenCalled();
+                var git_clone_regex = new RegExp('^git clone "' + plugin_git_url + '" ".*"$', 'gi');
+                expect(execSpy.mostRecentCall.args[0]).toMatch(git_clone_regex);
+
+                expect(done).toMatch(new RegExp(path.sep + fake_id + '$'));
+            });
+        });
+        it('should take into account subdirectory argument when copying over final repository into plugins+plugin_id directory', function() {
+            var plugin_git_url = 'https://github.com/imhotep/ChildBrowser';
+            var fake_subdir = 'TheBrainRecoilsInHorror';
+            runs(function() {
+                plugins.clonePluginGitRepo(plugin_git_url, temp, fake_subdir)
+                .then(function(val) { done = val || true; }, function(err) { done = err; });
+            });
+            waitsFor(function() { return done; }, 'promise never resolved', 500);
+            runs(function() {
+                var expected_subdir_cp_path = new RegExp(fake_subdir + '[\\\\\\/]\\*$', 'gi');
+                expect(cp_spy.mostRecentCall.args[1]).toMatch(expected_subdir_cp_path);
+                expect(cp_spy.mostRecentCall.args[2]).toEqual(path.join(temp, fake_id));
+            });
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/util/xml-helpers.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/util/xml-helpers.spec.js b/cordova-lib/spec-plugman/util/xml-helpers.spec.js
new file mode 100644
index 0000000..edcdedb
--- /dev/null
+++ b/cordova-lib/spec-plugman/util/xml-helpers.spec.js
@@ -0,0 +1,170 @@
+/*
+ *
+ *
+ * Licensed 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 path = require('path')
+  , xml_helpers = require('../../src/util/xml-helpers')
+  , et = require('elementtree')
+
+  , title = et.XML('<title>HELLO</title>')
+  , usesNetworkOne = et.XML('<uses-permission ' +
+			'android:name="PACKAGE_NAME.permission.C2D_MESSAGE"/>')
+  , usesNetworkTwo = et.XML("<uses-permission android:name=\
+            \"PACKAGE_NAME.permission.C2D_MESSAGE\" />")
+  , usesReceive = et.XML("<uses-permission android:name=\
+            \"com.google.android.c2dm.permission.RECEIVE\"/>")
+  , helloTagOne = et.XML("<h1>HELLO</h1>")
+  , goodbyeTag = et.XML("<h1>GOODBYE</h1>")
+  , helloTagTwo = et.XML("<h1>  HELLO  </h1>");
+
+
+describe('xml-helpers', function(){
+    describe('equalNodes', function() {
+        it('should return false for different tags', function(){
+            expect(xml_helpers.equalNodes(usesNetworkOne, title)).toBe(false);
+        });
+
+        it('should return true for identical tags', function(){
+            expect(xml_helpers.equalNodes(usesNetworkOne, usesNetworkTwo)).toBe(true);
+        });
+
+        it('should return false for different attributes', function(){
+            expect(xml_helpers.equalNodes(usesNetworkOne, usesReceive)).toBe(false);
+        });
+
+        it('should distinguish between text', function(){
+            expect(xml_helpers.equalNodes(helloTagOne, goodbyeTag)).toBe(false);
+        });
+
+        it('should ignore whitespace in text', function(){
+            expect(xml_helpers.equalNodes(helloTagOne, helloTagTwo)).toBe(true);
+        });
+
+        describe('should compare children', function(){
+            it('by child quantity', function(){
+                var one = et.XML('<i><b>o</b></i>'),
+                    two = et.XML('<i><b>o</b><u></u></i>');
+
+                expect(xml_helpers.equalNodes(one, two)).toBe(false);
+            });
+
+            it('by child equality', function(){
+                var one = et.XML('<i><b>o</b></i>'),
+                    two = et.XML('<i><u></u></i>'),
+                    uno = et.XML('<i>\n<b>o</b>\n</i>');
+
+                expect(xml_helpers.equalNodes(one, uno)).toBe(true);
+                expect(xml_helpers.equalNodes(one, two)).toBe(false);
+            });
+        });
+    });
+    describe('pruneXML', function() {
+        var config_xml;
+
+        beforeEach(function() {
+            config_xml = xml_helpers.parseElementtreeSync(path.join(__dirname, '..', 'projects', 'android_two', 'res', 'xml', 'config.xml'));
+        });
+
+        it('should remove any children that match the specified selector', function() {
+            var children = config_xml.findall('plugins/plugin');
+            xml_helpers.pruneXML(config_xml, children, 'plugins');
+            expect(config_xml.find('plugins').getchildren().length).toEqual(0);
+        });
+        it('should do nothing if the children cannot be found', function() {
+            var children = [title];
+            xml_helpers.pruneXML(config_xml, children, 'plugins');
+            expect(config_xml.find('plugins').getchildren().length).toEqual(17);
+        });
+        it('should be able to handle absolute selectors', function() {
+            var children = config_xml.findall('plugins/plugin');
+            xml_helpers.pruneXML(config_xml, children, '/cordova/plugins');
+            expect(config_xml.find('plugins').getchildren().length).toEqual(0);
+        });
+        it('should be able to handle absolute selectors with wildcards', function() {
+            var children = config_xml.findall('plugins/plugin');
+            xml_helpers.pruneXML(config_xml, children, '/*/plugins');
+            expect(config_xml.find('plugins').getchildren().length).toEqual(0);
+        });
+    });
+
+    describe('graftXML', function() {
+        var config_xml, plugin_xml;
+
+        beforeEach(function() {
+            config_xml = xml_helpers.parseElementtreeSync(path.join(__dirname, '..', 'projects', 'android_two', 'res', 'xml', 'config.xml'));
+            plugin_xml = xml_helpers.parseElementtreeSync(path.join(__dirname, '..', 'plugins', 'ChildBrowser', 'plugin.xml'));
+        });
+
+        it('should add children to the specified selector', function() {
+            var children = plugin_xml.find('config-file').getchildren();
+            xml_helpers.graftXML(config_xml, children, 'plugins');
+            expect(config_xml.find('plugins').getchildren().length).toEqual(19);
+        });
+        it('should be able to handle absolute selectors', function() {
+            var children = plugin_xml.find('config-file').getchildren();
+            xml_helpers.graftXML(config_xml, children, '/cordova');
+            expect(config_xml.findall('access').length).toEqual(3);
+        });
+        it('should be able to handle absolute selectors with wildcards', function() {
+            var children = plugin_xml.find('config-file').getchildren();
+            xml_helpers.graftXML(config_xml, children, '/*');
+            expect(config_xml.findall('access').length).toEqual(3);
+        });
+
+        it('for simple XPath paths, the parent should be created if not present', function () {
+            var doc = new et.ElementTree(et.XML('<widget>')),
+                children = [et.XML('<rim:permits> super_awesome_permission </rim:permits>')],
+                selector= "/widget/rim:permissions";
+            expect(xml_helpers.graftXML(doc, children, selector)).toBe(true);
+            expect(et.tostring(doc.getroot())).toContain("<rim:permissions><rim:permits> super_awesome_permission </rim:permits></rim:permissions>");
+        });
+
+        it('returns false for more complicated selectors', function () {
+            var doc = new et.ElementTree(et.XML('<widget>')),
+                children = [et.XML('<rim:permits> super_awesome_permission </rim:permits>')],
+                selector= "/bookstore/book[price>35]/title";
+            expect(xml_helpers.graftXML(doc, children, selector)).toBe(false);
+        });
+
+        it('appends children after the specified sibling', function () {
+            var doc = new et.ElementTree(et.XML('<widget><A/><B/><C/></widget>')),
+                children = [et.XML('<B id="new"/>'), et.XML('<B id="new2"/>')],
+                selector= "/widget",
+                after= "B;A";
+            expect(xml_helpers.graftXML(doc, children, selector, after)).toBe(true);
+            expect(et.tostring(doc.getroot())).toContain('<B /><B id="new" /><B id="new2" />');
+        });
+
+        it('appends children after the 2nd priority sibling if the 1st one is missing', function () {
+            var doc = new et.ElementTree(et.XML('<widget><A/><C/></widget>')),
+                children = [et.XML('<B id="new"/>'), et.XML('<B id="new2"/>')],
+                selector= "/widget",
+                after= "B;A";
+            expect(xml_helpers.graftXML(doc, children, selector, after)).toBe(true);
+            expect(et.tostring(doc.getroot())).toContain('<A /><B id="new" /><B id="new2" />');
+        });
+
+        it('inserts children at the beginning if specified sibling is missing', function () {
+            var doc = new et.ElementTree(et.XML('<widget><B/><C/></widget>')),
+                children = [et.XML('<A id="new"/>'), et.XML('<A id="new2"/>')],
+                selector= "/widget",
+                after= "A";
+            expect(xml_helpers.graftXML(doc, children, selector, after)).toBe(true);
+            expect(et.tostring(doc.getroot())).toContain('<widget><A id="new" /><A id="new2" />');
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/wrappers.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/wrappers.spec.js b/cordova-lib/spec-plugman/wrappers.spec.js
new file mode 100644
index 0000000..3e61eb7
--- /dev/null
+++ b/cordova-lib/spec-plugman/wrappers.spec.js
@@ -0,0 +1,40 @@
+var Q = require('q'),
+    plugman = require('../plugman');
+
+describe('callback wrapper', function() {
+    var calls = ['install', 'uninstall', 'fetch', 'config', 'owner', 'adduser', 'publish', 'unpublish', 'search', 'info', 'create', 'platform'];
+    for (var i = 0; i < calls.length; i++) {
+        var call = calls[i];
+
+        describe('`' + call + '`', function() {
+            var raw;
+            beforeEach(function() {
+                raw = spyOn(plugman.raw, call);
+            });
+
+            it('should work with no callback and success', function() {
+                raw.andReturn(Q());
+                plugman[call]();
+                expect(raw).toHaveBeenCalled();
+            });
+
+            it('should call the callback on success', function(done) {
+                raw.andReturn(Q(1));
+                plugman[call](function(err) {
+                    expect(err).toBeUndefined();
+                    done();
+                });
+            });
+
+            it('should call the callback with the error on failure', function(done) {
+                var err = new Error('junk');
+                raw.andCallFake(function() { return Q.reject(err)});
+                plugman[call](function(err) {
+                    expect(err).toEqual(err);
+                    done();
+                });
+            });
+        });
+    }
+});
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/adduser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/adduser.js b/cordova-lib/src/plugman/adduser.js
new file mode 100644
index 0000000..b83a676
--- /dev/null
+++ b/cordova-lib/src/plugman/adduser.js
@@ -0,0 +1,5 @@
+var registry = require('./registry/registry')
+
+module.exports = function() {
+    return registry.adduser(null);
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/config.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/config.js b/cordova-lib/src/plugman/config.js
new file mode 100644
index 0000000..e892425
--- /dev/null
+++ b/cordova-lib/src/plugman/config.js
@@ -0,0 +1,5 @@
+var registry = require('./registry/registry')
+
+module.exports = function(params) {
+    return registry.config(params)
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/create.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/create.js b/cordova-lib/src/plugman/create.js
new file mode 100644
index 0000000..7db67b7
--- /dev/null
+++ b/cordova-lib/src/plugman/create.js
@@ -0,0 +1,81 @@
+/**
+    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 Q = require('q'),
+    fs = require('fs'),
+    path = require('path'),
+    shell = require('shelljs'),
+    et = require('elementtree');
+
+module.exports = function create( name, id, version, pluginPath, options ) {
+    var cwd = pluginPath + "/" + name + "/",
+        docDir = path.join(__dirname, '..', 'doc/'),
+        baseJS,
+        root,
+        pluginName,
+        clobber,
+        jsMod,
+        pluginxml;
+
+    //check we are not already in a plugin
+    if( fs.existsSync( cwd + 'plugin.xml' ) ) {
+        return Q.reject( new Error( 'plugin.xml already exists. Are you already in a plugin?' ) );
+    }
+
+    //Create a plugin.xml file
+    root = et.Element( 'plugin' );
+    root.set( 'xmlns', 'http://apache.org/cordova/ns/plugins/1.0' );
+    root.set( 'xmlns:android', 'http://schemas.android.com/apk/res/android' );
+    root.set( 'id', id );
+    root.set( 'version', version );
+
+    //Add the name tag
+    pluginName = et.XML( "<name>" );
+    pluginName.text = name;
+    root.append( pluginName );
+
+    //loop through the options( variables ) for other tags
+    for( var key in options ) {
+        var temp = et.XML( "<" + key + ">");
+        temp.text = options[ key ];
+        root.append( temp );
+    }
+
+    //setup the directory structure
+    shell.mkdir( '-p', cwd + "www" );
+    shell.mkdir( '-p', cwd + "src" );
+
+    //create a base plugin.js file
+    baseJS = fs.readFileSync( docDir + 'base.js', 'utf-8').replace( /%pluginName%/g, name );
+    fs.writeFileSync( cwd + 'www/' + name + '.js', baseJS, 'utf-8' );
+    //Add it to the xml as a js module
+    jsMod = et.Element( 'js-module' );
+    jsMod.set( 'src', 'www/' + name + '.js' );
+    jsMod.set( 'name', name );
+
+    clobber = et.Element( 'clobbers' );
+    clobber.set( 'target', 'cordova.plugins.' + name );
+    jsMod.append( clobber );
+
+    root.append( jsMod );
+
+    //Write out the plugin.xml file
+    fs.writeFileSync( cwd + "plugin.xml", new et.ElementTree( root ).write( {indent: 4} ), 'utf-8' );
+
+    return Q();
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/events.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/events.js b/cordova-lib/src/plugman/events.js
new file mode 100644
index 0000000..ed78839
--- /dev/null
+++ b/cordova-lib/src/plugman/events.js
@@ -0,0 +1,2 @@
+
+module.exports = new (require('events').EventEmitter)();

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/fetch.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/fetch.js b/cordova-lib/src/plugman/fetch.js
new file mode 100644
index 0000000..9948b7f
--- /dev/null
+++ b/cordova-lib/src/plugman/fetch.js
@@ -0,0 +1,175 @@
+var shell   = require('shelljs'),
+    fs      = require('fs'),
+    url     = require('url'),
+    plugins = require('./util/plugins'),
+    xml_helpers = require('./util/xml-helpers'),
+    events = require('./events'),
+    metadata = require('./util/metadata'),
+    path    = require('path'),
+    Q       = require('q'),
+    registry = require('./registry/registry');
+// XXX: leave the require('../plugman') because jasmine shits itself if you declare it up top
+// possible options: link, subdir, git_ref, client, expected_id
+// Returns a promise.
+module.exports = function fetchPlugin(plugin_src, plugins_dir, options) {
+    // Ensure the containing directory exists.
+    shell.mkdir('-p', plugins_dir);
+
+    options = options || {};
+    options.subdir = options.subdir || '.';
+    options.searchpath = options.searchpath || [];
+    if ( typeof options.searchpath === 'string' ) {
+        options.searchpath = options.searchpath.split(path.delimiter);
+    }
+
+    // clone from git repository
+    var uri = url.parse(plugin_src);
+
+    // If the hash exists, it has the form from npm: http://foo.com/bar#git-ref[:subdir]
+    // NB: No leading or trailing slash on the subdir.
+    if (uri.hash) {
+        var result = uri.hash.match(/^#([^:]*)(?::\/?(.*?)\/?)?$/);
+        if (result) {
+            if (result[1])
+                options.git_ref = result[1];
+            if(result[2])
+                options.subdir = result[2];
+
+            // Recurse and exit with the new options and truncated URL.
+            var new_dir = plugin_src.substring(0, plugin_src.indexOf('#'));
+            return fetchPlugin(new_dir, plugins_dir, options);
+        }
+    }
+
+    // If it looks like a network URL, git clone it.
+    if ( uri.protocol && uri.protocol != 'file:' && uri.protocol != 'c:' && !plugin_src.match(/^\w+:\\/)) {
+        events.emit('log', 'Fetching plugin "' + plugin_src + '" via git clone');
+        if (options.link) {
+            return Q.reject(new Error('--link is not supported for git URLs'));
+        } else {
+            var data = {
+                source: {
+                    type: 'git',
+                    url:  plugin_src,
+                    subdir: options.subdir,
+                    ref: options.git_ref
+                }
+            };
+
+            return plugins.clonePluginGit(plugin_src, plugins_dir, options)
+            .then(function(dir) {
+                return checkID(options.expected_id, dir);
+            })
+            .then(function(dir) {
+                metadata.save_fetch_metadata(dir, data);
+                return dir;
+            });
+        }
+    } else {
+        // If it's not a network URL, it's either a local path or a plugin ID.
+
+        var p,  // The Q promise to be returned.
+            linkable = true,
+            plugin_dir = path.join(plugin_src, options.subdir);
+
+        if (fs.existsSync(plugin_dir)) {
+            p = Q(plugin_dir);
+        } else {
+            // If there is no such local path, it's a plugin id.
+            // First look for it in the local search path (if provided).
+            var local_dir = findLocalPlugin(plugin_src, options.searchpath);
+            if (local_dir) {
+                p = Q(local_dir);
+                events.emit('verbose', 'Found ' + plugin_src + ' at ' + local_dir);
+            } else {
+                // If not found in local search path, fetch from the registry.
+                linkable = false;
+                events.emit('log', 'Fetching plugin "' + plugin_src + '" via plugin registry');
+                p = registry.fetch([plugin_src], options.client);
+            }
+        }
+
+        return p
+        .then(function(dir) {
+                options.plugin_src_dir = dir;
+
+                return copyPlugin(dir, plugins_dir, options.link && linkable);
+            })
+        .then(function(dir) {
+                return checkID(options.expected_id, dir);
+            });
+    }
+};
+
+function readId(dir) {
+    var xml_path = path.join(dir, 'plugin.xml');
+    var et = xml_helpers.parseElementtreeSync(path.join(dir, 'plugin.xml'));
+    var plugin_id = et.getroot().attrib.id;
+    return plugin_id;
+}
+
+// Helper function for checking expected plugin IDs against reality.
+function checkID(expected_id, dir) {
+    if ( expected_id ) {
+        var id = readId(dir);
+        if (expected_id != id) {
+            throw new Error('Expected fetched plugin to have ID "' + expected_id + '" but got "' + id + '".');
+        }
+    }
+    return dir;
+}
+
+var idCache = Object.create(null);
+// Look for plugin in local search path.
+function findLocalPlugin(plugin_id, searchpath) {
+    function tryPath(p) {
+        if (!(p in idCache)) {
+            var id = null;
+            if (fs.existsSync(path.join(p, 'plugin.xml'))) {
+                id = readId(p);
+            }
+            idCache[p] = id;
+        }
+        return (plugin_id === idCache[p]);
+    }
+
+    for (var i = 0; i < searchpath.length; i++) {
+        // Allow search path to point right to a plugin.
+        if (tryPath(searchpath[i])) {
+            return searchpath[i];
+        }
+        var files = fs.readdirSync(searchpath[i]);
+        for (var j = 0; j < files.length; j++) {
+            var pluginPath = path.join(searchpath[i], files[j]);
+            if (tryPath(pluginPath)) {
+                return pluginPath;
+            }
+        }
+    }
+    return null;
+}
+
+
+// Copy or link a plugin from plugin_dir to plugins_dir/plugin_id.
+function copyPlugin(plugin_dir, plugins_dir, link) {
+    var plugin_id = readId(plugin_dir);
+    var dest = path.join(plugins_dir, plugin_id);
+    shell.rm('-rf', dest);
+    if (link) {
+        events.emit('verbose', 'Linking plugin "' + plugin_dir + '" => "' + dest + '"');
+        fs.symlinkSync(plugin_dir, dest, 'dir');
+    } else {
+        shell.mkdir('-p', dest);
+        events.emit('verbose', 'Copying plugin "' + plugin_dir + '" => "' + dest + '"');
+        shell.cp('-R', path.join(plugin_dir, '*') , dest);
+    }
+
+    var data = {
+        source: {
+        type: 'local',
+              path: plugin_dir
+        }
+    };
+    metadata.save_fetch_metadata(dest, data);
+    return dest;
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/info.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/info.js b/cordova-lib/src/plugman/info.js
new file mode 100644
index 0000000..34c2af7
--- /dev/null
+++ b/cordova-lib/src/plugman/info.js
@@ -0,0 +1,6 @@
+var registry = require('./registry/registry')
+
+// Returns a promise.
+module.exports = function(plugin) {
+    return registry.info(plugin);
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/install.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/install.js b/cordova-lib/src/plugman/install.js
new file mode 100644
index 0000000..cce145d
--- /dev/null
+++ b/cordova-lib/src/plugman/install.js
@@ -0,0 +1,629 @@
+var path = require('path'),
+    fs   = require('fs'),
+    action_stack = require('./util/action-stack'),
+    dep_graph = require('dep-graph'),
+    elementtree = require('elementtree'),
+    child_process = require('child_process'),
+    semver = require('semver'),
+    config_changes = require('./util/config-changes'),
+    xml_helpers = require('./util/xml-helpers'),
+    Q = require('q'),
+    platform_modules = require('./platforms'),
+    os = require('os'),
+    underscore = require('underscore'),
+    shell   = require('shelljs'),
+    events = require('./events'),
+    plugman = require('../plugman'),
+    isWindows = (os.platform().substr(0,3) === 'win');
+
+/* INSTALL FLOW
+   ------------
+   There are four functions install "flows" through. Here is an attempt at
+   providing a high-level logic flow overview.
+   1. module.exports (installPlugin)
+     a) checks that the platform is supported
+     b) invokes possiblyFetch
+   2. possiblyFetch
+     a) checks that the plugin is fetched. if so, calls runInstall
+     b) if not, invokes plugman.fetch, and when done, calls runInstall
+   3. runInstall
+     a) checks if the plugin is already installed. if so, calls back (done).
+     b) if possible, will check the version of the project and make sure it is compatible with the plugin (checks <engine> tags)
+     c) makes sure that any variables required by the plugin are specified. if they are not specified, plugman will throw or callback with an error.
+     d) if dependencies are listed in the plugin, it will recurse for each dependent plugin and call possiblyFetch (2) on each one. When each dependent plugin is successfully installed, it will then proceed to call handleInstall (4)
+   4. handleInstall
+     a) queues up actions into a queue (asset, source-file, headers, etc)
+     b) processes the queue
+     c) calls back (done)
+*/
+
+// possible options: subdir, cli_variables, www_dir
+// Returns a promise.
+module.exports = function installPlugin(platform, project_dir, id, plugins_dir, options) {
+    options = options || {};
+    options.is_top_level = true;
+    plugins_dir = plugins_dir || path.join(project_dir, 'cordova', 'plugins');
+
+    if (!platform_modules[platform]) {
+        return Q.reject(new Error(platform + " not supported."));
+    }
+
+    var current_stack = new action_stack();
+
+    return possiblyFetch(id, plugins_dir, options)
+    .then(function(plugin_dir) {
+        return runInstall(current_stack, platform, project_dir, plugin_dir, plugins_dir, options);
+    });
+};
+
+// possible options: subdir, cli_variables, www_dir, git_ref, is_top_level
+// Returns a promise.
+function possiblyFetch(id, plugins_dir, options) {
+
+    // if plugin is a relative path, check if it already exists
+    var plugin_src_dir = path.join(plugins_dir, id);
+    if( isAbsolutePath(id) )
+        plugin_src_dir = id;
+
+    // Check that the plugin has already been fetched.
+    if (fs.existsSync(plugin_src_dir)) {
+        return Q(plugin_src_dir);
+    }
+
+    var opts = underscore.extend({}, options, {
+        link: false,
+        client: 'plugman'
+    });
+
+    // if plugin doesnt exist, use fetch to get it.
+    return plugman.raw.fetch(id, plugins_dir, opts);
+}
+
+function checkEngines(engines) {
+
+    for(var i = 0; i < engines.length; i++) {
+        var engine = engines[i];
+
+        if(semver.satisfies(engine.currentVersion, engine.minVersion) || engine.currentVersion === null){
+            // engine ok!
+        }else{
+            return Q.reject(new Error('Plugin doesn\'t support this project\'s '+engine.name+' version. '+engine.name+': ' + engine.currentVersion + ', failed version requirement: ' + engine.minVersion));
+        }
+    }
+
+    return Q(true);
+}
+
+function cleanVersionOutput(version, name){
+    var out = version.trim();
+    var rc_index = out.indexOf('rc');
+    var dev_index = out.indexOf('dev');
+    if (rc_index > -1) {
+        out = out.substr(0, rc_index) + '-' + out.substr(rc_index);
+    }
+
+    // put a warning about using the dev branch
+    if (dev_index > -1) {
+        // some platform still lists dev branches as just dev, set to null and continue
+        if(out=="dev"){
+            out = null;
+        }
+        events.emit('verbose', name+' has been detected as using a development branch. Attemping to install anyways.');
+    }
+
+    // add extra period/digits to conform to semver - some version scripts will output
+    // just a major or major minor version number
+    var majorReg = /\d+/,
+        minorReg = /\d+\.\d+/,
+        patchReg = /\d+\.\d+\.\d+/;
+
+    if(patchReg.test(out)){
+
+    }else if(minorReg.test(out)){
+        out = out.match(minorReg)[0]+'.0';
+    }else if(majorReg.test(out)){
+        out = out.match(majorReg)[0]+'.0.0';
+    }
+
+    return out;
+}
+
+// exec engine scripts in order to get the current engine version
+// Returns a promise for the array of engines.
+function callEngineScripts(engines) {
+    var engineScriptVersion;
+
+    return Q.all(
+        engines.map(function(engine){
+            // CB-5192; on Windows scriptSrc doesn't have file extension so we shouldn't check whether the script exists
+
+            var scriptPath = engine.scriptSrc ? '"' + engine.scriptSrc + '"' : null;
+
+            if(scriptPath && (isWindows || fs.existsSync(engine.scriptSrc)) ) {
+
+                var d = Q.defer();
+                if(!isWindows) { // not required on Windows
+                    fs.chmodSync(engine.scriptSrc, '755');
+                }
+                child_process.exec(scriptPath, function(error, stdout, stderr) {
+                    if (error) {
+                        events.emit('warn', engine.name +' version check failed ('+ scriptPath +'), continuing anyways.');
+                        engine.currentVersion = null;
+                    } else {
+                        engine.currentVersion = cleanVersionOutput(stdout, engine.name);
+                    }
+
+                    d.resolve(engine);
+                });
+                return d.promise;
+
+            } else {
+
+                if(engine.currentVersion) {
+                    engine.currentVersion = cleanVersionOutput(engine.currentVersion, engine.name)
+                } else {
+                    events.emit('warn', engine.name +' version not detected (lacks script '+ scriptPath +' ), continuing.');
+                }
+
+                return Q(engine);
+            }
+        })
+    );
+}
+
+// return only the engines we care about/need
+function getEngines(pluginElement, platform, project_dir, plugin_dir){
+    var engines = pluginElement.findall('engines/engine');
+    var defaultEngines = require('./util/default-engines')(project_dir);
+    var uncheckedEngines = [];
+    var cordovaEngineIndex, cordovaPlatformEngineIndex, theName, platformIndex, defaultPlatformIndex;
+    // load in known defaults and update when necessary
+
+    engines.forEach(function(engine){
+        theName = engine.attrib["name"];
+
+        // check to see if the engine is listed as a default engine
+        if(defaultEngines[theName]){
+            // make sure engine is for platform we are installing on
+            defaultPlatformIndex = defaultEngines[theName].platform.indexOf(platform);
+            if(defaultPlatformIndex > -1 || defaultEngines[theName].platform === '*'){
+                defaultEngines[theName].minVersion = defaultEngines[theName].minVersion ? defaultEngines[theName].minVersion : engine.attrib["version"];
+                defaultEngines[theName].currentVersion = defaultEngines[theName].currentVersion ? defaultEngines[theName].currentVersion : null;
+                defaultEngines[theName].scriptSrc = defaultEngines[theName].scriptSrc ? defaultEngines[theName].scriptSrc : null;
+                defaultEngines[theName].name = theName;
+
+                // set the indices so we can pop the cordova engine when needed
+                if(theName==='cordova') cordovaEngineIndex = uncheckedEngines.length;
+                if(theName==='cordova-'+platform) cordovaPlatformEngineIndex = uncheckedEngines.length;
+
+                uncheckedEngines.push(defaultEngines[theName]);
+            }
+        // check for other engines
+        }else{
+            platformIndex = engine.attrib["platform"].indexOf(platform);
+            if(platformIndex > -1 || engine.attrib["platform"] === '*'){
+                uncheckedEngines.push({ 'name': theName, 'platform': engine.attrib["platform"], 'scriptSrc':path.resolve(plugin_dir, engine.attrib["scriptSrc"]), 'minVersion' :  engine.attrib["version"]});
+            }
+        }
+    });
+
+    // make sure we check for platform req's and not just cordova reqs
+    if(cordovaEngineIndex && cordovaPlatformEngineIndex) uncheckedEngines.pop(cordovaEngineIndex);
+    return uncheckedEngines;
+}
+
+
+function isPluginInstalled(plugins_dir, platform, plugin_id) {
+    var platform_config = config_changes.get_platform_json(plugins_dir, platform);
+    for (var installed_plugin_id in platform_config.installed_plugins) {
+        if (installed_plugin_id == plugin_id) {
+            return true;
+        }
+    }
+    for (var installed_plugin_id in platform_config.dependent_plugins) {
+        if (installed_plugin_id == plugin_id) {
+            return true;
+        }
+    }
+    return false;
+}
+
+// possible options: cli_variables, www_dir, is_top_level
+// Returns a promise.
+var runInstall = module.exports.runInstall = function runInstall(actions, platform, project_dir, plugin_dir, plugins_dir, options) {
+    var xml_path     = path.join(plugin_dir, 'plugin.xml')
+      , plugin_et    = xml_helpers.parseElementtreeSync(xml_path)
+      , filtered_variables = {};
+    var name         = plugin_et.findall('name').text;
+    var plugin_id    = plugin_et.getroot().attrib['id'];
+
+    options = options || {};
+    options.graph = options.graph || new dep_graph();
+
+    if (isPluginInstalled(plugins_dir, platform, plugin_id)) {
+        if (options.is_top_level) {
+            events.emit('results', 'Plugin "' + plugin_id + '" already installed on ' + platform + '.');
+        } else {
+            events.emit('verbose', 'Dependent plugin "' + plugin_id + '" already installed on ' + platform + '.');
+        }
+        return Q();
+    }
+    events.emit('log', 'Installing "' + plugin_id + '" for ' + platform);
+
+    var theEngines = getEngines(plugin_et, platform, project_dir, plugin_dir);
+
+    var install = {
+        actions: actions,
+        platform: platform,
+        project_dir: project_dir,
+        plugins_dir: plugins_dir,
+        top_plugin_id: plugin_id,
+        top_plugin_dir: plugin_dir
+    }
+
+    return callEngineScripts(theEngines)
+    .then(checkEngines)
+    .then(
+        function() {
+            // checking preferences, if certain variables are not provided, we should throw.
+            var prefs = plugin_et.findall('./preference') || [];
+            prefs = prefs.concat(plugin_et.findall('./platform[@name="'+platform+'"]/preference'));
+            var missing_vars = [];
+            prefs.forEach(function (pref) {
+                var key = pref.attrib["name"].toUpperCase();
+                options.cli_variables = options.cli_variables || {};
+                if (options.cli_variables[key] === undefined)
+                    missing_vars.push(key)
+                else
+                    filtered_variables[key] = options.cli_variables[key]
+            });
+            install.filtered_variables = filtered_variables;
+
+            if (missing_vars.length > 0) {
+                throw new Error('Variable(s) missing: ' + missing_vars.join(", "));
+            }
+
+            // Check for dependencies
+            var dependencies = plugin_et.findall('dependency') || [];
+            dependencies = dependencies.concat(plugin_et.findall('./platform[@name="'+platform+'"]/dependency'));
+            if(dependencies && dependencies.length) {
+                return installDependencies(install, dependencies, options);
+            }
+            return Q(true);
+        }
+    ).then(
+        function(){
+            var install_plugin_dir = path.join(plugins_dir, plugin_id);
+
+            // may need to copy to destination...
+            if ( !fs.existsSync(install_plugin_dir) ) {
+                copyPlugin(plugin_dir, plugins_dir, options.link);
+            }
+
+            return handleInstall(actions, plugin_id, plugin_et, platform, project_dir, plugins_dir, install_plugin_dir, filtered_variables, options.www_dir, options.is_top_level);
+        }
+    ).fail(
+        function (error) {
+            events.emit('warn', "Failed to install '"+plugin_id+"':"+ error.stack);
+            throw error;
+        }
+    );
+}
+
+function installDependencies(install, dependencies, options) {
+    events.emit('verbose', 'Dependencies detected, iterating through them...');
+
+    var top_plugins = path.join(options.plugin_src_dir || install.top_plugin_dir, '..')
+
+    // Add directory of top-level plugin to search path
+    options.searchpath = options.searchpath || [];
+    if( top_plugins != install.plugins_dir && options.searchpath.indexOf(top_plugins) == -1 )
+        options.searchpath.push(top_plugins);
+
+    // Search for dependency by Id is:
+    // a) Look for {$top_plugins}/{$depId} directory
+    // b) Scan the top level plugin directory {$top_plugins} for matching id (searchpath)
+    // c) Fetch from registry
+
+    return dependencies.reduce(function(soFar, depXml) {
+        return soFar.then(
+            function() {
+                var dep = {
+                    id: depXml.attrib.id,
+                    subdir: depXml.attrib.subdir || '',
+                    url: depXml.attrib.url || '',
+                    git_ref: depXml.attrib.commit
+                }
+
+                if (dep.subdir.length) {
+                    dep.subdir = path.normalize(dep.subdir);
+                }
+
+                if (!dep.id) {
+                    throw new Error('<dependency> tag is missing id attribute: ' + elementtree.tostring(depXml, {xml_declaration:false}));
+                }
+
+                // We build the dependency graph only to be able to detect cycles, getChain will throw an error if it detects one
+                options.graph.add(install.top_plugin_id, dep.id);
+                options.graph.getChain(install.top_plugin_id);
+
+                return tryFetchDependency(dep, install, options)
+                .then(
+                    function(url){
+                        dep.url = url;
+                        return installDependency(dep, install, options);
+                    }
+                );
+            }
+        );
+
+    }, Q(true));
+}
+
+function tryFetchDependency(dep, install, options) {
+
+    // Handle relative dependency paths by expanding and resolving them.
+    // The easy case of relative paths is to have a URL of '.' and a different subdir.
+    // TODO: Implement the hard case of different repo URLs, rather than the special case of
+    // same-repo-different-subdir.
+    if ( dep.url == '.' ) {
+
+        // Look up the parent plugin's fetch metadata and determine the correct URL.
+        var fetchdata = require('./util/metadata').get_fetch_metadata(install.top_plugin_dir);
+        if (!fetchdata || !(fetchdata.source && fetchdata.source.type)) {
+
+            var relativePath = dep.subdir || dep.id;
+
+            events.emit('warn', 'No fetch metadata found for plugin ' + install.top_plugin_id + '. checking for ' + relativePath + ' in '+ options.searchpath.join(','));
+
+            return Q(relativePath);
+        }
+
+        // Now there are two cases here: local directory, and git URL.
+        var d = Q.defer();
+
+        if (fetchdata.source.type === 'local') {
+
+            dep.url = fetchdata.source.path;
+
+            child_process.exec('git rev-parse --show-toplevel', { cwd:dep.url }, function(err, stdout, stderr) {
+                if (err) {
+                    if (err.code == 128) {
+                        return d.reject(new Error('Plugin ' + dep.id + ' is not in git repository. All plugins must be in a git repository.'));
+                    } else {
+                        return d.reject(new Error('Failed to locate git repository for ' + dep.id + ' plugin.'));
+                    }
+                }
+                return d.resolve(stdout.trim());
+            });
+
+            return d.promise.then(function(git_repo) {
+                //Clear out the subdir since the url now contains it
+                var url = path.join(git_repo, dep.subdir);
+                dep.subdir = "";
+                return Q(url);
+            }).fail(function(error){
+//console.log("Failed to resolve url='.': " + error);
+                return Q(dep.url);
+            });
+
+        } else if (fetchdata.source.type === 'git') {
+            return Q(fetchdata.source.url);
+        } else if (fetchdata.source.type === 'dir') {
+
+            // Note: With fetch() independant from install()
+            // $md5 = md5(uri)
+            // Need a Hash(uri) --> $tmpDir/cordova-fetch/git-hostname.com-$md5/
+            // plugin[id].install.source --> searchpath that matches fetch uri
+
+            // mapping to a directory of OS containing fetched plugins
+            var tmpDir = fetchdata.source.url;
+            tmpDir = tmpDir.replace('$tmpDir', os.tmpdir());
+
+            var pluginSrc = '';
+            if(dep.subdir.length) {
+                // Plugin is relative to directory
+                pluginSrc = path.join(tmpDir, dep.subdir);
+            }
+
+            // Try searchpath in dir, if that fails re-fetch
+            if( !pluginSrc.length || !fs.existsSync(pluginSrc) ) {
+                pluginSrc = dep.id;
+
+                // Add search path
+                if( options.searchpath.indexOf(tmpDir) == -1 )
+                    options.searchpath.unshift(tmpDir); // place at top of search
+            }
+
+            return Q( pluginSrc );
+        }
+    }
+
+    // Test relative to parent folder
+    if( dep.url && isRelativePath(dep.url) ) {
+        var relativePath = path.resolve(install.top_plugin_dir, '../' + dep.url);
+
+        if( fs.existsSync(relativePath) ) {
+           dep.url = relativePath;
+        }
+    }
+
+    // CB-4770: registry fetching
+    if(dep.url === undefined) {
+        dep.url = dep.id;
+    }
+
+    return Q(dep.url);
+}
+
+function installDependency(dep, install, options) {
+
+    dep.install_dir = path.join(install.plugins_dir, dep.id);
+
+    if ( fs.existsSync(dep.install_dir) ) {
+        events.emit('verbose', 'Dependent plugin "' + dep.id + '" already fetched, using that version.');
+        var opts = underscore.extend({}, options, {
+            cli_variables: install.filtered_variables,
+            is_top_level: false
+        });
+
+       return runInstall(install.actions, install.platform, install.project_dir, dep.install_dir, install.plugins_dir, opts);
+
+    } else {
+        events.emit('verbose', 'Dependent plugin "' + dep.id + '" not fetched, retrieving then installing.');
+
+        var opts = underscore.extend({}, options, {
+            cli_variables: install.filtered_variables,
+            is_top_level: false,
+            subdir: dep.subdir,
+            git_ref: dep.git_ref,
+            expected_id: dep.id
+        });
+
+        var dep_src = dep.url.length ? dep.url : dep.id;
+
+        return possiblyFetch(dep_src, install.plugins_dir, opts)
+        .then(
+            function(plugin_dir) {
+                return runInstall(install.actions, install.platform, install.project_dir, plugin_dir, install.plugins_dir, opts);
+            }
+        );
+    };
+}
+
+function handleInstall(actions, plugin_id, plugin_et, platform, project_dir, plugins_dir, plugin_dir, filtered_variables, www_dir, is_top_level) {
+
+    // @tests - important this event is checked spec/install.spec.js
+    events.emit('verbose', 'Install start for "' + plugin_id + '" on ' + platform + '.');
+
+    var handler = platform_modules[platform];
+    www_dir = www_dir || handler.www_dir(project_dir);
+
+    var platformTag = plugin_et.find('./platform[@name="'+platform+'"]');
+    var assets = plugin_et.findall('asset');
+    if (platformTag) {
+
+
+        var sourceFiles = platformTag.findall('./source-file'),
+            headerFiles = platformTag.findall('./header-file'),
+            resourceFiles = platformTag.findall('./resource-file'),
+            frameworkFiles = platformTag.findall('./framework[@custom="true"]'), // CB-5238 adding only custom frameworks
+            libFiles = platformTag.findall('./lib-file'),
+            assets = assets.concat(platformTag.findall('./asset'));
+
+        // queue up native stuff
+        sourceFiles && sourceFiles.forEach(function(item) {
+            actions.push(actions.createAction(handler["source-file"].install,
+                                              [item, plugin_dir, project_dir, plugin_id],
+                                              handler["source-file"].uninstall,
+                                              [item, project_dir, plugin_id]));
+        });
+
+        headerFiles && headerFiles.forEach(function(item) {
+            actions.push(actions.createAction(handler["header-file"].install,
+                                             [item, plugin_dir, project_dir, plugin_id],
+                                             handler["header-file"].uninstall,
+                                             [item, project_dir, plugin_id]));
+        });
+
+        resourceFiles && resourceFiles.forEach(function(item) {
+            actions.push(actions.createAction(handler["resource-file"].install,
+                                              [item, plugin_dir, project_dir, plugin_id],
+                                              handler["resource-file"].uninstall,
+                                              [item, project_dir, plugin_id]));
+        });
+        // CB-5238 custom frameworks only
+        frameworkFiles && frameworkFiles.forEach(function(item) {
+            actions.push(actions.createAction(handler["framework"].install,
+                                             [item, plugin_dir, project_dir, plugin_id],
+                                             handler["framework"].uninstall,
+                                             [item, project_dir, plugin_id]));
+        });
+
+        libFiles && libFiles.forEach(function(item) {
+            actions.push(actions.createAction(handler["lib-file"].install,
+                                                [item, plugin_dir, project_dir, plugin_id],
+                                                handler["lib-file"].uninstall,
+                                                [item, project_dir, plugin_id]));
+
+        });
+    }
+
+    // run through the action stack
+    return actions.process(platform, project_dir)
+    .then(function(err) {
+        // queue up the plugin so prepare knows what to do.
+        config_changes.add_installed_plugin_to_prepare_queue(plugins_dir, plugin_id, platform, filtered_variables, is_top_level);
+        // call prepare after a successful install
+        plugman.prepare(project_dir, platform, plugins_dir, www_dir);
+
+        events.emit('verbose', 'Install complete for ' + plugin_id + ' on ' + platform + '.');
+        // WIN!
+        // Log out plugin INFO element contents in case additional install steps are necessary
+        var info = plugin_et.findall('./info');
+        if(info.length) {
+            events.emit('results', interp_vars(filtered_variables, info[0].text));
+        }
+        info = (platformTag ? platformTag.findall('./info') : []);
+        if(info.length) {
+            events.emit('results', interp_vars(filtered_variables, info[0].text));
+        }
+    });
+}
+
+function interp_vars(vars, text) {
+    vars && Object.keys(vars).forEach(function(key) {
+        var regExp = new RegExp("\\$" + key, "g");
+        text = text.replace(regExp, vars[key]);
+    });
+    return text;
+}
+
+function isAbsolutePath(path) {
+    return path && (path[0] === '/' || path[0] === '\\' || path.indexOf(':\\') > 0 );
+}
+
+function isRelativePath(path) {
+    return !isAbsolutePath();
+}
+
+function readId(plugin_dir) {
+    var xml_path = path.join(plugin_dir, 'plugin.xml');
+    events.emit('verbose', 'Fetch is reading plugin.xml from location "' + xml_path + '"...');
+    var et = xml_helpers.parseElementtreeSync(xml_path);
+
+    return et.getroot().attrib.id;
+}
+
+// Copy or link a plugin from plugin_dir to plugins_dir/plugin_id.
+function copyPlugin(plugin_src_dir, plugins_dir, link) {
+    var plugin_id = readId(plugin_src_dir);
+    var dest = path.join(plugins_dir, plugin_id);
+    shell.rm('-rf', dest);
+
+    if (link) {
+        events.emit('verbose', 'Symlinking from location "' + plugin_src_dir + '" to location "' + dest + '"');
+        fs.symlinkSync(plugin_src_dir, dest, 'dir');
+    } else {
+        shell.mkdir('-p', dest);
+        events.emit('verbose', 'Copying from location "' + plugin_src_dir + '" to location "' + dest + '"');
+        shell.cp('-R', path.join(plugin_src_dir, '*') , dest);
+    }
+
+    return dest;
+}
+
+function isPluginInstalled(plugins_dir, platform, plugin_id) {
+    var platform_config = config_changes.get_platform_json(plugins_dir, platform);
+    for (var installed_plugin_id in platform_config.installed_plugins) {
+        if (installed_plugin_id == plugin_id) {
+            return true;
+        }
+    }
+    for (var installed_plugin_id in platform_config.dependent_plugins) {
+        if (installed_plugin_id == plugin_id) {
+            return true;
+        }
+    }
+    return false;
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/owner.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/owner.js b/cordova-lib/src/plugman/owner.js
new file mode 100644
index 0000000..9eaf152
--- /dev/null
+++ b/cordova-lib/src/plugman/owner.js
@@ -0,0 +1,6 @@
+var registry = require('./registry/registry');
+
+// Returns a promise.
+module.exports = function(args) {
+    return registry.owner(args);
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/platform.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platform.js b/cordova-lib/src/plugman/platform.js
new file mode 100644
index 0000000..c80ac75
--- /dev/null
+++ b/cordova-lib/src/plugman/platform.js
@@ -0,0 +1,119 @@
+var Q = require('q'),
+    et = require('elementtree'),
+    fs = require('fs'),
+    shell = require('shelljs'),
+    path = require('path');
+
+module.exports = {
+    add: function( platformName ) {
+        var pluginxml,
+            platform;
+
+        //check to make sure we are in the plugin first
+        if( !fs.existsSync( 'plugin.xml' ) ) {
+            return Q.reject( new Error( "can't find a plugin.xml.  Are you in the plugin?" ) );
+        }
+
+        //Get the current plugin.xml file
+        pluginxml = et.parse( fs.readFileSync('plugin.xml', 'utf-8') );
+
+        //Check if this platform exists
+        if( pluginxml.find("./platform/[@name='"+ platformName +"']") ) {
+            return Q.reject( new Error( "platform: " + platformName + " already added"  ) );
+        }
+
+        //Get the platform specific elements
+        platform = doPlatform( platformName, pluginxml.find("./name").text, pluginxml.getroot().get( "id" ) );
+
+        //Make sure we support it
+        if( !platform ) {
+            return Q.reject( new Error( "platform: " + platformName + " not yet supported"  ) );
+        }
+
+        pluginxml.getroot().append( platform.getroot() );
+
+        fs.writeFileSync( "plugin.xml", pluginxml.write( "plugin.xml", {indent: 4} ), 'utf-8' );
+        return Q();
+    },
+    remove: function( platformName ) {
+        //check to make sure we are in the plugin first
+        if( !fs.existsSync( 'plugin.xml' ) ) {
+            return Q.reject( new Error( "can't find a plugin.xml.  Are you in the plugin?" ) );
+        }
+
+        //Get the current plugin.xml file
+        pluginxml = et.parse( fs.readFileSync('plugin.xml', 'utf-8') );
+
+        //Check if this platform exists
+        if( !pluginxml.find("./platform/[@name='"+ platformName +"']") ) {
+            return Q.reject( new Error( "platform: " + platformName + " hasn't been added"  ) );
+        }
+
+        //Remove the Platform in question
+        pluginxml.getroot().remove( 0, pluginxml.find("./platform/[@name='"+ platformName +"']") );
+
+        //Rewrite the plugin.xml file back out
+        fs.writeFileSync( "plugin.xml", pluginxml.write( "plugin.xml", {indent: 4} ), 'utf-8' );
+
+        //Remove the src/"platform"
+        shell.rm( '-rf', 'src/' + platformName );
+
+        return Q();
+    }
+};
+
+function doPlatform( platformName, pluginName, pluginID, pluginVersion ) {
+    var docDir = path.join(__dirname, '..', 'doc/platforms/' + platformName + "/"),
+        platformFile = docDir + platformName + ".xml",
+        platform;
+
+    if( !fs.existsSync( platformFile ) ) {
+        return false;
+    }
+
+    platform = fs.readFileSync( platformFile, 'utf-8' )
+                .replace( /%pluginName%/g, pluginName )
+                .replace( /%pluginID%/g, pluginID )
+                .replace( /%packageName%/g, pluginID.replace( /[.]/g, '/' ) );
+    platform = new et.ElementTree( et.XML( platform ) );
+
+    doPlatformBase( docDir, platformName, pluginName, pluginID, pluginVersion );
+
+    return platform;
+}
+
+function doPlatformBase( docDir, platformName, pluginName, pluginID, pluginVersion ) {
+    //Create the default plugin file
+    var baseFiles = [],
+        i = 0;
+
+    switch( platformName ) {
+    case 'android':
+        baseFiles.push (
+            {
+                file: fs.readFileSync( docDir + "base.java", "utf-8" )
+                    .replace( /%pluginName%/g, pluginName )
+                    .replace( /%pluginID%/g, pluginID ),
+                extension: "java"
+            }
+        );
+
+        break;
+    case 'ios':
+        baseFiles.push(
+            {
+                file: fs.readFileSync( docDir + "base.m", "utf-8" )
+                    .replace( /%pluginName%/g, pluginName ),
+                extension: "m"
+            }
+        );
+        break;
+    }
+
+    shell.mkdir( '-p', 'src/' + platformName );
+
+    for( i; i < baseFiles.length; i++ ) {
+        fs.writeFileSync( 'src/' + platformName + '/' + pluginName + '.' + baseFiles[ i ].extension, baseFiles[ i ].file, 'utf-8' );
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/platform_operation.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platform_operation.js b/cordova-lib/src/plugman/platform_operation.js
new file mode 100644
index 0000000..e17f5db
--- /dev/null
+++ b/cordova-lib/src/plugman/platform_operation.js
@@ -0,0 +1,5 @@
+var platform = require('./platform');
+
+module.exports = function( args ) {
+    return platform[ args.operation ]( args.platform_name );
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/platforms.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms.js b/cordova-lib/src/plugman/platforms.js
new file mode 100644
index 0000000..a2ad634
--- /dev/null
+++ b/cordova-lib/src/plugman/platforms.js
@@ -0,0 +1,12 @@
+module.exports = {
+    'android': require('./platforms/android'),
+    'amazon-fireos': require('./platforms/amazon-fireos'),
+    'ios': require('./platforms/ios'),
+    'blackberry10': require('./platforms/blackberry10'),
+    'wp7': require('./platforms/wp7'),
+    'wp8': require('./platforms/wp8'),
+    'windows8' : require('./platforms/windows8'),
+    'firefoxos': require('./platforms/firefoxos'),
+    'ubuntu': require('./platforms/ubuntu'),
+    'tizen': require('./platforms/tizen')
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/platforms/amazon-fireos.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/amazon-fireos.js b/cordova-lib/src/plugman/platforms/amazon-fireos.js
new file mode 100644
index 0000000..adfc847
--- /dev/null
+++ b/cordova-lib/src/plugman/platforms/amazon-fireos.js
@@ -0,0 +1,88 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed 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 fs = require('fs')  // use existsSync in 0.6.x
+   , path = require('path')
+   , common = require('./common')
+   , events = require('../events')
+   , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
+
+module.exports = {
+    www_dir:function(project_dir) {
+        return path.join(project_dir, 'assets', 'www');
+    },
+    // reads the package name out of the Android Manifest file
+    // @param string project_dir the absolute path to the directory containing the project
+    // @return string the name of the package
+    package_name:function (project_dir) {
+        var mDoc = xml_helpers.parseElementtreeSync(path.join(project_dir, 'AndroidManifest.xml'));
+
+        return mDoc._root.attrib['package'];
+    },
+    "source-file":{
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
+            common.copyFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
+            common.deleteJava(project_dir, dest);
+        }
+    },
+    "header-file": {
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'header-fileinstall is not supported for amazon-fireos');
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            events.emit('verbose', 'header-file.uninstall is not supported for amazon-fireos');
+        }
+    },
+    "lib-file":{
+        install:function(lib_el, plugin_dir, project_dir, plugin_id) {
+            var src = lib_el.attrib.src;
+            var dest = path.join("libs", path.basename(src));
+            common.copyFile(plugin_dir, src, project_dir, dest);
+        },
+        uninstall:function(lib_el, project_dir, plugin_id) {
+            var src = lib_el.attrib.src;
+            var dest = path.join("libs", path.basename(src));
+            common.removeFile(project_dir, dest);
+        }
+    },
+    "resource-file":{
+        install:function(el, plugin_dir, project_dir, plugin_id) {
+            var src = el.attrib.src;
+            var target = el.attrib.target;
+            events.emit('verbose', 'Copying resource file ' + src + ' to ' + target);
+            common.copyFile(plugin_dir, src, project_dir, target);
+        },
+        uninstall:function(el, project_dir, plugin_id) {
+            var target = el.attrib.target;
+            common.removeFile(project_dir, target);
+        }
+    },
+    "framework": {
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'framework.install is not supported for amazon-fireos');
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            events.emit('verbose', 'framework.uninstall is not supported for amazon-fireos');
+        }
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/platforms/android.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/android.js b/cordova-lib/src/plugman/platforms/android.js
new file mode 100644
index 0000000..c323790
--- /dev/null
+++ b/cordova-lib/src/plugman/platforms/android.js
@@ -0,0 +1,89 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed 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 fs = require('fs')  // use existsSync in 0.6.x
+   , path = require('path')
+   , common = require('./common')
+   , events = require('../events')
+   , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
+
+module.exports = {
+    www_dir:function(project_dir) {
+        return path.join(project_dir, 'assets', 'www');
+    },
+    // reads the package name out of the Android Manifest file
+    // @param string project_dir the absolute path to the directory containing the project
+    // @return string the name of the package
+    package_name:function (project_dir) {
+        var mDoc = xml_helpers.parseElementtreeSync(path.join(project_dir, 'AndroidManifest.xml'));
+
+        return mDoc._root.attrib['package'];
+    },
+    "source-file":{
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
+
+            common.copyNewFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
+            common.deleteJava(project_dir, dest);
+        }
+    },
+    "header-file": {
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'header-file.install is not supported for android');
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            events.emit('verbose', 'header-file.uninstall is not supported for android');
+        }
+    },
+    "lib-file":{
+        install:function(lib_el, plugin_dir, project_dir, plugin_id) {
+            var src = lib_el.attrib.src;
+            var dest = path.join("libs", path.basename(src));
+            common.copyFile(plugin_dir, src, project_dir, dest);
+        },
+        uninstall:function(lib_el, project_dir, plugin_id) {
+            var src = lib_el.attrib.src;
+            var dest = path.join("libs", path.basename(src));
+            common.removeFile(project_dir, dest);
+        }
+    },
+    "resource-file":{
+        install:function(el, plugin_dir, project_dir, plugin_id) {
+            var src = el.attrib.src;
+            var target = el.attrib.target;
+            events.emit('verbose', 'Copying resource file ' + src + ' to ' + target);
+            common.copyFile(plugin_dir, src, project_dir, path.normalize(target));
+        },
+        uninstall:function(el, project_dir, plugin_id) {
+            var target = el.attrib.target;
+            common.removeFile(project_dir, path.normalize(target));
+        }
+    },
+    "framework": {
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'framework.install is not supported for android');
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            events.emit('verbose', 'framework.uninstall is not supported for android');
+        }
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/platforms/blackberry10.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/blackberry10.js b/cordova-lib/src/plugman/platforms/blackberry10.js
new file mode 100644
index 0000000..9e370b6
--- /dev/null
+++ b/cordova-lib/src/plugman/platforms/blackberry10.js
@@ -0,0 +1,94 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed 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 fs = require('fs')  // use existsSync in 0.6.x
+   , path = require('path')
+   , common = require('./common')
+   , events = require('../events')
+   , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
+
+var TARGETS = ["device", "simulator"];
+
+module.exports = {
+    www_dir:function(project_dir) {
+        return path.join(project_dir, 'www');
+    },
+    package_name:function(project_dir) {
+        var config_path = path.join(module.exports.www_dir(project_dir), 'config.xml');
+        var widget_doc = xml_helpers.parseElementtreeSync(config_path);
+        return widget_doc._root.attrib['id'];
+    },
+    "source-file":{
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            var src = source_el.attrib['src'];
+            var target = source_el.attrib['target-dir'] || plugin_id;
+            TARGETS.forEach(function(arch) {
+                var dest = path.join("native", arch, "chrome", "plugin", target, path.basename(src));
+
+                common.copyNewFile(plugin_dir, src, project_dir, dest);
+            });
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            var src = source_el.attrib['src'];
+            var target = source_el.attrib['target-dir'] || plugin_id;
+            TARGETS.forEach(function(arch) {
+                var dest = path.join("native", arch, "chrome", "plugin", target, path.basename(src));
+                common.removeFile(project_dir, dest);
+            });
+        }
+    },
+    "header-file": {
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'header-file.install is not supported for blackberry');
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            events.emit('verbose', 'header-file.uninstall is not supported for blackberry');
+        }
+    },
+    "lib-file":{
+        install:function(lib_el, plugin_dir, project_dir, plugin_id) {
+            var src = lib_el.attrib.src;
+            var arch = lib_el.attrib.arch;
+            var dest = path.join("native", arch, "plugins", "jnext", path.basename(src));
+            common.copyFile(plugin_dir, src, project_dir, dest);
+        },
+        uninstall:function(lib_el, project_dir, plugin_id) {
+            var src = lib_el.attrib.src;
+            var arch = lib_el.attrib.arch;
+            var dest = path.join("native", arch, "plugins", "jnext", path.basename(src));
+            common.removeFile(project_dir, dest);
+        }
+    },
+    "resource-file":{
+        install:function(el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'resource-file.install is not supported for blackberry');
+        },
+        uninstall:function(el, project_dir, plugin_id) {
+            events.emit('verbose', 'resource-file.uninstall is not supported for blackberry');
+        }
+    },
+    "framework": {
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'framework.install is not supported for blackberry');
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            events.emit('verbose', 'framework.uninstall is not supported for blackberry');
+        }
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/platforms/common.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/common.js b/cordova-lib/src/plugman/platforms/common.js
new file mode 100644
index 0000000..399da00
--- /dev/null
+++ b/cordova-lib/src/plugman/platforms/common.js
@@ -0,0 +1,94 @@
+var shell = require('shelljs'),
+    path  = require('path'),
+    fs    = require('fs'),
+    common;
+
+module.exports = common = {
+    // helper for resolving source paths from plugin.xml
+    resolveSrcPath:function(plugin_dir, relative_path) {
+        var full_path = path.resolve(plugin_dir, relative_path);
+        return full_path;
+    },
+    // helper for resolving target paths from plugin.xml into a cordova project
+    resolveTargetPath:function(project_dir, relative_path) {
+        var full_path = path.resolve(project_dir, relative_path);
+        return full_path;
+    },
+    // Many times we simply need to copy shit over, knowing if a source path doesnt exist or if a target path already exists
+    copyFile:function(plugin_dir, src, project_dir, dest) {
+        src = module.exports.resolveSrcPath(plugin_dir, src);
+        if (!fs.existsSync(src)) throw new Error('"' + src + '" not found!');
+        dest = module.exports.resolveTargetPath(project_dir, dest);
+        shell.mkdir('-p', path.dirname(dest));
+
+        // XXX shelljs decides to create a directory when -R|-r is used which sucks. http://goo.gl/nbsjq
+        if(fs.statSync(src).isDirectory()) {
+            shell.cp('-Rf', src+'/*', dest);
+        } else {
+            shell.cp('-f', src, dest);
+        }
+    },
+    // Same as copy file but throws error if target exists
+    copyNewFile:function(plugin_dir, src, project_dir, dest) {
+        var target_path = common.resolveTargetPath(project_dir, dest);
+        if (fs.existsSync(target_path))
+            throw new Error('"' + target_path + '" already exists!');
+
+        common.copyFile(plugin_dir, src, project_dir, dest);
+    },
+    // checks if file exists and then deletes. Error if doesn't exist
+    removeFile:function(project_dir, src) {
+        var file = module.exports.resolveSrcPath(project_dir, src);
+        shell.rm('-Rf', file);
+    },
+    // deletes file/directory without checking
+    removeFileF:function(file) {
+        shell.rm('-Rf', file);
+    },
+    // Sometimes we want to remove some java, and prune any unnecessary empty directories
+    deleteJava:function(project_dir, destFile) {
+        var file = path.resolve(project_dir, destFile);
+        if (!fs.existsSync(file)) return;
+
+        common.removeFileF(file);
+
+        // check if directory is empty
+        var curDir = path.dirname(file);
+
+        while(curDir !== path.resolve(project_dir, 'src')) {
+            if(fs.existsSync(curDir) && fs.readdirSync(curDir) == 0) {
+                fs.rmdirSync(curDir);
+                curDir = path.resolve(curDir, '..');
+            } else {
+                // directory not empty...do nothing
+                break;
+            }
+        }
+    },
+    // handle <asset> elements
+    asset:{
+        install:function(asset_el, plugin_dir, www_dir) {
+            var src = asset_el.attrib.src;
+            var target = asset_el.attrib.target;
+
+            if (!src) {
+                throw new Error('<asset> tag without required "src" attribute');
+            }
+            if (!target) {
+                throw new Error('<asset> tag without required "target" attribute');
+            }
+
+            common.copyFile(plugin_dir, src, www_dir, target);
+        },
+        uninstall:function(asset_el, www_dir, plugin_id) {
+            var target = asset_el.attrib.target || asset_el.attrib.src;
+
+            if (!target) {
+                throw new Error('<asset> tag without required "target" attribute');
+            }
+
+            common.removeFile(www_dir, target);
+            common.removeFileF(path.resolve(www_dir, 'plugins', plugin_id));
+        }
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/platforms/firefoxos.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/firefoxos.js b/cordova-lib/src/plugman/platforms/firefoxos.js
new file mode 100644
index 0000000..efbeba9
--- /dev/null
+++ b/cordova-lib/src/plugman/platforms/firefoxos.js
@@ -0,0 +1,72 @@
+var path = require('path')
+    , fs = require('fs')
+    , common = require('./common')
+    , events = require('../events')
+    , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
+
+module.exports = {
+    www_dir: function(project_dir) {
+        return path.join(project_dir, 'www');
+    },
+    package_name:function(project_dir) {
+        // preferred location if cordova >= 3.4
+        var preferred_path = path.join(project_dir, 'config.xml');
+        if (!fs.existsSync(preferred_path)) {
+            // older location
+            old_config_path = path.join(module.exports.www_dir(project_dir), 'config.xml');
+            if (!fs.existsSync(old_config_path)) {
+                // output newer location and fail reading
+                config_path = preferred_path;
+                events.emit('verbose', 'unable to find '+config_path);
+            } else {
+                config_path = old_config_path;
+            }
+        } else {
+            config_path = preferred_path;
+        }
+        var widget_doc = xml_helpers.parseElementtreeSync(config_path);
+        return widget_doc._root.attrib['id'];
+    },
+    "source-file":{
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
+            common.copyFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
+            common.removeFile(project_dir, dest);
+        }
+    },
+    "header-file": {
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'header-fileinstall is not supported for firefoxos');
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            events.emit('verbose', 'header-file.uninstall is not supported for firefoxos');
+        }
+    },
+    "resource-file":{
+        install:function(el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'resource-file.install is not supported for firefoxos');
+        },
+        uninstall:function(el, project_dir, plugin_id) {
+            events.emit('verbose', 'resource-file.uninstall is not supported for firefoxos');
+        }
+    },
+    "framework": {
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'framework.install is not supported for firefoxos');
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            events.emit('verbose', 'framework.uninstall is not supported for firefoxos');
+        }
+    },
+    "lib-file": {
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'lib-file.install is not supported for firefoxos');
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            events.emit('verbose', 'lib-file.uninstall is not supported for firefoxos');
+        }
+    }
+};


[11/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/subdir/E/src/ios/EPluginCommand.h
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/subdir/E/src/ios/EPluginCommand.h b/spec/plugins/dependencies/subdir/E/src/ios/EPluginCommand.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/subdir/E/src/ios/EPluginCommand.m
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/subdir/E/src/ios/EPluginCommand.m b/spec/plugins/dependencies/subdir/E/src/ios/EPluginCommand.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/subdir/E/www/plugin-e.js
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/subdir/E/www/plugin-e.js b/spec/plugins/dependencies/subdir/E/www/plugin-e.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/multiple-children/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/multiple-children/plugin.xml b/spec/plugins/multiple-children/plugin.xml
deleted file mode 100644
index fd10a04..0000000
--- a/spec/plugins/multiple-children/plugin.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="com.pushwoosh.plugins.pushwoosh"
-    version="3.0.0">
-
-    <name>Pushwoosh</name>
-
-    <!-- android -->
-    <platform name="android">
-		<config-file target="AndroidManifest.xml" parent="/manifest">
-			<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
-			
-			<!--library-->
-			<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
-			
-			<!-- GCM connects to Google Services. -->
-			<uses-permission android:name="android.permission.INTERNET"/>
-			
-			<!-- GCM requires a Google account. -->
-			<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
-			
-			<!-- Keeps the processor from sleeping when a message is received. -->
-			<uses-permission android:name="android.permission.WAKE_LOCK"/>
-			
-			<!--
-			 Creates a custom permission so only this app can receive its messages.
-			 
-			 NOTE: the permission *must* be called PACKAGE.permission.C2D_MESSAGE,
-			 where PACKAGE is the application's package name.
-			 -->
-			<permission
-			android:name="$PACKAGE_NAME.permission.C2D_MESSAGE"
-			android:protectionLevel="signature"/>
-			<uses-permission
-			android:name="$PACKAGE_NAME.permission.C2D_MESSAGE"/>
-			
-			<!-- This app has permission to register and receive data message. -->
-			<uses-permission
-			android:name="com.google.android.c2dm.permission.RECEIVE"/>
-		</config-file>
-		
-		<config-file target="AndroidManifest.xml" parent="/manifest/application/activity">
-			<intent-filter>
-				<action android:name="$PACKAGE_NAME.MESSAGE"/>
-				<category android:name="android.intent.category.DEFAULT"/>
-			</intent-filter>
-		</config-file>
-
-		<config-file target="AndroidManifest.xml" parent="/manifest/application">
-			<activity android:name="com.arellomobile.android.push.PushWebview"/>
-			
-			<activity android:name="com.arellomobile.android.push.MessageActivity"/>
-			
-			<activity android:name="com.arellomobile.android.push.PushHandlerActivity"/>
-			
-			<!--
-			 BroadcastReceiver that will receive intents from GCM
-			 services and handle them to the custom IntentService.
-			 
-			 The com.google.android.c2dm.permission.SEND permission is necessary
-			 so only GCM services can send data messages for the app.
-			 -->
-			<receiver
-				android:name="com.google.android.gcm.GCMBroadcastReceiver"
-				android:permission="com.google.android.c2dm.permission.SEND">
-				<intent-filter>
-					<!-- Receives the actual messages. -->
-					<action android:name="com.google.android.c2dm.intent.RECEIVE"/>
-					<!-- Receives the registration id. -->
-					<action android:name="com.google.android.c2dm.intent.REGISTRATION"/>
-					<category android:name="$PACKAGE_NAME"/>
-				</intent-filter>
-			</receiver>
-			
-			<!--
-			 Application-specific subclass of PushGCMIntentService that will
-			 handle received messages.
-			 -->
-			<service android:name="com.arellomobile.android.push.PushGCMIntentService"/>        					
-			
-		</config-file>
-		
-		<config-file target="res/xml/plugins.xml" parent="/plugins">
-            <plugin name="PushNotification"
-			value="com.pushwoosh.test.plugin.pushnotifications.PushNotifications" onload="true"/>
-        </config-file>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/shared-deps-multi-child/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/shared-deps-multi-child/plugin.xml b/spec/plugins/shared-deps-multi-child/plugin.xml
deleted file mode 100644
index 6c17476..0000000
--- a/spec/plugins/shared-deps-multi-child/plugin.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="ca.filmaj.shareddeps"
-    version="1.0.0">
-
-    <name>Sharing Dependencies with the Multi-Child Plugin, woo</name>
-
-    <!-- android -->
-    <platform name="android">
-		<config-file target="AndroidManifest.xml" parent="/manifest">
-			<uses-permission android:name="android.permission.INTERNET"/>
-		</config-file>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/prepare.spec.js
----------------------------------------------------------------------
diff --git a/spec/prepare.spec.js b/spec/prepare.spec.js
deleted file mode 100644
index 6adaf9a..0000000
--- a/spec/prepare.spec.js
+++ /dev/null
@@ -1,59 +0,0 @@
-var platforms = require('../src/platforms'),
-    prepare = require('../src/prepare'),
-    common  = require('../src/platforms/common');
-    fs      = require('fs'),
-    os      = require('osenv'),
-    path    = require('path'),
-    shell   = require('shelljs'),
-    config_changes = require('../src/util/config-changes'),
-    temp    = __dirname,
-    plugins_dir = path.join(temp, 'plugins');
-
-var json = path.join(temp, 'assets', 'www', 'cordova_plugins.json');
-var js = path.join(temp, 'assets', 'www', 'cordova_plugins.js');
-
-describe('prepare', function() {
-    var proc, platform_json, write, mkdir, rm;
-    beforeEach(function() {
-        rm = spyOn(shell, 'rm');
-        mkdir = spyOn(shell, 'mkdir');
-        proc = spyOn(config_changes, 'process');
-        platform_json = spyOn(config_changes, 'get_platform_json').andReturn({installed_plugins:{},dependent_plugins:{},prepare_queue:{uninstalled:[]}});
-        write = spyOn(fs, 'writeFileSync');
-    });
-    it('should create cordova_plugins.js file in a custom www directory', function() {
-        var custom_www = path.join(temp, 'assets', 'custom_www'),
-            js = path.join(temp, 'assets', 'custom_www', 'cordova_plugins.js');
-        prepare(temp, 'android', plugins_dir, custom_www);
-        expect(write).toHaveBeenCalledWith(js, jasmine.any(String), 'utf-8');
-    });
-    describe('handling of js-modules', function() {
-        var copySpy;
-        beforeEach(function() {
-            copySpy = spyOn(common, 'copyFile');
-            platform_json.andReturn({
-                installed_plugins: {plugin_one: '', plugin_two: ''},
-                dependent_plugins: {}, prepare_queue: {uninstalled:[]}
-            });
-        });
-        describe('uninstallation/removal', function() {
-            var existsSync;
-            beforeEach(function() {
-                existsSync = spyOn(fs, 'existsSync').andReturn(true);
-                platform_json.andReturn({installed_plugins:{},dependent_plugins:{},prepare_queue:{uninstalled:[{
-                    plugin:'nickelback',
-                    id:'nickelback',
-                    topLevel:true
-                }]}});
-            });
-            it('should remove any www/plugins directories related to plugins being queued for removal', function() {
-                prepare(temp, 'android', plugins_dir);
-                expect(rm).toHaveBeenCalledWith('-rf', path.join(temp, 'assets', 'www', 'plugins', 'nickelback'));
-            });
-        });
-    });
-    it('should call into config-changes\' process method to do config processing', function() {
-        prepare(temp, 'android', plugins_dir);
-        expect(proc).toHaveBeenCalledWith(plugins_dir, temp, 'android');
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/.gitkeep
----------------------------------------------------------------------
diff --git a/spec/projects/.gitkeep b/spec/projects/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_install/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/spec/projects/android_install/AndroidManifest.xml b/spec/projects/android_install/AndroidManifest.xml
deleted file mode 100644
index b5fea9d..0000000
--- a/spec/projects/android_install/AndroidManifest.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<manifest android:versionCode="5" android:versionName="1.1" android:windowSoftInputMode="adjustPan" package="cordova.test.uninstall" xmlns:android="http://schemas.android.com/apk/res/android">
-    <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
-    <application android:debuggable="true" android:icon="@drawable/icon" android:label="@string/app_name">
-        <activity android:configChanges="orientation|keyboardHidden" android:label="@string/app_name" android:name="ChildApp">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-        <activity android:configChanges="orientation|keyboardHidden" android:label="@string/app_name" android:name="com.phonegap.DroidGap">
-            <intent-filter>
-            </intent-filter>
-        </activity>
-        <activity android:label="@string/app_name" android:name="com.phonegap.plugins.dummyplugin.DummyPlugin">
-            <intent-filter />
-        </activity>
-    </application>
-    <uses-sdk android:minSdkVersion="5" />
-</manifest>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_install/cordova/android_sdk_version
----------------------------------------------------------------------
diff --git a/spec/projects/android_install/cordova/android_sdk_version b/spec/projects/android_install/cordova/android_sdk_version
deleted file mode 100644
index 0ab155c..0000000
--- a/spec/projects/android_install/cordova/android_sdk_version
+++ /dev/null
@@ -1 +0,0 @@
-echo 18.0.9
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_install/cordova/version
----------------------------------------------------------------------
diff --git a/spec/projects/android_install/cordova/version b/spec/projects/android_install/cordova/version
deleted file mode 100644
index 01f68fd..0000000
--- a/spec/projects/android_install/cordova/version
+++ /dev/null
@@ -1 +0,0 @@
-echo 9.0.0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_install/cordova/version.bat
----------------------------------------------------------------------
diff --git a/spec/projects/android_install/cordova/version.bat b/spec/projects/android_install/cordova/version.bat
deleted file mode 100644
index c637d7c..0000000
--- a/spec/projects/android_install/cordova/version.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-@ECHO OFF
-echo 9.0.0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_one/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/spec/projects/android_one/AndroidManifest.xml b/spec/projects/android_one/AndroidManifest.xml
deleted file mode 100644
index 0979b02..0000000
--- a/spec/projects/android_one/AndroidManifest.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
-      package="com.alunny.childapp" android:versionName="1.1" android:versionCode="5">
-    <supports-screens
-    	android:largeScreens="true"
-    	android:normalScreens="true"
-    	android:smallScreens="true"
-    	android:xlargeScreens="true"
-    	android:resizeable="true"
-    	android:anyDensity="true"
-    	/>
-
-    <uses-permission android:name="android.permission.CAMERA" />
-    <uses-permission android:name="android.permission.VIBRATE" />
-    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
-    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
-    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
-    <uses-permission android:name="android.permission.INTERNET" />
-    <uses-permission android:name="android.permission.RECEIVE_SMS" />
-    <uses-permission android:name="android.permission.RECORD_AUDIO" />
-    <uses-permission android:name="android.permission.RECORD_VIDEO"/>
-    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
-    <uses-permission android:name="android.permission.READ_CONTACTS" />
-    <uses-permission android:name="android.permission.WRITE_CONTACTS" />   
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />   
-    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
-    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
-    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
-
-    <uses-feature android:name="android.hardware.camera" />
-    <uses-feature android:name="android.hardware.camera.autofocus" />
-    
-    <appid value="$APP_ID" />
-
-    <application android:icon="@drawable/icon" android:label="@string/app_name"
-    	android:debuggable="true">
-		<activity android:name="ChildApp" android:label="@string/app_name" 
-				  android:configChanges="orientation|keyboardHidden">
-			<intent-filter>
-				<action android:name="android.intent.action.MAIN" />
-				<category android:name="android.intent.category.LAUNCHER" />
-			</intent-filter>
-        </activity>
-        <activity android:name="com.phonegap.DroidGap" android:label="@string/app_name" 
-            	  android:configChanges="orientation|keyboardHidden">
-        	<intent-filter>
-        	</intent-filter>
-        </activity>
-    </application>
-
-	<uses-sdk android:minSdkVersion="5" />
-</manifest> 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_one/assets/www/.gitkeep
----------------------------------------------------------------------
diff --git a/spec/projects/android_one/assets/www/.gitkeep b/spec/projects/android_one/assets/www/.gitkeep
deleted file mode 100644
index e69de29..0000000


[68/70] Remove all cordova-lib files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/platforms/common.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platforms/common.spec.js b/cordova-lib/spec-plugman/platforms/common.spec.js
deleted file mode 100644
index dcf5f2a..0000000
--- a/cordova-lib/spec-plugman/platforms/common.spec.js
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- *
- *
- * Licensed 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 common = require('../../src/platforms/common')
-  , path = require('path')
-  , fs = require('fs')
-  , osenv = require('osenv')
-  , shell = require('shelljs')
-  , test_dir = path.join(osenv.tmpdir(), 'test_plugman')
-  , project_dir = path.join(test_dir, 'project')
-  , src = path.join(project_dir, 'src')
-  , dest = path.join(project_dir, 'dest')
-  , java_dir = path.join(src, 'one', 'two', 'three')
-  , java_file = path.join(java_dir, 'test.java');
-
-describe('common platform handler', function() {
-    describe('resolveSrcPath', function() {
-        it('should not throw if path exists', function(){
-            shell.mkdir('-p', test_dir);
-            var target = path.join(test_dir, 'somefile');
-            fs.writeFileSync(target, '80085', 'utf-8');
-            expect(function(){common.resolveSrcPath(test_dir, 'somefile')}).not.toThrow();
-            shell.rm('-rf', test_dir);
-        });
-    });
-
-    describe('resolveTargetPath', function() {
-        it('should throw if path exists', function(){
-            shell.mkdir('-p', test_dir);
-            expect(function(){common.resolveTargetPath(test_dir)}).toThrow();
-            shell.rm('-rf', test_dir);
-        });
-
-        it('should not throw if path cannot be resolved', function(){
-            expect(function(){common.resolveTargetPath(test_dir, 'somefile')}).not.toThrow();
-        });
-    });
-
-    describe('copyFile', function() {
-        it('should throw if source path cannot be resolved', function(){
-            expect(function(){common.copyFile(test_dir, src, project_dir, dest)}).toThrow();
-        });
-
-        it('should throw if target path exists', function(){
-            shell.mkdir('-p', dest);
-            expect(function(){common.copyFile(test_dir, src, project_dir, dest)}).toThrow();
-            shell.rm('-rf', dest);
-        });
-
-        it('should call mkdir -p on target path', function(){
-            shell.mkdir('-p', java_dir);
-            fs.writeFileSync(java_file, 'contents', 'utf-8');
-
-            var s = spyOn(shell, 'mkdir').andCallThrough();
-            var resolvedDest = common.resolveTargetPath(project_dir, dest);
-
-            common.copyFile(test_dir, java_file, project_dir, dest);
-
-            expect(s).toHaveBeenCalled();
-            expect(s).toHaveBeenCalledWith('-p', path.dirname(resolvedDest));
-            shell.rm('-rf', project_dir);
-        });
-
-        it('should call cp source/dest paths', function(){
-            shell.mkdir('-p', java_dir);
-            fs.writeFileSync(java_file, 'contents', 'utf-8');
-
-            var s = spyOn(shell, 'cp').andCallThrough();
-            var resolvedDest = common.resolveTargetPath(project_dir, dest);
-
-            common.copyFile(test_dir, java_file, project_dir, dest);
-
-            expect(s).toHaveBeenCalled();
-            expect(s).toHaveBeenCalledWith('-f', java_file, resolvedDest);
-
-            shell.rm('-rf', project_dir);
-        });
-
-    });
-
-    describe('deleteJava', function() {
-        it('should call fs.unlinkSync on the provided paths', function(){
-            shell.mkdir('-p', java_dir);
-            fs.writeFileSync(java_file, 'contents', 'utf-8');
-
-            var s = spyOn(fs, 'unlinkSync').andCallThrough();
-            common.deleteJava(project_dir, java_file);
-            expect(s).toHaveBeenCalled();
-            expect(s).toHaveBeenCalledWith(path.resolve(project_dir, java_file));
-
-            shell.rm('-rf', java_dir);
-        });
-
-        it('should delete empty directories after removing source code in a java src path hierarchy', function(){
-            shell.mkdir('-p', java_dir);
-            fs.writeFileSync(java_file, 'contents', 'utf-8');
-
-            common.deleteJava(project_dir, java_file);
-            expect(fs.existsSync(java_file)).not.toBe(true);
-            expect(fs.existsSync(java_dir)).not.toBe(true);
-            expect(fs.existsSync(path.join(src,'one'))).not.toBe(true);
-
-            shell.rm('-rf', java_dir);
-        });
-
-        it('should never delete the top-level src directory, even if all plugins added were removed', function(){
-            shell.mkdir('-p', java_dir);
-            fs.writeFileSync(java_file, 'contents', 'utf-8');
-
-            common.deleteJava(project_dir, java_file);
-            expect(fs.existsSync(src)).toBe(true);
-
-            shell.rm('-rf', java_dir);
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/platforms/ios.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platforms/ios.spec.js b/cordova-lib/spec-plugman/platforms/ios.spec.js
deleted file mode 100644
index e2589e0..0000000
--- a/cordova-lib/spec-plugman/platforms/ios.spec.js
+++ /dev/null
@@ -1,390 +0,0 @@
-var ios = require('../../src/platforms/ios'),
-    install = require('../../src/install'),
-    path = require('path'),
-    fs = require('fs'),
-    et = require('elementtree'),
-    shell = require('shelljs'),
-    os = require('osenv'),
-    common = require('../../src/platforms/common'),
-    xcode = require('xcode'),
-    plist = require('plist-with-patches'),
-    bplist = require('bplist-parser'),
-    temp = path.join(os.tmpdir(), 'plugman'),
-    plugins_dir = path.join(temp, 'cordova', 'plugins'),
-    ios_config_xml_project = path.join(__dirname, '..', 'projects', 'ios-config-xml', '*'),
-    ios_plist_project = path.join(__dirname, '..', 'projects', 'ios-plist', '*'),
-    ios_project = path.join(ios_config_xml_project, '..'),
-    xml_helpers = require('../../src/util/xml-helpers'),
-    variableplugin = path.join(__dirname, '..', 'plugins', 'VariablePlugin'),
-    faultyplugin = path.join(__dirname, '..', 'plugins', 'FaultyPlugin'),
-    plistplugin = path.join(__dirname, '..', 'plugins', 'PluginsPlistOnly'),
-    dummyplugin = path.join(__dirname, '..', 'plugins', 'DummyPlugin');
-
-var xml_path = path.join(dummyplugin, 'plugin.xml'),
-    xml_test = fs.readFileSync(xml_path, 'utf-8'),
-    plugin_et = new et.ElementTree(et.XML(xml_test));
-
-var platformTag = plugin_et.find('./platform[@name="ios"]');
-var dummy_id = plugin_et._root.attrib['id'];
-var valid_source = platformTag.findall('./source-file'),
-    valid_assets = plugin_et.findall('./asset'),
-    valid_headers = platformTag.findall('./header-file'),
-    valid_resources = platformTag.findall('./resource-file'),
-    valid_custom_frameworks = platformTag.findall('./framework[@custom="true"]'),
-    valid_frameworks = platformTag.findall('./framework'),
-    plist_els = platformTag.findall('./plugins-plist'),
-    dummy_configs = platformTag.findall('./config-file');
-
-xml_path = path.join(variableplugin, 'plugin.xml');
-xml_test = fs.readFileSync(xml_path, 'utf-8');
-plugin_et = new et.ElementTree(et.XML(xml_test));
-platformTag = plugin_et.find('./platform[@name="ios"]');
-
-var variable_id = plugin_et._root.attrib['id'];
-var variable_configs = platformTag.findall('./config-file');
-
-xml_path = path.join(faultyplugin, 'plugin.xml');
-xml_test = fs.readFileSync(xml_path, 'utf-8');
-plugin_et = new et.ElementTree(et.XML(xml_test));
-platformTag = plugin_et.find('./platform[@name="ios"]');
-
-var faulty_id = plugin_et._root.attrib['id'];
-var invalid_assets = plugin_et.findall('./asset');
-var invalid_source = platformTag.findall('./source-file');
-var invalid_headers = platformTag.findall('./header-file');
-var invalid_resources = platformTag.findall('./resource-file');
-var invalid_custom_frameworks = platformTag.findall('./framework[@custom="true"]');
-var invalid_frameworks = platformTag.findall('./framework');
-
-xml_path = path.join(plistplugin, 'plugin.xml');
-xml_test = fs.readFileSync(xml_path, 'utf-8');
-plugin_et = new et.ElementTree(et.XML(xml_test));
-platformTag = plugin_et.find('./platform[@name="ios"]');
-
-var plist_id = plugin_et._root.attrib['id'];
-var plist_only_els = platformTag.findall('./plugins-plist');
-
-shell.mkdir('-p', temp);
-shell.cp('-rf', ios_config_xml_project, temp);
-var proj_files = ios.parseProjectFile(temp);
-shell.rm('-rf', temp);
-ios.purgeProjectFileCache(temp);
-
-function copyArray(arr) {
-    return Array.prototype.slice.call(arr, 0);
-}
-
-describe('ios project handler', function() {
-    beforeEach(function() {
-        shell.mkdir('-p', temp);
-        shell.mkdir('-p', plugins_dir);
-    });
-    afterEach(function() {
-        shell.rm('-rf', temp);
-        ios.purgeProjectFileCache(temp);
-    });
-
-    describe('www_dir method', function() {
-        it('should return cordova-ios project www location using www_dir', function() {
-            expect(ios.www_dir(path.sep)).toEqual(path.sep + 'www');
-        });
-    });
-
-    describe('package_name method', function() {
-        it('should return the CFBundleIdentifier from the project\'s Info.plist file', function() {
-            expect(ios.package_name(ios_project)).toEqual('com.example.friendstring');
-        });
-    });
-
-    describe('parseProjectFile method', function () {
-        it('should throw if project is not an xcode project', function() {
-            expect(function() {
-                ios.parseProjectFile(temp);
-            }).toThrow('does not appear to be an xcode project (no xcode project file)');
-        });
-        it('should throw if project does not contain an appropriate PhoneGap/Cordova.plist file or config.xml file', function() {
-            shell.cp('-rf', ios_config_xml_project, temp);
-            shell.rm(path.join(temp, 'SampleApp', 'config.xml'));
-
-            expect(function() {
-                ios.parseProjectFile(temp);
-            }).toThrow('could not find PhoneGap/Cordova plist file, or config.xml file.');
-        });
-    });
-
-    describe('installation', function() {
-        describe('of <source-file> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', ios_config_xml_project, temp);
-            });
-
-            it('should throw if source-file src cannot be found', function() {
-                var source = copyArray(invalid_source);
-                expect(function() {
-                    ios['source-file'].install(source[1], faultyplugin, temp, faulty_id, proj_files);
-                }).toThrow('cannot find "' + path.resolve(faultyplugin, 'src/ios/FaultyPluginCommand.m') + '" ios <source-file>');
-            });
-            it('should throw if source-file target already exists', function() {
-                var source = copyArray(valid_source);
-                var target = path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'DummyPluginCommand.m');
-                shell.mkdir('-p', path.dirname(target));
-                fs.writeFileSync(target, 'some bs', 'utf-8');
-                expect(function() {
-                    ios['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
-                }).toThrow('target destination "' + target + '" already exists');
-            });
-            it('should call into xcodeproj\'s addSourceFile appropriately when element has no target-dir', function() {
-                var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] == undefined});
-                var spy = spyOn(proj_files.xcode, 'addSourceFile');
-                ios['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'DummyPluginCommand.m'), {});
-            });
-            it('should call into xcodeproj\'s addSourceFile appropriately when element has a target-dir', function() {
-                var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] != undefined});
-                var spy = spyOn(proj_files.xcode, 'addSourceFile');
-                ios['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'targetDir', 'TargetDirTest.m'), {});
-            });
-            it('should cp the file to the right target location when element has no target-dir', function() {
-                var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] == undefined});
-                var spy = spyOn(shell, 'cp');
-                ios['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join(dummyplugin, 'src', 'ios', 'DummyPluginCommand.m'), path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'DummyPluginCommand.m'));
-            });
-            it('should cp the file to the right target location when element has a target-dir', function() {
-                var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] != undefined});
-                var spy = spyOn(shell, 'cp');
-                ios['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join(dummyplugin, 'src', 'ios', 'TargetDirTest.m'), path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'targetDir', 'TargetDirTest.m'));
-            });
-            it('should call into xcodeproj\'s addFramework appropriately when element has framework=true set', function() {
-                var source = copyArray(valid_source).filter(function(s) { return s.attrib['framework'] == "true"});
-                spyOn(proj_files.xcode, 'addSourceFile');
-                var spy = spyOn(proj_files.xcode, 'addFramework');
-                ios['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join('SampleApp', 'Plugins', dummy_id, 'SourceWithFramework.m'), {weak:false});
-            });
-        });
-
-        describe('of <header-file> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', ios_config_xml_project, temp);
-            });
-
-            it('should throw if header-file src cannot be found', function() {
-                var headers = copyArray(invalid_headers);
-                expect(function() {
-                    ios['header-file'].install(headers[1], faultyplugin, temp, faulty_id, proj_files);
-                }).toThrow('cannot find "' + path.resolve(faultyplugin, 'src/ios/FaultyPluginCommand.h') + '" ios <header-file>');
-            });
-            it('should throw if header-file target already exists', function() {
-                var headers = copyArray(valid_headers);
-                var target = path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'DummyPluginCommand.h');
-                shell.mkdir('-p', path.dirname(target));
-                fs.writeFileSync(target, 'some bs', 'utf-8');
-                expect(function() {
-                    ios['header-file'].install(headers[0], dummyplugin, temp, dummy_id, proj_files);
-                }).toThrow('target destination "' + target + '" already exists');
-            });
-            it('should call into xcodeproj\'s addHeaderFile appropriately when element has no target-dir', function() {
-                var headers = copyArray(valid_headers).filter(function(s) { return s.attrib['target-dir'] == undefined});
-                var spy = spyOn(proj_files.xcode, 'addHeaderFile');
-                ios['header-file'].install(headers[0], dummyplugin, temp, dummy_id,  proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'DummyPluginCommand.h'));
-            });
-            it('should call into xcodeproj\'s addHeaderFile appropriately when element a target-dir', function() {
-                var headers = copyArray(valid_headers).filter(function(s) { return s.attrib['target-dir'] != undefined});
-                var spy = spyOn(proj_files.xcode, 'addHeaderFile');
-                ios['header-file'].install(headers[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'targetDir', 'TargetDirTest.h'));
-            });
-            it('should cp the file to the right target location when element has no target-dir', function() {
-                var headers = copyArray(valid_headers).filter(function(s) { return s.attrib['target-dir'] == undefined});
-                var spy = spyOn(shell, 'cp');
-                ios['header-file'].install(headers[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join(dummyplugin, 'src', 'ios', 'DummyPluginCommand.h'), path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'DummyPluginCommand.h'));
-            });
-            it('should cp the file to the right target location when element has a target-dir', function() {
-                var headers = copyArray(valid_headers).filter(function(s) { return s.attrib['target-dir'] != undefined});
-                var spy = spyOn(shell, 'cp');
-                ios['header-file'].install(headers[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join(dummyplugin, 'src', 'ios', 'TargetDirTest.h'), path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'targetDir', 'TargetDirTest.h'));
-            });
-        });
-
-        describe('of <resource-file> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', ios_config_xml_project, temp);
-            });
-            it('should throw if resource-file src cannot be found', function() {
-                var resources = copyArray(invalid_resources);
-                expect(function() {
-                    ios['resource-file'].install(resources[0], faultyplugin, temp, "pluginid", proj_files);
-                }).toThrow('cannot find "' + path.resolve(faultyplugin, 'src/ios/IDontExist.bundle') + '" ios <resource-file>');
-            });
-            it('should throw if resource-file target already exists', function() {
-                var resources = copyArray(valid_resources);
-                var target = path.join(temp, 'SampleApp', 'Resources', 'DummyPlugin.bundle');
-                shell.mkdir('-p', path.dirname(target));
-                fs.writeFileSync(target, 'some bs', 'utf-8');
-                expect(function() {
-                    ios['resource-file'].install(resources[0], dummyplugin, temp, "pluginid",proj_files);
-                }).toThrow('target destination "' + target + '" already exists');
-            });
-            it('should call into xcodeproj\'s addResourceFile', function() {
-                var resources = copyArray(valid_resources);
-                var spy = spyOn(proj_files.xcode, 'addResourceFile');
-                ios['resource-file'].install(resources[0], dummyplugin, temp, "pluginid", proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join('Resources', 'DummyPlugin.bundle'));
-            });
-            it('should cp the file to the right target location', function() {
-                var resources = copyArray(valid_resources);
-                var spy = spyOn(shell, 'cp');
-                ios['resource-file'].install(resources[0], dummyplugin, temp, "pluginid", proj_files);
-                expect(spy).toHaveBeenCalledWith('-R', path.join(dummyplugin, 'src', 'ios', 'DummyPlugin.bundle'), path.join(temp, 'SampleApp', 'Resources'));
-            });
-        });
-        describe('of <framework custom="true"> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', ios_config_xml_project, temp);
-            });
-            it('should throw if framework src cannot be found', function() {
-                var frameworks = copyArray(invalid_custom_frameworks);
-                expect(function() {
-                    ios['framework'].install(frameworks[0], faultyplugin, temp, dummy_id, proj_files);
-                }).toThrow('cannot find "' + path.resolve(faultyplugin, 'src/ios/NonExistantCustomFramework.framework') + '" ios <framework>');
-            });
-            it('should throw if framework target already exists', function() {
-                var frameworks = copyArray(valid_custom_frameworks);
-                var target = path.join(temp, 'SampleApp/Plugins/com.phonegap.plugins.dummyplugin/Custom.framework');
-                shell.mkdir('-p', target);
-                expect(function() {
-                    ios['framework'].install(frameworks[0], dummyplugin, temp, dummy_id, proj_files);
-                }).toThrow('target destination "' + target + '" already exists');
-            });
-            it('should call into xcodeproj\'s addFramework', function() {
-                var frameworks = copyArray(valid_custom_frameworks);
-                var spy = spyOn(proj_files.xcode, 'addFramework');
-                ios['framework'].install(frameworks[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.normalize('SampleApp/Plugins/com.phonegap.plugins.dummyplugin/Custom.framework'), {customFramework:true});
-            });
-            it('should cp the file to the right target location', function() {
-                var frameworks = copyArray(valid_custom_frameworks);
-                var spy = spyOn(shell, 'cp');
-                ios['framework'].install(frameworks[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith('-R', path.join(dummyplugin, 'src', 'ios', 'Custom.framework'),
-                                                 path.join(temp, 'SampleApp/Plugins/com.phonegap.plugins.dummyplugin'));
-            });
-        });
-    });
-
-    describe('uninstallation', function() {
-        describe('of <source-file> elements', function() {
-            it('should call into xcodeproj\'s removeSourceFile appropriately when element has no target-dir', function(){
-                var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] == undefined});
-                shell.cp('-rf', ios_config_xml_project, temp);
-                var spy = spyOn(proj_files.xcode, 'removeSourceFile');
-                ios['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'DummyPluginCommand.m'));
-            });
-            it('should call into xcodeproj\'s removeSourceFile appropriately when element a target-dir', function(){
-                var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] != undefined});
-                shell.cp('-rf', ios_config_xml_project, temp);
-                var spy = spyOn(proj_files.xcode, 'removeSourceFile');
-                ios['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'targetDir', 'TargetDirTest.m'));
-            });
-            it('should rm the file from the right target location when element has no target-dir', function(){
-                var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] == undefined});
-                shell.cp('-rf', ios_config_xml_project, temp);
-
-                var spy = spyOn(shell, 'rm');
-                ios['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith('-rf', path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'DummyPluginCommand.m'));
-            });
-            it('should rm the file from the right target location when element has a target-dir', function(){
-                var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] != undefined});
-                shell.cp('-rf', ios_config_xml_project, temp);
-                var spy = spyOn(shell, 'rm');
-
-                ios['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith('-rf', path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'targetDir', 'TargetDirTest.m'));
-            });
-            it('should call into xcodeproj\'s removeFramework appropriately when element framework=true set', function(){
-                var source = copyArray(valid_source).filter(function(s) { return s.attrib['framework'] == "true"});
-                shell.cp('-rf', ios_config_xml_project, temp);
-                var spy = spyOn(proj_files.xcode, 'removeFramework');
-
-                ios['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join('SampleApp', 'Plugins', dummy_id, 'SourceWithFramework.m'));
-            });
-        });
-
-        describe('of <header-file> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', ios_config_xml_project, temp);
-            });
-            it('should call into xcodeproj\'s removeHeaderFile appropriately when element has no target-dir', function(){
-                var headers = copyArray(valid_headers).filter(function(s) { return s.attrib['target-dir'] == undefined});
-                var spy = spyOn(proj_files.xcode, 'removeHeaderFile');
-
-                ios['header-file'].uninstall(headers[0], temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'DummyPluginCommand.h'));
-            });
-            it('should call into xcodeproj\'s removeHeaderFile appropriately when element a target-dir', function(){
-                var headers = copyArray(valid_headers).filter(function(s) { return s.attrib['target-dir'] != undefined});
-
-                var spy = spyOn(proj_files.xcode, 'removeHeaderFile');
-
-                ios['header-file'].uninstall(headers[0], temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'targetDir', 'TargetDirTest.h'));
-            });
-            it('should rm the file from the right target location', function(){
-                var headers = copyArray(valid_headers).filter(function(s) { return s.attrib['target-dir'] != undefined});
-                var spy = spyOn(shell, 'rm');
-
-                ios['header-file'].uninstall(headers[0], temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith('-rf', path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'targetDir', 'TargetDirTest.h'));
-            });
-        });
-
-        describe('of <resource-file> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', ios_config_xml_project, temp);
-            });
-            it('should call into xcodeproj\'s removeResourceFile', function(){
-                var resources = copyArray(valid_resources);
-                var spy = spyOn(proj_files.xcode, 'removeResourceFile');
-
-                ios['resource-file'].uninstall(resources[0], temp, "pluginid", proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join('Resources', 'DummyPlugin.bundle'));
-            });
-            it('should rm the file from the right target location', function(){
-                var resources = copyArray(valid_resources);
-                var spy = spyOn(shell, 'rm');
-
-                ios['resource-file'].uninstall(resources[0], temp, "pluginid", proj_files);
-                expect(spy).toHaveBeenCalledWith('-rf', path.join(temp, 'SampleApp', 'Resources', 'DummyPlugin.bundle'));
-            });
-        });
-        describe('of <framework custom="true"> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', ios_config_xml_project, temp);
-            });
-            it('should call into xcodeproj\'s removeFramework', function(){
-                var frameworks = copyArray(valid_custom_frameworks);
-                var spy = spyOn(proj_files.xcode, 'removeFramework');
-
-                ios['framework'].uninstall(frameworks[0], temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join(temp, 'SampleApp/Plugins/com.phonegap.plugins.dummyplugin/Custom.framework'), {customFramework:true});
-            });
-            it('should rm the file from the right target location', function(){
-                var frameworks = copyArray(valid_custom_frameworks);
-                var spy = spyOn(shell, 'rm');
-
-                ios['framework'].uninstall(frameworks[0], temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith('-rf', path.join(temp, 'SampleApp/Plugins/com.phonegap.plugins.dummyplugin/Custom.framework'));
-            });
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/platforms/tizen.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platforms/tizen.spec.js b/cordova-lib/spec-plugman/platforms/tizen.spec.js
deleted file mode 100644
index 372e4d3..0000000
--- a/cordova-lib/spec-plugman/platforms/tizen.spec.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *
- *
- * Licensed 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 tizen = require('../../src/platforms/tizen'),
-	common = require('../../src/platforms/common'),
-	temp = require('temp'),
-	os = require('osenv'),
-	fs = require('fs'),
-	et = require('elementtree'),
-	path = require('path'),
-	tizen_project = path.join(__dirname, '..', 'projects', 'tizen'),
-	destination = temp.path(),
-	shell = require('shelljs'),
-	dummyPluginPath = path.join(__dirname, '..', 'plugins', 'DummyPlugin'),
-	dummyPlugin = et.XML(fs.readFileSync(
-		path.join(dummyPluginPath, 'plugin.xml'), {encoding: "utf-8"})),
-	dummySources = dummyPlugin
-		.find('./platform[@name="tizen"]')
-		.findall('./source-file');
-
-describe('Tizen project handler', function() {
-	describe('www_dir method', function() {
-		it('should append www to the directory passed in', function() {
-			expect(tizen.www_dir(path.sep)).toEqual(path.join(path.sep, 'www'));
-		});
-	});
-	describe('Manipulating project files', function() {
-		beforeEach(function() {
-			shell.cp('-rf', path.join(tizen_project, '*'), destination);
-		});
-		afterEach(function() {
-			shell.rm('-rf', destination);
-		});
-		describe('package_name method', function() {
-			it('should return the id of the config.xml root element', function() {
-				expect(tizen.package_name(destination)).toEqual("TizenTestPackage");
-			});
-		});
-	});
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/platforms/windows8.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platforms/windows8.spec.js b/cordova-lib/spec-plugman/platforms/windows8.spec.js
deleted file mode 100644
index 99a5cb7..0000000
--- a/cordova-lib/spec-plugman/platforms/windows8.spec.js
+++ /dev/null
@@ -1,135 +0,0 @@
-var windows8 = require('../../src/platforms/windows8'),
-    common  = require('../../src/platforms/common'),
-    install = require('../../src/install'),
-    path    = require('path'),
-    fs      = require('fs'),
-    shell   = require('shelljs'),
-    et      = require('elementtree'),
-    os      = require('osenv'),
-    temp    = path.join(os.tmpdir(), 'plugman'),
-    plugins_dir = path.join(temp, 'cordova', 'plugins'),
-    xml_helpers = require('../../src/util/xml-helpers'),
-    plugins_module = require('../../src/util/plugins'),
-    dummyplugin = path.join(__dirname, '..', 'plugins', 'DummyPlugin'),
-    faultyplugin = path.join(__dirname, '..', 'plugins', 'FaultyPlugin'),
-    windows8_project = path.join(__dirname, '..', 'projects', 'windows8');
-
-var xml_path     = path.join(dummyplugin, 'plugin.xml')
-  , xml_text     = fs.readFileSync(xml_path, 'utf-8')
-  , plugin_et    = new et.ElementTree(et.XML(xml_text));
-
-var platformTag = plugin_et.find('./platform[@name="windows8"]');
-var dummy_id = plugin_et._root.attrib['id'];
-
-var valid_source = platformTag.findall('./source-file');
-var assets = plugin_et.findall('./asset');
-
-var configChanges = platformTag.findall('./config-file');
-
-xml_path  = path.join(faultyplugin, 'plugin.xml')
-xml_text  = fs.readFileSync(xml_path, 'utf-8');
-
-plugin_et = new et.ElementTree(et.XML(xml_text));
-
-platformTag = plugin_et.find('./platform[@name="windows8"]');
-
-var invalid_source = platformTag.findall('./source-file');
-
-var faulty_id = plugin_et._root.attrib['id'];
-
-shell.mkdir('-p', temp);
-shell.cp('-rf', path.join(windows8_project, '*'), temp);
-var proj_files = windows8.parseProjectFile(temp);
-shell.rm('-rf', temp);
-
-function copyArray(arr) {
-    return Array.prototype.slice.call(arr, 0);
-}
-
-describe('windows8 project handler', function() {
-
-    beforeEach(function() {
-        shell.mkdir('-p', temp);
-        shell.mkdir('-p', plugins_dir);
-    });
-    afterEach(function() {
-        shell.rm('-rf', temp);
-    });
-
-    describe('www_dir method', function() {
-        it('should return cordova-windows8 project www location using www_dir', function() {
-            expect(windows8.www_dir(path.sep)).toEqual(path.sep + 'www');
-        });
-    });
-    describe('package_name method', function() {
-        it('should return a windows8 project\'s proper package name', function() {
-            expect(windows8.package_name(windows8_project)).toEqual("CordovaApp");
-        });
-    });
-
-    describe('parseProjectFile method', function() {
-        it('should throw if project is not an windows8 project', function() {
-            expect(function() {
-                windows8.parseProjectFile(temp);
-            }).toThrow(windows8.InvalidProjectPathError);
-        });
-    });
-
-    describe('installation', function() {
-        beforeEach(function() {
-            shell.mkdir('-p', temp);
-        });
-        afterEach(function() {
-            shell.rm('-rf', temp);
-        });
-        describe('of <source-file> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', path.join(windows8_project, '*'), temp);
-            });
-            it('should copy stuff from one location to another by calling common.copyFile', function() {
-                var source = copyArray(valid_source);
-                var s = spyOn(common, 'copyFile');
-                windows8['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/windows8/dummer.js', temp, path.join('www', 'plugins', 'com.phonegap.plugins.dummyplugin', 'dummer.js'));
-            });
-            it('should throw if source-file src cannot be found', function() {
-                var source = copyArray(invalid_source);
-                expect(function() {
-                    windows8['source-file'].install(source[1], faultyplugin, temp, faulty_id, proj_files);
-                }).toThrow('"' + path.resolve(faultyplugin, 'src/windows8/NotHere.js') + '" not found!');
-            });
-            it('should throw if source-file target already exists', function() {
-                var source = copyArray(valid_source);
-                var target = path.join(temp, 'www', 'plugins', dummy_id, 'dummer.js');
-                shell.mkdir('-p', path.dirname(target));
-                fs.writeFileSync(target, 'some bs', 'utf-8');
-                expect(function() {
-                    windows8['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
-                }).toThrow('"' + target + '" already exists!');
-            });
-        });
-    });
-
-    describe('uninstallation', function() {
-        beforeEach(function() {
-            shell.mkdir('-p', temp);
-            shell.mkdir('-p', plugins_dir);
-            shell.cp('-rf', path.join(windows8_project, '*'), temp);
-        });
-        afterEach(function() {
-            shell.rm('-rf', temp);
-        });
-        describe('of <source-file> elements', function() {
-            it('should remove stuff by calling common.removeFile', function(done) {
-                var s = spyOn(common, 'removeFile');
-                install('windows8', temp, dummyplugin, plugins_dir, {})
-                .then(function() {
-                    var source = copyArray(valid_source);
-                    windows8['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
-                    expect(s).toHaveBeenCalledWith(temp, path.join('www', 'plugins',  'com.phonegap.plugins.dummyplugin', 'dummer.js'));
-                    done();
-                });
-            });
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/platforms/wp7.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platforms/wp7.spec.js b/cordova-lib/spec-plugman/platforms/wp7.spec.js
deleted file mode 100644
index 262e851..0000000
--- a/cordova-lib/spec-plugman/platforms/wp7.spec.js
+++ /dev/null
@@ -1,129 +0,0 @@
-var wp7 = require('../../src/platforms/wp7'),
-    common  = require('../../src/platforms/common'),
-    install = require('../../src/install'),
-    path    = require('path'),
-    fs      = require('fs'),
-    shell   = require('shelljs'),
-    et      = require('elementtree'),
-    os      = require('osenv'),
-    temp    = path.join(os.tmpdir(), 'plugman'),
-    plugins_dir = path.join(temp, 'cordova', 'plugins'),
-    xml_helpers = require('../../src/util/xml-helpers'),
-    plugins_module = require('../../src/util/plugins'),
-    dummyplugin = path.join(__dirname, '..', 'plugins', 'DummyPlugin'),
-    faultyplugin = path.join(__dirname, '..', 'plugins', 'FaultyPlugin'),
-    wp7_project = path.join(__dirname, '..', 'projects', 'wp7');
-
-var xml_path     = path.join(dummyplugin, 'plugin.xml')
-  , xml_text     = fs.readFileSync(xml_path, 'utf-8')
-  , plugin_et    = new et.ElementTree(et.XML(xml_text));
-
-var platformTag = plugin_et.find('./platform[@name="wp7"]');
-var dummy_id = plugin_et._root.attrib['id'];
-var valid_source = platformTag.findall('./source-file'),
-    assets = plugin_et.findall('./asset'),
-    configChanges = platformTag.findall('./config-file');
-xml_path  = path.join(faultyplugin, 'plugin.xml')
-xml_text  = fs.readFileSync(xml_path, 'utf-8')
-plugin_et = new et.ElementTree(et.XML(xml_text));
-
-platformTag = plugin_et.find('./platform[@name="wp7"]');
-var invalid_source = platformTag.findall('./source-file');
-var faulty_id = plugin_et._root.attrib['id'];
-
-shell.mkdir('-p', temp);
-shell.cp('-rf', path.join(wp7_project, '*'), temp);
-var proj_files = wp7.parseProjectFile(temp);
-shell.rm('-rf', temp);
-
-function copyArray(arr) {
-    return Array.prototype.slice.call(arr, 0);
-}
-
-describe('wp7 project handler', function() {
-
-    beforeEach(function() {
-        shell.mkdir('-p', temp);
-        shell.mkdir('-p', plugins_dir);
-    });
-    afterEach(function() {
-        shell.rm('-rf', temp);
-    });
-
-    describe('www_dir method', function() {
-        it('should return cordova-wp7 project www location using www_dir', function() {
-            expect(wp7.www_dir(path.sep)).toEqual(path.sep + 'www');
-        });
-    });
-    describe('package_name method', function() {
-        it('should return a wp7 project\'s proper package name', function() {
-            expect(wp7.package_name(wp7_project)).toEqual("{5FC10D78-8779-4EDB-9B61-1D04F0A755D4}");
-        });
-    });
-
-    describe('parseProjectFile method', function() {
-        it('should throw if project is not an wp7 project', function() {
-            expect(function() {
-                wp7.parseProjectFile(temp);
-            }).toThrow('does not appear to be a Windows Phone project (no .csproj file)');
-        });
-    });
-
-    describe('installation', function() {
-        beforeEach(function() {
-            shell.mkdir('-p', temp);
-        });
-        afterEach(function() {
-            shell.rm('-rf', temp);
-        });
-        describe('of <source-file> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', path.join(wp7_project, '*'), temp);
-            });
-            it('should copy stuff from one location to another by calling common.copyFile', function() {
-                var source = copyArray(valid_source);
-                var s = spyOn(common, 'copyFile');
-                wp7['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/wp7/DummyPlugin.cs', temp, path.join('Plugins', 'com.phonegap.plugins.dummyplugin', 'DummyPlugin.cs'));
-            });
-            it('should throw if source-file src cannot be found', function() {
-                var source = copyArray(invalid_source);
-                expect(function() {
-                    wp7['source-file'].install(source[1], faultyplugin, temp, faulty_id, proj_files);
-                }).toThrow('"' + path.resolve(faultyplugin, 'src/wp7/NotHere.cs') + '" not found!');
-            });
-            it('should throw if source-file target already exists', function() {
-                var source = copyArray(valid_source);
-                var target = path.join(temp, 'Plugins', dummy_id, 'DummyPlugin.cs');
-                shell.mkdir('-p', path.dirname(target));
-                fs.writeFileSync(target, 'some bs', 'utf-8');
-                expect(function() {
-                    wp7['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
-                }).toThrow('"' + target + '" already exists!');
-            });
-        });
-    });
-
-    describe('uninstallation', function() {
-        beforeEach(function() {
-            shell.mkdir('-p', temp);
-            shell.mkdir('-p', plugins_dir);
-            shell.cp('-rf', path.join(wp7_project, '*'), temp);
-        });
-        afterEach(function() {
-            shell.rm('-rf', temp);
-        });
-        describe('of <source-file> elements', function() {
-            it('should remove stuff by calling common.removeFile', function(done) {
-                var s = spyOn(common, 'removeFile');
-                install('wp7', temp, dummyplugin, plugins_dir, {})
-                .then(function() {
-                    var source = copyArray(valid_source);
-                    wp7['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
-                    expect(s).toHaveBeenCalledWith(temp, path.join('Plugins', 'com.phonegap.plugins.dummyplugin', 'DummyPlugin.cs'));
-                    done();
-                });
-            });
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/platforms/wp8.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platforms/wp8.spec.js b/cordova-lib/spec-plugman/platforms/wp8.spec.js
deleted file mode 100644
index ba9cdb4..0000000
--- a/cordova-lib/spec-plugman/platforms/wp8.spec.js
+++ /dev/null
@@ -1,150 +0,0 @@
-var wp8 = require('../../src/platforms/wp8'),
-    common  = require('../../src/platforms/common'),
-    install = require('../../src/install'),
-    path    = require('path'),
-    fs      = require('fs'),
-    shell   = require('shelljs'),
-    et      = require('elementtree'),
-    os      = require('osenv'),
-    temp    = path.join(os.tmpdir(), 'plugman'),
-    plugins_dir = path.join(temp, 'cordova', 'plugins'),
-    xml_helpers = require('../../src/util/xml-helpers'),
-    plugins_module = require('../../src/util/plugins'),
-    dummyplugin = path.join(__dirname, '..', 'plugins', 'DummyPlugin'),
-    faultyplugin = path.join(__dirname, '..', 'plugins', 'FaultyPlugin'),
-    wp8_project = path.join(__dirname, '..', 'projects', 'wp8');
-
-var xml_path     = path.join(dummyplugin, 'plugin.xml')
-  , xml_text     = fs.readFileSync(xml_path, 'utf-8')
-  , plugin_et    = new et.ElementTree(et.XML(xml_text));
-
-var platformTag = plugin_et.find('./platform[@name="wp8"]');
-var dummy_id = plugin_et._root.attrib['id'];
-var valid_source = platformTag.findall('./source-file'),
-    assets = plugin_et.findall('./asset'),
-    configChanges = platformTag.findall('./config-file');
-xml_path  = path.join(faultyplugin, 'plugin.xml')
-xml_text  = fs.readFileSync(xml_path, 'utf-8')
-plugin_et = new et.ElementTree(et.XML(xml_text));
-
-platformTag = plugin_et.find('./platform[@name="wp8"]');
-var invalid_source = platformTag.findall('./source-file');
-var faulty_id = plugin_et._root.attrib['id'];
-
-shell.mkdir('-p', temp);
-shell.cp('-rf', path.join(wp8_project, '*'), temp);
-var proj_files = wp8.parseProjectFile(temp);
-shell.rm('-rf', temp);
-
-function copyArray(arr) {
-    return Array.prototype.slice.call(arr, 0);
-}
-
-describe('wp8 project handler', function() {
-
-    beforeEach(function() {
-        shell.mkdir('-p', temp);
-        shell.mkdir('-p', plugins_dir);
-    });
-    afterEach(function() {
-        shell.rm('-rf', temp);
-    });
-
-    describe('www_dir method', function() {
-        it('should return cordova-wp8 project www location using www_dir', function() {
-            expect(wp8.www_dir(path.sep)).toEqual(path.sep + 'www');
-        });
-    });
-    describe('package_name method', function() {
-        it('should return a wp8 project\'s proper package name', function() {
-            expect(wp8.package_name(wp8_project)).toEqual("{F3A8197B-6B16-456D-B5F4-DD4F04AC0BEC}");
-        });
-    });
-
-    describe('parseProjectFile method', function() {
-        it('should throw if project is not an wp8 project', function() {
-            expect(function() {
-                wp8.parseProjectFile(temp);
-            }).toThrow('does not appear to be a Windows Phone project (no .csproj file)');
-        });
-    });
-
-    describe('installation', function() {
-        var done;
-        function installPromise(f) {
-            done = false;
-            f.then(function() { done = true; }, function(err) { done = err; });
-        }
-        beforeEach(function() {
-            shell.mkdir('-p', temp);
-        });
-        afterEach(function() {
-            shell.rm('-rf', temp);
-        });
-        describe('of <source-file> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', path.join(wp8_project, '*'), temp);
-            });
-            it('should copy stuff from one location to another by calling common.copyFile', function() {
-                var source = copyArray(valid_source);
-                var s = spyOn(common, 'copyFile');
-                wp8['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/wp8/DummyPlugin.cs', temp, path.join('Plugins', 'com.phonegap.plugins.dummyplugin', 'DummyPlugin.cs'));
-            });
-            it('should throw if source-file src cannot be found', function() {
-                var source = copyArray(invalid_source);
-                expect(function() {
-                    wp8['source-file'].install(source[1], faultyplugin, temp, faulty_id, proj_files);
-                }).toThrow('"' + path.resolve(faultyplugin, 'src/wp8/NotHere.cs') + '" not found!');
-            });
-            it('should throw if source-file target already exists', function() {
-                var source = copyArray(valid_source);
-                var target = path.join(temp, 'Plugins', dummy_id, 'DummyPlugin.cs');
-                shell.mkdir('-p', path.dirname(target));
-                fs.writeFileSync(target, 'some bs', 'utf-8');
-                expect(function() {
-                    wp8['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
-                }).toThrow('"' + target + '" already exists!');
-            });
-        });
-        describe('of <config-changes> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', path.join(wp8_project, '*'), temp);
-            });
-            it('should process and pass the after parameter to graftXML', function () {
-                var graftXML = spyOn(xml_helpers, 'graftXML').andCallThrough();
-
-                runs(function () { installPromise(install('wp8', temp, dummyplugin, plugins_dir, {})); });
-                waitsFor(function () { return done; }, 'install promise never resolved', 500);
-                runs(function () {
-                    expect(graftXML).toHaveBeenCalledWith(jasmine.any(Object), jasmine.any(Array), "/Deployment/App", "Tokens");
-                    expect(graftXML).toHaveBeenCalledWith(jasmine.any(Object), jasmine.any(Array), "/Deployment/App/Extensions", "Extension");
-                    expect(graftXML).toHaveBeenCalledWith(jasmine.any(Object), jasmine.any(Array), "/Deployment/App/Extensions", "FileTypeAssociation;Extension");
-                });
-            });
-        });
-    });
-
-    describe('uninstallation', function() {
-        beforeEach(function() {
-            shell.mkdir('-p', temp);
-            shell.mkdir('-p', plugins_dir);
-            shell.cp('-rf', path.join(wp8_project, '*'), temp);
-        });
-        afterEach(function() {
-            shell.rm('-rf', temp);
-        });
-        describe('of <source-file> elements', function() {
-            it('should remove stuff by calling common.removeFile', function(done) {
-                var s = spyOn(common, 'removeFile');
-                install('wp8', temp, dummyplugin, plugins_dir, {})
-                .then(function() {
-                    var source = copyArray(valid_source);
-                    wp8['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
-                    expect(s).toHaveBeenCalledWith(temp, path.join('Plugins', 'com.phonegap.plugins.dummyplugin', 'DummyPlugin.cs'));
-                    done();
-                });
-            });
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/.gitkeep b/cordova-lib/spec-plugman/plugins/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/AndroidJS/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/AndroidJS/plugin.xml b/cordova-lib/spec-plugman/plugins/AndroidJS/plugin.xml
deleted file mode 100644
index 1a68749..0000000
--- a/cordova-lib/spec-plugman/plugins/AndroidJS/plugin.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="com.phonegap.androidonly"
-    version="3.0.0">
-
-    <name>JavaScript in yo droidz</name>
-
-    <!-- android -->
-    <platform name="android">
-        <js-module src="www/android.js" name="Android">
-            <clobbers target="android" />
-        </js-module>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/AndroidJS/www/android.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/AndroidJS/www/android.js b/cordova-lib/spec-plugman/plugins/AndroidJS/www/android.js
deleted file mode 100644
index d268b7d..0000000
--- a/cordova-lib/spec-plugman/plugins/AndroidJS/www/android.js
+++ /dev/null
@@ -1 +0,0 @@
-{};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/ChildBrowser/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/plugin.xml b/cordova-lib/spec-plugman/plugins/ChildBrowser/plugin.xml
deleted file mode 100644
index 2dfd692..0000000
--- a/cordova-lib/spec-plugman/plugins/ChildBrowser/plugin.xml
+++ /dev/null
@@ -1,143 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="com.phonegap.plugins.childbrowser"
-    version="0.6.0">
-
-    <name>Child Browser</name>
-
-    <asset src="www/childbrowser" target="childbrowser" />
-    <asset src="www/childbrowser_file.html" target="childbrowser_file.html" />
-
-    <js-module src="www/childbrowser.js" name="ChildBrowser">
-        <clobbers target="childbrowser" />
-    </js-module>
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-        <access origin="s3.amazonaws.com" />
-    </config-file>
-    
-    <info>No matter what platform you are installing to, this notice is very important.</info>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="AndroidManifest.xml" parent="/manifest/application">
-            <activity android:name="com.phonegap.plugins.childBrowser.ChildBrowser"
-                      android:label="@string/app_name">
-                <intent-filter>
-                </intent-filter>
-            </activity>
-        </config-file>
-
-        <!-- CDV < 2.0 -->
-        <config-file target="res/xml/plugins.xml" parent="/plugins">
-            <plugin name="ChildBrowser"
-                value="com.phonegap.plugins.childBrowser.ChildBrowser"/>
-        </config-file>
-
-        <!-- CDV 2.0+ (for now) -->
-        <config-file target="res/xml/config.xml" parent="/cordova/plugins">
-            <plugin name="ChildBrowser"
-                value="com.phonegap.plugins.childBrowser.ChildBrowser"/>
-        </config-file>
-
-        <source-file src="src/android/ChildBrowser.java"
-                target-dir="src/com/phonegap/plugins/childBrowser" />
-        <info>Please make sure you read this because it is very important to complete the installation of your plugin.</info>
-    </platform>
-
-    <!-- ios -->
-    <platform name="ios">
-        <plugins-plist key="com.phonegap.plugins.childbrowser"
-            string="ChildBrowserCommand" />
-
-        <config-file target="config.xml" parent="/widget/plugins">
-            <plugin name="ChildBrowser"
-                value="ChildBrowserCommand" />
-        </config-file>
-
-        <resource-file src="src/ios/ChildBrowser.bundle" />
-        <resource-file src="src/ios/ChildBrowserViewController.xib" />
-
-        <config-file target="*-Info.plist" parent="AppId">
-            <string>$APP_ID</string>
-        </config-file>
-        
-        <config-file target="*-Info.plist" parent="CFBundleURLTypes">
-            <array>
-              <dict>
-                <key>PackageName</key>
-                <string>$PACKAGE_NAME</string>
-              </dict>
-            </array>
-        </config-file>
-
-        <header-file src="src/ios/ChildBrowserCommand.h" />
-        <header-file src="src/ios/ChildBrowserViewController.h" />
-        <header-file src="src/ios/TargetDirTest.h" target-dir="targetDir"/>
-
-        <source-file src="src/ios/ChildBrowserCommand.m" />
-        <source-file src="src/ios/ChildBrowserViewController.m" />
-        <source-file src="src/ios/preserveDirs/PreserveDirsTest.m" preserve-dirs="true" />
-        <header-file src="src/ios/TargetDirTest.m" target-dir="targetDir"/>
-
-        <!-- framework for testing (not actual dependency of ChildBrowser -->
-        <framework src="libsqlite3.dylib" />
-        <framework src="social.framework" weak="true" />
-        <framework src="music.framework" weak="rabbit" />
-        <framework src="Custom.framework" custom="true" />
-    </platform>
-    <!-- wp7 -->
-    <platform name="wp7">
-        <resource-file src="src\wp7\Images\appbar.back.rest.png" />
-        <config-file target="config.xml" parent="/widget/plugins">
-            <plugin name="ChildBrowser"
-                value="ChildBrowser"/>
-        </config-file>
-
-        <source-file src="src\wp7\ChildBrowserCommand.cs"
-                     target-dir="Plugins\" />
-
-        <!-- modify the project file to include the added files -->
-        <config-file target=".csproj" parent=".">  
-        </config-file> 
-
-    </platform>
-
-    <!-- wp8 -->
-    <platform name="wp8">
-        <resource-file src="src\wp7\Images\appbar.back.rest.png" />
-        <config-file target="config.xml" parent="/widget/plugins">
-            <plugin name="ChildBrowser"
-                value="ChildBrowser"/>
-        </config-file>
-
-        <source-file src="src\wp7\ChildBrowserCommand.cs"
-                     target-dir="Plugins\" />
-
-        <!-- modify the project file to include the added files -->
-        <config-file target=".csproj" parent=".">  
-        </config-file> 
-
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/ChildBrowser/src/android/ChildBrowser.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/android/ChildBrowser.java b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/android/ChildBrowser.java
deleted file mode 100644
index 5263b0c..0000000
--- a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/android/ChildBrowser.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_left.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_left.png b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_left.png
deleted file mode 100644
index 530e12b..0000000
Binary files a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_left.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_left@2x.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_left@2x.png b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_left@2x.png
deleted file mode 100644
index 530e12b..0000000
Binary files a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_left@2x.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_right.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_right.png b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_right.png
deleted file mode 100644
index 8b3d855..0000000
Binary files a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_right.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_right@2x.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_right@2x.png b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_right@2x.png
deleted file mode 100644
index 8b3d855..0000000
Binary files a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_right@2x.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/but_refresh.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/but_refresh.png b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/but_refresh.png
deleted file mode 100644
index 309b6bd..0000000
Binary files a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/but_refresh.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/but_refresh@2x.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/but_refresh@2x.png b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/but_refresh@2x.png
deleted file mode 100644
index 309b6bd..0000000
Binary files a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/but_refresh@2x.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/compass.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/compass.png b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/compass.png
deleted file mode 100644
index 46a8901..0000000
Binary files a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/compass.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/compass@2x.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/compass@2x.png b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/compass@2x.png
deleted file mode 100644
index 46a8901..0000000
Binary files a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/compass@2x.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserCommand.h b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserCommand.h
deleted file mode 100644
index 6a23ab6..0000000
--- a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserCommand.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-
-//
-//  PhoneGap ! ChildBrowserCommand
-//
-//
-//  Created by Jesse MacFadyen on 10-05-29.
-//  Copyright 2010 Nitobi. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#ifdef PHONEGAP_FRAMEWORK
-	#import <PhoneGap/PGPlugin.h>
-#else
-	#import "PGPlugin.h"
-#endif
-#import "ChildBrowserViewController.h"
-
-
-
-@interface ChildBrowserCommand : PGPlugin <ChildBrowserDelegate>  {
-
-	ChildBrowserViewController* childBrowser;
-}
-
-@property (nonatomic, retain) ChildBrowserViewController *childBrowser;
-
-
-- (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
--(void) onChildLocationChange:(NSString*)newLoc;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserCommand.m b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserCommand.m
deleted file mode 100644
index 38aaf64..0000000
--- a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserCommand.m
+++ /dev/null
@@ -1,86 +0,0 @@
-//
-
-// 
-//
-//  Created by Jesse MacFadyen on 10-05-29.
-//  Copyright 2010 Nitobi. All rights reserved.
-//  Copyright (c) 2011, IBM Corporation
-//  Copyright 2011, Randy McMillan
-//
-
-#import "ChildBrowserCommand.h"
-
-#ifdef PHONEGAP_FRAMEWORK
-	#import <PhoneGap/PhoneGapViewController.h>
-#else
-	#import "PhoneGapViewController.h"
-#endif
-
-
-@implementation ChildBrowserCommand
-
-@synthesize childBrowser;
-
-- (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options // args: url
-{	
-	
-    if(childBrowser == NULL)
-	{
-		childBrowser = [[ ChildBrowserViewController alloc ] initWithScale:FALSE ];
-		childBrowser.delegate = self;
-	}
-	
-/* // TODO: Work in progress
-	NSString* strOrientations = [ options objectForKey:@"supportedOrientations"];
-	NSArray* supportedOrientations = [strOrientations componentsSeparatedByString:@","];
-*/
-    PhoneGapViewController* cont = (PhoneGapViewController*)[ super appViewController ];
-    childBrowser.supportedOrientations = cont.supportedOrientations;
-    
-    if ([cont respondsToSelector:@selector(presentViewController)]) {
-        //Reference UIViewController.h Line:179 for update to iOS 5 difference - @RandyMcMillan
-        [cont presentViewController:childBrowser animated:YES completion:nil];        
-    } else {
-        [ cont presentModalViewController:childBrowser animated:YES ];
-    }                 
-        
-    NSString *url = (NSString*) [arguments objectAtIndex:0];
-        
-    [childBrowser loadURL:url  ];
-        
-}
-
--(void) close:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options // args: url
-{
-    [ childBrowser closeBrowser];
-	
-}
-
--(void) onClose
-{
-	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onClose();",@""];
-	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
-}
-
--(void) onOpenInSafari
-{
-	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onOpenExternal();",@""];
-	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
-}
-
-
--(void) onChildLocationChange:(NSString*)newLoc
-{
-	
-	NSString* tempLoc = [NSString stringWithFormat:@"%@",newLoc];
-	NSString* encUrl = [tempLoc stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
-	 
-	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onLocationChange('%@');",encUrl];
-	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
-
-}
-
-
-
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserViewController.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserViewController.h b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserViewController.h
deleted file mode 100644
index d6fc139..0000000
--- a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserViewController.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-
-//
-//  ChildBrowserViewController.h
-//
-//  Created by Jesse MacFadyen on 21/07/09.
-//  Copyright 2009 Nitobi. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-@protocol ChildBrowserDelegate<NSObject>
-
-
-
-/*
- *  onChildLocationChanging:newLoc
- *  
- *  Discussion:
- *    Invoked when a new page has loaded
- */
--(void) onChildLocationChange:(NSString*)newLoc;
--(void) onOpenInSafari;
--(void) onClose;
-@end
-
-
-@interface ChildBrowserViewController : UIViewController < UIWebViewDelegate > {
-	IBOutlet UIWebView* webView;
-	IBOutlet UIBarButtonItem* closeBtn;
-	IBOutlet UIBarButtonItem* refreshBtn;
-	IBOutlet UILabel* addressLabel;
-	IBOutlet UIBarButtonItem* backBtn;
-	IBOutlet UIBarButtonItem* fwdBtn;
-	IBOutlet UIBarButtonItem* safariBtn;
-	IBOutlet UIActivityIndicatorView* spinner;
-	BOOL scaleEnabled;
-	BOOL isImage;
-	NSString* imageURL;
-	NSArray* supportedOrientations;
-	id <ChildBrowserDelegate> delegate;
-}
-
-@property (nonatomic, retain)id <ChildBrowserDelegate> delegate;
-@property (nonatomic, retain) 	NSArray* supportedOrientations;
-@property(retain) NSString* imageURL;
-@property(assign) BOOL isImage;
-
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation; 
-- (ChildBrowserViewController*)initWithScale:(BOOL)enabled;
-- (IBAction)onDoneButtonPress:(id)sender;
-- (IBAction)onSafariButtonPress:(id)sender;
-- (void)loadURL:(NSString*)url;
--(void)closeBrowser;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserViewController.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserViewController.m b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserViewController.m
deleted file mode 100644
index 167ef98..0000000
--- a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserViewController.m
+++ /dev/null
@@ -1,239 +0,0 @@
-//
-//  ChildBrowserViewController.m
-//
-//  Created by Jesse MacFadyen on 21/07/09.
-//  Copyright 2009 Nitobi. All rights reserved.
-//  Copyright (c) 2011, IBM Corporation
-//  Copyright 2011, Randy McMillan
-//
-
-#import "ChildBrowserViewController.h"
-
-
-@implementation ChildBrowserViewController
-
-@synthesize imageURL;
-@synthesize supportedOrientations;
-@synthesize isImage;
-@synthesize delegate;
-
-/*
- // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
-- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
-    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
-        // Custom initialization
-    }
-    return self;
-}
-*/
-
-+ (NSString*) resolveImageResource:(NSString*)resource
-{
-	NSString* systemVersion = [[UIDevice currentDevice] systemVersion];
-	BOOL isLessThaniOS4 = ([systemVersion compare:@"4.0" options:NSNumericSearch] == NSOrderedAscending);
-	
-	// the iPad image (nor retina) differentiation code was not in 3.x, and we have to explicitly set the path
-	if (isLessThaniOS4)
-	{
-        return [NSString stringWithFormat:@"%@.png", resource];
-	}
-	
-	return resource;
-}
-
-
-- (ChildBrowserViewController*)initWithScale:(BOOL)enabled
-{
-    self = [super init];
-	
-	
-	scaleEnabled = enabled;
-	
-	return self;	
-}
-
-// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    
-	refreshBtn.image = [UIImage imageNamed:[[self class] resolveImageResource:@"ChildBrowser.bundle/but_refresh"]];
-	backBtn.image = [UIImage imageNamed:[[self class] resolveImageResource:@"ChildBrowser.bundle/arrow_left"]];
-	fwdBtn.image = [UIImage imageNamed:[[self class] resolveImageResource:@"ChildBrowser.bundle/arrow_right"]];
-	safariBtn.image = [UIImage imageNamed:[[self class] resolveImageResource:@"ChildBrowser.bundle/compass"]];
-
-	webView.delegate = self;
-	webView.scalesPageToFit = TRUE;
-	webView.backgroundColor = [UIColor whiteColor];
-	NSLog(@"View did load");
-}
-
-
-
-
-
-- (void)didReceiveMemoryWarning {
-	// Releases the view if it doesn't have a superview.
-    [super didReceiveMemoryWarning];
-	
-	// Release any cached data, images, etc that aren't in use.
-}
-
-- (void)viewDidUnload {
-	// Release any retained subviews of the main view.
-	// e.g. self.myOutlet = nil;
-	NSLog(@"View did UN-load");
-}
-
-
-- (void)dealloc {
-
-	webView.delegate = nil;
-	
-	[webView release];
-	[closeBtn release];
-	[refreshBtn release];
-	[addressLabel release];
-	[backBtn release];
-	[fwdBtn release];
-	[safariBtn release];
-	[spinner release];
-	[ supportedOrientations release];
-	[super dealloc];
-}
-
--(void)closeBrowser
-{
-	
-	if(delegate != NULL)
-	{
-		[delegate onClose];		
-	}
-    if ([self respondsToSelector:@selector(presentingViewController)]) { 
-        //Reference UIViewController.h Line:179 for update to iOS 5 difference - @RandyMcMillan
-        [[self presentingViewController] dismissViewControllerAnimated:YES completion:nil];
-    } else {
-        [[self parentViewController] dismissModalViewControllerAnimated:YES];
-    }
-}
-
--(IBAction) onDoneButtonPress:(id)sender
-{
-	[ self closeBrowser];
-
-    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]];
-    [webView loadRequest:request];
-}
-
-
--(IBAction) onSafariButtonPress:(id)sender
-{
-	
-	if(delegate != NULL)
-	{
-		[delegate onOpenInSafari];		
-	}
-	
-	if(isImage)
-	{
-		NSURL* pURL = [[ [NSURL alloc] initWithString:imageURL ] autorelease];
-		[ [ UIApplication sharedApplication ] openURL:pURL  ];
-	}
-	else
-	{
-		NSURLRequest *request = webView.request;
-		[[UIApplication sharedApplication] openURL:request.URL];
-	}
-
-	 
-}
-
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation 
-{
-	BOOL autoRotate = [self.supportedOrientations count] > 1; // autorotate if only more than 1 orientation supported
-	if (autoRotate)
-	{
-		if ([self.supportedOrientations containsObject:
-			 [NSNumber numberWithInt:interfaceOrientation]]) {
-			return YES;
-		}
-    }
-	
-	return NO;
-}
-
-
-
-
-- (void)loadURL:(NSString*)url
-{
-	NSLog(@"Opening Url : %@",url);
-	 
-	if( [url hasSuffix:@".png" ]  || 
-	    [url hasSuffix:@".jpg" ]  || 
-		[url hasSuffix:@".jpeg" ] || 
-		[url hasSuffix:@".bmp" ]  || 
-		[url hasSuffix:@".gif" ]  )
-	{
-		[ imageURL release ];
-		imageURL = [url copy];
-		isImage = YES;
-		NSString* htmlText = @"<html><body style='background-color:#333;margin:0px;padding:0px;'><img style='min-height:200px;margin:0px;padding:0px;width:100%;height:auto;' alt='' src='IMGSRC'/></body></html>";
-		htmlText = [ htmlText stringByReplacingOccurrencesOfString:@"IMGSRC" withString:url ];
-
-		[webView loadHTMLString:htmlText baseURL:[NSURL URLWithString:@""]];
-		
-	}
-	else
-	{
-		imageURL = @"";
-		isImage = NO;
-		NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:url]];
-		[webView loadRequest:request];
-	}
-	webView.hidden = NO;
-}
-
-
-- (void)webViewDidStartLoad:(UIWebView *)sender {
-	addressLabel.text = @"Loading...";
-	backBtn.enabled = webView.canGoBack;
-	fwdBtn.enabled = webView.canGoForward;
-	
-	[ spinner startAnimating ];
-	
-}
-
-- (void)webViewDidFinishLoad:(UIWebView *)sender 
-{
-	NSURLRequest *request = webView.request;
-	NSLog(@"New Address is : %@",request.URL.absoluteString);
-	addressLabel.text = request.URL.absoluteString;
-	backBtn.enabled = webView.canGoBack;
-	fwdBtn.enabled = webView.canGoForward;
-	[ spinner stopAnimating ];
-	
-	if(delegate != NULL)
-	{
-		[delegate onChildLocationChange:request.URL.absoluteString];		
-	}
-
-}
-
-- (void)webView:(UIWebView *)wv didFailLoadWithError:(NSError *)error {
-    NSLog (@"webView:didFailLoadWithError");
-    [spinner stopAnimating];
-    addressLabel.text = @"Failed";
-    if (error != NULL) {
-        UIAlertView *errorAlert = [[UIAlertView alloc]
-                                   initWithTitle: [error localizedDescription]
-                                   message: [error localizedFailureReason]
-                                   delegate:nil
-                                   cancelButtonTitle:@"OK"
-                                   otherButtonTitles:nil];
-        [errorAlert show];
-        [errorAlert release];
-    }
-}
-
-
-@end


[02/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/platforms/tizen.js
----------------------------------------------------------------------
diff --git a/src/platforms/tizen.js b/src/platforms/tizen.js
deleted file mode 100644
index efbeba9..0000000
--- a/src/platforms/tizen.js
+++ /dev/null
@@ -1,72 +0,0 @@
-var path = require('path')
-    , fs = require('fs')
-    , common = require('./common')
-    , events = require('../events')
-    , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
-
-module.exports = {
-    www_dir: function(project_dir) {
-        return path.join(project_dir, 'www');
-    },
-    package_name:function(project_dir) {
-        // preferred location if cordova >= 3.4
-        var preferred_path = path.join(project_dir, 'config.xml');
-        if (!fs.existsSync(preferred_path)) {
-            // older location
-            old_config_path = path.join(module.exports.www_dir(project_dir), 'config.xml');
-            if (!fs.existsSync(old_config_path)) {
-                // output newer location and fail reading
-                config_path = preferred_path;
-                events.emit('verbose', 'unable to find '+config_path);
-            } else {
-                config_path = old_config_path;
-            }
-        } else {
-            config_path = preferred_path;
-        }
-        var widget_doc = xml_helpers.parseElementtreeSync(config_path);
-        return widget_doc._root.attrib['id'];
-    },
-    "source-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
-            common.copyFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
-            common.removeFile(project_dir, dest);
-        }
-    },
-    "header-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'header-fileinstall is not supported for firefoxos');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'header-file.uninstall is not supported for firefoxos');
-        }
-    },
-    "resource-file":{
-        install:function(el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'resource-file.install is not supported for firefoxos');
-        },
-        uninstall:function(el, project_dir, plugin_id) {
-            events.emit('verbose', 'resource-file.uninstall is not supported for firefoxos');
-        }
-    },
-    "framework": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.install is not supported for firefoxos');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.uninstall is not supported for firefoxos');
-        }
-    },
-    "lib-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.install is not supported for firefoxos');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.uninstall is not supported for firefoxos');
-        }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/platforms/ubuntu.js
----------------------------------------------------------------------
diff --git a/src/platforms/ubuntu.js b/src/platforms/ubuntu.js
deleted file mode 100644
index d04b774..0000000
--- a/src/platforms/ubuntu.js
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- *
- * Copyright 2013 Canonical Ltd.
- *
- * Licensed 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.
- *
-*/
-
-function replaceAt(str, index, char) {
-    return str.substr(0, index) + char + str.substr(index + char.length);
-}
-
-function toCamelCase(str) {
-    return str.split('-').map(function(str) {
-        return replaceAt(str, 0, str[0].toUpperCase());
-    }).join('');
-}
-
-var fs = require('fs')
-   , path = require('path')
-   , events = require('../events')
-   , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
-
-module.exports = {
-    www_dir:function(project_dir) {
-        return path.join(project_dir, 'www');
-    },
-
-    package_name:function (project_dir) {
-        var config_path = path.join(project_dir, 'config.xml');
-        var widget_doc = xml_helpers.parseElementtreeSync(config_path);
-        return widget_doc._root.attrib['id'];
-    },
-    "source-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            var shell = require('shelljs');
-            var dest = path.join(project_dir, "build", "src", "plugins", plugin_id);
-            shell.mkdir(dest);
-            shell.cp(path.join(plugin_dir, source_el.attrib.src), dest);
-
-            shell.exec('touch ' + path.join(project_dir, "CMakeLists.txt"))
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            var shell = require('shelljs');
-
-            var dest = path.join(project_dir, "build", "src", "plugins", plugin_id);
-            shell.rm(path.join(dest, path.basename(source_el.attrib.src)));
-        }
-    },
-    "header-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            var shell = require('shelljs');
-            var dest = path.join(project_dir, "build", "src", "plugins", plugin_id);
-            shell.mkdir(dest);
-            shell.cp(path.join(plugin_dir, source_el.attrib.src), dest);
-
-            var plugins = path.join(project_dir, "build", "src", "coreplugins.cpp");
-            src = String(fs.readFileSync(plugins));
-
-            src = src.replace('INSERT_HEADER_HERE', '#include "plugins/' + plugin_id + "/" + path.basename(source_el.attrib.src) +'"\nINSERT_HEADER_HERE');
-            var class_name = plugin_id.match(/\.[^.]+$/)[0].substr(1);
-            class_name = toCamelCase(class_name);
-            src = src.replace('INSERT_PLUGIN_HERE', 'INIT_PLUGIN(' + class_name + ');INSERT_PLUGIN_HERE');
-
-            fs.writeFileSync(plugins, src);
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            var shell = require('shelljs');
-            var dest = path.join(project_dir, "build", "src", "plugins", plugin_id);
-            shell.rm(path.join(dest, path.basename(source_el.attrib.src)));
-
-            var plugins = path.join(project_dir, "build", "src", "coreplugins.cpp");
-            src = String(fs.readFileSync(plugins));
-
-            src = src.replace('#include "plugins/' + plugin_id + "/" + path.basename(source_el.attrib.src) +'"', '');
-            var class_name = plugin_id.match(/\.[^.]+$/)[0].substr(1);
-            class_name = toCamelCase(class_name);
-            src = src.replace('INIT_PLUGIN(' + class_name + ');', '');
-
-            fs.writeFileSync(plugins, src);
-        }
-    },
-    "resource-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            var shell = require('shelljs');
-            var dest = path.join(project_dir, "qml");
-            shell.mkdir(dest);
-            shell.cp(path.join(plugin_dir, source_el.attrib.src), dest);
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            var shell = require('shelljs');
-
-            var dest = path.join(project_dir, "qml");
-            shell.rm(path.join(dest, path.basename(source_el.attrib.src)));
-        }
-    },
-    "framework": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.install is not supported for ubuntu');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.uninstall is not supported for ubuntu');
-        }
-    },
-    "lib-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.install is not supported for ubuntu');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.uninstall is not supported for ubuntu');
-        }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/platforms/windows8.js
----------------------------------------------------------------------
diff --git a/src/platforms/windows8.js b/src/platforms/windows8.js
deleted file mode 100644
index 523dc6e..0000000
--- a/src/platforms/windows8.js
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- *
- * Copyright 2013 Jesse MacFadyen
- *
- * Licensed 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 common = require('./common'),
-    path = require('path'),
-    glob = require('glob'),
-    shell = require('shelljs'),
-    fs = require('fs'),
-    w8jsproj = require('../util/w8jsproj'),
-    events = require('../events'),
-    xml_helpers = require('../util/xml-helpers');
-
-
-module.exports = {
-    platformName:"windows8",
-    InvalidProjectPathError:'does not appear to be a Windows Store JS project (no .jsproj file)',
-    www_dir:function(project_dir) {
-        return path.join(project_dir, 'www');
-    },
-    package_name:function(project_dir) {
-        var manifest = xml_helpers.parseElementtreeSync(path.join(project_dir, 'package.appxmanifest'));
-        return manifest.find("Properties/DisplayName").text;
-    },
-    parseProjectFile:function(project_dir) {
-        var project_files = glob.sync('*.jsproj', { cwd:project_dir });
-        if (project_files.length == 0) {
-            throw new Error(this.InvalidProjectPathError);
-        }
-        return new w8jsproj(path.join(project_dir, project_files[0]));
-    },
-    "source-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id, project_file) {
-            var targetDir = source_el.attrib['target-dir'] || '';
-            var dest = path.join('www', 'plugins', plugin_id, targetDir, path.basename(source_el.attrib['src']));
-
-            common.copyNewFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
-            // add reference to this file to jsproj.
-            project_file.addSourceFile(dest);
-        },
-        uninstall:function(source_el, project_dir, plugin_id, project_file) {
-            var dest = path.join('www', 'plugins', plugin_id,
-                                 source_el.attrib['target-dir'] ? source_el.attrib['target-dir'] : '',
-                                 path.basename(source_el.attrib['src']));
-            common.removeFile(project_dir, dest);
-            // remove reference to this file from csproj.
-            project_file.removeSourceFile(dest);
-        }
-    },
-    "header-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'header-fileinstall is not supported for Windows 8');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'header-file.uninstall is not supported for Windows 8');
-        }
-    },
-    "resource-file":{
-        install:function(el, plugin_dir, project_dir, plugin_id, project_file) {
-            events.emit('verbose', 'resource-file is not supported for Windows 8');
-        },
-        uninstall:function(el, project_dir, plugin_id, project_file) {
-        }
-    },
-    "lib-file": {
-        install:function(el, plugin_dir, project_dir, plugin_id, project_file) {
-            var inc  = el.attrib['Include'];
-            project_file.addSDKRef(inc);
-        },
-        uninstall:function(el, project_dir, plugin_id, project_file) {
-            events.emit('verbose', 'windows8 lib-file uninstall :: ' + plugin_id);
-            var inc = el.attrib['Include'];
-            project_file.removeSDKRef(inc);
-        }
-    },
-    "framework": {
-        install:function(el, plugin_dir, project_dir, plugin_id, project_file) {
-            events.emit('verbose', 'windows8 framework install :: ' + plugin_id);
-
-            var src = el.attrib['src'];
-            var dest = src; // if !isCustom, we will just add a reference to the file in place
-            // technically it is not possible to get here without isCustom == true -jm
-            // var isCustom = el.attrib.custom == "true";
-            var type = el.attrib["type"];
-
-            if(type == "projectReference") {
-                project_file.addProjectReference(path.join(plugin_dir,src));
-            }
-            else {
-                // if(isCustom) {}
-                dest = path.join('plugins', plugin_id, path.basename(src));
-                common.copyFile(plugin_dir, src, project_dir, dest);
-                project_file.addReference(dest,src);
-            }
-
-        },
-        uninstall:function(el, project_dir, plugin_id, project_file) {
-            events.emit('verbose', 'windows8 framework uninstall :: ' + plugin_id  );
-
-            var src = el.attrib['src'];
-            // technically it is not possible to get here without isCustom == true -jm
-            // var isCustom = el.attrib.custom == "true";
-            var type = el.attrib["type"];
-            // unfortunately we have to generate the plugin_dir path because it is not passed to uninstall
-            var plugin_dir = path.join(project_dir,"cordova/plugins",plugin_id,src);
-
-            if(type == "projectReference") {
-                project_file.removeProjectReference(plugin_dir);
-            }
-            else {
-                // if(isCustom) {  }
-                var targetPath = path.join('plugins', plugin_id);
-                common.removeFile(project_dir, targetPath);
-                project_file.removeReference(src);
-            }
-        }
-
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/platforms/wp7.js
----------------------------------------------------------------------
diff --git a/src/platforms/wp7.js b/src/platforms/wp7.js
deleted file mode 100644
index e6a76d0..0000000
--- a/src/platforms/wp7.js
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- *
- * Copyright 2013 Jesse MacFadyen
- *
- * Licensed 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 common = require('./common'),
-    path = require('path'),
-    glob = require('glob'),
-    fs = require('fs'),
-    csproj = require('../util/csproj'),
-    events = require('../events'),
-    xml_helpers = require('../util/xml-helpers');
-
-module.exports = {
-    www_dir:function(project_dir) {
-        return path.join(project_dir, 'www');
-    },
-    package_name:function(project_dir) {
-        return xml_helpers.parseElementtreeSync(path.join(project_dir, 'Properties', 'WMAppManifest.xml')).find('App').attrib.ProductID;
-    },
-    parseProjectFile:function(project_dir) {
-        var project_files = glob.sync('*.csproj', {
-            cwd:project_dir
-        });
-        if (project_files.length === 0) {
-            throw new Error('does not appear to be a Windows Phone project (no .csproj file)');
-        }
-        return new csproj(path.join(project_dir, project_files[0]));
-    },
-    "source-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id, project_file) {
-            var dest = path.join('Plugins', plugin_id, source_el.attrib['target-dir'] ? source_el.attrib['target-dir'] : '', path.basename(source_el.attrib['src']));
-
-            common.copyNewFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
-            // add reference to this file to csproj.
-            project_file.addSourceFile(dest);
-        },
-        uninstall:function(source_el, project_dir, plugin_id, project_file) {
-            var dest = path.join('Plugins', plugin_id, source_el.attrib['target-dir'] ? source_el.attrib['target-dir'] : '', path.basename(source_el.attrib['src']));
-            common.removeFile(project_dir, dest);
-            // remove reference to this file from csproj.
-            project_file.removeSourceFile(dest);
-        }
-    },
-    "header-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'header-fileinstall is not supported for wp7');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'header-file.uninstall is not supported for wp7');
-        }
-    },
-    "resource-file":{
-        install:function(el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'resource-file.install is not supported for wp7');
-        },
-        uninstall:function(el, project_dir, plugin_id) {
-            events.emit('verbose', 'resource-file.uninstall is not supported for wp7');
-        }
-    },
-    "framework": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.install is not supported for wp7');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.uninstall is not supported for wp7');
-        }
-    },
-    "lib-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.install is not supported for wp7');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.uninstall is not supported for wp7');
-        }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/platforms/wp8.js
----------------------------------------------------------------------
diff --git a/src/platforms/wp8.js b/src/platforms/wp8.js
deleted file mode 100644
index 1163b44..0000000
--- a/src/platforms/wp8.js
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- *
- * Copyright 2013 Jesse MacFadyen
- *
- * Licensed 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 common = require('./common'),
-    path = require('path'),
-    glob = require('glob'),
-    fs = require('fs'),
-    csproj = require('../util/csproj'),
-    events = require('../events'),
-    xml_helpers = require('../util/xml-helpers');
-
-module.exports = {
-    www_dir:function(project_dir) {
-        return path.join(project_dir, 'www');
-    },
-    package_name:function(project_dir) {
-        return xml_helpers.parseElementtreeSync(path.join(project_dir, 'Properties', 'WMAppManifest.xml')).find('App').attrib.ProductID;
-    },
-    parseProjectFile:function(project_dir) {
-        var project_files = glob.sync('*.csproj', {
-            cwd:project_dir
-        });
-        if (project_files.length === 0) {
-            throw new Error('does not appear to be a Windows Phone project (no .csproj file)');
-        }
-        return new csproj(path.join(project_dir, project_files[0]));
-    },
-    "source-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id, project_file) {
-            var dest = path.join('Plugins', plugin_id, source_el.attrib['target-dir'] ? source_el.attrib['target-dir'] : '', path.basename(source_el.attrib['src']));
-
-            common.copyNewFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
-            // add reference to this file to csproj.
-            project_file.addSourceFile(dest);
-        },
-        uninstall:function(source_el, project_dir, plugin_id, project_file) {
-            var dest = path.join('Plugins', plugin_id, source_el.attrib['target-dir'] ? source_el.attrib['target-dir'] : '', path.basename(source_el.attrib['src']));
-            common.removeFile(project_dir, dest);
-            // remove reference to this file from csproj.
-            project_file.removeSourceFile(dest);
-        }
-    },
-    "header-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'header-file.install is not supported for wp8');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'header-file.uninstall is not supported for wp8');
-        }
-    },
-    "resource-file":{
-        install:function(el, plugin_dir, project_dir, plugin_id, project_file) {
-            events.emit('verbose', 'resource-file.install is not supported for wp8');
-        },
-        uninstall:function(el, project_dir, plugin_id, project_file) {
-            events.emit('verbose', 'resource-file.uninstall is not supported for wp8');
-        }
-    },
-    "framework":{
-        install:function(el, plugin_dir, project_dir, plugin_id, project_file) {
-            events.emit('verbose', 'wp8 framework install :: ' + plugin_id  );
-
-            var src = el.attrib['src'];
-            var dest = src; // if !isCustom, we will just add a reference to the file in place
-            var isCustom = el.attrib.custom == "true";
-
-            if(isCustom) {
-                dest = path.join('plugins', plugin_id, path.basename(src));
-                common.copyFile(plugin_dir, src, project_dir, dest);
-            }
-
-            project_file.addReference(dest);
-
-        },
-        uninstall:function(el, project_dir, plugin_id, project_file) {
-            events.emit('verbose', 'wp8 framework uninstall :: ' + plugin_id  );
-
-            var src = el.attrib['src'];
-            var isCustom = el.attrib.custom == "true";
-
-            if(isCustom) {
-                var dest = path.join('plugins', plugin_id);
-                common.removeFile(project_dir, dest);
-            }
-
-            project_file.removeReference(src);
-        }
-    },
-    "lib-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.install is not supported for wp8');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.uninstall is not supported for wp8');
-        }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/prepare.js
----------------------------------------------------------------------
diff --git a/src/prepare.js b/src/prepare.js
deleted file mode 100644
index c650306..0000000
--- a/src/prepare.js
+++ /dev/null
@@ -1,232 +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.
-*/
-
-/* jshint node:true */
-
-var platform_modules = require('./platforms'),
-    path            = require('path'),
-    config_changes  = require('./util/config-changes'),
-    xml_helpers     = require('./util/xml-helpers'),
-    wp7             = require('./platforms/wp7'),
-    wp8             = require('./platforms/wp8'),
-    windows8        = require('./platforms/windows8'),
-    common          = require('./platforms/common');
-    fs              = require('fs'),
-    shell           = require('shelljs'),
-    util            = require('util'),
-    events          = require('./events'),
-    plugman         = require('../plugman'),
-    et              = require('elementtree');
-
-// Called on --prepare.
-// Sets up each plugin's Javascript code to be loaded properly.
-// Expects a path to the project (platforms/android in CLI, . in plugman-only),
-// a path to where the plugins are downloaded, the www dir, and the platform ('android', 'ios', etc.).
-module.exports = function handlePrepare(project_dir, platform, plugins_dir, www_dir) {
-    // Process:
-    // - Do config munging by calling into config-changes module
-    // - List all plugins in plugins_dir
-    // - Load and parse their plugin.xml files.
-    // - Skip those without support for this platform. (No <platform> tags means JS-only!)
-    // - Build a list of all their js-modules, including platform-specific js-modules.
-    // - For each js-module (general first, then platform) build up an object storing the path and any clobbers, merges and runs for it.
-    // - Write this object into www/cordova_plugins.json.
-    // - Cordova.js contains code to load them at runtime from that file.
-    events.emit('verbose', 'Preparing ' + platform + ' project');
-    var platform_json = config_changes.get_platform_json(plugins_dir, platform);
-    var wwwDir = www_dir || platform_modules[platform].www_dir(project_dir);
-
-    // Check if there are any plugins queued for uninstallation, and if so, remove any of their plugin web assets loaded in
-    // via <js-module> elements
-    var plugins_to_uninstall = platform_json.prepare_queue.uninstalled;
-    if (plugins_to_uninstall && plugins_to_uninstall.length) {
-        var plugins_www = path.join(wwwDir, 'plugins');
-        if (fs.existsSync(plugins_www)) {
-            plugins_to_uninstall.forEach(function(plug) {
-                var id = plug.id;
-                var plugin_modules = path.join(plugins_www, id);
-                if (fs.existsSync(plugin_modules)) {
-                    events.emit('verbose', 'Removing plugins directory from www "'+plugin_modules+'"');
-                    shell.rm('-rf', plugin_modules);
-                }
-            });
-        }
-    }
-
-    events.emit('verbose', 'Processing configuration changes for plugins.');
-    config_changes.process(plugins_dir, project_dir, platform);
-
-    // for windows phone platform we need to add all www resources to the .csproj file
-    // first we need to remove them all to prevent duplicates
-    var wp_csproj;
-    if(platform == 'wp7' || platform == 'wp8') {
-        wp_csproj = (platform == wp7? wp7.parseProjectFile(project_dir) : wp8.parseProjectFile(project_dir));
-        var item_groups = wp_csproj.xml.findall('ItemGroup');
-        for (var i = 0, l = item_groups.length; i < l; i++) {
-            var group = item_groups[i];
-            var files = group.findall('Content');
-            for (var j = 0, k = files.length; j < k; j++) {
-                var file = files[j];
-                if (file.attrib.Include.substr(0,11) == "www\\plugins" || file.attrib.Include == "www\\cordova_plugins.js") {
-                    // remove file reference
-                    group.remove(0, file);
-                    // remove ItemGroup if empty
-                    var new_group = group.findall('Content');
-                    if(new_group.length < 1) {
-                        wp_csproj.xml.getroot().remove(0, group);
-                    }
-                }
-            }
-        }
-    }
-    else if(platform == "windows8") {
-        wp_csproj = windows8.parseProjectFile(project_dir);
-        var item_groups = wp_csproj.xml.findall('ItemGroup');
-        for (var i = 0, l = item_groups.length; i < l; i++) {
-            var group = item_groups[i];
-            var files = group.findall('Content');
-            for (var j = 0, k = files.length; j < k; j++) {
-                var file = files[j];
-                if (file.attrib.Include.substr(0,11) == "www\\plugins" || file.attrib.Include == "www\\cordova_plugins.js") {
-                    // remove file reference
-                    group.remove(0, file);
-                    // remove ItemGroup if empty
-                    var new_group = group.findall('Content');
-                    if(new_group.length < 1) {
-                        wp_csproj.xml.getroot().remove(0, group);
-                    }
-                }
-            }
-        }
-
-    }
-
-    platform_json = config_changes.get_platform_json(plugins_dir, platform);
-    // This array holds all the metadata for each module and ends up in cordova_plugins.json
-    var plugins = Object.keys(platform_json.installed_plugins).concat(Object.keys(platform_json.dependent_plugins));
-    var moduleObjects = [];
-    var pluginMetadata = {};
-    events.emit('verbose', 'Iterating over installed plugins:', plugins);
-
-    plugins && plugins.forEach(function(plugin) {
-        var pluginDir = path.join(plugins_dir, plugin),
-            pluginXML = path.join(pluginDir, 'plugin.xml');
-        if (!fs.existsSync(pluginXML)) {
-            plugman.emit('warn', 'Missing file: ' + pluginXML);
-            return;
-        }
-        var xml = xml_helpers.parseElementtreeSync(pluginXML);
-
-        var plugin_id = xml.getroot().attrib.id;
-
-        // pluginMetadata is a mapping from plugin IDs to versions.
-        pluginMetadata[plugin_id] = xml.getroot().attrib.version;
-
-        // add the plugins dir to the platform's www.
-        var platformPluginsDir = path.join(wwwDir, 'plugins');
-        // XXX this should not be here if there are no js-module. It leaves an empty plugins/ directory
-        shell.mkdir('-p', platformPluginsDir);
-
-        var jsModules = xml.findall('./js-module');
-        var assets = xml.findall('asset');
-        var platformTag = xml.find(util.format('./platform[@name="%s"]', platform));
-
-        if (platformTag) {
-            assets = assets.concat(platformTag.findall('./asset'));
-            jsModules = jsModules.concat(platformTag.findall('./js-module'));
-        }
-
-        // Copy www assets described in <asset> tags.
-        assets = assets || [];
-        assets.forEach(function(asset) {
-            common.asset.install(asset, pluginDir, wwwDir);
-        });
-
-        jsModules.forEach(function(module) {
-            // Copy the plugin's files into the www directory.
-            // NB: We can't always use path.* functions here, because they will use platform slashes.
-            // But the path in the plugin.xml and in the cordova_plugins.js should be always forward slashes.
-            var pathParts = module.attrib.src.split('/');
-
-            var fsDirname = path.join.apply(path, pathParts.slice(0, -1));
-            var fsDir = path.join(platformPluginsDir, plugin_id, fsDirname);
-            shell.mkdir('-p', fsDir);
-
-            // Read in the file, prepend the cordova.define, and write it back out.
-            var moduleName = plugin_id + '.';
-            if (module.attrib.name) {
-                moduleName += module.attrib.name;
-            } else {
-                var result = module.attrib.src.match(/([^\/]+)\.js/);
-                moduleName += result[1];
-            }
-
-            var fsPath = path.join.apply(path, pathParts);
-            var scriptContent = fs.readFileSync(path.join(pluginDir, fsPath), 'utf-8');
-            scriptContent = 'cordova.define("' + moduleName + '", function(require, exports, module) { ' + scriptContent + '\n});\n';
-            fs.writeFileSync(path.join(platformPluginsDir, plugin_id, fsPath), scriptContent, 'utf-8');
-            if(platform == 'wp7' || platform == 'wp8' || platform == "windows8") {
-                wp_csproj.addSourceFile(path.join('www', 'plugins', plugin_id, fsPath));
-            }
-
-            // Prepare the object for cordova_plugins.json.
-            var obj = {
-                file: ['plugins', plugin_id, module.attrib.src].join('/'),
-                id: moduleName
-            };
-
-            // Loop over the children of the js-module tag, collecting clobbers, merges and runs.
-            module.getchildren().forEach(function(child) {
-                if (child.tag.toLowerCase() == 'clobbers') {
-                    if (!obj.clobbers) {
-                        obj.clobbers = [];
-                    }
-                    obj.clobbers.push(child.attrib.target);
-                } else if (child.tag.toLowerCase() == 'merges') {
-                    if (!obj.merges) {
-                        obj.merges = [];
-                    }
-                    obj.merges.push(child.attrib.target);
-                } else if (child.tag.toLowerCase() == 'runs') {
-                    obj.runs = true;
-                }
-            });
-
-            // Add it to the list of module objects bound for cordova_plugins.json
-            moduleObjects.push(obj);
-        });
-    });
-
-    // Write out moduleObjects as JSON wrapped in a cordova module to cordova_plugins.js
-    var final_contents = "cordova.define('cordova/plugin_list', function(require, exports, module) {\n";
-    final_contents += 'module.exports = ' + JSON.stringify(moduleObjects,null,'    ') + ';\n';
-    final_contents += 'module.exports.metadata = \n';
-    final_contents += '// TOP OF METADATA\n';
-    final_contents += JSON.stringify(pluginMetadata, null, '    ') + '\n';
-    final_contents += '// BOTTOM OF METADATA\n';
-    final_contents += '});'; // Close cordova.define.
-
-    events.emit('verbose', 'Writing out cordova_plugins.js...');
-    fs.writeFileSync(path.join(wwwDir, 'cordova_plugins.js'), final_contents, 'utf-8');
-
-    if(platform == 'wp7' || platform == 'wp8' || platform == "windows8") {
-        wp_csproj.addSourceFile(path.join('www', 'cordova_plugins.js'));
-        wp_csproj.write();
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/publish.js
----------------------------------------------------------------------
diff --git a/src/publish.js b/src/publish.js
deleted file mode 100644
index 05b5284..0000000
--- a/src/publish.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var registry = require('./registry/registry')
-
-module.exports = function(plugin_path) {
-    // plugin_path is an array of paths
-    return registry.publish(plugin_path);
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/registry/manifest.js
----------------------------------------------------------------------
diff --git a/src/registry/manifest.js b/src/registry/manifest.js
deleted file mode 100644
index 54f74b6..0000000
--- a/src/registry/manifest.js
+++ /dev/null
@@ -1,95 +0,0 @@
-var xml_helpers = require('../util/xml-helpers'),
-    path = require('path'),
-    Q = require('q'),
-    fs = require('fs'),
-    whitelist = require('./whitelist');
-
-function validateName(name) {
-    if (!name.match(/^(\w+\.){2,}.*$/)) {
-        throw new Error('Invalid plugin ID. It has to follow the reverse domain `com.domain.plugin` format');
-    }
-
-    if (name.match(/org.apache.cordova\..*/) && whitelist.indexOf(name) === -1) {
-        throw new Error('Invalid Plugin ID. The "org.apache.cordova" prefix is reserved for plugins provided directly by the Cordova project.');
-    }
-
-    return true;
-}
-
-// Java world big-up!
-// Returns a promise.
-function generatePackageJsonFromPluginXml(plugin_path) {
-    return Q().then(function() {
-        var package_json = {};
-        var pluginXml = xml_helpers.parseElementtreeSync(path.join(plugin_path, 'plugin.xml'));
-
-        if(!pluginXml) throw new Error('invalid plugin.xml document');
-
-        var pluginElm = pluginXml.getroot();
-
-        if(!pluginElm) throw new Error('invalid plugin.xml document');
-
-        // REQUIRED: name, version
-        // OPTIONAL: description, license, keywords, engine
-        var name = pluginElm.attrib.id,
-            version = pluginElm.attrib.version,
-            cordova_name = pluginElm.findtext('name'),
-            description = pluginElm.findtext('description'),
-            license = pluginElm.findtext('license'),
-            keywords = pluginElm.findtext('keywords'),
-            repo = pluginElm.findtext('repo'),
-            issue = pluginElm.findtext('issue'),
-            engines = pluginElm.findall('engines/engine'),
-            platformsElm = pluginElm.findall('platform'),
-            englishdoc = "",
-            platforms = [];
-
-        platformsElm.forEach(function(plat){
-            platforms.push(plat.attrib.name);
-        })
-        if(!version) throw new Error('`version` required');
-
-        package_json.version = version;
-
-        if(!name) throw new Error('`id` is required');
-
-        validateName(name);
-
-        package_json.name = name.toLowerCase();
-
-        if(cordova_name) package_json.cordova_name = cordova_name;
-        if(description)  package_json.description  = description;
-        if(license)      package_json.license      = license;
-        if(repo)         package_json.repo         = repo;
-        if(issue)        package_json.issue        = issue;
-        if(keywords)     package_json.keywords     = keywords.split(',');
-        if(platforms)    package_json.platforms    = platforms;
-
-        // adding engines
-        if(engines) {
-            package_json.engines = [];
-            for(var i = 0, j = engines.length ; i < j ; i++) {
-                package_json.engines.push({name: engines[i].attrib.name, version: engines[i].attrib.version});
-            }
-        }
-
-        //set docs_path to doc/index.md exists
-        var docs_path = path.resolve(plugin_path, 'doc/index.md');
-        if(!(fs.existsSync(docs_path))){
-            //set docs_path to doc/en/index.md
-            docs_path = path.resolve(plugin_path, 'doc/en/index.md');
-        }
-        if(fs.existsSync(docs_path)){
-            englishdoc = fs.readFileSync(docs_path, 'utf-8');
-            package_json.englishdoc = englishdoc;
-        }
-
-        // write package.json
-        var package_json_path = path.resolve(plugin_path, 'package.json');
-        //console.log('about to write package.json');
-        fs.writeFileSync(package_json_path, JSON.stringify(package_json, null, 4), 'utf8');
-        return package_json;
-    });
-}
-
-module.exports.generatePackageJsonFromPluginXml = generatePackageJsonFromPluginXml;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/registry/registry.js
----------------------------------------------------------------------
diff --git a/src/registry/registry.js b/src/registry/registry.js
deleted file mode 100644
index e0d733d..0000000
--- a/src/registry/registry.js
+++ /dev/null
@@ -1,290 +0,0 @@
-var npm = require('npm'),
-    path = require('path'),
-    http = require('http'),
-    url = require('url'),
-    fs = require('fs'),
-    manifest = require('./manifest'),
-    os = require('os'),
-    rc = require('rc'),
-    Q = require('q'),
-    request = require('request'),
-    zlib = require('zlib'),
-    tar = require('tar'),
-    shell = require('shelljs'),
-    home = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE,
-    plugmanConfigDir = path.resolve(home, '.plugman'),
-    plugmanCacheDir = path.resolve(plugmanConfigDir, 'cache');
-
-/**
- * @method getPackageInfo
- * @param {String} args Package names
- * @return {Promise.<Object>} Promised package info.
- */
-function getPackageInfo(args) {
-    var thing = args.length ? args.shift().split("@") : [],
-        name = thing.shift(),
-        version = thing.join("@") || 'latest';
-    var settings = module.exports.settings;
-
-    var d = Q.defer();
-    var req = makeRequest('GET', settings.registry + '/' + name + '/' + version, function(err, res, body){
-        if(err || res.statusCode != 200) {
-          d.reject(new Error('Failed to fetch package information for '+name));
-        } else {
-          d.resolve(JSON.parse(body));
-        }
-    });
-    req.on('error', function(err) {
-        d.reject(err);
-    });
-    return d.promise;
-}
-
-/**
- * @method fetchPackage
- * @param {String} info Package info
- * @return {Promise.<string>} Promised path to the package.
- */
-function fetchPackage(info, cl) {
-    var settings = module.exports.settings;
-    var d = Q.defer();
-    var cached = path.resolve(settings.cache, info.name, info.version, 'package');
-    if(fs.existsSync(cached)) {
-        d.resolve(cached);
-    } else {
-        var download_dir = path.resolve(cached, '..');
-        shell.mkdir('-p', download_dir);
-
-        var req = makeRequest('GET', info.dist.tarball, function (err, res, body) {
-            if(err || res.statusCode != 200) {
-                d.reject(new Error('failed to fetch the plugin archive'));
-            } else {
-                // Update the download count for this plugin.
-                // Fingers crossed that the timestamps are unique, and that no plugin is downloaded
-                // twice in a single millisecond.
-                //
-                // This is acceptable, because the failure mode is Couch gracefully rejecting the second one
-                // (for lacking a _rev), and dropped a download count is not important.
-                var now = new Date();
-                var pkgId = info._id.substring(0, info._id.indexOf('@'));
-                var message = {
-                    day: now.getUTCFullYear() + '-' + (now.getUTCMonth()+1) + '-' + now.getUTCDate(),
-                    pkg: pkgId,
-                    client: cl
-                };
-                var remote = settings.registry + '/downloads'
-
-                makeRequest('POST', remote, message, function (err, res, body) {
-                    // ignore errors
-                });
-            }
-        });
-        req.pipe(zlib.createUnzip())
-        .pipe(tar.Extract({path:download_dir}))
-        .on('error', function(err) {
-            shell.rm('-rf', download_dir);
-            d.reject(err);
-        })
-        .on('end', function() {
-            d.resolve(path.resolve(download_dir, 'package'));
-        });
-    }
-    return d.promise;
-}
-
-module.exports = {
-    settings: null,
-    /**
-     * @method config
-     * @param {Array} args Command argument
-     * @return {Promise.<Object>} Promised configuration object.
-     */
-    config: function(args) {
-        return initSettings().then(function(settings) {
-            return Q.ninvoke(npm, 'load', settings)
-        })
-        .then(function() {
-            return Q.ninvoke(npm.commands, 'config', args);
-        });
-    },
-
-    /**
-     * @method owner
-     * @param {Array} args Command argument
-     * @return {Promise.<void>} Promise for completion.
-     */
-    owner: function(args) {
-        return initSettings().then(function(settings) {
-            return Q.ninvoke(npm, 'load', settings);
-        }).then(function() {
-            return Q.ninvoke(npm.commands, 'owner', args);
-        });
-    },
-    /**
-     * @method adduser
-     * @param {Array} args Command argument
-     * @return {Promise.<void>} Promise for completion.
-     */
-    adduser: function(args) {
-        return initSettings().then(function(settings) {
-            return Q.ninvoke(npm, 'load', settings)
-        })
-        .then(function() {
-            return Q.ninvoke(npm.commands, 'adduser', args);
-        });
-    },
-
-    /**
-     * @method publish
-     * @param {Array} args Command argument
-     * @return {Promise.<Object>} Promised published data.
-     */
-    publish: function(args) {
-        return initSettings()
-        .then(function(settings) {
-            return manifest.generatePackageJsonFromPluginXml(args[0])
-            .then(function() {
-                return Q.ninvoke(npm, 'load', settings);
-            }).then(function() {
-                return Q.ninvoke(npm.commands, 'publish', args)
-            }).fin(function() {
-                fs.unlink(path.resolve(args[0], 'package.json'));
-            });
-        });
-    },
-
-    /**
-     * @method search
-     * @param {Array} args Array of keywords
-     * @return {Promise.<Object>} Promised search results.
-     */
-    search: function(args) {
-        return initSettings()
-        .then(function(settings) {
-            return Q.ninvoke(npm, 'load', settings);
-        }).then(function() {
-            return Q.ninvoke(npm.commands, 'search', args, true);
-        });
-    },
-
-    /**
-     * @method unpublish
-     * @param {Array} args Command argument
-     * @return {Promise.<Object>} Promised results.
-     */
-    unpublish: function(args) {
-        return initSettings()
-        .then(function(settings) {
-            return Q.ninvoke(npm, 'load', settings);
-        }).then(function() {
-            return Q.ninvoke(npm.commands, 'unpublish', args);
-        }).then(function() {
-            return Q.ninvoke(npm.commands, 'cache', ["clean"]);
-        });
-    },
-
-    /**
-     * @method fetch
-     * @param {String} name Plugin name
-     * @return {Promise.<string>} Promised path to fetched package.
-     */
-    fetch: function(args, client) {
-        var cl = (client === 'plugman' ? 'plugman' : 'cordova-cli');
-        return initSettings()
-        .then(function(settings) {
-            return getPackageInfo(args);
-        }).then(function(info) {
-            return fetchPackage(info, cl);
-        });
-    },
-
-    /**
-     * @method info
-     * @param {String} name Plugin name
-     * @return {Promise.<Object>} Promised package info.
-     */
-    info: function(args) {
-        return initSettings()
-        .then(function() {
-            return getPackageInfo(args);
-        });
-    }
-}
-
-/**
- * @method initSettings
- * @return {Promise.<Object>} Promised settings.
- */
-function initSettings() {
-    var settings = module.exports.settings;
-    // check if settings already set
-    if(settings != null) return Q(settings);
-
-    // setting up settings
-    // obviously if settings dir does not exist settings is going to be empty
-    if(!fs.existsSync(plugmanConfigDir)) {
-        fs.mkdirSync(plugmanConfigDir);
-        fs.mkdirSync(plugmanCacheDir);
-    }
-
-    settings =
-    module.exports.settings =
-    rc('plugman', {
-         cache: plugmanCacheDir,
-         force: true,
-         registry: 'http://registry.cordova.io',
-         logstream: fs.createWriteStream(path.resolve(plugmanConfigDir, 'plugman.log')),
-         userconfig: path.resolve(plugmanConfigDir, 'config')
-    });
-    return Q(settings);
-}
-
-
-function makeRequest (method, where, what, cb_) {
-  var settings = module.exports.settings
-  var remote = url.parse(where)
-  if (typeof cb_ !== "function") cb_ = what, what = null
-  var cbCalled = false
-  function cb () {
-    if (cbCalled) return
-    cbCalled = true
-    cb_.apply(null, arguments)
-  }
-
-  var strict = settings['strict-ssl']
-  if (strict === undefined) strict = true
-  var opts = { url: remote
-             , method: method
-             , ca: settings.ca
-             , strictSSL: strict }
-    , headers = opts.headers = {}
-
-  headers.accept = "application/json"
-
-  headers["user-agent"] = settings['user-agent'] ||
-                          'node/' + process.version
-
-  var p = settings.proxy
-  var sp = settings['https-proxy'] || p
-  opts.proxy = remote.protocol === "https:" ? sp : p
-
-  // figure out wth 'what' is
-  if (what) {
-    if (Buffer.isBuffer(what) || typeof what === "string") {
-      opts.body = what
-      headers["content-type"] = "application/json"
-      headers["content-length"] = Buffer.byteLength(what)
-    } else {
-      opts.json = what
-    }
-  }
-
-  var req = request(opts, cb)
-
-  req.on("error", cb)
-  req.on("socket", function (s) {
-    s.on("error", cb)
-  })
-
-  return req
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/registry/whitelist.js
----------------------------------------------------------------------
diff --git a/src/registry/whitelist.js b/src/registry/whitelist.js
deleted file mode 100644
index 5e7cfa6..0000000
--- a/src/registry/whitelist.js
+++ /dev/null
@@ -1,21 +0,0 @@
-module.exports = [
-    'org.apache.cordova.splashscreen',
-    'org.apache.cordova.network-information',
-    'org.apache.cordova.file',
-    'org.apache.cordova.file-transfer',
-    'org.apache.cordova.media',
-    'org.apache.cordova.vibration',
-    'org.apache.cordova.media-capture',
-    'org.apache.cordova.inappbrowser',
-    'org.apache.cordova.globalization',
-    'org.apache.cordova.geolocation',
-    'org.apache.cordova.dialogs',
-    'org.apache.cordova.device-orientation',
-    'org.apache.cordova.device',
-    'org.apache.cordova.contacts',
-    'org.apache.cordova.console',
-    'org.apache.cordova.camera',
-    'org.apache.cordova.device-motion',
-    'org.apache.cordova.battery-status',
-    'org.apache.cordova.statusbar'
-]

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/search.js
----------------------------------------------------------------------
diff --git a/src/search.js b/src/search.js
deleted file mode 100644
index 000f58e..0000000
--- a/src/search.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var registry = require('./registry/registry')
-
-module.exports = function(search_opts) {
-    return registry.search(search_opts);
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/uninstall.js
----------------------------------------------------------------------
diff --git a/src/uninstall.js b/src/uninstall.js
deleted file mode 100644
index 04ecb1a..0000000
--- a/src/uninstall.js
+++ /dev/null
@@ -1,288 +0,0 @@
-
-var path = require('path'),
-    fs   = require('fs'),
-    et   = require('elementtree'),
-    shell= require('shelljs'),
-    config_changes = require('./util/config-changes'),
-    xml_helpers = require('./util/xml-helpers'),
-    action_stack = require('./util/action-stack'),
-    dependencies = require('./util/dependencies'),
-    underscore = require('underscore'),
-    Q = require('q'),
-    plugins = require('./util/plugins'),
-    underscore = require('underscore'),
-    events = require('./events'),
-    platform_modules = require('./platforms'),
-    plugman = require('../plugman');
-
-// possible options: cli_variables, www_dir
-// Returns a promise.
-module.exports = function(platform, project_dir, id, plugins_dir, options) {
-    options = options || {};
-    options.is_top_level = true;
-    plugins_dir = plugins_dir || path.join(project_dir, 'cordova', 'plugins');
-
-    // Allow path to file to grab an ID
-    var xml_path = path.join(id, 'plugin.xml');
-    if ( fs.existsSync(xml_path) ) {
-        var plugin_et  = xml_helpers.parseElementtreeSync(xml_path),
-        id = plugin_et._root.attrib['id'];
-    }
-
-    return module.exports.uninstallPlatform(platform, project_dir, id, plugins_dir, options)
-    .then(function() {
-        return module.exports.uninstallPlugin(id, plugins_dir, options);
-    });
-}
-
-// Returns a promise.
-module.exports.uninstallPlatform = function(platform, project_dir, id, plugins_dir, options) {
-    options = options || {};
-    options.is_top_level = true;
-    plugins_dir = plugins_dir || path.join(project_dir, 'cordova', 'plugins');
-
-    if (!platform_modules[platform]) {
-        return Q.reject(new Error(platform + " not supported."));
-    }
-
-    var plugin_dir = path.join(plugins_dir, id);
-    if (!fs.existsSync(plugin_dir)) {
-        return Q.reject(new Error('Plugin "' + id + '" not found. Already uninstalled?'));
-    }
-
-    var current_stack = new action_stack();
-
-    return runUninstallPlatform(current_stack, platform, project_dir, plugin_dir, plugins_dir, options);
-};
-
-// Returns a promise.
-module.exports.uninstallPlugin = function(id, plugins_dir, options) {
-    options = options || {};
-
-    var plugin_dir = path.join(plugins_dir, id);
-
-    // @tests - important this event is checked spec/uninstall.spec.js
-    events.emit('log', 'Removing "'+ id +'"');
-
-    // If already removed, skip.
-    if ( !fs.existsSync(plugin_dir) ) {
-        events.emit('verbose', 'Plugin "'+ id +'" already removed ('+ plugin_dir +')');
-        return Q();
-    }
-
-    var xml_path  = path.join(plugin_dir, 'plugin.xml')
-      , plugin_et = xml_helpers.parseElementtreeSync(xml_path);
-
-    var doDelete = function(id) {
-        var plugin_dir = path.join(plugins_dir, id);
-        if ( !fs.existsSync(plugin_dir) ) {
-            events.emit('verbose', 'Plugin "'+ id +'" already removed ('+ plugin_dir +')');
-            return Q();
-        }
-
-        shell.rm('-rf', plugin_dir);
-        events.emit('verbose', 'Deleted "'+ id +'"');
-    };
-
-    // We've now lost the metadata for the plugins that have been uninstalled, so we can't use that info.
-    // Instead, we list all dependencies of the target plugin, and check the remaining metadata to see if
-    // anything depends on them, or if they're listed as top-level.
-    // If neither, they can be deleted.
-    var top_plugin_id = id;
-
-    // Recursively remove plugins which were installed as dependents (that are not top-level)
-    // optional?
-    var recursive = true;
-    var toDelete = recursive ? plugin_et.findall('dependency') : [];
-    toDelete = toDelete && toDelete.length ? toDelete.map(function(p) { return p.attrib.id; }) : [];
-    toDelete.push(top_plugin_id);
-
-    // Okay, now we check if any of these are depended on, or top-level.
-    // Find the installed platforms by whether they have a metadata file.
-    var platforms = Object.keys(platform_modules).filter(function(platform) {
-        return fs.existsSync(path.join(plugins_dir, platform + '.json'));
-    });
-
-    // Can have missing plugins on some platforms when not supported..
-    var dependList = {};
-    platforms.forEach(function(platform) {
-        var depsInfo = dependencies.generate_dependency_info(plugins_dir, platform);
-        var tlps = depsInfo.top_level_plugins,
-            deps, i;
-
-        // Top-level deps must always be explicitely asked to remove by user
-        tlps.forEach(function(plugin_id){
-            if(top_plugin_id == plugin_id)
-                return;
-
-            var i = toDelete.indexOf(plugin_id);
-            if(i >= 0)
-                toDelete.splice(i, 1);
-        });
-
-        toDelete.forEach(function(plugin) {
-            deps = dependencies.dependents(plugin, depsInfo);
-
-            var i = deps.indexOf(top_plugin_id);
-            if(i >= 0)
-                 deps.splice(i, 1); // remove current/top-level plugin as blocking uninstall
-
-            if(deps.length) {
-                dependList[plugin] = deps.join(', ');
-            }
-        });
-    });
-
-    var i, plugin_id, msg;
-    for(i in toDelete) {
-        plugin_id = toDelete[i];
-
-        if( dependList[plugin_id] ) {
-            msg = '"' + plugin_id + '" is required by ('+ dependList[plugin_id] + ')';
-            if(options.force) {
-                events.emit('log', msg +' but forcing removal.');
-            } else {
-                // @tests - error and event message is checked spec/uninstall.spec.js
-                msg += ' and cannot be removed (hint: use -f or --force)';
-
-                if(plugin_id == top_plugin_id) {
-                    return Q.reject( new Error(msg) );
-                } else {
-                    events.emit('warn', msg +' and cannot be removed (hint: use -f or --force)');
-                    continue;
-                }
-            }
-        }
-
-        doDelete(plugin_id);
-    }
-
-    return Q();
-};
-
-// possible options: cli_variables, www_dir, is_top_level
-// Returns a promise
-function runUninstallPlatform(actions, platform, project_dir, plugin_dir, plugins_dir, options) {
-    options = options || {};
-
-    var xml_path     = path.join(plugin_dir, 'plugin.xml');
-    var plugin_et    = xml_helpers.parseElementtreeSync(xml_path);
-    var plugin_id    = plugin_et._root.attrib['id'];
-
-    // Deps info can be passed recusively
-    var depsInfo = options.depsInfo || dependencies.generate_dependency_info(plugins_dir, platform, 'remove');
-
-    // Check that this plugin has no dependents.
-    var dependents = dependencies.dependents(plugin_id, depsInfo, platform);
-
-    if(options.is_top_level && dependents && dependents.length > 0) {
-        var msg = "The plugin '"+ plugin_id +"' is required by (" + dependents.join(', ') + ")";
-        if(options.force) {
-            events.emit("info", msg + " but forcing removal");
-        } else {
-            return Q.reject( new Error(msg + ", skipping uninstallation.") );
-        }
-    }
-
-    // Check how many dangling dependencies this plugin has.
-    var deps = depsInfo.graph.getChain(plugin_id);
-    var danglers = dependencies.danglers(plugin_id, depsInfo, platform);
-
-    var promise;
-    if (deps && deps.length && danglers && danglers.length) {
-
-        // @tests - important this event is checked spec/uninstall.spec.js
-        events.emit('log', 'Uninstalling ' + danglers.length + ' dependent plugins.');
-        promise = Q.all(
-            danglers.map(function(dangler) {
-                var dependent_path = dependencies.resolvePath(dangler, plugins_dir);
-
-                var opts = underscore.extend({}, options, {
-                    is_top_level: depsInfo.top_level_plugins.indexOf(dangler) > -1,
-                    depsInfo: depsInfo
-                });
-
-                return runUninstallPlatform(actions, platform, project_dir, dependent_path, plugins_dir, opts);
-            })
-        );
-    } else {
-        promise = Q();
-    }
-
-    return promise.then(function() {
-        return handleUninstall(actions, platform, plugin_id, plugin_et, project_dir, options.www_dir, plugins_dir, plugin_dir, options.is_top_level);
-    });
-}
-
-// Returns a promise.
-function handleUninstall(actions, platform, plugin_id, plugin_et, project_dir, www_dir, plugins_dir, plugin_dir, is_top_level) {
-    var platform_modules = require('./platforms');
-    var handler = platform_modules[platform];
-    var platformTag = plugin_et.find('./platform[@name="'+platform+'"]');
-    www_dir = www_dir || handler.www_dir(project_dir);
-    events.emit('log', 'Uninstalling ' + plugin_id + ' from ' + platform);
-
-    var assets = plugin_et.findall('./asset');
-    if (platformTag) {
-        var sourceFiles = platformTag.findall('./source-file'),
-            headerFiles = platformTag.findall('./header-file'),
-            libFiles = platformTag.findall('./lib-file'),
-            resourceFiles = platformTag.findall('./resource-file');
-            frameworkFiles = platformTag.findall('./framework[@custom="true"]');
-        assets = assets.concat(platformTag.findall('./asset'));
-
-        // queue up native stuff
-        sourceFiles && sourceFiles.forEach(function(source) {
-            actions.push(actions.createAction(handler["source-file"].uninstall,
-                                             [source, project_dir, plugin_id],
-                                             handler["source-file"].install,
-                                             [source, plugin_dir, project_dir, plugin_id]));
-        });
-
-        headerFiles && headerFiles.forEach(function(header) {
-            actions.push(actions.createAction(handler["header-file"].uninstall,
-                                             [header, project_dir, plugin_id],
-                                             handler["header-file"].install,
-                                             [header, plugin_dir, project_dir, plugin_id]));
-        });
-
-        resourceFiles && resourceFiles.forEach(function(resource) {
-            actions.push(actions.createAction(handler["resource-file"].uninstall,
-                                              [resource, project_dir, plugin_id],
-                                              handler["resource-file"].install,
-                                              [resource, plugin_dir, project_dir]));
-        });
-
-        // CB-5238 custom frameworks only
-        frameworkFiles && frameworkFiles.forEach(function(framework) {
-            actions.push(actions.createAction(handler["framework"].uninstall,
-                                              [framework, project_dir, plugin_id],
-                                              handler["framework"].install,
-                                              [framework, plugin_dir, project_dir]));
-        });
-
-        libFiles && libFiles.forEach(function(source) {
-            actions.push(actions.createAction(handler["lib-file"].uninstall,
-                                              [source, project_dir, plugin_id],
-                                              handler["lib-file"].install,
-                                              [source, plugin_dir, project_dir, plugin_id]));
-        });
-    }
-
-    // queue up asset installation
-    var common = require('./platforms/common');
-    assets && assets.forEach(function(asset) {
-        actions.push(actions.createAction(common.asset.uninstall, [asset, www_dir, plugin_id], common.asset.install, [asset, plugin_dir, www_dir]));
-    });
-
-    // run through the action stack
-    return actions.process(platform, project_dir)
-    .then(function() {
-        // WIN!
-        events.emit('verbose', plugin_id + ' uninstalled from ' + platform + '.');
-        // queue up the plugin so prepare can remove the config changes
-        config_changes.add_uninstalled_plugin_to_prepare_queue(plugins_dir, plugin_id, platform, is_top_level);
-        // call prepare after a successful uninstall
-        plugman.prepare(project_dir, platform, plugins_dir, www_dir);
-    });
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/unpublish.js
----------------------------------------------------------------------
diff --git a/src/unpublish.js b/src/unpublish.js
deleted file mode 100644
index be1b4b4..0000000
--- a/src/unpublish.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var registry = require('./registry/registry')
-
-module.exports = function(plugin) {
-    return registry.unpublish(plugin);
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/util/action-stack.js
----------------------------------------------------------------------
diff --git a/src/util/action-stack.js b/src/util/action-stack.js
deleted file mode 100644
index dd9dafb..0000000
--- a/src/util/action-stack.js
+++ /dev/null
@@ -1,85 +0,0 @@
-var platforms = require("../platforms"),
-    events = require('../events'),
-    Q = require('q'),
-    fs = require('fs');
-
-function ActionStack() {
-    this.stack = [];
-    this.completed = [];
-}
-
-ActionStack.prototype = {
-    createAction:function(handler, action_params, reverter, revert_params) {
-        return {
-            handler:{
-                run:handler,
-                params:action_params
-            },
-            reverter:{
-                run:reverter,
-                params:revert_params
-            }
-        };
-    },
-    push:function(tx) {
-        this.stack.push(tx);
-    },
-    // Returns a promise.
-    process:function(platform, project_dir) {
-        events.emit('verbose', 'Beginning processing of action stack for ' + platform + ' project...');
-        var project_files;
-
-        // parse platform-specific project files once
-        if (platforms[platform].parseProjectFile) {
-            events.emit('verbose', 'Parsing ' + platform + ' project files...');
-            project_files = platforms[platform].parseProjectFile(project_dir);
-        }
-
-        while(this.stack.length) {
-            var action = this.stack.shift();
-            var handler = action.handler.run;
-            var action_params = action.handler.params;
-            if (project_files) {
-                action_params.push(project_files);
-            }
-
-            try {
-                handler.apply(null, action_params);
-            } catch(e) {
-                events.emit('warn', 'Error during processing of action! Attempting to revert...');
-                var incomplete = this.stack.unshift(action);
-                var issue = 'Uh oh!\n';
-                // revert completed tasks
-                while(this.completed.length) {
-                    var undo = this.completed.shift();
-                    var revert = undo.reverter.run;
-                    var revert_params = undo.reverter.params;
-
-                    if (project_files) {
-                        revert_params.push(project_files);
-                    }
-
-                    try {
-                        revert.apply(null, revert_params);
-                    } catch(err) {
-                        events.emit('warn', 'Error during reversion of action! We probably really messed up your project now, sorry! D:');
-                        issue += 'A reversion action failed: ' + err.message + '\n';
-                    }
-                }
-                e.message = issue + e.message;
-                return Q.reject(e);
-            }
-            this.completed.push(action);
-        }
-        events.emit('verbose', 'Action stack processing complete.');
-
-        if (project_files) {
-            events.emit('verbose', 'Writing out ' + platform + ' project files...');
-            project_files.write();
-        }
-
-        return Q();
-    }
-};
-
-module.exports = ActionStack;


[67/70] Remove all cordova-lib files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserViewController.xib
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserViewController.xib b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserViewController.xib
deleted file mode 100644
index cc8dd65..0000000
--- a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowserViewController.xib
+++ /dev/null
@@ -1,875 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
-	<data>
-		<int key="IBDocument.SystemTarget">768</int>
-		<string key="IBDocument.SystemVersion">10K540</string>
-		<string key="IBDocument.InterfaceBuilderVersion">851</string>
-		<string key="IBDocument.AppKitVersion">1038.36</string>
-		<string key="IBDocument.HIToolboxVersion">461.00</string>
-		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
-			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-			<string key="NS.object.0">141</string>
-		</object>
-		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
-			<bool key="EncodedWithXMLCoder">YES</bool>
-		</object>
-		<object class="NSArray" key="IBDocument.PluginDependencies">
-			<bool key="EncodedWithXMLCoder">YES</bool>
-			<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-		</object>
-		<object class="NSMutableDictionary" key="IBDocument.Metadata">
-			<bool key="EncodedWithXMLCoder">YES</bool>
-			<object class="NSArray" key="dict.sortedKeys" id="0">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-			</object>
-			<object class="NSMutableArray" key="dict.values">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-			</object>
-		</object>
-		<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
-			<bool key="EncodedWithXMLCoder">YES</bool>
-			<object class="IBProxyObject" id="372490531">
-				<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
-				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-			</object>
-			<object class="IBProxyObject" id="975951072">
-				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
-				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-			</object>
-			<object class="IBUIView" id="191373211">
-				<nil key="NSNextResponder"/>
-				<int key="NSvFlags">292</int>
-				<object class="NSMutableArray" key="NSSubviews">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<object class="IBUIWebView" id="345761693">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">-2147483374</int>
-						<string key="NSFrameSize">{480, 229}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<reference key="NSNextKeyView" ref="471899933"/>
-						<object class="NSColor" key="IBUIBackgroundColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MCAwIDAAA</bytes>
-						</object>
-						<bool key="IBUIClipsSubviews">YES</bool>
-						<bool key="IBUIMultipleTouchEnabled">YES</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<int key="IBUIDataDetectorTypes">1</int>
-						<bool key="IBUIDetectsPhoneNumbers">YES</bool>
-					</object>
-					<object class="IBUIToolbar" id="471899933">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">266</int>
-						<string key="NSFrame">{{0, 256}, {480, 44}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<reference key="NSNextKeyView" ref="349240355"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<int key="IBUIBarStyle">1</int>
-						<object class="NSMutableArray" key="IBUIItems">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<object class="IBUIBarButtonItem" id="966737436">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<int key="IBUIStyle">1</int>
-								<reference key="IBUIToolbar" ref="471899933"/>
-								<int key="IBUISystemItemIdentifier">0</int>
-							</object>
-							<object class="IBUIBarButtonItem" id="312951844">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="471899933"/>
-								<int key="IBUISystemItemIdentifier">5</int>
-							</object>
-							<object class="IBUIBarButtonItem" id="615970053">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="471899933"/>
-							</object>
-							<object class="IBUIBarButtonItem" id="111711024">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="471899933"/>
-								<int key="IBUISystemItemIdentifier">5</int>
-							</object>
-							<object class="IBUIBarButtonItem" id="227415391">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<float key="IBUIWidth">32</float>
-								<reference key="IBUIToolbar" ref="471899933"/>
-							</object>
-							<object class="IBUIBarButtonItem" id="766205236">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="471899933"/>
-								<int key="IBUISystemItemIdentifier">5</int>
-							</object>
-							<object class="IBUIBarButtonItem" id="283287216">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<float key="IBUIWidth">32</float>
-								<reference key="IBUIToolbar" ref="471899933"/>
-							</object>
-							<object class="IBUIBarButtonItem" id="129413107">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="471899933"/>
-								<int key="IBUISystemItemIdentifier">5</int>
-							</object>
-							<object class="IBUIBarButtonItem" id="1046195837">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<float key="IBUIWidth">32</float>
-								<reference key="IBUIToolbar" ref="471899933"/>
-							</object>
-							<object class="IBUIBarButtonItem" id="667527307">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="471899933"/>
-								<int key="IBUISystemItemIdentifier">5</int>
-							</object>
-						</object>
-					</object>
-					<object class="IBUILabel" id="349240355">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">270</int>
-						<string key="NSFrame">{{5, 230}, {418, 21}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<reference key="NSNextKeyView" ref="89602979"/>
-						<object class="NSColor" key="IBUIBackgroundColor">
-							<int key="NSColorSpace">4</int>
-							<bytes key="NSWhite">MC42NjY2NjY2OSAwAA</bytes>
-						</object>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClipsSubviews">YES</bool>
-						<bool key="IBUIUserInteractionEnabled">NO</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<string key="IBUIText">Loading...</string>
-						<object class="NSFont" key="IBUIFont">
-							<string key="NSName">Helvetica</string>
-							<double key="NSSize">13</double>
-							<int key="NSfFlags">16</int>
-						</object>
-						<object class="NSColor" key="IBUITextColor">
-							<int key="NSColorSpace">3</int>
-							<bytes key="NSWhite">MQA</bytes>
-						</object>
-						<nil key="IBUIHighlightedColor"/>
-						<int key="IBUIBaselineAdjustment">1</int>
-						<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
-						<float key="IBUIMinimumFontSize">10</float>
-					</object>
-					<object class="IBUIActivityIndicatorView" id="89602979">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">-2147483383</int>
-						<string key="NSFrame">{{454, 231}, {20, 20}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<bool key="IBUIUserInteractionEnabled">NO</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-					</object>
-				</object>
-				<string key="NSFrame">{{0, 20}, {480, 300}}</string>
-				<reference key="NSNextKeyView" ref="345761693"/>
-				<object class="NSColor" key="IBUIBackgroundColor">
-					<int key="NSColorSpace">3</int>
-					<bytes key="NSWhite">MC41AA</bytes>
-					<object class="NSColorSpace" key="NSCustomColorSpace">
-						<int key="NSID">2</int>
-					</object>
-				</object>
-				<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
-				<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
-					<int key="interfaceOrientation">3</int>
-				</object>
-				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-			</object>
-		</object>
-		<object class="IBObjectContainer" key="IBDocument.Objects">
-			<object class="NSMutableArray" key="connectionRecords">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">webView</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="345761693"/>
-					</object>
-					<int key="connectionID">17</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">addressLabel</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="349240355"/>
-					</object>
-					<int key="connectionID">18</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">backBtn</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="227415391"/>
-					</object>
-					<int key="connectionID">19</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">fwdBtn</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="283287216"/>
-					</object>
-					<int key="connectionID">22</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">refreshBtn</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="615970053"/>
-					</object>
-					<int key="connectionID">23</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">onDoneButtonPress:</string>
-						<reference key="source" ref="966737436"/>
-						<reference key="destination" ref="372490531"/>
-					</object>
-					<int key="connectionID">26</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">reload</string>
-						<reference key="source" ref="615970053"/>
-						<reference key="destination" ref="345761693"/>
-					</object>
-					<int key="connectionID">27</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">goBack</string>
-						<reference key="source" ref="227415391"/>
-						<reference key="destination" ref="345761693"/>
-					</object>
-					<int key="connectionID">28</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">goForward</string>
-						<reference key="source" ref="283287216"/>
-						<reference key="destination" ref="345761693"/>
-					</object>
-					<int key="connectionID">29</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">onSafariButtonPress:</string>
-						<reference key="source" ref="1046195837"/>
-						<reference key="destination" ref="372490531"/>
-					</object>
-					<int key="connectionID">31</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">view</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="191373211"/>
-					</object>
-					<int key="connectionID">35</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">spinner</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="89602979"/>
-					</object>
-					<int key="connectionID">36</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">safariBtn</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="1046195837"/>
-					</object>
-					<int key="connectionID">40</int>
-				</object>
-			</object>
-			<object class="IBMutableOrderedSet" key="objectRecords">
-				<object class="NSArray" key="orderedObjects">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<object class="IBObjectRecord">
-						<int key="objectID">0</int>
-						<reference key="object" ref="0"/>
-						<reference key="children" ref="1000"/>
-						<nil key="parent"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">1</int>
-						<reference key="object" ref="191373211"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="471899933"/>
-							<reference ref="349240355"/>
-							<reference ref="89602979"/>
-							<reference ref="345761693"/>
-						</object>
-						<reference key="parent" ref="0"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">-1</int>
-						<reference key="object" ref="372490531"/>
-						<reference key="parent" ref="0"/>
-						<string key="objectName">File's Owner</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">-2</int>
-						<reference key="object" ref="975951072"/>
-						<reference key="parent" ref="0"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">4</int>
-						<reference key="object" ref="345761693"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">6</int>
-						<reference key="object" ref="471899933"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="966737436"/>
-							<reference ref="615970053"/>
-							<reference ref="227415391"/>
-							<reference ref="283287216"/>
-							<reference ref="1046195837"/>
-							<reference ref="111711024"/>
-							<reference ref="129413107"/>
-							<reference ref="312951844"/>
-							<reference ref="667527307"/>
-							<reference ref="766205236"/>
-						</object>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">7</int>
-						<reference key="object" ref="966737436"/>
-						<reference key="parent" ref="471899933"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">8</int>
-						<reference key="object" ref="615970053"/>
-						<reference key="parent" ref="471899933"/>
-						<string key="objectName">Bar Button Item (Reload)</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">9</int>
-						<reference key="object" ref="227415391"/>
-						<reference key="parent" ref="471899933"/>
-						<string key="objectName">Bar Button Item (Go Back)</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">10</int>
-						<reference key="object" ref="283287216"/>
-						<reference key="parent" ref="471899933"/>
-						<string key="objectName">Bar Button Item (Go Forward)</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">11</int>
-						<reference key="object" ref="1046195837"/>
-						<reference key="parent" ref="471899933"/>
-						<string key="objectName">Bar Button Item (Safari)</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">13</int>
-						<reference key="object" ref="349240355"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">14</int>
-						<reference key="object" ref="111711024"/>
-						<reference key="parent" ref="471899933"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">15</int>
-						<reference key="object" ref="129413107"/>
-						<reference key="parent" ref="471899933"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">32</int>
-						<reference key="object" ref="89602979"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">37</int>
-						<reference key="object" ref="312951844"/>
-						<reference key="parent" ref="471899933"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">38</int>
-						<reference key="object" ref="667527307"/>
-						<reference key="parent" ref="471899933"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">39</int>
-						<reference key="object" ref="766205236"/>
-						<reference key="parent" ref="471899933"/>
-					</object>
-				</object>
-			</object>
-			<object class="NSMutableDictionary" key="flattenedProperties">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="NSArray" key="dict.sortedKeys">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<string>-1.CustomClassName</string>
-					<string>-2.CustomClassName</string>
-					<string>1.IBEditorWindowLastContentRect</string>
-					<string>1.IBPluginDependency</string>
-					<string>10.IBPluginDependency</string>
-					<string>11.IBPluginDependency</string>
-					<string>13.IBPluginDependency</string>
-					<string>13.IBViewBoundsToFrameTransform</string>
-					<string>14.IBPluginDependency</string>
-					<string>15.IBPluginDependency</string>
-					<string>32.IBPluginDependency</string>
-					<string>32.IBViewBoundsToFrameTransform</string>
-					<string>37.IBPluginDependency</string>
-					<string>38.IBPluginDependency</string>
-					<string>39.IBPluginDependency</string>
-					<string>4.IBPluginDependency</string>
-					<string>4.IBViewBoundsToFrameTransform</string>
-					<string>6.IBPluginDependency</string>
-					<string>6.IBViewBoundsToFrameTransform</string>
-					<string>7.IBPluginDependency</string>
-					<string>8.IBPluginDependency</string>
-					<string>9.IBPluginDependency</string>
-				</object>
-				<object class="NSMutableArray" key="dict.values">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<string>ChildBrowserViewController</string>
-					<string>UIResponder</string>
-					<string>{{250, 643}, {480, 320}}</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<object class="NSAffineTransform">
-						<bytes key="NSTransformStruct">P4AAAL+AAABCoAAAwygAAA</bytes>
-					</object>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<object class="NSAffineTransform">
-						<bytes key="NSTransformStruct">P4AAAL+AAABD5gAAw3kAAA</bytes>
-					</object>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<object class="NSAffineTransform">
-						<bytes key="NSTransformStruct">P4AAAL+AAABB8AAAwwUAAA</bytes>
-					</object>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<object class="NSAffineTransform">
-						<bytes key="NSTransformStruct">P4AAAL+AAAAAAAAAw10AAA</bytes>
-					</object>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-				</object>
-			</object>
-			<object class="NSMutableDictionary" key="unlocalizedProperties">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<reference key="dict.sortedKeys" ref="0"/>
-				<object class="NSMutableArray" key="dict.values">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-				</object>
-			</object>
-			<nil key="activeLocalization"/>
-			<object class="NSMutableDictionary" key="localizations">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<reference key="dict.sortedKeys" ref="0"/>
-				<object class="NSMutableArray" key="dict.values">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-				</object>
-			</object>
-			<nil key="sourceID"/>
-			<int key="maxID">40</int>
-		</object>
-		<object class="IBClassDescriber" key="IBDocument.Classes">
-			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="IBPartialClassDescription">
-					<string key="className">ChildBrowserViewController</string>
-					<string key="superclassName">UIViewController</string>
-					<object class="NSMutableDictionary" key="actions">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>onDoneButtonPress:</string>
-							<string>onSafariButtonPress:</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>id</string>
-							<string>id</string>
-						</object>
-					</object>
-					<object class="NSMutableDictionary" key="actionInfosByName">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>onDoneButtonPress:</string>
-							<string>onSafariButtonPress:</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<object class="IBActionInfo">
-								<string key="name">onDoneButtonPress:</string>
-								<string key="candidateClassName">id</string>
-							</object>
-							<object class="IBActionInfo">
-								<string key="name">onSafariButtonPress:</string>
-								<string key="candidateClassName">id</string>
-							</object>
-						</object>
-					</object>
-					<object class="NSMutableDictionary" key="outlets">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>addressLabel</string>
-							<string>backBtn</string>
-							<string>closeBtn</string>
-							<string>delegate</string>
-							<string>fwdBtn</string>
-							<string>refreshBtn</string>
-							<string>safariBtn</string>
-							<string>spinner</string>
-							<string>webView</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>UILabel</string>
-							<string>UIBarButtonItem</string>
-							<string>UIBarButtonItem</string>
-							<string>id</string>
-							<string>UIBarButtonItem</string>
-							<string>UIBarButtonItem</string>
-							<string>UIBarButtonItem</string>
-							<string>UIActivityIndicatorView</string>
-							<string>UIWebView</string>
-						</object>
-					</object>
-					<object class="NSMutableDictionary" key="toOneOutletInfosByName">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>addressLabel</string>
-							<string>backBtn</string>
-							<string>closeBtn</string>
-							<string>delegate</string>
-							<string>fwdBtn</string>
-							<string>refreshBtn</string>
-							<string>safariBtn</string>
-							<string>spinner</string>
-							<string>webView</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<object class="IBToOneOutletInfo">
-								<string key="name">addressLabel</string>
-								<string key="candidateClassName">UILabel</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">backBtn</string>
-								<string key="candidateClassName">UIBarButtonItem</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">closeBtn</string>
-								<string key="candidateClassName">UIBarButtonItem</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">delegate</string>
-								<string key="candidateClassName">id</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">fwdBtn</string>
-								<string key="candidateClassName">UIBarButtonItem</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">refreshBtn</string>
-								<string key="candidateClassName">UIBarButtonItem</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">safariBtn</string>
-								<string key="candidateClassName">UIBarButtonItem</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">spinner</string>
-								<string key="candidateClassName">UIActivityIndicatorView</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">webView</string>
-								<string key="candidateClassName">UIWebView</string>
-							</object>
-						</object>
-					</object>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">Plugins/ChildBrowser/ChildBrowserViewController.h</string>
-					</object>
-				</object>
-			</object>
-			<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSError.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">QuartzCore.framework/Headers/CAAnimation.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">QuartzCore.framework/Headers/CALayer.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier" id="485348283">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIActivityIndicatorView</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIActivityIndicatorView.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIBarButtonItem</string>
-					<string key="superclassName">UIBarItem</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIBarButtonItem.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIBarItem</string>
-					<string key="superclassName">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIBarItem.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UILabel</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UILabel.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIResponder</string>
-					<string key="superclassName">NSObject</string>
-					<reference key="sourceIdentifier" ref="485348283"/>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UISearchBar</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UISearchDisplayController</string>
-					<string key="superclassName">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIToolbar</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIToolbar.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIView</string>
-					<string key="superclassName">UIResponder</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIViewController</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">MediaPlayer.framework/Headers/MPMoviePlayerViewController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIViewController</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIViewController</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIViewController</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIViewController</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIViewController</string>
-					<string key="superclassName">UIResponder</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIWebView</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIWebView.h</string>
-					</object>
-				</object>
-			</object>
-		</object>
-		<int key="IBDocument.localizationMode">0</int>
-		<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
-		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
-			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
-			<integer value="768" key="NS.object.0"/>
-		</object>
-		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
-			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
-			<integer value="1056" key="NS.object.0"/>
-		</object>
-		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
-			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
-			<integer value="3000" key="NS.object.0"/>
-		</object>
-		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
-		<nil key="IBDocument.LastKnownRelativeProjectPath"/>
-		<int key="IBDocument.defaultPropertyAccessControl">3</int>
-		<string key="IBCocoaTouchPluginVersion">141</string>
-	</data>
-</archive>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/TargetDirTest.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/TargetDirTest.h b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/TargetDirTest.h
deleted file mode 100644
index 60a1403..0000000
--- a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/TargetDirTest.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-
- 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/TargetDirTest.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/TargetDirTest.m b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/TargetDirTest.m
deleted file mode 100644
index 8d1c8b6..0000000
--- a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/TargetDirTest.m
+++ /dev/null
@@ -1 +0,0 @@
- 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/preserveDirs/PreserveDirsTest.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/preserveDirs/PreserveDirsTest.h b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/preserveDirs/PreserveDirsTest.h
deleted file mode 100644
index 60a1403..0000000
--- a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/preserveDirs/PreserveDirsTest.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-
- 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/preserveDirs/PreserveDirsTest.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/preserveDirs/PreserveDirsTest.m b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/preserveDirs/PreserveDirsTest.m
deleted file mode 100644
index 8d1c8b6..0000000
--- a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/preserveDirs/PreserveDirsTest.m
+++ /dev/null
@@ -1 +0,0 @@
- 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/ChildBrowser/www/childbrowser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/www/childbrowser.js b/cordova-lib/spec-plugman/plugins/ChildBrowser/www/childbrowser.js
deleted file mode 100644
index 5263b0c..0000000
--- a/cordova-lib/spec-plugman/plugins/ChildBrowser/www/childbrowser.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/ChildBrowser/www/childbrowser/image.jpg
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/www/childbrowser/image.jpg b/cordova-lib/spec-plugman/plugins/ChildBrowser/www/childbrowser/image.jpg
deleted file mode 100644
index 257cc56..0000000
--- a/cordova-lib/spec-plugman/plugins/ChildBrowser/www/childbrowser/image.jpg
+++ /dev/null
@@ -1 +0,0 @@
-foo

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/ChildBrowser/www/childbrowser_file.html
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/www/childbrowser_file.html b/cordova-lib/spec-plugman/plugins/ChildBrowser/www/childbrowser_file.html
deleted file mode 100644
index 6de7b8c..0000000
--- a/cordova-lib/spec-plugman/plugins/ChildBrowser/www/childbrowser_file.html
+++ /dev/null
@@ -1 +0,0 @@
-This is a test file.

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/ConfigTestPlugin/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ConfigTestPlugin/plugin.xml b/cordova-lib/spec-plugman/plugins/ConfigTestPlugin/plugin.xml
deleted file mode 100644
index 54b4895..0000000
--- a/cordova-lib/spec-plugman/plugins/ConfigTestPlugin/plugin.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="com.phonegap.configtest"
-    version="3.0.0">
-
-    <name>Does Code Fil Write Even Work? Hopefully the Tests Will Tell Us</name>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="/widget">
-            <poop/>
-        </config-file>
-        <config-file target="res/xml/config.xml" parent="/widget">
-            <poop/>
-        </config-file>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/plugin.xml b/cordova-lib/spec-plugman/plugins/Contacts/plugin.xml
deleted file mode 100644
index 7328f1a..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/plugin.xml
+++ /dev/null
@@ -1,143 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-           id="org.apache.cordova.core.contacts"
-      version="0.1.0">
-    <name>Contacts</name>
-
-
-    <js-module src="www/contacts.js" name="contacts">
-        <clobbers target="navigator.contacts" />
-    </js-module>
-
-    <js-module src="www/Contact.js" name="Contact">
-        <clobbers target="Contact" />
-    </js-module>
-
-    <js-module src="www/ContactAddress.js" name="ContactAddress">
-        <clobbers target="ContactAddress" />
-    </js-module>
-
-    <js-module src="www/ContactError.js" name="ContactError">
-        <clobbers target="ContactError" />
-    </js-module>
-
-    <js-module src="www/ContactField.js" name="ContactField">
-        <clobbers target="ContactField" />
-    </js-module>
-
-    <js-module src="www/ContactFindOptions.js" name="ContactFindOptions">
-        <clobbers target="ContactFindOptions" />
-    </js-module>
-
-    <js-module src="www/ContactName.js" name="ContactName">
-        <clobbers target="ContactName" />
-    </js-module>
-
-    <js-module src="www/ContactOrganization.js" name="ContactOrganization">
-        <clobbers target="ContactOrganization" />
-    </js-module>
-
-
-
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="/*">
-            <feature name="Contacts">
-                <param name="android-package" value="org.apache.cordova.core.ContactManager"/>
-            </feature>
-        </config-file>
-
-        <config-file target="AndroidManifest.xml" parent="/*">
-            <uses-permission android:name="android.permission.READ_CONTACTS" />
-            <uses-permission android:name="android.permission.WRITE_CONTACTS" />
-            <uses-permission android:name="android.permission.GET_ACCOUNTS" />
-        </config-file>
-
-        <source-file src="src/android/ContactAccessor.java" target-dir="src/org/apache/cordova/core" />
-        <source-file src="src/android/ContactAccessorSdk5.java" target-dir="src/org/apache/cordova/core" />
-        <source-file src="src/android/ContactManager.java" target-dir="src/org/apache/cordova/core" />
-    </platform>
-
-    <!-- ios -->
-    <platform name="ios">
-        <config-file target="config.xml" parent="/*">
-            <feature name="Contacts">
-                <param name="ios-package" value="CDVContacts"/>
-            </feature>
-        </config-file>
-
-        <js-module src="www/ios/contacts.js" name="contacts">
-            <merges target="navigator.contacts" />
-        </js-module>
-
-        <js-module src="www/ios/Contact.js" name="Contact">
-            <merges target="Contact" />
-        </js-module>
-
-        <header-file src="src/ios/CDVContacts.h" />
-        <source-file src="src/ios/CDVContacts.m" />
-        <header-file src="src/ios/CDVContact.h" />
-        <source-file src="src/ios/CDVContact.m" />
-    </platform>
-
-    <!-- blackberry10 -->
-    <platform name="blackberry10">
-        <config-file target="www/config.xml" parent="/widget">
-            <feature name="Contacts" value="Contacts"/>
-        </config-file>
-        <config-file target="www/config.xml" parent="/widget">
-            <rim:permissions>
-            </rim:permissions>
-        </config-file>
-        <config-file target="www/config.xml" parent="/widget/rim:permissions">
-            <rim:permit>access_pimdomain_contacts</rim:permit>
-        </config-file>
-        <source-file src="src/blackberry10/index.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactActivity.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactAddress.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/contactConsts.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactError.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactField.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactFindOptions.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactName.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactNews.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactOrganization.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactPhoto.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/contactUtils.js" target-dir="Contacts"></source-file>
-        <dependency id="com.blackberry.utils" url="https://github.com/blackberry/cordova-blackberry-plugins.git" commit="plugins" subdir="plugin/com.blackberry.utils"/>
-        <dependency id="org.apache.cordova.blackberry10.pimlib" url="https://github.com/blackberry/cordova-blackberry-plugins.git" commit="plugins" subdir="/plugin/org.apache.cordova.blackberry10.pimlib/"/>
-    </platform>
-
-    <!-- wp7 -->
-    <platform name="wp7">
-        <config-file target="config.xml" parent="/*">
-            <feature name="Contacts">
-                <param name="wp-package" value="Contacts"/>
-            </feature>
-        </config-file>
-
-        <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Capabilities">
-            <Capability Name="ID_CAP_CONTACTS" />
-        </config-file>
-
-        <source-file src="src/wp/Contacts.cs" />
-    </platform>
-
-    <!-- wp8 -->
-    <platform name="wp8">
-        <config-file target="config.xml" parent="/*">
-            <feature name="Contacts">
-                <param name="wp-package" value="Contacts"/>
-            </feature>
-        </config-file>
-
-        <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Capabilities">
-            <Capability Name="ID_CAP_CONTACTS" />
-        </config-file>
-
-        <source-file src="src/wp/Contacts.cs" />
-    </platform>
-
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/src/android/ContactAccessor.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/android/ContactAccessor.java b/cordova-lib/spec-plugman/plugins/Contacts/src/android/ContactAccessor.java
deleted file mode 100644
index 24ef9c6..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/src/android/ContactAccessor.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed 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.
- */
-
-package org.apache.cordova.core;
-
-import java.util.HashMap;
-
-import android.util.Log;
-import android.webkit.WebView;
-
-import org.apache.cordova.CordovaInterface;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-/**
- * This abstract class defines SDK-independent API for communication with
- * Contacts Provider. The actual implementation used by the application depends
- * on the level of API available on the device. If the API level is Cupcake or
- * Donut, we want to use the {@link ContactAccessorSdk3_4} class. If it is
- * Eclair or higher, we want to use {@link ContactAccessorSdk5}.
- */
-public abstract class ContactAccessor {
-
-    protected final String LOG_TAG = "ContactsAccessor";
-    protected CordovaInterface mApp;
-    protected WebView mView;
-
-    /**
-     * Check to see if the data associated with the key is required to
-     * be populated in the Contact object.
-     * @param key
-     * @param map created by running buildPopulationSet.
-     * @return true if the key data is required
-     */
-    protected boolean isRequired(String key, HashMap<String,Boolean> map) {
-        Boolean retVal = map.get(key);
-        return (retVal == null) ? false : retVal.booleanValue();
-    }
-
-    /**
-     * Create a hash map of what data needs to be populated in the Contact object
-     * @param fields the list of fields to populate
-     * @return the hash map of required data
-     */
-    protected HashMap<String,Boolean> buildPopulationSet(JSONArray fields) {
-        HashMap<String,Boolean> map = new HashMap<String,Boolean>();
-
-        String key;
-        try {
-            if (fields.length() == 1 && fields.getString(0).equals("*")) {
-                map.put("displayName", true);
-                map.put("name", true);
-                map.put("nickname", true);
-                map.put("phoneNumbers", true);
-                map.put("emails", true);
-                map.put("addresses", true);
-                map.put("ims", true);
-                map.put("organizations", true);
-                map.put("birthday", true);
-                map.put("note", true);
-                map.put("urls", true);
-                map.put("photos", true);
-                map.put("categories", true);
-           } 
-            else {
-                for (int i=0; i<fields.length(); i++) {
-                    key = fields.getString(i);
-                    if (key.startsWith("displayName")) {
-                        map.put("displayName", true);
-                    }
-                    else if (key.startsWith("name")) {
-                        map.put("displayName", true);
-                        map.put("name", true);
-                    }
-                    else if (key.startsWith("nickname")) {
-                        map.put("nickname", true);
-                    }
-                    else if (key.startsWith("phoneNumbers")) {
-                        map.put("phoneNumbers", true);
-                    }
-                    else if (key.startsWith("emails")) {
-                        map.put("emails", true);
-                    }
-                    else if (key.startsWith("addresses")) {
-                        map.put("addresses", true);
-                    }
-                    else if (key.startsWith("ims")) {
-                        map.put("ims", true);
-                    }
-                    else if (key.startsWith("organizations")) {
-                        map.put("organizations", true);
-                    }
-                    else if (key.startsWith("birthday")) {
-                        map.put("birthday", true);
-                    }
-                    else if (key.startsWith("note")) {
-                        map.put("note", true);
-                    }
-                    else if (key.startsWith("urls")) {
-                        map.put("urls", true);
-                    }
-                    else if (key.startsWith("photos")) {
-                        map.put("photos", true);
-                    }
-                    else if (key.startsWith("categories")) {
-                        map.put("categories", true);
-                    }
-                }
-            }
-       }
-        catch (JSONException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        }
-        return map;
-    }
-
-    /**
-     * Convenience method to get a string from a JSON object.  Saves a
-     * lot of try/catch writing.
-     * If the property is not found in the object null will be returned.
-     *
-     * @param obj contact object to search
-     * @param property to be looked up
-     * @return The value of the property
-     */
-    protected String getJsonString(JSONObject obj, String property) {
-        String value = null;
-        try {
-            if (obj != null) {
-                value = obj.getString(property);
-                if (value.equals("null")) {
-                    Log.d(LOG_TAG, property + " is string called 'null'");
-                    value = null;
-                }
-            }
-       }
-        catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get = " + e.getMessage());
-        }
-        return value;
-    }
-
-    /**
-     * Handles adding a JSON Contact object into the database.
-     * @return TODO
-     */
-    public abstract String save(JSONObject contact);
-
-    /**
-     * Handles searching through SDK-specific contacts API.
-     */
-    public abstract JSONArray search(JSONArray filter, JSONObject options);
-
-    /**
-     * Handles searching through SDK-specific contacts API.
-     * @throws JSONException
-     */
-    public abstract JSONObject getContactById(String id) throws JSONException;
-
-    /**
-     * Handles removing a contact from the database.
-     */
-    public abstract boolean remove(String id);
-
-   /**
-     * A class that represents the where clause to be used in the database query 
-     */
-    class WhereOptions {
-        private String where;
-        private String[] whereArgs;
-        public void setWhere(String where) {
-            this.where = where;
-        }
-        public String getWhere() {
-            return where;
-        }
-        public void setWhereArgs(String[] whereArgs) {
-            this.whereArgs = whereArgs;
-        }
-        public String[] getWhereArgs() {
-            return whereArgs;
-        }
-    }
-}


[69/70] git commit: Remove all cordova-lib files

Posted by ka...@apache.org.
Remove all cordova-lib files


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

Branch: refs/heads/cordova-lib
Commit: eefdf68e0d19e8fa5edde325266dfe168d0702a2
Parents: 0318d8c
Author: Mark Koudritsky <ka...@gmail.com>
Authored: Wed Apr 30 18:12:00 2014 -0400
Committer: Mark Koudritsky <ka...@gmail.com>
Committed: Wed Apr 30 18:12:00 2014 -0400

----------------------------------------------------------------------
 cordova-lib/spec-plugman/add_platform.spec.js   |   64 -
 cordova-lib/spec-plugman/adduser.spec.js        |   11 -
 cordova-lib/spec-plugman/common.js              |   62 -
 cordova-lib/spec-plugman/config.spec.js         |   12 -
 cordova-lib/spec-plugman/create.spec.js         |   62 -
 cordova-lib/spec-plugman/fetch.spec.js          |  211 -
 cordova-lib/spec-plugman/info.spec.js           |   15 -
 cordova-lib/spec-plugman/install.spec.js        |  472 -
 cordova-lib/spec-plugman/owner.spec.js          |   12 -
 cordova-lib/spec-plugman/platform.spec.js       |   26 -
 .../platforms/amazon-fireos.spec.js             |  139 -
 .../spec-plugman/platforms/android.spec.js      |  156 -
 .../spec-plugman/platforms/blackberry10.spec.js |  148 -
 .../spec-plugman/platforms/common.spec.js       |  130 -
 cordova-lib/spec-plugman/platforms/ios.spec.js  |  390 -
 .../spec-plugman/platforms/tizen.spec.js        |   54 -
 .../spec-plugman/platforms/windows8.spec.js     |  135 -
 cordova-lib/spec-plugman/platforms/wp7.spec.js  |  129 -
 cordova-lib/spec-plugman/platforms/wp8.spec.js  |  150 -
 cordova-lib/spec-plugman/plugins/.gitkeep       |    0
 .../spec-plugman/plugins/AndroidJS/plugin.xml   |   34 -
 .../plugins/AndroidJS/www/android.js            |    1 -
 .../plugins/ChildBrowser/plugin.xml             |  143 -
 .../ChildBrowser/src/android/ChildBrowser.java  |   19 -
 .../src/ios/ChildBrowser.bundle/arrow_left.png  |  Bin 2946 -> 0 bytes
 .../ios/ChildBrowser.bundle/arrow_left@2x.png   |  Bin 2946 -> 0 bytes
 .../src/ios/ChildBrowser.bundle/arrow_right.png |  Bin 2946 -> 0 bytes
 .../ios/ChildBrowser.bundle/arrow_right@2x.png  |  Bin 2946 -> 0 bytes
 .../src/ios/ChildBrowser.bundle/but_refresh.png |  Bin 3369 -> 0 bytes
 .../ios/ChildBrowser.bundle/but_refresh@2x.png  |  Bin 3369 -> 0 bytes
 .../src/ios/ChildBrowser.bundle/compass.png     |  Bin 3035 -> 0 bytes
 .../src/ios/ChildBrowser.bundle/compass@2x.png  |  Bin 3035 -> 0 bytes
 .../ChildBrowser/src/ios/ChildBrowserCommand.h  |   49 -
 .../ChildBrowser/src/ios/ChildBrowserCommand.m  |   86 -
 .../src/ios/ChildBrowserViewController.h        |   73 -
 .../src/ios/ChildBrowserViewController.m        |  239 -
 .../src/ios/ChildBrowserViewController.xib      |  875 --
 .../ChildBrowser/src/ios/TargetDirTest.h        |   20 -
 .../ChildBrowser/src/ios/TargetDirTest.m        |    1 -
 .../src/ios/preserveDirs/PreserveDirsTest.h     |   20 -
 .../src/ios/preserveDirs/PreserveDirsTest.m     |    1 -
 .../plugins/ChildBrowser/www/childbrowser.js    |   19 -
 .../ChildBrowser/www/childbrowser/image.jpg     |    1 -
 .../ChildBrowser/www/childbrowser_file.html     |    1 -
 .../plugins/ConfigTestPlugin/plugin.xml         |   37 -
 .../spec-plugman/plugins/Contacts/plugin.xml    |  143 -
 .../Contacts/src/android/ContactAccessor.java   |  198 -
 .../src/android/ContactAccessorSdk5.java        | 2183 -----
 .../Contacts/src/android/ContactManager.java    |  122 -
 .../src/blackberry10/ContactActivity.js         |   26 -
 .../Contacts/src/blackberry10/ContactAddress.js |   30 -
 .../Contacts/src/blackberry10/ContactError.js   |   30 -
 .../Contacts/src/blackberry10/ContactField.js   |   27 -
 .../src/blackberry10/ContactFindOptions.js      |   50 -
 .../Contacts/src/blackberry10/ContactName.js    |   39 -
 .../Contacts/src/blackberry10/ContactNews.js    |   26 -
 .../src/blackberry10/ContactOrganization.js     |   22 -
 .../Contacts/src/blackberry10/ContactPhoto.js   |   23 -
 .../Contacts/src/blackberry10/contactConsts.js  |  225 -
 .../Contacts/src/blackberry10/contactUtils.js   |  223 -
 .../plugins/Contacts/src/blackberry10/index.js  |  374 -
 .../Contacts/src/blackberry10/plugin.xml        |   41 -
 .../plugins/Contacts/src/ios/CDVContact.h       |  136 -
 .../plugins/Contacts/src/ios/CDVContact.m       | 1752 ----
 .../plugins/Contacts/src/ios/CDVContacts.h      |  151 -
 .../plugins/Contacts/src/ios/CDVContacts.m      |  593 --
 .../plugins/Contacts/src/wp/Contacts.cs         |  664 --
 .../plugins/Contacts/www/Contact.js             |  177 -
 .../plugins/Contacts/www/ContactAddress.js      |   46 -
 .../plugins/Contacts/www/ContactError.js        |   42 -
 .../plugins/Contacts/www/ContactField.js        |   37 -
 .../plugins/Contacts/www/ContactFindOptions.js  |   34 -
 .../plugins/Contacts/www/ContactName.js         |   41 -
 .../plugins/Contacts/www/ContactOrganization.js |   44 -
 .../plugins/Contacts/www/contacts.js            |   76 -
 .../plugins/Contacts/www/ios/Contact.js         |   51 -
 .../plugins/Contacts/www/ios/contacts.js        |   62 -
 .../plugins/DummyPlugin/android-resource.xml    |    1 -
 .../spec-plugman/plugins/DummyPlugin/plugin.xml |  203 -
 .../DummyPlugin/src/android/DummyPlugin.java    |   19 -
 .../plugins/DummyPlugin/src/android/TestLib.jar |    0
 .../DummyPlugin/src/blackberry10/index.js       |   19 -
 .../src/ios/Custom.framework/someFheader.h      |    0
 .../src/ios/Custom.framework/somebinlib         |    0
 .../DummyPlugin/src/ios/DummyPlugin.bundle      |    0
 .../DummyPlugin/src/ios/DummyPluginCommand.h    |    0
 .../DummyPlugin/src/ios/DummyPluginCommand.m    |    0
 .../DummyPlugin/src/ios/SourceWithFramework.m   |    0
 .../plugins/DummyPlugin/src/ios/TargetDirTest.h |    0
 .../plugins/DummyPlugin/src/ios/TargetDirTest.m |    0
 .../DummyPlugin/src/ios/libsqlite3.dylib        |    0
 .../plugins/DummyPlugin/src/tizen/dummer.js     |    0
 .../plugins/DummyPlugin/src/windows8/dummer.js  |    0
 .../plugins/DummyPlugin/src/wp7/DummyPlugin.cs  |   19 -
 .../plugins/DummyPlugin/src/wp8/DummyPlugin.cs  |   19 -
 .../plugins/DummyPlugin/www/dummyplugin.js      |   19 -
 .../DummyPlugin/www/dummyplugin/image.jpg       |    1 -
 .../plugins/EnginePlugin/megaBoringVersion      |   23 -
 .../plugins/EnginePlugin/megaFunVersion         |   23 -
 .../plugins/EnginePlugin/plugin.xml             |   33 -
 .../plugins/EnginePluginAndroid/plugin.xml      |   32 -
 .../plugins/EnginePluginiOS/plugin.xml          |   34 -
 .../plugins/FaultyPlugin/plugin.xml             |  161 -
 .../FaultyPlugin/src/android/FaultyPlugin.java  |   19 -
 .../FaultyPlugin/src/blackberry10/client.js     |    0
 .../plugins/FaultyPlugin/src/ios/FaultyPlugin.h |   49 -
 .../plugins/FaultyPlugin/src/ios/FaultyPlugin.m |   86 -
 .../FaultyPlugin/src/windows8/faultyPlugin.js   |    0
 .../FaultyPlugin/src/wp7/FaultyPlugin.cs        |   19 -
 .../FaultyPlugin/src/wp8/FaultyPlugin.cs        |   19 -
 .../plugins/PluginsPlistOnly/plugin.xml         |   31 -
 .../plugins/VariablePlugin/plugin.xml           |   59 -
 .../plugins/WebNotifications/plugin.xml         |   47 -
 .../WebNotifications/src/ios/AppDelegate.m.diff |   18 -
 .../WebNotifications/src/ios/WebNotifications.h |   35 -
 .../WebNotifications/src/ios/WebNotifications.m |  124 -
 .../WebNotifications/www/webnotifications.js    |  123 -
 .../plugins/WeblessPlugin/plugin.xml            |   83 -
 .../src/android/WeblessPlugin.java              |   19 -
 .../src/ios/WeblessPlugin.bundle/arrow_left.png |  Bin 2946 -> 0 bytes
 .../ios/WeblessPlugin.bundle/arrow_left@2x.png  |  Bin 2946 -> 0 bytes
 .../ios/WeblessPlugin.bundle/arrow_right.png    |  Bin 2946 -> 0 bytes
 .../ios/WeblessPlugin.bundle/arrow_right@2x.png |  Bin 2946 -> 0 bytes
 .../ios/WeblessPlugin.bundle/but_refresh.png    |  Bin 3369 -> 0 bytes
 .../ios/WeblessPlugin.bundle/but_refresh@2x.png |  Bin 3369 -> 0 bytes
 .../src/ios/WeblessPlugin.bundle/compass.png    |  Bin 3035 -> 0 bytes
 .../src/ios/WeblessPlugin.bundle/compass@2x.png |  Bin 3035 -> 0 bytes
 .../src/ios/WeblessPluginCommand.h              |   49 -
 .../src/ios/WeblessPluginCommand.m              |   86 -
 .../src/ios/WeblessPluginViewController.h       |   73 -
 .../src/ios/WeblessPluginViewController.m       |  239 -
 .../src/ios/WeblessPluginViewController.xib     |  875 --
 .../plugins/cordova.echo/.gitignore             |    1 -
 .../plugins/cordova.echo/plugin.xml             |   24 -
 .../cordova.echo/src/blackberry10/index.js      |   85 -
 .../src/blackberry10/native/device/echoJnext.so |  Bin 1291818 -> 0 bytes
 .../blackberry10/native/public/json/autolink.h  |   19 -
 .../blackberry10/native/public/json/config.h    |   43 -
 .../blackberry10/native/public/json/features.h  |   42 -
 .../blackberry10/native/public/json/forwards.h  |   39 -
 .../src/blackberry10/native/public/json/json.h  |   10 -
 .../blackberry10/native/public/json/reader.h    |  196 -
 .../src/blackberry10/native/public/json/value.h | 1069 ---
 .../blackberry10/native/public/json/writer.h    |  174 -
 .../native/public/json_batchallocator.h         |  125 -
 .../native/public/json_internalarray.inl        |  448 -
 .../native/public/json_internalmap.inl          |  607 --
 .../blackberry10/native/public/json_reader.cpp  |  894 --
 .../blackberry10/native/public/json_value.cpp   | 1726 ----
 .../native/public/json_valueiterator.inl        |  292 -
 .../blackberry10/native/public/json_writer.cpp  |  829 --
 .../src/blackberry10/native/public/plugin.cpp   |  320 -
 .../src/blackberry10/native/public/plugin.h     |   70 -
 .../blackberry10/native/public/tokenizer.cpp    |  222 -
 .../src/blackberry10/native/public/tokenizer.h  |   55 -
 .../blackberry10/native/simulator/echoJnext.so  |  Bin 231778 -> 0 bytes
 .../src/blackberry10/native/src/echo.cpp        |  121 -
 .../src/blackberry10/native/src/echo.hpp        |   45 -
 .../plugins/cordova.echo/www/client.js          |   53 -
 .../plugins/dependencies/A/plugin.xml           |   60 -
 .../plugins/dependencies/A/src/android/A.java   |    0
 .../dependencies/A/src/ios/APluginCommand.h     |    0
 .../dependencies/A/src/ios/APluginCommand.m     |    0
 .../plugins/dependencies/A/www/plugin-a.js      |    0
 .../plugins/dependencies/B/plugin.xml           |   60 -
 .../plugins/dependencies/B/src/android/B.java   |    0
 .../dependencies/B/src/ios/BPluginCommand.h     |    0
 .../dependencies/B/src/ios/BPluginCommand.m     |    0
 .../plugins/dependencies/B/www/plugin-b.js      |    0
 .../plugins/dependencies/C/plugin.xml           |   57 -
 .../plugins/dependencies/C/src/android/C.java   |    0
 .../dependencies/C/src/ios/CPluginCommand.h     |    0
 .../dependencies/C/src/ios/CPluginCommand.m     |    0
 .../plugins/dependencies/C/www/plugin-c.js      |    0
 .../plugins/dependencies/D/plugin.xml           |   57 -
 .../plugins/dependencies/D/src/android/D.java   |    0
 .../dependencies/D/src/ios/DPluginCommand.h     |    0
 .../dependencies/D/src/ios/DPluginCommand.m     |    0
 .../plugins/dependencies/D/www/plugin-d.js      |    0
 .../plugins/dependencies/E/plugin.xml           |   59 -
 .../plugins/dependencies/E/src/android/E.java   |    0
 .../dependencies/E/src/ios/EPluginCommand.h     |    0
 .../dependencies/E/src/ios/EPluginCommand.m     |    0
 .../plugins/dependencies/E/www/plugin-d.js      |    0
 .../plugins/dependencies/F/plugin.xml           |   60 -
 .../plugins/dependencies/F/src/android/F.java   |    0
 .../dependencies/F/src/ios/FPluginCommand.h     |    0
 .../dependencies/F/src/ios/FPluginCommand.m     |    0
 .../plugins/dependencies/F/www/plugin-f.js      |    0
 .../plugins/dependencies/G/plugin.xml           |   59 -
 .../plugins/dependencies/G/src/android/G.java   |    0
 .../dependencies/G/src/ios/EPluginCommand.m     |    0
 .../dependencies/G/src/ios/GPluginCommand.h     |    0
 .../plugins/dependencies/G/www/plugin-g.js      |    0
 .../plugins/dependencies/H/plugin.xml           |   59 -
 .../plugins/dependencies/H/src/android/H.java   |    0
 .../dependencies/H/src/ios/HPluginCommand.h     |    0
 .../dependencies/H/src/ios/HPluginCommand.m     |    0
 .../plugins/dependencies/H/www/plugin-h.js      |    0
 .../spec-plugman/plugins/dependencies/README.md |   10 -
 .../plugins/dependencies/meta/D/plugin.xml      |   61 -
 .../dependencies/meta/D/src/android/D.java      |    0
 .../meta/D/src/ios/DPluginCommand.h             |    0
 .../meta/D/src/ios/DPluginCommand.m             |    0
 .../plugins/dependencies/meta/D/www/plugin-d.js |    0
 .../dependencies/meta/subdir/E/plugin.xml       |   57 -
 .../meta/subdir/E/src/android/E.java            |    0
 .../meta/subdir/E/src/ios/EPluginCommand.h      |    0
 .../meta/subdir/E/src/ios/EPluginCommand.m      |    0
 .../dependencies/meta/subdir/E/www/plugin-e.js  |    0
 .../plugins/dependencies/subdir/E/plugin.xml    |   57 -
 .../dependencies/subdir/E/src/android/E.java    |    0
 .../subdir/E/src/ios/EPluginCommand.h           |    0
 .../subdir/E/src/ios/EPluginCommand.m           |    0
 .../dependencies/subdir/E/www/plugin-e.js       |    0
 .../plugins/multiple-children/plugin.xml        |  108 -
 .../plugins/shared-deps-multi-child/plugin.xml  |   34 -
 cordova-lib/spec-plugman/prepare.spec.js        |   59 -
 cordova-lib/spec-plugman/projects/.gitkeep      |    0
 .../android_install/AndroidManifest.xml         |   20 -
 .../android_install/cordova/android_sdk_version |    1 -
 .../projects/android_install/cordova/version    |    1 -
 .../android_install/cordova/version.bat         |    2 -
 .../projects/android_one/AndroidManifest.xml    |   71 -
 .../projects/android_one/assets/www/.gitkeep    |    0
 .../projects/android_one/assets/www/cordova.js  | 6848 ---------------
 .../projects/android_one/cordova/appinfo.jar    |  Bin 1574 -> 0 bytes
 .../projects/android_one/cordova/build          |   23 -
 .../projects/android_one/cordova/clean          |   23 -
 .../projects/android_one/cordova/lib/cordova    |  386 -
 .../android_one/cordova/lib/install-device      |   23 -
 .../android_one/cordova/lib/install-emulator    |   23 -
 .../android_one/cordova/lib/list-devices        |   23 -
 .../cordova/lib/list-emulator-images            |   23 -
 .../cordova/lib/list-started-emulators          |   23 -
 .../android_one/cordova/lib/start-emulator      |   23 -
 .../projects/android_one/cordova/log            |   23 -
 .../projects/android_one/cordova/run            |   23 -
 .../projects/android_one/cordova/version        |   32 -
 .../projects/android_one/res/xml/plugins.xml    |   38 -
 .../projects/android_one/src/.gitkeep           |    0
 .../projects/android_two/AndroidManifest.xml    |   69 -
 .../projects/android_two/assets/www/.gitkeep    |    0
 .../projects/android_two/res/xml/config.xml     |   54 -
 .../projects/android_two/src/.gitkeep           |    0
 .../android_two_no_perms/AndroidManifest.xml    |   49 -
 .../android_two_no_perms/assets/www/.gitkeep    |    0
 .../android_two_no_perms/res/xml/config.xml     |   54 -
 .../projects/android_two_no_perms/src/.gitkeep  |    0
 .../android_uninstall/AndroidManifest.xml       |   20 -
 .../projects/android_uninstall/cordova/version  |    1 -
 .../android_uninstall/cordova/version.bat       |    2 -
 .../blackberry10/native/device/chrome/.gitkeep  |    0
 .../native/device/plugins/jnext/auth.txt        |    3 -
 .../native/simulator/chrome/.gitkeep            |    0
 .../native/simulator/plugins/jnext/auth.txt     |    3 -
 .../projects/blackberry10/www/config.xml        |   97 -
 .../CordovaLib.xcodeproj/project.pbxproj        |  636 --
 .../SampleApp.xcodeproj/project.orig.pbxproj    |  498 --
 .../SampleApp.xcodeproj/project.pbxproj         |  496 --
 .../SampleApp/SampleApp-Info.plist              |   78 -
 .../ios-config-xml/SampleApp/config.xml         |   59 -
 .../projects/ios-config-xml/www/.gitkeep        |    0
 .../CordovaLib.xcodeproj/project.pbxproj        |  636 --
 .../SampleApp.xcodeproj/project.orig.pbxproj    |  498 --
 .../SampleApp.xcodeproj/project.pbxproj         |  498 --
 .../projects/ios-plist/SampleApp/PhoneGap.plist |   53 -
 .../ios-plist/SampleApp/SampleApp-Info.plist    |   80 -
 .../projects/ios-plist/www/.gitkeep             |    0
 .../multiple-children/AndroidManifest.xml       |   69 -
 .../multiple-children/res/xml/plugins.xml       |   38 -
 .../spec-plugman/projects/tizen/www/config.xml  |    2 -
 .../windows8/CordovaApp_TemporaryKey.pfx        |  Bin 2504 -> 0 bytes
 .../projects/windows8/TestApp.jsproj            |   81 -
 .../spec-plugman/projects/windows8/TestApp.sln  |   46 -
 .../projects/windows8/package.appxmanifest      |   27 -
 .../projects/windows8/www/cordova-2.6.0.js      | 8075 ------------------
 .../projects/windows8/www/css/index.css         |  115 -
 .../projects/windows8/www/img/logo.png          |  Bin 11600 -> 0 bytes
 .../projects/windows8/www/img/smalllogo.png     |  Bin 2831 -> 0 bytes
 .../projects/windows8/www/img/splashscreen.png  |  Bin 24855 -> 0 bytes
 .../projects/windows8/www/img/storelogo.png     |  Bin 4052 -> 0 bytes
 .../projects/windows8/www/index.html            |   42 -
 .../projects/windows8/www/js/index.js           |   49 -
 .../projects/wp7/CordovaAppProj.csproj          |   76 -
 .../projects/wp7/Properties/WMAppManifest.xml   |   28 -
 .../projects/wp8/CordovaAppProj.csproj          |  136 -
 .../projects/wp8/Properties/WMAppManifest.xml   |   39 -
 .../spec-plugman/projects/www-only/.gitkeep     |    0
 cordova-lib/spec-plugman/publish.spec.js        |   11 -
 .../spec-plugman/registry/registry.spec.js      |  134 -
 cordova-lib/spec-plugman/search.spec.js         |   11 -
 cordova-lib/spec-plugman/uninstall.spec.js      |  289 -
 cordova-lib/spec-plugman/unpublish.spec.js      |   11 -
 .../spec-plugman/util/action-stack.spec.js      |   58 -
 .../spec-plugman/util/config-changes.spec.js    |  449 -
 cordova-lib/spec-plugman/util/csproj.spec.js    |   97 -
 .../spec-plugman/util/dependencies.spec.js      |   41 -
 cordova-lib/spec-plugman/util/plugins.spec.js   |   82 -
 .../spec-plugman/util/xml-helpers.spec.js       |  170 -
 cordova-lib/spec-plugman/wrappers.spec.js       |   40 -
 cordova-lib/src/plugman/adduser.js              |    5 -
 cordova-lib/src/plugman/config.js               |    5 -
 cordova-lib/src/plugman/create.js               |   81 -
 cordova-lib/src/plugman/events.js               |    2 -
 cordova-lib/src/plugman/fetch.js                |  175 -
 cordova-lib/src/plugman/info.js                 |    6 -
 cordova-lib/src/plugman/install.js              |  629 --
 cordova-lib/src/plugman/owner.js                |    6 -
 cordova-lib/src/plugman/platform.js             |  119 -
 cordova-lib/src/plugman/platform_operation.js   |    5 -
 cordova-lib/src/plugman/platforms.js            |   12 -
 .../src/plugman/platforms/amazon-fireos.js      |   88 -
 cordova-lib/src/plugman/platforms/android.js    |   89 -
 .../src/plugman/platforms/blackberry10.js       |   94 -
 cordova-lib/src/plugman/platforms/common.js     |   94 -
 cordova-lib/src/plugman/platforms/firefoxos.js  |   72 -
 cordova-lib/src/plugman/platforms/ios.js        |  216 -
 cordova-lib/src/plugman/platforms/tizen.js      |   72 -
 cordova-lib/src/plugman/platforms/ubuntu.js     |  124 -
 cordova-lib/src/plugman/platforms/windows8.js   |  134 -
 cordova-lib/src/plugman/platforms/wp7.js        |   91 -
 cordova-lib/src/plugman/platforms/wp8.js        |  113 -
 cordova-lib/src/plugman/plugman.js              |  207 -
 cordova-lib/src/plugman/prepare.js              |  232 -
 cordova-lib/src/plugman/publish.js              |    6 -
 cordova-lib/src/plugman/registry/manifest.js    |   95 -
 cordova-lib/src/plugman/registry/registry.js    |  290 -
 cordova-lib/src/plugman/registry/whitelist.js   |   21 -
 cordova-lib/src/plugman/search.js               |    5 -
 cordova-lib/src/plugman/uninstall.js            |  288 -
 cordova-lib/src/plugman/unpublish.js            |    5 -
 cordova-lib/src/plugman/util/action-stack.js    |   85 -
 cordova-lib/src/plugman/util/config-changes.js  |  812 --
 cordova-lib/src/plugman/util/csproj.js          |  124 -
 cordova-lib/src/plugman/util/default-engines.js |   36 -
 cordova-lib/src/plugman/util/dependencies.js    |   96 -
 cordova-lib/src/plugman/util/metadata.js        |   19 -
 cordova-lib/src/plugman/util/plist-helpers.js   |   88 -
 cordova-lib/src/plugman/util/plugins.js         |  100 -
 .../src/plugman/util/search-and-replace.js      |   37 -
 cordova-lib/src/plugman/util/w8jsproj.js        |  239 -
 cordova-lib/src/plugman/util/xml-helpers.js     |  196 -
 cordova-lib/templates/base.js                   |    5 -
 .../templates/platforms/android/android.xml     |   12 -
 .../templates/platforms/android/base.java       |   32 -
 cordova-lib/templates/platforms/ios/base.m      |   28 -
 cordova-lib/templates/platforms/ios/ios.xml     |    9 -
 348 files changed, 49738 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/add_platform.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/add_platform.spec.js b/cordova-lib/spec-plugman/add_platform.spec.js
deleted file mode 100644
index 18bad02..0000000
--- a/cordova-lib/spec-plugman/add_platform.spec.js
+++ /dev/null
@@ -1,64 +0,0 @@
-var platform = require('../src/platform'),
-    Q = require('q'),
-    fs = require('fs'),
-    shell = require('shelljs'),
-    plugman = require('../plugman');
-
-describe( 'platform add/remove', function() {
-    it( 'should call platform add', function() {
-        var sPlatformA = spyOn( platform, 'add' ).andReturn(Q()),
-            sPlatformR = spyOn( platform, 'remove' ).andReturn(Q());
-        platform.add();
-        expect(sPlatformA).toHaveBeenCalled();
-        platform.remove();
-        expect(sPlatformR).toHaveBeenCalled();
-    });
-});
-
-
-describe( 'platform add', function() {
-    var done = false,
-        existsSync,
-        mkdir,
-        writeFileSync;
-    function platformPromise( f ) {
-        f.then( function() { done = true; }, function(err) { done = err; } );
-    }
-    beforeEach( function() {
-        existsSync = spyOn( fs, 'existsSync' ).andReturn( false );
-        done = false;
-    });
-    it( 'should error on non existing plugin.xml', function() {
-        runs(function() {
-            platformPromise( platform.add() );
-        });
-        waitsFor(function() { return done; }, 'platform promise never resolved', 500);
-        runs(function() {
-            expect(''+ done ).toContain( "can't find a plugin.xml.  Are you in the plugin?"  );
-        });
-    });
-});
-
-
-describe( 'platform remove', function() {
-    var done = false,
-        existsSync,
-        mkdir,
-        writeFileSync;
-    function platformPromise( f ) {
-        f.then( function() { done = true; }, function(err) { done = err; } );
-    }
-    beforeEach( function() {
-        existsSync = spyOn( fs, 'existsSync' ).andReturn( false );
-        done = false;
-    });
-    it( 'should error on non existing plugin.xml', function() {
-        runs(function() {
-            platformPromise( platform.remove() );
-        });
-        waitsFor(function() { return done; }, 'platform promise never resolved', 500);
-        runs(function() {
-            expect(''+ done ).toContain( "can't find a plugin.xml.  Are you in the plugin?"  );
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/adduser.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/adduser.spec.js b/cordova-lib/spec-plugman/adduser.spec.js
deleted file mode 100644
index 48b1281..0000000
--- a/cordova-lib/spec-plugman/adduser.spec.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var adduser = require('../src/adduser'),
-    Q = require('q'),
-    registry = require('../src/registry/registry');
-
-describe('adduser', function() {
-    it('should add a user', function() {
-        var sAddUser = spyOn(registry, 'adduser').andReturn(Q());
-        adduser();
-        expect(sAddUser).toHaveBeenCalled();
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/common.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/common.js b/cordova-lib/spec-plugman/common.js
deleted file mode 100644
index b71efbf..0000000
--- a/cordova-lib/spec-plugman/common.js
+++ /dev/null
@@ -1,62 +0,0 @@
-
-var plugman = require('../plugman'),
-    nopt = require('nopt');
-
-var known_opts = {
-    'verbose' : Boolean,
-    'debug' : Number
-}, shortHands = { 'd' : ['--debug'] };
-
-var opt = nopt(known_opts, shortHands);
-var mapNames = {
-    'verbose' : 7,
-    'info'    : 6,
-    'notice'  : 5,
-    'warn'    : 4,
-    'error'   : 3
-}
-
-if(opt.verbose)
-    opt.debug = 7;
-
-if(opt.debug) {
-    for(var i in mapNames) {
-        if(mapNames[i] <= opt.debug)
-            plugman.on(i, console.log);
-    }
-
-    if(opt.debug >= 6)
-        plugman.on('log', console.log);
-}
-
-module.exports = common = {
-    spy: {
-        getInstall: function(emitSpy){
-            return common.spy.startsWith(emitSpy, 'Install start');
-        },
-
-        getDeleted: function(emitSpy){
-            return common.spy.startsWith(emitSpy, 'Deleted');
-        },
-
-        startsWith: function(emitSpy, string)
-        {
-            var match = [], i;
-            for(i in emitSpy.argsForCall) {
-                if(emitSpy.argsForCall[i][1].substr(0, string.length) === string)
-                    match.push(emitSpy.argsForCall[i][1]);
-            }
-            return match;
-        },
-
-        contains: function(emitSpy, string)
-        {
-            var match = [], i;
-            for(i in emitSpy.argsForCall) {
-                if(emitSpy.argsForCall[i][1].indexOf(string) >= 0)
-                    match.push(emitSpy.argsForCall[i][1]);
-            }
-            return match;
-        }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/config.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/config.spec.js b/cordova-lib/spec-plugman/config.spec.js
deleted file mode 100644
index 65addbf..0000000
--- a/cordova-lib/spec-plugman/config.spec.js
+++ /dev/null
@@ -1,12 +0,0 @@
-var config = require('../src/config'),
-    Q = require('q'),
-    registry = require('../src/registry/registry');
-
-describe('config', function() {
-    it('should run config', function() {
-        var sConfig = spyOn(registry, 'config').andReturn(Q());
-        var params = ['set', 'registry', 'http://registry.cordova.io'];
-        config(params);
-        expect(sConfig).toHaveBeenCalledWith(params);
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/create.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/create.spec.js b/cordova-lib/spec-plugman/create.spec.js
deleted file mode 100644
index afc034a..0000000
--- a/cordova-lib/spec-plugman/create.spec.js
+++ /dev/null
@@ -1,62 +0,0 @@
-var create = require('../src/create'),
-    Q = require('q'),
-    fs = require('fs'),
-    shell = require('shelljs'),
-    plugman = require('../plugman');
-
-describe( 'create', function() {
-    it( 'should call create', function() {
-        var sCreate = spyOn( plugman, 'create' ).andReturn(Q());
-        plugman.create();
-        expect(sCreate).toHaveBeenCalled();
-    });
-});
-
-describe( 'create plugin', function() {
-    var done = false,
-        existsSync,
-        mkdir,
-        writeFileSync;
-    function createPromise( f ) {
-        f.then( function() { done = true; }, function(err) { done = err; } );
-    }
-    beforeEach( function() {
-        existsSync = spyOn( fs, 'existsSync' ).andReturn( false );
-        mkdir = spyOn( shell, 'mkdir' ).andReturn( true );
-        writeFileSync = spyOn( fs, 'writeFileSync' );
-        done = false;
-    });
-
-    it( 'should be successful', function() {
-        runs(function() {
-            createPromise( create( 'name', 'org.plugin.id', '0.0.0', '.', [] ) );
-        });
-        waitsFor(function() { return done; }, 'create promise never resolved', 500);
-        runs(function() {
-            expect( done ).toBe( true );
-            expect( writeFileSync.calls.length ).toEqual( 2 );
-        });
-    });
-});
-
-describe( 'create plugin in existing plugin', function() {
-    var done = false,
-        existsSync;
-    function createPromise( f ) {
-        f.then( function() { done = true; }, function(err) { done = err; } );
-    }
-    beforeEach( function() {
-        existsSync = spyOn( fs, 'existsSync' ).andReturn( true );
-        done = false;
-    });
-
-    it( 'should fail due to an existing plugin.xml', function() {
-        runs(function() {
-            createPromise( create() );
-        });
-        waitsFor(function() { return done; }, 'create promise never resolved', 500);
-        runs(function() {
-            expect(''+ done ).toContain( 'Error: plugin.xml already exists. Are you already in a plugin?'  );
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/fetch.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/fetch.spec.js b/cordova-lib/spec-plugman/fetch.spec.js
deleted file mode 100644
index 2a0b660..0000000
--- a/cordova-lib/spec-plugman/fetch.spec.js
+++ /dev/null
@@ -1,211 +0,0 @@
-var fetch   = require('../src/fetch'),
-    fs      = require('fs'),
-    os      = require('osenv'),
-    path    = require('path'),
-    shell   = require('shelljs'),
-    xml_helpers = require('../src/util/xml-helpers'),
-    metadata = require('../src/util/metadata'),
-    temp    = path.join(os.tmpdir(), 'plugman'),
-    test_plugin = path.join(__dirname, 'plugins', 'ChildBrowser'),
-    test_plugin_with_space = path.join(__dirname, 'folder with space', 'plugins', 'ChildBrowser'),
-    plugins = require('../src/util/plugins'),
-    Q = require('q'),
-    registry = require('../src/registry/registry');
-
-describe('fetch', function() {
-    function wrapper(p, done, post) {
-        p.then(post, function(err) {
-            expect(err).toBeUndefined();
-        }).fin(done);
-    }
-
-    describe('local plugins', function() {
-        var xml, rm, sym, mkdir, cp, save_metadata;
-        beforeEach(function() {
-            xml = spyOn(xml_helpers, 'parseElementtreeSync').andReturn({
-                getroot:function() { return {attrib:{id:'id'}};}
-            });
-            rm = spyOn(shell, 'rm');
-            sym = spyOn(fs, 'symlinkSync');
-            mkdir = spyOn(shell, 'mkdir');
-            cp = spyOn(shell, 'cp');
-            save_metadata = spyOn(metadata, 'save_fetch_metadata');
-        });
-
-        it('should copy locally-available plugin to plugins directory', function(done) {
-            wrapper(fetch(test_plugin, temp), done, function() {
-                expect(cp).toHaveBeenCalledWith('-R', path.join(test_plugin, '*'), path.join(temp, 'id'));
-            });
-        });
-        it('should copy locally-available plugin to plugins directory when spaces in path', function(done) {
-            //XXX: added this because plugman tries to fetch from registry when plugin folder does not exist
-            spyOn(fs,'existsSync').andReturn(true);
-            wrapper(fetch(test_plugin_with_space, temp), done, function() {
-                expect(cp).toHaveBeenCalledWith('-R', path.join(test_plugin_with_space, '*'), path.join(temp, 'id'));
-            });
-        });
-        it('should create a symlink if used with `link` param', function(done) {
-            wrapper(fetch(test_plugin, temp, { link: true }), done, function() {
-                expect(sym).toHaveBeenCalledWith(test_plugin, path.join(temp, 'id'), 'dir');
-            });
-        });
-        it('should fail when the expected ID doesn\'t match', function(done) {
-            fetch(test_plugin, temp, { expected_id: 'wrongID' })
-            .then(function() {
-                expect('this call').toBe('fail');
-            }, function(err) {
-                expect(''+err).toContain('Expected fetched plugin to have ID "wrongID" but got "id".');
-            }).fin(done);
-        });
-        it('should succeed when the expected ID is correct', function(done) {
-            wrapper(fetch(test_plugin, temp, { expected_id: 'id' }), done, function() {
-                expect(1).toBe(1);
-            });
-        });
-    });
-    describe('git plugins', function() {
-        var clone, save_metadata, done, xml;
-
-        function fetchPromise(f) {
-            f.then(function() { done = true; }, function(err) { done = err; });
-        }
-
-        beforeEach(function() {
-            clone = spyOn(plugins, 'clonePluginGitRepo').andReturn(Q('somedir'));
-            save_metadata = spyOn(metadata, 'save_fetch_metadata');
-            done = false;
-            xml = spyOn(xml_helpers, 'parseElementtreeSync').andReturn({
-                getroot:function() { return {attrib:{id:'id'}};}
-            });
-        });
-        it('should call clonePluginGitRepo for https:// and git:// based urls', function() {
-            var url = "https://github.com/bobeast/GAPlugin.git";
-            runs(function() {
-                fetchPromise(fetch(url, temp));
-            });
-            waitsFor(function() { return done; }, 'fetch promise never resolved', 250);
-            runs(function() {
-                expect(done).toBe(true);
-                expect(clone).toHaveBeenCalledWith(url, temp, '.', undefined);
-                expect(save_metadata).toHaveBeenCalledWith('somedir', jasmine.any(Object));
-            });
-        });
-        it('should call clonePluginGitRepo with subdir if applicable', function() {
-            var url = "https://github.com/bobeast/GAPlugin.git";
-            var dir = 'fakeSubDir';
-            runs(function() {
-                fetchPromise(fetch(url, temp, { subdir: dir }));
-            });
-            waitsFor(function() { return done; }, 'fetch promise never resolved', 250);
-            runs(function() {
-                expect(clone).toHaveBeenCalledWith(url, temp, dir, undefined);
-                expect(save_metadata).toHaveBeenCalledWith('somedir', jasmine.any(Object));
-            });
-        });
-        it('should call clonePluginGitRepo with subdir and git ref if applicable', function() {
-            var url = "https://github.com/bobeast/GAPlugin.git";
-            var dir = 'fakeSubDir';
-            var ref = 'fakeGitRef';
-            runs(function() {
-                fetchPromise(fetch(url, temp, { subdir: dir, git_ref: ref }));
-            });
-            waitsFor(function() { return done; }, 'fetch promise never resolved', 250);
-            runs(function() {
-                expect(clone).toHaveBeenCalledWith(url, temp, dir, ref);
-                expect(save_metadata).toHaveBeenCalledWith('somedir', jasmine.any(Object));
-            });
-        });
-        it('should extract the git ref from the URL hash, if provided', function() {
-            var url = "https://github.com/bobeast/GAPlugin.git#fakeGitRef";
-            var baseURL = "https://github.com/bobeast/GAPlugin.git";
-            runs(function() {
-                fetchPromise(fetch(url, temp, {}));
-            });
-            waitsFor(function() { return done; }, 'fetch promise never resolved', 250);
-            runs(function() {
-                expect(clone).toHaveBeenCalledWith(baseURL, temp, '.', 'fakeGitRef');
-                expect(save_metadata).toHaveBeenCalledWith('somedir', jasmine.any(Object));
-            });
-        });
-        it('should extract the subdir from the URL hash, if provided', function() {
-            var url = "https://github.com/bobeast/GAPlugin.git#:fakeSubDir";
-            var baseURL = "https://github.com/bobeast/GAPlugin.git";
-            runs(function() {
-                fetchPromise(fetch(url, temp, {}));
-            });
-            waitsFor(function() { return done; }, 'fetch promise never resolved', 250);
-            runs(function() {
-                expect(clone).toHaveBeenCalledWith(baseURL, temp, 'fakeSubDir', undefined);
-                expect(save_metadata).toHaveBeenCalledWith('somedir', jasmine.any(Object));
-            });
-        });
-        it('should extract the git ref and subdir from the URL hash, if provided', function() {
-            var url = "https://github.com/bobeast/GAPlugin.git#fakeGitRef:/fake/Sub/Dir/";
-            var baseURL = "https://github.com/bobeast/GAPlugin.git";
-            runs(function() {
-                fetchPromise(fetch(url, temp, {}));
-            });
-            waitsFor(function() { return done; }, 'fetch promise never resolved', 250);
-            runs(function() {
-                expect(clone).toHaveBeenCalledWith(baseURL, temp, 'fake/Sub/Dir', 'fakeGitRef');
-                expect(save_metadata).toHaveBeenCalledWith('somedir', jasmine.any(Object));
-            });
-        });
-        it('should throw if used with url and `link` param', function() {
-            runs(function() {
-                fetch("https://github.com/bobeast/GAPlugin.git", temp, {link:true}).then(null, function(err) { done = err; });
-            });
-            waitsFor(function() { return done; }, 'fetch promise never resolved', 250);
-            runs(function() {
-                expect(''+done).toContain('--link is not supported for git URLs');
-            });
-        });
-        it('should fail when the expected ID doesn\'t match', function(done) {
-            fetch('https://github.com/bobeast/GAPlugin.git', temp, { expected_id: 'wrongID' })
-            .then(function() {
-                expect('this call').toBe('fail');
-            }, function(err) {
-                expect(''+err).toContain('Expected fetched plugin to have ID "wrongID" but got "id".');
-            }).fin(done);
-        });
-        it('should succeed when the expected ID is correct', function(done) {
-            wrapper(fetch('https://github.com/bobeast/GAPlugin.git', temp, { expected_id: 'id' }), done, function() {
-                expect(1).toBe(1);
-            });
-        });
-    });
-    describe('registry plugins', function() {
-        var pluginId = 'dummyplugin', sFetch;
-        var xml, rm, sym, mkdir, cp, save_metadata;
-        beforeEach(function() {
-            xml = spyOn(xml_helpers, 'parseElementtreeSync').andReturn({
-                getroot:function() { return {attrib:{id:'id'}};}
-            });
-            rm = spyOn(shell, 'rm');
-            sym = spyOn(fs, 'symlinkSync');
-            mkdir = spyOn(shell, 'mkdir');
-            cp = spyOn(shell, 'cp');
-            save_metadata = spyOn(metadata, 'save_fetch_metadata');
-            sFetch = spyOn(registry, 'fetch').andReturn(Q('somedir'));
-        });
-
-        it('should get a plugin from registry and set the right client when argument is not a folder nor URL', function(done) {
-            wrapper(fetch(pluginId, temp, {client: 'plugman'}), done, function() {
-                expect(sFetch).toHaveBeenCalledWith([pluginId], 'plugman');
-            });
-        });
-        it('should fail when the expected ID doesn\'t match', function(done) {
-            fetch(pluginId, temp, { expected_id: 'wrongID' })
-            .then(function() {
-                expect('this call').toBe('fail');
-            }, function(err) {
-                expect(''+err).toContain('Expected fetched plugin to have ID "wrongID" but got "id".');
-            }).fin(done);
-        });
-        it('should succeed when the expected ID is correct', function(done) {
-            wrapper(fetch(pluginId, temp, { expected_id: 'id' }), done, function() {
-                expect(1).toBe(1);
-            });
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/info.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/info.spec.js b/cordova-lib/spec-plugman/info.spec.js
deleted file mode 100644
index 96256c7..0000000
--- a/cordova-lib/spec-plugman/info.spec.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var search = require('../src/info'),
-    Q = require('q'),
-    registry = require('../src/registry/registry');
-
-describe('info', function() {
-    it('should show plugin info', function() {
-        var sSearch = spyOn(registry, 'info').andReturn(Q({
-            name: 'fakePlugin',
-            version: '1.0.0',
-            engines: [{ name: 'plugman', version: '>=0.11' }]
-        }));
-        search(new Array('myplugin'));
-        expect(sSearch).toHaveBeenCalledWith(['myplugin']);
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/install.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/install.spec.js b/cordova-lib/spec-plugman/install.spec.js
deleted file mode 100644
index 20a3d37..0000000
--- a/cordova-lib/spec-plugman/install.spec.js
+++ /dev/null
@@ -1,472 +0,0 @@
-var install = require('../src/install'),
-    actions = require('../src/util/action-stack'),
-    config_changes = require('../src/util/config-changes'),
-    xml_helpers = require('../src/util/xml-helpers'),
-    events  = require('../src/events'),
-    plugman = require('../plugman'),
-    platforms = require('../src/platforms/common'),
-    common  = require('./common'),
-    fs      = require('fs'),
-    os      = require('os'),
-    path    = require('path'),
-    shell   = require('shelljs'),
-    child_process = require('child_process'),
-    semver  = require('semver'),
-    Q = require('q'),
-    spec    = __dirname,
-    done    = false,
-    srcProject = path.join(spec, 'projects', 'android_install'),
-    project = path.join(os.tmpdir(), 'plugman-test', 'android_install'),
-
-    plugins_dir = path.join(spec, 'plugins'),
-    plugins_install_dir = path.join(project, 'cordova', 'plugins'),
-    plugins = {
-        'DummyPlugin' : path.join(plugins_dir, 'DummyPlugin'),
-        'EnginePlugin' : path.join(plugins_dir, 'EnginePlugin'),
-        'EnginePluginAndroid' : path.join(plugins_dir, 'EnginePluginAndroid'),
-        'ChildBrowser' : path.join(plugins_dir, 'ChildBrowser'),
-        'VariablePlugin' : path.join(plugins_dir, 'VariablePlugin'),
-        'A' : path.join(plugins_dir, 'dependencies', 'A'),
-        'B' : path.join(plugins_dir, 'dependencies', 'B'),
-        'C' : path.join(plugins_dir, 'dependencies', 'C'),
-        'F' : path.join(plugins_dir, 'dependencies', 'F'),
-        'G' : path.join(plugins_dir, 'dependencies', 'G')
-    },
-    promise,
-    results = {},
-    dummy_id = 'com.phonegap.plugins.dummyplugin';
-
-function installPromise(f) {
-  f.then(function(res) { done = true; }, function(err) { done = err; });
-}
-
-var existsSync = fs.existsSync;
-
-// Mocked functions for tests
-var fake = {
-    'existsSync' : {
-        'noPlugins' : function(path){
-            // fake installed plugin directories as 'not found'
-            if( path.slice(-5) !== '.json' && path.indexOf(plugins_install_dir) >= 0) {
-                return false;
-            }
-
-            return existsSync(path);
-        }
-    },
-    'fetch' : {
-        'dependencies' : function(id, dir) {
-            if(id == plugins['A'])
-                return Q(id); // full path to plugin
-
-            return Q( path.join(plugins_dir, 'dependencies', id) );
-        }
-    }
-}
-
-describe('start', function() {
-    var prepare, config_queue_add, proc, actions_push, ca, emit;
-
-    beforeEach(function() {
-        prepare = spyOn(plugman, 'prepare');
-        config_queue_add = spyOn(config_changes, 'add_installed_plugin_to_prepare_queue');
-        proc = spyOn(actions.prototype, 'process').andReturn( Q(true) );
-        actions_push = spyOn(actions.prototype, 'push');
-        ca = spyOn(actions.prototype, 'createAction');
-    });
-    it('start', function() {
-        shell.rm('-rf', project);
-        shell.cp('-R', path.join(srcProject, '*'), project);
-
-        done = false;
-        promise = Q()
-         .then(
-            function(){ return install('android', project, plugins['DummyPlugin']) }
-        ).then(
-            function(){
-                results['actions_callCount'] = actions_push.callCount;
-                results['actions_create'] = ca.argsForCall[0];
-                results['config_add'] = config_queue_add.argsForCall[0];
-
-                return Q();
-            }
-        ).then(
-            function(){ return install('android', project, plugins['EnginePlugin']) }
-        ).then(
-            function(){
-                emit = spyOn(events, 'emit');
-                return install('android', project, plugins['ChildBrowser'])
-            }
-        ).then(
-            function(){
-                return install('android', project, plugins['VariablePlugin'], plugins_install_dir, { cli_variables:{API_KEY:'batman'} })
-            }
-        ).then(
-            function(){
-                done = true;
-                results['prepareCount'] = prepare.callCount;
-                results['emit_results'] = [];
-
-                for(var i in emit.calls) {
-                    if(emit.calls[i].args[0] === 'results')
-                        results['emit_results'].push(emit.calls[i].args[1]);
-                }
-
-                events.emit("verbose", "***** DONE START *****");
-            }
-        );
-        waitsFor(function() { return done; }, 'promise never resolved', 500);
-    });
-});
-
-describe('install', function() {
-    var chmod, exec, proc, add_to_queue, prepare, actions_push, c_a, mkdir, cp, rm, fetchSpy, emit;
-
-    beforeEach(function() {
-        prepare = spyOn(plugman, 'prepare').andReturn( Q(true) );
-
-        exec = spyOn(child_process, 'exec').andCallFake(function(cmd, cb) {
-            cb(false, '', '');
-        });
-        spyOn(fs, 'mkdirSync').andReturn(true);
-        spyOn(shell, 'mkdir').andReturn(true);
-        spyOn(platforms, 'copyFile').andReturn(true);
-
-        fetchSpy = spyOn(plugman.raw, 'fetch').andReturn( Q( plugins['EnginePlugin'] ) );
-        chmod = spyOn(fs, 'chmodSync').andReturn(true);
-        fsWrite = spyOn(fs, 'writeFileSync').andReturn(true);
-        cp = spyOn(shell, 'cp').andReturn(true);
-        rm = spyOn(shell, 'rm').andReturn(true);
-        add_to_queue = spyOn(config_changes, 'add_installed_plugin_to_prepare_queue');
-        done = false;
-    });
-
-    describe('success', function() {
-        it('should call prepare after a successful install', function() {
-           expect(results['prepareCount']).toBe(4);
-        });
-
-        it('should emit a results event with platform-agnostic <info>', function() {
-            // ChildBrowser
-            expect(results['emit_results'][0]).toBe('No matter what platform you are installing to, this notice is very important.');
-        });
-        it('should emit a results event with platform-specific <info>', function() {
-            // ChildBrowser
-            expect(results['emit_results'][1]).toBe('Please make sure you read this because it is very important to complete the installation of your plugin.');
-        });
-        it('should interpolate variables into <info> tags', function() {
-            // VariableBrowser
-            expect(results['emit_results'][2]).toBe('Remember that your api key is batman!');
-        });
-
-        it('should call fetch if provided plugin cannot be resolved locally', function() {
-            fetchSpy.andReturn( Q( plugins['DummyPlugin'] ) );
-            spyOn(fs, 'existsSync').andCallFake( fake['existsSync']['noPlugins'] );
-
-            runs(function() {
-                installPromise(install('android', project, 'CLEANYOURSHORTS' ));
-            });
-            waitsFor(function() { return done; }, 'install promise never resolved', 200);
-            runs(function() {
-                expect(done).toBe(true);
-                expect(fetchSpy).toHaveBeenCalled();
-            });
-        });
-
-        it('should call the config-changes module\'s add_installed_plugin_to_prepare_queue method after processing an install', function() {
-           expect(results['config_add']).toEqual([plugins_install_dir, dummy_id, 'android', {}, true]);
-        });
-        it('should queue up actions as appropriate for that plugin and call process on the action stack',
-           function() {
-                expect(results['actions_callCount']).toEqual(3);
-                expect(results['actions_create']).toEqual([jasmine.any(Function), [jasmine.any(Object), path.join(plugins_install_dir, dummy_id), project, dummy_id], jasmine.any(Function), [jasmine.any(Object), project, dummy_id]]);
-        });
-
-        it('should check version if plugin has engine tag', function(){
-            var satisfies = spyOn(semver, 'satisfies').andReturn(true);
-            exec.andCallFake(function(cmd, cb) {
-                cb(null, '2.5.0\n');
-            });
-
-            runs(function() {
-                installPromise( install('android', project, plugins['EnginePlugin']) );
-            });
-            waitsFor(function() { return done; }, 'install promise never resolved', 200);
-            runs(function() {
-                expect(satisfies).toHaveBeenCalledWith('2.5.0','>=2.3.0');
-            });
-        });
-        it('should check version and munge it a little if it has "rc" in it so it plays nice with semver (introduce a dash in it)', function() {
-            var satisfies = spyOn(semver, 'satisfies').andReturn(true);
-            exec.andCallFake(function(cmd, cb) {
-                cb(null, '3.0.0rc1\n');
-            });
-
-            runs(function() {
-                installPromise( install('android', project, plugins['EnginePlugin']) );
-            });
-            waitsFor(function() { return done; }, 'install promise never resolved', 200);
-            runs(function() {
-                expect(satisfies).toHaveBeenCalledWith('3.0.0-rc1','>=2.3.0');
-            });
-        });
-        it('should check specific platform version over cordova version if specified', function() {
-            var spy = spyOn(semver, 'satisfies').andReturn(true);
-            exec.andCallFake(function(cmd, cb) {
-                cb(null, '3.1.0\n');
-            });
-            fetchSpy.andReturn( Q( plugins['EnginePluginAndroid'] ) );
-
-            runs(function() {
-                installPromise( install('android', project, plugins['EnginePluginAndroid']) );
-            });
-            waitsFor(function() { return done; }, 'install promise never resolved', 200);
-            runs(function() {
-                expect(spy).toHaveBeenCalledWith('3.1.0','>=3.1.0');
-            });
-        });
-        it('should check platform sdk version if specified', function() {
-            var spy = spyOn(semver, 'satisfies').andReturn(true);
-            fetchSpy.andReturn( Q( plugins['EnginePluginAndroid'] ) );
-            exec.andCallFake(function(cmd, cb) {
-                cb(null, '18\n');
-            });
-
-            runs(function() {
-                installPromise( install('android', project, 'EnginePluginAndroid') );
-            });
-            waitsFor(function() { return done; }, 'install promise never resolved', 200);
-            runs(function() {
-                // <engine name="cordova" VERSION=">=3.0.0"/>
-                // <engine name="cordova-android" VERSION=">=3.1.0"/>
-                // <engine name="android-sdk" VERSION=">=18"/>
-
-                expect(spy.calls.length).toBe(3);
-                expect(spy.calls[0].args).toEqual([ '18.0.0', '>=3.0.0' ]);
-                expect(spy.calls[1].args).toEqual([ '18.0.0', '>=3.1.0' ]);
-                expect(spy.calls[2].args).toEqual([ '18.0.0','>=18' ]);
-            });
-        });
-        it('should check engine versions', function() {
-            var spy = spyOn(semver, 'satisfies').andReturn(true);
-            fetchSpy.andReturn( Q( plugins['EnginePlugin'] ) );
-
-            runs(function() {
-                installPromise( install('android', project, plugins['EnginePlugin']) );
-            });
-            waitsFor(function() { return done; }, 'install promise never resolved', 200);
-            runs(function() {
-                // <engine name="cordova" version=">=2.3.0"/>
-                // <engine name="cordova-plugman" version=">=0.10.0" />
-                // <engine name="mega-fun-plugin" version=">=1.0.0" scriptSrc="megaFunVersion" platform="*" />
-                // <engine name="mega-boring-plugin" version=">=3.0.0" scriptSrc="megaBoringVersion" platform="ios|android" />
-
-                var plugmanVersion = require('../package.json').version;
-
-                expect(spy.calls.length).toBe(4);
-                expect(spy.calls[0].args).toEqual([ '', '>=2.3.0' ]);
-                expect(spy.calls[1].args).toEqual([ plugmanVersion, '>=0.10.0' ]);
-                expect(spy.calls[2].args).toEqual([ '', '>=1.0.0' ]);
-                expect(spy.calls[3].args).toEqual([ '', '>=3.0.0' ]);
-            });
-        });
-        it('should not check custom engine version that is not supported for platform', function() {
-            var spy = spyOn(semver, 'satisfies').andReturn(true);
-            runs(function() {
-                installPromise( install('blackberry10', project, plugins['EnginePlugin']) );
-            });
-            waitsFor(function() { return done; }, 'install promise never resolved', 200);
-            runs(function() {
-                expect(spy).not.toHaveBeenCalledWith('','>=3.0.0');
-            });
-        });
-
-        describe('with dependencies', function() {
-            var emit;
-            beforeEach(function() {
-                spyOn(fs, 'existsSync').andCallFake( fake['existsSync']['noPlugins'] );
-                fetchSpy.andCallFake( fake['fetch']['dependencies'] );
-                emit = spyOn(events, 'emit');
-                exec.andCallFake(function(cmd, cb) {
-                    cb(null, '9.0.0\n');
-                });
-            });
-
-            it('should install any dependent plugins if missing', function() {
-                runs(function() {
-                    installPromise( install('android', project, plugins['A']) );
-                });
-                waitsFor(function() { return done; }, 'install promise never resolved', 200);
-                runs(function() {
-                    // Look for 'Installing plugin ...' in events
-                    var install = common.spy.getInstall(emit);
-
-                    expect(install).toEqual([
-                        'Install start for "C" on android.',
-                        'Install start for "D" on android.',
-                        'Install start for "A" on android.'
-                    ]);
-                });
-            });
-
-            it('should install any dependent plugins from registry when url is not defined', function() {
-                // Plugin A depends on C & D
-                runs(function() {
-                    installPromise( install('android', project, plugins['A']) );
-                });
-                waitsFor(function() { return done; }, 'promise never resolved', 200);
-                runs(function() {
-                    // TODO: this is same test as above? Need test other dependency with url=?
-                    var install = common.spy.getInstall(emit);
-
-                    expect(install).toEqual([
-                        'Install start for "C" on android.',
-                        'Install start for "D" on android.',
-                        'Install start for "A" on android.'
-                    ]);;
-                });
-            });
-
-            it('should process all dependent plugins with alternate routes to the same plugin', function() {
-                // Plugin F depends on A, C, D and E
-                runs(function () {
-                    installPromise(install('android', project, plugins['F']));
-                });
-                waitsFor(function () { return done; }, 'install promise never resolved', 200);
-                runs(function () {
-                    var install = common.spy.getInstall(emit);
-
-                    expect(install).toEqual([
-                        'Install start for "C" on android.',
-                        'Install start for "D" on android.',
-                        'Install start for "A" on android.',
-                        'Install start for "D" on android.',
-                        'Install start for "F" on android.'
-                    ]);
-                });
-            });
-
-            it('should throw if there is a cyclic dependency', function() {
-                runs(function () {
-                    installPromise( install('android', project, plugins['G']) );
-                });
-                waitsFor(function () { return done; }, 'install promise never resolved', 200);
-                runs(function () {
-                    var install = common.spy.getInstall(emit);
-
-                    expect(done.message).toEqual('Cyclic dependency from G to H');
-                });
-            });
-
-            it('install subdir relative to top level plugin if no fetch meta', function() {
-                runs(function () {
-                    installPromise(install('android', project, plugins['B']));
-                });
-                waitsFor(function () { return done; }, 'install promise never resolved', 200);
-                runs(function () {
-                    var install = common.spy.getInstall(emit);
-
-                    expect(install).toEqual([
-                        'Install start for "D" on android.',
-                        'Install start for "E" on android.',
-                        'Install start for "B" on android.'
-                    ]);
-                });
-            });
-
-            it('install uses meta data (if available) of top level plugin source', function() {
-                // Fake metadata so plugin 'B' appears from 'meta/B'
-                var meta = require('../src/util/metadata');
-                spyOn(meta, 'get_fetch_metadata').andCallFake(function(){
-                    return {
-                        source: {type: 'dir', url: path.join(plugins['B'], '..', 'meta')}
-                    };
-                });
-
-                runs(function () {
-                    installPromise(install('android', project, plugins['B']));
-                });
-                waitsFor(function () { return done; }, 'install promise never resolved', 200);
-                runs(function () {
-                    var install = common.spy.getInstall(emit);
-
-                    expect(install).toEqual([
-                        'Install start for "D" on android.',
-                        'Install start for "E" on android.',
-                        'Install start for "B" on android.'
-                    ]);
-
-                    var copy = common.spy.startsWith(emit, "Copying from");
-                    expect(copy.length).toBe(3);
-                    expect(copy[0].indexOf(path.normalize('meta/D')) > 0).toBe(true);
-                    expect(copy[1].indexOf(path.normalize('meta/subdir/E')) > 0).toBe(true);
-                });
-            });
-        });
-
-    });
-
-    xdescribe('failure', function() {
-        it('should throw if platform is unrecognized', function() {
-            runs(function() {
-                installPromise( install('atari', project, 'SomePlugin') );
-            });
-            waitsFor(function() { return done; }, 'install promise never resolved', 200);
-            runs(function() {
-                expect(''+done).toContain('atari not supported.');
-            });
-        });
-        it('should throw if variables are missing', function() {
-            runs(function() {
-                installPromise( install('android', project, plugins['VariablePlugin']) );
-            });
-            waitsFor(function(){ return done; }, 'install promise never resolved', 200);
-            runs(function() {
-                expect(''+done).toContain('Variable(s) missing: API_KEY');
-            });
-        });
-        it('should throw if git is not found on the path and a remote url is requested', function() {
-            spyOn(fs, 'existsSync').andCallFake( fake['existsSync']['noPlugins'] );
-            var which_spy = spyOn(shell, 'which').andReturn(null);
-            runs(function() {
-                installPromise( install('android', project, 'https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git') );
-            });
-            waitsFor(function(){ return done; }, 'install promise never resolved', 200);
-            runs(function() {
-                expect(''+done).toContain('"git" command line tool is not installed: make sure it is accessible on your PATH.');
-            });
-        });
-        it('should throw if plugin version is less than the minimum requirement', function(){
-            var spy = spyOn(semver, 'satisfies').andReturn(false);
-            exec.andCallFake(function(cmd, cb) {
-                cb(null, '0.0.1\n');
-            });
-            runs(function() {
-                installPromise( install('android', project, plugins['EnginePlugin']) );
-            });
-            waitsFor(function(){ return done; }, 'install promise never resolved', 200);
-            runs(function() {
-                expect(''+done).toContain('Plugin doesn\'t support this project\'s cordova version. cordova: 0.0.1, failed version requirement: >=2.3.0');
-            });
-        });
-    });
-
-});
-
-
-describe('end', function() {
-
-    it('end', function() {
-        done = false;
-
-        promise.fin(function(err){
-            if(err)
-                events.emit('error', err);
-
-            shell.rm('-rf', project);
-            done = true;
-        });
-
-        waitsFor(function() { return done; }, 'promise never resolved', 500);
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/owner.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/owner.spec.js b/cordova-lib/spec-plugman/owner.spec.js
deleted file mode 100644
index 1c6bd2c..0000000
--- a/cordova-lib/spec-plugman/owner.spec.js
+++ /dev/null
@@ -1,12 +0,0 @@
-var owner = require('../src/owner'),
-    Q = require('q'),
-    registry = require('../src/registry/registry');
-
-describe('owner', function() {
-    it('should run owner', function() {
-        var sOwner = spyOn(registry, 'owner').andReturn(Q());
-        var params = ['add', 'anis', 'com.phonegap.plugins.dummyplugin'];
-        owner(params);
-        expect(sOwner).toHaveBeenCalledWith(params);
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/platform.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platform.spec.js b/cordova-lib/spec-plugman/platform.spec.js
deleted file mode 100644
index 4f8099c..0000000
--- a/cordova-lib/spec-plugman/platform.spec.js
+++ /dev/null
@@ -1,26 +0,0 @@
-var platforms = require('../src/platforms')
-var pluginTags = ["source-file", "header-file", "lib-file", "resource-file", "framework"];
-
-function getTest(platformId, pluginTag) {
-    return function() {
-        it('should exist', function() {
-            expect(platforms[platformId][pluginTag] ).toBeDefined();
-        });
-        it('with an install method', function() {
-            expect(platforms[platformId][pluginTag].install ).toBeDefined();
-        });
-        it('with an uninstall method', function() {
-            expect(platforms[platformId][pluginTag].uninstall ).toBeDefined();
-        });
-    }
-}
-
-for(var platformId in platforms) {
-    for(var index = 0, len = pluginTags.length; index < len; index++) {
-        var funk = getTest(platformId,pluginTags[index]);
-        describe(platformId + " should have a " + pluginTags[index] + " object", funk);
-    }
-
-}
-
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/platforms/amazon-fireos.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platforms/amazon-fireos.spec.js b/cordova-lib/spec-plugman/platforms/amazon-fireos.spec.js
deleted file mode 100644
index 49a8b0d..0000000
--- a/cordova-lib/spec-plugman/platforms/amazon-fireos.spec.js
+++ /dev/null
@@ -1,139 +0,0 @@
-var amazon_fireos = require('../../src/platforms/amazon-fireos'),
-    common  = require('../../src/platforms/common'),
-    install = require('../../src/install'),
-    path    = require('path'),
-    fs      = require('fs'),
-    shell   = require('shelljs'),
-    et      = require('elementtree'),
-    os      = require('osenv'),
-    temp    = path.join(os.tmpdir(), 'plugman'),
-    plugins_dir = path.join(temp, 'cordova', 'plugins'),
-    xml_helpers = require('../../src/util/xml-helpers'),
-    plugins_module = require('../../src/util/plugins'),
-    dummyplugin = path.join(__dirname, '..', 'plugins', 'DummyPlugin'),
-    faultyplugin = path.join(__dirname, '..', 'plugins', 'FaultyPlugin'),
-    variableplugin = path.join(__dirname, '..', 'plugins', 'VariablePlugin'),
-    amazon_fireos_one_project = path.join(__dirname, '..', 'projects', 'android_one', '*'),
-    amazon_fireos_two_project = path.join(__dirname, '..', 'projects', 'android_two', '*');
-
-var xml_path     = path.join(dummyplugin, 'plugin.xml')
-  , xml_text     = fs.readFileSync(xml_path, 'utf-8')
-  , plugin_et    = new et.ElementTree(et.XML(xml_text));
-
-var platformTag = plugin_et.find('./platform[@name="amazon-fireos"]');
-var dummy_id = plugin_et._root.attrib['id'];
-
-var valid_source = platformTag.findall('./source-file'),
-    valid_libs = platformTag.findall('./lib-file'),
-    assets = plugin_et.findall('./asset'),
-    configChanges = platformTag.findall('./config-file');
-
-xml_path  = path.join(faultyplugin, 'plugin.xml')
-xml_text  = fs.readFileSync(xml_path, 'utf-8')
-plugin_et = new et.ElementTree(et.XML(xml_text));
-
-platformTag = plugin_et.find('./platform[@name="amazon-fireos"]');
-var invalid_source = platformTag.findall('./source-file');
-var faulty_id = plugin_et._root.attrib['id'];
-xml_path  = path.join(variableplugin, 'plugin.xml')
-xml_text  = fs.readFileSync(xml_path, 'utf-8')
-plugin_et = new et.ElementTree(et.XML(xml_text));
-platformTag = plugin_et.find('./platform[@name="amazon-fireos"]');
-
-var variable_id = plugin_et._root.attrib['id'];
-var variable_configs = platformTag.findall('./config-file');
-
-function copyArray(arr) {
-    return Array.prototype.slice.call(arr, 0);
-}
-/*
-describe('amazon-fireos project handler', function() {
-    describe('www_dir method', function() {
-        it('should return cordova-amazon-fireos project www location using www_dir', function() {
-            expect(amazon_fireos.www_dir(path.sep)).toEqual(path.sep + path.join('assets', 'www'));
-        });
-    });
-    describe('package_name method', function() {
-        it('should return an amazon-fireos project\'s proper package name', function() {
-            expect(amazon_fireos.package_name(path.join(amazon_fireos_one_project, '..'))).toEqual('com.alunny.childapp');
-        });
-    });
-
-    describe('installation', function() {
-        beforeEach(function() {
-            shell.mkdir('-p', temp);
-        });
-        afterEach(function() {
-            shell.rm('-rf', temp);
-        });
-        describe('of <lib-file> elements', function() {
-            it("should copy jar files to project/libs", function () {
-                var s = spyOn(common, 'copyFile');
-
-                amazon_fireos['lib-file'].install(valid_libs[0], dummyplugin, temp);
-                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/amazon-fireos/TestLib.jar', temp, path.join('libs', 'TestLib.jar'));
-            });
-        });
-        describe('of <source-file> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', amazon_fireos_one_project, temp);
-            });
-
-            it('should copy stuff from one location to another by calling common.copyFile', function() {
-                var source = copyArray(valid_source);
-                var s = spyOn(common, 'copyFile');
-                amazon_fireos['source-file'].install(source[0], dummyplugin, temp);
-                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/amazon-fireos/DummyPlugin.java', temp, path.join('src', 'com', 'phonegap', 'plugins', 'dummyplugin', 'DummyPlugin.java'));
-            });
-            it('should throw if source file cannot be found', function() {
-                var source = copyArray(invalid_source);
-                expect(function() {
-                    amazon_fireos['source-file'].install(source[0], faultyplugin, temp);
-                }).toThrow('"' + path.resolve(faultyplugin, 'src/amazon-fireos/NotHere.java') + '" not found!');
-            });
-            it('should throw if target file already exists', function() {
-                // write out a file
-                var target = path.resolve(temp, 'src/com/phonegap/plugins/dummyplugin');
-                shell.mkdir('-p', target);
-                target = path.join(target, 'DummyPlugin.java');
-                fs.writeFileSync(target, 'some bs', 'utf-8');
-
-                var source = copyArray(valid_source);
-                expect(function() {
-                    amazon_fireos['source-file'].install(source[0], dummyplugin, temp);
-                }).toThrow('"' + target + '" already exists!');
-            });
-        });
-    });
-
-    describe('uninstallation', function() {
-        beforeEach(function() {
-            shell.mkdir('-p', temp);
-            shell.mkdir('-p', plugins_dir);
-            shell.cp('-rf', amazon_fireos_two_project, temp);
-        });
-        afterEach(function() {
-            shell.rm('-rf', temp);
-        });
-        describe('of <lib-file> elements', function(done) {
-            it('should remove jar files', function () {
-                var s = spyOn(common, 'removeFile');
-                amazon_fireos['lib-file'].install(valid_libs[0], dummyplugin, temp);
-                amazon_fireos['lib-file'].uninstall(valid_libs[0], temp, dummy_id);
-                expect(s).toHaveBeenCalledWith(temp, path.join('libs', 'TestLib.jar'));
-            });
-        });
-        describe('of <source-file> elements', function() {
-            it('should remove stuff by calling common.deleteJava', function(done) {
-                var s = spyOn(common, 'deleteJava');
-                install('amazon-fireos', temp, dummyplugin, plugins_dir, {})
-                .then(function() {
-                    var source = copyArray(valid_source);
-                    amazon_fireos['source-file'].uninstall(source[0], temp);
-                    expect(s).toHaveBeenCalledWith(temp, path.join('src', 'com', 'phonegap', 'plugins', 'dummyplugin', 'DummyPlugin.java'));
-                    done();
-                });
-            });
-        });
-    });
-}); */

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/platforms/android.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platforms/android.spec.js b/cordova-lib/spec-plugman/platforms/android.spec.js
deleted file mode 100644
index 57f45fe..0000000
--- a/cordova-lib/spec-plugman/platforms/android.spec.js
+++ /dev/null
@@ -1,156 +0,0 @@
-var android = require('../../src/platforms/android'),
-    common  = require('../../src/platforms/common'),
-    install = require('../../src/install'),
-    path    = require('path'),
-    fs      = require('fs'),
-    shell   = require('shelljs'),
-    et      = require('elementtree'),
-    os      = require('osenv'),
-    temp    = path.join(os.tmpdir(), 'plugman'),
-    plugins_dir = path.join(temp, 'cordova', 'plugins'),
-    xml_helpers = require('../../src/util/xml-helpers'),
-    plugins_module = require('../../src/util/plugins'),
-    dummyplugin = path.join(__dirname, '..', 'plugins', 'DummyPlugin'),
-    faultyplugin = path.join(__dirname, '..', 'plugins', 'FaultyPlugin'),
-    variableplugin = path.join(__dirname, '..', 'plugins', 'VariablePlugin'),
-    android_one_project = path.join(__dirname, '..', 'projects', 'android_one', '*'),
-    android_two_project = path.join(__dirname, '..', 'projects', 'android_two', '*');
-
-var xml_path     = path.join(dummyplugin, 'plugin.xml')
-  , xml_text     = fs.readFileSync(xml_path, 'utf-8')
-  , plugin_et    = new et.ElementTree(et.XML(xml_text));
-
-var platformTag = plugin_et.find('./platform[@name="android"]');
-var dummy_id = plugin_et._root.attrib['id'];
-var valid_source = platformTag.findall('./source-file'),
-    valid_libs = platformTag.findall('./lib-file'),
-    valid_resources = platformTag.findall('./resource-file'),
-    assets = plugin_et.findall('./asset'),
-    configChanges = platformTag.findall('./config-file');
-
-xml_path  = path.join(faultyplugin, 'plugin.xml')
-xml_text  = fs.readFileSync(xml_path, 'utf-8')
-plugin_et = new et.ElementTree(et.XML(xml_text));
-
-platformTag = plugin_et.find('./platform[@name="android"]');
-var invalid_source = platformTag.findall('./source-file');
-var faulty_id = plugin_et._root.attrib['id'];
-
-xml_path  = path.join(variableplugin, 'plugin.xml')
-xml_text  = fs.readFileSync(xml_path, 'utf-8')
-plugin_et = new et.ElementTree(et.XML(xml_text));
-platformTag = plugin_et.find('./platform[@name="android"]');
-
-var variable_id = plugin_et._root.attrib['id'];
-var variable_configs = platformTag.findall('./config-file');
-
-function copyArray(arr) {
-    return Array.prototype.slice.call(arr, 0);
-}
-
-describe('android project handler', function() {
-    describe('www_dir method', function() {
-        it('should return cordova-android project www location using www_dir', function() {
-            expect(android.www_dir(path.sep)).toEqual(path.sep + path.join('assets', 'www'));
-        });
-    });
-    describe('package_name method', function() {
-        it('should return an android project\'s proper package name', function() {
-            expect(android.package_name(path.join(android_one_project, '..'))).toEqual('com.alunny.childapp');
-        });
-    });
-
-    describe('installation', function() {
-        beforeEach(function() {
-            shell.mkdir('-p', temp);
-        });
-        afterEach(function() {
-            shell.rm('-rf', temp);
-        });
-        describe('of <lib-file> elements', function() {
-            it("should copy jar files to project/libs", function () {
-                var s = spyOn(common, 'copyFile');
-
-                android['lib-file'].install(valid_libs[0], dummyplugin, temp);
-                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/android/TestLib.jar', temp, path.join('libs', 'TestLib.jar'));
-            });
-        });
-        describe('of <resource-file> elements', function() {
-            it("should copy files", function () {
-                var s = spyOn(common, 'copyFile');
-
-                android['resource-file'].install(valid_resources[0], dummyplugin, temp);
-                expect(s).toHaveBeenCalledWith(dummyplugin, 'android-resource.xml', temp, path.join('res', 'xml', 'dummy.xml'));
-            });
-        });
-        describe('of <source-file> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', android_one_project, temp);
-            });
-
-            it('should copy stuff from one location to another by calling common.copyFile', function() {
-                var source = copyArray(valid_source);
-                var s = spyOn(common, 'copyFile');
-                android['source-file'].install(source[0], dummyplugin, temp);
-                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/android/DummyPlugin.java', temp, path.join('src', 'com', 'phonegap', 'plugins', 'dummyplugin', 'DummyPlugin.java'));
-            });
-            it('should throw if source file cannot be found', function() {
-                var source = copyArray(invalid_source);
-                expect(function() {
-                    android['source-file'].install(source[0], faultyplugin, temp);
-                }).toThrow('"' + path.resolve(faultyplugin, 'src/android/NotHere.java') + '" not found!');
-            });
-            it('should throw if target file already exists', function() {
-                // write out a file
-                var target = path.resolve(temp, 'src/com/phonegap/plugins/dummyplugin');
-                shell.mkdir('-p', target);
-                target = path.join(target, 'DummyPlugin.java');
-                fs.writeFileSync(target, 'some bs', 'utf-8');
-
-                var source = copyArray(valid_source);
-                expect(function() {
-                    android['source-file'].install(source[0], dummyplugin, temp);
-                }).toThrow('"' + target + '" already exists!');
-            });
-        });
-    });
-
-    describe('uninstallation', function() {
-        beforeEach(function() {
-            shell.mkdir('-p', temp);
-            shell.mkdir('-p', plugins_dir);
-            shell.cp('-rf', android_two_project, temp);
-        });
-        afterEach(function() {
-            shell.rm('-rf', temp);
-        });
-        describe('of <lib-file> elements', function(done) {
-            it('should remove jar files', function () {
-                var s = spyOn(common, 'removeFile');
-                android['lib-file'].install(valid_libs[0], dummyplugin, temp);
-                android['lib-file'].uninstall(valid_libs[0], temp, dummy_id);
-                expect(s).toHaveBeenCalledWith(temp, path.join('libs', 'TestLib.jar'));
-            });
-        });
-        describe('of <resource-file> elements', function(done) {
-            it('should remove files', function () {
-                var s = spyOn(common, 'removeFile');
-                android['resource-file'].install(valid_resources[0], dummyplugin, temp);
-                android['resource-file'].uninstall(valid_resources[0], temp, dummy_id);
-                expect(s).toHaveBeenCalledWith(temp, path.join('res', 'xml', 'dummy.xml'));
-            });
-        });
-        describe('of <source-file> elements', function() {
-            it('should remove stuff by calling common.deleteJava', function(done) {
-                var s = spyOn(common, 'deleteJava');
-                install('android', temp, dummyplugin, plugins_dir, {})
-                .then(function() {
-                    var source = copyArray(valid_source);
-                    android['source-file'].uninstall(source[0], temp);
-                    expect(s).toHaveBeenCalledWith(temp, path.join('src', 'com', 'phonegap', 'plugins', 'dummyplugin', 'DummyPlugin.java'));
-                    done();
-                });
-            });
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/platforms/blackberry10.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platforms/blackberry10.spec.js b/cordova-lib/spec-plugman/platforms/blackberry10.spec.js
deleted file mode 100644
index bfdf926..0000000
--- a/cordova-lib/spec-plugman/platforms/blackberry10.spec.js
+++ /dev/null
@@ -1,148 +0,0 @@
-var blackberry10 = require('../../src/platforms/blackberry10'),
-    common = require('../../src/platforms/common'),
-    install = require('../../src/install'),
-    path = require('path'),
-    fs = require('fs'),
-    shell = require('shelljs'),
-    et = require('elementtree'),
-    os = require('osenv'),
-    temp = path.join(os.tmpdir(), 'plugman'),
-    plugins_dir = path.join(temp, 'cordova', 'plugins'),
-    xml_helpers = require('../../src/util/xml-helpers'),
-    plugins_module = require('../../src/util/plugins'),
-    blackberry10_project = path.join(__dirname, '..', 'projects', 'blackberry10', '*'),
-    plugins = {
-        dummy: parsePlugin(path.join(__dirname, '..', 'plugins', 'DummyPlugin')),
-        faulty: parsePlugin(path.join(__dirname, '..', 'plugins', 'FaultyPlugin')),
-        echo: parsePlugin(path.join(__dirname, '..', 'plugins', 'cordova.echo'))
-    };
-
-function copyArray(arr) {
-    return Array.prototype.slice.call(arr, 0);
-}
-
-function parsePlugin (pluginPath) {
-    var pluginXML = fs.readFileSync(path.join(pluginPath, "plugin.xml"), "utf-8"),
-        pluginEt = new et.ElementTree(et.XML(pluginXML)),
-        platformTag = pluginEt.find('./platform[@name="blackberry10"]');
-
-    return {
-        path: pluginPath,
-        id: pluginEt._root.attrib.id,
-        assets: pluginEt.findall('./asset'),
-        srcFiles: platformTag.findall('./source-file'),
-        configChanges: platformTag.findall('./config-file'),
-        libFiles: platformTag.findall('./lib-file')
-    };
-}
-
-
-describe('blackberry10 project handler', function() {
-    describe('www_dir method', function() {
-        it('should return cordova-blackberry10 project www location using www_dir', function() {
-            expect(blackberry10.www_dir(path.sep)).toEqual(path.sep + 'www');
-        });
-    });
-
-    describe('package_name method', function() {
-        it('should return a blackberry10 project\'s proper package name', function() {
-            expect(blackberry10.package_name(path.join(blackberry10_project, '..'))).toEqual('cordovaExample');
-        });
-    });
-
-    describe('installation', function() {
-        beforeEach(function() {
-            shell.mkdir('-p', temp);
-            shell.cp('-rf', blackberry10_project, temp);
-        });
-        afterEach(function() {
-            shell.rm('-rf', temp);
-        });
-        describe('of <lib-file> elements', function() {
-            it("should copy so files to native/target/plugins", function () {
-                var plugin = plugins.echo,
-                    libs = copyArray(plugin.libFiles),
-                    s = spyOn(common, 'copyFile');
-
-                blackberry10['lib-file'].install(libs[0], plugin.path, temp);
-                expect(s).toHaveBeenCalledWith(plugin.path, 'src/blackberry10/native/device/echoJnext.so', temp, path.join('native', 'device', 'plugins', 'jnext', 'echoJnext.so'));
-            });
-        });
-        describe('of <source-file> elements', function() {
-            it('should copy stuff from one location to another by calling common.copyFile', function() {
-                var plugin = plugins.echo,
-                    source = copyArray(plugin.srcFiles);
-                    s = spyOn(common, 'copyFile');
-
-                blackberry10['source-file'].install(source[0], plugin.path, temp, plugin.id);
-                expect(s).toHaveBeenCalledWith(plugin.path, 'src/blackberry10/index.js', temp, path.join('native', 'device', 'chrome', 'plugin', 'cordova.echo', 'index.js'));
-                expect(s).toHaveBeenCalledWith(plugin.path, 'src/blackberry10/index.js', temp, path.join('native', 'simulator', 'chrome', 'plugin', 'cordova.echo', 'index.js'));
-            });
-            it('defaults to plugin id when dest is not present', function() {
-                var source = copyArray(plugins.dummy.srcFiles);
-                var s = spyOn(common, 'copyFile');
-                blackberry10['source-file'].install(source[0], plugins.dummy.path, temp, plugins.dummy.id);
-                expect(s).toHaveBeenCalledWith(plugins.dummy.path, 'src/blackberry10/index.js', temp, path.join('native', 'device', 'chrome', 'plugin', plugins.dummy.id, 'index.js'));
-                expect(s).toHaveBeenCalledWith(plugins.dummy.path, 'src/blackberry10/index.js', temp, path.join('native', 'simulator', 'chrome', 'plugin', plugins.dummy.id, 'index.js'));
-            });
-            it('should throw if source file cannot be found', function() {
-                var source = copyArray(plugins.faulty.srcFiles);
-                expect(function() {
-                    blackberry10['source-file'].install(source[0], plugins.faulty.path, temp, plugins.faulty.id);
-                }).toThrow('"' + path.resolve(plugins.faulty.path, 'src/blackberry10/index.js') + '" not found!');
-            });
-            it('should throw if target file already exists', function() {
-                // write out a file
-                var target = path.resolve(temp, 'native/device/chrome/plugin/com.phonegap.plugins.dummyplugin');
-                shell.mkdir('-p', target);
-                target = path.join(target, 'index.js');
-                fs.writeFileSync(target, 'some bs', 'utf-8');
-
-                var source = copyArray(plugins.dummy.srcFiles);
-                expect(function() {
-                    blackberry10['source-file'].install(source[0], plugins.dummy.path, temp, plugins.dummy.id);
-                }).toThrow('"' + target + '" already exists!');
-            });
-        });
-    });
-
-    describe('uninstallation', function() {
-        beforeEach(function() {
-            shell.mkdir('-p', temp);
-            shell.cp('-rf', blackberry10_project, temp);
-        });
-        afterEach(function() {
-            shell.rm('-rf', temp);
-        });
-        describe('of <source-file> elements', function() {
-            it('should remove stuff by calling common.removeFile', function() {
-                var s = spyOn(common, 'removeFile'),
-                    plugin = plugins.echo;
-                var source = copyArray(plugin.srcFiles);
-                blackberry10['source-file'].install(source[0], plugin.path, temp, plugin.id);
-                blackberry10['source-file'].uninstall(source[0], temp, plugin.id);
-                expect(s).toHaveBeenCalledWith(temp, path.join('native', 'device', 'chrome', 'plugin', 'cordova.echo', 'index.js'));
-                expect(s).toHaveBeenCalledWith(temp, path.join('native', 'simulator', 'chrome', 'plugin', 'cordova.echo', 'index.js'));
-            });
-            it('should remove stuff by calling common.removeFile', function() {
-                var s = spyOn(common, 'removeFile'),
-                    plugin = plugins.dummy;
-                var source = copyArray(plugin.srcFiles);
-                blackberry10['source-file'].install(source[0], plugin.path, temp, plugin.id);
-                blackberry10['source-file'].uninstall(source[0], temp, plugin.id);
-                expect(s).toHaveBeenCalledWith(temp, path.join('native', 'device', 'chrome', 'plugin', plugin.id, 'index.js'));
-                expect(s).toHaveBeenCalledWith(temp, path.join('native', 'simulator', 'chrome', 'plugin', plugin.id, 'index.js'));
-            });
-        });
-        describe('of <lib-file> elements', function(done) {
-            it("should remove so files from www/plugins", function () {
-                var s = spyOn(common, 'removeFile'),
-                    plugin = plugins.echo;
-                var source = copyArray(plugin.libFiles);
-                blackberry10['lib-file'].install(source[0], plugin.path, temp, plugin.id);
-                blackberry10['lib-file'].uninstall(source[0], temp, plugin.id);
-                expect(s).toHaveBeenCalledWith(temp, path.join('native','device','plugins','jnext','echoJnext.so'));
-            });
-        });
-    });
-});


[41/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContact.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContact.m b/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContact.m
new file mode 100644
index 0000000..82704ea
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContact.m
@@ -0,0 +1,1752 @@
+/*
+ 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.
+ */
+
+#import "CDVContact.h"
+#import <Cordova/NSDictionary+Extensions.h>
+
+#define DATE_OR_NULL(dateObj) ((aDate != nil) ? (id)([aDate descriptionWithLocale:[NSLocale currentLocale]]) : (id)([NSNull null]))
+#define IS_VALID_VALUE(value) ((value != nil) && (![value isKindOfClass:[NSNull class]]))
+
+static NSDictionary* org_apache_cordova_contacts_W3CtoAB = nil;
+static NSDictionary* org_apache_cordova_contacts_ABtoW3C = nil;
+static NSSet* org_apache_cordova_contacts_W3CtoNull = nil;
+static NSDictionary* org_apache_cordova_contacts_objectAndProperties = nil;
+static NSDictionary* org_apache_cordova_contacts_defaultFields = nil;
+
+@implementation CDVContact : NSObject
+
+                             @synthesize returnFields;
+
+- (id)init
+{
+    if ((self = [super init]) != nil) {
+        ABRecordRef rec = ABPersonCreate();
+        self.record = rec;
+        if (rec) {
+            CFRelease(rec);
+        }
+    }
+    return self;
+}
+
+- (id)initFromABRecord:(ABRecordRef)aRecord
+{
+    if ((self = [super init]) != nil) {
+        self.record = aRecord;
+    }
+    return self;
+}
+
+/* synthesize 'record' ourselves to have retain properties for CF types */
+
+- (void)setRecord:(ABRecordRef)aRecord
+{
+    if (record != NULL) {
+        CFRelease(record);
+    }
+    if (aRecord != NULL) {
+        record = CFRetain(aRecord);
+    }
+}
+
+- (ABRecordRef)record
+{
+    return record;
+}
+
+/* Rather than creating getters and setters for each AddressBook (AB) Property, generic methods are used to deal with
+ * simple properties,  MultiValue properties( phone numbers and emails) and MultiValueDictionary properties (Ims and addresses).
+ * The dictionaries below are used to translate between the W3C identifiers and the AB properties.   Using the dictionaries,
+ * allows looping through sets of properties to extract from or set into the W3C dictionary to/from the ABRecord.
+ */
+
+/* The two following dictionaries translate between W3C properties and AB properties.  It currently mixes both
+ * Properties (kABPersonAddressProperty for example) and Strings (kABPersonAddressStreetKey) so users should be aware of
+ * what types of values are expected.
+ * a bit.
+*/
++ (NSDictionary*)defaultABtoW3C
+{
+    if (org_apache_cordova_contacts_ABtoW3C == nil) {
+        org_apache_cordova_contacts_ABtoW3C = [NSDictionary dictionaryWithObjectsAndKeys:
+            kW3ContactNickname, [NSNumber numberWithInt:kABPersonNicknameProperty],
+            kW3ContactGivenName, [NSNumber numberWithInt:kABPersonFirstNameProperty],
+            kW3ContactFamilyName, [NSNumber numberWithInt:kABPersonLastNameProperty],
+            kW3ContactMiddleName, [NSNumber numberWithInt:kABPersonMiddleNameProperty],
+            kW3ContactHonorificPrefix, [NSNumber numberWithInt:kABPersonPrefixProperty],
+            kW3ContactHonorificSuffix, [NSNumber numberWithInt:kABPersonSuffixProperty],
+            kW3ContactPhoneNumbers, [NSNumber numberWithInt:kABPersonPhoneProperty],
+            kW3ContactAddresses, [NSNumber numberWithInt:kABPersonAddressProperty],
+            kW3ContactStreetAddress, kABPersonAddressStreetKey,
+            kW3ContactLocality, kABPersonAddressCityKey,
+            kW3ContactRegion, kABPersonAddressStateKey,
+            kW3ContactPostalCode, kABPersonAddressZIPKey,
+            kW3ContactCountry, kABPersonAddressCountryKey,
+            kW3ContactEmails, [NSNumber numberWithInt:kABPersonEmailProperty],
+            kW3ContactIms, [NSNumber numberWithInt:kABPersonInstantMessageProperty],
+            kW3ContactOrganizations, [NSNumber numberWithInt:kABPersonOrganizationProperty],
+            kW3ContactOrganizationName, [NSNumber numberWithInt:kABPersonOrganizationProperty],
+            kW3ContactTitle, [NSNumber numberWithInt:kABPersonJobTitleProperty],
+            kW3ContactDepartment, [NSNumber numberWithInt:kABPersonDepartmentProperty],
+            kW3ContactBirthday, [NSNumber numberWithInt:kABPersonBirthdayProperty],
+            kW3ContactUrls, [NSNumber numberWithInt:kABPersonURLProperty],
+            kW3ContactNote, [NSNumber numberWithInt:kABPersonNoteProperty],
+            nil];
+    }
+
+    return org_apache_cordova_contacts_ABtoW3C;
+}
+
++ (NSDictionary*)defaultW3CtoAB
+{
+    if (org_apache_cordova_contacts_W3CtoAB == nil) {
+        org_apache_cordova_contacts_W3CtoAB = [NSDictionary dictionaryWithObjectsAndKeys:
+            [NSNumber numberWithInt:kABPersonNicknameProperty], kW3ContactNickname,
+            [NSNumber numberWithInt:kABPersonFirstNameProperty], kW3ContactGivenName,
+            [NSNumber numberWithInt:kABPersonLastNameProperty], kW3ContactFamilyName,
+            [NSNumber numberWithInt:kABPersonMiddleNameProperty], kW3ContactMiddleName,
+            [NSNumber numberWithInt:kABPersonPrefixProperty], kW3ContactHonorificPrefix,
+            [NSNumber numberWithInt:kABPersonSuffixProperty], kW3ContactHonorificSuffix,
+            [NSNumber numberWithInt:kABPersonPhoneProperty], kW3ContactPhoneNumbers,
+            [NSNumber numberWithInt:kABPersonAddressProperty], kW3ContactAddresses,
+            kABPersonAddressStreetKey, kW3ContactStreetAddress,
+            kABPersonAddressCityKey, kW3ContactLocality,
+            kABPersonAddressStateKey, kW3ContactRegion,
+            kABPersonAddressZIPKey, kW3ContactPostalCode,
+            kABPersonAddressCountryKey, kW3ContactCountry,
+            [NSNumber numberWithInt:kABPersonEmailProperty], kW3ContactEmails,
+            [NSNumber numberWithInt:kABPersonInstantMessageProperty], kW3ContactIms,
+            [NSNumber numberWithInt:kABPersonOrganizationProperty], kW3ContactOrganizations,
+            [NSNumber numberWithInt:kABPersonJobTitleProperty], kW3ContactTitle,
+            [NSNumber numberWithInt:kABPersonDepartmentProperty], kW3ContactDepartment,
+            [NSNumber numberWithInt:kABPersonBirthdayProperty], kW3ContactBirthday,
+            [NSNumber numberWithInt:kABPersonNoteProperty], kW3ContactNote,
+            [NSNumber numberWithInt:kABPersonURLProperty], kW3ContactUrls,
+            kABPersonInstantMessageUsernameKey, kW3ContactImValue,
+            kABPersonInstantMessageServiceKey, kW3ContactImType,
+            [NSNull null], kW3ContactFieldType,     /* include entries in dictionary to indicate ContactField properties */
+            [NSNull null], kW3ContactFieldValue,
+            [NSNull null], kW3ContactFieldPrimary,
+            [NSNull null], kW3ContactFieldId,
+            [NSNumber numberWithInt:kABPersonOrganizationProperty], kW3ContactOrganizationName,      /* careful, name is used multiple times*/
+            nil];
+    }
+    return org_apache_cordova_contacts_W3CtoAB;
+}
+
++ (NSSet*)defaultW3CtoNull
+{
+    // these are values that have no AddressBook Equivalent OR have not been implemented yet
+    if (org_apache_cordova_contacts_W3CtoNull == nil) {
+        org_apache_cordova_contacts_W3CtoNull = [NSSet setWithObjects:kW3ContactDisplayName,
+            kW3ContactCategories, kW3ContactFormattedName, nil];
+    }
+    return org_apache_cordova_contacts_W3CtoNull;
+}
+
+/*
+ *	The objectAndProperties dictionary contains the all of the properties of the W3C Contact Objects specified by the key
+ *	Used in calcReturnFields, and various extract<Property> methods
+ */
++ (NSDictionary*)defaultObjectAndProperties
+{
+    if (org_apache_cordova_contacts_objectAndProperties == nil) {
+        org_apache_cordova_contacts_objectAndProperties = [NSDictionary dictionaryWithObjectsAndKeys:
+            [NSArray arrayWithObjects:kW3ContactGivenName, kW3ContactFamilyName,
+            kW3ContactMiddleName, kW3ContactHonorificPrefix, kW3ContactHonorificSuffix, kW3ContactFormattedName, nil], kW3ContactName,
+            [NSArray arrayWithObjects:kW3ContactStreetAddress, kW3ContactLocality, kW3ContactRegion,
+            kW3ContactPostalCode, kW3ContactCountry, /*kW3ContactAddressFormatted,*/ nil], kW3ContactAddresses,
+            [NSArray arrayWithObjects:kW3ContactOrganizationName, kW3ContactTitle, kW3ContactDepartment, nil], kW3ContactOrganizations,
+            [NSArray arrayWithObjects:kW3ContactFieldType, kW3ContactFieldValue, kW3ContactFieldPrimary, nil], kW3ContactPhoneNumbers,
+            [NSArray arrayWithObjects:kW3ContactFieldType, kW3ContactFieldValue, kW3ContactFieldPrimary, nil], kW3ContactEmails,
+            [NSArray arrayWithObjects:kW3ContactFieldType, kW3ContactFieldValue, kW3ContactFieldPrimary, nil], kW3ContactPhotos,
+            [NSArray arrayWithObjects:kW3ContactFieldType, kW3ContactFieldValue, kW3ContactFieldPrimary, nil], kW3ContactUrls,
+            [NSArray arrayWithObjects:kW3ContactImValue, kW3ContactImType, nil], kW3ContactIms,
+            nil];
+    }
+    return org_apache_cordova_contacts_objectAndProperties;
+}
+
++ (NSDictionary*)defaultFields
+{
+    if (org_apache_cordova_contacts_defaultFields == nil) {
+        org_apache_cordova_contacts_defaultFields = [NSDictionary dictionaryWithObjectsAndKeys:
+            [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactName], kW3ContactName,
+            [NSNull null], kW3ContactNickname,
+            [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactAddresses], kW3ContactAddresses,
+            [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactOrganizations], kW3ContactOrganizations,
+            [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactPhoneNumbers], kW3ContactPhoneNumbers,
+            [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactEmails], kW3ContactEmails,
+            [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactIms], kW3ContactIms,
+            [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactPhotos], kW3ContactPhotos,
+            [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactUrls], kW3ContactUrls,
+            [NSNull null], kW3ContactBirthday,
+            [NSNull null], kW3ContactNote,
+            nil];
+    }
+    return org_apache_cordova_contacts_defaultFields;
+}
+
+/*  Translate W3C Contact data into ABRecordRef
+ *
+ *	New contact information comes in as a NSMutableDictionary.  All Null entries in Contact object are set
+ *	as [NSNull null] in the dictionary when translating from the JSON input string of Contact data. However, if
+ *  user did not set a value within a Contact object or sub-object (by not using the object constructor) some data
+ *	may not exist.
+ *  bUpdate = YES indicates this is a save of an existing record
+ */
+- (bool)setFromContactDict:(NSDictionary*)aContact asUpdate:(BOOL)bUpdate
+{
+    if (![aContact isKindOfClass:[NSDictionary class]]) {
+        return FALSE; // can't do anything if no dictionary!
+    }
+
+    ABRecordRef person = self.record;
+    bool bSuccess = TRUE;
+    CFErrorRef error;
+
+    // set name info
+    // iOS doesn't have displayName - might have to pull parts from it to create name
+    bool bName = false;
+    NSDictionary* dict = [aContact valueForKey:kW3ContactName];
+    if ([dict isKindOfClass:[NSDictionary class]]) {
+        bName = true;
+        NSArray* propArray = [[CDVContact defaultObjectAndProperties] objectForKey:kW3ContactName];
+
+        for (id i in propArray) {
+            if (![(NSString*)i isEqualToString : kW3ContactFormattedName]) { // kW3ContactFormattedName is generated from ABRecordCopyCompositeName() and can't be set
+                [self setValue:[dict valueForKey:i] forProperty:(ABPropertyID)[(NSNumber*)[[CDVContact defaultW3CtoAB] objectForKey:i] intValue]
+                      inRecord:person asUpdate:bUpdate];
+            }
+        }
+    }
+
+    id nn = [aContact valueForKey:kW3ContactNickname];
+    if (![nn isKindOfClass:[NSNull class]]) {
+        bName = true;
+        [self setValue:nn forProperty:kABPersonNicknameProperty inRecord:person asUpdate:bUpdate];
+    }
+    if (!bName) {
+        // if no name or nickname - try and use displayName as W3Contact must have displayName or ContactName
+        [self setValue:[aContact valueForKey:kW3ContactDisplayName] forProperty:kABPersonNicknameProperty
+              inRecord:person asUpdate:bUpdate];
+    }
+
+    // set phoneNumbers
+    // NSLog(@"setting phoneNumbers");
+    NSArray* array = [aContact valueForKey:kW3ContactPhoneNumbers];
+    if ([array isKindOfClass:[NSArray class]]) {
+        [self setMultiValueStrings:array forProperty:kABPersonPhoneProperty inRecord:person asUpdate:bUpdate];
+    }
+    // set Emails
+    // NSLog(@"setting emails");
+    array = [aContact valueForKey:kW3ContactEmails];
+    if ([array isKindOfClass:[NSArray class]]) {
+        [self setMultiValueStrings:array forProperty:kABPersonEmailProperty inRecord:person asUpdate:bUpdate];
+    }
+    // set Urls
+    // NSLog(@"setting urls");
+    array = [aContact valueForKey:kW3ContactUrls];
+    if ([array isKindOfClass:[NSArray class]]) {
+        [self setMultiValueStrings:array forProperty:kABPersonURLProperty inRecord:person asUpdate:bUpdate];
+    }
+
+    // set multivalue dictionary properties
+    // set addresses:  streetAddress, locality, region, postalCode, country
+    // set ims:  value = username, type = servicetype
+    // iOS addresses and im are a MultiValue Properties with label, value=dictionary of  info, and id
+    // NSLog(@"setting addresses");
+    error = nil;
+    array = [aContact valueForKey:kW3ContactAddresses];
+    if ([array isKindOfClass:[NSArray class]]) {
+        [self setMultiValueDictionary:array forProperty:kABPersonAddressProperty inRecord:person asUpdate:bUpdate];
+    }
+    // ims
+    // NSLog(@"setting ims");
+    array = [aContact valueForKey:kW3ContactIms];
+    if ([array isKindOfClass:[NSArray class]]) {
+        [self setMultiValueDictionary:array forProperty:kABPersonInstantMessageProperty inRecord:person asUpdate:bUpdate];
+    }
+
+    // organizations
+    // W3C ContactOrganization has pref, type, name, title, department
+    // iOS only supports name, title, department
+    // NSLog(@"setting organizations");
+    // TODO this may need work - should Organization information be removed when array is empty??
+    array = [aContact valueForKey:kW3ContactOrganizations];  // iOS only supports one organization - use first one
+    if ([array isKindOfClass:[NSArray class]]) {
+        BOOL bRemove = NO;
+        NSDictionary* dict = nil;
+        if ([array count] > 0) {
+            dict = [array objectAtIndex:0];
+        } else {
+            // remove the organization info entirely
+            bRemove = YES;
+        }
+        if ([dict isKindOfClass:[NSDictionary class]] || (bRemove == YES)) {
+            [self setValue:(bRemove ? @"" : [dict valueForKey:@"name"]) forProperty:kABPersonOrganizationProperty inRecord:person asUpdate:bUpdate];
+            [self setValue:(bRemove ? @"" : [dict valueForKey:kW3ContactTitle]) forProperty:kABPersonJobTitleProperty inRecord:person asUpdate:bUpdate];
+            [self setValue:(bRemove ? @"" : [dict valueForKey:kW3ContactDepartment]) forProperty:kABPersonDepartmentProperty inRecord:person asUpdate:bUpdate];
+        }
+    }
+    // add dates
+    // Dates come in as milliseconds in NSNumber Object
+    id ms = [aContact valueForKey:kW3ContactBirthday];
+    NSDate* aDate = nil;
+    if (ms && [ms isKindOfClass:[NSNumber class]]) {
+        double msValue = [ms doubleValue];
+        msValue = msValue / 1000;
+        aDate = [NSDate dateWithTimeIntervalSince1970:msValue];
+    }
+    if ((aDate != nil) || [ms isKindOfClass:[NSString class]]) {
+        [self setValue:aDate != nil ? aDate:ms forProperty:kABPersonBirthdayProperty inRecord:person asUpdate:bUpdate];
+    }
+    // don't update creation date
+    // modification date will get updated when save
+    // anniversary is removed from W3C Contact api Dec 9, 2010 spec - don't waste time on it yet
+
+    // kABPersonDateProperty
+
+    // kABPersonAnniversaryLabel
+
+    // iOS doesn't have gender - ignore
+    // note
+    [self setValue:[aContact valueForKey:kW3ContactNote] forProperty:kABPersonNoteProperty inRecord:person asUpdate:bUpdate];
+
+    // iOS doesn't have preferredName- ignore
+
+    // photo
+    array = [aContact valueForKey:kW3ContactPhotos];
+    if ([array isKindOfClass:[NSArray class]]) {
+        if (bUpdate && ([array count] == 0)) {
+            // remove photo
+            bSuccess = ABPersonRemoveImageData(person, &error);
+        } else if ([array count] > 0) {
+            NSDictionary* dict = [array objectAtIndex:0]; // currently only support one photo
+            if ([dict isKindOfClass:[NSDictionary class]]) {
+                id value = [dict objectForKey:kW3ContactFieldValue];
+                if ([value isKindOfClass:[NSString class]]) {
+                    if (bUpdate && ([value length] == 0)) {
+                        // remove the current image
+                        bSuccess = ABPersonRemoveImageData(person, &error);
+                    } else {
+                        // use this image
+                        // don't know if string is encoded or not so first unencode it then encode it again
+                        NSString* cleanPath = [value stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
+                        NSURL* photoUrl = [NSURL URLWithString:[cleanPath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
+                        // caller is responsible for checking for a connection, if no connection this will fail
+                        NSError* err = nil;
+                        NSData* data = nil;
+                        if (photoUrl) {
+                            data = [NSData dataWithContentsOfURL:photoUrl options:NSDataReadingUncached error:&err];
+                        }
+                        if (data && ([data length] > 0)) {
+                            bSuccess = ABPersonSetImageData(person, (__bridge CFDataRef)data, &error);
+                        }
+                        if (!data || !bSuccess) {
+                            NSLog(@"error setting contact image: %@", (err != nil ? [err localizedDescription] : @""));
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    // TODO WebURLs
+
+    // TODO timezone
+
+    return bSuccess;
+}
+
+/* Set item into an AddressBook Record for the specified property.
+ * aValue - the value to set into the address book (code checks for null or [NSNull null]
+ * aProperty - AddressBook property ID
+ * aRecord - the record to update
+ * bUpdate - whether this is a possible update vs a new entry
+ * RETURN
+ *	true - property was set (or input value as null)
+ *	false - property was not set
+ */
+- (bool)setValue:(id)aValue forProperty:(ABPropertyID)aProperty inRecord:(ABRecordRef)aRecord asUpdate:(BOOL)bUpdate
+{
+    bool bSuccess = true;  // if property was null, just ignore and return success
+    CFErrorRef error;
+
+    if (aValue && ![aValue isKindOfClass:[NSNull class]]) {
+        if (bUpdate && ([aValue isKindOfClass:[NSString class]] && ([aValue length] == 0))) { // if updating, empty string means to delete
+            aValue = NULL;
+        } // really only need to set if different - more efficient to just update value or compare and only set if necessary???
+        bSuccess = ABRecordSetValue(aRecord, aProperty, (__bridge CFTypeRef)aValue, &error);
+        if (!bSuccess) {
+            NSLog(@"error setting %d property", aProperty);
+        }
+    }
+
+    return bSuccess;
+}
+
+- (bool)removeProperty:(ABPropertyID)aProperty inRecord:(ABRecordRef)aRecord
+{
+    CFErrorRef err;
+    bool bSuccess = ABRecordRemoveValue(aRecord, aProperty, &err);
+
+    if (!bSuccess) {
+        CFStringRef errDescription = CFErrorCopyDescription(err);
+        NSLog(@"Unable to remove property %d: %@", aProperty, errDescription);
+        CFRelease(errDescription);
+    }
+    return bSuccess;
+}
+
+- (bool)addToMultiValue:(ABMultiValueRef)multi fromDictionary:dict
+{
+    bool bSuccess = FALSE;
+    id value = [dict valueForKey:kW3ContactFieldValue];
+
+    if (IS_VALID_VALUE(value)) {
+        CFStringRef label = [CDVContact convertContactTypeToPropertyLabel:[dict valueForKey:kW3ContactFieldType]];
+        bSuccess = ABMultiValueAddValueAndLabel(multi, (__bridge CFTypeRef)value, label, NULL);
+        if (!bSuccess) {
+            NSLog(@"Error setting Value: %@ and label: %@", value, label);
+        }
+    }
+    return bSuccess;
+}
+
+- (ABMultiValueRef)allocStringMultiValueFromArray:array
+{
+    ABMutableMultiValueRef multi = ABMultiValueCreateMutable(kABMultiStringPropertyType);
+
+    for (NSDictionary* dict in array) {
+        [self addToMultiValue:multi fromDictionary:dict];
+    }
+
+    return multi;  // caller is responsible for releasing multi
+}
+
+- (bool)setValue:(CFTypeRef)value forProperty:(ABPropertyID)prop inRecord:(ABRecordRef)person
+{
+    CFErrorRef error;
+    bool bSuccess = ABRecordSetValue(person, prop, value, &error);
+
+    if (!bSuccess) {
+        NSLog(@"Error setting value for property: %d", prop);
+    }
+    return bSuccess;
+}
+
+/* Set MultiValue string properties into Address Book Record.
+ * NSArray* fieldArray - array of dictionaries containing W3C properties to be set into record
+ * ABPropertyID prop - the property to be set (generally used for phones and emails)
+ * ABRecordRef  person - the record to set values into
+ * BOOL bUpdate - whether or not to update date or set as new.
+ *	When updating:
+ *	  empty array indicates to remove entire property
+ *	  empty string indicates to remove
+ *    [NSNull null] do not modify (keep existing record value)
+ * RETURNS
+ * bool false indicates error
+ *
+ * used for phones and emails
+ */
+- (bool)setMultiValueStrings:(NSArray*)fieldArray forProperty:(ABPropertyID)prop inRecord:(ABRecordRef)person asUpdate:(BOOL)bUpdate
+{
+    bool bSuccess = TRUE;
+    ABMutableMultiValueRef multi = nil;
+
+    if (!bUpdate) {
+        multi = [self allocStringMultiValueFromArray:fieldArray];
+        bSuccess = [self setValue:multi forProperty:prop inRecord:person];
+    } else if (bUpdate && ([fieldArray count] == 0)) {
+        // remove entire property
+        bSuccess = [self removeProperty:prop inRecord:person];
+    } else { // check for and apply changes
+        ABMultiValueRef copy = ABRecordCopyValue(person, prop);
+        if (copy != nil) {
+            multi = ABMultiValueCreateMutableCopy(copy);
+            CFRelease(copy);
+
+            for (NSDictionary* dict in fieldArray) {
+                id val;
+                NSString* label = nil;
+                val = [dict valueForKey:kW3ContactFieldValue];
+                label = (__bridge NSString*)[CDVContact convertContactTypeToPropertyLabel:[dict valueForKey:kW3ContactFieldType]];
+                if (IS_VALID_VALUE(val)) {
+                    // is an update,  find index of entry with matching id, if values are different, update.
+                    id idValue = [dict valueForKey:kW3ContactFieldId];
+                    int identifier = [idValue isKindOfClass:[NSNumber class]] ? [idValue intValue] : -1;
+                    CFIndex i = identifier >= 0 ? ABMultiValueGetIndexForIdentifier(multi, identifier) : kCFNotFound;
+                    if (i != kCFNotFound) {
+                        if ([val length] == 0) {
+                            // remove both value and label
+                            ABMultiValueRemoveValueAndLabelAtIndex(multi, i);
+                        } else {
+                            NSString* valueAB = (__bridge_transfer NSString*)ABMultiValueCopyValueAtIndex(multi, i);
+                            NSString* labelAB = (__bridge_transfer NSString*)ABMultiValueCopyLabelAtIndex(multi, i);
+                            if ((valueAB == nil) || ![val isEqualToString:valueAB]) {
+                                ABMultiValueReplaceValueAtIndex(multi, (__bridge CFTypeRef)val, i);
+                            }
+                            if ((labelAB == nil) || ![label isEqualToString:labelAB]) {
+                                ABMultiValueReplaceLabelAtIndex(multi, (__bridge CFStringRef)label, i);
+                            }
+                        }
+                    } else {
+                        // is a new value - insert
+                        [self addToMultiValue:multi fromDictionary:dict];
+                    }
+                } // end of if value
+            } // end of for
+        } else { // adding all new value(s)
+            multi = [self allocStringMultiValueFromArray:fieldArray];
+        }
+        // set the (updated) copy as the new value
+        bSuccess = [self setValue:multi forProperty:prop inRecord:person];
+    }
+
+    if (multi) {
+        CFRelease(multi);
+    }
+
+    return bSuccess;
+}
+
+// used for ims and addresses
+- (ABMultiValueRef)allocDictMultiValueFromArray:array forProperty:(ABPropertyID)prop
+{
+    ABMutableMultiValueRef multi = ABMultiValueCreateMutable(kABMultiDictionaryPropertyType);
+    NSMutableDictionary* newDict;
+    NSMutableDictionary* addDict;
+
+    for (NSDictionary* dict in array) {
+        newDict = [self translateW3Dict:dict forProperty:prop];
+        addDict = [NSMutableDictionary dictionaryWithCapacity:2];
+        if (newDict) { // create a new dictionary with a Label and Value, value is the dictionary previously created
+            // June, 2011 W3C Contact spec adds type into ContactAddress book
+            // get the type out of the original dictionary for address
+            NSString* addrType = (NSString*)[dict valueForKey:kW3ContactFieldType];
+            if (!addrType) {
+                addrType = (NSString*)kABOtherLabel;
+            }
+            NSObject* typeValue = ((prop == kABPersonInstantMessageProperty) ? (NSObject*)kABOtherLabel : addrType);
+            // NSLog(@"typeValue: %@", typeValue);
+            [addDict setObject:typeValue forKey:kW3ContactFieldType];    //  im labels will be set as Other and address labels as type from dictionary
+            [addDict setObject:newDict forKey:kW3ContactFieldValue];
+            [self addToMultiValue:multi fromDictionary:addDict];
+        }
+    }
+
+    return multi; // caller is responsible for releasing
+}
+
+// used for ims and addresses to convert W3 dictionary of values to AB Dictionary
+// got messier when June, 2011 W3C Contact spec added type field into ContactAddress
+- (NSMutableDictionary*)translateW3Dict:(NSDictionary*)dict forProperty:(ABPropertyID)prop
+{
+    NSArray* propArray = [[CDVContact defaultObjectAndProperties] valueForKey:[[CDVContact defaultABtoW3C] objectForKey:[NSNumber numberWithInt:prop]]];
+
+    NSMutableDictionary* newDict = [NSMutableDictionary dictionaryWithCapacity:1];
+    id value;
+
+    for (NSString* key in propArray) { // for each W3 Contact key get the value
+        if (((value = [dict valueForKey:key]) != nil) && ![value isKindOfClass:[NSNull class]]) {
+            // if necessary convert the W3 value to AB Property label
+            NSString* setValue = value;
+            if ([CDVContact needsConversion:key]) { // IM types must be converted
+                setValue = (NSString*)[CDVContact convertContactTypeToPropertyLabel:value];
+                // IMs must have a valid AB value!
+                if ((prop == kABPersonInstantMessageProperty) && [setValue isEqualToString:(NSString*)kABOtherLabel]) {
+                    setValue = @""; // try empty string
+                }
+            }
+            // set the AB value into the dictionary
+            [newDict setObject:setValue forKey:(NSString*)[[CDVContact defaultW3CtoAB] valueForKey:(NSString*)key]];
+        }
+    }
+
+    if ([newDict count] == 0) {
+        newDict = nil; // no items added
+    }
+    return newDict;
+}
+
+/* set multivalue dictionary properties into an AddressBook Record
+ * NSArray* array - array of dictionaries containing the W3C properties to set into the record
+ * ABPropertyID prop - the property id for the multivalue dictionary (addresses and ims)
+ * ABRecordRef person - the record to set the values into
+ * BOOL bUpdate - YES if this is an update to an existing record
+ *	When updating:
+ *	  empty array indicates to remove entire property
+ *	  value/label == "" indicates to remove
+ *    value/label == [NSNull null] do not modify (keep existing record value)
+ * RETURN
+ *   bool false indicates fatal error
+ *
+ *  iOS addresses and im are a MultiValue Properties with label, value=dictionary of  info, and id
+ *  set addresses:  streetAddress, locality, region, postalCode, country
+ *  set ims:  value = username, type = servicetype
+ *  there are some special cases in here for ims - needs cleanup / simplification
+ *
+ */
+- (bool)setMultiValueDictionary:(NSArray*)array forProperty:(ABPropertyID)prop inRecord:(ABRecordRef)person asUpdate:(BOOL)bUpdate
+{
+    bool bSuccess = FALSE;
+    ABMutableMultiValueRef multi = nil;
+
+    if (!bUpdate) {
+        multi = [self allocDictMultiValueFromArray:array forProperty:prop];
+        bSuccess = [self setValue:multi forProperty:prop inRecord:person];
+    } else if (bUpdate && ([array count] == 0)) {
+        // remove property
+        bSuccess = [self removeProperty:prop inRecord:person];
+    } else { // check for and apply changes
+        ABMultiValueRef copy = ABRecordCopyValue(person, prop);
+        if (copy) {
+            multi = ABMultiValueCreateMutableCopy(copy);
+            CFRelease(copy);
+            // get the W3C values for this property
+            NSArray* propArray = [[CDVContact defaultObjectAndProperties] valueForKey:[[CDVContact defaultABtoW3C] objectForKey:[NSNumber numberWithInt:prop]]];
+            id value;
+            id valueAB;
+
+            for (NSDictionary* field in array) {
+                NSMutableDictionary* dict;
+                // find the index for the current property
+                id idValue = [field valueForKey:kW3ContactFieldId];
+                int identifier = [idValue isKindOfClass:[NSNumber class]] ? [idValue intValue] : -1;
+                CFIndex idx = identifier >= 0 ? ABMultiValueGetIndexForIdentifier(multi, identifier) : kCFNotFound;
+                BOOL bUpdateLabel = NO;
+                if (idx != kCFNotFound) {
+                    dict = [NSMutableDictionary dictionaryWithCapacity:1];
+                    // NSDictionary* existingDictionary = (NSDictionary*)ABMultiValueCopyValueAtIndex(multi, idx);
+                    CFTypeRef existingDictionary = ABMultiValueCopyValueAtIndex(multi, idx);
+                    NSString* existingABLabel = (__bridge_transfer NSString*)ABMultiValueCopyLabelAtIndex(multi, idx);
+                    NSString* testLabel = [field valueForKey:kW3ContactFieldType];
+                    // fixes cb-143 where setting empty label could cause address to not be removed
+                    //   (because empty label would become 'other'  in convertContactTypeToPropertyLabel
+                    //   which may not have matched existing label thus resulting in an incorrect updating of the label
+                    //   and the address not getting removed at the end of the for loop)
+                    if (testLabel && [testLabel isKindOfClass:[NSString class]] && ([testLabel length] > 0)) {
+                        CFStringRef w3cLabel = [CDVContact convertContactTypeToPropertyLabel:testLabel];
+                        if (w3cLabel && ![existingABLabel isEqualToString:(__bridge NSString*)w3cLabel]) {
+                            // replace the label
+                            ABMultiValueReplaceLabelAtIndex(multi, w3cLabel, idx);
+                            bUpdateLabel = YES;
+                        }
+                    } // else was invalid or empty label string so do not update
+
+                    for (id k in propArray) {
+                        value = [field valueForKey:k];
+                        bool bSet = (value != nil && ![value isKindOfClass:[NSNull class]] && ([value isKindOfClass:[NSString class]] && [value length] > 0));
+                        // if there is a contact value, put it into dictionary
+                        if (bSet) {
+                            NSString* setValue = [CDVContact needsConversion:(NSString*)k] ? (NSString*)[CDVContact convertContactTypeToPropertyLabel:value] : value;
+                            [dict setObject:setValue forKey:(NSString*)[[CDVContact defaultW3CtoAB] valueForKey:(NSString*)k]];
+                        } else if ((value == nil) || ([value isKindOfClass:[NSString class]] && ([value length] != 0))) {
+                            // value not provided in contact dictionary - if prop exists in AB dictionary, preserve it
+                            valueAB = [(__bridge NSDictionary*)existingDictionary valueForKey : [[CDVContact defaultW3CtoAB] valueForKey:k]];
+                            if (valueAB != nil) {
+                                [dict setValue:valueAB forKey:[[CDVContact defaultW3CtoAB] valueForKey:k]];
+                            }
+                        } // else if value == "" it will not be added into updated dict and thus removed
+                    } // end of for loop (moving here fixes cb-143, need to end for loop before replacing or removing multivalue)
+
+                    if ([dict count] > 0) {
+                        // something was added into new dict,
+                        ABMultiValueReplaceValueAtIndex(multi, (__bridge CFTypeRef)dict, idx);
+                    } else if (!bUpdateLabel) {
+                        // nothing added into new dict and no label change so remove this property entry
+                        ABMultiValueRemoveValueAndLabelAtIndex(multi, idx);
+                    }
+
+                    CFRelease(existingDictionary);
+                } else {
+                    // not found in multivalue so add it
+                    dict = [self translateW3Dict:field forProperty:prop];
+                    if (dict) {
+                        NSMutableDictionary* addDict = [NSMutableDictionary dictionaryWithCapacity:2];
+                        // get the type out of the original dictionary for address
+                        NSObject* typeValue = ((prop == kABPersonInstantMessageProperty) ? (NSObject*)kABOtherLabel : (NSString*)[field valueForKey:kW3ContactFieldType]);
+                        // NSLog(@"typeValue: %@", typeValue);
+                        [addDict setObject:typeValue forKey:kW3ContactFieldType];        //  im labels will be set as Other and address labels as type from dictionary
+                        [addDict setObject:dict forKey:kW3ContactFieldValue];
+                        [self addToMultiValue:multi fromDictionary:addDict];
+                    }
+                }
+            } // end of looping through dictionaries
+
+            // set the (updated) copy as the new value
+            bSuccess = [self setValue:multi forProperty:prop inRecord:person];
+        }
+    } // end of copy and apply changes
+    if (multi) {
+        CFRelease(multi);
+    }
+
+    return bSuccess;
+}
+
+/* Determine which W3C labels need to be converted
+ */
++ (BOOL)needsConversion:(NSString*)W3Label
+{
+    BOOL bConvert = NO;
+
+    if ([W3Label isEqualToString:kW3ContactFieldType] || [W3Label isEqualToString:kW3ContactImType]) {
+        bConvert = YES;
+    }
+    return bConvert;
+}
+
+/* Translation of property type labels  contact API ---> iPhone
+ *
+ *	phone:  work, home, other, mobile, fax, pager -->
+ *		kABWorkLabel, kABHomeLabel, kABOtherLabel, kABPersonPhoneMobileLabel, kABPersonHomeFAXLabel || kABPersonHomeFAXLabel, kABPersonPhonePagerLabel
+ *	emails:  work, home, other ---> kABWorkLabel, kABHomeLabel, kABOtherLabel
+ *	ims: aim, gtalk, icq, xmpp, msn, skype, qq, yahoo --> kABPersonInstantMessageService + (AIM, ICG, MSN, Yahoo).  No support for gtalk, xmpp, skype, qq
+ * addresses: work, home, other --> kABWorkLabel, kABHomeLabel, kABOtherLabel
+ *
+ *
+ */
++ (CFStringRef)convertContactTypeToPropertyLabel:(NSString*)label
+{
+    CFStringRef type;
+
+    if ([label isKindOfClass:[NSNull class]] || ![label isKindOfClass:[NSString class]]) {
+        type = NULL; // no label
+    } else if ([label caseInsensitiveCompare:kW3ContactWorkLabel] == NSOrderedSame) {
+        type = kABWorkLabel;
+    } else if ([label caseInsensitiveCompare:kW3ContactHomeLabel] == NSOrderedSame) {
+        type = kABHomeLabel;
+    } else if ([label caseInsensitiveCompare:kW3ContactOtherLabel] == NSOrderedSame) {
+        type = kABOtherLabel;
+    } else if ([label caseInsensitiveCompare:kW3ContactPhoneMobileLabel] == NSOrderedSame) {
+        type = kABPersonPhoneMobileLabel;
+    } else if ([label caseInsensitiveCompare:kW3ContactPhonePagerLabel] == NSOrderedSame) {
+        type = kABPersonPhonePagerLabel;
+    } else if ([label caseInsensitiveCompare:kW3ContactImAIMLabel] == NSOrderedSame) {
+        type = kABPersonInstantMessageServiceAIM;
+    } else if ([label caseInsensitiveCompare:kW3ContactImICQLabel] == NSOrderedSame) {
+        type = kABPersonInstantMessageServiceICQ;
+    } else if ([label caseInsensitiveCompare:kW3ContactImMSNLabel] == NSOrderedSame) {
+        type = kABPersonInstantMessageServiceMSN;
+    } else if ([label caseInsensitiveCompare:kW3ContactImYahooLabel] == NSOrderedSame) {
+        type = kABPersonInstantMessageServiceYahoo;
+    } else if ([label caseInsensitiveCompare:kW3ContactUrlProfile] == NSOrderedSame) {
+        type = kABPersonHomePageLabel;
+    } else {
+        type = kABOtherLabel;
+    }
+
+    return type;
+}
+
++ (NSString*)convertPropertyLabelToContactType:(NSString*)label
+{
+    NSString* type = nil;
+
+    if (label != nil) { // improve efficiency......
+        if ([label isEqualToString:(NSString*)kABPersonPhoneMobileLabel]) {
+            type = kW3ContactPhoneMobileLabel;
+        } else if ([label isEqualToString:(NSString*)kABPersonPhoneHomeFAXLabel] ||
+            [label isEqualToString:(NSString*)kABPersonPhoneWorkFAXLabel]) {
+            type = kW3ContactPhoneFaxLabel;
+        } else if ([label isEqualToString:(NSString*)kABPersonPhonePagerLabel]) {
+            type = kW3ContactPhonePagerLabel;
+        } else if ([label isEqualToString:(NSString*)kABHomeLabel]) {
+            type = kW3ContactHomeLabel;
+        } else if ([label isEqualToString:(NSString*)kABWorkLabel]) {
+            type = kW3ContactWorkLabel;
+        } else if ([label isEqualToString:(NSString*)kABOtherLabel]) {
+            type = kW3ContactOtherLabel;
+        } else if ([label isEqualToString:(NSString*)kABPersonInstantMessageServiceAIM]) {
+            type = kW3ContactImAIMLabel;
+        } else if ([label isEqualToString:(NSString*)kABPersonInstantMessageServiceICQ]) {
+            type = kW3ContactImICQLabel;
+        } else if ([label isEqualToString:(NSString*)kABPersonInstantMessageServiceJabber]) {
+            type = kW3ContactOtherLabel;
+        } else if ([label isEqualToString:(NSString*)kABPersonInstantMessageServiceMSN]) {
+            type = kW3ContactImMSNLabel;
+        } else if ([label isEqualToString:(NSString*)kABPersonInstantMessageServiceYahoo]) {
+            type = kW3ContactImYahooLabel;
+        } else if ([label isEqualToString:(NSString*)kABPersonHomePageLabel]) {
+            type = kW3ContactUrlProfile;
+        } else {
+            type = kW3ContactOtherLabel;
+        }
+    }
+    return type;
+}
+
+/* Check if the input label is a valid W3C ContactField.type. This is used when searching,
+ * only search field types if the search string is a valid type.  If we converted any search
+ * string to a ABPropertyLabel it could convert to kABOtherLabel which is probably not want
+ * the user wanted to search for and could skew the results.
+ */
++ (BOOL)isValidW3ContactType:(NSString*)label
+{
+    BOOL isValid = NO;
+
+    if ([label isKindOfClass:[NSNull class]] || ![label isKindOfClass:[NSString class]]) {
+        isValid = NO; // no label
+    } else if ([label caseInsensitiveCompare:kW3ContactWorkLabel] == NSOrderedSame) {
+        isValid = YES;
+    } else if ([label caseInsensitiveCompare:kW3ContactHomeLabel] == NSOrderedSame) {
+        isValid = YES;
+    } else if ([label caseInsensitiveCompare:kW3ContactOtherLabel] == NSOrderedSame) {
+        isValid = YES;
+    } else if ([label caseInsensitiveCompare:kW3ContactPhoneMobileLabel] == NSOrderedSame) {
+        isValid = YES;
+    } else if ([label caseInsensitiveCompare:kW3ContactPhonePagerLabel] == NSOrderedSame) {
+        isValid = YES;
+    } else if ([label caseInsensitiveCompare:kW3ContactImAIMLabel] == NSOrderedSame) {
+        isValid = YES;
+    } else if ([label caseInsensitiveCompare:kW3ContactImICQLabel] == NSOrderedSame) {
+        isValid = YES;
+    } else if ([label caseInsensitiveCompare:kW3ContactImMSNLabel] == NSOrderedSame) {
+        isValid = YES;
+    } else if ([label caseInsensitiveCompare:kW3ContactImYahooLabel] == NSOrderedSame) {
+        isValid = YES;
+    } else {
+        isValid = NO;
+    }
+
+    return isValid;
+}
+
+/* Create a new Contact Dictionary object from an ABRecordRef that contains information in a format such that
+ * it can be returned to JavaScript callback as JSON object string.
+ * Uses:
+ * ABRecordRef set into Contact Object
+ * NSDictionary withFields indicates which fields to return from the AddressBook Record
+ *
+ * JavaScript Contact:
+ * @param {DOMString} id unique identifier
+ * @param {DOMString} displayName
+ * @param {ContactName} name
+ * @param {DOMString} nickname
+ * @param {ContactField[]} phoneNumbers array of phone numbers
+ * @param {ContactField[]} emails array of email addresses
+ * @param {ContactAddress[]} addresses array of addresses
+ * @param {ContactField[]} ims instant messaging user ids
+ * @param {ContactOrganization[]} organizations
+ * @param {DOMString} published date contact was first created
+ * @param {DOMString} updated date contact was last updated
+ * @param {DOMString} birthday contact's birthday
+ * @param (DOMString} anniversary contact's anniversary
+ * @param {DOMString} gender contact's gender
+ * @param {DOMString} note user notes about contact
+ * @param {DOMString} preferredUsername
+ * @param {ContactField[]} photos
+ * @param {ContactField[]} tags
+ * @param {ContactField[]} relationships
+ * @param {ContactField[]} urls contact's web sites
+ * @param {ContactAccounts[]} accounts contact's online accounts
+ * @param {DOMString} timezone UTC time zone offset
+ * @param {DOMString} connected
+ */
+
+- (NSDictionary*)toDictionary:(NSDictionary*)withFields
+{
+    // if not a person type record bail out for now
+    if (ABRecordGetRecordType(self.record) != kABPersonType) {
+        return NULL;
+    }
+    id value = nil;
+    self.returnFields = withFields;
+
+    NSMutableDictionary* nc = [NSMutableDictionary dictionaryWithCapacity:1];  // new contact dictionary to fill in from ABRecordRef
+    // id
+    [nc setObject:[NSNumber numberWithInt:ABRecordGetRecordID(self.record)] forKey:kW3ContactId];
+    if (self.returnFields == nil) {
+        // if no returnFields specified, W3C says to return empty contact (but Cordova will at least return id)
+        return nc;
+    }
+    if ([self.returnFields objectForKey:kW3ContactDisplayName]) {
+        // displayname requested -  iOS doesn't have so return null
+        [nc setObject:[NSNull null] forKey:kW3ContactDisplayName];
+        // may overwrite below if requested ContactName and there are no values
+    }
+    // nickname
+    if ([self.returnFields valueForKey:kW3ContactNickname]) {
+        value = (__bridge_transfer NSString*)ABRecordCopyValue(self.record, kABPersonNicknameProperty);
+        [nc setObject:(value != nil) ? value:[NSNull null] forKey:kW3ContactNickname];
+    }
+
+    // name dictionary
+    // NSLog(@"getting name info");
+    NSObject* data = [self extractName];
+    if (data != nil) {
+        [nc setObject:data forKey:kW3ContactName];
+    }
+    if ([self.returnFields objectForKey:kW3ContactDisplayName] && ((data == nil) || ([(NSDictionary*)data objectForKey : kW3ContactFormattedName] == [NSNull null]))) {
+        // user asked for displayName which iOS doesn't support but there is no other name data being returned
+        // try and use Composite Name so some name is returned
+        id tryName = (__bridge_transfer NSString*)ABRecordCopyCompositeName(self.record);
+        if (tryName != nil) {
+            [nc setObject:tryName forKey:kW3ContactDisplayName];
+        } else {
+            // use nickname or empty string
+            value = (__bridge_transfer NSString*)ABRecordCopyValue(self.record, kABPersonNicknameProperty);
+            [nc setObject:(value != nil) ? value:@"" forKey:kW3ContactDisplayName];
+        }
+    }
+    // phoneNumbers array
+    // NSLog(@"getting phoneNumbers");
+    value = [self extractMultiValue:kW3ContactPhoneNumbers];
+    if (value != nil) {
+        [nc setObject:value forKey:kW3ContactPhoneNumbers];
+    }
+    // emails array
+    // NSLog(@"getting emails");
+    value = [self extractMultiValue:kW3ContactEmails];
+    if (value != nil) {
+        [nc setObject:value forKey:kW3ContactEmails];
+    }
+    // urls array
+    value = [self extractMultiValue:kW3ContactUrls];
+    if (value != nil) {
+        [nc setObject:value forKey:kW3ContactUrls];
+    }
+    // addresses array
+    // NSLog(@"getting addresses");
+    value = [self extractAddresses];
+    if (value != nil) {
+        [nc setObject:value forKey:kW3ContactAddresses];
+    }
+    // im array
+    // NSLog(@"getting ims");
+    value = [self extractIms];
+    if (value != nil) {
+        [nc setObject:value forKey:kW3ContactIms];
+    }
+    // organization array (only info for one organization in iOS)
+    // NSLog(@"getting organizations");
+    value = [self extractOrganizations];
+    if (value != nil) {
+        [nc setObject:value forKey:kW3ContactOrganizations];
+    }
+
+    // for simple properties, could make this a bit more efficient by storing all simple properties in a single
+    // array in the returnFields dictionary and setting them via a for loop through the array
+
+    // add dates
+    // NSLog(@"getting dates");
+    NSNumber* ms;
+
+    /** Contact Revision field removed from June 16, 2011 version of specification
+
+    if ([self.returnFields valueForKey:kW3ContactUpdated]){
+        ms = [self getDateAsNumber: kABPersonModificationDateProperty];
+        if (!ms){
+            // try and get published date
+            ms = [self getDateAsNumber: kABPersonCreationDateProperty];
+        }
+        if (ms){
+            [nc setObject:  ms forKey:kW3ContactUpdated];
+        }
+
+    }
+    */
+
+    if ([self.returnFields valueForKey:kW3ContactBirthday]) {
+        ms = [self getDateAsNumber:kABPersonBirthdayProperty];
+        if (ms) {
+            [nc setObject:ms forKey:kW3ContactBirthday];
+        }
+    }
+
+    /*  Anniversary removed from 12-09-2010 W3C Contacts api spec
+     if ([self.returnFields valueForKey:kW3ContactAnniversary]){
+        // Anniversary date is stored in a multivalue property
+        ABMultiValueRef multi = ABRecordCopyValue(self.record, kABPersonDateProperty);
+        if (multi){
+            CFStringRef label = nil;
+            CFIndex count = ABMultiValueGetCount(multi);
+            // see if contains an Anniversary date
+            for(CFIndex i=0; i<count; i++){
+                label = ABMultiValueCopyLabelAtIndex(multi, i);
+                if(label && [(NSString*)label isEqualToString:(NSString*)kABPersonAnniversaryLabel]){
+                    CFDateRef aDate = ABMultiValueCopyValueAtIndex(multi, i);
+                    if(aDate){
+                        [nc setObject: (NSString*)aDate forKey: kW3ContactAnniversary];
+                        CFRelease(aDate);
+                    }
+                    CFRelease(label);
+                    break;
+                }
+            }
+            CFRelease(multi);
+        }
+    }*/
+
+    if ([self.returnFields valueForKey:kW3ContactNote]) {
+        // note
+        value = (__bridge_transfer NSString*)ABRecordCopyValue(self.record, kABPersonNoteProperty);
+        [nc setObject:(value != nil) ? value:[NSNull null] forKey:kW3ContactNote];
+    }
+
+    if ([self.returnFields valueForKey:kW3ContactPhotos]) {
+        value = [self extractPhotos];
+        [nc setObject:(value != nil) ? value:[NSNull null] forKey:kW3ContactPhotos];
+    }
+
+    /* TimeZone removed from June 16, 2011 Contacts spec
+     *
+    if ([self.returnFields valueForKey:kW3ContactTimezone]){
+        [NSTimeZone resetSystemTimeZone];
+        NSTimeZone* currentTZ = [NSTimeZone localTimeZone];
+        NSInteger seconds = [currentTZ secondsFromGMT];
+        NSString* tz = [NSString stringWithFormat:@"%2d:%02u",  seconds/3600, seconds % 3600 ];
+        [nc setObject:tz forKey:kW3ContactTimezone];
+    }
+    */
+    // TODO WebURLs
+    // [nc setObject:[NSNull null] forKey:kW3ContactUrls];
+    // online accounts - not available on iOS
+
+    return nc;
+}
+
+- (NSNumber*)getDateAsNumber:(ABPropertyID)datePropId
+{
+    NSNumber* msDate = nil;
+    NSDate* aDate = nil;
+    CFTypeRef cfDate = ABRecordCopyValue(self.record, datePropId);
+
+    if (cfDate) {
+        aDate = (__bridge NSDate*)cfDate;
+        msDate = [NSNumber numberWithDouble:([aDate timeIntervalSince1970] * 1000)];
+        CFRelease(cfDate);
+    }
+    return msDate;
+}
+
+/* Create Dictionary to match JavaScript ContactName object:
+ *	formatted - ABRecordCopyCompositeName
+ *	familyName
+ *	givenName
+ *	middleName
+ *	honorificPrefix
+ *	honorificSuffix
+*/
+
+- (NSObject*)extractName
+{
+    NSArray* fields = [self.returnFields objectForKey:kW3ContactName];
+
+    if (fields == nil) { // no name fields requested
+        return nil;
+    }
+
+    NSMutableDictionary* newName = [NSMutableDictionary dictionaryWithCapacity:6];
+    id value;
+
+    for (NSString* i in fields) {
+        if ([i isEqualToString:kW3ContactFormattedName]) {
+            value = (__bridge_transfer NSString*)ABRecordCopyCompositeName(self.record);
+            [newName setObject:(value != nil) ? value:[NSNull null] forKey:kW3ContactFormattedName];
+        } else {
+            // W3CtoAB returns NSNumber for AB name properties, get intValue and cast to ABPropertyID)
+            value = (__bridge_transfer NSString*)ABRecordCopyValue(self.record, (ABPropertyID)[[[CDVContact defaultW3CtoAB] valueForKey:i] intValue]);
+            [newName setObject:(value != nil) ? value:[NSNull null] forKey:(NSString*)i];
+        }
+    }
+
+    return newName;
+}
+
+/* Create array of Dictionaries to match JavaScript ContactField object for simple multiValue properties phoneNumbers, emails
+ * Input: (NSString*) W3Contact Property name
+ * type
+ *		for phoneNumbers type is one of (work,home,other, mobile, fax, pager)
+ *		for emails type is one of (work,home, other)
+ * value - phone number or email address
+ * (bool) primary (not supported on iphone)
+ * id
+*/
+- (NSObject*)extractMultiValue:(NSString*)propertyId
+{
+    NSArray* fields = [self.returnFields objectForKey:propertyId];
+
+    if (fields == nil) {
+        return nil;
+    }
+    ABMultiValueRef multi = nil;
+    NSObject* valuesArray = nil;
+    NSNumber* propNumber = [[CDVContact defaultW3CtoAB] valueForKey:propertyId];
+    ABPropertyID propId = [propNumber intValue];
+    multi = ABRecordCopyValue(self.record, propId);
+    // multi = ABRecordCopyValue(self.record, (ABPropertyID)[[[Contact defaultW3CtoAB] valueForKey:propertyId] intValue]);
+    CFIndex count = multi != nil ? ABMultiValueGetCount(multi) : 0;
+    id value;
+    if (count) {
+        valuesArray = [NSMutableArray arrayWithCapacity:count];
+
+        for (CFIndex i = 0; i < count; i++) {
+            NSMutableDictionary* newDict = [NSMutableDictionary dictionaryWithCapacity:4];
+            if ([fields containsObject:kW3ContactFieldType]) {
+                NSString* label = (__bridge_transfer NSString*)ABMultiValueCopyLabelAtIndex(multi, i);
+                value = [CDVContact convertPropertyLabelToContactType:label];
+                [newDict setObject:(value != nil) ? value:[NSNull null]   forKey:kW3ContactFieldType];
+            }
+            if ([fields containsObject:kW3ContactFieldValue]) {
+                value = (__bridge_transfer NSString*)ABMultiValueCopyValueAtIndex(multi, i);
+                [newDict setObject:(value != nil) ? value:[NSNull null] forKey:kW3ContactFieldValue];
+            }
+            if ([fields containsObject:kW3ContactFieldPrimary]) {
+                [newDict setObject:[NSNumber numberWithBool:(BOOL)NO] forKey:kW3ContactFieldPrimary];   // iOS doesn't support primary so set all to false
+            }
+            // always set id
+            value = [NSNumber numberWithUnsignedInt:ABMultiValueGetIdentifierAtIndex(multi, i)];
+            [newDict setObject:(value != nil) ? value:[NSNull null] forKey:kW3ContactFieldId];
+            [(NSMutableArray*)valuesArray addObject : newDict];
+        }
+    } else {
+        valuesArray = [NSNull null];
+    }
+    if (multi) {
+        CFRelease(multi);
+    }
+
+    return valuesArray;
+}
+
+/* Create array of Dictionaries to match JavaScript ContactAddress object for addresses
+ *  pref - not supported
+ *  type - address type
+ *	formatted  - formatted for mailing label (what about localization?)
+ *	streetAddress
+ *	locality
+ *	region;
+ *	postalCode
+ *	country
+ *	id
+ *
+ *	iOS addresses are a MultiValue Properties with label, value=dictionary of address info, and id
+ */
+- (NSObject*)extractAddresses
+{
+    NSArray* fields = [self.returnFields objectForKey:kW3ContactAddresses];
+
+    if (fields == nil) { // no name fields requested
+        return nil;
+    }
+    CFStringRef value;
+    NSObject* addresses;
+    ABMultiValueRef multi = ABRecordCopyValue(self.record, kABPersonAddressProperty);
+    CFIndex count = multi ? ABMultiValueGetCount(multi) : 0;
+    if (count) {
+        addresses = [NSMutableArray arrayWithCapacity:count];
+
+        for (CFIndex i = 0; i < count; i++) {
+            NSMutableDictionary* newAddress = [NSMutableDictionary dictionaryWithCapacity:7];
+            // if we got this far, at least some address info is being requested.
+
+            // Always set id
+            id identifier = [NSNumber numberWithUnsignedInt:ABMultiValueGetIdentifierAtIndex(multi, i)];
+            [newAddress setObject:(identifier != nil) ? identifier:[NSNull null] forKey:kW3ContactFieldId];
+            // set the type label
+            NSString* label = (__bridge_transfer NSString*)ABMultiValueCopyLabelAtIndex(multi, i);
+
+            [newAddress setObject:(label != nil) ? (NSObject*)[[CDVContact class] convertPropertyLabelToContactType:label]:[NSNull null] forKey:kW3ContactFieldType];
+            // set the pref - iOS doesn't support so set to default of false
+            [newAddress setObject:@"false" forKey:kW3ContactFieldPrimary];
+            // get dictionary of values for this address
+            CFDictionaryRef dict = (CFDictionaryRef)ABMultiValueCopyValueAtIndex(multi, i);
+
+            for (id k in fields) {
+                bool bFound;
+                id key = [[CDVContact defaultW3CtoAB] valueForKey:k];
+                if (key && ![k isKindOfClass:[NSNull class]]) {
+                    bFound = CFDictionaryGetValueIfPresent(dict, (__bridge const void*)key, (void*)&value);
+                    if (bFound && (value != NULL)) {
+                        CFRetain(value);
+                        [newAddress setObject:(__bridge id)value forKey:k];
+                        CFRelease(value);
+                    } else {
+                        [newAddress setObject:[NSNull null] forKey:k];
+                    }
+                } else {
+                    // was a property that iPhone doesn't support
+                    [newAddress setObject:[NSNull null] forKey:k];
+                }
+            }
+
+            if ([newAddress count] > 0) { // ?? this will always be true since we set id,label,primary field??
+                [(NSMutableArray*)addresses addObject : newAddress];
+            }
+            CFRelease(dict);
+        } // end of loop through addresses
+    } else {
+        addresses = [NSNull null];
+    }
+    if (multi) {
+        CFRelease(multi);
+    }
+
+    return addresses;
+}
+
+/* Create array of Dictionaries to match JavaScript ContactField object for ims
+ * type one of [aim, gtalk, icq, xmpp, msn, skype, qq, yahoo] needs other as well
+ * value
+ * (bool) primary
+ * id
+ *
+ *	iOS IMs are a MultiValue Properties with label, value=dictionary of IM details (service, username), and id
+ */
+- (NSObject*)extractIms
+{
+    NSArray* fields = [self.returnFields objectForKey:kW3ContactIms];
+
+    if (fields == nil) { // no name fields requested
+        return nil;
+    }
+    NSObject* imArray;
+    ABMultiValueRef multi = ABRecordCopyValue(self.record, kABPersonInstantMessageProperty);
+    CFIndex count = multi ? ABMultiValueGetCount(multi) : 0;
+    if (count) {
+        imArray = [NSMutableArray arrayWithCapacity:count];
+
+        for (CFIndex i = 0; i < ABMultiValueGetCount(multi); i++) {
+            NSMutableDictionary* newDict = [NSMutableDictionary dictionaryWithCapacity:3];
+            // iOS has label property (work, home, other) for each IM but W3C contact API doesn't use
+            CFDictionaryRef dict = (CFDictionaryRef)ABMultiValueCopyValueAtIndex(multi, i);
+            CFStringRef value;  // all values should be CFStringRefs / NSString*
+            bool bFound;
+            if ([fields containsObject:kW3ContactFieldValue]) {
+                // value = user name
+                bFound = CFDictionaryGetValueIfPresent(dict, kABPersonInstantMessageUsernameKey, (void*)&value);
+                if (bFound && (value != NULL)) {
+                    CFRetain(value);
+                    [newDict setObject:(__bridge id)value forKey:kW3ContactFieldValue];
+                    CFRelease(value);
+                } else {
+                    [newDict setObject:[NSNull null] forKey:kW3ContactFieldValue];
+                }
+            }
+            if ([fields containsObject:kW3ContactFieldType]) {
+                bFound = CFDictionaryGetValueIfPresent(dict, kABPersonInstantMessageServiceKey, (void*)&value);
+                if (bFound && (value != NULL)) {
+                    CFRetain(value);
+                    [newDict setObject:(id)[[CDVContact class] convertPropertyLabelToContactType : (__bridge NSString*)value] forKey:kW3ContactFieldType];
+                    CFRelease(value);
+                } else {
+                    [newDict setObject:[NSNull null] forKey:kW3ContactFieldType];
+                }
+            }
+            // always set ID
+            id identifier = [NSNumber numberWithUnsignedInt:ABMultiValueGetIdentifierAtIndex(multi, i)];
+            [newDict setObject:(identifier != nil) ? identifier:[NSNull null] forKey:kW3ContactFieldId];
+
+            [(NSMutableArray*)imArray addObject : newDict];
+            CFRelease(dict);
+        }
+    } else {
+        imArray = [NSNull null];
+    }
+
+    if (multi) {
+        CFRelease(multi);
+    }
+    return imArray;
+}
+
+/* Create array of Dictionaries to match JavaScript ContactOrganization object
+ *	pref - not supported in iOS
+ *  type - not supported in iOS
+ *  name
+ *	department
+ *	title
+ */
+
+- (NSObject*)extractOrganizations
+{
+    NSArray* fields = [self.returnFields objectForKey:kW3ContactOrganizations];
+
+    if (fields == nil) { // no name fields requested
+        return nil;
+    }
+    NSObject* array = nil;
+    NSMutableDictionary* newDict = [NSMutableDictionary dictionaryWithCapacity:5];
+    id value;
+    int validValueCount = 0;
+
+    for (id i in fields) {
+        id key = [[CDVContact defaultW3CtoAB] valueForKey:i];
+        if (key && [key isKindOfClass:[NSNumber class]]) {
+            value = (__bridge_transfer NSString*)ABRecordCopyValue(self.record, (ABPropertyID)[[[CDVContact defaultW3CtoAB] valueForKey:i] intValue]);
+            if (value != nil) {
+                // if there are no organization values we should return null for organization
+                // this counter keeps indicates if any organization values have been set
+                validValueCount++;
+            }
+            [newDict setObject:(value != nil) ? value:[NSNull null] forKey:i];
+        } else { // not a key iOS supports, set to null
+            [newDict setObject:[NSNull null] forKey:i];
+        }
+    }
+
+    if (([newDict count] > 0) && (validValueCount > 0)) {
+        // add pref and type
+        // they are not supported by iOS and thus these values never change
+        [newDict setObject:@"false" forKey:kW3ContactFieldPrimary];
+        [newDict setObject:[NSNull null] forKey:kW3ContactFieldType];
+        array = [NSMutableArray arrayWithCapacity:1];
+        [(NSMutableArray*)array addObject : newDict];
+    } else {
+        array = [NSNull null];
+    }
+    return array;
+}
+
+// W3C Contacts expects an array of photos.  Can return photos in more than one format, currently
+// just returning the default format
+// Save the photo data into tmp directory and return FileURI - temp directory is deleted upon application exit
+- (NSObject*)extractPhotos
+{
+    NSMutableArray* photos = nil;
+
+    if (ABPersonHasImageData(self.record)) {
+        CFDataRef photoData = ABPersonCopyImageData(self.record);
+        NSData* data = (__bridge NSData*)photoData;
+        // write to temp directory and store URI in photos array
+        // get the temp directory path
+        NSString* docsPath = [NSTemporaryDirectory()stringByStandardizingPath];
+        NSError* err = nil;
+        NSString* filePath = [NSString stringWithFormat:@"%@/photo_XXXXX", docsPath];
+        char template[filePath.length + 1];
+        strcpy(template, [filePath cStringUsingEncoding:NSASCIIStringEncoding]);
+        mkstemp(template);
+        filePath = [[NSFileManager defaultManager]
+            stringWithFileSystemRepresentation:template
+                                        length:strlen(template)];
+
+        // save file
+        if ([data writeToFile:filePath options:NSAtomicWrite error:&err]) {
+            photos = [NSMutableArray arrayWithCapacity:1];
+            NSMutableDictionary* newDict = [NSMutableDictionary dictionaryWithCapacity:2];
+            [newDict setObject:filePath forKey:kW3ContactFieldValue];
+            [newDict setObject:@"url" forKey:kW3ContactFieldType];
+            [newDict setObject:@"false" forKey:kW3ContactFieldPrimary];
+            [photos addObject:newDict];
+        }
+
+        CFRelease(photoData);
+    }
+    return photos;
+}
+
+/**
+ *	given an array of W3C Contact field names, create a dictionary of field names to extract
+ *	if field name represents an object, return all properties for that object:  "name" - returns all properties in ContactName
+ *	if field name is an explicit property, return only those properties:  "name.givenName - returns a ContactName with only ContactName.givenName
+ *  if field contains ONLY ["*"] return all fields
+ *	dictionary format:
+ *	key is W3Contact #define
+ *		value is NSMutableArray* for complex keys:  name,addresses,organizations, phone, emails, ims
+ *		value is [NSNull null] for simple keys
+*/
++ (NSDictionary*)calcReturnFields:(NSArray*)fieldsArray // NSLog(@"getting self.returnFields");
+{
+    NSMutableDictionary* d = [NSMutableDictionary dictionaryWithCapacity:1];
+
+    if ((fieldsArray != nil) && [fieldsArray isKindOfClass:[NSArray class]]) {
+        if (([fieldsArray count] == 1) && [[fieldsArray objectAtIndex:0] isEqualToString:@"*"]) {
+            return [CDVContact defaultFields];  // return all fields
+        }
+
+        for (id i in fieldsArray) {
+            NSMutableArray* keys = nil;
+            NSString* fieldStr = nil;
+            if ([i isKindOfClass:[NSNumber class]]) {
+                fieldStr = [i stringValue];
+            } else {
+                fieldStr = i;
+            }
+
+            // see if this is specific property request in object - object.property
+            NSArray* parts = [fieldStr componentsSeparatedByString:@"."]; // returns original string if no separator found
+            NSString* name = [parts objectAtIndex:0];
+            NSString* property = nil;
+            if ([parts count] > 1) {
+                property = [parts objectAtIndex:1];
+            }
+            // see if this is a complex field by looking for its array of properties in objectAndProperties dictionary
+            id fields = [[CDVContact defaultObjectAndProperties] objectForKey:name];
+
+            // if find complex name (name,addresses,organizations, phone, emails, ims) in fields, add name as key
+            // with array of associated properties as the value
+            if ((fields != nil) && (property == nil)) { // request was for full object
+                keys = [NSMutableArray arrayWithArray:fields];
+                if (keys != nil) {
+                    [d setObject:keys forKey:name]; // will replace if prop array already exists
+                }
+            } else if ((fields != nil) && (property != nil)) {
+                // found an individual property request  in form of name.property
+                // verify is real property name by using it as key in W3CtoAB
+                id abEquiv = [[CDVContact defaultW3CtoAB] objectForKey:property];
+                if (abEquiv || [[CDVContact defaultW3CtoNull] containsObject:property]) {
+                    // if existing array add to it
+                    if ((keys = [d objectForKey:name]) != nil) {
+                        [keys addObject:property];
+                    } else {
+                        keys = [NSMutableArray arrayWithObject:property];
+                        [d setObject:keys forKey:name];
+                    }
+                } else {
+                    NSLog(@"Contacts.find -- request for invalid property ignored: %@.%@", name, property);
+                }
+            } else { // is an individual property, verify is real property name by using it as key in W3CtoAB
+                id valid = [[CDVContact defaultW3CtoAB] objectForKey:name];
+                if (valid || [[CDVContact defaultW3CtoNull] containsObject:name]) {
+                    [d setObject:[NSNull null] forKey:name];
+                }
+            }
+        }
+    }
+    if ([d count] == 0) {
+        // no array or nothing in the array. W3C spec says to return nothing
+        return nil;   // [Contact defaultFields];
+    }
+    return d;
+}
+
+/*
+ * Search for the specified value in each of the fields specified in the searchFields dictionary.
+ * NSString* value - the string value to search for (need clarification from W3C on how to search for dates)
+ * NSDictionary* searchFields - a dictionary created via calcReturnFields where the key is the top level W3C
+ *	object and the object is the array of specific fields within that object or null if it is a single property
+ * RETURNS
+ *	YES as soon as a match is found in any of the fields
+ *	NO - the specified value does not exist in any of the fields in this contact
+ *
+ *  Note: I'm not a fan of returning in the middle of methods but have done it some in this method in order to
+ *    keep the code simpler. bgibson
+ */
+- (BOOL)foundValue:(NSString*)testValue inFields:(NSDictionary*)searchFields
+{
+    BOOL bFound = NO;
+
+    if ((testValue == nil) || ![testValue isKindOfClass:[NSString class]] || ([testValue length] == 0)) {
+        // nothing to find so return NO
+        return NO;
+    }
+    NSInteger valueAsInt = [testValue integerValue];
+
+    // per W3C spec, always include id in search
+    int recordId = ABRecordGetRecordID(self.record);
+    if (valueAsInt && (recordId == valueAsInt)) {
+        return YES;
+    }
+
+    if (searchFields == nil) {
+        // no fields to search
+        return NO;
+    }
+
+    if ([searchFields valueForKey:kW3ContactNickname]) {
+        bFound = [self testStringValue:testValue forW3CProperty:kW3ContactNickname];
+        if (bFound == YES) {
+            return bFound;
+        }
+    }
+
+    if ([searchFields valueForKeyIsArray:kW3ContactName]) {
+        // test name fields.  All are string properties obtained via ABRecordCopyValue except kW3ContactFormattedName
+        NSArray* fields = [searchFields valueForKey:kW3ContactName];
+
+        for (NSString* testItem in fields) {
+            if ([testItem isEqualToString:kW3ContactFormattedName]) {
+                NSString* propValue = (__bridge_transfer NSString*)ABRecordCopyCompositeName(self.record);
+                if ((propValue != nil) && ([propValue length] > 0)) {
+                    NSRange range = [propValue rangeOfString:testValue options:NSCaseInsensitiveSearch];
+                    bFound = (range.location != NSNotFound);
+                    propValue = nil;
+                }
+            } else {
+                bFound = [self testStringValue:testValue forW3CProperty:testItem];
+            }
+
+            if (bFound) {
+                break;
+            }
+        }
+    }
+    if (!bFound && [searchFields valueForKeyIsArray:kW3ContactPhoneNumbers]) {
+        bFound = [self searchContactFields:(NSArray*)[searchFields valueForKey:kW3ContactPhoneNumbers]
+                       forMVStringProperty:kABPersonPhoneProperty withValue:testValue];
+    }
+    if (!bFound && [searchFields valueForKeyIsArray:kW3ContactEmails]) {
+        bFound = [self searchContactFields:(NSArray*)[searchFields valueForKey:kW3ContactEmails]
+                       forMVStringProperty:kABPersonEmailProperty withValue:testValue];
+    }
+
+    if (!bFound && [searchFields valueForKeyIsArray:kW3ContactAddresses]) {
+        bFound = [self searchContactFields:[searchFields valueForKey:kW3ContactAddresses]
+                   forMVDictionaryProperty:kABPersonAddressProperty withValue:testValue];
+    }
+
+    if (!bFound && [searchFields valueForKeyIsArray:kW3ContactIms]) {
+        bFound = [self searchContactFields:[searchFields valueForKey:kW3ContactIms]
+                   forMVDictionaryProperty:kABPersonInstantMessageProperty withValue:testValue];
+    }
+
+    if (!bFound && [searchFields valueForKeyIsArray:kW3ContactOrganizations]) {
+        NSArray* fields = [searchFields valueForKey:kW3ContactOrganizations];
+
+        for (NSString* testItem in fields) {
+            bFound = [self testStringValue:testValue forW3CProperty:testItem];
+            if (bFound == YES) {
+                break;
+            }
+        }
+    }
+    if (!bFound && [searchFields valueForKey:kW3ContactNote]) {
+        bFound = [self testStringValue:testValue forW3CProperty:kW3ContactNote];
+    }
+
+    // if searching for a date field is requested, get the date field as a localized string then look for match against testValue in date string
+    // searching for photos is not supported
+    if (!bFound && [searchFields valueForKey:kW3ContactBirthday]) {
+        bFound = [self testDateValue:testValue forW3CProperty:kW3ContactBirthday];
+    }
+    if (!bFound && [searchFields valueForKeyIsArray:kW3ContactUrls]) {
+        bFound = [self searchContactFields:(NSArray*)[searchFields valueForKey:kW3ContactUrls]
+                       forMVStringProperty:kABPersonURLProperty withValue:testValue];
+    }
+
+    return bFound;
+}
+
+/*
+ * Test for the existence of a given string within the value of a ABPersonRecord string property based on the W3c property name.
+ *
+ * IN:
+ *	NSString* testValue - the value to find - search is case insensitive
+ *  NSString* property - the W3c property string
+ * OUT:
+ * BOOL YES if the given string was found within the property value
+ *		NO if the testValue was not found, W3C property string was invalid or the AddressBook property was not a string
+ */
+- (BOOL)testStringValue:(NSString*)testValue forW3CProperty:(NSString*)property
+{
+    BOOL bFound = NO;
+
+    if ([[CDVContact defaultW3CtoAB] valueForKeyIsNumber:property]) {
+        ABPropertyID propId = [[[CDVContact defaultW3CtoAB] objectForKey:property] intValue];
+        if (ABPersonGetTypeOfProperty(propId) == kABStringPropertyType) {
+            NSString* propValue = (__bridge_transfer NSString*)ABRecordCopyValue(self.record, propId);
+            if ((propValue != nil) && ([propValue length] > 0)) {
+                NSPredicate* containPred = [NSPredicate predicateWithFormat:@"SELF contains[cd] %@", testValue];
+                bFound = [containPred evaluateWithObject:propValue];
+                // NSRange range = [propValue rangeOfString:testValue options: NSCaseInsensitiveSearch];
+                // bFound = (range.location != NSNotFound);
+            }
+        }
+    }
+    return bFound;
+}
+
+/*
+ * Test for the existence of a given Date string within the value of a ABPersonRecord datetime property based on the W3c property name.
+ *
+ * IN:
+ *	NSString* testValue - the value to find - search is case insensitive
+ *  NSString* property - the W3c property string
+ * OUT:
+ * BOOL YES if the given string was found within the localized date string value
+ *		NO if the testValue was not found, W3C property string was invalid or the AddressBook property was not a DateTime
+ */
+- (BOOL)testDateValue:(NSString*)testValue forW3CProperty:(NSString*)property
+{
+    BOOL bFound = NO;
+
+    if ([[CDVContact defaultW3CtoAB] valueForKeyIsNumber:property]) {
+        ABPropertyID propId = [[[CDVContact defaultW3CtoAB] objectForKey:property] intValue];
+        if (ABPersonGetTypeOfProperty(propId) == kABDateTimePropertyType) {
+            NSDate* date = (__bridge_transfer NSDate*)ABRecordCopyValue(self.record, propId);
+            if (date != nil) {
+                NSString* dateString = [date descriptionWithLocale:[NSLocale currentLocale]];
+                NSPredicate* containPred = [NSPredicate predicateWithFormat:@"SELF contains[cd] %@", testValue];
+                bFound = [containPred evaluateWithObject:dateString];
+            }
+        }
+    }
+    return bFound;
+}
+
+/*
+ * Search the specified fields within an AddressBook multivalue string property for the specified test value.
+ * Used for phoneNumbers, emails and urls.
+ * IN:
+ *	NSArray* fields - the fields to search for within the multistring property (value and/or type)
+ *	ABPropertyID - the property to search
+ *	NSString* testValue - the value to search for. Will convert between W3C types and AB types.  Will only
+ *		search for types if the testValue is a valid ContactField type.
+ * OUT:
+ *	YES if the test value was found in one of the specified fields
+ *	NO if the test value was not found
+ */
+- (BOOL)searchContactFields:(NSArray*)fields forMVStringProperty:(ABPropertyID)propId withValue:testValue
+{
+    BOOL bFound = NO;
+
+    for (NSString* type in fields) {
+        NSString* testString = nil;
+        if ([type isEqualToString:kW3ContactFieldType]) {
+            if ([CDVContact isValidW3ContactType:testValue]) {
+                // only search types if the filter string is a valid ContactField.type
+                testString = (NSString*)[CDVContact convertContactTypeToPropertyLabel:testValue];
+            }
+        } else {
+            testString = testValue;
+        }
+
+        if (testString != nil) {
+            bFound = [self testMultiValueStrings:testString forProperty:propId ofType:type];
+        }
+        if (bFound == YES) {
+            break;
+        }
+    }
+
+    return bFound;
+}
+
+/*
+ * Searches a multiString value of the specified type for the specified test value.
+ *
+ * IN:
+ *	NSString* testValue - the value to test for
+ *	ABPropertyID propId - the property id of the multivalue property to search
+ *	NSString* type - the W3C contact type to search for (value or type)
+ * OUT:
+ * YES is the test value was found
+ * NO if the test value was not found
+ */
+- (BOOL)testMultiValueStrings:(NSString*)testValue forProperty:(ABPropertyID)propId ofType:(NSString*)type
+{
+    BOOL bFound = NO;
+
+    if (ABPersonGetTypeOfProperty(propId) == kABMultiStringPropertyType) {
+        NSArray* valueArray = nil;
+        if ([type isEqualToString:kW3ContactFieldType]) {
+            valueArray = [self labelsForProperty:propId inRecord:self.record];
+        } else if ([type isEqualToString:kW3ContactFieldValue]) {
+            valueArray = [self valuesForProperty:propId inRecord:self.record];
+        }
+        if (valueArray) {
+            NSString* valuesAsString = [valueArray componentsJoinedByString:@" "];
+            NSPredicate* containPred = [NSPredicate predicateWithFormat:@"SELF contains[cd] %@", testValue];
+            bFound = [containPred evaluateWithObject:valuesAsString];
+        }
+    }
+    return bFound;
+}
+
+/*
+ * Returns the array of values for a multivalue string property of the specified property id
+ */
+- (__autoreleasing NSArray*)valuesForProperty:(ABPropertyID)propId inRecord:(ABRecordRef)aRecord
+{
+    ABMultiValueRef multi = ABRecordCopyValue(aRecord, propId);
+    NSArray* values = (__bridge_transfer NSArray*)ABMultiValueCopyArrayOfAllValues(multi);
+
+    CFRelease(multi);
+    return values;
+}
+
+/*
+ * Returns the array of labels for a multivalue string property of the specified property id
+ */
+- (NSArray*)labelsForProperty:(ABPropertyID)propId inRecord:(ABRecordRef)aRecord
+{
+    ABMultiValueRef multi = ABRecordCopyValue(aRecord, propId);
+    CFIndex count = ABMultiValueGetCount(multi);
+    NSMutableArray* labels = [NSMutableArray arrayWithCapacity:count];
+
+    for (int i = 0; i < count; i++) {
+        NSString* label = (__bridge_transfer NSString*)ABMultiValueCopyLabelAtIndex(multi, i);
+        if (label) {
+            [labels addObject:label];
+        }
+    }
+
+    CFRelease(multi);
+    return labels;
+}
+
+/* search for values within MultiValue Dictionary properties Address or IM property
+ * IN:
+ * (NSArray*) fields - the array of W3C field names to search within
+ * (ABPropertyID) propId - the AddressBook property that returns a multivalue dictionary
+ * (NSString*) testValue - the string to search for within the specified fields
+ *
+ */
+- (BOOL)searchContactFields:(NSArray*)fields forMVDictionaryProperty:(ABPropertyID)propId withValue:(NSString*)testValue
+{
+    BOOL bFound = NO;
+
+    NSArray* values = [self valuesForProperty:propId inRecord:self.record];  // array of dictionaries (as CFDictionaryRef)
+    int dictCount = [values count];
+
+    // for ims dictionary contains with service (w3C type) and username (W3c value)
+    // for addresses dictionary contains street, city, state, zip, country
+    for (int i = 0; i < dictCount; i++) {
+        CFDictionaryRef dict = (__bridge CFDictionaryRef)[values objectAtIndex:i];
+
+        for (NSString* member in fields) {
+            NSString* abKey = [[CDVContact defaultW3CtoAB] valueForKey:member]; // im and address fields are all strings
+            CFStringRef abValue = nil;
+            if (abKey) {
+                NSString* testString = nil;
+                if ([member isEqualToString:kW3ContactImType]) {
+                    if ([CDVContact isValidW3ContactType:testValue]) {
+                        // only search service/types if the filter string is a valid ContactField.type
+                        testString = (NSString*)[CDVContact convertContactTypeToPropertyLabel:testValue];
+                    }
+                } else {
+                    testString = testValue;
+                }
+                if (testString != nil) {
+                    BOOL bExists = CFDictionaryGetValueIfPresent(dict, (__bridge const void*)abKey, (void*)&abValue);
+                    if (bExists) {
+                        CFRetain(abValue);
+                        NSPredicate* containPred = [NSPredicate predicateWithFormat:@"SELF contains[cd] %@", testString];
+                        bFound = [containPred evaluateWithObject:(__bridge id)abValue];
+                        CFRelease(abValue);
+                    }
+                }
+            }
+            if (bFound == YES) {
+                break;
+            }
+        } // end of for each member in fields
+
+        if (bFound == YES) {
+            break;
+        }
+    } // end of for each dictionary
+
+    return bFound;
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContacts.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContacts.h b/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContacts.h
new file mode 100644
index 0000000..e3deb21
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContacts.h
@@ -0,0 +1,151 @@
+/*
+ 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.
+ */
+
+#import <Foundation/Foundation.h>
+#import <AddressBook/ABAddressBook.h>
+#import <AddressBookUI/AddressBookUI.h>
+#import <Cordova/CDVPlugin.h>
+#import "CDVContact.h"
+
+@interface CDVContacts : CDVPlugin <ABNewPersonViewControllerDelegate,
+                         ABPersonViewControllerDelegate,
+                         ABPeoplePickerNavigationControllerDelegate
+                         >
+{
+    ABAddressBookRef addressBook;
+}
+
+/*
+ * newContact - create a new contact via the GUI
+ *
+ * arguments:
+ *	1: successCallback: this is the javascript function that will be called with the newly created contactId
+ */
+- (void)newContact:(CDVInvokedUrlCommand*)command;
+
+/*
+ * displayContact  - IN PROGRESS
+ *
+ * arguments:
+ *	1: recordID of the contact to display in the iPhone contact display
+ *	2: successCallback - currently not used
+ *  3: error callback
+ * options:
+ *	allowsEditing: set to true to allow the user to edit the contact - currently not supported
+ */
+- (void)displayContact:(CDVInvokedUrlCommand*)command;
+
+/*
+ * chooseContact
+ *
+ * arguments:
+ *	1: this is the javascript function that will be called with the contact data as a JSON object (as the first param)
+ * options:
+ *	allowsEditing: set to true to not choose the contact, but to edit it in the iPhone contact editor
+ */
+- (void)chooseContact:(CDVInvokedUrlCommand*)command;
+
+- (void)newPersonViewController:(ABNewPersonViewController*)newPersonViewController didCompleteWithNewPerson:(ABRecordRef)person;
+- (BOOL)personViewController:(ABPersonViewController*)personViewController shouldPerformDefaultActionForPerson:(ABRecordRef)person
+                    property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifierForValue;
+
+/*
+ * search - searches for contacts.  Only person records are currently supported.
+ *
+ * arguments:
+ *  1: successcallback - this is the javascript function that will be called with the array of found contacts
+ *  2:  errorCallback - optional javascript function to be called in the event of an error with an error code.
+ * options:  dictionary containing ContactFields and ContactFindOptions
+ *	fields - ContactFields array
+ *  findOptions - ContactFindOptions object as dictionary
+ *
+ */
+- (void)search:(CDVInvokedUrlCommand*)command;
+
+/*
+ * save - saves a new contact or updates and existing contact
+ *
+ * arguments:
+ *  1: success callback - this is the javascript function that will be called with the JSON representation of the saved contact
+ *		search calls a fixed navigator.service.contacts._findCallback which then calls the success callback stored before making the call into obj-c
+ */
+- (void)save:(CDVInvokedUrlCommand*)command;
+
+/*
+ * remove - removes a contact from the address book
+ *
+ * arguments:
+ *  1:  1: successcallback - this is the javascript function that will be called with a (now) empty contact object
+ *
+ * options:  dictionary containing Contact object to remove
+ *	contact - Contact object as dictionary
+ */
+- (void)remove:(CDVInvokedUrlCommand*)command;
+
+// - (void) dealloc;
+
+@end
+
+@interface CDVContactsPicker : ABPeoplePickerNavigationController
+{
+    BOOL allowsEditing;
+    NSString* callbackId;
+    NSDictionary* options;
+    NSDictionary* pickedContactDictionary;
+}
+
+@property BOOL allowsEditing;
+@property (copy) NSString* callbackId;
+@property (nonatomic, strong) NSDictionary* options;
+@property (nonatomic, strong) NSDictionary* pickedContactDictionary;
+
+@end
+
+@interface CDVNewContactsController : ABNewPersonViewController
+{
+    NSString* callbackId;
+}
+@property (copy) NSString* callbackId;
+@end
+
+/* ABPersonViewController does not have any UI to dismiss.  Adding navigationItems to it does not work properly,  the navigationItems are lost when the app goes into the background.
+    The solution was to create an empty NavController in front of the ABPersonViewController. This
+    causes the ABPersonViewController to have a back button. By subclassing the ABPersonViewController,
+    we can override viewWillDisappear and take down the entire NavigationController at that time.
+ */
+@interface CDVDisplayContactViewController : ABPersonViewController
+{}
+@property (nonatomic, strong) CDVPlugin* contactsPlugin;
+
+@end
+@interface CDVAddressBookAccessError : NSObject
+{}
+@property (assign) CDVContactError errorCode;
+- (CDVAddressBookAccessError*)initWithCode:(CDVContactError)code;
+@end
+
+typedef void (^ CDVAddressBookWorkerBlock)(
+    ABAddressBookRef         addressBook,
+    CDVAddressBookAccessError* error
+    );
+@interface CDVAddressBookHelper : NSObject
+{}
+
+- (void)createAddressBook:(CDVAddressBookWorkerBlock)workerBlock;
+@end


[70/70] git commit: Update plugman cli to use cordova-lib

Posted by ka...@apache.org.
Update plugman cli to use cordova-lib


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

Branch: refs/heads/cordova-lib
Commit: bea01b3661e90c5d670d5c0a2df9ce0a85dfbcc2
Parents: eefdf68
Author: Mark Koudritsky <ka...@gmail.com>
Authored: Wed Apr 30 17:48:11 2014 -0400
Committer: Mark Koudritsky <ka...@gmail.com>
Committed: Thu May 1 11:22:29 2014 -0400

----------------------------------------------------------------------
 main.js             |   9 +-
 npm-shrinkwrap.json | 625 -----------------------------------------------
 package.json        |  16 +-
 plugman.js          |   5 +
 4 files changed, 12 insertions(+), 643 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/bea01b36/main.js
----------------------------------------------------------------------
diff --git a/main.js b/main.js
index cb08923..89b703d 100755
--- a/main.js
+++ b/main.js
@@ -23,9 +23,10 @@ var path = require('path')
     , url = require('url')
     , package = require(path.join(__dirname, 'package'))
     , nopt = require('nopt')
-    , plugins = require('./src/util/plugins')
     , Q = require('q')
-    , plugman = require('./plugman');
+    , help = require('./src/help')
+    , cordova_lib = require('cordova-lib')
+    , plugman = cordova_lib.plugman;
 
 var known_opts = { 'platform' : [ 'ios', 'android', 'amazon-fireos', 'blackberry10', 'wp7', 'wp8' , 'windows8', 'firefoxos' ]
         , 'project' : path
@@ -77,12 +78,12 @@ plugman.on('error', console.error);
 if (cli_opts.version) {
     console.log(package.version);
 } else if (cli_opts.help) {
-    console.log(plugman.help());
+    console.log(help());
 } else if (plugman.commands[cmd]) {
     var result = plugman.commands[cmd](cli_opts);
     if (result && Q.isPromise(result)) {
         result.done();
     }
 } else {
-    console.log(plugman.help());
+    console.log(help());
 }

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/bea01b36/npm-shrinkwrap.json
----------------------------------------------------------------------
diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json
deleted file mode 100644
index 5c38496..0000000
--- a/npm-shrinkwrap.json
+++ /dev/null
@@ -1,625 +0,0 @@
-{
-  "name": "plugman",
-  "version": "0.20.3-dev",
-  "dependencies": {
-    "bplist-parser": {
-      "version": "0.0.5",
-      "from": "bplist-parser@0.0.x"
-    },
-    "dep-graph": {
-      "version": "1.1.0",
-      "from": "dep-graph@1.1.0",
-      "dependencies": {
-        "underscore": {
-          "version": "1.2.1",
-          "from": "underscore@1.2.1"
-        }
-      }
-    },
-    "elementtree": {
-      "version": "0.1.5",
-      "from": "elementtree@0.1.5",
-      "dependencies": {
-        "sax": {
-          "version": "0.3.5",
-          "from": "sax@0.3.5"
-        }
-      }
-    },
-    "glob": {
-      "version": "3.2.9",
-      "from": "glob@3.2.x",
-      "dependencies": {
-        "minimatch": {
-          "version": "0.2.14",
-          "from": "minimatch@~0.2.11",
-          "dependencies": {
-            "lru-cache": {
-              "version": "2.5.0",
-              "from": "lru-cache@2"
-            },
-            "sigmund": {
-              "version": "1.0.0",
-              "from": "sigmund@~1.0.0"
-            }
-          }
-        },
-        "inherits": {
-          "version": "2.0.1",
-          "from": "inherits@2"
-        }
-      }
-    },
-    "nopt": {
-      "version": "1.0.10",
-      "from": "nopt@1.0.x",
-      "dependencies": {
-        "abbrev": {
-          "version": "1.0.4",
-          "from": "abbrev@1"
-        }
-      }
-    },
-    "npm": {
-      "version": "1.3.4",
-      "from": "npm@1.3.4",
-      "dependencies": {
-        "semver": {
-          "version": "2.0.8",
-          "from": "semver@latest"
-        },
-        "ini": {
-          "version": "1.1.0",
-          "from": "ini@latest"
-        },
-        "slide": {
-          "version": "1.1.4",
-          "from": "slide@latest"
-        },
-        "abbrev": {
-          "version": "1.0.4",
-          "from": "abbrev@latest"
-        },
-        "graceful-fs": {
-          "version": "2.0.0",
-          "from": "graceful-fs@2"
-        },
-        "minimatch": {
-          "version": "0.2.12",
-          "from": "minimatch@latest",
-          "dependencies": {
-            "sigmund": {
-              "version": "1.0.0",
-              "from": "sigmund@~1.0.0",
-              "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz"
-            }
-          }
-        },
-        "nopt": {
-          "version": "2.1.1",
-          "from": "nopt@latest"
-        },
-        "rimraf": {
-          "version": "2.2.0",
-          "from": "rimraf@2.2"
-        },
-        "request": {
-          "version": "2.21.0",
-          "from": "request@latest",
-          "dependencies": {
-            "qs": {
-              "version": "0.6.5",
-              "from": "qs@~0.6.0"
-            },
-            "json-stringify-safe": {
-              "version": "4.0.0",
-              "from": "json-stringify-safe@~4.0.0"
-            },
-            "forever-agent": {
-              "version": "0.5.0",
-              "from": "forever-agent@~0.5.0"
-            },
-            "tunnel-agent": {
-              "version": "0.3.0",
-              "from": "tunnel-agent@~0.3.0"
-            },
-            "http-signature": {
-              "version": "0.9.11",
-              "from": "http-signature@~0.9.11",
-              "dependencies": {
-                "assert-plus": {
-                  "version": "0.1.2",
-                  "from": "assert-plus@0.1.2"
-                },
-                "asn1": {
-                  "version": "0.1.11",
-                  "from": "asn1@0.1.11"
-                },
-                "ctype": {
-                  "version": "0.5.2",
-                  "from": "ctype@0.5.2"
-                }
-              }
-            },
-            "hawk": {
-              "version": "0.13.1",
-              "from": "hawk@~0.13.0",
-              "dependencies": {
-                "hoek": {
-                  "version": "0.8.5",
-                  "from": "hoek@0.8.x"
-                },
-                "boom": {
-                  "version": "0.4.2",
-                  "from": "boom@0.4.x",
-                  "dependencies": {
-                    "hoek": {
-                      "version": "0.9.1",
-                      "from": "hoek@0.9.x",
-                      "resolved": "https://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz"
-                    }
-                  }
-                },
-                "cryptiles": {
-                  "version": "0.2.1",
-                  "from": "cryptiles@0.2.x"
-                },
-                "sntp": {
-                  "version": "0.2.4",
-                  "from": "sntp@0.2.x",
-                  "dependencies": {
-                    "hoek": {
-                      "version": "0.9.1",
-                      "from": "hoek@0.9.x",
-                      "resolved": "https://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz"
-                    }
-                  }
-                }
-              }
-            },
-            "aws-sign": {
-              "version": "0.3.0",
-              "from": "aws-sign@~0.3.0"
-            },
-            "oauth-sign": {
-              "version": "0.3.0",
-              "from": "oauth-sign@~0.3.0"
-            },
-            "cookie-jar": {
-              "version": "0.3.0",
-              "from": "cookie-jar@~0.3.0"
-            },
-            "node-uuid": {
-              "version": "1.4.0",
-              "from": "node-uuid@~1.4.0"
-            },
-            "mime": {
-              "version": "1.2.9",
-              "from": "mime@~1.2.9"
-            },
-            "form-data": {
-              "version": "0.0.8",
-              "from": "form-data@0.0.8",
-              "dependencies": {
-                "combined-stream": {
-                  "version": "0.0.4",
-                  "from": "combined-stream@~0.0.4",
-                  "dependencies": {
-                    "delayed-stream": {
-                      "version": "0.0.5",
-                      "from": "delayed-stream@0.0.5"
-                    }
-                  }
-                },
-                "async": {
-                  "version": "0.2.9",
-                  "from": "async@~0.2.7"
-                }
-              }
-            }
-          }
-        },
-        "which": {
-          "version": "1.0.5",
-          "from": "which@1"
-        },
-        "tar": {
-          "version": "0.1.17",
-          "from": "tar@0.1.17",
-          "resolved": "https://registry.npmjs.org/tar/-/tar-0.1.17.tgz"
-        },
-        "fstream": {
-          "version": "0.1.23",
-          "from": "fstream@latest"
-        },
-        "block-stream": {
-          "version": "0.0.6",
-          "from": "block-stream@*"
-        },
-        "inherits": {
-          "version": "1.0.0",
-          "from": "git://github.com/isaacs/inherits"
-        },
-        "mkdirp": {
-          "version": "0.3.5",
-          "from": "mkdirp@0.3.5",
-          "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz"
-        },
-        "read": {
-          "version": "1.0.4",
-          "from": "read@~1.0.3",
-          "dependencies": {
-            "mute-stream": {
-              "version": "0.0.3",
-              "from": "mute-stream@~0.0.2"
-            }
-          }
-        },
-        "lru-cache": {
-          "version": "2.3.0",
-          "from": "lru-cache@latest"
-        },
-        "node-gyp": {
-          "version": "0.10.6",
-          "from": "node-gyp@latest"
-        },
-        "fstream-npm": {
-          "version": "0.1.4",
-          "from": "fstream-npm@latest",
-          "dependencies": {
-            "fstream-ignore": {
-              "version": "0.0.6",
-              "from": "fstream-ignore@~0.0.5"
-            }
-          }
-        },
-        "uid-number": {
-          "version": "0.0.3",
-          "from": "../uid-number"
-        },
-        "archy": {
-          "version": "0.0.2",
-          "from": "archy@0.0.2"
-        },
-        "chownr": {
-          "version": "0.0.1",
-          "from": "../chownr"
-        },
-        "npmlog": {
-          "version": "0.0.4",
-          "from": "npmlog@latest"
-        },
-        "ansi": {
-          "version": "0.1.2",
-          "from": "ansi@~0.1.2"
-        },
-        "npm-registry-client": {
-          "version": "0.2.27",
-          "from": "npm-registry-client@latest",
-          "dependencies": {
-            "couch-login": {
-              "version": "0.1.17",
-              "from": "couch-login@~0.1.15"
-            }
-          }
-        },
-        "read-package-json": {
-          "version": "1.1.0",
-          "from": "read-package-json@1",
-          "dependencies": {
-            "normalize-package-data": {
-              "version": "0.2.0",
-              "from": "normalize-package-data@~0.2",
-              "dependencies": {
-                "github-url-from-git": {
-                  "version": "1.1.1",
-                  "from": "github-url-from-git@~1.1.1"
-                }
-              }
-            }
-          }
-        },
-        "read-installed": {
-          "version": "0.2.2",
-          "from": "read-installed@latest"
-        },
-        "glob": {
-          "version": "3.2.3",
-          "from": "glob@latest",
-          "dependencies": {
-            "inherits": {
-              "version": "2.0.0",
-              "from": "inherits@2"
-            }
-          }
-        },
-        "init-package-json": {
-          "version": "0.0.10",
-          "from": "init-package-json@latest",
-          "dependencies": {
-            "promzard": {
-              "version": "0.2.0",
-              "from": "promzard@~0.2.0"
-            }
-          }
-        },
-        "osenv": {
-          "version": "0.0.3",
-          "from": "osenv@latest"
-        },
-        "lockfile": {
-          "version": "0.4.0",
-          "from": "lockfile@latest"
-        },
-        "retry": {
-          "version": "0.6.0",
-          "from": "retry"
-        },
-        "once": {
-          "version": "1.1.1",
-          "from": "once"
-        },
-        "npmconf": {
-          "version": "0.1.1",
-          "from": "npmconf@latest",
-          "dependencies": {
-            "config-chain": {
-              "version": "1.1.7",
-              "from": "config-chain@~1.1.1",
-              "dependencies": {
-                "proto-list": {
-                  "version": "1.2.2",
-                  "from": "proto-list@~1.2.1"
-                }
-              }
-            }
-          }
-        },
-        "opener": {
-          "version": "1.3.0",
-          "from": "opener@latest"
-        },
-        "chmodr": {
-          "version": "0.1.0",
-          "from": "chmodr@latest"
-        },
-        "cmd-shim": {
-          "version": "1.1.0",
-          "from": "cmd-shim@"
-        },
-        "sha": {
-          "version": "1.0.1",
-          "from": "sha@~1.0.1"
-        },
-        "editor": {
-          "version": "0.0.4",
-          "from": "editor@"
-        },
-        "child-process-close": {
-          "version": "0.1.1",
-          "from": "child-process-close@",
-          "resolved": "https://registry.npmjs.org/child-process-close/-/child-process-close-0.1.1.tgz"
-        },
-        "npm-user-validate": {
-          "version": "0.0.3",
-          "from": "npm-user-validate@0.0.3",
-          "resolved": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.0.3.tgz"
-        }
-      }
-    },
-    "plist-with-patches": {
-      "version": "0.5.1",
-      "from": "plist-with-patches@0.5.x",
-      "dependencies": {
-        "xmlbuilder": {
-          "version": "0.4.3",
-          "from": "xmlbuilder@0.4.x"
-        },
-        "xmldom": {
-          "version": "0.1.19",
-          "from": "xmldom@0.1.x"
-        }
-      }
-    },
-    "q": {
-      "version": "0.9.7",
-      "from": "q@~0.9"
-    },
-    "rc": {
-      "version": "0.3.0",
-      "from": "rc@0.3.0",
-      "dependencies": {
-        "optimist": {
-          "version": "0.3.7",
-          "from": "optimist@~0.3.4",
-          "dependencies": {
-            "wordwrap": {
-              "version": "0.0.2",
-              "from": "wordwrap@~0.0.2"
-            }
-          }
-        },
-        "deep-extend": {
-          "version": "0.2.8",
-          "from": "deep-extend@~0.2.5"
-        },
-        "ini": {
-          "version": "1.1.0",
-          "from": "ini@~1.1.0"
-        }
-      }
-    },
-    "request": {
-      "version": "2.22.0",
-      "from": "request@2.22.0",
-      "dependencies": {
-        "qs": {
-          "version": "0.6.6",
-          "from": "qs@~0.6.0"
-        },
-        "json-stringify-safe": {
-          "version": "4.0.0",
-          "from": "json-stringify-safe@~4.0.0"
-        },
-        "forever-agent": {
-          "version": "0.5.2",
-          "from": "forever-agent@~0.5.0"
-        },
-        "tunnel-agent": {
-          "version": "0.3.0",
-          "from": "tunnel-agent@~0.3.0"
-        },
-        "http-signature": {
-          "version": "0.10.0",
-          "from": "http-signature@~0.10.0",
-          "dependencies": {
-            "assert-plus": {
-              "version": "0.1.2",
-              "from": "assert-plus@0.1.2"
-            },
-            "asn1": {
-              "version": "0.1.11",
-              "from": "asn1@0.1.11"
-            },
-            "ctype": {
-              "version": "0.5.2",
-              "from": "ctype@0.5.2"
-            }
-          }
-        },
-        "hawk": {
-          "version": "0.13.1",
-          "from": "hawk@~0.13.0",
-          "dependencies": {
-            "hoek": {
-              "version": "0.8.5",
-              "from": "hoek@0.8.x"
-            },
-            "boom": {
-              "version": "0.4.2",
-              "from": "boom@0.4.x",
-              "dependencies": {
-                "hoek": {
-                  "version": "0.9.1",
-                  "from": "hoek@0.9.x"
-                }
-              }
-            },
-            "cryptiles": {
-              "version": "0.2.2",
-              "from": "cryptiles@0.2.x"
-            },
-            "sntp": {
-              "version": "0.2.4",
-              "from": "sntp@0.2.x",
-              "dependencies": {
-                "hoek": {
-                  "version": "0.9.1",
-                  "from": "hoek@0.9.x"
-                }
-              }
-            }
-          }
-        },
-        "aws-sign": {
-          "version": "0.3.0",
-          "from": "aws-sign@~0.3.0"
-        },
-        "oauth-sign": {
-          "version": "0.3.0",
-          "from": "oauth-sign@~0.3.0"
-        },
-        "cookie-jar": {
-          "version": "0.3.0",
-          "from": "cookie-jar@~0.3.0"
-        },
-        "node-uuid": {
-          "version": "1.4.1",
-          "from": "node-uuid@~1.4.0"
-        },
-        "mime": {
-          "version": "1.2.11",
-          "from": "mime@~1.2.9"
-        },
-        "form-data": {
-          "version": "0.0.8",
-          "from": "form-data@0.0.8",
-          "dependencies": {
-            "combined-stream": {
-              "version": "0.0.4",
-              "from": "combined-stream@~0.0.4",
-              "dependencies": {
-                "delayed-stream": {
-                  "version": "0.0.5",
-                  "from": "delayed-stream@0.0.5"
-                }
-              }
-            },
-            "async": {
-              "version": "0.2.10",
-              "from": "async@~0.2.7"
-            }
-          }
-        }
-      }
-    },
-    "semver": {
-      "version": "2.0.11",
-      "from": "semver@2.0.x"
-    },
-    "shelljs": {
-      "version": "0.1.4",
-      "from": "shelljs@0.1.x"
-    },
-    "tar": {
-      "version": "0.1.19",
-      "from": "tar@0.1.x",
-      "dependencies": {
-        "inherits": {
-          "version": "2.0.1",
-          "from": "inherits@2"
-        },
-        "block-stream": {
-          "version": "0.0.7",
-          "from": "block-stream@*"
-        },
-        "fstream": {
-          "version": "0.1.25",
-          "from": "fstream@~0.1.8",
-          "dependencies": {
-            "rimraf": {
-              "version": "2.2.6",
-              "from": "rimraf@2"
-            },
-            "mkdirp": {
-              "version": "0.3.5",
-              "from": "mkdirp@0.3"
-            },
-            "graceful-fs": {
-              "version": "2.0.2",
-              "from": "graceful-fs@~2.0.0"
-            }
-          }
-        }
-      }
-    },
-    "underscore": {
-      "version": "1.4.4",
-      "from": "underscore@1.4.4"
-    },
-    "xcode": {
-      "version": "0.6.6",
-      "from": "xcode@0.6.6",
-      "dependencies": {
-        "pegjs": {
-          "version": "0.6.2",
-          "from": "pegjs@0.6.2"
-        },
-        "node-uuid": {
-          "version": "1.3.3",
-          "from": "node-uuid@1.3.3"
-        }
-      }
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/bea01b36/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index a70e882..8c39c29 100644
--- a/package.json
+++ b/package.json
@@ -18,25 +18,13 @@
   "engineStrict":true,
   "dependencies": {
     "nopt": "1.0.x",
-    "glob": "3.2.x",
-    "elementtree": "0.1.5",
-    "xcode": "0.6.6",
-    "plist-with-patches": "0.5.x",
-    "bplist-parser": "0.0.x",
-    "shelljs": "0.1.x",
     "underscore":"1.4.4",
-    "dep-graph":"1.1.0",
-    "semver": "2.0.x",
     "q": "~0.9",
     "npm": "1.3.4",
-    "rc": "0.3.0",
-    "tar": "0.1.x",
-    "request": "2.22.0"
+    "rc": "0.3.0"
   },
   "devDependencies": {
-    "temp": "0.6.x",
-    "jasmine-node": "~1",
-    "osenv": "0.0.x"
+    "jasmine-node": "~1"
   },
   "bin" : { "plugman" : "./main.js" },
   "scripts": {

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/bea01b36/plugman.js
----------------------------------------------------------------------
diff --git a/plugman.js b/plugman.js
new file mode 100644
index 0000000..30f4cba
--- /dev/null
+++ b/plugman.js
@@ -0,0 +1,5 @@
+// All plugman js API moved to cordova-lib . This is a temporary shim for
+// dowstream packages that use plugman via js API.
+
+var cordova_lib = require('cordova-lib');
+module.exports = cordova_lib.plugman;
\ No newline at end of file


[08/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/ios-config-xml/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/spec/projects/ios-config-xml/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/spec/projects/ios-config-xml/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
deleted file mode 100644
index 5d0d461..0000000
--- a/spec/projects/ios-config-xml/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,636 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		1F2BECC013F9785B00A93BF6 /* CDVBattery.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F2BECBE13F9785B00A93BF6 /* CDVBattery.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		1F2BECC113F9785B00A93BF6 /* CDVBattery.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F2BECBF13F9785B00A93BF6 /* CDVBattery.m */; };
-		1F3C04CE12BC247D004F9E10 /* CDVContact.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F3C04CC12BC247D004F9E10 /* CDVContact.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		1F3C04CF12BC247D004F9E10 /* CDVContact.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F3C04CD12BC247D004F9E10 /* CDVContact.m */; };
-		1F584B9B1385A28A00ED25E8 /* CDVCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F584B991385A28900ED25E8 /* CDVCapture.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		1F584B9C1385A28A00ED25E8 /* CDVCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F584B9A1385A28900ED25E8 /* CDVCapture.m */; };
-		1F92F4A01314023E0046367C /* CDVPluginResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F92F49E1314023E0046367C /* CDVPluginResult.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		1F92F4A11314023E0046367C /* CDVPluginResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F92F49F1314023E0046367C /* CDVPluginResult.m */; };
-		301F2F2A14F3C9CA003FE9FC /* CDV.h in Headers */ = {isa = PBXBuildFile; fileRef = 301F2F2914F3C9CA003FE9FC /* CDV.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		302965BC13A94E9D007046C5 /* CDVDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 302965BB13A94E9D007046C5 /* CDVDebug.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3034979C1513D56A0090E688 /* CDVLocalStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 3034979A1513D56A0090E688 /* CDVLocalStorage.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3034979E1513D56A0090E688 /* CDVLocalStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 3034979B1513D56A0090E688 /* CDVLocalStorage.m */; };
-		30392E4E14F4FCAB00B9E0B8 /* CDVAvailability.h in Headers */ = {isa = PBXBuildFile; fileRef = 30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3062D120151D0EDB000D9128 /* UIDevice+Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3062D122151D0EDB000D9128 /* UIDevice+Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */; };
-		307A8F9E1385A2EC00E43782 /* CDVConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 307A8F9C1385A2EC00E43782 /* CDVConnection.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		307A8F9F1385A2EC00E43782 /* CDVConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 307A8F9D1385A2EC00E43782 /* CDVConnection.m */; };
-		30A90B9114588697006178D3 /* JSONKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 30A90B8F14588697006178D3 /* JSONKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30A90B9314588697006178D3 /* JSONKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 30A90B9014588697006178D3 /* JSONKit.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
-		30B39EBE13D0268B0009682A /* CDVSplashScreen.h in Headers */ = {isa = PBXBuildFile; fileRef = 30B39EBC13D0268B0009682A /* CDVSplashScreen.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30B39EBF13D0268B0009682A /* CDVSplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 30B39EBD13D0268B0009682A /* CDVSplashScreen.m */; };
-		30C5F1DF15AF9E950052A00D /* CDVDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C5F1DD15AF9E950052A00D /* CDVDevice.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30C5F1E015AF9E950052A00D /* CDVDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C5F1DE15AF9E950052A00D /* CDVDevice.m */; };
-		30C684801406CB38004C1A8E /* CDVWhitelist.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C6847E1406CB38004C1A8E /* CDVWhitelist.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30C684821406CB38004C1A8E /* CDVWhitelist.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C6847F1406CB38004C1A8E /* CDVWhitelist.m */; };
-		30C684941407044B004C1A8E /* CDVURLProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C684921407044A004C1A8E /* CDVURLProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30C684961407044B004C1A8E /* CDVURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C684931407044A004C1A8E /* CDVURLProtocol.m */; };
-		30E33AF213A7E24B00594D64 /* CDVPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E33AF013A7E24B00594D64 /* CDVPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30E33AF313A7E24B00594D64 /* CDVPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 30E33AF113A7E24B00594D64 /* CDVPlugin.m */; };
-		30E563CF13E217EC00C949AA /* NSMutableArray+QueueAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30E563D013E217EC00C949AA /* NSMutableArray+QueueAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */; };
-		30F5EBAB14CA26E700987760 /* CDVCommandDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3E76876D156A90EE00EB6FA3 /* CDVLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E76876B156A90EE00EB6FA3 /* CDVLogger.m */; };
-		3E76876F156A90EE00EB6FA3 /* CDVLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E76876C156A90EE00EB6FA3 /* CDVLogger.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8852C43A14B65FD800F0E735 /* CDVViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 8852C43614B65FD800F0E735 /* CDVViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8852C43C14B65FD800F0E735 /* CDVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8852C43714B65FD800F0E735 /* CDVViewController.m */; };
-		8852C43F14B65FD800F0E735 /* CDVCordovaView.h in Headers */ = {isa = PBXBuildFile; fileRef = 8852C43814B65FD800F0E735 /* CDVCordovaView.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8852C44114B65FD800F0E735 /* CDVCordovaView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8852C43914B65FD800F0E735 /* CDVCordovaView.m */; };
-		8887FD661090FBE7009987E8 /* CDVCamera.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD261090FBE7009987E8 /* CDVCamera.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD671090FBE7009987E8 /* CDVCamera.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD271090FBE7009987E8 /* CDVCamera.m */; };
-		8887FD681090FBE7009987E8 /* NSDictionary+Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD691090FBE7009987E8 /* NSDictionary+Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD291090FBE7009987E8 /* NSDictionary+Extensions.m */; };
-		8887FD6A1090FBE7009987E8 /* CDVContacts.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD2A1090FBE7009987E8 /* CDVContacts.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD6B1090FBE7009987E8 /* CDVContacts.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD2B1090FBE7009987E8 /* CDVContacts.m */; };
-		8887FD6C1090FBE7009987E8 /* CDVDebugConsole.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD2C1090FBE7009987E8 /* CDVDebugConsole.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD6D1090FBE7009987E8 /* CDVDebugConsole.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD2D1090FBE7009987E8 /* CDVDebugConsole.m */; };
-		8887FD701090FBE7009987E8 /* CDVFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD301090FBE7009987E8 /* CDVFile.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD711090FBE7009987E8 /* CDVFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD311090FBE7009987E8 /* CDVFile.m */; };
-		8887FD741090FBE7009987E8 /* CDVInvokedUrlCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD751090FBE7009987E8 /* CDVInvokedUrlCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */; };
-		8887FD851090FBE7009987E8 /* CDVLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD461090FBE7009987E8 /* CDVLocation.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD861090FBE7009987E8 /* CDVLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD471090FBE7009987E8 /* CDVLocation.m */; };
-		8887FD8D1090FBE7009987E8 /* CDVNotification.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD4E1090FBE7009987E8 /* CDVNotification.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD8E1090FBE7009987E8 /* CDVNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD4F1090FBE7009987E8 /* CDVNotification.m */; };
-		8887FD8F1090FBE7009987E8 /* NSData+Base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD501090FBE7009987E8 /* NSData+Base64.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD901090FBE7009987E8 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD511090FBE7009987E8 /* NSData+Base64.m */; };
-		8887FD9D1090FBE7009987E8 /* CDVReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD5E1090FBE7009987E8 /* CDVReachability.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD9E1090FBE7009987E8 /* CDVReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD5F1090FBE7009987E8 /* CDVReachability.m */; };
-		8887FD9F1090FBE7009987E8 /* CDVSound.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD601090FBE7009987E8 /* CDVSound.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FDA01090FBE7009987E8 /* CDVSound.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD611090FBE7009987E8 /* CDVSound.m */; };
-		88BA573D109BB46F00FB5E78 /* CDVAccelerometer.h in Headers */ = {isa = PBXBuildFile; fileRef = 88BA573B109BB46F00FB5E78 /* CDVAccelerometer.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		88BA573E109BB46F00FB5E78 /* CDVAccelerometer.m in Sources */ = {isa = PBXBuildFile; fileRef = 88BA573C109BB46F00FB5E78 /* CDVAccelerometer.m */; };
-		9D76CF3C1625A4C50008A0F6 /* CDVGlobalization.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D76CF3A1625A4C50008A0F6 /* CDVGlobalization.h */; };
-		9D76CF3D1625A4C50008A0F6 /* CDVGlobalization.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D76CF3B1625A4C50008A0F6 /* CDVGlobalization.m */; };
-		C937A4561337599E002C4C79 /* CDVFileTransfer.h in Headers */ = {isa = PBXBuildFile; fileRef = C937A4541337599E002C4C79 /* CDVFileTransfer.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		C937A4571337599E002C4C79 /* CDVFileTransfer.m in Sources */ = {isa = PBXBuildFile; fileRef = C937A4551337599E002C4C79 /* CDVFileTransfer.m */; };
-		EB3B3547161CB44D003DBE7D /* CDVCommandQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */; };
-		EB3B3548161CB44D003DBE7D /* CDVCommandQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */; };
-		EB3B357C161F2A45003DBE7D /* CDVCommandDelegateImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */; };
-		EB3B357D161F2A45003DBE7D /* CDVCommandDelegateImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */; };
-		EB80C2AC15DEA63D004D9E7B /* CDVEcho.h in Headers */ = {isa = PBXBuildFile; fileRef = EB80C2AA15DEA63D004D9E7B /* CDVEcho.h */; };
-		EB80C2AD15DEA63D004D9E7B /* CDVEcho.m in Sources */ = {isa = PBXBuildFile; fileRef = EB80C2AB15DEA63D004D9E7B /* CDVEcho.m */; };
-		EBA3557315ABD38C00F4DE24 /* NSArray+Comparisons.h in Headers */ = {isa = PBXBuildFile; fileRef = EBA3557115ABD38C00F4DE24 /* NSArray+Comparisons.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		EBA3557515ABD38C00F4DE24 /* NSArray+Comparisons.m in Sources */ = {isa = PBXBuildFile; fileRef = EBA3557215ABD38C00F4DE24 /* NSArray+Comparisons.m */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
-		1F2BECBE13F9785B00A93BF6 /* CDVBattery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVBattery.h; path = Classes/CDVBattery.h; sourceTree = "<group>"; };
-		1F2BECBF13F9785B00A93BF6 /* CDVBattery.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVBattery.m; path = Classes/CDVBattery.m; sourceTree = "<group>"; };
-		1F3C04CC12BC247D004F9E10 /* CDVContact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVContact.h; path = Classes/CDVContact.h; sourceTree = "<group>"; };
-		1F3C04CD12BC247D004F9E10 /* CDVContact.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVContact.m; path = Classes/CDVContact.m; sourceTree = "<group>"; };
-		1F584B991385A28900ED25E8 /* CDVCapture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCapture.h; path = Classes/CDVCapture.h; sourceTree = "<group>"; };
-		1F584B9A1385A28900ED25E8 /* CDVCapture.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCapture.m; path = Classes/CDVCapture.m; sourceTree = "<group>"; };
-		1F92F49E1314023E0046367C /* CDVPluginResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVPluginResult.h; path = Classes/CDVPluginResult.h; sourceTree = "<group>"; };
-		1F92F49F1314023E0046367C /* CDVPluginResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVPluginResult.m; path = Classes/CDVPluginResult.m; sourceTree = "<group>"; };
-		301F2F2914F3C9CA003FE9FC /* CDV.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDV.h; path = Classes/CDV.h; sourceTree = "<group>"; };
-		302965BB13A94E9D007046C5 /* CDVDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDebug.h; path = Classes/CDVDebug.h; sourceTree = "<group>"; };
-		30325A0B136B343700982B63 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
-		3034979A1513D56A0090E688 /* CDVLocalStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLocalStorage.h; path = Classes/CDVLocalStorage.h; sourceTree = "<group>"; };
-		3034979B1513D56A0090E688 /* CDVLocalStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLocalStorage.m; path = Classes/CDVLocalStorage.m; sourceTree = "<group>"; };
-		30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVAvailability.h; path = Classes/CDVAvailability.h; sourceTree = "<group>"; };
-		3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIDevice+Extensions.h"; path = "Classes/UIDevice+Extensions.h"; sourceTree = "<group>"; };
-		3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIDevice+Extensions.m"; path = "Classes/UIDevice+Extensions.m"; sourceTree = "<group>"; };
-		307A8F9C1385A2EC00E43782 /* CDVConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVConnection.h; path = Classes/CDVConnection.h; sourceTree = "<group>"; };
-		307A8F9D1385A2EC00E43782 /* CDVConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVConnection.m; path = Classes/CDVConnection.m; sourceTree = "<group>"; };
-		30A90B8F14588697006178D3 /* JSONKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONKit.h; sourceTree = "<group>"; };
-		30A90B9014588697006178D3 /* JSONKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONKit.m; sourceTree = "<group>"; };
-		30B39EBC13D0268B0009682A /* CDVSplashScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVSplashScreen.h; path = Classes/CDVSplashScreen.h; sourceTree = "<group>"; };
-		30B39EBD13D0268B0009682A /* CDVSplashScreen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVSplashScreen.m; path = Classes/CDVSplashScreen.m; sourceTree = "<group>"; };
-		30C5F1DD15AF9E950052A00D /* CDVDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDevice.h; path = Classes/CDVDevice.h; sourceTree = "<group>"; };
-		30C5F1DE15AF9E950052A00D /* CDVDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVDevice.m; path = Classes/CDVDevice.m; sourceTree = "<group>"; };
-		30C6847E1406CB38004C1A8E /* CDVWhitelist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVWhitelist.h; path = Classes/CDVWhitelist.h; sourceTree = "<group>"; };
-		30C6847F1406CB38004C1A8E /* CDVWhitelist.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVWhitelist.m; path = Classes/CDVWhitelist.m; sourceTree = "<group>"; };
-		30C684921407044A004C1A8E /* CDVURLProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVURLProtocol.h; path = Classes/CDVURLProtocol.h; sourceTree = "<group>"; };
-		30C684931407044A004C1A8E /* CDVURLProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVURLProtocol.m; path = Classes/CDVURLProtocol.m; sourceTree = "<group>"; };
-		30E33AF013A7E24B00594D64 /* CDVPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVPlugin.h; path = Classes/CDVPlugin.h; sourceTree = "<group>"; };
-		30E33AF113A7E24B00594D64 /* CDVPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVPlugin.m; path = Classes/CDVPlugin.m; sourceTree = "<group>"; };
-		30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSMutableArray+QueueAdditions.h"; path = "Classes/NSMutableArray+QueueAdditions.h"; sourceTree = "<group>"; };
-		30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSMutableArray+QueueAdditions.m"; path = "Classes/NSMutableArray+QueueAdditions.m"; sourceTree = "<group>"; };
-		30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandDelegate.h; path = Classes/CDVCommandDelegate.h; sourceTree = "<group>"; };
-		3E76876B156A90EE00EB6FA3 /* CDVLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLogger.m; path = Classes/CDVLogger.m; sourceTree = "<group>"; };
-		3E76876C156A90EE00EB6FA3 /* CDVLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLogger.h; path = Classes/CDVLogger.h; sourceTree = "<group>"; };
-		686357AA141002F100DF4CF2 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
-		686357AC141002F100DF4CF2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-		686357AE141002F100DF4CF2 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
-		686357CC14100AAD00DF4CF2 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
-		686357CE14100ADA00DF4CF2 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
-		686357CF14100ADB00DF4CF2 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
-		686357D014100ADE00DF4CF2 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
-		686357D214100AE700DF4CF2 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
-		686357D414100AF200DF4CF2 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
-		686357DC14100B1600DF4CF2 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
-		68A32D7114102E1C006B237C /* libCordova.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCordova.a; sourceTree = BUILT_PRODUCTS_DIR; };
-		68A32D7414103017006B237C /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
-		8852C43614B65FD800F0E735 /* CDVViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVViewController.h; path = Classes/CDVViewController.h; sourceTree = "<group>"; };
-		8852C43714B65FD800F0E735 /* CDVViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVViewController.m; path = Classes/CDVViewController.m; sourceTree = "<group>"; };
-		8852C43814B65FD800F0E735 /* CDVCordovaView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCordovaView.h; path = Classes/CDVCordovaView.h; sourceTree = "<group>"; };
-		8852C43914B65FD800F0E735 /* CDVCordovaView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCordovaView.m; path = Classes/CDVCordovaView.m; sourceTree = "<group>"; };
-		8887FD261090FBE7009987E8 /* CDVCamera.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCamera.h; path = Classes/CDVCamera.h; sourceTree = "<group>"; };
-		8887FD271090FBE7009987E8 /* CDVCamera.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCamera.m; path = Classes/CDVCamera.m; sourceTree = "<group>"; };
-		8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+Extensions.h"; path = "Classes/NSDictionary+Extensions.h"; sourceTree = "<group>"; };
-		8887FD291090FBE7009987E8 /* NSDictionary+Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+Extensions.m"; path = "Classes/NSDictionary+Extensions.m"; sourceTree = "<group>"; };
-		8887FD2A1090FBE7009987E8 /* CDVContacts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVContacts.h; path = Classes/CDVContacts.h; sourceTree = "<group>"; };
-		8887FD2B1090FBE7009987E8 /* CDVContacts.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVContacts.m; path = Classes/CDVContacts.m; sourceTree = "<group>"; };
-		8887FD2C1090FBE7009987E8 /* CDVDebugConsole.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDebugConsole.h; path = Classes/CDVDebugConsole.h; sourceTree = "<group>"; };
-		8887FD2D1090FBE7009987E8 /* CDVDebugConsole.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVDebugConsole.m; path = Classes/CDVDebugConsole.m; sourceTree = "<group>"; };
-		8887FD301090FBE7009987E8 /* CDVFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVFile.h; path = Classes/CDVFile.h; sourceTree = "<group>"; };
-		8887FD311090FBE7009987E8 /* CDVFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVFile.m; path = Classes/CDVFile.m; sourceTree = "<group>"; };
-		8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVInvokedUrlCommand.h; path = Classes/CDVInvokedUrlCommand.h; sourceTree = "<group>"; };
-		8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVInvokedUrlCommand.m; path = Classes/CDVInvokedUrlCommand.m; sourceTree = "<group>"; };
-		8887FD461090FBE7009987E8 /* CDVLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLocation.h; path = Classes/CDVLocation.h; sourceTree = "<group>"; };
-		8887FD471090FBE7009987E8 /* CDVLocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLocation.m; path = Classes/CDVLocation.m; sourceTree = "<group>"; };
-		8887FD4E1090FBE7009987E8 /* CDVNotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVNotification.h; path = Classes/CDVNotification.h; sourceTree = "<group>"; };
-		8887FD4F1090FBE7009987E8 /* CDVNotification.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVNotification.m; path = Classes/CDVNotification.m; sourceTree = "<group>"; };
-		8887FD501090FBE7009987E8 /* NSData+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSData+Base64.h"; path = "Classes/NSData+Base64.h"; sourceTree = "<group>"; };
-		8887FD511090FBE7009987E8 /* NSData+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSData+Base64.m"; path = "Classes/NSData+Base64.m"; sourceTree = "<group>"; };
-		8887FD5E1090FBE7009987E8 /* CDVReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVReachability.h; path = Classes/CDVReachability.h; sourceTree = "<group>"; };
-		8887FD5F1090FBE7009987E8 /* CDVReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVReachability.m; path = Classes/CDVReachability.m; sourceTree = "<group>"; };
-		8887FD601090FBE7009987E8 /* CDVSound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVSound.h; path = Classes/CDVSound.h; sourceTree = "<group>"; };
-		8887FD611090FBE7009987E8 /* CDVSound.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVSound.m; path = Classes/CDVSound.m; sourceTree = "<group>"; };
-		88BA573B109BB46F00FB5E78 /* CDVAccelerometer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVAccelerometer.h; path = Classes/CDVAccelerometer.h; sourceTree = "<group>"; };
-		88BA573C109BB46F00FB5E78 /* CDVAccelerometer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVAccelerometer.m; path = Classes/CDVAccelerometer.m; sourceTree = "<group>"; };
-		9D76CF3A1625A4C50008A0F6 /* CDVGlobalization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVGlobalization.h; path = Classes/CDVGlobalization.h; sourceTree = "<group>"; };
-		9D76CF3B1625A4C50008A0F6 /* CDVGlobalization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVGlobalization.m; path = Classes/CDVGlobalization.m; sourceTree = "<group>"; };
-		AA747D9E0F9514B9006C5449 /* CordovaLib_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CordovaLib_Prefix.pch; sourceTree = SOURCE_ROOT; };
-		C937A4541337599E002C4C79 /* CDVFileTransfer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVFileTransfer.h; path = Classes/CDVFileTransfer.h; sourceTree = "<group>"; };
-		C937A4551337599E002C4C79 /* CDVFileTransfer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVFileTransfer.m; path = Classes/CDVFileTransfer.m; sourceTree = "<group>"; };
-		EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandQueue.h; path = Classes/CDVCommandQueue.h; sourceTree = "<group>"; };
-		EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCommandQueue.m; path = Classes/CDVCommandQueue.m; sourceTree = "<group>"; };
-		EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandDelegateImpl.h; path = Classes/CDVCommandDelegateImpl.h; sourceTree = "<group>"; };
-		EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCommandDelegateImpl.m; path = Classes/CDVCommandDelegateImpl.m; sourceTree = "<group>"; };
-		EB80C2AA15DEA63D004D9E7B /* CDVEcho.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVEcho.h; path = Classes/CDVEcho.h; sourceTree = "<group>"; };
-		EB80C2AB15DEA63D004D9E7B /* CDVEcho.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVEcho.m; path = Classes/CDVEcho.m; sourceTree = "<group>"; };
-		EBA3557115ABD38C00F4DE24 /* NSArray+Comparisons.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSArray+Comparisons.h"; path = "Classes/NSArray+Comparisons.h"; sourceTree = "<group>"; };
-		EBA3557215ABD38C00F4DE24 /* NSArray+Comparisons.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSArray+Comparisons.m"; path = "Classes/NSArray+Comparisons.m"; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		D2AAC07C0554694100DB518D /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		034768DFFF38A50411DB9C8B /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				68A32D7114102E1C006B237C /* libCordova.a */,
-			);
-			name = Products;
-			sourceTree = CORDOVALIB;
-		};
-		0867D691FE84028FC02AAC07 /* CordovaLib */ = {
-			isa = PBXGroup;
-			children = (
-				8887FD101090FB43009987E8 /* Classes */,
-				32C88DFF0371C24200C91783 /* Other Sources */,
-				0867D69AFE84028FC02AAC07 /* Frameworks */,
-				034768DFFF38A50411DB9C8B /* Products */,
-				30325A0B136B343700982B63 /* VERSION */,
-			);
-			name = CordovaLib;
-			sourceTree = "<group>";
-		};
-		0867D69AFE84028FC02AAC07 /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				68A32D7414103017006B237C /* AddressBook.framework */,
-				686357DC14100B1600DF4CF2 /* CoreMedia.framework */,
-				686357CE14100ADA00DF4CF2 /* AudioToolbox.framework */,
-				686357CF14100ADB00DF4CF2 /* AVFoundation.framework */,
-				686357D014100ADE00DF4CF2 /* CoreLocation.framework */,
-				686357D214100AE700DF4CF2 /* MobileCoreServices.framework */,
-				686357D414100AF200DF4CF2 /* SystemConfiguration.framework */,
-				686357CC14100AAD00DF4CF2 /* AddressBookUI.framework */,
-				686357AA141002F100DF4CF2 /* UIKit.framework */,
-				686357AC141002F100DF4CF2 /* Foundation.framework */,
-				686357AE141002F100DF4CF2 /* CoreGraphics.framework */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
-		3054098714B77FF3009841CA /* Cleaver */ = {
-			isa = PBXGroup;
-			children = (
-				8852C43614B65FD800F0E735 /* CDVViewController.h */,
-				8852C43714B65FD800F0E735 /* CDVViewController.m */,
-				8852C43814B65FD800F0E735 /* CDVCordovaView.h */,
-				8852C43914B65FD800F0E735 /* CDVCordovaView.m */,
-				EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */,
-				EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */,
-			);
-			name = Cleaver;
-			sourceTree = "<group>";
-		};
-		32C88DFF0371C24200C91783 /* Other Sources */ = {
-			isa = PBXGroup;
-			children = (
-				AA747D9E0F9514B9006C5449 /* CordovaLib_Prefix.pch */,
-			);
-			name = "Other Sources";
-			sourceTree = "<group>";
-		};
-		888700D710922F56009987E8 /* Commands */ = {
-			isa = PBXGroup;
-			children = (
-				30C5F1DD15AF9E950052A00D /* CDVDevice.h */,
-				30C5F1DE15AF9E950052A00D /* CDVDevice.m */,
-				301F2F2914F3C9CA003FE9FC /* CDV.h */,
-				3034979A1513D56A0090E688 /* CDVLocalStorage.h */,
-				3034979B1513D56A0090E688 /* CDVLocalStorage.m */,
-				30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */,
-				30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */,
-				EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */,
-				EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */,
-				30C684921407044A004C1A8E /* CDVURLProtocol.h */,
-				30C684931407044A004C1A8E /* CDVURLProtocol.m */,
-				30C6847E1406CB38004C1A8E /* CDVWhitelist.h */,
-				30C6847F1406CB38004C1A8E /* CDVWhitelist.m */,
-				1F2BECBE13F9785B00A93BF6 /* CDVBattery.h */,
-				1F2BECBF13F9785B00A93BF6 /* CDVBattery.m */,
-				30B39EBC13D0268B0009682A /* CDVSplashScreen.h */,
-				30B39EBD13D0268B0009682A /* CDVSplashScreen.m */,
-				30E33AF013A7E24B00594D64 /* CDVPlugin.h */,
-				30E33AF113A7E24B00594D64 /* CDVPlugin.m */,
-				307A8F9C1385A2EC00E43782 /* CDVConnection.h */,
-				307A8F9D1385A2EC00E43782 /* CDVConnection.m */,
-				1F92F49E1314023E0046367C /* CDVPluginResult.h */,
-				1F92F49F1314023E0046367C /* CDVPluginResult.m */,
-				88BA573B109BB46F00FB5E78 /* CDVAccelerometer.h */,
-				88BA573C109BB46F00FB5E78 /* CDVAccelerometer.m */,
-				8887FD261090FBE7009987E8 /* CDVCamera.h */,
-				8887FD271090FBE7009987E8 /* CDVCamera.m */,
-				1F584B991385A28900ED25E8 /* CDVCapture.h */,
-				1F584B9A1385A28900ED25E8 /* CDVCapture.m */,
-				1F3C04CC12BC247D004F9E10 /* CDVContact.h */,
-				1F3C04CD12BC247D004F9E10 /* CDVContact.m */,
-				8887FD2A1090FBE7009987E8 /* CDVContacts.h */,
-				8887FD2B1090FBE7009987E8 /* CDVContacts.m */,
-				8887FD2C1090FBE7009987E8 /* CDVDebugConsole.h */,
-				8887FD2D1090FBE7009987E8 /* CDVDebugConsole.m */,
-				EB80C2AA15DEA63D004D9E7B /* CDVEcho.h */,
-				EB80C2AB15DEA63D004D9E7B /* CDVEcho.m */,
-				8887FD301090FBE7009987E8 /* CDVFile.h */,
-				8887FD311090FBE7009987E8 /* CDVFile.m */,
-				8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */,
-				8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */,
-				C937A4541337599E002C4C79 /* CDVFileTransfer.h */,
-				C937A4551337599E002C4C79 /* CDVFileTransfer.m */,
-				8887FD461090FBE7009987E8 /* CDVLocation.h */,
-				8887FD471090FBE7009987E8 /* CDVLocation.m */,
-				8887FD4E1090FBE7009987E8 /* CDVNotification.h */,
-				8887FD4F1090FBE7009987E8 /* CDVNotification.m */,
-				8887FD5E1090FBE7009987E8 /* CDVReachability.h */,
-				8887FD5F1090FBE7009987E8 /* CDVReachability.m */,
-				8887FD601090FBE7009987E8 /* CDVSound.h */,
-				8887FD611090FBE7009987E8 /* CDVSound.m */,
-				3E76876B156A90EE00EB6FA3 /* CDVLogger.m */,
-				3E76876C156A90EE00EB6FA3 /* CDVLogger.h */,
-				9D76CF3A1625A4C50008A0F6 /* CDVGlobalization.h */,
-				9D76CF3B1625A4C50008A0F6 /* CDVGlobalization.m */,
-			);
-			name = Commands;
-			sourceTree = "<group>";
-		};
-		888700D910923009009987E8 /* Util */ = {
-			isa = PBXGroup;
-			children = (
-				3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */,
-				3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */,
-				EBA3557115ABD38C00F4DE24 /* NSArray+Comparisons.h */,
-				EBA3557215ABD38C00F4DE24 /* NSArray+Comparisons.m */,
-				8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */,
-				8887FD291090FBE7009987E8 /* NSDictionary+Extensions.m */,
-				302965BB13A94E9D007046C5 /* CDVDebug.h */,
-				30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */,
-				30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */,
-				8887FD501090FBE7009987E8 /* NSData+Base64.h */,
-				8887FD511090FBE7009987E8 /* NSData+Base64.m */,
-			);
-			name = Util;
-			sourceTree = "<group>";
-		};
-		8887FD101090FB43009987E8 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-				3054098714B77FF3009841CA /* Cleaver */,
-				888700D710922F56009987E8 /* Commands */,
-				8887FD361090FBE7009987E8 /* JSON */,
-				888700D910923009009987E8 /* Util */,
-			);
-			name = Classes;
-			sourceTree = "<group>";
-		};
-		8887FD361090FBE7009987E8 /* JSON */ = {
-			isa = PBXGroup;
-			children = (
-				30A90B8F14588697006178D3 /* JSONKit.h */,
-				30A90B9014588697006178D3 /* JSONKit.m */,
-			);
-			name = JSON;
-			path = Classes/JSON;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXHeadersBuildPhase section */
-		D2AAC07A0554694100DB518D /* Headers */ = {
-			isa = PBXHeadersBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				8887FD661090FBE7009987E8 /* CDVCamera.h in Headers */,
-				8887FD681090FBE7009987E8 /* NSDictionary+Extensions.h in Headers */,
-				8887FD6A1090FBE7009987E8 /* CDVContacts.h in Headers */,
-				8887FD6C1090FBE7009987E8 /* CDVDebugConsole.h in Headers */,
-				8887FD701090FBE7009987E8 /* CDVFile.h in Headers */,
-				8887FD741090FBE7009987E8 /* CDVInvokedUrlCommand.h in Headers */,
-				8887FD851090FBE7009987E8 /* CDVLocation.h in Headers */,
-				8887FD8D1090FBE7009987E8 /* CDVNotification.h in Headers */,
-				8887FD8F1090FBE7009987E8 /* NSData+Base64.h in Headers */,
-				8887FD9D1090FBE7009987E8 /* CDVReachability.h in Headers */,
-				8887FD9F1090FBE7009987E8 /* CDVSound.h in Headers */,
-				88BA573D109BB46F00FB5E78 /* CDVAccelerometer.h in Headers */,
-				1F3C04CE12BC247D004F9E10 /* CDVContact.h in Headers */,
-				1F92F4A01314023E0046367C /* CDVPluginResult.h in Headers */,
-				C937A4561337599E002C4C79 /* CDVFileTransfer.h in Headers */,
-				307A8F9E1385A2EC00E43782 /* CDVConnection.h in Headers */,
-				1F584B9B1385A28A00ED25E8 /* CDVCapture.h in Headers */,
-				30E33AF213A7E24B00594D64 /* CDVPlugin.h in Headers */,
-				302965BC13A94E9D007046C5 /* CDVDebug.h in Headers */,
-				30B39EBE13D0268B0009682A /* CDVSplashScreen.h in Headers */,
-				30E563CF13E217EC00C949AA /* NSMutableArray+QueueAdditions.h in Headers */,
-				1F2BECC013F9785B00A93BF6 /* CDVBattery.h in Headers */,
-				30C684801406CB38004C1A8E /* CDVWhitelist.h in Headers */,
-				30C684941407044B004C1A8E /* CDVURLProtocol.h in Headers */,
-				30A90B9114588697006178D3 /* JSONKit.h in Headers */,
-				8852C43A14B65FD800F0E735 /* CDVViewController.h in Headers */,
-				8852C43F14B65FD800F0E735 /* CDVCordovaView.h in Headers */,
-				30F5EBAB14CA26E700987760 /* CDVCommandDelegate.h in Headers */,
-				301F2F2A14F3C9CA003FE9FC /* CDV.h in Headers */,
-				30392E4E14F4FCAB00B9E0B8 /* CDVAvailability.h in Headers */,
-				3034979C1513D56A0090E688 /* CDVLocalStorage.h in Headers */,
-				3062D120151D0EDB000D9128 /* UIDevice+Extensions.h in Headers */,
-				3E76876F156A90EE00EB6FA3 /* CDVLogger.h in Headers */,
-				EBA3557315ABD38C00F4DE24 /* NSArray+Comparisons.h in Headers */,
-				30C5F1DF15AF9E950052A00D /* CDVDevice.h in Headers */,
-				EB80C2AC15DEA63D004D9E7B /* CDVEcho.h in Headers */,
-				EB3B3547161CB44D003DBE7D /* CDVCommandQueue.h in Headers */,
-				EB3B357C161F2A45003DBE7D /* CDVCommandDelegateImpl.h in Headers */,
-				9D76CF3C1625A4C50008A0F6 /* CDVGlobalization.h in Headers */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXHeadersBuildPhase section */
-
-/* Begin PBXNativeTarget section */
-		D2AAC07D0554694100DB518D /* CordovaLib */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CordovaLib" */;
-			buildPhases = (
-				D2AAC07A0554694100DB518D /* Headers */,
-				D2AAC07B0554694100DB518D /* Sources */,
-				D2AAC07C0554694100DB518D /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = CordovaLib;
-			productName = CordovaLib;
-			productReference = 68A32D7114102E1C006B237C /* libCordova.a */;
-			productType = "com.apple.product-type.library.static";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		0867D690FE84028FC02AAC07 /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastUpgradeCheck = 0430;
-			};
-			buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CordovaLib" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 1;
-			knownRegions = (
-				English,
-				Japanese,
-				French,
-				German,
-				en,
-			);
-			mainGroup = 0867D691FE84028FC02AAC07 /* CordovaLib */;
-			productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				D2AAC07D0554694100DB518D /* CordovaLib */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXSourcesBuildPhase section */
-		D2AAC07B0554694100DB518D /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				8887FD671090FBE7009987E8 /* CDVCamera.m in Sources */,
-				8887FD691090FBE7009987E8 /* NSDictionary+Extensions.m in Sources */,
-				8887FD6B1090FBE7009987E8 /* CDVContacts.m in Sources */,
-				8887FD6D1090FBE7009987E8 /* CDVDebugConsole.m in Sources */,
-				8887FD711090FBE7009987E8 /* CDVFile.m in Sources */,
-				8887FD751090FBE7009987E8 /* CDVInvokedUrlCommand.m in Sources */,
-				8887FD861090FBE7009987E8 /* CDVLocation.m in Sources */,
-				8887FD8E1090FBE7009987E8 /* CDVNotification.m in Sources */,
-				8887FD901090FBE7009987E8 /* NSData+Base64.m in Sources */,
-				8887FD9E1090FBE7009987E8 /* CDVReachability.m in Sources */,
-				8887FDA01090FBE7009987E8 /* CDVSound.m in Sources */,
-				88BA573E109BB46F00FB5E78 /* CDVAccelerometer.m in Sources */,
-				1F3C04CF12BC247D004F9E10 /* CDVContact.m in Sources */,
-				1F92F4A11314023E0046367C /* CDVPluginResult.m in Sources */,
-				C937A4571337599E002C4C79 /* CDVFileTransfer.m in Sources */,
-				307A8F9F1385A2EC00E43782 /* CDVConnection.m in Sources */,
-				1F584B9C1385A28A00ED25E8 /* CDVCapture.m in Sources */,
-				30E33AF313A7E24B00594D64 /* CDVPlugin.m in Sources */,
-				30B39EBF13D0268B0009682A /* CDVSplashScreen.m in Sources */,
-				30E563D013E217EC00C949AA /* NSMutableArray+QueueAdditions.m in Sources */,
-				1F2BECC113F9785B00A93BF6 /* CDVBattery.m in Sources */,
-				30C684821406CB38004C1A8E /* CDVWhitelist.m in Sources */,
-				30C684961407044B004C1A8E /* CDVURLProtocol.m in Sources */,
-				30A90B9314588697006178D3 /* JSONKit.m in Sources */,
-				8852C43C14B65FD800F0E735 /* CDVViewController.m in Sources */,
-				8852C44114B65FD800F0E735 /* CDVCordovaView.m in Sources */,
-				3034979E1513D56A0090E688 /* CDVLocalStorage.m in Sources */,
-				3062D122151D0EDB000D9128 /* UIDevice+Extensions.m in Sources */,
-				3E76876D156A90EE00EB6FA3 /* CDVLogger.m in Sources */,
-				EBA3557515ABD38C00F4DE24 /* NSArray+Comparisons.m in Sources */,
-				30C5F1E015AF9E950052A00D /* CDVDevice.m in Sources */,
-				EB80C2AD15DEA63D004D9E7B /* CDVEcho.m in Sources */,
-				EB3B3548161CB44D003DBE7D /* CDVCommandQueue.m in Sources */,
-				EB3B357D161F2A45003DBE7D /* CDVCommandDelegateImpl.m in Sources */,
-				9D76CF3D1625A4C50008A0F6 /* CDVGlobalization.m in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
-		1DEB921F08733DC00010E9CD /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				"ARCHS[sdk=iphoneos*]" = (
-					armv6,
-					armv7,
-				);
-				"ARCHS[sdk=iphoneos6.*]" = (
-					armv7,
-					armv7s,
-				);
-				"ARCHS[sdk=iphonesimulator*]" = i386;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				COPY_PHASE_STRIP = NO;
-				DSTROOT = "/tmp/$(PROJECT_NAME).dst";
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = CordovaLib_Prefix.pch;
-				GCC_PREPROCESSOR_DEFINITIONS = "";
-				GCC_THUMB_SUPPORT = NO;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				INSTALL_PATH = /usr/local/lib;
-				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
-				PRODUCT_NAME = Cordova;
-				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
-				SKIP_INSTALL = YES;
-			};
-			name = Debug;
-		};
-		1DEB922008733DC00010E9CD /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				"ARCHS[sdk=iphoneos*]" = (
-					armv6,
-					armv7,
-				);
-				"ARCHS[sdk=iphoneos6.*]" = (
-					armv7,
-					armv7s,
-				);
-				"ARCHS[sdk=iphonesimulator*]" = i386;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				DSTROOT = "/tmp/$(PROJECT_NAME).dst";
-				GCC_MODEL_TUNING = G5;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = CordovaLib_Prefix.pch;
-				GCC_PREPROCESSOR_DEFINITIONS = "";
-				GCC_THUMB_SUPPORT = NO;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				INSTALL_PATH = /usr/local/lib;
-				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
-				PRODUCT_NAME = Cordova;
-				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
-				SKIP_INSTALL = YES;
-			};
-			name = Release;
-		};
-		1DEB922308733DC00010E9CD /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				"ARCHS[sdk=iphoneos*]" = (
-					armv6,
-					armv7,
-				);
-				"ARCHS[sdk=iphoneos6.*]" = (
-					armv7,
-					armv7s,
-				);
-				"ARCHS[sdk=iphonesimulator*]" = i386;
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = "";
-				GCC_THUMB_SUPPORT = NO;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
-				ONLY_ACTIVE_ARCH = NO;
-				OTHER_CFLAGS = "-DDEBUG";
-				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
-				SDKROOT = iphoneos;
-				SKIP_INSTALL = YES;
-				TARGETED_DEVICE_FAMILY = "1,2";
-				USER_HEADER_SEARCH_PATHS = "";
-				VALID_ARCHS = "i386 armv6 armv7 armv7s";
-			};
-			name = Debug;
-		};
-		1DEB922408733DC00010E9CD /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				"ARCHS[sdk=iphoneos*]" = (
-					armv6,
-					armv7,
-				);
-				"ARCHS[sdk=iphoneos6.*]" = (
-					armv7,
-					armv7s,
-				);
-				"ARCHS[sdk=iphonesimulator*]" = i386;
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_PREPROCESSOR_DEFINITIONS = "";
-				GCC_THUMB_SUPPORT = NO;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
-				ONLY_ACTIVE_ARCH = NO;
-				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
-				SDKROOT = iphoneos;
-				SKIP_INSTALL = YES;
-				TARGETED_DEVICE_FAMILY = "1,2";
-				VALID_ARCHS = "i386 armv6 armv7 armv7s";
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CordovaLib" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				1DEB921F08733DC00010E9CD /* Debug */,
-				1DEB922008733DC00010E9CD /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CordovaLib" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				1DEB922308733DC00010E9CD /* Debug */,
-				1DEB922408733DC00010E9CD /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/ios-config-xml/SampleApp.xcodeproj/project.orig.pbxproj
----------------------------------------------------------------------
diff --git a/spec/projects/ios-config-xml/SampleApp.xcodeproj/project.orig.pbxproj b/spec/projects/ios-config-xml/SampleApp.xcodeproj/project.orig.pbxproj
deleted file mode 100644
index a4d87f9..0000000
--- a/spec/projects/ios-config-xml/SampleApp.xcodeproj/project.orig.pbxproj
+++ /dev/null
@@ -1,498 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A463F14DB0A1B007FEAC7 /* Foundation.framework */; };
-		571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464114DB0A1B007FEAC7 /* UIKit.framework */; };
-		571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */; };
-		571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464514DB0A1B007FEAC7 /* AddressBook.framework */; };
-		571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */; };
-		571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */; };
-		571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */; };
-		571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */; };
-		571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */; };
-		571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465114DB0A1B007FEAC7 /* QuartzCore.framework */; };
-		571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */; };
-		571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */; };
-		571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465714DB0A1B007FEAC7 /* CoreMedia.framework */; };
-		571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */; };
-		571A466014DB0A1B007FEAC7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A465F14DB0A1B007FEAC7 /* main.m */; };
-		571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A466214DB0A1B007FEAC7 /* PhoneGap.framework */; };
-		571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466614DB0A1B007FEAC7 /* Localizable.strings */; };
-		571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466A14DB0A1B007FEAC7 /* Localizable.strings */; };
-		571A466F14DB0A1B007FEAC7 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A466E14DB0A1B007FEAC7 /* icon.png */; };
-		571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467014DB0A1B007FEAC7 /* icon@2x.png */; };
-		571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467214DB0A1B007FEAC7 /* icon-72.png */; };
-		571A467614DB0A1B007FEAC7 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467514DB0A1B007FEAC7 /* Default.png */; };
-		571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467714DB0A1B007FEAC7 /* Default@2x.png */; };
-		571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 571A467914DB0A1B007FEAC7 /* Capture.bundle */; };
-		571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */ = {isa = PBXBuildFile; fileRef = 571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */; };
-		571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A467F14DB0A1B007FEAC7 /* AppDelegate.m */; };
-		571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A468214DB0A1B007FEAC7 /* MainViewController.m */; };
-		571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 571A468414DB0A1B007FEAC7 /* MainViewController.xib */; };
-		577FC36614DB0B620082BA7B /* www in Resources */ = {isa = PBXBuildFile; fileRef = 577FC36514DB0B620082BA7B /* www */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
-		571A463B14DB0A1B007FEAC7 /* ChildApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChildApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		571A463F14DB0A1B007FEAC7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-		571A464114DB0A1B007FEAC7 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
-		571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
-		571A464514DB0A1B007FEAC7 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
-		571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
-		571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
-		571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
-		571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
-		571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
-		571A465114DB0A1B007FEAC7 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
-		571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
-		571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
-		571A465714DB0A1B007FEAC7 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
-		571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ChildApp-Info.plist"; sourceTree = "<group>"; };
-		571A465D14DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		571A465F14DB0A1B007FEAC7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
-		571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ChildApp-Prefix.pch"; sourceTree = "<group>"; };
-		571A466214DB0A1B007FEAC7 /* PhoneGap.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PhoneGap.framework; path = /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework; sourceTree = "<absolute>"; };
-		571A466714DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/Localizable.strings; sourceTree = "<group>"; };
-		571A466B14DB0A1B007FEAC7 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Resources/es.lproj/Localizable.strings; sourceTree = "<group>"; };
-		571A466E14DB0A1B007FEAC7 /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon.png; path = Resources/icons/icon.png; sourceTree = "<group>"; };
-		571A467014DB0A1B007FEAC7 /* icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon@2x.png"; path = "Resources/icons/icon@2x.png"; sourceTree = "<group>"; };
-		571A467214DB0A1B007FEAC7 /* icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon-72.png"; path = "Resources/icons/icon-72.png"; sourceTree = "<group>"; };
-		571A467514DB0A1B007FEAC7 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/splash/Default.png; sourceTree = "<group>"; };
-		571A467714DB0A1B007FEAC7 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "Resources/splash/Default@2x.png"; sourceTree = "<group>"; };
-		571A467914DB0A1B007FEAC7 /* Capture.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Capture.bundle; path = Resources/Capture.bundle; sourceTree = "<group>"; };
-		571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = PhoneGap.plist; sourceTree = "<group>"; };
-		571A467E14DB0A1B007FEAC7 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Classes/AppDelegate.h; sourceTree = "<group>"; };
-		571A467F14DB0A1B007FEAC7 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Classes/AppDelegate.m; sourceTree = "<group>"; };
-		571A468114DB0A1B007FEAC7 /* MainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainViewController.h; path = Classes/MainViewController.h; sourceTree = "<group>"; };
-		571A468214DB0A1B007FEAC7 /* MainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = Classes/MainViewController.m; sourceTree = "<group>"; };
-		571A468414DB0A1B007FEAC7 /* MainViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainViewController.xib; path = Classes/MainViewController.xib; sourceTree = "<group>"; };
-		571A468714DB0A1B007FEAC7 /* README */ = {isa = PBXFileReference; lastKnownFileType = text; name = README; path = Plugins/README; sourceTree = "<group>"; };
-		577FC36514DB0B620082BA7B /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		571A463514DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */,
-				571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */,
-				571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */,
-				571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */,
-				571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */,
-				571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */,
-				571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */,
-				571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */,
-				571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */,
-				571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */,
-				571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */,
-				571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */,
-				571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */,
-				571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		571A463814DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		571A462D14DB0A1A007FEAC7 = {
-			isa = PBXGroup;
-			children = (
-				577FC36514DB0B620082BA7B /* www */,
-				571A465914DB0A1B007FEAC7 /* ChildApp */,
-				571A463E14DB0A1B007FEAC7 /* Frameworks */,
-				571A463C14DB0A1B007FEAC7 /* Products */,
-			);
-			sourceTree = "<group>";
-		};
-		571A463C14DB0A1B007FEAC7 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				571A463B14DB0A1B007FEAC7 /* ChildApp.app */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		571A463E14DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				571A463F14DB0A1B007FEAC7 /* Foundation.framework */,
-				571A464114DB0A1B007FEAC7 /* UIKit.framework */,
-				571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */,
-				571A464514DB0A1B007FEAC7 /* AddressBook.framework */,
-				571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */,
-				571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */,
-				571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */,
-				571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */,
-				571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */,
-				571A465114DB0A1B007FEAC7 /* QuartzCore.framework */,
-				571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */,
-				571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */,
-				571A465714DB0A1B007FEAC7 /* CoreMedia.framework */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
-		571A465914DB0A1B007FEAC7 /* ChildApp */ = {
-			isa = PBXGroup;
-			children = (
-				571A466214DB0A1B007FEAC7 /* PhoneGap.framework */,
-				571A466414DB0A1B007FEAC7 /* Resources */,
-				571A467D14DB0A1B007FEAC7 /* Classes */,
-				571A468614DB0A1B007FEAC7 /* Plugins */,
-				571A465A14DB0A1B007FEAC7 /* Supporting Files */,
-			);
-			path = ChildApp;
-			sourceTree = "<group>";
-		};
-		571A465A14DB0A1B007FEAC7 /* Supporting Files */ = {
-			isa = PBXGroup;
-			children = (
-				571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */,
-				571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */,
-				571A465F14DB0A1B007FEAC7 /* main.m */,
-				571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */,
-				571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */,
-				571A468414DB0A1B007FEAC7 /* MainViewController.xib */,
-			);
-			name = "Supporting Files";
-			sourceTree = "<group>";
-		};
-		571A466414DB0A1B007FEAC7 /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				571A467914DB0A1B007FEAC7 /* Capture.bundle */,
-				571A466514DB0A1B007FEAC7 /* en.lproj */,
-				571A466914DB0A1B007FEAC7 /* es.lproj */,
-				571A466D14DB0A1B007FEAC7 /* icons */,
-				571A467414DB0A1B007FEAC7 /* splash */,
-			);
-			name = Resources;
-			sourceTree = "<group>";
-		};
-		571A466514DB0A1B007FEAC7 /* en.lproj */ = {
-			isa = PBXGroup;
-			children = (
-				571A466614DB0A1B007FEAC7 /* Localizable.strings */,
-			);
-			name = en.lproj;
-			sourceTree = "<group>";
-		};
-		571A466914DB0A1B007FEAC7 /* es.lproj */ = {
-			isa = PBXGroup;
-			children = (
-				571A466A14DB0A1B007FEAC7 /* Localizable.strings */,
-			);
-			name = es.lproj;
-			sourceTree = "<group>";
-		};
-		571A466D14DB0A1B007FEAC7 /* icons */ = {
-			isa = PBXGroup;
-			children = (
-				571A466E14DB0A1B007FEAC7 /* icon.png */,
-				571A467014DB0A1B007FEAC7 /* icon@2x.png */,
-				571A467214DB0A1B007FEAC7 /* icon-72.png */,
-			);
-			name = icons;
-			sourceTree = "<group>";
-		};
-		571A467414DB0A1B007FEAC7 /* splash */ = {
-			isa = PBXGroup;
-			children = (
-				571A467514DB0A1B007FEAC7 /* Default.png */,
-				571A467714DB0A1B007FEAC7 /* Default@2x.png */,
-			);
-			name = splash;
-			sourceTree = "<group>";
-		};
-		571A467D14DB0A1B007FEAC7 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-				571A467E14DB0A1B007FEAC7 /* AppDelegate.h */,
-				571A467F14DB0A1B007FEAC7 /* AppDelegate.m */,
-				571A468114DB0A1B007FEAC7 /* MainViewController.h */,
-				571A468214DB0A1B007FEAC7 /* MainViewController.m */,
-			);
-			name = Classes;
-			sourceTree = "<group>";
-		};
-		571A468614DB0A1B007FEAC7 /* Plugins */ = {
-			isa = PBXGroup;
-			children = (
-				571A468714DB0A1B007FEAC7 /* README */,
-			);
-			name = Plugins;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		571A463A14DB0A1B007FEAC7 /* ChildApp */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */;
-			buildPhases = (
-				571A463414DB0A1B007FEAC7 /* Sources */,
-				571A463514DB0A1B007FEAC7 /* Frameworks */,
-				571A463614DB0A1B007FEAC7 /* Resources */,
-				571A463714DB0A1B007FEAC7 /* Sources */,
-				571A463814DB0A1B007FEAC7 /* Frameworks */,
-				571A463914DB0A1B007FEAC7 /* ShellScript */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = ChildApp;
-			productName = ChildApp;
-			productReference = 571A463B14DB0A1B007FEAC7 /* ChildApp.app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		571A462F14DB0A1A007FEAC7 /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastUpgradeCheck = 0420;
-			};
-			buildConfigurationList = 571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 0;
-			knownRegions = (
-				en,
-				es,
-			);
-			mainGroup = 571A462D14DB0A1A007FEAC7;
-			productRefGroup = 571A463C14DB0A1B007FEAC7 /* Products */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				571A463A14DB0A1B007FEAC7 /* ChildApp */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		571A463614DB0A1B007FEAC7 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */,
-				571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */,
-				571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */,
-				571A466F14DB0A1B007FEAC7 /* icon.png in Resources */,
-				571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */,
-				571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */,
-				571A467614DB0A1B007FEAC7 /* Default.png in Resources */,
-				571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */,
-				571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */,
-				571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */,
-				571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */,
-				577FC36614DB0B620082BA7B /* www in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
-		571A463914DB0A1B007FEAC7 /* ShellScript */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/bash;
-			shellScript = "\n\t\t\t\t\t\t\t\tif [ ! -d \"$PROJECT_DIR/www\" ] ; then\n\t\t\t\t\t\t\t\t\tcp -R /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework/www \"$PROJECT_DIR\"\n\t\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\t\t# detect www folder reference in project, if missing, print warning\n\t\t\t\t\t\t\t\tgrep \"{isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = \\\"<group>\\\"; };\" \"$PROJECT_DIR/$PROJECT_NAME.xcodeproj/project.pbxproj\"\n\t\t\t\t\t\t\t\trc=$? \n\t\t\t\t\t\t\t\tif [ $rc != 0 ] ; then\n\t\t\t\t\t\t\t\techo -e \"warning: Missing - Add $PROJECT_DIR/www as a folder reference in your project. Just drag and drop the folder into your project, into the Project Navigator of Xcode 4. Make sure you select the second radio-button: 'Create folder references for any added folders' (which will create a blue folder)\" 1>&2\n\t\t\t\t\t\t\t\tfi\t\t\t\t\t\t\t";
-		};
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		571A463414DB0A1B007FEAC7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A466014DB0A1B007FEAC7 /* main.m in Sources */,
-				571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */,
-				571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		571A463714DB0A1B007FEAC7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A465D14DB0A1B007FEAC7 /* en */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "<group>";
-		};
-		571A466614DB0A1B007FEAC7 /* Localizable.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A466714DB0A1B007FEAC7 /* en */,
-			);
-			name = Localizable.strings;
-			sourceTree = "<group>";
-		};
-		571A466A14DB0A1B007FEAC7 /* Localizable.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A466B14DB0A1B007FEAC7 /* es */,
-			);
-			name = Localizable.strings;
-			sourceTree = "<group>";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		571A468814DB0A1B007FEAC7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
-				CLANG_ENABLE_OBJC_ARC = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = NO;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				GCC_VERSION = com.apple.compilers.llvmgcc42;
-				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
-				SDKROOT = iphoneos;
-			};
-			name = Debug;
-		};
-		571A468914DB0A1B007FEAC7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
-				CLANG_ENABLE_OBJC_ARC = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_VERSION = com.apple.compilers.llvmgcc42;
-				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
-				SDKROOT = iphoneos;
-				VALIDATE_PRODUCT = YES;
-			};
-			name = Release;
-		};
-		571A468B14DB0A1B007FEAC7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = YES;
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
-				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
-				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak_library",
-					/usr/lib/libSystem.B.dylib,
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				TARGETED_DEVICE_FAMILY = "1,2";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Debug;
-		};
-		571A468C14DB0A1B007FEAC7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = YES;
-				COPY_PHASE_STRIP = YES;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
-				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
-				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak_library",
-					/usr/lib/libSystem.B.dylib,
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				TARGETED_DEVICE_FAMILY = "1,2";
-				VALIDATE_PRODUCT = YES;
-				WRAPPER_EXTENSION = app;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				571A468814DB0A1B007FEAC7 /* Debug */,
-				571A468914DB0A1B007FEAC7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				571A468B14DB0A1B007FEAC7 /* Debug */,
-				571A468C14DB0A1B007FEAC7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 571A462F14DB0A1A007FEAC7 /* Project object */;
-}


[28/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/windows8/www/cordova-2.6.0.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/windows8/www/cordova-2.6.0.js b/cordova-lib/spec-plugman/projects/windows8/www/cordova-2.6.0.js
new file mode 100644
index 0000000..2fedaa6
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/windows8/www/cordova-2.6.0.js
@@ -0,0 +1,8075 @@
+// Platform: windows8
+
+// commit 125dca530923a44a8f44f68f5e1970cbdd4e7faf
+
+// File generated at :: Wed Apr 03 2013 13:20:16 GMT-0700 (Pacific Daylight Time)
+
+/*
+ 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.
+*/
+
+;(function() {
+
+// file: lib\scripts\require.js
+
+var require,
+    define;
+
+(function () {
+    var modules = {};
+    // Stack of moduleIds currently being built.
+    var requireStack = [];
+    // Map of module ID -> index into requireStack of modules currently being built.
+    var inProgressModules = {};
+
+    function build(module) {
+        var factory = module.factory;
+        module.exports = {};
+        delete module.factory;
+        factory(require, module.exports, module);
+        return module.exports;
+    }
+
+    require = function (id) {
+        if (!modules[id]) {
+            throw "module " + id + " not found";
+        } else if (id in inProgressModules) {
+            var cycle = requireStack.slice(inProgressModules[id]).join('->') + '->' + id;
+            throw "Cycle in require graph: " + cycle;
+        }
+        if (modules[id].factory) {
+            try {
+                inProgressModules[id] = requireStack.length;
+                requireStack.push(id);
+                return build(modules[id]);
+            } finally {
+                delete inProgressModules[id];
+                requireStack.pop();
+            }
+        }
+        return modules[id].exports;
+    };
+
+    define = function (id, factory) {
+        if (modules[id]) {
+            throw "module " + id + " already defined";
+        }
+
+        modules[id] = {
+            id: id,
+            factory: factory
+        };
+    };
+
+    define.remove = function (id) {
+        delete modules[id];
+    };
+
+    define.moduleMap = modules;
+})();
+
+//Export for use in node
+if (typeof module === "object" && typeof require === "function") {
+    module.exports.require = require;
+    module.exports.define = define;
+}
+
+// file: lib/cordova.js
+define("cordova", function(require, exports, module) {
+
+
+var channel = require('cordova/channel');
+
+/**
+ * Listen for DOMContentLoaded and notify our channel subscribers.
+ */
+document.addEventListener('DOMContentLoaded', function() {
+    channel.onDOMContentLoaded.fire();
+}, false);
+if (document.readyState == 'complete' || document.readyState == 'interactive') {
+    channel.onDOMContentLoaded.fire();
+}
+
+/**
+ * Intercept calls to addEventListener + removeEventListener and handle deviceready,
+ * resume, and pause events.
+ */
+var m_document_addEventListener = document.addEventListener;
+var m_document_removeEventListener = document.removeEventListener;
+var m_window_addEventListener = window.addEventListener;
+var m_window_removeEventListener = window.removeEventListener;
+
+/**
+ * Houses custom event handlers to intercept on document + window event listeners.
+ */
+var documentEventHandlers = {},
+    windowEventHandlers = {};
+
+document.addEventListener = function(evt, handler, capture) {
+    var e = evt.toLowerCase();
+    if (typeof documentEventHandlers[e] != 'undefined') {
+        documentEventHandlers[e].subscribe(handler);
+    } else {
+        m_document_addEventListener.call(document, evt, handler, capture);
+    }
+};
+
+window.addEventListener = function(evt, handler, capture) {
+    var e = evt.toLowerCase();
+    if (typeof windowEventHandlers[e] != 'undefined') {
+        windowEventHandlers[e].subscribe(handler);
+    } else {
+        m_window_addEventListener.call(window, evt, handler, capture);
+    }
+};
+
+document.removeEventListener = function(evt, handler, capture) {
+    var e = evt.toLowerCase();
+    // If unsubscribing from an event that is handled by a plugin
+    if (typeof documentEventHandlers[e] != "undefined") {
+        documentEventHandlers[e].unsubscribe(handler);
+    } else {
+        m_document_removeEventListener.call(document, evt, handler, capture);
+    }
+};
+
+window.removeEventListener = function(evt, handler, capture) {
+    var e = evt.toLowerCase();
+    // If unsubscribing from an event that is handled by a plugin
+    if (typeof windowEventHandlers[e] != "undefined") {
+        windowEventHandlers[e].unsubscribe(handler);
+    } else {
+        m_window_removeEventListener.call(window, evt, handler, capture);
+    }
+};
+
+function createEvent(type, data) {
+    var event = document.createEvent('Events');
+    event.initEvent(type, false, false);
+    if (data) {
+        for (var i in data) {
+            if (data.hasOwnProperty(i)) {
+                event[i] = data[i];
+            }
+        }
+    }
+    return event;
+}
+
+if(typeof window.console === "undefined") {
+    window.console = {
+        log:function(){}
+    };
+}
+
+var cordova = {
+    define:define,
+    require:require,
+    /**
+     * Methods to add/remove your own addEventListener hijacking on document + window.
+     */
+    addWindowEventHandler:function(event) {
+        return (windowEventHandlers[event] = channel.create(event));
+    },
+    addStickyDocumentEventHandler:function(event) {
+        return (documentEventHandlers[event] = channel.createSticky(event));
+    },
+    addDocumentEventHandler:function(event) {
+        return (documentEventHandlers[event] = channel.create(event));
+    },
+    removeWindowEventHandler:function(event) {
+        delete windowEventHandlers[event];
+    },
+    removeDocumentEventHandler:function(event) {
+        delete documentEventHandlers[event];
+    },
+    /**
+     * Retrieve original event handlers that were replaced by Cordova
+     *
+     * @return object
+     */
+    getOriginalHandlers: function() {
+        return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener},
+        'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}};
+    },
+    /**
+     * Method to fire event from native code
+     * bNoDetach is required for events which cause an exception which needs to be caught in native code
+     */
+    fireDocumentEvent: function(type, data, bNoDetach) {
+        var evt = createEvent(type, data);
+        if (typeof documentEventHandlers[type] != 'undefined') {
+            if( bNoDetach ) {
+              documentEventHandlers[type].fire(evt);
+            }
+            else {
+              setTimeout(function() {
+                  documentEventHandlers[type].fire(evt);
+              }, 0);
+            }
+        } else {
+            document.dispatchEvent(evt);
+        }
+    },
+    fireWindowEvent: function(type, data) {
+        var evt = createEvent(type,data);
+        if (typeof windowEventHandlers[type] != 'undefined') {
+            setTimeout(function() {
+                windowEventHandlers[type].fire(evt);
+            }, 0);
+        } else {
+            window.dispatchEvent(evt);
+        }
+    },
+
+    /**
+     * Plugin callback mechanism.
+     */
+    // Randomize the starting callbackId to avoid collisions after refreshing or navigating.
+    // This way, it's very unlikely that any new callback would get the same callbackId as an old callback.
+    callbackId: Math.floor(Math.random() * 2000000000),
+    callbacks:  {},
+    callbackStatus: {
+        NO_RESULT: 0,
+        OK: 1,
+        CLASS_NOT_FOUND_EXCEPTION: 2,
+        ILLEGAL_ACCESS_EXCEPTION: 3,
+        INSTANTIATION_EXCEPTION: 4,
+        MALFORMED_URL_EXCEPTION: 5,
+        IO_EXCEPTION: 6,
+        INVALID_ACTION: 7,
+        JSON_EXCEPTION: 8,
+        ERROR: 9
+    },
+
+    /**
+     * Called by native code when returning successful result from an action.
+     */
+    callbackSuccess: function(callbackId, args) {
+        try {
+            cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback);
+        } catch (e) {
+            console.log("Error in error callback: " + callbackId + " = "+e);
+        }
+    },
+
+    /**
+     * Called by native code when returning error result from an action.
+     */
+    callbackError: function(callbackId, args) {
+        // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative.
+        // Derive success from status.
+        try {
+            cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback);
+        } catch (e) {
+            console.log("Error in error callback: " + callbackId + " = "+e);
+        }
+    },
+
+    /**
+     * Called by native code when returning the result from an action.
+     */
+    callbackFromNative: function(callbackId, success, status, args, keepCallback) {
+        var callback = cordova.callbacks[callbackId];
+        if (callback) {
+            if (success && status == cordova.callbackStatus.OK) {
+                callback.success && callback.success.apply(null, args);
+            } else if (!success) {
+                callback.fail && callback.fail.apply(null, args);
+            }
+
+            // Clear callback if not expecting any more results
+            if (!keepCallback) {
+                delete cordova.callbacks[callbackId];
+            }
+        }
+    },
+    addConstructor: function(func) {
+        channel.onCordovaReady.subscribe(function() {
+            try {
+                func();
+            } catch(e) {
+                console.log("Failed to run constructor: " + e);
+            }
+        });
+    }
+};
+
+// Register pause, resume and deviceready channels as events on document.
+channel.onPause = cordova.addDocumentEventHandler('pause');
+channel.onResume = cordova.addDocumentEventHandler('resume');
+channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');
+
+module.exports = cordova;
+
+});
+
+// file: lib\common\argscheck.js
+define("cordova/argscheck", function(require, exports, module) {
+
+var exec = require('cordova/exec');
+var utils = require('cordova/utils');
+
+var moduleExports = module.exports;
+
+var typeMap = {
+    'A': 'Array',
+    'D': 'Date',
+    'N': 'Number',
+    'S': 'String',
+    'F': 'Function',
+    'O': 'Object'
+};
+
+function extractParamName(callee, argIndex) {
+  return (/.*?\((.*?)\)/).exec(callee)[1].split(', ')[argIndex];
+}
+
+function checkArgs(spec, functionName, args, opt_callee) {
+    if (!moduleExports.enableChecks) {
+        return;
+    }
+    var errMsg = null;
+    var typeName;
+    for (var i = 0; i < spec.length; ++i) {
+        var c = spec.charAt(i),
+            cUpper = c.toUpperCase(),
+            arg = args[i];
+        // Asterix means allow anything.
+        if (c == '*') {
+            continue;
+        }
+        typeName = utils.typeName(arg);
+        if ((arg === null || arg === undefined) && c == cUpper) {
+            continue;
+        }
+        if (typeName != typeMap[cUpper]) {
+            errMsg = 'Expected ' + typeMap[cUpper];
+            break;
+        }
+    }
+    if (errMsg) {
+        errMsg += ', but got ' + typeName + '.';
+        errMsg = 'Wrong type for parameter "' + extractParamName(opt_callee || args.callee, i) + '" of ' + functionName + ': ' + errMsg;
+        // Don't log when running jake test.
+        if (typeof jasmine == 'undefined') {
+            console.error(errMsg);
+        }
+        throw TypeError(errMsg);
+    }
+}
+
+function getValue(value, defaultValue) {
+    return value === undefined ? defaultValue : value;
+}
+
+moduleExports.checkArgs = checkArgs;
+moduleExports.getValue = getValue;
+moduleExports.enableChecks = true;
+
+
+});
+
+// file: lib\common\builder.js
+define("cordova/builder", function(require, exports, module) {
+
+var utils = require('cordova/utils');
+
+function each(objects, func, context) {
+    for (var prop in objects) {
+        if (objects.hasOwnProperty(prop)) {
+            func.apply(context, [objects[prop], prop]);
+        }
+    }
+}
+
+function clobber(obj, key, value) {
+    exports.replaceHookForTesting(obj, key);
+    obj[key] = value;
+    // Getters can only be overridden by getters.
+    if (obj[key] !== value) {
+        utils.defineGetter(obj, key, function() {
+            return value;
+        });
+    }
+}
+
+function assignOrWrapInDeprecateGetter(obj, key, value, message) {
+    if (message) {
+        utils.defineGetter(obj, key, function() {
+            console.log(message);
+            delete obj[key];
+            clobber(obj, key, value);
+            return value;
+        });
+    } else {
+        clobber(obj, key, value);
+    }
+}
+
+function include(parent, objects, clobber, merge) {
+    each(objects, function (obj, key) {
+        try {
+          var result = obj.path ? require(obj.path) : {};
+
+          if (clobber) {
+              // Clobber if it doesn't exist.
+              if (typeof parent[key] === 'undefined') {
+                  assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
+              } else if (typeof obj.path !== 'undefined') {
+                  // If merging, merge properties onto parent, otherwise, clobber.
+                  if (merge) {
+                      recursiveMerge(parent[key], result);
+                  } else {
+                      assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
+                  }
+              }
+              result = parent[key];
+          } else {
+            // Overwrite if not currently defined.
+            if (typeof parent[key] == 'undefined') {
+              assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
+            } else {
+              // Set result to what already exists, so we can build children into it if they exist.
+              result = parent[key];
+            }
+          }
+
+          if (obj.children) {
+            include(result, obj.children, clobber, merge);
+          }
+        } catch(e) {
+          utils.alert('Exception building cordova JS globals: ' + e + ' for key "' + key + '"');
+        }
+    });
+}
+
+/**
+ * Merge properties from one object onto another recursively.  Properties from
+ * the src object will overwrite existing target property.
+ *
+ * @param target Object to merge properties into.
+ * @param src Object to merge properties from.
+ */
+function recursiveMerge(target, src) {
+    for (var prop in src) {
+        if (src.hasOwnProperty(prop)) {
+            if (target.prototype && target.prototype.constructor === target) {
+                // If the target object is a constructor override off prototype.
+                clobber(target.prototype, prop, src[prop]);
+            } else {
+                if (typeof src[prop] === 'object' && typeof target[prop] === 'object') {
+                    recursiveMerge(target[prop], src[prop]);
+                } else {
+                    clobber(target, prop, src[prop]);
+                }
+            }
+        }
+    }
+}
+
+exports.buildIntoButDoNotClobber = function(objects, target) {
+    include(target, objects, false, false);
+};
+exports.buildIntoAndClobber = function(objects, target) {
+    include(target, objects, true, false);
+};
+exports.buildIntoAndMerge = function(objects, target) {
+    include(target, objects, true, true);
+};
+exports.recursiveMerge = recursiveMerge;
+exports.assignOrWrapInDeprecateGetter = assignOrWrapInDeprecateGetter;
+exports.replaceHookForTesting = function() {};
+
+});
+
+// file: lib\common\channel.js
+define("cordova/channel", function(require, exports, module) {
+
+var utils = require('cordova/utils'),
+    nextGuid = 1;
+
+/**
+ * Custom pub-sub "channel" that can have functions subscribed to it
+ * This object is used to define and control firing of events for
+ * cordova initialization, as well as for custom events thereafter.
+ *
+ * The order of events during page load and Cordova startup is as follows:
+ *
+ * onDOMContentLoaded*         Internal event that is received when the web page is loaded and parsed.
+ * onNativeReady*              Internal event that indicates the Cordova native side is ready.
+ * onCordovaReady*             Internal event fired when all Cordova JavaScript objects have been created.
+ * onCordovaInfoReady*         Internal event fired when device properties are available.
+ * onCordovaConnectionReady*   Internal event fired when the connection property has been set.
+ * onDeviceReady*              User event fired to indicate that Cordova is ready
+ * onResume                    User event fired to indicate a start/resume lifecycle event
+ * onPause                     User event fired to indicate a pause lifecycle event
+ * onDestroy*                  Internal event fired when app is being destroyed (User should use window.onunload event, not this one).
+ *
+ * The events marked with an * are sticky. Once they have fired, they will stay in the fired state.
+ * All listeners that subscribe after the event is fired will be executed right away.
+ *
+ * The only Cordova events that user code should register for are:
+ *      deviceready           Cordova native code is initialized and Cordova APIs can be called from JavaScript
+ *      pause                 App has moved to background
+ *      resume                App has returned to foreground
+ *
+ * Listeners can be registered as:
+ *      document.addEventListener("deviceready", myDeviceReadyListener, false);
+ *      document.addEventListener("resume", myResumeListener, false);
+ *      document.addEventListener("pause", myPauseListener, false);
+ *
+ * The DOM lifecycle events should be used for saving and restoring state
+ *      window.onload
+ *      window.onunload
+ *
+ */
+
+/**
+ * Channel
+ * @constructor
+ * @param type  String the channel name
+ */
+var Channel = function(type, sticky) {
+    this.type = type;
+    // Map of guid -> function.
+    this.handlers = {};
+    // 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired.
+    this.state = sticky ? 1 : 0;
+    // Used in sticky mode to remember args passed to fire().
+    this.fireArgs = null;
+    // Used by onHasSubscribersChange to know if there are any listeners.
+    this.numHandlers = 0;
+    // Function that is called when the first listener is subscribed, or when
+    // the last listener is unsubscribed.
+    this.onHasSubscribersChange = null;
+},
+    channel = {
+        /**
+         * Calls the provided function only after all of the channels specified
+         * have been fired. All channels must be sticky channels.
+         */
+        join: function(h, c) {
+            var len = c.length,
+                i = len,
+                f = function() {
+                    if (!(--i)) h();
+                };
+            for (var j=0; j<len; j++) {
+                if (c[j].state === 0) {
+                    throw Error('Can only use join with sticky channels.');
+                }
+                c[j].subscribe(f);
+            }
+            if (!len) h();
+        },
+        create: function(type) {
+            return channel[type] = new Channel(type, false);
+        },
+        createSticky: function(type) {
+            return channel[type] = new Channel(type, true);
+        },
+
+        /**
+         * cordova Channels that must fire before "deviceready" is fired.
+         */
+        deviceReadyChannelsArray: [],
+        deviceReadyChannelsMap: {},
+
+        /**
+         * Indicate that a feature needs to be initialized before it is ready to be used.
+         * This holds up Cordova's "deviceready" event until the feature has been initialized
+         * and Cordova.initComplete(feature) is called.
+         *
+         * @param feature {String}     The unique feature name
+         */
+        waitForInitialization: function(feature) {
+            if (feature) {
+                var c = channel[feature] || this.createSticky(feature);
+                this.deviceReadyChannelsMap[feature] = c;
+                this.deviceReadyChannelsArray.push(c);
+            }
+        },
+
+        /**
+         * Indicate that initialization code has completed and the feature is ready to be used.
+         *
+         * @param feature {String}     The unique feature name
+         */
+        initializationComplete: function(feature) {
+            var c = this.deviceReadyChannelsMap[feature];
+            if (c) {
+                c.fire();
+            }
+        }
+    };
+
+function forceFunction(f) {
+    if (typeof f != 'function') throw "Function required as first argument!";
+}
+
+/**
+ * Subscribes the given function to the channel. Any time that
+ * Channel.fire is called so too will the function.
+ * Optionally specify an execution context for the function
+ * and a guid that can be used to stop subscribing to the channel.
+ * Returns the guid.
+ */
+Channel.prototype.subscribe = function(f, c) {
+    // need a function to call
+    forceFunction(f);
+    if (this.state == 2) {
+        f.apply(c || this, this.fireArgs);
+        return;
+    }
+
+    var func = f,
+        guid = f.observer_guid;
+    if (typeof c == "object") { func = utils.close(c, f); }
+
+    if (!guid) {
+        // first time any channel has seen this subscriber
+        guid = '' + nextGuid++;
+    }
+    func.observer_guid = guid;
+    f.observer_guid = guid;
+
+    // Don't add the same handler more than once.
+    if (!this.handlers[guid]) {
+        this.handlers[guid] = func;
+        this.numHandlers++;
+        if (this.numHandlers == 1) {
+            this.onHasSubscribersChange && this.onHasSubscribersChange();
+        }
+    }
+};
+
+/**
+ * Unsubscribes the function with the given guid from the channel.
+ */
+Channel.prototype.unsubscribe = function(f) {
+    // need a function to unsubscribe
+    forceFunction(f);
+
+    var guid = f.observer_guid,
+        handler = this.handlers[guid];
+    if (handler) {
+        delete this.handlers[guid];
+        this.numHandlers--;
+        if (this.numHandlers === 0) {
+            this.onHasSubscribersChange && this.onHasSubscribersChange();
+        }
+    }
+};
+
+/**
+ * Calls all functions subscribed to this channel.
+ */
+Channel.prototype.fire = function(e) {
+    var fail = false,
+        fireArgs = Array.prototype.slice.call(arguments);
+    // Apply stickiness.
+    if (this.state == 1) {
+        this.state = 2;
+        this.fireArgs = fireArgs;
+    }
+    if (this.numHandlers) {
+        // Copy the values first so that it is safe to modify it from within
+        // callbacks.
+        var toCall = [];
+        for (var item in this.handlers) {
+            toCall.push(this.handlers[item]);
+        }
+        for (var i = 0; i < toCall.length; ++i) {
+            toCall[i].apply(this, fireArgs);
+        }
+        if (this.state == 2 && this.numHandlers) {
+            this.numHandlers = 0;
+            this.handlers = {};
+            this.onHasSubscribersChange && this.onHasSubscribersChange();
+        }
+    }
+};
+
+
+// defining them here so they are ready super fast!
+// DOM event that is received when the web page is loaded and parsed.
+channel.createSticky('onDOMContentLoaded');
+
+// Event to indicate the Cordova native side is ready.
+channel.createSticky('onNativeReady');
+
+// Event to indicate that all Cordova JavaScript objects have been created
+// and it's time to run plugin constructors.
+channel.createSticky('onCordovaReady');
+
+// Event to indicate that device properties are available
+channel.createSticky('onCordovaInfoReady');
+
+// Event to indicate that the connection property has been set.
+channel.createSticky('onCordovaConnectionReady');
+
+// Event to indicate that all automatically loaded JS plugins are loaded and ready.
+channel.createSticky('onPluginsReady');
+
+// Event to indicate that Cordova is ready
+channel.createSticky('onDeviceReady');
+
+// Event to indicate a resume lifecycle event
+channel.create('onResume');
+
+// Event to indicate a pause lifecycle event
+channel.create('onPause');
+
+// Event to indicate a destroy lifecycle event
+channel.createSticky('onDestroy');
+
+// Channels that must fire before "deviceready" is fired.
+channel.waitForInitialization('onCordovaReady');
+channel.waitForInitialization('onCordovaConnectionReady');
+
+module.exports = channel;
+
+});
+
+// file: lib\common\commandProxy.js
+define("cordova/commandProxy", function(require, exports, module) {
+
+
+// internal map of proxy function
+var CommandProxyMap = {};
+
+module.exports = {
+
+    // example: cordova.commandProxy.add("Accelerometer",{getCurrentAcceleration: function(successCallback, errorCallback, options) {...},...);
+    add:function(id,proxyObj) {
+        console.log("adding proxy for " + id);
+        CommandProxyMap[id] = proxyObj;
+        return proxyObj;
+    },
+
+    // cordova.commandProxy.remove("Accelerometer");
+    remove:function(id) {
+        var proxy = CommandProxyMap[id];
+        delete CommandProxyMap[id];
+        CommandProxyMap[id] = null;
+        return proxy;
+    },
+
+    get:function(service,action) {
+        return ( CommandProxyMap[service] ? CommandProxyMap[service][action] : null );
+    }
+};
+});
+
+// file: lib\windows8\exec.js
+define("cordova/exec", function(require, exports, module) {
+
+var cordova = require('cordova');
+var commandProxy = require('cordova/commandProxy');
+
+/**
+ * Execute a cordova command.  It is up to the native side whether this action
+ * is synchronous or asynchronous.  The native side can return:
+ *      Synchronous: PluginResult object as a JSON string
+ *      Asynchronous: Empty string ""
+ * If async, the native side will cordova.callbackSuccess or cordova.callbackError,
+ * depending upon the result of the action.
+ *
+ * @param {Function} success    The success callback
+ * @param {Function} fail       The fail callback
+ * @param {String} service      The name of the service to use
+ * @param {String} action       Action to be run in cordova
+ * @param {String[]} [args]     Zero or more arguments to pass to the method
+ */
+module.exports = function(success, fail, service, action, args) {
+
+    var proxy = commandProxy.get(service,action);
+    if(proxy) {
+        var callbackId = service + cordova.callbackId++;
+        // console.log("EXEC:" + service + " : " + action);
+        if (typeof success == "function" || typeof fail == "function") {
+            cordova.callbacks[callbackId] = {success:success, fail:fail};
+        }
+        try {
+            proxy(success, fail, args);
+        }
+        catch(e) {
+            console.log("Exception calling native with command :: " + service + " :: " + action  + " ::exception=" + e);
+        }
+    }
+    else {
+        fail && fail("Missing Command Error");
+    }
+};
+
+});
+
+// file: lib\common\modulemapper.js
+define("cordova/modulemapper", function(require, exports, module) {
+
+var builder = require('cordova/builder'),
+    moduleMap = define.moduleMap,
+    symbolList,
+    deprecationMap;
+
+exports.reset = function() {
+    symbolList = [];
+    deprecationMap = {};
+};
+
+function addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) {
+    if (!(moduleName in moduleMap)) {
+        throw new Error('Module ' + moduleName + ' does not exist.');
+    }
+    symbolList.push(strategy, moduleName, symbolPath);
+    if (opt_deprecationMessage) {
+        deprecationMap[symbolPath] = opt_deprecationMessage;
+    }
+}
+
+// Note: Android 2.3 does have Function.bind().
+exports.clobbers = function(moduleName, symbolPath, opt_deprecationMessage) {
+    addEntry('c', moduleName, symbolPath, opt_deprecationMessage);
+};
+
+exports.merges = function(moduleName, symbolPath, opt_deprecationMessage) {
+    addEntry('m', moduleName, symbolPath, opt_deprecationMessage);
+};
+
+exports.defaults = function(moduleName, symbolPath, opt_deprecationMessage) {
+    addEntry('d', moduleName, symbolPath, opt_deprecationMessage);
+};
+
+function prepareNamespace(symbolPath, context) {
+    if (!symbolPath) {
+        return context;
+    }
+    var parts = symbolPath.split('.');
+    var cur = context;
+    for (var i = 0, part; part = parts[i]; ++i) {
+        cur = cur[part] = cur[part] || {};
+    }
+    return cur;
+}
+
+exports.mapModules = function(context) {
+    var origSymbols = {};
+    context.CDV_origSymbols = origSymbols;
+    for (var i = 0, len = symbolList.length; i < len; i += 3) {
+        var strategy = symbolList[i];
+        var moduleName = symbolList[i + 1];
+        var symbolPath = symbolList[i + 2];
+        var lastDot = symbolPath.lastIndexOf('.');
+        var namespace = symbolPath.substr(0, lastDot);
+        var lastName = symbolPath.substr(lastDot + 1);
+
+        var module = require(moduleName);
+        var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null;
+        var parentObj = prepareNamespace(namespace, context);
+        var target = parentObj[lastName];
+
+        if (strategy == 'm' && target) {
+            builder.recursiveMerge(target, module);
+        } else if ((strategy == 'd' && !target) || (strategy != 'd')) {
+            if (!(symbolPath in origSymbols)) {
+                origSymbols[symbolPath] = target;
+            }
+            builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg);
+        }
+    }
+};
+
+exports.getOriginalSymbol = function(context, symbolPath) {
+    var origSymbols = context.CDV_origSymbols;
+    if (origSymbols && (symbolPath in origSymbols)) {
+        return origSymbols[symbolPath];
+    }
+    var parts = symbolPath.split('.');
+    var obj = context;
+    for (var i = 0; i < parts.length; ++i) {
+        obj = obj && obj[parts[i]];
+    }
+    return obj;
+};
+
+exports.loadMatchingModules = function(matchingRegExp) {
+    for (var k in moduleMap) {
+        if (matchingRegExp.exec(k)) {
+            require(k);
+        }
+    }
+};
+
+exports.reset();
+
+
+});
+
+// file: lib\windows8\platform.js
+define("cordova/platform", function(require, exports, module) {
+
+var cordova = require('cordova'),
+    exec = require('cordova/exec'),
+    channel = cordova.require("cordova/channel");
+
+/*
+ * Define native implementations ( there is no native layer, so need to make sure the proxies are there )
+*/
+
+require('cordova/plugin/windows8/DeviceProxy');
+require('cordova/plugin/windows8/NetworkStatusProxy');
+require('cordova/plugin/windows8/AccelerometerProxy');
+require('cordova/plugin/windows8/CameraProxy');
+require('cordova/plugin/windows8/CaptureProxy');
+require('cordova/plugin/windows8/CompassProxy');
+require('cordova/plugin/windows8/ContactsProxy');
+require('cordova/plugin/windows8/FileProxy');
+
+require('cordova/plugin/windows8/FileTransferProxy');
+require('cordova/plugin/windows8/MediaProxy');
+require('cordova/plugin/windows8/NotificationProxy');
+
+
+
+module.exports = {
+    id: "windows8",
+    initialize:function() {
+        var modulemapper = require('cordova/modulemapper');
+
+        modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
+        modulemapper.mapModules(window);
+
+        window.alert = window.alert || require("cordova/plugin/notification").alert;
+        window.confirm = window.confirm || require("cordova/plugin/notification").confirm;
+
+        var onWinJSReady = function () {
+            var app = WinJS.Application;
+            var checkpointHandler = function checkpointHandler() {
+                cordova.fireDocumentEvent('pause');
+            };
+
+            var resumingHandler = function resumingHandler() {
+                cordova.fireDocumentEvent('resume');
+            };
+
+            app.addEventListener("checkpoint", checkpointHandler);
+            Windows.UI.WebUI.WebUIApplication.addEventListener("resuming", resumingHandler, false);
+            app.start();
+
+        };
+
+        if (!window.WinJS) {
+            // <script src="//Microsoft.WinJS.1.0/js/base.js"></script>
+            var scriptElem = document.createElement("script");
+            scriptElem.src = "//Microsoft.WinJS.1.0/js/base.js";
+            scriptElem.addEventListener("load", onWinJSReady);
+            document.head.appendChild(scriptElem);
+
+            console.log("added WinJS ... ");
+        }
+        else {
+            onWinJSReady();
+        }
+    },
+    clobbers: {
+        cordova: {
+            path: 'cordova',
+            children: {
+                commandProxy: {
+                    path: 'cordova/commandProxy'
+                }
+            }
+        },
+        navigator: {
+            children: {
+                console: {
+                    path: "cordova/plugin/windows8/console"
+                }
+            }
+        }
+    }
+};
+
+});
+
+// file: lib\common\plugin\Acceleration.js
+define("cordova/plugin/Acceleration", function(require, exports, module) {
+
+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;
+
+});
+
+// file: lib\common\plugin\Camera.js
+define("cordova/plugin/Camera", function(require, exports, module) {
+
+var argscheck = require('cordova/argscheck'),
+    exec = require('cordova/exec'),
+    Camera = require('cordova/plugin/CameraConstants'),
+    CameraPopoverHandle = require('cordova/plugin/CameraPopoverHandle');
+
+var cameraExport = {};
+
+// Tack on the Camera Constants to the base camera plugin.
+for (var key in Camera) {
+    cameraExport[key] = Camera[key];
+}
+
+/**
+ * Gets a picture from source defined by "options.sourceType", and returns the
+ * image as defined by the "options.destinationType" option.
+
+ * The defaults are sourceType=CAMERA and destinationType=FILE_URI.
+ *
+ * @param {Function} successCallback
+ * @param {Function} errorCallback
+ * @param {Object} options
+ */
+cameraExport.getPicture = function(successCallback, errorCallback, options) {
+    argscheck.checkArgs('fFO', 'Camera.getPicture', arguments);
+    options = options || {};
+    var getValue = argscheck.getValue;
+
+    var quality = getValue(options.quality, 50);
+    var destinationType = getValue(options.destinationType, Camera.DestinationType.FILE_URI);
+    var sourceType = getValue(options.sourceType, Camera.PictureSourceType.CAMERA);
+    var targetWidth = getValue(options.targetWidth, -1);
+    var targetHeight = getValue(options.targetHeight, -1);
+    var encodingType = getValue(options.encodingType, Camera.EncodingType.JPEG);
+    var mediaType = getValue(options.mediaType, Camera.MediaType.PICTURE);
+    var allowEdit = !!options.allowEdit;
+    var correctOrientation = !!options.correctOrientation;
+    var saveToPhotoAlbum = !!options.saveToPhotoAlbum;
+    var popoverOptions = getValue(options.popoverOptions, null);
+    var cameraDirection = getValue(options.cameraDirection, Camera.Direction.BACK);
+
+    var args = [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType,
+                mediaType, allowEdit, correctOrientation, saveToPhotoAlbum, popoverOptions, cameraDirection];
+
+    exec(successCallback, errorCallback, "Camera", "takePicture", args);
+    return new CameraPopoverHandle();
+};
+
+cameraExport.cleanup = function(successCallback, errorCallback) {
+    exec(successCallback, errorCallback, "Camera", "cleanup", []);
+};
+
+module.exports = cameraExport;
+
+});
+
+// file: lib\common\plugin\CameraConstants.js
+define("cordova/plugin/CameraConstants", function(require, exports, module) {
+
+module.exports = {
+  DestinationType:{
+    DATA_URL: 0,         // Return base64 encoded string
+    FILE_URI: 1,         // Return file uri (content://media/external/images/media/2 for Android)
+    NATIVE_URI: 2        // Return native uri (eg. asset-library://... for iOS)
+  },
+  EncodingType:{
+    JPEG: 0,             // Return JPEG encoded image
+    PNG: 1               // Return PNG encoded image
+  },
+  MediaType:{
+    PICTURE: 0,          // allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType
+    VIDEO: 1,            // allow selection of video only, ONLY RETURNS URL
+    ALLMEDIA : 2         // allow selection from all media types
+  },
+  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)
+  },
+  PopoverArrowDirection:{
+      ARROW_UP : 1,        // matches iOS UIPopoverArrowDirection constants to specify arrow location on popover
+      ARROW_DOWN : 2,
+      ARROW_LEFT : 4,
+      ARROW_RIGHT : 8,
+      ARROW_ANY : 15
+  },
+  Direction:{
+      BACK: 0,
+      FRONT: 1
+  }
+};
+
+});
+
+// file: lib\common\plugin\CameraPopoverHandle.js
+define("cordova/plugin/CameraPopoverHandle", function(require, exports, module) {
+
+var exec = require('cordova/exec');
+
+/**
+ * A handle to an image picker popover.
+ */
+var CameraPopoverHandle = function() {
+    this.setPosition = function(popoverOptions) {
+        console.log('CameraPopoverHandle.setPosition is only supported on iOS.');
+    };
+};
+
+module.exports = CameraPopoverHandle;
+
+});
+
+// file: lib\common\plugin\CameraPopoverOptions.js
+define("cordova/plugin/CameraPopoverOptions", function(require, exports, module) {
+
+var Camera = require('cordova/plugin/CameraConstants');
+
+/**
+ * Encapsulates options for iOS Popover image picker
+ */
+var CameraPopoverOptions = function(x,y,width,height,arrowDir){
+    // information of rectangle that popover should be anchored to
+    this.x = x || 0;
+    this.y = y || 32;
+    this.width = width || 320;
+    this.height = height || 480;
+    // The direction of the popover arrow
+    this.arrowDir = arrowDir || Camera.PopoverArrowDirection.ARROW_ANY;
+};
+
+module.exports = CameraPopoverOptions;
+
+});
+
+// file: lib\common\plugin\CaptureAudioOptions.js
+define("cordova/plugin/CaptureAudioOptions", function(require, exports, module) {
+
+/**
+ * Encapsulates all audio capture operation configuration options.
+ */
+var CaptureAudioOptions = function(){
+    // Upper limit of sound clips user can record. Value must be equal or greater than 1.
+    this.limit = 1;
+    // Maximum duration of a single sound clip in seconds.
+    this.duration = 0;
+    // The selected audio mode. Must match with one of the elements in supportedAudioModes array.
+    this.mode = null;
+};
+
+module.exports = CaptureAudioOptions;
+
+});
+
+// file: lib\common\plugin\CaptureError.js
+define("cordova/plugin/CaptureError", function(require, exports, module) {
+
+/**
+ * The CaptureError interface encapsulates all errors in the Capture API.
+ */
+var CaptureError = function(c) {
+   this.code = c || null;
+};
+
+// Camera or microphone failed to capture image or sound.
+CaptureError.CAPTURE_INTERNAL_ERR = 0;
+// Camera application or audio capture application is currently serving other capture request.
+CaptureError.CAPTURE_APPLICATION_BUSY = 1;
+// Invalid use of the API (e.g. limit parameter has value less than one).
+CaptureError.CAPTURE_INVALID_ARGUMENT = 2;
+// User exited camera application or audio capture application before capturing anything.
+CaptureError.CAPTURE_NO_MEDIA_FILES = 3;
+// The requested capture operation is not supported.
+CaptureError.CAPTURE_NOT_SUPPORTED = 20;
+
+module.exports = CaptureError;
+
+});
+
+// file: lib\common\plugin\CaptureImageOptions.js
+define("cordova/plugin/CaptureImageOptions", function(require, exports, module) {
+
+/**
+ * Encapsulates all image capture operation configuration options.
+ */
+var CaptureImageOptions = function(){
+    // Upper limit of images user can take. Value must be equal or greater than 1.
+    this.limit = 1;
+    // The selected image mode. Must match with one of the elements in supportedImageModes array.
+    this.mode = null;
+};
+
+module.exports = CaptureImageOptions;
+
+});
+
+// file: lib\common\plugin\CaptureVideoOptions.js
+define("cordova/plugin/CaptureVideoOptions", function(require, exports, module) {
+
+/**
+ * Encapsulates all video capture operation configuration options.
+ */
+var CaptureVideoOptions = function(){
+    // Upper limit of videos user can record. Value must be equal or greater than 1.
+    this.limit = 1;
+    // Maximum duration of a single video clip in seconds.
+    this.duration = 0;
+    // The selected video mode. Must match with one of the elements in supportedVideoModes array.
+    this.mode = null;
+};
+
+module.exports = CaptureVideoOptions;
+
+});
+
+// file: lib\common\plugin\CompassError.js
+define("cordova/plugin/CompassError", function(require, exports, module) {
+
+/**
+ *  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;
+
+});
+
+// file: lib\common\plugin\CompassHeading.js
+define("cordova/plugin/CompassHeading", function(require, exports, module) {
+
+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;
+
+});
+
+// file: lib\common\plugin\ConfigurationData.js
+define("cordova/plugin/ConfigurationData", function(require, exports, module) {
+
+/**
+ * Encapsulates a set of parameters that the capture device supports.
+ */
+function ConfigurationData() {
+    // The ASCII-encoded string in lower case representing the media type.
+    this.type = null;
+    // The height attribute represents height of the image or video in pixels.
+    // In the case of a sound clip this attribute has value 0.
+    this.height = 0;
+    // The width attribute represents width of the image or video in pixels.
+    // In the case of a sound clip this attribute has value 0
+    this.width = 0;
+}
+
+module.exports = ConfigurationData;
+
+});
+
+// file: lib\common\plugin\Connection.js
+define("cordova/plugin/Connection", function(require, exports, module) {
+
+/**
+ * Network status
+ */
+module.exports = {
+        UNKNOWN: "unknown",
+        ETHERNET: "ethernet",
+        WIFI: "wifi",
+        CELL_2G: "2g",
+        CELL_3G: "3g",
+        CELL_4G: "4g",
+        CELL:"cellular",
+        NONE: "none"
+};
+
+});
+
+// file: lib\common\plugin\Contact.js
+define("cordova/plugin/Contact", function(require, exports, module) {
+
+var argscheck = require('cordova/argscheck'),
+    exec = require('cordova/exec'),
+    ContactError = require('cordova/plugin/ContactError'),
+    utils = require('cordova/utils');
+
+/**
+* Converts primitives into Complex Object
+* Currently only used for Date fields
+*/
+function convertIn(contact) {
+    var value = contact.birthday;
+    try {
+      contact.birthday = new Date(parseFloat(value));
+    } catch (exception){
+      console.log("Cordova Contact convertIn error: exception creating date.");
+    }
+    return contact;
+}
+
+/**
+* Converts Complex objects into primitives
+* Only conversion at present is for Dates.
+**/
+
+function convertOut(contact) {
+    var value = contact.birthday;
+    if (value !== null) {
+        // try to make it a Date object if it is not already
+        if (!utils.isDate(value)){
+            try {
+                value = new Date(value);
+            } catch(exception){
+                value = null;
+            }
+        }
+        if (utils.isDate(value)){
+            value = value.valueOf(); // convert to milliseconds
+        }
+        contact.birthday = value;
+    }
+    return contact;
+}
+
+/**
+* Contains information about a single contact.
+* @constructor
+* @param {DOMString} id unique identifier
+* @param {DOMString} displayName
+* @param {ContactName} name
+* @param {DOMString} nickname
+* @param {Array.<ContactField>} phoneNumbers array of phone numbers
+* @param {Array.<ContactField>} emails array of email addresses
+* @param {Array.<ContactAddress>} addresses array of addresses
+* @param {Array.<ContactField>} ims instant messaging user ids
+* @param {Array.<ContactOrganization>} organizations
+* @param {DOMString} birthday contact's birthday
+* @param {DOMString} note user notes about contact
+* @param {Array.<ContactField>} photos
+* @param {Array.<ContactField>} categories
+* @param {Array.<ContactField>} urls contact's web sites
+*/
+var Contact = function (id, displayName, name, nickname, phoneNumbers, emails, addresses,
+    ims, organizations, birthday, note, photos, categories, urls) {
+    this.id = id || null;
+    this.rawId = null;
+    this.displayName = displayName || null;
+    this.name = name || null; // ContactName
+    this.nickname = nickname || null;
+    this.phoneNumbers = phoneNumbers || null; // ContactField[]
+    this.emails = emails || null; // ContactField[]
+    this.addresses = addresses || null; // ContactAddress[]
+    this.ims = ims || null; // ContactField[]
+    this.organizations = organizations || null; // ContactOrganization[]
+    this.birthday = birthday || null;
+    this.note = note || null;
+    this.photos = photos || null; // ContactField[]
+    this.categories = categories || null; // ContactField[]
+    this.urls = urls || null; // ContactField[]
+};
+
+/**
+* Removes contact from device storage.
+* @param successCB success callback
+* @param errorCB error callback
+*/
+Contact.prototype.remove = function(successCB, errorCB) {
+    argscheck.checkArgs('FF', 'Contact.remove', arguments);
+    var fail = errorCB && function(code) {
+        errorCB(new ContactError(code));
+    };
+    if (this.id === null) {
+        fail(ContactError.UNKNOWN_ERROR);
+    }
+    else {
+        exec(successCB, fail, "Contacts", "remove", [this.id]);
+    }
+};
+
+/**
+* Creates a deep copy of this Contact.
+* With the contact ID set to null.
+* @return copy of this Contact
+*/
+Contact.prototype.clone = function() {
+    var clonedContact = utils.clone(this);
+    clonedContact.id = null;
+    clonedContact.rawId = null;
+
+    function nullIds(arr) {
+        if (arr) {
+            for (var i = 0; i < arr.length; ++i) {
+                arr[i].id = null;
+            }
+        }
+    }
+
+    // Loop through and clear out any id's in phones, emails, etc.
+    nullIds(clonedContact.phoneNumbers);
+    nullIds(clonedContact.emails);
+    nullIds(clonedContact.addresses);
+    nullIds(clonedContact.ims);
+    nullIds(clonedContact.organizations);
+    nullIds(clonedContact.categories);
+    nullIds(clonedContact.photos);
+    nullIds(clonedContact.urls);
+    return clonedContact;
+};
+
+/**
+* Persists contact to device storage.
+* @param successCB success callback
+* @param errorCB error callback
+*/
+Contact.prototype.save = function(successCB, errorCB) {
+    argscheck.checkArgs('FFO', 'Contact.save', arguments);
+    var fail = errorCB && function(code) {
+        errorCB(new ContactError(code));
+    };
+    var success = function(result) {
+        if (result) {
+            if (successCB) {
+                var fullContact = require('cordova/plugin/contacts').create(result);
+                successCB(convertIn(fullContact));
+            }
+        }
+        else {
+            // no Entry object returned
+            fail(ContactError.UNKNOWN_ERROR);
+        }
+    };
+    var dupContact = convertOut(utils.clone(this));
+    exec(success, fail, "Contacts", "save", [dupContact]);
+};
+
+
+module.exports = Contact;
+
+});
+
+// file: lib\common\plugin\ContactAddress.js
+define("cordova/plugin/ContactAddress", function(require, exports, module) {
+
+/**
+* Contact address.
+* @constructor
+* @param {DOMString} id unique identifier, should only be set by native code
+* @param formatted // NOTE: not a W3C standard
+* @param streetAddress
+* @param locality
+* @param region
+* @param postalCode
+* @param country
+*/
+
+var ContactAddress = function(pref, type, formatted, streetAddress, locality, region, postalCode, country) {
+    this.id = null;
+    this.pref = (typeof pref != 'undefined' ? pref : false);
+    this.type = type || null;
+    this.formatted = formatted || null;
+    this.streetAddress = streetAddress || null;
+    this.locality = locality || null;
+    this.region = region || null;
+    this.postalCode = postalCode || null;
+    this.country = country || null;
+};
+
+module.exports = ContactAddress;
+
+});
+
+// file: lib\common\plugin\ContactError.js
+define("cordova/plugin/ContactError", function(require, exports, module) {
+
+/**
+ *  ContactError.
+ *  An error code assigned by an implementation when an error has occurred
+ * @constructor
+ */
+var ContactError = function(err) {
+    this.code = (typeof err != 'undefined' ? err : null);
+};
+
+/**
+ * Error codes
+ */
+ContactError.UNKNOWN_ERROR = 0;
+ContactError.INVALID_ARGUMENT_ERROR = 1;
+ContactError.TIMEOUT_ERROR = 2;
+ContactError.PENDING_OPERATION_ERROR = 3;
+ContactError.IO_ERROR = 4;
+ContactError.NOT_SUPPORTED_ERROR = 5;
+ContactError.PERMISSION_DENIED_ERROR = 20;
+
+module.exports = ContactError;
+
+});
+
+// file: lib\common\plugin\ContactField.js
+define("cordova/plugin/ContactField", function(require, exports, module) {
+
+/**
+* Generic contact field.
+* @constructor
+* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
+* @param type
+* @param value
+* @param pref
+*/
+var ContactField = function(type, value, pref) {
+    this.id = null;
+    this.type = (type && type.toString()) || null;
+    this.value = (value && value.toString()) || null;
+    this.pref = (typeof pref != 'undefined' ? pref : false);
+};
+
+module.exports = ContactField;
+
+});
+
+// file: lib\common\plugin\ContactFindOptions.js
+define("cordova/plugin/ContactFindOptions", function(require, exports, module) {
+
+/**
+ * ContactFindOptions.
+ * @constructor
+ * @param filter used to match contacts against
+ * @param multiple boolean used to determine if more than one contact should be returned
+ */
+
+var ContactFindOptions = function(filter, multiple) {
+    this.filter = filter || '';
+    this.multiple = (typeof multiple != 'undefined' ? multiple : false);
+};
+
+module.exports = ContactFindOptions;
+
+});
+
+// file: lib\common\plugin\ContactName.js
+define("cordova/plugin/ContactName", function(require, exports, module) {
+
+/**
+* Contact name.
+* @constructor
+* @param formatted // NOTE: not part of W3C standard
+* @param familyName
+* @param givenName
+* @param middle
+* @param prefix
+* @param suffix
+*/
+var ContactName = function(formatted, familyName, givenName, middle, prefix, suffix) {
+    this.formatted = formatted || null;
+    this.familyName = familyName || null;
+    this.givenName = givenName || null;
+    this.middleName = middle || null;
+    this.honorificPrefix = prefix || null;
+    this.honorificSuffix = suffix || null;
+};
+
+module.exports = ContactName;
+
+});
+
+// file: lib\common\plugin\ContactOrganization.js
+define("cordova/plugin/ContactOrganization", function(require, exports, module) {
+
+/**
+* Contact organization.
+* @constructor
+* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
+* @param name
+* @param dept
+* @param title
+* @param startDate
+* @param endDate
+* @param location
+* @param desc
+*/
+
+var ContactOrganization = function(pref, type, name, dept, title) {
+    this.id = null;
+    this.pref = (typeof pref != 'undefined' ? pref : false);
+    this.type = type || null;
+    this.name = name || null;
+    this.department = dept || null;
+    this.title = title || null;
+};
+
+module.exports = ContactOrganization;
+
+});
+
+// file: lib\common\plugin\Coordinates.js
+define("cordova/plugin/Coordinates", function(require, exports, module) {
+
+/**
+ * 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;
+
+});
+
+// file: lib\common\plugin\DirectoryEntry.js
+define("cordova/plugin/DirectoryEntry", function(require, exports, module) {
+
+var argscheck = require('cordova/argscheck'),
+    utils = require('cordova/utils'),
+    exec = require('cordova/exec'),
+    Entry = require('cordova/plugin/Entry'),
+    FileError = require('cordova/plugin/FileError'),
+    DirectoryReader = require('cordova/plugin/DirectoryReader');
+
+/**
+ * An interface representing a directory on the file system.
+ *
+ * {boolean} isFile always false (readonly)
+ * {boolean} isDirectory always true (readonly)
+ * {DOMString} name of the directory, excluding the path leading to it (readonly)
+ * {DOMString} fullPath the absolute full path to the directory (readonly)
+ * TODO: implement this!!! {FileSystem} filesystem on which the directory resides (readonly)
+ */
+var DirectoryEntry = function(name, fullPath) {
+     DirectoryEntry.__super__.constructor.call(this, false, true, name, fullPath);
+};
+
+utils.extend(DirectoryEntry, Entry);
+
+/**
+ * Creates a new DirectoryReader to read entries from this directory
+ */
+DirectoryEntry.prototype.createReader = function() {
+    return new DirectoryReader(this.fullPath);
+};
+
+/**
+ * Creates or looks up a directory
+ *
+ * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a directory
+ * @param {Flags} options to create or exclusively create the directory
+ * @param {Function} successCallback is called with the new entry
+ * @param {Function} errorCallback is called with a FileError
+ */
+DirectoryEntry.prototype.getDirectory = function(path, options, successCallback, errorCallback) {
+    argscheck.checkArgs('sOFF', 'DirectoryEntry.getDirectory', arguments);
+    var win = successCallback && function(result) {
+        var entry = new DirectoryEntry(result.name, result.fullPath);
+        successCallback(entry);
+    };
+    var fail = errorCallback && function(code) {
+        errorCallback(new FileError(code));
+    };
+    exec(win, fail, "File", "getDirectory", [this.fullPath, path, options]);
+};
+
+/**
+ * Deletes a directory and all of it's contents
+ *
+ * @param {Function} successCallback is called with no parameters
+ * @param {Function} errorCallback is called with a FileError
+ */
+DirectoryEntry.prototype.removeRecursively = function(successCallback, errorCallback) {
+    argscheck.checkArgs('FF', 'DirectoryEntry.removeRecursively', arguments);
+    var fail = errorCallback && function(code) {
+        errorCallback(new FileError(code));
+    };
+    exec(successCallback, fail, "File", "removeRecursively", [this.fullPath]);
+};
+
+/**
+ * Creates or looks up a file
+ *
+ * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a file
+ * @param {Flags} options to create or exclusively create the file
+ * @param {Function} successCallback is called with the new entry
+ * @param {Function} errorCallback is called with a FileError
+ */
+DirectoryEntry.prototype.getFile = function(path, options, successCallback, errorCallback) {
+    argscheck.checkArgs('sOFF', 'DirectoryEntry.getFile', arguments);
+    var win = successCallback && function(result) {
+        var FileEntry = require('cordova/plugin/FileEntry');
+        var entry = new FileEntry(result.name, result.fullPath);
+        successCallback(entry);
+    };
+    var fail = errorCallback && function(code) {
+        errorCallback(new FileError(code));
+    };
+    exec(win, fail, "File", "getFile", [this.fullPath, path, options]);
+};
+
+module.exports = DirectoryEntry;
+
+});
+
+// file: lib\common\plugin\DirectoryReader.js
+define("cordova/plugin/DirectoryReader", function(require, exports, module) {
+
+var exec = require('cordova/exec'),
+    FileError = require('cordova/plugin/FileError') ;
+
+/**
+ * An interface that lists the files and directories in a directory.
+ */
+function DirectoryReader(path) {
+    this.path = path || null;
+}
+
+/**
+ * Returns a list of entries from a directory.
+ *
+ * @param {Function} successCallback is called with a list of entries
+ * @param {Function} errorCallback is called with a FileError
+ */
+DirectoryReader.prototype.readEntries = function(successCallback, errorCallback) {
+    var win = typeof successCallback !== 'function' ? null : function(result) {
+        var retVal = [];
+        for (var i=0; i<result.length; i++) {
+            var entry = null;
+            if (result[i].isDirectory) {
+                entry = new (require('cordova/plugin/DirectoryEntry'))();
+            }
+            else if (result[i].isFile) {
+                entry = new (require('cordova/plugin/FileEntry'))();
+            }
+            entry.isDirectory = result[i].isDirectory;
+            entry.isFile = result[i].isFile;
+            entry.name = result[i].name;
+            entry.fullPath = result[i].fullPath;
+            retVal.push(entry);
+        }
+        successCallback(retVal);
+    };
+    var fail = typeof errorCallback !== 'function' ? null : function(code) {
+        errorCallback(new FileError(code));
+    };
+    exec(win, fail, "File", "readEntries", [this.path]);
+};
+
+module.exports = DirectoryReader;
+
+});
+
+// file: lib\common\plugin\Entry.js
+define("cordova/plugin/Entry", function(require, exports, module) {
+
+var argscheck = require('cordova/argscheck'),
+    exec = require('cordova/exec'),
+    FileError = require('cordova/plugin/FileError'),
+    Metadata = require('cordova/plugin/Metadata');
+
+/**
+ * Represents a file or directory on the local file system.
+ *
+ * @param isFile
+ *            {boolean} true if Entry is a file (readonly)
+ * @param isDirectory
+ *            {boolean} true if Entry is a directory (readonly)
+ * @param name
+ *            {DOMString} name of the file or directory, excluding the path
+ *            leading to it (readonly)
+ * @param fullPath
+ *            {DOMString} the absolute full path to the file or directory
+ *            (readonly)
+ */
+function Entry(isFile, isDirectory, name, fullPath, fileSystem) {
+    this.isFile = !!isFile;
+    this.isDirectory = !!isDirectory;
+    this.name = name || '';
+    this.fullPath = fullPath || '';
+    this.filesystem = fileSystem || null;
+}
+
+/**
+ * Look up the metadata of the entry.
+ *
+ * @param successCallback
+ *            {Function} is called with a Metadata object
+ * @param errorCallback
+ *            {Function} is called with a FileError
+ */
+Entry.prototype.getMetadata = function(successCallback, errorCallback) {
+    argscheck.checkArgs('FF', 'Entry.getMetadata', arguments);
+    var success = successCallback && function(lastModified) {
+        var metadata = new Metadata(lastModified);
+        successCallback(metadata);
+    };
+    var fail = errorCallback && function(code) {
+        errorCallback(new FileError(code));
+    };
+
+    exec(success, fail, "File", "getMetadata", [this.fullPath]);
+};
+
+/**
+ * Set the metadata of the entry.
+ *
+ * @param successCallback
+ *            {Function} is called with a Metadata object
+ * @param errorCallback
+ *            {Function} is called with a FileError
+ * @param metadataObject
+ *            {Object} keys and values to set
+ */
+Entry.prototype.setMetadata = function(successCallback, errorCallback, metadataObject) {
+    argscheck.checkArgs('FFO', 'Entry.setMetadata', arguments);
+    exec(successCallback, errorCallback, "File", "setMetadata", [this.fullPath, metadataObject]);
+};
+
+/**
+ * Move a file or directory to a new location.
+ *
+ * @param parent
+ *            {DirectoryEntry} the directory to which to move this entry
+ * @param newName
+ *            {DOMString} new name of the entry, defaults to the current name
+ * @param successCallback
+ *            {Function} called with the new DirectoryEntry object
+ * @param errorCallback
+ *            {Function} called with a FileError
+ */
+Entry.prototype.moveTo = function(parent, newName, successCallback, errorCallback) {
+    argscheck.checkArgs('oSFF', 'Entry.moveTo', arguments);
+    var fail = errorCallback && function(code) {
+        errorCallback(new FileError(code));
+    };
+    // source path
+    var srcPath = this.fullPath,
+        // entry name
+        name = newName || this.name,
+        success = function(entry) {
+            if (entry) {
+                if (successCallback) {
+                    // create appropriate Entry object
+                    var result = (entry.isDirectory) ? new (require('cordova/plugin/DirectoryEntry'))(entry.name, entry.fullPath) : new (require('cordova/plugin/FileEntry'))(entry.name, entry.fullPath);
+                    successCallback(result);
+                }
+            }
+            else {
+                // no Entry object returned
+                fail && fail(FileError.NOT_FOUND_ERR);
+            }
+        };
+
+    // copy
+    exec(success, fail, "File", "moveTo", [srcPath, parent.fullPath, name]);
+};
+
+/**
+ * Copy a directory to a different location.
+ *
+ * @param parent
+ *            {DirectoryEntry} the directory to which to copy the entry
+ * @param newName
+ *            {DOMString} new name of the entry, defaults to the current name
+ * @param successCallback
+ *            {Function} called with the new Entry object
+ * @param errorCallback
+ *            {Function} called with a FileError
+ */
+Entry.prototype.copyTo = function(parent, newName, successCallback, errorCallback) {
+    argscheck.checkArgs('oSFF', 'Entry.copyTo', arguments);
+    var fail = errorCallback && function(code) {
+        errorCallback(new FileError(code));
+    };
+
+        // source path
+    var srcPath = this.fullPath,
+        // entry name
+        name = newName || this.name,
+        // success callback
+        success = function(entry) {
+            if (entry) {
+                if (successCallback) {
+                    // create appropriate Entry object
+                    var result = (entry.isDirectory) ? new (require('cordova/plugin/DirectoryEntry'))(entry.name, entry.fullPath) : new (require('cordova/plugin/FileEntry'))(entry.name, entry.fullPath);
+                    successCallback(result);
+                }
+            }
+            else {
+                // no Entry object returned
+                fail && fail(FileError.NOT_FOUND_ERR);
+            }
+        };
+
+    // copy
+    exec(success, fail, "File", "copyTo", [srcPath, parent.fullPath, name]);
+};
+
+/**
+ * Return a URL that can be used to identify this entry.
+ */
+Entry.prototype.toURL = function() {
+    // fullPath attribute contains the full URL
+    return this.fullPath;
+};
+
+/**
+ * Returns a URI that can be used to identify this entry.
+ *
+ * @param {DOMString} mimeType for a FileEntry, the mime type to be used to interpret the file, when loaded through this URI.
+ * @return uri
+ */
+Entry.prototype.toURI = function(mimeType) {
+    console.log("DEPRECATED: Update your code to use 'toURL'");
+    // fullPath attribute contains the full URI
+    return this.toURL();
+};
+
+/**
+ * Remove a file or directory. It is an error to attempt to delete a
+ * directory that is not empty. It is an error to attempt to delete a
+ * root directory of a file system.
+ *
+ * @param successCallback {Function} called with no parameters
+ * @param errorCallback {Function} called with a FileError
+ */
+Entry.prototype.remove = function(successCallback, errorCallback) {
+    argscheck.checkArgs('FF', 'Entry.remove', arguments);
+    var fail = errorCallback && function(code) {
+        errorCallback(new FileError(code));
+    };
+    exec(successCallback, fail, "File", "remove", [this.fullPath]);
+};
+
+/**
+ * Look up the parent DirectoryEntry of this entry.
+ *
+ * @param successCallback {Function} called with the parent DirectoryEntry object
+ * @param errorCallback {Function} called with a FileError
+ */
+Entry.prototype.getParent = function(successCallback, errorCallback) {
+    argscheck.checkArgs('FF', 'Entry.getParent', arguments);
+    var win = successCallback && function(result) {
+        var DirectoryEntry = require('cordova/plugin/DirectoryEntry');
+        var entry = new DirectoryEntry(result.name, result.fullPath);
+        successCallback(entry);
+    };
+    var fail = errorCallback && function(code) {
+        errorCallback(new FileError(code));
+    };
+    exec(win, fail, "File", "getParent", [this.fullPath]);
+};
+
+module.exports = Entry;
+
+});
+
+// file: lib\common\plugin\File.js
+define("cordova/plugin/File", function(require, exports, module) {
+
+/**
+ * Constructor.
+ * name {DOMString} name of the file, without path information
+ * fullPath {DOMString} the full path of the file, including the name
+ * type {DOMString} mime type
+ * lastModifiedDate {Date} last modified date
+ * size {Number} size of the file in bytes
+ */
+
+var File = function(name, fullPath, type, lastModifiedDate, size){
+    this.name = name || '';
+    this.fullPath = fullPath || null;
+    this.type = type || null;
+    this.lastModifiedDate = lastModifiedDate || null;
+    this.size = size || 0;
+
+    // These store the absolute start and end for slicing the file.
+    this.start = 0;
+    this.end = this.size;
+};
+
+/**
+ * Returns a "slice" of the file. Since Cordova Files don't contain the actual
+ * content, this really returns a File with adjusted start and end.
+ * Slices of slices are supported.
+ * start {Number} The index at which to start the slice (inclusive).
+ * end {Number} The index at which to end the slice (exclusive).
+ */
+File.prototype.slice = function(start, end) {
+    var size = this.end - this.start;
+    var newStart = 0;
+    var newEnd = size;
+    if (arguments.length) {
+        if (start < 0) {
+            newStart = Math.max(size + start, 0);
+        } else {
+            newStart = Math.min(size, start);
+        }
+    }
+
+    if (arguments.length >= 2) {
+        if (end < 0) {
+            newEnd = Math.max(size + end, 0);
+        } else {
+            newEnd = Math.min(end, size);
+        }
+    }
+
+    var newFile = new File(this.name, this.fullPath, this.type, this.lastModifiedData, this.size);
+    newFile.start = this.start + newStart;
+    newFile.end = this.start + newEnd;
+    return newFile;
+};
+
+
+module.exports = File;
+
+});
+
+// file: lib\common\plugin\FileEntry.js
+define("cordova/plugin/FileEntry", function(require, exports, module) {
+
+var utils = require('cordova/utils'),
+    exec = require('cordova/exec'),
+    Entry = require('cordova/plugin/Entry'),
+    FileWriter = require('cordova/plugin/FileWriter'),
+    File = require('cordova/plugin/File'),
+    FileError = require('cordova/plugin/FileError');
+
+/**
+ * An interface representing a file on the file system.
+ *
+ * {boolean} isFile always true (readonly)
+ * {boolean} isDirectory always false (readonly)
+ * {DOMString} name of the file, excluding the path leading to it (readonly)
+ * {DOMString} fullPath the absolute full path to the file (readonly)
+ * {FileSystem} filesystem on which the file resides (readonly)
+ */
+var FileEntry = function(name, fullPath) {
+     FileEntry.__super__.constructor.apply(this, [true, false, name, fullPath]);
+};
+
+utils.extend(FileEntry, Entry);
+
+/**
+ * Creates a new FileWriter associated with the file that this FileEntry represents.
+ *
+ * @param {Function} successCallback is called with the new FileWriter
+ * @param {Function} errorCallback is called with a FileError
+ */
+FileEntry.prototype.createWriter = function(successCallback, errorCallback) {
+    this.file(function(filePointer) {
+        var writer = new FileWriter(filePointer);
+
+        if (writer.fileName === null || writer.fileName === "") {
+            errorCallback && errorCallback(new FileError(FileError.INVALID_STATE_ERR));
+        } else {
+            successCallback && successCallback(writer);
+        }
+    }, errorCallback);
+};
+
+/**
+ * Returns a File that represents the current state of the file that this FileEntry represents.
+ *
+ * @param {Function} successCallback is called with the new File object
+ * @param {Function} errorCallback is called with a FileError
+ */
+FileEntry.prototype.file = function(successCallback, errorCallback) {
+    var win = successCallback && function(f) {
+        var file = new File(f.name, f.fullPath, f.type, f.lastModifiedDate, f.size);
+        successCallback(file);
+    };
+    var fail = errorCallback && function(code) {
+        errorCallback(new FileError(code));
+    };
+    exec(win, fail, "File", "getFileMetadata", [this.fullPath]);
+};
+
+
+module.exports = FileEntry;
+
+});
+
+// file: lib\common\plugin\FileError.js
+define("cordova/plugin/FileError", function(require, exports, module) {
+
+/**
+ * FileError
+ */
+function FileError(error) {
+  this.code = error || null;
+}
+
+// File error codes
+// Found in DOMException
+FileError.NOT_FOUND_ERR = 1;
+FileError.SECURITY_ERR = 2;
+FileError.ABORT_ERR = 3;
+
+// Added by File API specification
+FileError.NOT_READABLE_ERR = 4;
+FileError.ENCODING_ERR = 5;
+FileError.NO_MODIFICATION_ALLOWED_ERR = 6;
+FileError.INVALID_STATE_ERR = 7;
+FileError.SYNTAX_ERR = 8;
+FileError.INVALID_MODIFICATION_ERR = 9;
+FileError.QUOTA_EXCEEDED_ERR = 10;
+FileError.TYPE_MISMATCH_ERR = 11;
+FileError.PATH_EXISTS_ERR = 12;
+
+module.exports = FileError;
+
+});
+
+// file: lib\common\plugin\FileReader.js
+define("cordova/plugin/FileReader", function(require, exports, module) {
+
+var exec = require('cordova/exec'),
+    modulemapper = require('cordova/modulemapper'),
+    utils = require('cordova/utils'),
+    File = require('cordova/plugin/File'),
+    FileError = require('cordova/plugin/FileError'),
+    ProgressEvent = require('cordova/plugin/ProgressEvent'),
+    origFileReader = modulemapper.getOriginalSymbol(this, 'FileReader');
+
+/**
+ * This class reads the mobile device file system.
+ *
+ * For Android:
+ *      The root directory is the root of the file system.
+ *      To read from the SD card, the file name is "sdcard/my_file.txt"
+ * @constructor
+ */
+var FileReader = function() {
+    this._readyState = 0;
+    this._error = null;
+    this._result = null;
+    this._fileName = '';
+    this._realReader = origFileReader ? new origFileReader() : {};
+};
+
+// States
+FileReader.EMPTY = 0;
+FileReader.LOADING = 1;
+FileReader.DONE = 2;
+
+utils.defineGetter(FileReader.prototype, 'readyState', function() {
+    return this._fileName ? this._readyState : this._realReader.readyState;
+});
+
+utils.defineGetter(FileReader.prototype, 'error', function() {
+    return this._fileName ? this._error: this._realReader.error;
+});
+
+utils.defineGetter(FileReader.prototype, 'result', function() {
+    return this._fileName ? this._result: this._realReader.result;
+});
+
+function defineEvent(eventName) {
+    utils.defineGetterSetter(FileReader.prototype, eventName, function() {
+        return this._realReader[eventName] || null;
+    }, function(value) {
+        this._realReader[eventName] = value;
+    });
+}
+defineEvent('onloadstart');    // When the read starts.
+defineEvent('onprogress');     // While reading (and decoding) file or fileBlob data, and reporting partial file data (progress.loaded/progress.total)
+defineEvent('onload');         // When the read has successfully completed.
+defineEvent('onerror');        // When the read has failed (see errors).
+defineEvent('onloadend');      // When the request has completed (either in success or failure).
+defineEvent('onabort');        // When the read has been aborted. For instance, by invoking the abort() method.
+
+function initRead(reader, file) {
+    // Already loading something
+    if (reader.readyState == FileReader.LOADING) {
+      throw new FileError(FileError.INVALID_STATE_ERR);
+    }
+
+    reader._result = null;
+    reader._error = null;
+    reader._readyState = FileReader.LOADING;
+
+    if (typeof file == 'string') {
+        // Deprecated in Cordova 2.4.
+        console.warning('Using a string argument with FileReader.readAs functions is deprecated.');
+        reader._fileName = file;
+    } else if (typeof file.fullPath == 'string') {
+        reader._fileName = file.fullPath;
+    } else {
+        reader._fileName = '';
+        return true;
+    }
+
+    reader.onloadstart && reader.onloadstart(new ProgressEvent("loadstart", {target:reader}));
+}
+
+/**
+ * Abort reading file.
+ */
+FileReader.prototype.abort = function() {
+    if (origFileReader && !this._fileName) {
+        return this._realReader.abort();
+    }
+    this._result = null;
+
+    if (this._readyState == FileReader.DONE || this._readyState == FileReader.EMPTY) {
+      return;
+    }
+
+    this._readyState = FileReader.DONE;
+
+    // If abort callback
+    if (typeof this.onabort === 'function') {
+        this.onabort(new ProgressEvent('abort', {target:this}));
+    }
+    // If load end callback
+    if (typeof this.onloadend === 'function') {
+        this.onloadend(new ProgressEvent('loadend', {target:this}));
+    }
+};
+
+/**
+ * Read text file.
+ *
+ * @param file          {File} File object containing file properties
+ * @param encoding      [Optional] (see http://www.iana.org/assignments/character-sets)
+ */
+FileReader.prototype.readAsText = function(file, encoding) {
+    if (initRead(this, file)) {
+        return this._realReader.readAsText(file, encoding);
+    }
+
+    // Default encoding is UTF-8
+    var enc = encoding ? encoding : "UTF-8";
+    var me = this;
+    var execArgs = [this._fileName, enc, file.start, file.end];
+
+    // Read file
+    exec(
+        // Success callback
+        function(r) {
+            // If DONE (cancelled), then don't do anything
+            if (me._readyState === FileReader.DONE) {
+                return;
+            }
+
+            // Save result
+            me._result = r;
+
+            // If onload callback
+            if (typeof me.onload === "function") {
+                me.onload(new ProgressEvent("load", {target:me}));
+            }
+
+            // DONE state
+            me._readyState = FileReader.DONE;
+
+            // If onloadend callback
+            if (typeof me.onloadend === "function") {
+                me.onloadend(new ProgressEvent("loadend", {target:me}));
+            }
+        },
+        // Error callback
+        function(e) {
+            // If DONE (cancelled), then don't do anything
+            if (me._readyState === FileReader.DONE) {
+                return;
+            }
+
+            // DONE state
+            me._readyState = FileReader.DONE;
+
+            // null result
+            me._result = null;
+
+            // Save error
+            me._error = new FileError(e);
+
+            // If onerror callback
+            if (typeof me.onerror === "function") {
+                me.onerror(new ProgressEvent("error", {target:me}));
+            }
+
+            // If onloadend callback
+            if (typeof me.onloadend === "function") {
+                me.onloadend(new ProgressEvent("loadend", {target:me}));
+            }
+        }, "File", "readAsText", execArgs);
+};
+
+
+/**
+ * Read file and return data as a base64 encoded data url.
+ * A data url is of the form:
+ *      data:[<mediatype>][;base64],<data>
+ *
+ * @param file          {File} File object containing file properties
+ */
+FileReader.prototype.readAsDataURL = function(file) {
+    if (initRead(this, file)) {
+        return this._realReader.readAsDataURL(file);
+    }
+
+    var me = this;
+    var execArgs = [this._fileName, file.start, file.end];
+
+    // Read file
+    exec(
+        // Success callback
+        function(r) {
+            // If DONE (cancelled), then don't do anything
+            if (me._readyState === FileReader.DONE) {
+                return;
+            }
+
+            // DONE state
+            me._readyState = FileReader.DONE;
+
+            // Save result
+            me._result = r;
+
+            // If onload callback
+            if (typeof me.onload === "function") {
+                me.onload(new ProgressEvent("load", {target:me}));
+            }
+
+            // If onloadend callback
+            if (typeof me.onloadend === "function") {
+                me.onloadend(new ProgressEvent("loadend", {target:me}));
+            }
+        },
+        // Error callback
+        function(e) {
+            // If DONE (cancelled), then don't do anything
+            if (me._readyState === FileReader.DONE) {
+                return;
+            }
+
+            // DONE state
+            me._readyState = FileReader.DONE;
+
+            me._result = null;
+
+            // Save error
+            me._error = new FileError(e);
+
+            // If onerror callback
+            if (typeof me.onerror === "function") {
+                me.onerror(new ProgressEvent("error", {target:me}));
+            }
+
+            // If onloadend callback
+            if (typeof me.onloadend === "function") {
+                me.onloadend(new ProgressEvent("loadend", {target:me}));
+            }
+        }, "File", "readAsDataURL", execArgs);
+};
+
+/**
+ * Read file and return data as a binary data.
+ *
+ * @param file          {File} File object containing file properties
+ */
+FileReader.prototype.readAsBinaryString = function(file) {
+    if (initRead(this, file)) {
+        return this._realReader.readAsBinaryString(file);
+    }
+
+    var me = this;
+    var execArgs = [this._fileName, file.start, file.end];
+
+    // Read file
+    exec(
+        // Success callback
+        function(r) {
+            // If DONE (cancelled), then don't do anything
+            if (me._readyState === FileReader.DONE) {
+                return;
+            }
+
+            // DONE state
+            me._readyState = FileReader.DONE;
+
+            me._result = r;
+
+            // If onload callback
+            if (typeof me.onload === "function") {
+                me.onload(new ProgressEvent("load", {target:me}));
+            }
+
+            // If onloadend callback
+            if (typeof me.onloadend === "function") {
+                me.onloadend(new ProgressEvent("loadend", {target:me}));
+            }
+        },
+        // Error callback
+        function(e) {
+            // If DONE (cancelled), then don't do anything
+            if (me._readyState === FileReader.DONE) {
+                return;
+            }
+
+            // DONE state
+            me._readyState = FileReader.DONE;
+
+            me._result = null;
+
+            // Save error
+            me._error = new FileError(e);
+
+            // If onerror callback
+            if (typeof me.onerror === "function") {
+                me.onerror(new ProgressEvent("error", {target:me}));
+            }
+
+            // If onloadend callback
+            if (typeof me.onloadend === "function") {
+                me.onloadend(new ProgressEvent("loadend", {target:me}));
+            }
+        }, "File", "readAsBinaryString", execArgs);
+};
+
+/**
+ * Read file and return data as a binary data.
+ *
+ * @param file          {File} File object containing file properties
+ */
+FileReader.prototype.readAsArrayBuffer = function(file) {
+    if (initRead(this, file)) {
+        return this._realReader.readAsArrayBuffer(file);
+    }
+
+    var me = this;
+    var execArgs = [this._fileName, file.start, file.end];
+
+    // Read file
+    exec(
+        // Success callback
+        function(r) {
+            // If DONE (cancelled), then don't do anything
+            if (me._readyState === FileReader.DONE) {
+                return;
+            }
+
+            // DONE state
+            me._readyState = FileReader.DONE;
+
+            me._result = r;
+
+            // If onload callback
+            if (typeof me.onload === "function") {
+                me.onload(new ProgressEvent("load", {target:me}));
+            }
+
+            // If onloadend callback
+            if (typeof me.onloadend === "function") {
+                me.onloadend(new ProgressEvent("loadend", {target:me}));
+            }
+        },
+        // Error callback
+        function(e) {
+            // If DONE (cancelled), then don't do anything
+            if (me._readyState === FileReader.DONE) {
+                return;
+            }
+
+            // DONE state
+            me._readyState = FileReader.DONE;
+
+            me._result = null;
+
+            // Save error
+            me._error = new FileError(e);
+
+            // If onerror callback
+            if (typeof me.onerror === "function") {
+                me.onerror(new ProgressEvent("error", {target:me}));
+            }
+
+            // If onloadend callback
+            if (typeof me.onloadend === "function") {
+                me.onloadend(new ProgressEvent("loadend", {target:me}));
+            }
+        }, "File", "readAsArrayBuffer", execArgs);
+};
+
+module.exports = FileReader;
+
+});
+
+// file: lib\common\plugin\FileSystem.js
+define("cordova/plugin/FileSystem", function(require, exports, module) {
+
+var DirectoryEntry = require('cordova/plugin/DirectoryEntry');
+
+/**
+ * An interface representing a file system
+ *
+ * @constructor
+ * {DOMString} name the unique name of the file system (readonly)
+ * {DirectoryEntry} root directory of the file system (readonly)
+ */
+var FileSystem = function(name, root) {
+    this.name = name || null;
+    if (root) {
+        this.root = new DirectoryEntry(root.name, root.fullPath);
+    }
+};
+
+module.exports = FileSystem;
+
+});
+
+// file: lib\common\plugin\FileTransfer.js
+define("cordova/plugin/FileTransfer", function(require, exports, module) {
+
+var argscheck = require('cordova/argscheck'),
+    exec = require('cordova/exec'),
+    FileTransferError = require('cordova/plugin/FileTransferError'),
+    ProgressEvent = require('cordova/plugin/ProgressEvent');
+
+function newProgressEvent(result) {
+    var pe = new ProgressEvent();
+    pe.lengthComputable = result.lengthComputable;
+    pe.loaded = result.loaded;
+    pe.total = result.total;
+    return pe;
+}
+
+function getBasicAuthHeader(urlString) {
+    var header =  null;
+
+    if (window.btoa) {
+        // parse the url using the Location object
+        var url = document.createElement('a');
+        url.href = urlString;
+
+        var credentials = null;
+        var protocol = url.protocol + "//";
+        var origin = protocol + url.host;
+
+        // check whether there are the username:password credentials in the url
+        if (url.href.indexOf(origin) != 0) { // credentials found
+            var atIndex = url.href.indexOf("@");
+            credentials = url.href.substring(protocol.length, atIndex);
+        }
+
+        if (credentials) {
+            var authHeader = "Authorization";
+            var authHeaderValue = "Basic " + window.btoa(credentials);
+
+            header = {
+                name : authHeader,
+                value : authHeaderValue
+            };
+        }
+    }
+
+    return header;
+}
+
+var idCounter = 0;
+
+/**
+ * FileTransfer uploads a file to a remote server.
+ * @constructor
+ */
+var FileTransfer = function() {
+    this._id = ++idCounter;
+    this.onprogress = null; // optional callback
+};
+
+/**
+* Given an absolute file path, uploads a file on the device to a remote server
+* using a multipart HTTP request.
+* @param filePath {String}           Full path of the file on the device
+* @param server {String}             URL of the server to receive the file
+* @param successCallback (Function}  Callback to be invoked when upload has completed
+* @param errorCallback {Function}    Callback to be invoked upon error
+* @param options {FileUploadOptions} Optional parameters such as file name and mimetype
+* @param trustAllHosts {Boolean} Optional trust all hosts (e.g. for self-signed certs), defaults to false
+*/
+FileTransfer.prototype.upload = function(filePath, server, successCallback, errorCallback, options, trustAllHosts) {
+    argscheck.checkArgs('ssFFO*', 'FileTransfer.upload', arguments);
+    // check for options
+    var fileKey = null;
+    var fileName = null;
+    var mimeType = null;
+    var params = null;
+    var chunkedMode = true;
+    var headers = null;
+
+    var basicAuthHeader = getBasicAuthHeader(server);
+    if (basicAuthHeader) {
+        if (!options) {
+            options = new FileUploadOptions();
+        }
+        if (!options.headers) {
+            options.headers = {};
+        }
+        options.headers[basicAuthHeader.name] = basicAuthHeader.value;
+    }
+
+    if (options) {
+        fileKey = options.fileKey;
+        fileName = options.fileName;
+        mimeType = options.mimeType;
+        headers = options.headers;
+        if (options.chunkedMode !== null || typeof options.chunkedMode != "undefined") {
+            chunkedMode = options.chunkedMode;
+        }
+        if (options.params) {
+            params = options.params;
+        }
+        else {
+            params = {};
+        }
+    }
+
+    var fail = errorCallback && function(e) {
+        var error = new FileTransferError(e.code, e.source, e.target, e.http_status, e.body);
+        errorCallback(error);
+    };
+
+    var self = this;
+    var win = function(result) {
+        if (typeof result.lengthComputable != "undefined") {
+            if (self.onprogress) {
+                self.onprogress(newProgressEvent(result));
+            }
+        } else {
+            successCallback && successCallback(result);
+        }
+    };
+    exec(win, fail, 'FileTransfer', 'upload', [filePath, server, fileKey, fileName, mimeType, params, trustAllHosts, chunkedMode, headers, this._id]);
+};
+
+/**
+ * Downloads a file form a given URL and saves it to the specified directory.
+ * @param source {String}          URL of the server to receive the file
+ * @param target {String}         Full path of the file on the device
+ * @param successCallback (Function}  Callback to be invoked when upload has completed
+ * @param errorCallback {Function}    Callback to be invoked upon error
+ * @param trustAllHosts {Boolean} Optional trust all hosts (e.g. for self-signed certs), defaults to false
+ * @param options {FileDownloadOptions} Optional parameters such as headers
+ */
+FileTransfer.prototype.download = function(source, target, successCallback, errorCallback, trustAllHosts, options) {
+    argscheck.checkArgs('ssFF*', 'FileTransfer.download', arguments);
+    var self = this;
+
+    var basicAuthHeader = getBasicAuthHeader(source);
+    if (basicAuthHeader) {
+        if (!options) {
+            options = {};
+        }
+        if (!options.headers) {
+            options.headers = {};
+        }
+        options.headers[basicAuthHeader.n

<TRUNCATED>

[66/70] Remove all cordova-lib files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/src/android/ContactAccessorSdk5.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/android/ContactAccessorSdk5.java b/cordova-lib/spec-plugman/plugins/Contacts/src/android/ContactAccessorSdk5.java
deleted file mode 100644
index 46440ba..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/src/android/ContactAccessorSdk5.java
+++ /dev/null
@@ -1,2183 +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.
-*/
-
-package org.apache.cordova.core;
-
-import android.accounts.Account;
-import android.accounts.AccountManager;
-import android.content.ContentProviderOperation;
-import android.content.ContentProviderResult;
-import android.content.ContentUris;
-import android.content.ContentValues;
-import android.content.OperationApplicationException;
-import android.database.Cursor;
-import android.net.Uri;
-import android.os.RemoteException;
-import android.provider.ContactsContract;
-import android.util.Log;
-import android.webkit.WebView;
-
-import org.apache.cordova.CordovaInterface;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import java.io.ByteArrayOutputStream;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-//import android.app.Activity;
-//import android.content.Context;
-
-/**
- * An implementation of {@link ContactAccessor} that uses current Contacts API.
- * This class should be used on Eclair or beyond, but would not work on any earlier
- * release of Android.  As a matter of fact, it could not even be loaded.
- * <p>
- * This implementation has several advantages:
- * <ul>
- * <li>It sees contacts from multiple accounts.
- * <li>It works with aggregated contacts. So for example, if the contact is the result
- * of aggregation of two raw contacts from different accounts, it may return the name from
- * one and the phone number from the other.
- * <li>It is efficient because it uses the more efficient current API.
- * <li>Not obvious in this particular example, but it has access to new kinds
- * of data available exclusively through the new APIs. Exercise for the reader: add support
- * for nickname (see {@link android.provider.ContactsContract.CommonDataKinds.Nickname}) or
- * social status updates (see {@link android.provider.ContactsContract.StatusUpdates}).
- * </ul>
- */
-
-public class ContactAccessorSdk5 extends ContactAccessor {
-
-    /**
-     * Keep the photo size under the 1 MB blog limit.
-     */
-    private static final long MAX_PHOTO_SIZE = 1048576;
-
-    private static final String EMAIL_REGEXP = ".+@.+\\.+.+"; /* <anything>@<anything>.<anything>*/
-
-    /**
-     * A static map that converts the JavaScript property name to Android database column name.
-     */
-    private static final Map<String, String> dbMap = new HashMap<String, String>();
-    static {
-        dbMap.put("id", ContactsContract.Data.CONTACT_ID);
-        dbMap.put("displayName", ContactsContract.Contacts.DISPLAY_NAME);
-        dbMap.put("name", ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME);
-        dbMap.put("name.formatted", ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME);
-        dbMap.put("name.familyName", ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME);
-        dbMap.put("name.givenName", ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME);
-        dbMap.put("name.middleName", ContactsContract.CommonDataKinds.StructuredName.MIDDLE_NAME);
-        dbMap.put("name.honorificPrefix", ContactsContract.CommonDataKinds.StructuredName.PREFIX);
-        dbMap.put("name.honorificSuffix", ContactsContract.CommonDataKinds.StructuredName.SUFFIX);
-        dbMap.put("nickname", ContactsContract.CommonDataKinds.Nickname.NAME);
-        dbMap.put("phoneNumbers", ContactsContract.CommonDataKinds.Phone.NUMBER);
-        dbMap.put("phoneNumbers.value", ContactsContract.CommonDataKinds.Phone.NUMBER);
-        dbMap.put("emails", ContactsContract.CommonDataKinds.Email.DATA);
-        dbMap.put("emails.value", ContactsContract.CommonDataKinds.Email.DATA);
-        dbMap.put("addresses", ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS);
-        dbMap.put("addresses.formatted", ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS);
-        dbMap.put("addresses.streetAddress", ContactsContract.CommonDataKinds.StructuredPostal.STREET);
-        dbMap.put("addresses.locality", ContactsContract.CommonDataKinds.StructuredPostal.CITY);
-        dbMap.put("addresses.region", ContactsContract.CommonDataKinds.StructuredPostal.REGION);
-        dbMap.put("addresses.postalCode", ContactsContract.CommonDataKinds.StructuredPostal.POSTCODE);
-        dbMap.put("addresses.country", ContactsContract.CommonDataKinds.StructuredPostal.COUNTRY);
-        dbMap.put("ims", ContactsContract.CommonDataKinds.Im.DATA);
-        dbMap.put("ims.value", ContactsContract.CommonDataKinds.Im.DATA);
-        dbMap.put("organizations", ContactsContract.CommonDataKinds.Organization.COMPANY);
-        dbMap.put("organizations.name", ContactsContract.CommonDataKinds.Organization.COMPANY);
-        dbMap.put("organizations.department", ContactsContract.CommonDataKinds.Organization.DEPARTMENT);
-        dbMap.put("organizations.title", ContactsContract.CommonDataKinds.Organization.TITLE);
-        dbMap.put("birthday", ContactsContract.CommonDataKinds.Event.CONTENT_ITEM_TYPE);
-        dbMap.put("note", ContactsContract.CommonDataKinds.Note.NOTE);
-        dbMap.put("photos.value", ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE);
-        //dbMap.put("categories.value", null);
-        dbMap.put("urls", ContactsContract.CommonDataKinds.Website.URL);
-        dbMap.put("urls.value", ContactsContract.CommonDataKinds.Website.URL);
-    }
-
-    /**
-     * Create an contact accessor.
-     */
-    public ContactAccessorSdk5(WebView view, CordovaInterface context) {
-        mApp = context;
-        mView = view;
-    }
-
-    /**
-     * This method takes the fields required and search options in order to produce an
-     * array of contacts that matches the criteria provided.
-     * @param fields an array of items to be used as search criteria
-     * @param options that can be applied to contact searching
-     * @return an array of contacts
-     */
-    @Override
-    public JSONArray search(JSONArray fields, JSONObject options) {
-        // Get the find options
-        String searchTerm = "";
-        int limit = Integer.MAX_VALUE;
-        boolean multiple = true;
-
-        if (options != null) {
-            searchTerm = options.optString("filter");
-            if (searchTerm.length() == 0) {
-                searchTerm = "%";
-            }
-            else {
-                searchTerm = "%" + searchTerm + "%";
-            }
-            
-            try {
-                multiple = options.getBoolean("multiple");
-                if (!multiple) {
-                    limit = 1;
-                }
-            } catch (JSONException e) {
-                // Multiple was not specified so we assume the default is true.
-            }
-        }
-        else {
-            searchTerm = "%";
-        }
-        
-
-        //Log.d(LOG_TAG, "Search Term = " + searchTerm);
-        //Log.d(LOG_TAG, "Field Length = " + fields.length());
-        //Log.d(LOG_TAG, "Fields = " + fields.toString());
-
-        // Loop through the fields the user provided to see what data should be returned.
-        HashMap<String, Boolean> populate = buildPopulationSet(fields);
-
-        // Build the ugly where clause and where arguments for one big query.
-        WhereOptions whereOptions = buildWhereClause(fields, searchTerm);
-
-        // Get all the id's where the search term matches the fields passed in.
-        Cursor idCursor = mApp.getActivity().getContentResolver().query(ContactsContract.Data.CONTENT_URI,
-                new String[] { ContactsContract.Data.CONTACT_ID },
-                whereOptions.getWhere(),
-                whereOptions.getWhereArgs(),
-                ContactsContract.Data.CONTACT_ID + " ASC");
-
-        // Create a set of unique ids
-        Set<String> contactIds = new HashSet<String>();
-        int idColumn = -1;
-        while (idCursor.moveToNext()) {
-            if (idColumn < 0) {
-                idColumn = idCursor.getColumnIndex(ContactsContract.Data.CONTACT_ID);
-            }
-            contactIds.add(idCursor.getString(idColumn));
-        }
-        idCursor.close();
-
-        // Build a query that only looks at ids
-        WhereOptions idOptions = buildIdClause(contactIds, searchTerm);
-
-        // Determine which columns we should be fetching.
-        HashSet<String> columnsToFetch = new HashSet<String>();
-        columnsToFetch.add(ContactsContract.Data.CONTACT_ID);
-        columnsToFetch.add(ContactsContract.Data.RAW_CONTACT_ID);
-        columnsToFetch.add(ContactsContract.Data.MIMETYPE);
-        
-        if (isRequired("displayName", populate)) {
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME);            
-        }
-        if (isRequired("name", populate)) {
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredName.MIDDLE_NAME);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredName.PREFIX);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredName.SUFFIX);
-        }
-        if (isRequired("phoneNumbers", populate)) {
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Phone._ID);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Phone.NUMBER);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Phone.TYPE);
-        }
-        if (isRequired("emails", populate)) {
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Email._ID);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Email.DATA);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Email.TYPE);
-        }
-        if (isRequired("addresses", populate)) {
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredPostal._ID);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Organization.TYPE);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredPostal.STREET);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredPostal.CITY);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredPostal.REGION);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredPostal.POSTCODE);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredPostal.COUNTRY);
-        }
-        if (isRequired("organizations", populate)) {
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Organization._ID);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Organization.TYPE);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Organization.DEPARTMENT);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Organization.COMPANY);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Organization.TITLE);
-        }
-        if (isRequired("ims", populate)) {
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Im._ID);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Im.DATA);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Im.TYPE);
-        }
-        if (isRequired("note", populate)) {
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Note.NOTE);
-        }
-        if (isRequired("nickname", populate)) {
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Nickname.NAME);
-        }
-        if (isRequired("urls", populate)) {
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Website._ID);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Website.URL);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Website.TYPE);
-        }
-        if (isRequired("birthday", populate)) {
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Event.START_DATE);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Event.TYPE);
-        }
-        if (isRequired("photos", populate)) {
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Photo._ID);
-        }
-        
-        // Do the id query
-        Cursor c = mApp.getActivity().getContentResolver().query(ContactsContract.Data.CONTENT_URI,
-                columnsToFetch.toArray(new String[] {}),
-                idOptions.getWhere(),
-                idOptions.getWhereArgs(),
-                ContactsContract.Data.CONTACT_ID + " ASC");
-
-        JSONArray contacts = populateContactArray(limit, populate, c);
-        return contacts;
-    }
-
-    /**
-     * A special search that finds one contact by id
-     *
-     * @param id   contact to find by id
-     * @return     a JSONObject representing the contact
-     * @throws JSONException
-     */
-    public JSONObject getContactById(String id) throws JSONException {
-        // Do the id query
-        Cursor c = mApp.getActivity().getContentResolver().query(ContactsContract.Data.CONTENT_URI,
-                null,
-                ContactsContract.Data.CONTACT_ID + " = ? ",
-                new String[] { id },
-                ContactsContract.Data.CONTACT_ID + " ASC");
-
-        JSONArray fields = new JSONArray();
-        fields.put("*");
-
-        HashMap<String, Boolean> populate = buildPopulationSet(fields);
-
-        JSONArray contacts = populateContactArray(1, populate, c);
-
-        if (contacts.length() == 1) {
-            return contacts.getJSONObject(0);
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Creates an array of contacts from the cursor you pass in
-     *
-     * @param limit        max number of contacts for the array
-     * @param populate     whether or not you should populate a certain value
-     * @param c            the cursor
-     * @return             a JSONArray of contacts
-     */
-    private JSONArray populateContactArray(int limit,
-            HashMap<String, Boolean> populate, Cursor c) {
-
-        String contactId = "";
-        String rawId = "";
-        String oldContactId = "";
-        boolean newContact = true;
-        String mimetype = "";
-
-        JSONArray contacts = new JSONArray();
-        JSONObject contact = new JSONObject();
-        JSONArray organizations = new JSONArray();
-        JSONArray addresses = new JSONArray();
-        JSONArray phones = new JSONArray();
-        JSONArray emails = new JSONArray();
-        JSONArray ims = new JSONArray();
-        JSONArray websites = new JSONArray();
-        JSONArray photos = new JSONArray();
-
-        // Column indices
-        int colContactId = c.getColumnIndex(ContactsContract.Data.CONTACT_ID);
-        int colRawContactId = c.getColumnIndex(ContactsContract.Data.RAW_CONTACT_ID);
-        int colMimetype = c.getColumnIndex(ContactsContract.Data.MIMETYPE);
-        int colDisplayName = c.getColumnIndex(ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME);
-        int colNote = c.getColumnIndex(ContactsContract.CommonDataKinds.Note.NOTE);
-        int colNickname = c.getColumnIndex(ContactsContract.CommonDataKinds.Nickname.NAME);
-        int colBirthday = c.getColumnIndex(ContactsContract.CommonDataKinds.Event.START_DATE);
-        int colEventType = c.getColumnIndex(ContactsContract.CommonDataKinds.Event.TYPE);
-
-        if (c.getCount() > 0) {
-            while (c.moveToNext() && (contacts.length() <= (limit - 1))) {
-                try {
-                    contactId = c.getString(colContactId);
-                    rawId = c.getString(colRawContactId);
-
-                    // If we are in the first row set the oldContactId
-                    if (c.getPosition() == 0) {
-                        oldContactId = contactId;
-                    }
-
-                    // When the contact ID changes we need to push the Contact object
-                    // to the array of contacts and create new objects.
-                    if (!oldContactId.equals(contactId)) {
-                        // Populate the Contact object with it's arrays
-                        // and push the contact into the contacts array
-                        contacts.put(populateContact(contact, organizations, addresses, phones,
-                                emails, ims, websites, photos));
-
-                        // Clean up the objects
-                        contact = new JSONObject();
-                        organizations = new JSONArray();
-                        addresses = new JSONArray();
-                        phones = new JSONArray();
-                        emails = new JSONArray();
-                        ims = new JSONArray();
-                        websites = new JSONArray();
-                        photos = new JSONArray();
-
-                        // Set newContact to true as we are starting to populate a new contact
-                        newContact = true;
-                    }
-
-                    // When we detect a new contact set the ID and display name.
-                    // These fields are available in every row in the result set returned.
-                    if (newContact) {
-                        newContact = false;
-                        contact.put("id", contactId);
-                        contact.put("rawId", rawId);
-                    }
-
-                    // Grab the mimetype of the current row as it will be used in a lot of comparisons
-                    mimetype = c.getString(colMimetype);
-                    
-                    if (mimetype.equals(ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE)) {
-                        contact.put("displayName", c.getString(colDisplayName));
-                    }
-
-                    if (mimetype.equals(ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE)
-                            && isRequired("name", populate)) {
-                        contact.put("name", nameQuery(c));
-                    }
-                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE)
-                            && isRequired("phoneNumbers", populate)) {
-                        phones.put(phoneQuery(c));
-                    }
-                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE)
-                            && isRequired("emails", populate)) {
-                        emails.put(emailQuery(c));
-                    }
-                    else if (mimetype.equals(ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE)
-                            && isRequired("addresses", populate)) {
-                        addresses.put(addressQuery(c));
-                    }
-                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE)
-                            && isRequired("organizations", populate)) {
-                        organizations.put(organizationQuery(c));
-                    }
-                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE)
-                            && isRequired("ims", populate)) {
-                        ims.put(imQuery(c));
-                    }
-                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Note.CONTENT_ITEM_TYPE)
-                            && isRequired("note", populate)) {
-                        contact.put("note", c.getString(colNote));
-                    }
-                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Nickname.CONTENT_ITEM_TYPE)
-                            && isRequired("nickname", populate)) {
-                        contact.put("nickname", c.getString(colNickname));
-                    }
-                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Website.CONTENT_ITEM_TYPE)
-                            && isRequired("urls", populate)) {
-                        websites.put(websiteQuery(c));
-                    }
-                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Event.CONTENT_ITEM_TYPE)) {
-                        if (isRequired("birthday", populate) &&
-                                ContactsContract.CommonDataKinds.Event.TYPE_BIRTHDAY == c.getInt(colEventType)) {
-                            contact.put("birthday", c.getString(colBirthday));
-                        }
-                    }
-                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE)
-                            && isRequired("photos", populate)) {
-                        photos.put(photoQuery(c, contactId));
-                    }
-                } catch (JSONException e) {
-                    Log.e(LOG_TAG, e.getMessage(), e);
-                }
-
-                // Set the old contact ID
-                oldContactId = contactId;
-
-            }
-            
-            // Push the last contact into the contacts array
-            if (contacts.length() < limit) {
-                contacts.put(populateContact(contact, organizations, addresses, phones,
-                        emails, ims, websites, photos));
-            }
-        }
-        c.close();
-        return contacts;
-    }
-
-    /**
-     * Builds a where clause all all the ids passed into the method
-     * @param contactIds a set of unique contact ids
-     * @param searchTerm what to search for
-     * @return an object containing the selection and selection args
-     */
-    private WhereOptions buildIdClause(Set<String> contactIds, String searchTerm) {
-        WhereOptions options = new WhereOptions();
-
-        // If the user is searching for every contact then short circuit the method
-        // and return a shorter where clause to be searched.
-        if (searchTerm.equals("%")) {
-            options.setWhere("(" + ContactsContract.Data.CONTACT_ID + " LIKE ? )");
-            options.setWhereArgs(new String[] { searchTerm });
-            return options;
-        }
-
-        // This clause means that there are specific ID's to be populated
-        Iterator<String> it = contactIds.iterator();
-        StringBuffer buffer = new StringBuffer("(");
-
-        while (it.hasNext()) {
-            buffer.append("'" + it.next() + "'");
-            if (it.hasNext()) {
-                buffer.append(",");
-            }
-        }
-        buffer.append(")");
-
-        options.setWhere(ContactsContract.Data.CONTACT_ID + " IN " + buffer.toString());
-        options.setWhereArgs(null);
-
-        return options;
-    }
-
-    /**
-     * Create a new contact using a JSONObject to hold all the data.
-     * @param contact
-     * @param organizations array of organizations
-     * @param addresses array of addresses
-     * @param phones array of phones
-     * @param emails array of emails
-     * @param ims array of instant messenger addresses
-     * @param websites array of websites
-     * @param photos
-     * @return
-     */
-    private JSONObject populateContact(JSONObject contact, JSONArray organizations,
-            JSONArray addresses, JSONArray phones, JSONArray emails,
-            JSONArray ims, JSONArray websites, JSONArray photos) {
-        try {
-            // Only return the array if it has at least one entry
-            if (organizations.length() > 0) {
-                contact.put("organizations", organizations);
-            }
-            if (addresses.length() > 0) {
-                contact.put("addresses", addresses);
-            }
-            if (phones.length() > 0) {
-                contact.put("phoneNumbers", phones);
-            }
-            if (emails.length() > 0) {
-                contact.put("emails", emails);
-            }
-            if (ims.length() > 0) {
-                contact.put("ims", ims);
-            }
-            if (websites.length() > 0) {
-                contact.put("urls", websites);
-            }
-            if (photos.length() > 0) {
-                contact.put("photos", photos);
-            }
-        } catch (JSONException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        }
-        return contact;
-    }
-
-  /**
-   * Take the search criteria passed into the method and create a SQL WHERE clause.
-   * @param fields the properties to search against
-   * @param searchTerm the string to search for
-   * @return an object containing the selection and selection args
-   */
-  private WhereOptions buildWhereClause(JSONArray fields, String searchTerm) {
-
-    ArrayList<String> where = new ArrayList<String>();
-    ArrayList<String> whereArgs = new ArrayList<String>();
-
-    WhereOptions options = new WhereOptions();
-
-        /*
-         * Special case where the user wants all fields returned
-         */
-        if (isWildCardSearch(fields)) {
-            // Get all contacts with all properties
-            if ("%".equals(searchTerm)) {
-                options.setWhere("(" + ContactsContract.Contacts.DISPLAY_NAME + " LIKE ? )");
-                options.setWhereArgs(new String[] { searchTerm });
-                return options;
-            } else {
-                // Get all contacts that match the filter but return all properties
-                where.add("(" + dbMap.get("displayName") + " LIKE ? )");
-                whereArgs.add(searchTerm);
-                where.add("(" + dbMap.get("name") + " LIKE ? AND "
-                        + ContactsContract.Data.MIMETYPE + " = ? )");
-                whereArgs.add(searchTerm);
-                whereArgs.add(ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE);
-                where.add("(" + dbMap.get("nickname") + " LIKE ? AND "
-                        + ContactsContract.Data.MIMETYPE + " = ? )");
-                whereArgs.add(searchTerm);
-                whereArgs.add(ContactsContract.CommonDataKinds.Nickname.CONTENT_ITEM_TYPE);
-                where.add("(" + dbMap.get("phoneNumbers") + " LIKE ? AND "
-                        + ContactsContract.Data.MIMETYPE + " = ? )");
-                whereArgs.add(searchTerm);
-                whereArgs.add(ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE);
-                where.add("(" + dbMap.get("emails") + " LIKE ? AND "
-                        + ContactsContract.Data.MIMETYPE + " = ? )");
-                whereArgs.add(searchTerm);
-                whereArgs.add(ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE);
-                where.add("(" + dbMap.get("addresses") + " LIKE ? AND "
-                        + ContactsContract.Data.MIMETYPE + " = ? )");
-                whereArgs.add(searchTerm);
-                whereArgs.add(ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE);
-                where.add("(" + dbMap.get("ims") + " LIKE ? AND "
-                        + ContactsContract.Data.MIMETYPE + " = ? )");
-                whereArgs.add(searchTerm);
-                whereArgs.add(ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE);
-                where.add("(" + dbMap.get("organizations") + " LIKE ? AND "
-                        + ContactsContract.Data.MIMETYPE + " = ? )");
-                whereArgs.add(searchTerm);
-                whereArgs.add(ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE);
-                where.add("(" + dbMap.get("note") + " LIKE ? AND "
-                        + ContactsContract.Data.MIMETYPE + " = ? )");
-                whereArgs.add(searchTerm);
-                whereArgs.add(ContactsContract.CommonDataKinds.Note.CONTENT_ITEM_TYPE);
-                where.add("(" + dbMap.get("urls") + " LIKE ? AND "
-                        + ContactsContract.Data.MIMETYPE + " = ? )");
-                whereArgs.add(searchTerm);
-                whereArgs.add(ContactsContract.CommonDataKinds.Website.CONTENT_ITEM_TYPE);
-            }
-        }
-
-        /*
-         * Special case for when the user wants all the contacts but
-         */
-        if ("%".equals(searchTerm)) {
-            options.setWhere("(" + ContactsContract.Contacts.DISPLAY_NAME + " LIKE ? )");
-            options.setWhereArgs(new String[] { searchTerm });
-            return options;
-        }
-
-        String key;
-        try {
-            //Log.d(LOG_TAG, "How many fields do we have = " + fields.length());
-            for (int i = 0; i < fields.length(); i++) {
-                key = fields.getString(i);
-
-                if (key.equals("id")) {
-                    where.add("(" + dbMap.get(key) + " = ? )");
-                    whereArgs.add(searchTerm.substring(1, searchTerm.length() - 1));
-                }
-                else if (key.startsWith("displayName")) {
-                    where.add("(" + dbMap.get(key) + " LIKE ? )");
-                    whereArgs.add(searchTerm);
-                }
-                else if (key.startsWith("name")) {
-                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
-                            + ContactsContract.Data.MIMETYPE + " = ? )");
-                    whereArgs.add(searchTerm);
-                    whereArgs.add(ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE);
-                }
-                else if (key.startsWith("nickname")) {
-                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
-                            + ContactsContract.Data.MIMETYPE + " = ? )");
-                    whereArgs.add(searchTerm);
-                    whereArgs.add(ContactsContract.CommonDataKinds.Nickname.CONTENT_ITEM_TYPE);
-                }
-                else if (key.startsWith("phoneNumbers")) {
-                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
-                            + ContactsContract.Data.MIMETYPE + " = ? )");
-                    whereArgs.add(searchTerm);
-                    whereArgs.add(ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE);
-                }
-                else if (key.startsWith("emails")) {
-                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
-                            + ContactsContract.Data.MIMETYPE + " = ? )");
-                    whereArgs.add(searchTerm);
-                    whereArgs.add(ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE);
-                }
-                else if (key.startsWith("addresses")) {
-                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
-                            + ContactsContract.Data.MIMETYPE + " = ? )");
-                    whereArgs.add(searchTerm);
-                    whereArgs.add(ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE);
-                }
-                else if (key.startsWith("ims")) {
-                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
-                            + ContactsContract.Data.MIMETYPE + " = ? )");
-                    whereArgs.add(searchTerm);
-                    whereArgs.add(ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE);
-                }
-                else if (key.startsWith("organizations")) {
-                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
-                            + ContactsContract.Data.MIMETYPE + " = ? )");
-                    whereArgs.add(searchTerm);
-                    whereArgs.add(ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE);
-                }
-                //        else if (key.startsWith("birthday")) {
-//          where.add("(" + dbMap.get(key) + " LIKE ? AND "
-//              + ContactsContract.Data.MIMETYPE + " = ? )");
-//        }
-                else if (key.startsWith("note")) {
-                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
-                            + ContactsContract.Data.MIMETYPE + " = ? )");
-                    whereArgs.add(searchTerm);
-                    whereArgs.add(ContactsContract.CommonDataKinds.Note.CONTENT_ITEM_TYPE);
-                }
-                else if (key.startsWith("urls")) {
-                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
-                            + ContactsContract.Data.MIMETYPE + " = ? )");
-                    whereArgs.add(searchTerm);
-                    whereArgs.add(ContactsContract.CommonDataKinds.Website.CONTENT_ITEM_TYPE);
-                }
-            }
-        } catch (JSONException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        }
-
-        // Creating the where string
-        StringBuffer selection = new StringBuffer();
-        for (int i = 0; i < where.size(); i++) {
-            selection.append(where.get(i));
-            if (i != (where.size() - 1)) {
-                selection.append(" OR ");
-            }
-        }
-        options.setWhere(selection.toString());
-
-        // Creating the where args array
-        String[] selectionArgs = new String[whereArgs.size()];
-        for (int i = 0; i < whereArgs.size(); i++) {
-            selectionArgs[i] = whereArgs.get(i);
-        }
-        options.setWhereArgs(selectionArgs);
-
-        return options;
-    }
-
-    /**
-     * If the user passes in the '*' wildcard character for search then they want all fields for each contact
-     *
-     * @param fields
-     * @return true if wildcard search requested, false otherwise
-     */
-    private boolean isWildCardSearch(JSONArray fields) {
-        // Only do a wildcard search if we are passed ["*"]
-        if (fields.length() == 1) {
-            try {
-                if ("*".equals(fields.getString(0))) {
-                    return true;
-                }
-            } catch (JSONException e) {
-                return false;
-            }
-        }
-        return false;
-    }
-
-    /**
-    * Create a ContactOrganization JSONObject
-    * @param cursor the current database row
-    * @return a JSONObject representing a ContactOrganization
-    */
-    private JSONObject organizationQuery(Cursor cursor) {
-        JSONObject organization = new JSONObject();
-        try {
-            organization.put("id", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Organization._ID)));
-            organization.put("pref", false); // Android does not store pref attribute
-            organization.put("type", getOrgType(cursor.getInt(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Organization.TYPE))));
-            organization.put("department", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Organization.DEPARTMENT)));
-            organization.put("name", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Organization.COMPANY)));
-            organization.put("title", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Organization.TITLE)));
-        } catch (JSONException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        }
-        return organization;
-    }
-
-    /**
-     * Create a ContactAddress JSONObject
-     * @param cursor the current database row
-     * @return a JSONObject representing a ContactAddress
-     */
-    private JSONObject addressQuery(Cursor cursor) {
-        JSONObject address = new JSONObject();
-        try {
-            address.put("id", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal._ID)));
-            address.put("pref", false); // Android does not store pref attribute
-            address.put("type", getAddressType(cursor.getInt(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Organization.TYPE))));
-            address.put("formatted", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS)));
-            address.put("streetAddress", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal.STREET)));
-            address.put("locality", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal.CITY)));
-            address.put("region", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal.REGION)));
-            address.put("postalCode", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal.POSTCODE)));
-            address.put("country", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal.COUNTRY)));
-        } catch (JSONException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        }
-        return address;
-    }
-
-    /**
-     * Create a ContactName JSONObject
-     * @param cursor the current database row
-     * @return a JSONObject representing a ContactName
-     */
-    private JSONObject nameQuery(Cursor cursor) {
-        JSONObject contactName = new JSONObject();
-        try {
-            String familyName = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME));
-            String givenName = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME));
-            String middleName = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredName.MIDDLE_NAME));
-            String honorificPrefix = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredName.PREFIX));
-            String honorificSuffix = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredName.SUFFIX));
-
-            // Create the formatted name
-            StringBuffer formatted = new StringBuffer("");
-            if (honorificPrefix != null) {
-                formatted.append(honorificPrefix + " ");
-            }
-            if (givenName != null) {
-                formatted.append(givenName + " ");
-            }
-            if (middleName != null) {
-                formatted.append(middleName + " ");
-            }
-            if (familyName != null) {
-                formatted.append(familyName);
-            }
-            if (honorificSuffix != null) {
-                formatted.append(" " + honorificSuffix);
-            }
-
-            contactName.put("familyName", familyName);
-            contactName.put("givenName", givenName);
-            contactName.put("middleName", middleName);
-            contactName.put("honorificPrefix", honorificPrefix);
-            contactName.put("honorificSuffix", honorificSuffix);
-            contactName.put("formatted", formatted);
-        } catch (JSONException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        }
-        return contactName;
-    }
-
-    /**
-     * Create a ContactField JSONObject
-     * @param cursor the current database row
-     * @return a JSONObject representing a ContactField
-     */
-    private JSONObject phoneQuery(Cursor cursor) {
-        JSONObject phoneNumber = new JSONObject();
-        try {
-            phoneNumber.put("id", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone._ID)));
-            phoneNumber.put("pref", false); // Android does not store pref attribute
-            phoneNumber.put("value", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER)));
-            phoneNumber.put("type", getPhoneType(cursor.getInt(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.TYPE))));
-        } catch (JSONException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        } catch (Exception excp) {
-            Log.e(LOG_TAG, excp.getMessage(), excp);
-        }
-        return phoneNumber;
-    }
-
-    /**
-     * Create a ContactField JSONObject
-     * @param cursor the current database row
-     * @return a JSONObject representing a ContactField
-     */
-    private JSONObject emailQuery(Cursor cursor) {
-        JSONObject email = new JSONObject();
-        try {
-            email.put("id", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Email._ID)));
-            email.put("pref", false); // Android does not store pref attribute
-            email.put("value", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Email.DATA)));
-            email.put("type", getContactType(cursor.getInt(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Email.TYPE))));
-        } catch (JSONException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        }
-        return email;
-    }
-
-    /**
-     * Create a ContactField JSONObject
-     * @param cursor the current database row
-     * @return a JSONObject representing a ContactField
-     */
-    private JSONObject imQuery(Cursor cursor) {
-        JSONObject im = new JSONObject();
-        try {
-            im.put("id", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Im._ID)));
-            im.put("pref", false); // Android does not store pref attribute
-            im.put("value", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Im.DATA)));
-            im.put("type", getImType(cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Im.PROTOCOL))));
-        } catch (JSONException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        }
-        return im;
-    }
-
-    /**
-     * Create a ContactField JSONObject
-     * @param cursor the current database row
-     * @return a JSONObject representing a ContactField
-     */
-    private JSONObject websiteQuery(Cursor cursor) {
-        JSONObject website = new JSONObject();
-        try {
-            website.put("id", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Website._ID)));
-            website.put("pref", false); // Android does not store pref attribute
-            website.put("value", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Website.URL)));
-            website.put("type", getContactType(cursor.getInt(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Website.TYPE))));
-        } catch (JSONException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        }
-        return website;
-    }
-
-    /**
-     * Create a ContactField JSONObject
-     * @param contactId
-     * @return a JSONObject representing a ContactField
-     */
-    private JSONObject photoQuery(Cursor cursor, String contactId) {
-        JSONObject photo = new JSONObject();
-        try {
-            photo.put("id", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Photo._ID)));
-            photo.put("pref", false);
-            photo.put("type", "url");
-            Uri person = ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI, (new Long(contactId)));
-            Uri photoUri = Uri.withAppendedPath(person, ContactsContract.Contacts.Photo.CONTENT_DIRECTORY);
-            photo.put("value", photoUri.toString());
-        } catch (JSONException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        }
-        return photo;
-    }
-
-    @Override
-    /**
-     * This method will save a contact object into the devices contacts database.
-     *
-     * @param contact the contact to be saved.
-     * @returns the id if the contact is successfully saved, null otherwise.
-     */
-    public String save(JSONObject contact) {
-        AccountManager mgr = AccountManager.get(mApp.getActivity());
-        Account[] accounts = mgr.getAccounts();
-        String accountName = null;
-        String accountType = null;
-
-        if (accounts.length == 1) {
-            accountName = accounts[0].name;
-            accountType = accounts[0].type;
-        }
-        else if (accounts.length > 1) {
-            for (Account a : accounts) {
-                if (a.type.contains("eas") && a.name.matches(EMAIL_REGEXP)) /*Exchange ActiveSync*/{
-                    accountName = a.name;
-                    accountType = a.type;
-                    break;
-                }
-            }
-            if (accountName == null) {
-                for (Account a : accounts) {
-                    if (a.type.contains("com.google") && a.name.matches(EMAIL_REGEXP)) /*Google sync provider*/{
-                        accountName = a.name;
-                        accountType = a.type;
-                        break;
-                    }
-                }
-            }
-            if (accountName == null) {
-                for (Account a : accounts) {
-                    if (a.name.matches(EMAIL_REGEXP)) /*Last resort, just look for an email address...*/{
-                        accountName = a.name;
-                        accountType = a.type;
-                        break;
-                    }
-                }
-            }
-        }
-
-        String id = getJsonString(contact, "id");
-        if (id == null) {
-            // Create new contact
-            return createNewContact(contact, accountType, accountName);
-        } else {
-            // Modify existing contact
-            return modifyContact(id, contact, accountType, accountName);
-        }
-    }
-
-    /**
-     * Creates a new contact and stores it in the database
-     *
-     * @param id the raw contact id which is required for linking items to the contact
-     * @param contact the contact to be saved
-     * @param account the account to be saved under
-     */
-    private String modifyContact(String id, JSONObject contact, String accountType, String accountName) {
-        // Get the RAW_CONTACT_ID which is needed to insert new values in an already existing contact.
-        // But not needed to update existing values.
-        int rawId = (new Integer(getJsonString(contact, "rawId"))).intValue();
-
-        // Create a list of attributes to add to the contact database
-        ArrayList<ContentProviderOperation> ops = new ArrayList<ContentProviderOperation>();
-
-        //Add contact type
-        ops.add(ContentProviderOperation.newUpdate(ContactsContract.RawContacts.CONTENT_URI)
-                .withValue(ContactsContract.RawContacts.ACCOUNT_TYPE, accountType)
-                .withValue(ContactsContract.RawContacts.ACCOUNT_NAME, accountName)
-                .build());
-
-        // Modify name
-        JSONObject name;
-        try {
-            String displayName = getJsonString(contact, "displayName");
-            name = contact.getJSONObject("name");
-            if (displayName != null || name != null) {
-                ContentProviderOperation.Builder builder = ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
-                        .withSelection(ContactsContract.Data.CONTACT_ID + "=? AND " +
-                                ContactsContract.Data.MIMETYPE + "=?",
-                                new String[] { id, ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE });
-
-                if (displayName != null) {
-                    builder.withValue(ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME, displayName);
-                }
-
-                String familyName = getJsonString(name, "familyName");
-                if (familyName != null) {
-                    builder.withValue(ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME, familyName);
-                }
-                String middleName = getJsonString(name, "middleName");
-                if (middleName != null) {
-                    builder.withValue(ContactsContract.CommonDataKinds.StructuredName.MIDDLE_NAME, middleName);
-                }
-                String givenName = getJsonString(name, "givenName");
-                if (givenName != null) {
-                    builder.withValue(ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME, givenName);
-                }
-                String honorificPrefix = getJsonString(name, "honorificPrefix");
-                if (honorificPrefix != null) {
-                    builder.withValue(ContactsContract.CommonDataKinds.StructuredName.PREFIX, honorificPrefix);
-                }
-                String honorificSuffix = getJsonString(name, "honorificSuffix");
-                if (honorificSuffix != null) {
-                    builder.withValue(ContactsContract.CommonDataKinds.StructuredName.SUFFIX, honorificSuffix);
-                }
-
-                ops.add(builder.build());
-            }
-        } catch (JSONException e1) {
-            Log.d(LOG_TAG, "Could not get name");
-        }
-
-        // Modify phone numbers
-        JSONArray phones = null;
-        try {
-            phones = contact.getJSONArray("phoneNumbers");
-            if (phones != null) {
-                // Delete all the phones
-                if (phones.length() == 0) {
-                    ops.add(ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI)
-                            .withSelection(ContactsContract.Data.RAW_CONTACT_ID + "=? AND " +
-                                    ContactsContract.Data.MIMETYPE + "=?",
-                                    new String[] { "" + rawId, ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE })
-                            .build());
-                }
-                // Modify or add a phone
-                else {
-                    for (int i = 0; i < phones.length(); i++) {
-                        JSONObject phone = (JSONObject) phones.get(i);
-                        String phoneId = getJsonString(phone, "id");
-                        // This is a new phone so do a DB insert
-                        if (phoneId == null) {
-                            ContentValues contentValues = new ContentValues();
-                            contentValues.put(ContactsContract.Data.RAW_CONTACT_ID, rawId);
-                            contentValues.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE);
-                            contentValues.put(ContactsContract.CommonDataKinds.Phone.NUMBER, getJsonString(phone, "value"));
-                            contentValues.put(ContactsContract.CommonDataKinds.Phone.TYPE, getPhoneType(getJsonString(phone, "type")));
-
-                            ops.add(ContentProviderOperation.newInsert(
-                                    ContactsContract.Data.CONTENT_URI).withValues(contentValues).build());
-                        }
-                        // This is an existing phone so do a DB update
-                        else {
-                            ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
-                                    .withSelection(ContactsContract.CommonDataKinds.Phone._ID + "=? AND " +
-                                            ContactsContract.Data.MIMETYPE + "=?",
-                                            new String[] { phoneId, ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE })
-                                    .withValue(ContactsContract.CommonDataKinds.Phone.NUMBER, getJsonString(phone, "value"))
-                                    .withValue(ContactsContract.CommonDataKinds.Phone.TYPE, getPhoneType(getJsonString(phone, "type")))
-                                    .build());
-                        }
-                    }
-                }
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get phone numbers");
-        }
-
-        // Modify emails
-        JSONArray emails = null;
-        try {
-            emails = contact.getJSONArray("emails");
-            if (emails != null) {
-                // Delete all the emails
-                if (emails.length() == 0) {
-                    ops.add(ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI)
-                            .withSelection(ContactsContract.Data.RAW_CONTACT_ID + "=? AND " +
-                                    ContactsContract.Data.MIMETYPE + "=?",
-                                    new String[] { "" + rawId, ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE })
-                            .build());
-                }
-                // Modify or add a email
-                else {
-                    for (int i = 0; i < emails.length(); i++) {
-                        JSONObject email = (JSONObject) emails.get(i);
-                        String emailId = getJsonString(email, "id");
-                        // This is a new email so do a DB insert
-                        if (emailId == null) {
-                            ContentValues contentValues = new ContentValues();
-                            contentValues.put(ContactsContract.Data.RAW_CONTACT_ID, rawId);
-                            contentValues.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE);
-                            contentValues.put(ContactsContract.CommonDataKinds.Email.DATA, getJsonString(email, "value"));
-                            contentValues.put(ContactsContract.CommonDataKinds.Email.TYPE, getContactType(getJsonString(email, "type")));
-
-                            ops.add(ContentProviderOperation.newInsert(
-                                    ContactsContract.Data.CONTENT_URI).withValues(contentValues).build());
-                        }
-                        // This is an existing email so do a DB update
-                        else {
-                        	String emailValue=getJsonString(email, "value");
-                        	if(!emailValue.isEmpty()) {
-                                ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
-                                    .withSelection(ContactsContract.CommonDataKinds.Email._ID + "=? AND " +
-                                            ContactsContract.Data.MIMETYPE + "=?",
-                                            new String[] { emailId, ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE })
-                                    .withValue(ContactsContract.CommonDataKinds.Email.DATA, getJsonString(email, "value"))
-                                    .withValue(ContactsContract.CommonDataKinds.Email.TYPE, getContactType(getJsonString(email, "type")))
-                                    .build());
-                        	} else {
-                                ops.add(ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI)
-                                        .withSelection(ContactsContract.CommonDataKinds.Email._ID + "=? AND " +
-                                                ContactsContract.Data.MIMETYPE + "=?",
-                                                new String[] { emailId, ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE })
-                                        .build());
-                        	}
-                        }
-                    }
-                }
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get emails");
-        }
-
-        // Modify addresses
-        JSONArray addresses = null;
-        try {
-            addresses = contact.getJSONArray("addresses");
-            if (addresses != null) {
-                // Delete all the addresses
-                if (addresses.length() == 0) {
-                    ops.add(ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI)
-                            .withSelection(ContactsContract.Data.RAW_CONTACT_ID + "=? AND " +
-                                    ContactsContract.Data.MIMETYPE + "=?",
-                                    new String[] { "" + rawId, ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE })
-                            .build());
-                }
-                // Modify or add a address
-                else {
-                    for (int i = 0; i < addresses.length(); i++) {
-                        JSONObject address = (JSONObject) addresses.get(i);
-                        String addressId = getJsonString(address, "id");
-                        // This is a new address so do a DB insert
-                        if (addressId == null) {
-                            ContentValues contentValues = new ContentValues();
-                            contentValues.put(ContactsContract.Data.RAW_CONTACT_ID, rawId);
-                            contentValues.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE);
-                            contentValues.put(ContactsContract.CommonDataKinds.StructuredPostal.TYPE, getAddressType(getJsonString(address, "type")));
-                            contentValues.put(ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS, getJsonString(address, "formatted"));
-                            contentValues.put(ContactsContract.CommonDataKinds.StructuredPostal.STREET, getJsonString(address, "streetAddress"));
-                            contentValues.put(ContactsContract.CommonDataKinds.StructuredPostal.CITY, getJsonString(address, "locality"));
-                            contentValues.put(ContactsContract.CommonDataKinds.StructuredPostal.REGION, getJsonString(address, "region"));
-                            contentValues.put(ContactsContract.CommonDataKinds.StructuredPostal.POSTCODE, getJsonString(address, "postalCode"));
-                            contentValues.put(ContactsContract.CommonDataKinds.StructuredPostal.COUNTRY, getJsonString(address, "country"));
-
-                            ops.add(ContentProviderOperation.newInsert(
-                                    ContactsContract.Data.CONTENT_URI).withValues(contentValues).build());
-                        }
-                        // This is an existing address so do a DB update
-                        else {
-                            ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
-                                    .withSelection(ContactsContract.CommonDataKinds.StructuredPostal._ID + "=? AND " +
-                                            ContactsContract.Data.MIMETYPE + "=?",
-                                            new String[] { addressId, ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE })
-                                    .withValue(ContactsContract.CommonDataKinds.StructuredPostal.TYPE, getAddressType(getJsonString(address, "type")))
-                                    .withValue(ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS, getJsonString(address, "formatted"))
-                                    .withValue(ContactsContract.CommonDataKinds.StructuredPostal.STREET, getJsonString(address, "streetAddress"))
-                                    .withValue(ContactsContract.CommonDataKinds.StructuredPostal.CITY, getJsonString(address, "locality"))
-                                    .withValue(ContactsContract.CommonDataKinds.StructuredPostal.REGION, getJsonString(address, "region"))
-                                    .withValue(ContactsContract.CommonDataKinds.StructuredPostal.POSTCODE, getJsonString(address, "postalCode"))
-                                    .withValue(ContactsContract.CommonDataKinds.StructuredPostal.COUNTRY, getJsonString(address, "country"))
-                                    .build());
-                        }
-                    }
-                }
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get addresses");
-        }
-
-        // Modify organizations
-        JSONArray organizations = null;
-        try {
-            organizations = contact.getJSONArray("organizations");
-            if (organizations != null) {
-                // Delete all the organizations
-                if (organizations.length() == 0) {
-                    ops.add(ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI)
-                            .withSelection(ContactsContract.Data.RAW_CONTACT_ID + "=? AND " +
-                                    ContactsContract.Data.MIMETYPE + "=?",
-                                    new String[] { "" + rawId, ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE })
-                            .build());
-                }
-                // Modify or add a organization
-                else {
-                    for (int i = 0; i < organizations.length(); i++) {
-                        JSONObject org = (JSONObject) organizations.get(i);
-                        String orgId = getJsonString(org, "id");
-                        // This is a new organization so do a DB insert
-                        if (orgId == null) {
-                            ContentValues contentValues = new ContentValues();
-                            contentValues.put(ContactsContract.Data.RAW_CONTACT_ID, rawId);
-                            contentValues.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE);
-                            contentValues.put(ContactsContract.CommonDataKinds.Organization.TYPE, getOrgType(getJsonString(org, "type")));
-                            contentValues.put(ContactsContract.CommonDataKinds.Organization.DEPARTMENT, getJsonString(org, "department"));
-                            contentValues.put(ContactsContract.CommonDataKinds.Organization.COMPANY, getJsonString(org, "name"));
-                            contentValues.put(ContactsContract.CommonDataKinds.Organization.TITLE, getJsonString(org, "title"));
-
-                            ops.add(ContentProviderOperation.newInsert(
-                                    ContactsContract.Data.CONTENT_URI).withValues(contentValues).build());
-                        }
-                        // This is an existing organization so do a DB update
-                        else {
-                            ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
-                                    .withSelection(ContactsContract.CommonDataKinds.Organization._ID + "=? AND " +
-                                            ContactsContract.Data.MIMETYPE + "=?",
-                                            new String[] { orgId, ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE })
-                                    .withValue(ContactsContract.CommonDataKinds.Organization.TYPE, getOrgType(getJsonString(org, "type")))
-                                    .withValue(ContactsContract.CommonDataKinds.Organization.DEPARTMENT, getJsonString(org, "department"))
-                                    .withValue(ContactsContract.CommonDataKinds.Organization.COMPANY, getJsonString(org, "name"))
-                                    .withValue(ContactsContract.CommonDataKinds.Organization.TITLE, getJsonString(org, "title"))
-                                    .build());
-                        }
-                    }
-                }
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get organizations");
-        }
-
-        // Modify IMs
-        JSONArray ims = null;
-        try {
-            ims = contact.getJSONArray("ims");
-            if (ims != null) {
-                // Delete all the ims
-                if (ims.length() == 0) {
-                    ops.add(ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI)
-                            .withSelection(ContactsContract.Data.RAW_CONTACT_ID + "=? AND " +
-                                    ContactsContract.Data.MIMETYPE + "=?",
-                                    new String[] { "" + rawId, ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE })
-                            .build());
-                }
-                // Modify or add a im
-                else {
-                    for (int i = 0; i < ims.length(); i++) {
-                        JSONObject im = (JSONObject) ims.get(i);
-                        String imId = getJsonString(im, "id");
-                        // This is a new IM so do a DB insert
-                        if (imId == null) {
-                            ContentValues contentValues = new ContentValues();
-                            contentValues.put(ContactsContract.Data.RAW_CONTACT_ID, rawId);
-                            contentValues.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE);
-                            contentValues.put(ContactsContract.CommonDataKinds.Im.DATA, getJsonString(im, "value"));
-                            contentValues.put(ContactsContract.CommonDataKinds.Im.TYPE, getImType(getJsonString(im, "type")));
-
-                            ops.add(ContentProviderOperation.newInsert(
-                                    ContactsContract.Data.CONTENT_URI).withValues(contentValues).build());
-                        }
-                        // This is an existing IM so do a DB update
-                        else {
-                            ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
-                                    .withSelection(ContactsContract.CommonDataKinds.Im._ID + "=? AND " +
-                                            ContactsContract.Data.MIMETYPE + "=?",
-                                            new String[] { imId, ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE })
-                                    .withValue(ContactsContract.CommonDataKinds.Im.DATA, getJsonString(im, "value"))
-                                    .withValue(ContactsContract.CommonDataKinds.Im.TYPE, getContactType(getJsonString(im, "type")))
-                                    .build());
-                        }
-                    }
-                }
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get emails");
-        }
-
-        // Modify note
-        String note = getJsonString(contact, "note");
-        ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
-                .withSelection(ContactsContract.Data.CONTACT_ID + "=? AND " +
-                        ContactsContract.Data.MIMETYPE + "=?",
-                        new String[] { id, ContactsContract.CommonDataKinds.Note.CONTENT_ITEM_TYPE })
-                .withValue(ContactsContract.CommonDataKinds.Note.NOTE, note)
-                .build());
-
-        // Modify nickname
-        String nickname = getJsonString(contact, "nickname");
-        if (nickname != null) {
-            ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
-                    .withSelection(ContactsContract.Data.CONTACT_ID + "=? AND " +
-                            ContactsContract.Data.MIMETYPE + "=?",
-                            new String[] { id, ContactsContract.CommonDataKinds.Nickname.CONTENT_ITEM_TYPE })
-                    .withValue(ContactsContract.CommonDataKinds.Nickname.NAME, nickname)
-                    .build());
-        }
-
-        // Modify urls
-        JSONArray websites = null;
-        try {
-            websites = contact.getJSONArray("urls");
-            if (websites != null) {
-                // Delete all the websites
-                if (websites.length() == 0) {
-                    Log.d(LOG_TAG, "This means we should be deleting all the phone numbers.");
-                    ops.add(ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI)
-                            .withSelection(ContactsContract.Data.RAW_CONTACT_ID + "=? AND " +
-                                    ContactsContract.Data.MIMETYPE + "=?",
-                                    new String[] { "" + rawId, ContactsContract.CommonDataKinds.Website.CONTENT_ITEM_TYPE })
-                            .build());
-                }
-                // Modify or add a website
-                else {
-                    for (int i = 0; i < websites.length(); i++) {
-                        JSONObject website = (JSONObject) websites.get(i);
-                        String websiteId = getJsonString(website, "id");
-                        // This is a new website so do a DB insert
-                        if (websiteId == null) {
-                            ContentValues contentValues = new ContentValues();
-                            contentValues.put(ContactsContract.Data.RAW_CONTACT_ID, rawId);
-                            contentValues.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Website.CONTENT_ITEM_TYPE);
-                            contentValues.put(ContactsContract.CommonDataKinds.Website.DATA, getJsonString(website, "value"));
-                            contentValues.put(ContactsContract.CommonDataKinds.Website.TYPE, getContactType(getJsonString(website, "type")));
-
-                            ops.add(ContentProviderOperation.newInsert(
-                                    ContactsContract.Data.CONTENT_URI).withValues(contentValues).build());
-                        }
-                        // This is an existing website so do a DB update
-                        else {
-                            ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
-                                    .withSelection(ContactsContract.CommonDataKinds.Website._ID + "=? AND " +
-                                            ContactsContract.Data.MIMETYPE + "=?",
-                                            new String[] { websiteId, ContactsContract.CommonDataKinds.Website.CONTENT_ITEM_TYPE })
-                                    .withValue(ContactsContract.CommonDataKinds.Website.DATA, getJsonString(website, "value"))
-                                    .withValue(ContactsContract.CommonDataKinds.Website.TYPE, getContactType(getJsonString(website, "type")))
-                                    .build());
-                        }
-                    }
-                }
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get websites");
-        }
-
-        // Modify birthday
-        String birthday = getJsonString(contact, "birthday");
-        if (birthday != null) {
-            ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
-                    .withSelection(ContactsContract.Data.CONTACT_ID + "=? AND " +
-                            ContactsContract.Data.MIMETYPE + "=? AND " +
-                            ContactsContract.CommonDataKinds.Event.TYPE + "=?",
-                            new String[] { id, ContactsContract.CommonDataKinds.Event.CONTENT_ITEM_TYPE, new String("" + ContactsContract.CommonDataKinds.Event.TYPE_BIRTHDAY) })
-                    .withValue(ContactsContract.CommonDataKinds.Event.TYPE, ContactsContract.CommonDataKinds.Event.TYPE_BIRTHDAY)
-                    .withValue(ContactsContract.CommonDataKinds.Event.START_DATE, birthday)
-                    .build());
-        }
-
-        // Modify photos
-        JSONArray photos = null;
-        try {
-            photos = contact.getJSONArray("photos");
-            if (photos != null) {
-                // Delete all the photos
-                if (photos.length() == 0) {
-                    ops.add(ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI)
-                            .withSelection(ContactsContract.Data.RAW_CONTACT_ID + "=? AND " +
-                                    ContactsContract.Data.MIMETYPE + "=?",
-                                    new String[] { "" + rawId, ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE })
-                            .build());
-                }
-                // Modify or add a photo
-                else {
-                    for (int i = 0; i < photos.length(); i++) {
-                        JSONObject photo = (JSONObject) photos.get(i);
-                        String photoId = getJsonString(photo, "id");
-                        byte[] bytes = getPhotoBytes(getJsonString(photo, "value"));
-                        // This is a new photo so do a DB insert
-                        if (photoId == null) {
-                            ContentValues contentValues = new ContentValues();
-                            contentValues.put(ContactsContract.Data.RAW_CONTACT_ID, rawId);
-                            contentValues.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE);
-                            contentValues.put(ContactsContract.Data.IS_SUPER_PRIMARY, 1);
-                            contentValues.put(ContactsContract.CommonDataKinds.Photo.PHOTO, bytes);
-
-                            ops.add(ContentProviderOperation.newInsert(
-                                    ContactsContract.Data.CONTENT_URI).withValues(contentValues).build());
-                        }
-                        // This is an existing photo so do a DB update
-                        else {
-                            ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
-                                    .withSelection(ContactsContract.CommonDataKinds.Photo._ID + "=? AND " +
-                                            ContactsContract.Data.MIMETYPE + "=?",
-                                            new String[] { photoId, ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE })
-                                    .withValue(ContactsContract.Data.IS_SUPER_PRIMARY, 1)
-                                    .withValue(ContactsContract.CommonDataKinds.Photo.PHOTO, bytes)
-                                    .build());
-                        }
-                    }
-                }
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get photos");
-        }
-
-        boolean retVal = true;
-
-        //Modify contact
-        try {
-            mApp.getActivity().getContentResolver().applyBatch(ContactsContract.AUTHORITY, ops);
-        } catch (RemoteException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-            Log.e(LOG_TAG, Log.getStackTraceString(e), e);
-            retVal = false;
-        } catch (OperationApplicationException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-            Log.e(LOG_TAG, Log.getStackTraceString(e), e);
-            retVal = false;
-        }
-
-        // if the save was a success return the contact ID
-        if (retVal) {
-            return id;
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Add a website to a list of database actions to be performed
-     *
-     * @param ops the list of database actions
-     * @param website the item to be inserted
-     */
-    private void insertWebsite(ArrayList<ContentProviderOperation> ops,
-            JSONObject website) {
-        ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
-                .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
-                .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Website.CONTENT_ITEM_TYPE)
-                .withValue(ContactsContract.CommonDataKinds.Website.DATA, getJsonString(website, "value"))
-                .withValue(ContactsContract.CommonDataKinds.Website.TYPE, getContactType(getJsonString(website, "type")))
-                .build());
-    }
-
-    /**
-     * Add an im to a list of database actions to be performed
-     *
-     * @param ops the list of database actions
-     * @param im the item to be inserted
-     */
-    private void insertIm(ArrayList<ContentProviderOperation> ops, JSONObject im) {
-        ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
-                .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
-                .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE)
-                .withValue(ContactsContract.CommonDataKinds.Im.DATA, getJsonString(im, "value"))
-                .withValue(ContactsContract.CommonDataKinds.Im.TYPE, getImType(getJsonString(im, "type")))
-                .build());
-    }
-
-    /**
-     * Add an organization to a list of database actions to be performed
-     *
-     * @param ops the list of database actions
-     * @param org the item to be inserted
-     */
-    private void insertOrganization(ArrayList<ContentProviderOperation> ops,
-            JSONObject org) {
-        ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
-                .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
-                .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE)
-                .withValue(ContactsContract.CommonDataKinds.Organization.TYPE, getOrgType(getJsonString(org, "type")))
-                .withValue(ContactsContract.CommonDataKinds.Organization.DEPARTMENT, getJsonString(org, "department"))
-                .withValue(ContactsContract.CommonDataKinds.Organization.COMPANY, getJsonString(org, "name"))
-                .withValue(ContactsContract.CommonDataKinds.Organization.TITLE, getJsonString(org, "title"))
-                .build());
-    }
-
-    /**
-     * Add an address to a list of database actions to be performed
-     *
-     * @param ops the list of database actions
-     * @param address the item to be inserted
-     */
-    private void insertAddress(ArrayList<ContentProviderOperation> ops,
-            JSONObject address) {
-        ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
-                .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
-                .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE)
-                .withValue(ContactsContract.CommonDataKinds.StructuredPostal.TYPE, getAddressType(getJsonString(address, "type")))
-                .withValue(ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS, getJsonString(address, "formatted"))
-                .withValue(ContactsContract.CommonDataKinds.StructuredPostal.STREET, getJsonString(address, "streetAddress"))
-                .withValue(ContactsContract.CommonDataKinds.StructuredPostal.CITY, getJsonString(address, "locality"))
-                .withValue(ContactsContract.CommonDataKinds.StructuredPostal.REGION, getJsonString(address, "region"))
-                .withValue(ContactsContract.CommonDataKinds.StructuredPostal.POSTCODE, getJsonString(address, "postalCode"))
-                .withValue(ContactsContract.CommonDataKinds.StructuredPostal.COUNTRY, getJsonString(address, "country"))
-                .build());
-    }
-
-    /**
-     * Add an email to a list of database actions to be performed
-     *
-     * @param ops the list of database actions
-     * @param email the item to be inserted
-     */
-    private void insertEmail(ArrayList<ContentProviderOperation> ops,
-            JSONObject email) {
-        ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
-                .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
-                .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE)
-                .withValue(ContactsContract.CommonDataKinds.Email.DATA, getJsonString(email, "value"))
-                .withValue(ContactsContract.CommonDataKinds.Email.TYPE, getContactType(getJsonString(email, "type")))
-                .build());
-    }
-
-    /**
-     * Add a phone to a list of database actions to be performed
-     *
-     * @param ops the list of database actions
-     * @param phone the item to be inserted
-     */
-    private void insertPhone(ArrayList<ContentProviderOperation> ops,
-            JSONObject phone) {
-        ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
-                .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
-                .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE)
-                .withValue(ContactsContract.CommonDataKinds.Phone.NUMBER, getJsonString(phone, "value"))
-                .withValue(ContactsContract.CommonDataKinds.Phone.TYPE, getPhoneType(getJsonString(phone, "type")))
-                .build());
-    }
-
-    /**
-     * Add a phone to a list of database actions to be performed
-     *
-     * @param ops the list of database actions
-     * @param phone the item to be inserted
-     */
-    private void insertPhoto(ArrayList<ContentProviderOperation> ops,
-            JSONObject photo) {
-        byte[] bytes = getPhotoBytes(getJsonString(photo, "value"));
-        ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
-                .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
-                .withValue(ContactsContract.Data.IS_SUPER_PRIMARY, 1)
-                .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE)
-                .withValue(ContactsContract.CommonDataKinds.Photo.PHOTO, bytes)
-                .build());
-    }
-
-    /**
-     * Gets the raw bytes from the supplied filename
-     *
-     * @param filename the file to read the bytes from
-     * @return a byte array
-     * @throws IOException
-     */
-    private byte[] getPhotoBytes(String filename) {
-        ByteArrayOutputStream buffer = new ByteArrayOutputStream();
-        try {
-            int bytesRead = 0;
-            long totalBytesRead = 0;
-            byte[] data = new byte[8192];
-            InputStream in = getPathFromUri(filename);
-
-            while ((bytesRead = in.read(data, 0, data.length)) != -1 && totalBytesRead <= MAX_PHOTO_SIZE) {
-                buffer.write(data, 0, bytesRead);
-                totalBytesRead += bytesRead;
-            }
-
-            in.close();
-            buffer.flush();
-        } catch (FileNotFoundException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        } catch (IOException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        }
-        return buffer.toByteArray();
-    }
-
-    /**
-       * Get an input stream based on file path or uri content://, http://, file://
-       *
-       * @param path
-       * @return an input stream
-     * @throws IOException
-       */
-    private InputStream getPathFromUri(String path) throws IOException {
-        if (path.startsWith("content:")) {
-            Uri uri = Uri.parse(path);
-            return mApp.getActivity().getContentResolver().openInputStream(uri);
-        }
-        if (path.startsWith("http:") || path.startsWith("https:") || path.startsWith("file:")) {
-            URL url = new URL(path);
-            return url.openStream();
-        }
-        else {
-            return new FileInputStream(path);
-        }
-    }
-
-    /**
-     * Creates a new contact and stores it in the database
-     *
-     * @param contact the contact to be saved
-     * @param account the account to be saved under
-     */
-    private String createNewContact(JSONObject contact, String accountType, String accountName) {
-        // Create a list of attributes to add to the contact database
-        ArrayList<ContentProviderOperation> ops = new ArrayList<ContentProviderOperation>();
-
-        //Add contact type
-        ops.add(ContentProviderOperation.newInsert(ContactsContract.RawContacts.CONTENT_URI)
-                .withValue(ContactsContract.RawContacts.ACCOUNT_TYPE, accountType)
-                .withValue(ContactsContract.RawContacts.ACCOUNT_NAME, accountName)
-                .build());
-
-        // Add name
-        try {
-            JSONObject name = contact.optJSONObject("name");
-            String displayName = contact.getString("displayName");
-            if (displayName != null || name != null) {
-                ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
-                        .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
-                        .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE)
-                        .withValue(ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME, displayName)
-                        .withValue(ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME, getJsonString(name, "familyName"))
-                        .withValue(ContactsContract.CommonDataKinds.StructuredName.MIDDLE_NAME, getJsonString(name, "middleName"))
-                        .withValue(ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME, getJsonString(name, "givenName"))
-                        .withValue(ContactsContract.CommonDataKinds.StructuredName.PREFIX, getJsonString(name, "honorificPrefix"))
-                        .withValue(ContactsContract.CommonDataKinds.StructuredName.SUFFIX, getJsonString(name, "honorificSuffix"))
-                        .build());
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get name object");
-        }
-
-        //Add phone numbers
-        JSONArray phones = null;
-        try {
-            phones = contact.getJSONArray("phoneNumbers");
-            if (phones != null) {
-                for (int i = 0; i < phones.length(); i++) {
-                    JSONObject phone = (JSONObject) phones.get(i);
-                    insertPhone(ops, phone);
-                }
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get phone numbers");
-        }
-
-        // Add emails
-        JSONArray emails = null;
-        try {
-            emails = contact.getJSONArray("emails");
-            if (emails != null) {
-                for (int i = 0; i < emails.length(); i++) {
-                    JSONObject email = (JSONObject) emails.get(i);
-                    insertEmail(ops, email);
-                }
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get emails");
-        }
-
-        // Add addresses
-        JSONArray addresses = null;
-        try {
-            addresses = contact.getJSONArray("addresses");
-            if (addresses != null) {
-                for (int i = 0; i < addresses.length(); i++) {
-                    JSONObject address = (JSONObject) addresses.get(i);
-                    insertAddress(ops, address);
-                }
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get addresses");
-        }
-
-        // Add organizations
-        JSONArray organizations = null;
-        try {
-            organizations = contact.getJSONArray("organizations");
-            if (organizations != null) {
-                for (int i = 0; i < organizations.length(); i++) {
-                    JSONObject org = (JSONObject) organizations.get(i);
-                    insertOrganization(ops, org);
-                }
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get organizations");
-        }
-
-        // Add IMs
-        JSONArray ims = null;
-        try {
-            ims = contact.getJSONArray("ims");
-            if (ims != null) {
-                for (int i = 0; i < ims.length(); i++) {
-                    JSONObject im = (JSONObject) ims.get(i);
-                    insertIm(ops, im);
-                }
-            }
-        } catch (JS

<TRUNCATED>

[40/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContacts.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContacts.m b/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContacts.m
new file mode 100644
index 0000000..3ca3e81
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContacts.m
@@ -0,0 +1,593 @@
+/*
+ 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.
+ */
+
+#import "CDVContacts.h"
+#import <UIKit/UIKit.h>
+#import <Cordova/NSArray+Comparisons.h>
+#import <Cordova/NSDictionary+Extensions.h>
+//#import "CDVNotification.h"
+
+@implementation CDVContactsPicker
+
+@synthesize allowsEditing;
+@synthesize callbackId;
+@synthesize options;
+@synthesize pickedContactDictionary;
+
+@end
+@implementation CDVNewContactsController
+
+@synthesize callbackId;
+
+@end
+
+@implementation CDVContacts
+
+// no longer used since code gets AddressBook for each operation.
+// If address book changes during save or remove operation, may get error but not much we can do about it
+// If address book changes during UI creation, display or edit, we don't control any saves so no need for callback
+
+/*void addressBookChanged(ABAddressBookRef addressBook, CFDictionaryRef info, void* context)
+{
+    // note that this function is only called when another AddressBook instance modifies
+    // the address book, not the current one. For example, through an OTA MobileMe sync
+    Contacts* contacts = (Contacts*)context;
+    [contacts addressBookDirty];
+    }*/
+
+- (CDVPlugin*)initWithWebView:(UIWebView*)theWebView
+{
+    self = (CDVContacts*)[super initWithWebView:(UIWebView*)theWebView];
+
+    /*if (self) {
+        addressBook = ABAddressBookCreate();
+        ABAddressBookRegisterExternalChangeCallback(addressBook, addressBookChanged, self);
+    }*/
+
+    return self;
+}
+
+// overridden to clean up Contact statics
+- (void)onAppTerminate
+{
+    // NSLog(@"Contacts::onAppTerminate");
+}
+
+// iPhone only method to create a new contact through the GUI
+- (void)newContact:(CDVInvokedUrlCommand*)command
+{
+    NSString* callbackId = command.callbackId;
+
+    CDVAddressBookHelper* abHelper = [[CDVAddressBookHelper alloc] init];
+    CDVContacts* __weak weakSelf = self;  // play it safe to avoid retain cycles
+
+    [abHelper createAddressBook: ^(ABAddressBookRef addrBook, CDVAddressBookAccessError* errCode) {
+        if (addrBook == NULL) {
+            // permission was denied or other error just return (no error callback)
+            return;
+        }
+        CDVNewContactsController* npController = [[CDVNewContactsController alloc] init];
+        npController.addressBook = addrBook;     // a CF retaining assign
+        CFRelease(addrBook);
+
+        npController.newPersonViewDelegate = self;
+        npController.callbackId = callbackId;
+
+        UINavigationController* navController = [[UINavigationController alloc] initWithRootViewController:npController];
+
+        if ([weakSelf.viewController respondsToSelector:@selector(presentViewController:::)]) {
+            [weakSelf.viewController presentViewController:navController animated:YES completion:nil];
+        } else {
+            [weakSelf.viewController presentModalViewController:navController animated:YES];
+        }
+    }];
+}
+
+- (void)newPersonViewController:(ABNewPersonViewController*)newPersonViewController didCompleteWithNewPerson:(ABRecordRef)person
+{
+    ABRecordID recordId = kABRecordInvalidID;
+    CDVNewContactsController* newCP = (CDVNewContactsController*)newPersonViewController;
+    NSString* callbackId = newCP.callbackId;
+
+    if (person != NULL) {
+        // return the contact id
+        recordId = ABRecordGetRecordID(person);
+    }
+
+    if ([newPersonViewController respondsToSelector:@selector(presentingViewController)]) {
+        [[newPersonViewController presentingViewController] dismissViewControllerAnimated:YES completion:nil];
+    } else {
+        [[newPersonViewController parentViewController] dismissModalViewControllerAnimated:YES];
+    }
+
+    CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:recordId];
+    [self.commandDelegate sendPluginResult:result callbackId:callbackId];
+}
+
+- (void)displayContact:(CDVInvokedUrlCommand*)command
+{
+    NSString* callbackId = command.callbackId;
+    ABRecordID recordID = [[command.arguments objectAtIndex:0] intValue];
+    NSDictionary* options = [command.arguments objectAtIndex:1 withDefault:[NSNull null]];
+    bool bEdit = [options isKindOfClass:[NSNull class]] ? false : [options existsValue:@"true" forKey:@"allowsEditing"];
+
+    CDVAddressBookHelper* abHelper = [[CDVAddressBookHelper alloc] init];
+    CDVContacts* __weak weakSelf = self;  // play it safe to avoid retain cycles
+
+    [abHelper createAddressBook: ^(ABAddressBookRef addrBook, CDVAddressBookAccessError* errCode) {
+        if (addrBook == NULL) {
+            // permission was denied or other error - return error
+            CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageToErrorObject:errCode ? errCode.errorCode:UNKNOWN_ERROR];
+            [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId];
+            return;
+        }
+        ABRecordRef rec = ABAddressBookGetPersonWithRecordID(addrBook, recordID);
+
+        if (rec) {
+            CDVDisplayContactViewController* personController = [[CDVDisplayContactViewController alloc] init];
+            personController.displayedPerson = rec;
+            personController.personViewDelegate = self;
+            personController.allowsEditing = NO;
+
+            // create this so DisplayContactViewController will have a "back" button.
+            UIViewController* parentController = [[UIViewController alloc] init];
+            UINavigationController* navController = [[UINavigationController alloc] initWithRootViewController:parentController];
+
+            [navController pushViewController:personController animated:YES];
+
+            if ([self.viewController respondsToSelector:@selector(presentViewController:::)]) {
+                [self.viewController presentViewController:navController animated:YES completion:nil];
+            } else {
+                [self.viewController presentModalViewController:navController animated:YES];
+            }
+
+            if (bEdit) {
+                // create the editing controller and push it onto the stack
+                ABPersonViewController* editPersonController = [[ABPersonViewController alloc] init];
+                editPersonController.displayedPerson = rec;
+                editPersonController.personViewDelegate = self;
+                editPersonController.allowsEditing = YES;
+                [navController pushViewController:editPersonController animated:YES];
+            }
+        } else {
+            // no record, return error
+            CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:UNKNOWN_ERROR];
+            [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId];
+        }
+        CFRelease(addrBook);
+    }];
+}
+
+- (BOOL)personViewController:(ABPersonViewController*)personViewController shouldPerformDefaultActionForPerson:(ABRecordRef)person
+                    property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifierForValue
+{
+    return YES;
+}
+
+- (void)chooseContact:(CDVInvokedUrlCommand*)command
+{
+    NSString* callbackId = command.callbackId;
+    NSDictionary* options = [command.arguments objectAtIndex:0 withDefault:[NSNull null]];
+
+    CDVContactsPicker* pickerController = [[CDVContactsPicker alloc] init];
+
+    pickerController.peoplePickerDelegate = self;
+    pickerController.callbackId = callbackId;
+    pickerController.options = options;
+    pickerController.pickedContactDictionary = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:kABRecordInvalidID], kW3ContactId, nil];
+    pickerController.allowsEditing = (BOOL)[options existsValue : @"true" forKey : @"allowsEditing"];
+
+    if ([self.viewController respondsToSelector:@selector(presentViewController:::)]) {
+        [self.viewController presentViewController:pickerController animated:YES completion:nil];
+    } else {
+        [self.viewController presentModalViewController:pickerController animated:YES];
+    }
+}
+
+- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController*)peoplePicker
+      shouldContinueAfterSelectingPerson:(ABRecordRef)person
+{
+    CDVContactsPicker* picker = (CDVContactsPicker*)peoplePicker;
+    NSNumber* pickedId = [NSNumber numberWithInt:ABRecordGetRecordID(person)];
+
+    if (picker.allowsEditing) {
+        ABPersonViewController* personController = [[ABPersonViewController alloc] init];
+        personController.displayedPerson = person;
+        personController.personViewDelegate = self;
+        personController.allowsEditing = picker.allowsEditing;
+        // store id so can get info in peoplePickerNavigationControllerDidCancel
+        picker.pickedContactDictionary = [NSDictionary dictionaryWithObjectsAndKeys:pickedId, kW3ContactId, nil];
+
+        [peoplePicker pushViewController:personController animated:YES];
+    } else {
+        // Retrieve and return pickedContact information
+        CDVContact* pickedContact = [[CDVContact alloc] initFromABRecord:(ABRecordRef)person];
+        NSArray* fields = [picker.options objectForKey:@"fields"];
+        NSDictionary* returnFields = [[CDVContact class] calcReturnFields:fields];
+        picker.pickedContactDictionary = [pickedContact toDictionary:returnFields];
+
+        CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:picker.pickedContactDictionary];
+        [self.commandDelegate sendPluginResult:result callbackId:picker.callbackId];
+
+        if ([picker respondsToSelector:@selector(presentingViewController)]) {
+            [[picker presentingViewController] dismissViewControllerAnimated:YES completion:nil];
+        } else {
+            [[picker parentViewController] dismissModalViewControllerAnimated:YES];
+        }
+    }
+    return NO;
+}
+
+- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController*)peoplePicker
+      shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier
+{
+    return YES;
+}
+
+- (void)peoplePickerNavigationControllerDidCancel:(ABPeoplePickerNavigationController*)peoplePicker
+{
+    // return contactId or invalid if none picked
+    CDVContactsPicker* picker = (CDVContactsPicker*)peoplePicker;
+
+    if (picker.allowsEditing) {
+        // get the info after possible edit
+        // if we got this far, user has already approved/ disapproved addressBook access
+        ABAddressBookRef addrBook = nil;
+#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000
+            if (&ABAddressBookCreateWithOptions != NULL) {
+                addrBook = ABAddressBookCreateWithOptions(NULL, NULL);
+            } else
+#endif
+        {
+            // iOS 4 & 5
+            addrBook = ABAddressBookCreate();
+        }
+        ABRecordRef person = ABAddressBookGetPersonWithRecordID(addrBook, [[picker.pickedContactDictionary objectForKey:kW3ContactId] integerValue]);
+        if (person) {
+            CDVContact* pickedContact = [[CDVContact alloc] initFromABRecord:(ABRecordRef)person];
+            NSArray* fields = [picker.options objectForKey:@"fields"];
+            NSDictionary* returnFields = [[CDVContact class] calcReturnFields:fields];
+            picker.pickedContactDictionary = [pickedContact toDictionary:returnFields];
+        }
+        CFRelease(addrBook);
+    }
+    CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:picker.pickedContactDictionary];
+    [self.commandDelegate sendPluginResult:result callbackId:picker.callbackId];
+
+    if ([peoplePicker respondsToSelector:@selector(presentingViewController)]) {
+        [[peoplePicker presentingViewController] dismissViewControllerAnimated:YES completion:nil];
+    } else {
+        [[peoplePicker parentViewController] dismissModalViewControllerAnimated:YES];
+    }
+}
+
+- (void)search:(CDVInvokedUrlCommand*)command
+{
+    NSString* callbackId = command.callbackId;
+    NSArray* fields = [command.arguments objectAtIndex:0];
+    NSDictionary* findOptions = [command.arguments objectAtIndex:1 withDefault:[NSNull null]];
+
+    [self.commandDelegate runInBackground:^{
+        // from Apple:  Important You must ensure that an instance of ABAddressBookRef is used by only one thread.
+        // which is why address book is created within the dispatch queue.
+        // more details here: http: //blog.byadrian.net/2012/05/05/ios-addressbook-framework-and-gcd/
+        CDVAddressBookHelper* abHelper = [[CDVAddressBookHelper alloc] init];
+        CDVContacts* __weak weakSelf = self;     // play it safe to avoid retain cycles
+        // it gets uglier, block within block.....
+        [abHelper createAddressBook: ^(ABAddressBookRef addrBook, CDVAddressBookAccessError* errCode) {
+            if (addrBook == NULL) {
+                // permission was denied or other error - return error
+                CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageToErrorObject:errCode ? errCode.errorCode:UNKNOWN_ERROR];
+                [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId];
+                return;
+            }
+
+            NSArray* foundRecords = nil;
+            // get the findOptions values
+            BOOL multiple = NO;         // default is false
+            NSString* filter = nil;
+            if (![findOptions isKindOfClass:[NSNull class]]) {
+                id value = nil;
+                filter = (NSString*)[findOptions objectForKey:@"filter"];
+                value = [findOptions objectForKey:@"multiple"];
+                if ([value isKindOfClass:[NSNumber class]]) {
+                    // multiple is a boolean that will come through as an NSNumber
+                    multiple = [(NSNumber*)value boolValue];
+                    // NSLog(@"multiple is: %d", multiple);
+                }
+            }
+
+            NSDictionary* returnFields = [[CDVContact class] calcReturnFields:fields];
+
+            NSMutableArray* matches = nil;
+            if (!filter || [filter isEqualToString:@""]) {
+                // get all records
+                foundRecords = (__bridge_transfer NSArray*)ABAddressBookCopyArrayOfAllPeople(addrBook);
+                if (foundRecords && ([foundRecords count] > 0)) {
+                    // create Contacts and put into matches array
+                    // doesn't make sense to ask for all records when multiple == NO but better check
+                    int xferCount = multiple == YES ? [foundRecords count] : 1;
+                    matches = [NSMutableArray arrayWithCapacity:xferCount];
+
+                    for (int k = 0; k < xferCount; k++) {
+                        CDVContact* xferContact = [[CDVContact alloc] initFromABRecord:(__bridge ABRecordRef)[foundRecords objectAtIndex:k]];
+                        [matches addObject:xferContact];
+                        xferContact = nil;
+                    }
+                }
+            } else {
+                foundRecords = (__bridge_transfer NSArray*)ABAddressBookCopyArrayOfAllPeople(addrBook);
+                matches = [NSMutableArray arrayWithCapacity:1];
+                BOOL bFound = NO;
+                int testCount = [foundRecords count];
+
+                for (int j = 0; j < testCount; j++) {
+                    CDVContact* testContact = [[CDVContact alloc] initFromABRecord:(__bridge ABRecordRef)[foundRecords objectAtIndex:j]];
+                    if (testContact) {
+                        bFound = [testContact foundValue:filter inFields:returnFields];
+                        if (bFound) {
+                            [matches addObject:testContact];
+                        }
+                        testContact = nil;
+                    }
+                }
+            }
+            NSMutableArray* returnContacts = [NSMutableArray arrayWithCapacity:1];
+
+            if ((matches != nil) && ([matches count] > 0)) {
+                // convert to JS Contacts format and return in callback
+                // - returnFields  determines what properties to return
+                @autoreleasepool {
+                    int count = multiple == YES ? [matches count] : 1;
+
+                    for (int i = 0; i < count; i++) {
+                        CDVContact* newContact = [matches objectAtIndex:i];
+                        NSDictionary* aContact = [newContact toDictionary:returnFields];
+                        [returnContacts addObject:aContact];
+                    }
+                }
+            }
+            // return found contacts (array is empty if no contacts found)
+            CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:returnContacts];
+            [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId];
+            // NSLog(@"findCallback string: %@", jsString);
+
+            if (addrBook) {
+                CFRelease(addrBook);
+            }
+        }];
+    }];     // end of workQueue block
+
+    return;
+}
+
+- (void)save:(CDVInvokedUrlCommand*)command
+{
+    NSString* callbackId = command.callbackId;
+    NSDictionary* contactDict = [command.arguments objectAtIndex:0];
+
+    [self.commandDelegate runInBackground:^{
+        CDVAddressBookHelper* abHelper = [[CDVAddressBookHelper alloc] init];
+        CDVContacts* __weak weakSelf = self;     // play it safe to avoid retain cycles
+
+        [abHelper createAddressBook: ^(ABAddressBookRef addrBook, CDVAddressBookAccessError* errorCode) {
+            CDVPluginResult* result = nil;
+            if (addrBook == NULL) {
+                // permission was denied or other error - return error
+                result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:errorCode ? errorCode.errorCode:UNKNOWN_ERROR];
+                [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId];
+                return;
+            }
+
+            bool bIsError = FALSE, bSuccess = FALSE;
+            BOOL bUpdate = NO;
+            CDVContactError errCode = UNKNOWN_ERROR;
+            CFErrorRef error;
+            NSNumber* cId = [contactDict valueForKey:kW3ContactId];
+            CDVContact* aContact = nil;
+            ABRecordRef rec = nil;
+            if (cId && ![cId isKindOfClass:[NSNull class]]) {
+                rec = ABAddressBookGetPersonWithRecordID(addrBook, [cId intValue]);
+                if (rec) {
+                    aContact = [[CDVContact alloc] initFromABRecord:rec];
+                    bUpdate = YES;
+                }
+            }
+            if (!aContact) {
+                aContact = [[CDVContact alloc] init];
+            }
+
+            bSuccess = [aContact setFromContactDict:contactDict asUpdate:bUpdate];
+            if (bSuccess) {
+                if (!bUpdate) {
+                    bSuccess = ABAddressBookAddRecord(addrBook, [aContact record], &error);
+                }
+                if (bSuccess) {
+                    bSuccess = ABAddressBookSave(addrBook, &error);
+                }
+                if (!bSuccess) {         // need to provide error codes
+                    bIsError = TRUE;
+                    errCode = IO_ERROR;
+                } else {
+                    // give original dictionary back?  If generate dictionary from saved contact, have no returnFields specified
+                    // so would give back all fields (which W3C spec. indicates is not desired)
+                    // for now (while testing) give back saved, full contact
+                    NSDictionary* newContact = [aContact toDictionary:[CDVContact defaultFields]];
+                    // NSString* contactStr = [newContact JSONRepresentation];
+                    result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:newContact];
+                }
+            } else {
+                bIsError = TRUE;
+                errCode = IO_ERROR;
+            }
+            CFRelease(addrBook);
+
+            if (bIsError) {
+                result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:errCode];
+            }
+
+            if (result) {
+                [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId];
+            }
+        }];
+    }];     // end of  queue
+}
+
+- (void)remove:(CDVInvokedUrlCommand*)command
+{
+    NSString* callbackId = command.callbackId;
+    NSNumber* cId = [command.arguments objectAtIndex:0];
+
+    CDVAddressBookHelper* abHelper = [[CDVAddressBookHelper alloc] init];
+    CDVContacts* __weak weakSelf = self;  // play it safe to avoid retain cycles
+
+    [abHelper createAddressBook: ^(ABAddressBookRef addrBook, CDVAddressBookAccessError* errorCode) {
+        CDVPluginResult* result = nil;
+        if (addrBook == NULL) {
+            // permission was denied or other error - return error
+            result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:errorCode ? errorCode.errorCode:UNKNOWN_ERROR];
+            [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId];
+            return;
+        }
+
+        bool bIsError = FALSE, bSuccess = FALSE;
+        CDVContactError errCode = UNKNOWN_ERROR;
+        CFErrorRef error;
+        ABRecordRef rec = nil;
+        if (cId && ![cId isKindOfClass:[NSNull class]] && ([cId intValue] != kABRecordInvalidID)) {
+            rec = ABAddressBookGetPersonWithRecordID(addrBook, [cId intValue]);
+            if (rec) {
+                bSuccess = ABAddressBookRemoveRecord(addrBook, rec, &error);
+                if (!bSuccess) {
+                    bIsError = TRUE;
+                    errCode = IO_ERROR;
+                } else {
+                    bSuccess = ABAddressBookSave(addrBook, &error);
+                    if (!bSuccess) {
+                        bIsError = TRUE;
+                        errCode = IO_ERROR;
+                    } else {
+                        // set id to null
+                        // [contactDict setObject:[NSNull null] forKey:kW3ContactId];
+                        // result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary: contactDict];
+                        result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
+                        // NSString* contactStr = [contactDict JSONRepresentation];
+                    }
+                }
+            } else {
+                // no record found return error
+                bIsError = TRUE;
+                errCode = UNKNOWN_ERROR;
+            }
+        } else {
+            // invalid contact id provided
+            bIsError = TRUE;
+            errCode = INVALID_ARGUMENT_ERROR;
+        }
+
+        if (addrBook) {
+            CFRelease(addrBook);
+        }
+        if (bIsError) {
+            result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:errCode];
+        }
+        if (result) {
+            [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId];
+        }
+    }];
+    return;
+}
+
+@end
+
+/* ABPersonViewController does not have any UI to dismiss.  Adding navigationItems to it does not work properly
+ * The navigationItems are lost when the app goes into the background.  The solution was to create an empty
+ * NavController in front of the ABPersonViewController. This will cause the ABPersonViewController to have a back button. By subclassing the ABPersonViewController, we can override viewDidDisappear and take down the entire NavigationController.
+ */
+@implementation CDVDisplayContactViewController
+@synthesize contactsPlugin;
+
+- (void)viewWillDisappear:(BOOL)animated
+{
+    [super viewWillDisappear:animated];
+
+    if ([self respondsToSelector:@selector(presentingViewController)]) {
+        [[self presentingViewController] dismissViewControllerAnimated:YES completion:nil];
+    } else {
+        [[self parentViewController] dismissModalViewControllerAnimated:YES];
+    }
+}
+
+@end
+@implementation CDVAddressBookAccessError
+
+@synthesize errorCode;
+
+- (CDVAddressBookAccessError*)initWithCode:(CDVContactError)code
+{
+    self = [super init];
+    if (self) {
+        self.errorCode = code;
+    }
+    return self;
+}
+
+@end
+
+@implementation CDVAddressBookHelper
+
+/**
+ * NOTE: workerBlock is responsible for releasing the addressBook that is passed to it
+ */
+- (void)createAddressBook:(CDVAddressBookWorkerBlock)workerBlock
+{
+    // TODO: this probably should be reworked - seems like the workerBlock can just create and release its own AddressBook,
+    // and also this important warning from (http://developer.apple.com/library/ios/#documentation/ContactData/Conceptual/AddressBookProgrammingGuideforiPhone/Chapters/BasicObjects.html):
+    // "Important: Instances of ABAddressBookRef cannot be used by multiple threads. Each thread must make its own instance."
+    ABAddressBookRef addressBook;
+
+#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000
+        if (&ABAddressBookCreateWithOptions != NULL) {
+            CFErrorRef error = nil;
+            // CFIndex status = ABAddressBookGetAuthorizationStatus();
+            addressBook = ABAddressBookCreateWithOptions(NULL, &error);
+            // NSLog(@"addressBook access: %lu", status);
+            ABAddressBookRequestAccessWithCompletion(addressBook, ^(bool granted, CFErrorRef error) {
+                    // callback can occur in background, address book must be accessed on thread it was created on
+                    dispatch_sync(dispatch_get_main_queue(), ^{
+                        if (error) {
+                            workerBlock(NULL, [[CDVAddressBookAccessError alloc] initWithCode:UNKNOWN_ERROR]);
+                        } else if (!granted) {
+                            workerBlock(NULL, [[CDVAddressBookAccessError alloc] initWithCode:PERMISSION_DENIED_ERROR]);
+                        } else {
+                            // access granted
+                            workerBlock(addressBook, [[CDVAddressBookAccessError alloc] initWithCode:UNKNOWN_ERROR]);
+                        }
+                    });
+                });
+        } else
+#endif
+    {
+        // iOS 4 or 5 no checks needed
+        addressBook = ABAddressBookCreate();
+        workerBlock(addressBook, NULL);
+    }
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/src/wp/Contacts.cs
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/wp/Contacts.cs b/cordova-lib/spec-plugman/plugins/Contacts/src/wp/Contacts.cs
new file mode 100644
index 0000000..6789bb8
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/src/wp/Contacts.cs
@@ -0,0 +1,664 @@
+/*  
+	Licensed 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.
+*/
+
+using Microsoft.Phone.Tasks;
+using Microsoft.Phone.UserData;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.Windows;
+using DeviceContacts = Microsoft.Phone.UserData.Contacts;
+
+
+namespace WPCordovaClassLib.Cordova.Commands
+{
+    [DataContract]
+    public class SearchOptions
+    {
+        [DataMember]
+        public string filter { get; set; }
+        [DataMember]
+        public bool multiple { get; set; }
+    }
+
+    [DataContract]
+    public class ContactSearchParams
+    {
+        [DataMember]
+        public string[] fields { get; set; }
+        [DataMember]
+        public SearchOptions options { get; set; }
+    }
+
+    [DataContract]
+    public class JSONContactAddress
+    {
+        [DataMember]
+        public string formatted { get; set; }
+        [DataMember]
+        public string type { get; set; }
+        [DataMember]
+        public string streetAddress { get; set; }
+        [DataMember]
+        public string locality { get; set; }
+        [DataMember]
+        public string region { get; set; }
+        [DataMember]
+        public string postalCode { get; set; }
+        [DataMember]
+        public string country { get; set; }
+        [DataMember]
+        public bool pref { get; set; }
+    }
+
+    [DataContract]
+    public class JSONContactName
+    {
+        [DataMember]
+        public string formatted { get; set; }
+        [DataMember]
+        public string familyName { get; set; }
+        [DataMember]
+        public string givenName { get; set; }
+        [DataMember]
+        public string middleName { get; set; }
+        [DataMember]
+        public string honorificPrefix { get; set; }
+        [DataMember]
+        public string honorificSuffix { get; set; }
+    }
+
+    [DataContract]
+    public class JSONContactField
+    {
+        [DataMember]
+        public string type { get; set; }
+        [DataMember]
+        public string value { get; set; }
+        [DataMember]
+        public bool pref { get; set; }
+    }
+
+    [DataContract]
+    public class JSONContactOrganization
+    {
+        [DataMember]
+        public string type { get; set; }
+        [DataMember]
+        public string name { get; set; }
+        [DataMember]
+        public bool pref { get; set; }
+        [DataMember]
+        public string department { get; set; }
+        [DataMember]
+        public string title { get; set; }
+    }
+
+    [DataContract]
+    public class JSONContact
+    {
+        [DataMember]
+        public string id { get; set; }
+        [DataMember]
+        public string rawId { get; set; }
+        [DataMember]
+        public string displayName { get; set; }
+        [DataMember]
+        public string nickname { get; set; }
+        [DataMember]
+        public string note { get; set; }
+
+        [DataMember]
+        public JSONContactName name { get; set; }
+
+        [DataMember]
+        public JSONContactField[] emails { get; set; }
+
+        [DataMember]
+        public JSONContactField[] phoneNumbers { get; set; }
+
+        [DataMember]
+        public JSONContactField[] ims { get; set; }
+
+        [DataMember]
+        public JSONContactField[] photos { get; set; }
+
+        [DataMember]
+        public JSONContactField[] categories { get; set; }
+
+        [DataMember]
+        public JSONContactField[] urls { get; set; }
+
+        [DataMember]
+        public JSONContactOrganization[] organizations { get; set; }
+
+        [DataMember]
+        public JSONContactAddress[] addresses { get; set; }
+    }
+
+
+    public class Contacts : BaseCommand
+    {
+
+        public const int UNKNOWN_ERROR = 0;
+        public const int INVALID_ARGUMENT_ERROR = 1;
+        public const int TIMEOUT_ERROR = 2;
+        public const int PENDING_OPERATION_ERROR = 3;
+        public const int IO_ERROR = 4;
+        public const int NOT_SUPPORTED_ERROR = 5;
+        public const int PERMISSION_DENIED_ERROR = 20;
+        public const int SYNTAX_ERR = 8;
+
+        public Contacts()
+        {
+
+        }
+
+        // refer here for contact properties we can access: http://msdn.microsoft.com/en-us/library/microsoft.phone.tasks.savecontacttask_members%28v=VS.92%29.aspx
+        public void save(string jsonContact)
+        {
+
+            // jsonContact is actually an array of 1 {contact}
+            string[] args = JSON.JsonHelper.Deserialize<string[]>(jsonContact);
+
+
+            JSONContact contact = JSON.JsonHelper.Deserialize<JSONContact>(args[0]);
+
+            SaveContactTask contactTask = new SaveContactTask();
+
+            if (contact.nickname != null)
+            {
+                contactTask.Nickname = contact.nickname;
+            }
+            if (contact.urls != null && contact.urls.Length > 0)
+            {
+                contactTask.Website = contact.urls[0].value;
+            }
+            if (contact.note != null)
+            {
+                contactTask.Notes = contact.note;
+            }
+
+            #region contact.name
+            if (contact.name != null)
+            {
+                if (contact.name.givenName != null)
+                    contactTask.FirstName = contact.name.givenName;
+                if (contact.name.familyName != null)
+                    contactTask.LastName = contact.name.familyName;
+                if (contact.name.middleName != null)
+                    contactTask.MiddleName = contact.name.middleName;
+                if (contact.name.honorificSuffix != null)
+                    contactTask.Suffix = contact.name.honorificSuffix;
+                if (contact.name.honorificPrefix != null)
+                    contactTask.Title = contact.name.honorificPrefix;
+            }
+            #endregion
+
+            #region contact.org
+            if (contact.organizations != null && contact.organizations.Count() > 0)
+            {
+                contactTask.Company = contact.organizations[0].name;
+                contactTask.JobTitle = contact.organizations[0].title;
+            }
+            #endregion
+
+            #region contact.phoneNumbers
+            if (contact.phoneNumbers != null && contact.phoneNumbers.Length > 0)
+            {
+                foreach (JSONContactField field in contact.phoneNumbers)
+                {
+                    string fieldType = field.type.ToLower();
+                    if (fieldType == "work")
+                    {
+                        contactTask.WorkPhone = field.value;
+                    }
+                    else if (fieldType == "home")
+                    {
+                        contactTask.HomePhone = field.value;
+                    }
+                    else if (fieldType == "mobile")
+                    {
+                        contactTask.MobilePhone = field.value;
+                    }
+                }
+            }
+            #endregion
+
+            #region contact.emails
+
+            if (contact.emails != null && contact.emails.Length > 0)
+            {
+
+                // set up different email types if they are not explicitly defined
+                foreach (string type in new string[] { "personal", "work", "other" })
+                {
+                    foreach (JSONContactField field in contact.emails)
+                    {
+                        if (field != null && String.IsNullOrEmpty(field.type))
+                        {
+                            field.type = type;
+                            break;
+                        }
+                    }
+                }
+
+                foreach (JSONContactField field in contact.emails)
+                {
+                    if (field != null)
+                    {
+                        if (field.type != null && field.type != "other")
+                        {
+                            string fieldType = field.type.ToLower();
+                            if (fieldType == "work")
+                            {
+                                contactTask.WorkEmail = field.value;
+                            }
+                            else if (fieldType == "home" || fieldType == "personal")
+                            {
+                                contactTask.PersonalEmail = field.value;
+                            }
+                        }
+                        else
+                        {
+                            contactTask.OtherEmail = field.value;
+                        }
+                    }
+
+                }
+            }
+            #endregion
+
+            if (contact.note != null && contact.note.Length > 0)
+            {
+                contactTask.Notes = contact.note;
+            }
+
+            #region contact.addresses
+            if (contact.addresses != null && contact.addresses.Length > 0)
+            {
+                foreach (JSONContactAddress address in contact.addresses)
+                {
+                    if (address.type == null)
+                    {
+                        address.type = "home"; // set a default
+                    }
+                    string fieldType = address.type.ToLower();
+                    if (fieldType == "work")
+                    {
+                        contactTask.WorkAddressCity = address.locality;
+                        contactTask.WorkAddressCountry = address.country;
+                        contactTask.WorkAddressState = address.region;
+                        contactTask.WorkAddressStreet = address.streetAddress;
+                        contactTask.WorkAddressZipCode = address.postalCode;
+                    }
+                    else if (fieldType == "home" || fieldType == "personal")
+                    {
+                        contactTask.HomeAddressCity = address.locality;
+                        contactTask.HomeAddressCountry = address.country;
+                        contactTask.HomeAddressState = address.region;
+                        contactTask.HomeAddressStreet = address.streetAddress;
+                        contactTask.HomeAddressZipCode = address.postalCode;
+                    }
+                    else
+                    {
+                        // no other address fields available ...
+                        Debug.WriteLine("Creating contact with unsupported address type :: " + address.type);
+                    }
+                }
+            }
+            #endregion
+
+
+            contactTask.Completed += new EventHandler<SaveContactResult>(ContactSaveTaskCompleted);
+            contactTask.Show();
+        }
+
+        void ContactSaveTaskCompleted(object sender, SaveContactResult e)
+        {
+            SaveContactTask task = sender as SaveContactTask;
+
+            if (e.TaskResult == TaskResult.OK)
+            {
+
+                Deployment.Current.Dispatcher.BeginInvoke(() =>
+                {
+                    DeviceContacts deviceContacts = new DeviceContacts();
+                    deviceContacts.SearchCompleted += new EventHandler<ContactsSearchEventArgs>(postAdd_SearchCompleted);
+
+                    string displayName = String.Format("{0}{2}{1}", task.FirstName, task.LastName, String.IsNullOrEmpty(task.FirstName) ? "" : " ");
+
+                    deviceContacts.SearchAsync(displayName, FilterKind.DisplayName, task);
+                });
+
+
+            }
+            else if (e.TaskResult == TaskResult.Cancel)
+            {
+                DispatchCommandResult(new PluginResult(PluginResult.Status.ERROR, "Operation cancelled."));
+            }
+        }
+
+        void postAdd_SearchCompleted(object sender, ContactsSearchEventArgs e)
+        {
+            if (e.Results.Count() > 0)
+            {
+                List<Contact> foundContacts = new List<Contact>();
+
+                int n = (from Contact contact in e.Results select contact.GetHashCode()).Max();
+                Contact newContact = (from Contact contact in e.Results
+                                      where contact.GetHashCode() == n
+                                      select contact).First();
+
+                DispatchCommandResult(new PluginResult(PluginResult.Status.OK, FormatJSONContact(newContact, null)));
+            }
+            else
+            {
+                DispatchCommandResult(new PluginResult(PluginResult.Status.NO_RESULT));
+            }
+        }
+
+
+
+        public void remove(string id)
+        {
+            // note id is wrapped in [] and always has exactly one string ...
+            DispatchCommandResult(new PluginResult(PluginResult.Status.ERROR, "{\"code\":" + NOT_SUPPORTED_ERROR + "}"));
+        }
+
+        public void search(string searchCriteria)
+        {
+            string[] args = JSON.JsonHelper.Deserialize<string[]>(searchCriteria);
+
+            ContactSearchParams searchParams = new ContactSearchParams();
+            try
+            {
+                searchParams.fields = JSON.JsonHelper.Deserialize<string[]>(args[0]);
+                searchParams.options = JSON.JsonHelper.Deserialize<SearchOptions>(args[1]);
+            }
+            catch (Exception)
+            {
+                DispatchCommandResult(new PluginResult(PluginResult.Status.ERROR, INVALID_ARGUMENT_ERROR));
+                return;
+            }
+
+            if (searchParams.options == null)
+            {
+                searchParams.options = new SearchOptions();
+                searchParams.options.filter = "";
+                searchParams.options.multiple = true;
+            }
+
+            DeviceContacts deviceContacts = new DeviceContacts();
+            deviceContacts.SearchCompleted += new EventHandler<ContactsSearchEventArgs>(contacts_SearchCompleted);
+
+            // default is to search all fields
+            FilterKind filterKind = FilterKind.None;
+            // if only one field is specified, we will try the 3 available DeviceContact search filters
+            if (searchParams.fields.Count() == 1)
+            {
+                if (searchParams.fields.Contains("name"))
+                {
+                    filterKind = FilterKind.DisplayName;
+                }
+                else if (searchParams.fields.Contains("emails"))
+                {
+                    filterKind = FilterKind.EmailAddress;
+                }
+                else if (searchParams.fields.Contains("phoneNumbers"))
+                {
+                    filterKind = FilterKind.PhoneNumber;
+                }
+            }
+
+            try
+            {
+
+                deviceContacts.SearchAsync(searchParams.options.filter, filterKind, searchParams);
+            }
+            catch (Exception ex)
+            {
+                Debug.WriteLine("search contacts exception :: " + ex.Message);
+            }
+        }
+
+        private void contacts_SearchCompleted(object sender, ContactsSearchEventArgs e)
+        {
+            ContactSearchParams searchParams = (ContactSearchParams)e.State;
+
+            List<Contact> foundContacts = null;
+
+            // if we have multiple search fields
+            if (searchParams.options.filter.Length > 0 && searchParams.fields.Count() > 1)
+            {
+                foundContacts = new List<Contact>();
+                if (searchParams.fields.Contains("emails"))
+                {
+                    foundContacts.AddRange(from Contact con in e.Results
+                                           from ContactEmailAddress a in con.EmailAddresses
+                                           where a.EmailAddress.Contains(searchParams.options.filter)
+                                           select con);
+                }
+                if (searchParams.fields.Contains("displayName"))
+                {
+                    foundContacts.AddRange(from Contact con in e.Results
+                                           where con.DisplayName.Contains(searchParams.options.filter)
+                                           select con);
+                }
+                if (searchParams.fields.Contains("name"))
+                {
+                    foundContacts.AddRange(from Contact con in e.Results
+                                           where con.CompleteName != null && con.CompleteName.ToString().Contains(searchParams.options.filter)
+                                           select con);
+                }
+                if (searchParams.fields.Contains("phoneNumbers"))
+                {
+                    foundContacts.AddRange(from Contact con in e.Results
+                                           from ContactPhoneNumber a in con.PhoneNumbers
+                                           where a.PhoneNumber.Contains(searchParams.options.filter)
+                                           select con);
+                }
+                if (searchParams.fields.Contains("urls"))
+                {
+                    foundContacts.AddRange(from Contact con in e.Results
+                                           from string a in con.Websites
+                                           where a.Contains(searchParams.options.filter)
+                                           select con);
+                }
+            }
+            else
+            {
+                foundContacts = new List<Contact>(e.Results);
+            }
+
+            //List<string> contactList = new List<string>();
+
+            string strResult = "";
+
+            IEnumerable<Contact> distinctContacts = foundContacts.Distinct();
+
+            foreach (Contact contact in distinctContacts)
+            {
+                strResult += FormatJSONContact(contact, null) + ",";
+                //contactList.Add(FormatJSONContact(contact, null));
+                if (!searchParams.options.multiple)
+                {
+                    break; // just return the first item
+                }
+            }
+            PluginResult result = new PluginResult(PluginResult.Status.OK);
+            result.Message = "[" + strResult.TrimEnd(',') + "]";
+            DispatchCommandResult(result);
+
+        }
+
+        private string FormatJSONPhoneNumbers(Contact con)
+        {
+            string retVal = "";
+            string contactFieldFormat = "\"type\":\"{0}\",\"value\":\"{1}\",\"pref\":\"false\"";
+            foreach (ContactPhoneNumber number in con.PhoneNumbers)
+            {
+
+                string contactField = string.Format(contactFieldFormat,
+                                                    number.Kind.ToString(),
+                                                    number.PhoneNumber);
+
+                retVal += "{" + contactField + "},";
+            }
+            return retVal.TrimEnd(',');
+        }
+
+        private string FormatJSONEmails(Contact con)
+        {
+            string retVal = "";
+            string contactFieldFormat = "\"type\":\"{0}\",\"value\":\"{1}\",\"pref\":\"false\"";
+            foreach (ContactEmailAddress address in con.EmailAddresses)
+            {
+                string contactField = string.Format(contactFieldFormat,
+                                                    address.Kind.ToString(),
+                                                    address.EmailAddress);
+
+                retVal += "{" + contactField + "},";
+            }
+            return retVal.TrimEnd(',');
+        }
+
+        private string getFormattedJSONAddress(ContactAddress address, bool isPreferred)
+        {
+
+            string addressFormatString = "\"pref\":{0}," + // bool
+                          "\"type\":\"{1}\"," +
+                          "\"formatted\":\"{2}\"," +
+                          "\"streetAddress\":\"{3}\"," +
+                          "\"locality\":\"{4}\"," +
+                          "\"region\":\"{5}\"," +
+                          "\"postalCode\":\"{6}\"," +
+                          "\"country\":\"{7}\"";
+
+            string formattedAddress = address.PhysicalAddress.AddressLine1 + " "
+                                    + address.PhysicalAddress.AddressLine2 + " "
+                                    + address.PhysicalAddress.City + " "
+                                    + address.PhysicalAddress.StateProvince + " "
+                                    + address.PhysicalAddress.CountryRegion + " "
+                                    + address.PhysicalAddress.PostalCode;
+
+            string jsonAddress = string.Format(addressFormatString,
+                                               isPreferred ? "\"true\"" : "\"false\"",
+                                               address.Kind.ToString(),
+                                               formattedAddress,
+                                               address.PhysicalAddress.AddressLine1 + " " + address.PhysicalAddress.AddressLine2,
+                                               address.PhysicalAddress.City,
+                                               address.PhysicalAddress.StateProvince,
+                                               address.PhysicalAddress.PostalCode,
+                                               address.PhysicalAddress.CountryRegion);
+
+            //Debug.WriteLine("getFormattedJSONAddress returning :: " + jsonAddress);
+
+            return "{" + jsonAddress + "}";
+        }
+
+        private string FormatJSONAddresses(Contact con)
+        {
+            string retVal = "";
+            foreach (ContactAddress address in con.Addresses)
+            {
+                retVal += this.getFormattedJSONAddress(address, false) + ",";
+            }
+
+            //Debug.WriteLine("FormatJSONAddresses returning :: " + retVal);
+            return retVal.TrimEnd(',');
+        }
+
+        private string FormatJSONWebsites(Contact con)
+        {
+            string retVal = "";
+            foreach (string website in con.Websites)
+            {
+                retVal += "\"" + website + "\",";
+            }
+            return retVal.TrimEnd(',');
+        }
+
+        /*
+         *  formatted: The complete name of the contact. (DOMString)
+            familyName: The contacts family name. (DOMString)
+            givenName: The contacts given name. (DOMString)
+            middleName: The contacts middle name. (DOMString)
+            honorificPrefix: The contacts prefix (example Mr. or Dr.) (DOMString)
+            honorificSuffix: The contacts suffix (example Esq.). (DOMString)
+         */
+        private string FormatJSONName(Contact con)
+        {
+            string retVal = "";
+            string formatStr = "\"formatted\":\"{0}\"," +
+                                "\"familyName\":\"{1}\"," +
+                                "\"givenName\":\"{2}\"," +
+                                "\"middleName\":\"{3}\"," +
+                                "\"honorificPrefix\":\"{4}\"," +
+                                "\"honorificSuffix\":\"{5}\"";
+
+            if (con.CompleteName != null)
+            {
+                retVal = string.Format(formatStr,
+                                   con.CompleteName.FirstName + " " + con.CompleteName.LastName, // TODO: does this need suffix? middlename?
+                                   con.CompleteName.LastName,
+                                   con.CompleteName.FirstName,
+                                   con.CompleteName.MiddleName,
+                                   con.CompleteName.Title,
+                                   con.CompleteName.Suffix);
+            }
+            else
+            {
+                retVal = string.Format(formatStr,"","","","","","");
+            }
+
+            return "{" + retVal + "}";
+        }
+
+        private string FormatJSONContact(Contact con, string[] fields)
+        {
+
+            string contactFormatStr = "\"id\":\"{0}\"," +
+                                      "\"displayName\":\"{1}\"," +
+                                      "\"nickname\":\"{2}\"," +
+                                      "\"phoneNumbers\":[{3}]," +
+                                      "\"emails\":[{4}]," +
+                                      "\"addresses\":[{5}]," +
+                                      "\"urls\":[{6}]," +
+                                      "\"name\":{7}," +
+                                      "\"note\":\"{8}\"," +
+                                      "\"birthday\":\"{9}\"";
+
+
+            string jsonContact = String.Format(contactFormatStr,
+                                               con.GetHashCode(),
+                                               con.DisplayName,
+                                               con.CompleteName != null ? con.CompleteName.Nickname : "",
+                                               FormatJSONPhoneNumbers(con),
+                                               FormatJSONEmails(con),
+                                               FormatJSONAddresses(con),
+                                               FormatJSONWebsites(con),
+                                               FormatJSONName(con),
+                                               con.Notes.FirstOrDefault(),
+                                               con.Birthdays.FirstOrDefault());
+
+            //Debug.WriteLine("jsonContact = " + jsonContact);
+            // JSON requires new line characters be escaped
+            return "{" + jsonContact.Replace("\n", "\\n") + "}";
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/www/Contact.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/www/Contact.js b/cordova-lib/spec-plugman/plugins/Contacts/www/Contact.js
new file mode 100644
index 0000000..9c46a0c
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/www/Contact.js
@@ -0,0 +1,177 @@
+/*
+ *
+ * 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'),
+    ContactError = require('./ContactError'),
+    utils = require('cordova/utils');
+
+/**
+* Converts primitives into Complex Object
+* Currently only used for Date fields
+*/
+function convertIn(contact) {
+    var value = contact.birthday;
+    try {
+      contact.birthday = new Date(parseFloat(value));
+    } catch (exception){
+      console.log("Cordova Contact convertIn error: exception creating date.");
+    }
+    return contact;
+}
+
+/**
+* Converts Complex objects into primitives
+* Only conversion at present is for Dates.
+**/
+
+function convertOut(contact) {
+    var value = contact.birthday;
+    if (value !== null) {
+        // try to make it a Date object if it is not already
+        if (!utils.isDate(value)){
+            try {
+                value = new Date(value);
+            } catch(exception){
+                value = null;
+            }
+        }
+        if (utils.isDate(value)){
+            value = value.valueOf(); // convert to milliseconds
+        }
+        contact.birthday = value;
+    }
+    return contact;
+}
+
+/**
+* Contains information about a single contact.
+* @constructor
+* @param {DOMString} id unique identifier
+* @param {DOMString} displayName
+* @param {ContactName} name
+* @param {DOMString} nickname
+* @param {Array.<ContactField>} phoneNumbers array of phone numbers
+* @param {Array.<ContactField>} emails array of email addresses
+* @param {Array.<ContactAddress>} addresses array of addresses
+* @param {Array.<ContactField>} ims instant messaging user ids
+* @param {Array.<ContactOrganization>} organizations
+* @param {DOMString} birthday contact's birthday
+* @param {DOMString} note user notes about contact
+* @param {Array.<ContactField>} photos
+* @param {Array.<ContactField>} categories
+* @param {Array.<ContactField>} urls contact's web sites
+*/
+var Contact = function (id, displayName, name, nickname, phoneNumbers, emails, addresses,
+    ims, organizations, birthday, note, photos, categories, urls) {
+    this.id = id || null;
+    this.rawId = null;
+    this.displayName = displayName || null;
+    this.name = name || null; // ContactName
+    this.nickname = nickname || null;
+    this.phoneNumbers = phoneNumbers || null; // ContactField[]
+    this.emails = emails || null; // ContactField[]
+    this.addresses = addresses || null; // ContactAddress[]
+    this.ims = ims || null; // ContactField[]
+    this.organizations = organizations || null; // ContactOrganization[]
+    this.birthday = birthday || null;
+    this.note = note || null;
+    this.photos = photos || null; // ContactField[]
+    this.categories = categories || null; // ContactField[]
+    this.urls = urls || null; // ContactField[]
+};
+
+/**
+* Removes contact from device storage.
+* @param successCB success callback
+* @param errorCB error callback
+*/
+Contact.prototype.remove = function(successCB, errorCB) {
+    argscheck.checkArgs('FF', 'Contact.remove', arguments);
+    var fail = errorCB && function(code) {
+        errorCB(new ContactError(code));
+    };
+    if (this.id === null) {
+        fail(ContactError.UNKNOWN_ERROR);
+    }
+    else {
+        exec(successCB, fail, "Contacts", "remove", [this.id]);
+    }
+};
+
+/**
+* Creates a deep copy of this Contact.
+* With the contact ID set to null.
+* @return copy of this Contact
+*/
+Contact.prototype.clone = function() {
+    var clonedContact = utils.clone(this);
+    clonedContact.id = null;
+    clonedContact.rawId = null;
+
+    function nullIds(arr) {
+        if (arr) {
+            for (var i = 0; i < arr.length; ++i) {
+                arr[i].id = null;
+            }
+        }
+    }
+
+    // Loop through and clear out any id's in phones, emails, etc.
+    nullIds(clonedContact.phoneNumbers);
+    nullIds(clonedContact.emails);
+    nullIds(clonedContact.addresses);
+    nullIds(clonedContact.ims);
+    nullIds(clonedContact.organizations);
+    nullIds(clonedContact.categories);
+    nullIds(clonedContact.photos);
+    nullIds(clonedContact.urls);
+    return clonedContact;
+};
+
+/**
+* Persists contact to device storage.
+* @param successCB success callback
+* @param errorCB error callback
+*/
+Contact.prototype.save = function(successCB, errorCB) {
+    argscheck.checkArgs('FFO', 'Contact.save', arguments);
+    var fail = errorCB && function(code) {
+        errorCB(new ContactError(code));
+    };
+    var success = function(result) {
+        if (result) {
+            if (successCB) {
+                var fullContact = require('./contacts').create(result);
+                successCB(convertIn(fullContact));
+            }
+        }
+        else {
+            // no Entry object returned
+            fail(ContactError.UNKNOWN_ERROR);
+        }
+    };
+    var dupContact = convertOut(utils.clone(this));
+    exec(success, fail, "Contacts", "save", [dupContact]);
+};
+
+
+module.exports = Contact;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/www/ContactAddress.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/www/ContactAddress.js b/cordova-lib/spec-plugman/plugins/Contacts/www/ContactAddress.js
new file mode 100644
index 0000000..3d39086
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/www/ContactAddress.js
@@ -0,0 +1,46 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+/**
+* Contact address.
+* @constructor
+* @param {DOMString} id unique identifier, should only be set by native code
+* @param formatted // NOTE: not a W3C standard
+* @param streetAddress
+* @param locality
+* @param region
+* @param postalCode
+* @param country
+*/
+
+var ContactAddress = function(pref, type, formatted, streetAddress, locality, region, postalCode, country) {
+    this.id = null;
+    this.pref = (typeof pref != 'undefined' ? pref : false);
+    this.type = type || null;
+    this.formatted = formatted || null;
+    this.streetAddress = streetAddress || null;
+    this.locality = locality || null;
+    this.region = region || null;
+    this.postalCode = postalCode || null;
+    this.country = country || null;
+};
+
+module.exports = ContactAddress;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/www/ContactError.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/www/ContactError.js b/cordova-lib/spec-plugman/plugins/Contacts/www/ContactError.js
new file mode 100644
index 0000000..01b229a
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/www/ContactError.js
@@ -0,0 +1,42 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+/**
+ *  ContactError.
+ *  An error code assigned by an implementation when an error has occurred
+ * @constructor
+ */
+var ContactError = function(err) {
+    this.code = (typeof err != 'undefined' ? err : null);
+};
+
+/**
+ * Error codes
+ */
+ContactError.UNKNOWN_ERROR = 0;
+ContactError.INVALID_ARGUMENT_ERROR = 1;
+ContactError.TIMEOUT_ERROR = 2;
+ContactError.PENDING_OPERATION_ERROR = 3;
+ContactError.IO_ERROR = 4;
+ContactError.NOT_SUPPORTED_ERROR = 5;
+ContactError.PERMISSION_DENIED_ERROR = 20;
+
+module.exports = ContactError;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/www/ContactField.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/www/ContactField.js b/cordova-lib/spec-plugman/plugins/Contacts/www/ContactField.js
new file mode 100644
index 0000000..e84107a
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/www/ContactField.js
@@ -0,0 +1,37 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+/**
+* Generic contact field.
+* @constructor
+* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
+* @param type
+* @param value
+* @param pref
+*/
+var ContactField = function(type, value, pref) {
+    this.id = null;
+    this.type = (type && type.toString()) || null;
+    this.value = (value && value.toString()) || null;
+    this.pref = (typeof pref != 'undefined' ? pref : false);
+};
+
+module.exports = ContactField;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/www/ContactFindOptions.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/www/ContactFindOptions.js b/cordova-lib/spec-plugman/plugins/Contacts/www/ContactFindOptions.js
new file mode 100644
index 0000000..bd8bf35
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/www/ContactFindOptions.js
@@ -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.
+ *
+*/
+
+/**
+ * ContactFindOptions.
+ * @constructor
+ * @param filter used to match contacts against
+ * @param multiple boolean used to determine if more than one contact should be returned
+ */
+
+var ContactFindOptions = function(filter, multiple) {
+    this.filter = filter || '';
+    this.multiple = (typeof multiple != 'undefined' ? multiple : false);
+};
+
+module.exports = ContactFindOptions;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/www/ContactName.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/www/ContactName.js b/cordova-lib/spec-plugman/plugins/Contacts/www/ContactName.js
new file mode 100644
index 0000000..15cf60b
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/www/ContactName.js
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+/**
+* Contact name.
+* @constructor
+* @param formatted // NOTE: not part of W3C standard
+* @param familyName
+* @param givenName
+* @param middle
+* @param prefix
+* @param suffix
+*/
+var ContactName = function(formatted, familyName, givenName, middle, prefix, suffix) {
+    this.formatted = formatted || null;
+    this.familyName = familyName || null;
+    this.givenName = givenName || null;
+    this.middleName = middle || null;
+    this.honorificPrefix = prefix || null;
+    this.honorificSuffix = suffix || null;
+};
+
+module.exports = ContactName;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/www/ContactOrganization.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/www/ContactOrganization.js b/cordova-lib/spec-plugman/plugins/Contacts/www/ContactOrganization.js
new file mode 100644
index 0000000..5dd242b
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/www/ContactOrganization.js
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+/**
+* Contact organization.
+* @constructor
+* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
+* @param name
+* @param dept
+* @param title
+* @param startDate
+* @param endDate
+* @param location
+* @param desc
+*/
+
+var ContactOrganization = function(pref, type, name, dept, title) {
+    this.id = null;
+    this.pref = (typeof pref != 'undefined' ? pref : false);
+    this.type = type || null;
+    this.name = name || null;
+    this.department = dept || null;
+    this.title = title || null;
+};
+
+module.exports = ContactOrganization;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/www/contacts.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/www/contacts.js b/cordova-lib/spec-plugman/plugins/Contacts/www/contacts.js
new file mode 100644
index 0000000..5e6b4db
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/www/contacts.js
@@ -0,0 +1,76 @@
+/*
+ *
+ * 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'),
+    ContactError = require('./ContactError'),
+    utils = require('cordova/utils'),
+    Contact = require('./Contact');
+
+/**
+* Represents a group of Contacts.
+* @constructor
+*/
+var contacts = {
+    /**
+     * Returns an array of Contacts matching the search criteria.
+     * @param fields that should be searched
+     * @param successCB success callback
+     * @param errorCB error callback
+     * @param {ContactFindOptions} options that can be applied to contact searching
+     * @return array of Contacts matching search criteria
+     */
+    find:function(fields, successCB, errorCB, options) {
+        argscheck.checkArgs('afFO', 'contacts.find', arguments);
+        if (!fields.length) {
+            errorCB && errorCB(new ContactError(ContactError.INVALID_ARGUMENT_ERROR));
+        } else {
+            var win = function(result) {
+                var cs = [];
+                for (var i = 0, l = result.length; i < l; i++) {
+                    cs.push(contacts.create(result[i]));
+                }
+                successCB(cs);
+            };
+            exec(win, errorCB, "Contacts", "search", [fields, options]);
+        }
+    },
+
+    /**
+     * This function creates a new contact, but it does not persist the contact
+     * to device storage. To persist the contact to device storage, invoke
+     * contact.save().
+     * @param properties an object whose properties will be examined to create a new Contact
+     * @returns new Contact object
+     */
+    create:function(properties) {
+        argscheck.checkArgs('O', 'contacts.create', arguments);
+        var contact = new Contact();
+        for (var i in properties) {
+            if (typeof contact[i] !== 'undefined' && properties.hasOwnProperty(i)) {
+                contact[i] = properties[i];
+            }
+        }
+        return contact;
+    }
+};
+
+module.exports = contacts;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/www/ios/Contact.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/www/ios/Contact.js b/cordova-lib/spec-plugman/plugins/Contacts/www/ios/Contact.js
new file mode 100644
index 0000000..b40c41a
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/www/ios/Contact.js
@@ -0,0 +1,51 @@
+/*
+ *
+ * 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'),
+    ContactError = require('./ContactError');
+
+/**
+ * Provides iOS Contact.display API.
+ */
+module.exports = {
+    display : function(errorCB, options) {
+        /*
+         *    Display a contact using the iOS Contact Picker UI
+         *    NOT part of W3C spec so no official documentation
+         *
+         *    @param errorCB error callback
+         *    @param options object
+         *    allowsEditing: boolean AS STRING
+         *        "true" to allow editing the contact
+         *        "false" (default) display contact
+         */
+
+        if (this.id === null) {
+            if (typeof errorCB === "function") {
+                var errorObj = new ContactError(ContactError.UNKNOWN_ERROR);
+                errorCB(errorObj);
+            }
+        }
+        else {
+            exec(null, errorCB, "Contacts","displayContact", [this.id, options]);
+        }
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/Contacts/www/ios/contacts.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/www/ios/contacts.js b/cordova-lib/spec-plugman/plugins/Contacts/www/ios/contacts.js
new file mode 100644
index 0000000..67cf421
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/Contacts/www/ios/contacts.js
@@ -0,0 +1,62 @@
+/*
+ *
+ * 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 iOS enhanced contacts API.
+ */
+module.exports = {
+    newContactUI : function(successCallback) {
+        /*
+         *    Create a contact using the iOS Contact Picker UI
+         *    NOT part of W3C spec so no official documentation
+         *
+         * returns:  the id of the created contact as param to successCallback
+         */
+        exec(successCallback, null, "Contacts","newContact", []);
+    },
+    chooseContact : function(successCallback, options) {
+        /*
+         *    Select a contact using the iOS Contact Picker UI
+         *    NOT part of W3C spec so no official documentation
+         *
+         *    @param errorCB error callback
+         *    @param options object
+         *    allowsEditing: boolean AS STRING
+         *        "true" to allow editing the contact
+         *        "false" (default) display contact
+         *      fields: array of fields to return in contact object (see ContactOptions.fields)
+         *
+         *    @returns
+         *        id of contact selected
+         *        ContactObject
+         *            if no fields provided contact contains just id information
+         *            if fields provided contact object contains information for the specified fields
+         *
+         */
+         var win = function(result) {
+             var fullContact = require('./contacts').create(result);
+            successCallback(fullContact.id, fullContact);
+       };
+        exec(win, null, "Contacts","chooseContact", [options]);
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/DummyPlugin/android-resource.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/android-resource.xml b/cordova-lib/spec-plugman/plugins/DummyPlugin/android-resource.xml
new file mode 100644
index 0000000..421376d
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/DummyPlugin/android-resource.xml
@@ -0,0 +1 @@
+dummy

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/DummyPlugin/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/plugin.xml b/cordova-lib/spec-plugman/plugins/DummyPlugin/plugin.xml
new file mode 100644
index 0000000..4733afb
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/DummyPlugin/plugin.xml
@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="com.phonegap.plugins.dummyplugin"
+    version="0.6.0">
+
+    <!-- new requirement: NO SPACES -->
+    <name>dummyplugin</name>
+    <!-- These are going to be required by plugman-registry -->
+    <description>my description</description>
+    <author>Jackson Badman</author> 
+    <keywords>dummy,plugin</keywords>
+    <license>BSD</license>
+    <!-- end plugman-registry requirements -->
+
+    <asset src="www/dummyplugin.js" target="dummyplugin.js" />
+    <asset src="www/dummyplugin" target="dummyplugin" />
+
+    <config-file target="config.xml" parent="/*">
+        <access origin="build.phonegap.com" />
+        <access origin="s3.amazonaws.com" />
+    </config-file>
+
+    <!-- android -->
+    <platform name="android">
+        <config-file target="AndroidManifest.xml" parent="/manifest/application">
+            <activity android:name="com.phonegap.plugins.dummyplugin.DummyPlugin"
+                      android:label="@string/app_name">
+                <intent-filter>
+                </intent-filter>
+            </activity>
+        </config-file>
+
+        <resource-file src="android-resource.xml" target="res/xml/dummy.xml" />
+
+        <!-- CDV < 2.0 -->
+        <config-file target="res/xml/plugins.xml" parent="/plugins">
+            <plugin name="DummyPlugin"
+                value="com.phonegap.plugins.dummyplugin.DummyPlugin"/>
+        </config-file>
+
+        <!-- CDV 2.0+ (for now) -->
+        <config-file target="res/xml/config.xml" parent="/cordova/plugins">
+            <plugin name="DummyPlugin"
+                value="com.phonegap.plugins.dummyplugin.DummyPlugin"/>
+        </config-file>
+
+        <source-file src="src/android/DummyPlugin.java"
+                target-dir="src/com/phonegap/plugins/dummyplugin" />
+        <lib-file src="src/android/TestLib.jar" />
+    </platform>
+    
+    <!-- amazon fireos -->
+    <platform name="amazon-fireos">
+        <config-file target="AndroidManifest.xml" parent="/manifest/application">
+            <activity android:name="com.phonegap.plugins.dummyplugin.DummyPlugin"
+                      android:label="@string/app_name">
+                <intent-filter>
+                </intent-filter>
+            </activity>
+        </config-file>
+
+        <!-- CDV < 2.0 -->
+        <config-file target="res/xml/plugins.xml" parent="/plugins">
+            <plugin name="DummyPlugin"
+                value="com.phonegap.plugins.dummyplugin.DummyPlugin"/>
+        </config-file>
+
+        <!-- CDV 2.0+ (for now) -->
+        <config-file target="res/xml/config.xml" parent="/cordova/plugins">
+            <plugin name="DummyPlugin"
+                value="com.phonegap.plugins.dummyplugin.DummyPlugin"/>
+        </config-file>
+
+        <source-file src="src/android/DummyPlugin.java"
+                target-dir="src/com/phonegap/plugins/dummyplugin" />
+        <lib-file src="src/android/TestLib.jar" />
+    </platform>
+
+    <!-- blackberry10 -->
+    <platform name="blackberry10">
+        <config-file target="www/config.xml" parent="/widget">
+            <feature id="dummyPlugin" required="true" version="1.0.0.0"/>
+        </config-file>
+
+        <source-file src="src/blackberry10/index.js"/>
+        <js-module src="www/dummyplugin.js" name="Dummy">
+            <clobbers target="dummy" />
+        </js-module>
+    </platform>
+
+        
+    <!-- ios -->
+    <platform name="ios">
+        <!-- CDV < 2.4 -->
+        <plugins-plist key="com.phonegap.plugins.dummyplugin"
+            string="DummyPluginCommand" />
+        
+        <!-- CDV 2.5+ -->
+        <config-file target="config.xml" parent="/widget/plugins">
+            <plugin name="DummyPlugin"
+                value="DummyPluginCommand"/>
+        </config-file>
+
+        <resource-file src="src/ios/DummyPlugin.bundle" />
+
+        <header-file src="src/ios/DummyPluginCommand.h" />
+        <source-file src="src/ios/DummyPluginCommand.m"/>
+
+        <source-file src="src/ios/SourceWithFramework.m" framework="true" />
+
+        <header-file src="src/ios/TargetDirTest.h" target-dir="targetDir" />
+        <source-file src="src/ios/TargetDirTest.m" target-dir="targetDir" />
+
+        <!-- framework for testing (not actual dependency of DummyPlugin -->
+        <framework src="src/ios/libsqlite3.dylib" />
+        <framework src="src/ios/libsqlite3.dylib" weak="true" />
+        <framework src="src/ios/Custom.framework" custom="true" />
+    </platform>
+
+    <!-- wp7 -->
+    <platform name="wp7">
+        <config-file target="config.xml" parent="/*">
+            <feature id="dummyPlugin" required="true" version="1.0.0.0"/>
+        </config-file>
+
+        <source-file src="src/wp7/DummyPlugin.cs"/>
+        <js-module src="www/dummyplugin.js" name="Dummy">
+            <clobbers target="dummy" />
+        </js-module>
+    </platform>
+
+    <!-- wp8 -->
+    <platform name="wp8">
+        <config-file target="config.xml" parent="/*">
+            <feature id="dummyPlugin" required="true" version="1.0.0.0"/>
+        </config-file>
+
+        <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App" after="Tokens">
+            <Extensions />
+        </config-file>
+
+        <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Extensions" after="Extension">
+            <Extension ExtensionName="DummyExtension1" ConsumerID="{5B04B775-356B-4AA0-AAF8-6491FFEA5661}" TaskID="_default" ExtraFile="Extensions\\Extras.xml" />
+            <Extension ExtensionName="DummyExtension2" ConsumerID="{5B04B775-356B-4AA0-AAF8-6491FFEA5661}" TaskID="_default" ExtraFile="Extensions\\Extras.xml" />
+        </config-file>
+
+        <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Extensions" after="FileTypeAssociation;Extension">
+            <FileTypeAssociation TaskID="_default" Name="DummyFileType1" NavUriFragment="fileToken=%s">
+                <SupportedFileTypes>
+                    <FileType ContentType="application/dummy1">.dummy1</FileType>
+                </SupportedFileTypes>
+            </FileTypeAssociation>
+            <FileTypeAssociation TaskID="_default" Name="DummyFileType2" NavUriFragment="fileToken=%s">
+                <SupportedFileTypes>
+                    <FileType ContentType="application/dummy2">.dummy2</FileType>
+                </SupportedFileTypes>
+            </FileTypeAssociation>
+        </config-file>
+
+        <source-file src="src/wp8/DummyPlugin.cs"/>
+        <js-module src="www/dummyplugin.js" name="Dummy">
+            <clobbers target="dummy" />
+        </js-module>
+    </platform>
+
+		<!-- tizen -->
+		<platform name="tizen">
+			<source-file src="src/tizen/dummer.js"/>
+		</platform>
+
+    <!-- windows8 -->
+    <platform name="windows8">
+        <config-file target="config.xml" parent="/*">
+            <feature id="dummyPlugin" required="true" version="1.0.0.0"/>
+        </config-file>
+
+        <source-file src="src/windows8/dummer.js"/>
+        <js-module src="www/dummyplugin.js" name="Dummy">
+            <clobbers target="dummy" />
+        </js-module>
+    </platform>
+
+</plugin>


[37/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/value.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/value.h b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/value.h
new file mode 100644
index 0000000..912b830
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/value.h
@@ -0,0 +1,1069 @@
+#ifndef CPPTL_JSON_H_INCLUDED
+# define CPPTL_JSON_H_INCLUDED
+
+# include "forwards.h"
+# include <string>
+# include <vector>
+
+# ifndef JSON_USE_CPPTL_SMALLMAP
+#  include <map>
+# else
+#  include <cpptl/smallmap.h>
+# endif
+# ifdef JSON_USE_CPPTL
+#  include <cpptl/forwards.h>
+# endif
+
+/** \brief JSON (JavaScript Object Notation).
+ */
+namespace Json {
+
+   /** \brief Type of the value held by a Value object.
+    */
+   enum ValueType
+   {
+      nullValue = 0, ///< 'null' value
+      intValue,      ///< signed integer value
+      uintValue,     ///< unsigned integer value
+      realValue,     ///< double value
+      stringValue,   ///< UTF-8 string value
+      booleanValue,  ///< bool value
+      arrayValue,    ///< array value (ordered list)
+      objectValue    ///< object value (collection of name/value pairs).
+   };
+
+   enum CommentPlacement
+   {
+      commentBefore = 0,        ///< a comment placed on the line before a value
+      commentAfterOnSameLine,   ///< a comment just after a value on the same line
+      commentAfter,             ///< a comment on the line after a value (only make sense for root value)
+      numberOfCommentPlacement
+   };
+
+//# ifdef JSON_USE_CPPTL
+//   typedef CppTL::AnyEnumerator<const char *> EnumMemberNames;
+//   typedef CppTL::AnyEnumerator<const Value &> EnumValues;
+//# endif
+
+   /** \brief Lightweight wrapper to tag static string.
+    *
+    * Value constructor and objectValue member assignment takes advantage of the
+    * StaticString and avoid the cost of string duplication when storing the
+    * string or the member name.
+    *
+    * Example of usage:
+    * \code
+    * Json::Value aValue( StaticString("some text") );
+    * Json::Value object;
+    * static const StaticString code("code");
+    * object[code] = 1234;
+    * \endcode
+    */
+   class JSON_API StaticString
+   {
+   public:
+      explicit StaticString( const char *czstring )
+         : str_( czstring )
+      {
+      }
+
+      operator const char *() const
+      {
+         return str_;
+      }
+
+      const char *c_str() const
+      {
+         return str_;
+      }
+
+   private:
+      const char *str_;
+   };
+
+   /** \brief Represents a <a HREF="http://www.json.org">JSON</a> value.
+    *
+    * This class is a discriminated union wrapper that can represents a:
+    * - signed integer [range: Value::minInt - Value::maxInt]
+    * - unsigned integer (range: 0 - Value::maxUInt)
+    * - double
+    * - UTF-8 string
+    * - boolean
+    * - 'null'
+    * - an ordered list of Value
+    * - collection of name/value pairs (javascript object)
+    *
+    * The type of the held value is represented by a #ValueType and 
+    * can be obtained using type().
+    *
+    * values of an #objectValue or #arrayValue can be accessed using operator[]() methods. 
+    * Non const methods will automatically create the a #nullValue element 
+    * if it does not exist. 
+    * The sequence of an #arrayValue will be automatically resize and initialized 
+    * with #nullValue. resize() can be used to enlarge or truncate an #arrayValue.
+    *
+    * The get() methods can be used to obtains default value in the case the required element
+    * does not exist.
+    *
+    * It is possible to iterate over the list of a #objectValue values using 
+    * the getMemberNames() method.
+    */
+   class JSON_API Value 
+   {
+      friend class ValueIteratorBase;
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+      friend class ValueInternalLink;
+      friend class ValueInternalMap;
+# endif
+   public:
+      typedef std::vector<std::string> Members;
+      typedef ValueIterator iterator;
+      typedef ValueConstIterator const_iterator;
+      typedef Json::UInt UInt;
+      typedef Json::Int Int;
+      typedef UInt ArrayIndex;
+
+      static const Value null;
+      static const Int minInt;
+      static const Int maxInt;
+      static const UInt maxUInt;
+
+   private:
+#ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
+# ifndef JSON_VALUE_USE_INTERNAL_MAP
+      class CZString 
+      {
+      public:
+         enum DuplicationPolicy 
+         {
+            noDuplication = 0,
+            duplicate,
+            duplicateOnCopy
+         };
+         CZString( int index );
+         CZString( const char *cstr, DuplicationPolicy allocate );
+         CZString( const CZString &other );
+         ~CZString();
+         CZString &operator =( const CZString &other );
+         bool operator<( const CZString &other ) const;
+         bool operator==( const CZString &other ) const;
+         int index() const;
+         const char *c_str() const;
+         bool isStaticString() const;
+      private:
+         void swap( CZString &other );
+         const char *cstr_;
+         int index_;
+      };
+
+   public:
+#  ifndef JSON_USE_CPPTL_SMALLMAP
+      typedef std::map<CZString, Value> ObjectValues;
+#  else
+      typedef CppTL::SmallMap<CZString, Value> ObjectValues;
+#  endif // ifndef JSON_USE_CPPTL_SMALLMAP
+# endif // ifndef JSON_VALUE_USE_INTERNAL_MAP
+#endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
+
+   public:
+      /** \brief Create a default Value of the given type.
+
+        This is a very useful constructor.
+        To create an empty array, pass arrayValue.
+        To create an empty object, pass objectValue.
+        Another Value can then be set to this one by assignment.
+	This is useful since clear() and resize() will not alter types.
+
+        Examples:
+	\code
+	Json::Value null_value; // null
+	Json::Value arr_value(Json::arrayValue); // []
+	Json::Value obj_value(Json::objectValue); // {}
+	\endcode
+      */
+      Value( ValueType type = nullValue );
+      Value( Int value );
+      Value( UInt value );
+      Value( double value );
+      Value( const char *value );
+      Value( const char *beginValue, const char *endValue );
+      /** \brief Constructs a value from a static string.
+
+       * Like other value string constructor but do not duplicate the string for
+       * internal storage. The given string must remain alive after the call to this
+       * constructor.
+       * Example of usage:
+       * \code
+       * Json::Value aValue( StaticString("some text") );
+       * \endcode
+       */
+      Value( const StaticString &value );
+      Value( const std::string &value );
+# ifdef JSON_USE_CPPTL
+      Value( const CppTL::ConstString &value );
+# endif
+      Value( bool value );
+      Value( const Value &other );
+      ~Value();
+
+      Value &operator=( const Value &other );
+      /// Swap values.
+      /// \note Currently, comments are intentionally not swapped, for
+      /// both logic and efficiency.
+      void swap( Value &other );
+
+      ValueType type() const;
+
+      bool operator <( const Value &other ) const;
+      bool operator <=( const Value &other ) const;
+      bool operator >=( const Value &other ) const;
+      bool operator >( const Value &other ) const;
+
+      bool operator ==( const Value &other ) const;
+      bool operator !=( const Value &other ) const;
+
+      int compare( const Value &other );
+
+      const char *asCString() const;
+      std::string asString() const;
+# ifdef JSON_USE_CPPTL
+      CppTL::ConstString asConstString() const;
+# endif
+      Int asInt() const;
+      UInt asUInt() const;
+      double asDouble() const;
+      bool asBool() const;
+
+      bool isNull() const;
+      bool isBool() const;
+      bool isInt() const;
+      bool isUInt() const;
+      bool isIntegral() const;
+      bool isDouble() const;
+      bool isNumeric() const;
+      bool isString() const;
+      bool isArray() const;
+      bool isObject() const;
+
+      bool isConvertibleTo( ValueType other ) const;
+
+      /// Number of values in array or object
+      UInt size() const;
+
+      /// \brief Return true if empty array, empty object, or null;
+      /// otherwise, false.
+      bool empty() const;
+
+      /// Return isNull()
+      bool operator!() const;
+
+      /// Remove all object members and array elements.
+      /// \pre type() is arrayValue, objectValue, or nullValue
+      /// \post type() is unchanged
+      void clear();
+
+      /// Resize the array to size elements. 
+      /// New elements are initialized to null.
+      /// May only be called on nullValue or arrayValue.
+      /// \pre type() is arrayValue or nullValue
+      /// \post type() is arrayValue
+      void resize( UInt size );
+
+      /// Access an array element (zero based index ).
+      /// If the array contains less than index element, then null value are inserted
+      /// in the array so that its size is index+1.
+      /// (You may need to say 'value[0u]' to get your compiler to distinguish
+      ///  this from the operator[] which takes a string.)
+      Value &operator[]( UInt index );
+      /// Access an array element (zero based index )
+      /// (You may need to say 'value[0u]' to get your compiler to distinguish
+      ///  this from the operator[] which takes a string.)
+      const Value &operator[]( UInt index ) const;
+      /// If the array contains at least index+1 elements, returns the element value, 
+      /// otherwise returns defaultValue.
+      Value get( UInt index, 
+                 const Value &defaultValue ) const;
+      /// Return true if index < size().
+      bool isValidIndex( UInt index ) const;
+      /// \brief Append value to array at the end.
+      ///
+      /// Equivalent to jsonvalue[jsonvalue.size()] = value;
+      Value &append( const Value &value );
+
+      /// Access an object value by name, create a null member if it does not exist.
+      Value &operator[]( const char *key );
+      /// Access an object value by name, returns null if there is no member with that name.
+      const Value &operator[]( const char *key ) const;
+      /// Access an object value by name, create a null member if it does not exist.
+      Value &operator[]( const std::string &key );
+      /// Access an object value by name, returns null if there is no member with that name.
+      const Value &operator[]( const std::string &key ) const;
+      /** \brief Access an object value by name, create a null member if it does not exist.
+
+       * If the object as no entry for that name, then the member name used to store
+       * the new entry is not duplicated.
+       * Example of use:
+       * \code
+       * Json::Value object;
+       * static const StaticString code("code");
+       * object[code] = 1234;
+       * \endcode
+       */
+      Value &operator[]( const StaticString &key );
+# ifdef JSON_USE_CPPTL
+      /// Access an object value by name, create a null member if it does not exist.
+      Value &operator[]( const CppTL::ConstString &key );
+      /// Access an object value by name, returns null if there is no member with that name.
+      const Value &operator[]( const CppTL::ConstString &key ) const;
+# endif
+      /// Return the member named key if it exist, defaultValue otherwise.
+      Value get( const char *key, 
+                 const Value &defaultValue ) const;
+      /// Return the member named key if it exist, defaultValue otherwise.
+      Value get( const std::string &key,
+                 const Value &defaultValue ) const;
+# ifdef JSON_USE_CPPTL
+      /// Return the member named key if it exist, defaultValue otherwise.
+      Value get( const CppTL::ConstString &key,
+                 const Value &defaultValue ) const;
+# endif
+      /// \brief Remove and return the named member.  
+      ///
+      /// Do nothing if it did not exist.
+      /// \return the removed Value, or null.
+      /// \pre type() is objectValue or nullValue
+      /// \post type() is unchanged
+      Value removeMember( const char* key );
+      /// Same as removeMember(const char*)
+      Value removeMember( const std::string &key );
+
+      /// Return true if the object has a member named key.
+      bool isMember( const char *key ) const;
+      /// Return true if the object has a member named key.
+      bool isMember( const std::string &key ) const;
+# ifdef JSON_USE_CPPTL
+      /// Return true if the object has a member named key.
+      bool isMember( const CppTL::ConstString &key ) const;
+# endif
+
+      /// \brief Return a list of the member names.
+      ///
+      /// If null, return an empty list.
+      /// \pre type() is objectValue or nullValue
+      /// \post if type() was nullValue, it remains nullValue
+      Members getMemberNames() const;
+
+//# ifdef JSON_USE_CPPTL
+//      EnumMemberNames enumMemberNames() const;
+//      EnumValues enumValues() const;
+//# endif
+
+      /// Comments must be //... or /* ... */
+      void setComment( const char *comment,
+                       CommentPlacement placement );
+      /// Comments must be //... or /* ... */
+      void setComment( const std::string &comment,
+                       CommentPlacement placement );
+      bool hasComment( CommentPlacement placement ) const;
+      /// Include delimiters and embedded newlines.
+      std::string getComment( CommentPlacement placement ) const;
+
+      std::string toStyledString() const;
+
+      const_iterator begin() const;
+      const_iterator end() const;
+
+      iterator begin();
+      iterator end();
+
+   private:
+      Value &resolveReference( const char *key, 
+                               bool isStatic );
+
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+      inline bool isItemAvailable() const
+      {
+         return itemIsUsed_ == 0;
+      }
+
+      inline void setItemUsed( bool isUsed = true )
+      {
+         itemIsUsed_ = isUsed ? 1 : 0;
+      }
+
+      inline bool isMemberNameStatic() const
+      {
+         return memberNameIsStatic_ == 0;
+      }
+
+      inline void setMemberNameIsStatic( bool isStatic )
+      {
+         memberNameIsStatic_ = isStatic ? 1 : 0;
+      }
+# endif // # ifdef JSON_VALUE_USE_INTERNAL_MAP
+
+   private:
+      struct CommentInfo
+      {
+         CommentInfo();
+         ~CommentInfo();
+
+         void setComment( const char *text );
+
+         char *comment_;
+      };
+
+      //struct MemberNamesTransform
+      //{
+      //   typedef const char *result_type;
+      //   const char *operator()( const CZString &name ) const
+      //   {
+      //      return name.c_str();
+      //   }
+      //};
+
+      union ValueHolder
+      {
+         Int int_;
+         UInt uint_;
+         double real_;
+         bool bool_;
+         char *string_;
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+         ValueInternalArray *array_;
+         ValueInternalMap *map_;
+#else
+         ObjectValues *map_;
+# endif
+      } value_;
+      ValueType type_ : 8;
+      int allocated_ : 1;     // Notes: if declared as bool, bitfield is useless.
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+      unsigned int itemIsUsed_ : 1;      // used by the ValueInternalMap container.
+      int memberNameIsStatic_ : 1;       // used by the ValueInternalMap container.
+# endif
+      CommentInfo *comments_;
+   };
+
+
+   /** \brief Experimental and untested: represents an element of the "path" to access a node.
+    */
+   class PathArgument
+   {
+   public:
+      friend class Path;
+
+      PathArgument();
+      PathArgument( UInt index );
+      PathArgument( const char *key );
+      PathArgument( const std::string &key );
+
+   private:
+      enum Kind
+      {
+         kindNone = 0,
+         kindIndex,
+         kindKey
+      };
+      std::string key_;
+      UInt index_;
+      Kind kind_;
+   };
+
+   /** \brief Experimental and untested: represents a "path" to access a node.
+    *
+    * Syntax:
+    * - "." => root node
+    * - ".[n]" => elements at index 'n' of root node (an array value)
+    * - ".name" => member named 'name' of root node (an object value)
+    * - ".name1.name2.name3"
+    * - ".[0][1][2].name1[3]"
+    * - ".%" => member name is provided as parameter
+    * - ".[%]" => index is provided as parameter
+    */
+   class Path
+   {
+   public:
+      Path( const std::string &path,
+            const PathArgument &a1 = PathArgument(),
+            const PathArgument &a2 = PathArgument(),
+            const PathArgument &a3 = PathArgument(),
+            const PathArgument &a4 = PathArgument(),
+            const PathArgument &a5 = PathArgument() );
+
+      const Value &resolve( const Value &root ) const;
+      Value resolve( const Value &root, 
+                     const Value &defaultValue ) const;
+      /// Creates the "path" to access the specified node and returns a reference on the node.
+      Value &make( Value &root ) const;
+
+   private:
+      typedef std::vector<const PathArgument *> InArgs;
+      typedef std::vector<PathArgument> Args;
+
+      void makePath( const std::string &path,
+                     const InArgs &in );
+      void addPathInArg( const std::string &path, 
+                         const InArgs &in, 
+                         InArgs::const_iterator &itInArg, 
+                         PathArgument::Kind kind );
+      void invalidPath( const std::string &path, 
+                        int location );
+
+      Args args_;
+   };
+
+   /** \brief Experimental do not use: Allocator to customize member name and string value memory management done by Value.
+    *
+    * - makeMemberName() and releaseMemberName() are called to respectively duplicate and
+    *   free an Json::objectValue member name.
+    * - duplicateStringValue() and releaseStringValue() are called similarly to
+    *   duplicate and free a Json::stringValue value.
+    */
+   class ValueAllocator
+   {
+   public:
+      enum { unknown = (unsigned)-1 };
+
+      virtual ~ValueAllocator();
+
+      virtual char *makeMemberName( const char *memberName ) = 0;
+      virtual void releaseMemberName( char *memberName ) = 0;
+      virtual char *duplicateStringValue( const char *value, 
+                                          unsigned int length = unknown ) = 0;
+      virtual void releaseStringValue( char *value ) = 0;
+   };
+
+#ifdef JSON_VALUE_USE_INTERNAL_MAP
+   /** \brief Allocator to customize Value internal map.
+    * Below is an example of a simple implementation (default implementation actually
+    * use memory pool for speed).
+    * \code
+      class DefaultValueMapAllocator : public ValueMapAllocator
+      {
+      public: // overridden from ValueMapAllocator
+         virtual ValueInternalMap *newMap()
+         {
+            return new ValueInternalMap();
+         }
+
+         virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other )
+         {
+            return new ValueInternalMap( other );
+         }
+
+         virtual void destructMap( ValueInternalMap *map )
+         {
+            delete map;
+         }
+
+         virtual ValueInternalLink *allocateMapBuckets( unsigned int size )
+         {
+            return new ValueInternalLink[size];
+         }
+
+         virtual void releaseMapBuckets( ValueInternalLink *links )
+         {
+            delete [] links;
+         }
+
+         virtual ValueInternalLink *allocateMapLink()
+         {
+            return new ValueInternalLink();
+         }
+
+         virtual void releaseMapLink( ValueInternalLink *link )
+         {
+            delete link;
+         }
+      };
+    * \endcode
+    */ 
+   class JSON_API ValueMapAllocator
+   {
+   public:
+      virtual ~ValueMapAllocator();
+      virtual ValueInternalMap *newMap() = 0;
+      virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other ) = 0;
+      virtual void destructMap( ValueInternalMap *map ) = 0;
+      virtual ValueInternalLink *allocateMapBuckets( unsigned int size ) = 0;
+      virtual void releaseMapBuckets( ValueInternalLink *links ) = 0;
+      virtual ValueInternalLink *allocateMapLink() = 0;
+      virtual void releaseMapLink( ValueInternalLink *link ) = 0;
+   };
+
+   /** \brief ValueInternalMap hash-map bucket chain link (for internal use only).
+    * \internal previous_ & next_ allows for bidirectional traversal.
+    */
+   class JSON_API ValueInternalLink
+   {
+   public:
+      enum { itemPerLink = 6 };  // sizeof(ValueInternalLink) = 128 on 32 bits architecture.
+      enum InternalFlags { 
+         flagAvailable = 0,
+         flagUsed = 1
+      };
+
+      ValueInternalLink();
+
+      ~ValueInternalLink();
+
+      Value items_[itemPerLink];
+      char *keys_[itemPerLink];
+      ValueInternalLink *previous_;
+      ValueInternalLink *next_;
+   };
+
+
+   /** \brief A linked page based hash-table implementation used internally by Value.
+    * \internal ValueInternalMap is a traditional bucket based hash-table, with a linked
+    * list in each bucket to handle collision. There is an addional twist in that
+    * each node of the collision linked list is a page containing a fixed amount of
+    * value. This provides a better compromise between memory usage and speed.
+    * 
+    * Each bucket is made up of a chained list of ValueInternalLink. The last
+    * link of a given bucket can be found in the 'previous_' field of the following bucket.
+    * The last link of the last bucket is stored in tailLink_ as it has no following bucket.
+    * Only the last link of a bucket may contains 'available' item. The last link always
+    * contains at least one element unless is it the bucket one very first link.
+    */
+   class JSON_API ValueInternalMap
+   {
+      friend class ValueIteratorBase;
+      friend class Value;
+   public:
+      typedef unsigned int HashKey;
+      typedef unsigned int BucketIndex;
+
+# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
+      struct IteratorState
+      {
+         IteratorState() 
+            : map_(0)
+            , link_(0)
+            , itemIndex_(0)
+            , bucketIndex_(0) 
+         {
+         }
+         ValueInternalMap *map_;
+         ValueInternalLink *link_;
+         BucketIndex itemIndex_;
+         BucketIndex bucketIndex_;
+      };
+# endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
+
+      ValueInternalMap();
+      ValueInternalMap( const ValueInternalMap &other );
+      ValueInternalMap &operator =( const ValueInternalMap &other );
+      ~ValueInternalMap();
+
+      void swap( ValueInternalMap &other );
+
+      BucketIndex size() const;
+
+      void clear();
+
+      bool reserveDelta( BucketIndex growth );
+
+      bool reserve( BucketIndex newItemCount );
+
+      const Value *find( const char *key ) const;
+
+      Value *find( const char *key );
+
+      Value &resolveReference( const char *key, 
+                               bool isStatic );
+
+      void remove( const char *key );
+
+      void doActualRemove( ValueInternalLink *link, 
+                           BucketIndex index,
+                           BucketIndex bucketIndex );
+
+      ValueInternalLink *&getLastLinkInBucket( BucketIndex bucketIndex );
+
+      Value &setNewItem( const char *key, 
+                         bool isStatic, 
+                         ValueInternalLink *link, 
+                         BucketIndex index );
+
+      Value &unsafeAdd( const char *key, 
+                        bool isStatic, 
+                        HashKey hashedKey );
+
+      HashKey hash( const char *key ) const;
+
+      int compare( const ValueInternalMap &other ) const;
+
+   private:
+      void makeBeginIterator( IteratorState &it ) const;
+      void makeEndIterator( IteratorState &it ) const;
+      static bool equals( const IteratorState &x, const IteratorState &other );
+      static void increment( IteratorState &iterator );
+      static void incrementBucket( IteratorState &iterator );
+      static void decrement( IteratorState &iterator );
+      static const char *key( const IteratorState &iterator );
+      static const char *key( const IteratorState &iterator, bool &isStatic );
+      static Value &value( const IteratorState &iterator );
+      static int distance( const IteratorState &x, const IteratorState &y );
+
+   private:
+      ValueInternalLink *buckets_;
+      ValueInternalLink *tailLink_;
+      BucketIndex bucketsSize_;
+      BucketIndex itemCount_;
+   };
+
+   /** \brief A simplified deque implementation used internally by Value.
+   * \internal
+   * It is based on a list of fixed "page", each page contains a fixed number of items.
+   * Instead of using a linked-list, a array of pointer is used for fast item look-up.
+   * Look-up for an element is as follow:
+   * - compute page index: pageIndex = itemIndex / itemsPerPage
+   * - look-up item in page: pages_[pageIndex][itemIndex % itemsPerPage]
+   *
+   * Insertion is amortized constant time (only the array containing the index of pointers
+   * need to be reallocated when items are appended).
+   */
+   class JSON_API ValueInternalArray
+   {
+      friend class Value;
+      friend class ValueIteratorBase;
+   public:
+      enum { itemsPerPage = 8 };    // should be a power of 2 for fast divide and modulo.
+      typedef Value::ArrayIndex ArrayIndex;
+      typedef unsigned int PageIndex;
+
+# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
+      struct IteratorState // Must be a POD
+      {
+         IteratorState() 
+            : array_(0)
+            , currentPageIndex_(0)
+            , currentItemIndex_(0) 
+         {
+         }
+         ValueInternalArray *array_;
+         Value **currentPageIndex_;
+         unsigned int currentItemIndex_;
+      };
+# endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
+
+      ValueInternalArray();
+      ValueInternalArray( const ValueInternalArray &other );
+      ValueInternalArray &operator =( const ValueInternalArray &other );
+      ~ValueInternalArray();
+      void swap( ValueInternalArray &other );
+
+      void clear();
+      void resize( ArrayIndex newSize );
+
+      Value &resolveReference( ArrayIndex index );
+
+      Value *find( ArrayIndex index ) const;
+
+      ArrayIndex size() const;
+
+      int compare( const ValueInternalArray &other ) const;
+
+   private:
+      static bool equals( const IteratorState &x, const IteratorState &other );
+      static void increment( IteratorState &iterator );
+      static void decrement( IteratorState &iterator );
+      static Value &dereference( const IteratorState &iterator );
+      static Value &unsafeDereference( const IteratorState &iterator );
+      static int distance( const IteratorState &x, const IteratorState &y );
+      static ArrayIndex indexOf( const IteratorState &iterator );
+      void makeBeginIterator( IteratorState &it ) const;
+      void makeEndIterator( IteratorState &it ) const;
+      void makeIterator( IteratorState &it, ArrayIndex index ) const;
+
+      void makeIndexValid( ArrayIndex index );
+
+      Value **pages_;
+      ArrayIndex size_;
+      PageIndex pageCount_;
+   };
+
+   /** \brief Experimental: do not use. Allocator to customize Value internal array.
+    * Below is an example of a simple implementation (actual implementation use
+    * memory pool).
+      \code
+class DefaultValueArrayAllocator : public ValueArrayAllocator
+{
+public: // overridden from ValueArrayAllocator
+   virtual ~DefaultValueArrayAllocator()
+   {
+   }
+
+   virtual ValueInternalArray *newArray()
+   {
+      return new ValueInternalArray();
+   }
+
+   virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other )
+   {
+      return new ValueInternalArray( other );
+   }
+
+   virtual void destruct( ValueInternalArray *array )
+   {
+      delete array;
+   }
+
+   virtual void reallocateArrayPageIndex( Value **&indexes, 
+                                          ValueInternalArray::PageIndex &indexCount,
+                                          ValueInternalArray::PageIndex minNewIndexCount )
+   {
+      ValueInternalArray::PageIndex newIndexCount = (indexCount*3)/2 + 1;
+      if ( minNewIndexCount > newIndexCount )
+         newIndexCount = minNewIndexCount;
+      void *newIndexes = realloc( indexes, sizeof(Value*) * newIndexCount );
+      if ( !newIndexes )
+         throw std::bad_alloc();
+      indexCount = newIndexCount;
+      indexes = static_cast<Value **>( newIndexes );
+   }
+   virtual void releaseArrayPageIndex( Value **indexes, 
+                                       ValueInternalArray::PageIndex indexCount )
+   {
+      if ( indexes )
+         free( indexes );
+   }
+
+   virtual Value *allocateArrayPage()
+   {
+      return static_cast<Value *>( malloc( sizeof(Value) * ValueInternalArray::itemsPerPage ) );
+   }
+
+   virtual void releaseArrayPage( Value *value )
+   {
+      if ( value )
+         free( value );
+   }
+};
+      \endcode
+    */ 
+   class JSON_API ValueArrayAllocator
+   {
+   public:
+      virtual ~ValueArrayAllocator();
+      virtual ValueInternalArray *newArray() = 0;
+      virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other ) = 0;
+      virtual void destructArray( ValueInternalArray *array ) = 0;
+      /** \brief Reallocate array page index.
+       * Reallocates an array of pointer on each page.
+       * \param indexes [input] pointer on the current index. May be \c NULL.
+       *                [output] pointer on the new index of at least 
+       *                         \a minNewIndexCount pages. 
+       * \param indexCount [input] current number of pages in the index.
+       *                   [output] number of page the reallocated index can handle.
+       *                            \b MUST be >= \a minNewIndexCount.
+       * \param minNewIndexCount Minimum number of page the new index must be able to
+       *                         handle.
+       */
+      virtual void reallocateArrayPageIndex( Value **&indexes, 
+                                             ValueInternalArray::PageIndex &indexCount,
+                                             ValueInternalArray::PageIndex minNewIndexCount ) = 0;
+      virtual void releaseArrayPageIndex( Value **indexes, 
+                                          ValueInternalArray::PageIndex indexCount ) = 0;
+      virtual Value *allocateArrayPage() = 0;
+      virtual void releaseArrayPage( Value *value ) = 0;
+   };
+#endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
+
+
+   /** \brief base class for Value iterators.
+    *
+    */
+   class ValueIteratorBase
+   {
+   public:
+      typedef unsigned int size_t;
+      typedef int difference_type;
+      typedef ValueIteratorBase SelfType;
+
+      ValueIteratorBase();
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+      explicit ValueIteratorBase( const Value::ObjectValues::iterator &current );
+#else
+      ValueIteratorBase( const ValueInternalArray::IteratorState &state );
+      ValueIteratorBase( const ValueInternalMap::IteratorState &state );
+#endif
+
+      bool operator ==( const SelfType &other ) const
+      {
+         return isEqual( other );
+      }
+
+      bool operator !=( const SelfType &other ) const
+      {
+         return !isEqual( other );
+      }
+
+      difference_type operator -( const SelfType &other ) const
+      {
+         return computeDistance( other );
+      }
+
+      /// Return either the index or the member name of the referenced value as a Value.
+      Value key() const;
+
+      /// Return the index of the referenced Value. -1 if it is not an arrayValue.
+      UInt index() const;
+
+      /// Return the member name of the referenced Value. "" if it is not an objectValue.
+      const char *memberName() const;
+
+   protected:
+      Value &deref() const;
+
+      void increment();
+
+      void decrement();
+
+      difference_type computeDistance( const SelfType &other ) const;
+
+      bool isEqual( const SelfType &other ) const;
+
+      void copy( const SelfType &other );
+
+   private:
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+      Value::ObjectValues::iterator current_;
+      // Indicates that iterator is for a null value.
+      bool isNull_;
+#else
+      union
+      {
+         ValueInternalArray::IteratorState array_;
+         ValueInternalMap::IteratorState map_;
+      } iterator_;
+      bool isArray_;
+#endif
+   };
+
+   /** \brief const iterator for object and array value.
+    *
+    */
+   class ValueConstIterator : public ValueIteratorBase
+   {
+      friend class Value;
+   public:
+      typedef unsigned int size_t;
+      typedef int difference_type;
+      typedef const Value &reference;
+      typedef const Value *pointer;
+      typedef ValueConstIterator SelfType;
+
+      ValueConstIterator();
+   private:
+      /*! \internal Use by Value to create an iterator.
+       */
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+      explicit ValueConstIterator( const Value::ObjectValues::iterator &current );
+#else
+      ValueConstIterator( const ValueInternalArray::IteratorState &state );
+      ValueConstIterator( const ValueInternalMap::IteratorState &state );
+#endif
+   public:
+      SelfType &operator =( const ValueIteratorBase &other );
+
+      SelfType operator++( int )
+      {
+         SelfType temp( *this );
+         ++*this;
+         return temp;
+      }
+
+      SelfType operator--( int )
+      {
+         SelfType temp( *this );
+         --*this;
+         return temp;
+      }
+
+      SelfType &operator--()
+      {
+         decrement();
+         return *this;
+      }
+
+      SelfType &operator++()
+      {
+         increment();
+         return *this;
+      }
+
+      reference operator *() const
+      {
+         return deref();
+      }
+   };
+
+
+   /** \brief Iterator for object and array value.
+    */
+   class ValueIterator : public ValueIteratorBase
+   {
+      friend class Value;
+   public:
+      typedef unsigned int size_t;
+      typedef int difference_type;
+      typedef Value &reference;
+      typedef Value *pointer;
+      typedef ValueIterator SelfType;
+
+      ValueIterator();
+      ValueIterator( const ValueConstIterator &other );
+      ValueIterator( const ValueIterator &other );
+   private:
+      /*! \internal Use by Value to create an iterator.
+       */
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+      explicit ValueIterator( const Value::ObjectValues::iterator &current );
+#else
+      ValueIterator( const ValueInternalArray::IteratorState &state );
+      ValueIterator( const ValueInternalMap::IteratorState &state );
+#endif
+   public:
+
+      SelfType &operator =( const SelfType &other );
+
+      SelfType operator++( int )
+      {
+         SelfType temp( *this );
+         ++*this;
+         return temp;
+      }
+
+      SelfType operator--( int )
+      {
+         SelfType temp( *this );
+         --*this;
+         return temp;
+      }
+
+      SelfType &operator--()
+      {
+         decrement();
+         return *this;
+      }
+
+      SelfType &operator++()
+      {
+         increment();
+         return *this;
+      }
+
+      reference operator *() const
+      {
+         return deref();
+      }
+   };
+
+
+} // namespace Json
+
+
+#endif // CPPTL_JSON_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/writer.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/writer.h b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/writer.h
new file mode 100644
index 0000000..16cf022
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/writer.h
@@ -0,0 +1,174 @@
+#ifndef JSON_WRITER_H_INCLUDED
+# define JSON_WRITER_H_INCLUDED
+
+# include "value.h"
+# include <vector>
+# include <string>
+# include <iostream>
+
+namespace Json {
+
+   class Value;
+
+   /** \brief Abstract class for writers.
+    */
+   class JSON_API Writer
+   {
+   public:
+      virtual ~Writer();
+
+      virtual std::string write( const Value &root ) = 0;
+   };
+
+   /** \brief Outputs a Value in <a HREF="http://www.json.org">JSON</a> format without formatting (not human friendly).
+    *
+    * The JSON document is written in a single line. It is not intended for 'human' consumption,
+    * but may be useful to support feature such as RPC where bandwidth is limited.
+    * \sa Reader, Value
+    */
+   class JSON_API FastWriter : public Writer
+   {
+   public:
+      FastWriter();
+      virtual ~FastWriter(){}
+
+      void enableYAMLCompatibility();
+
+   public: // overridden from Writer
+      virtual std::string write( const Value &root );
+
+   private:
+      void writeValue( const Value &value );
+
+      std::string document_;
+      bool yamlCompatibilityEnabled_;
+   };
+
+   /** \brief Writes a Value in <a HREF="http://www.json.org">JSON</a> format in a human friendly way.
+    *
+    * The rules for line break and indent are as follow:
+    * - Object value:
+    *     - if empty then print {} without indent and line break
+    *     - if not empty the print '{', line break & indent, print one value per line
+    *       and then unindent and line break and print '}'.
+    * - Array value:
+    *     - if empty then print [] without indent and line break
+    *     - if the array contains no object value, empty array or some other value types,
+    *       and all the values fit on one lines, then print the array on a single line.
+    *     - otherwise, it the values do not fit on one line, or the array contains
+    *       object or non empty array, then print one value per line.
+    *
+    * If the Value have comments then they are outputed according to their #CommentPlacement.
+    *
+    * \sa Reader, Value, Value::setComment()
+    */
+   class JSON_API StyledWriter: public Writer
+   {
+   public:
+      StyledWriter();
+      virtual ~StyledWriter(){}
+
+   public: // overridden from Writer
+      /** \brief Serialize a Value in <a HREF="http://www.json.org">JSON</a> format.
+       * \param root Value to serialize.
+       * \return String containing the JSON document that represents the root value.
+       */
+      virtual std::string write( const Value &root );
+
+   private:
+      void writeValue( const Value &value );
+      void writeArrayValue( const Value &value );
+      bool isMultineArray( const Value &value );
+      void pushValue( const std::string &value );
+      void writeIndent();
+      void writeWithIndent( const std::string &value );
+      void indent();
+      void unindent();
+      void writeCommentBeforeValue( const Value &root );
+      void writeCommentAfterValueOnSameLine( const Value &root );
+      bool hasCommentForValue( const Value &value );
+      static std::string normalizeEOL( const std::string &text );
+
+      typedef std::vector<std::string> ChildValues;
+
+      ChildValues childValues_;
+      std::string document_;
+      std::string indentString_;
+      int rightMargin_;
+      int indentSize_;
+      bool addChildValues_;
+   };
+
+   /** \brief Writes a Value in <a HREF="http://www.json.org">JSON</a> format in a human friendly way,
+        to a stream rather than to a string.
+    *
+    * The rules for line break and indent are as follow:
+    * - Object value:
+    *     - if empty then print {} without indent and line break
+    *     - if not empty the print '{', line break & indent, print one value per line
+    *       and then unindent and line break and print '}'.
+    * - Array value:
+    *     - if empty then print [] without indent and line break
+    *     - if the array contains no object value, empty array or some other value types,
+    *       and all the values fit on one lines, then print the array on a single line.
+    *     - otherwise, it the values do not fit on one line, or the array contains
+    *       object or non empty array, then print one value per line.
+    *
+    * If the Value have comments then they are outputed according to their #CommentPlacement.
+    *
+    * \param indentation Each level will be indented by this amount extra.
+    * \sa Reader, Value, Value::setComment()
+    */
+   class JSON_API StyledStreamWriter
+   {
+   public:
+      StyledStreamWriter( std::string indentation="\t" );
+      ~StyledStreamWriter(){}
+
+   public:
+      /** \brief Serialize a Value in <a HREF="http://www.json.org">JSON</a> format.
+       * \param out Stream to write to. (Can be ostringstream, e.g.)
+       * \param root Value to serialize.
+       * \note There is no point in deriving from Writer, since write() should not return a value.
+       */
+      void write( std::ostream &out, const Value &root );
+
+   private:
+      void writeValue( const Value &value );
+      void writeArrayValue( const Value &value );
+      bool isMultineArray( const Value &value );
+      void pushValue( const std::string &value );
+      void writeIndent();
+      void writeWithIndent( const std::string &value );
+      void indent();
+      void unindent();
+      void writeCommentBeforeValue( const Value &root );
+      void writeCommentAfterValueOnSameLine( const Value &root );
+      bool hasCommentForValue( const Value &value );
+      static std::string normalizeEOL( const std::string &text );
+
+      typedef std::vector<std::string> ChildValues;
+
+      ChildValues childValues_;
+      std::ostream* document_;
+      std::string indentString_;
+      int rightMargin_;
+      std::string indentation_;
+      bool addChildValues_;
+   };
+
+   std::string JSON_API valueToString( Int value );
+   std::string JSON_API valueToString( UInt value );
+   std::string JSON_API valueToString( double value );
+   std::string JSON_API valueToString( bool value );
+   std::string JSON_API valueToQuotedString( const char *value );
+
+   /// \brief Output using the StyledStreamWriter.
+   /// \see Json::operator>>()
+   std::ostream& operator<<( std::ostream&, const Value &root );
+
+} // namespace Json
+
+
+
+#endif // JSON_WRITER_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_batchallocator.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_batchallocator.h b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_batchallocator.h
new file mode 100644
index 0000000..141ca77
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_batchallocator.h
@@ -0,0 +1,125 @@
+#ifndef JSONCPP_BATCHALLOCATOR_H_INCLUDED
+# define JSONCPP_BATCHALLOCATOR_H_INCLUDED
+
+# include <stdlib.h>
+# include <assert.h>
+
+# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
+
+namespace Json {
+
+/* Fast memory allocator.
+ *
+ * This memory allocator allocates memory for a batch of object (specified by
+ * the page size, the number of object in each page).
+ *
+ * It does not allow the destruction of a single object. All the allocated objects
+ * can be destroyed at once. The memory can be either released or reused for future
+ * allocation.
+ * 
+ * The in-place new operator must be used to construct the object using the pointer
+ * returned by allocate.
+ */
+template<typename AllocatedType
+        ,const unsigned int objectPerAllocation>
+class BatchAllocator
+{
+public:
+   typedef AllocatedType Type;
+
+   BatchAllocator( unsigned int objectsPerPage = 255 )
+      : freeHead_( 0 )
+      , objectsPerPage_( objectsPerPage )
+   {
+//      printf( "Size: %d => %s\n", sizeof(AllocatedType), typeid(AllocatedType).name() );
+      assert( sizeof(AllocatedType) * objectPerAllocation >= sizeof(AllocatedType *) ); // We must be able to store a slist in the object free space.
+      assert( objectsPerPage >= 16 );
+      batches_ = allocateBatch( 0 );   // allocated a dummy page
+      currentBatch_ = batches_;
+   }
+
+   ~BatchAllocator()
+   {
+      for ( BatchInfo *batch = batches_; batch;  )
+      {
+         BatchInfo *nextBatch = batch->next_;
+         free( batch );
+         batch = nextBatch;
+      }
+   }
+
+   /// allocate space for an array of objectPerAllocation object.
+   /// @warning it is the responsibility of the caller to call objects constructors.
+   AllocatedType *allocate()
+   {
+      if ( freeHead_ ) // returns node from free list.
+      {
+         AllocatedType *object = freeHead_;
+         freeHead_ = *(AllocatedType **)object;
+         return object;
+      }
+      if ( currentBatch_->used_ == currentBatch_->end_ )
+      {
+         currentBatch_ = currentBatch_->next_;
+         while ( currentBatch_  &&  currentBatch_->used_ == currentBatch_->end_ )
+            currentBatch_ = currentBatch_->next_;
+
+         if ( !currentBatch_  ) // no free batch found, allocate a new one
+         { 
+            currentBatch_ = allocateBatch( objectsPerPage_ );
+            currentBatch_->next_ = batches_; // insert at the head of the list
+            batches_ = currentBatch_;
+         }
+      }
+      AllocatedType *allocated = currentBatch_->used_;
+      currentBatch_->used_ += objectPerAllocation;
+      return allocated;
+   }
+
+   /// Release the object.
+   /// @warning it is the responsibility of the caller to actually destruct the object.
+   void release( AllocatedType *object )
+   {
+      assert( object != 0 );
+      *(AllocatedType **)object = freeHead_;
+      freeHead_ = object;
+   }
+
+private:
+   struct BatchInfo
+   {
+      BatchInfo *next_;
+      AllocatedType *used_;
+      AllocatedType *end_;
+      AllocatedType buffer_[objectPerAllocation];
+   };
+
+   // disabled copy constructor and assignment operator.
+   BatchAllocator( const BatchAllocator & );
+   void operator =( const BatchAllocator &);
+
+   static BatchInfo *allocateBatch( unsigned int objectsPerPage )
+   {
+      const unsigned int mallocSize = sizeof(BatchInfo) - sizeof(AllocatedType)* objectPerAllocation
+                                + sizeof(AllocatedType) * objectPerAllocation * objectsPerPage;
+      BatchInfo *batch = static_cast<BatchInfo*>( malloc( mallocSize ) );
+      batch->next_ = 0;
+      batch->used_ = batch->buffer_;
+      batch->end_ = batch->buffer_ + objectsPerPage;
+      return batch;
+   }
+
+   BatchInfo *batches_;
+   BatchInfo *currentBatch_;
+   /// Head of a single linked list within the allocated space of freed object
+   AllocatedType *freeHead_;
+   unsigned int objectsPerPage_;
+};
+
+
+} // namespace Json
+
+# endif // ifndef JSONCPP_DOC_INCLUDE_IMPLEMENTATION
+
+#endif // JSONCPP_BATCHALLOCATOR_H_INCLUDED
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_internalarray.inl
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_internalarray.inl b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_internalarray.inl
new file mode 100644
index 0000000..9b985d2
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_internalarray.inl
@@ -0,0 +1,448 @@
+// included by json_value.cpp
+// everything is within Json namespace
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class ValueInternalArray
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+ValueArrayAllocator::~ValueArrayAllocator()
+{
+}
+
+// //////////////////////////////////////////////////////////////////
+// class DefaultValueArrayAllocator
+// //////////////////////////////////////////////////////////////////
+#ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
+class DefaultValueArrayAllocator : public ValueArrayAllocator
+{
+public: // overridden from ValueArrayAllocator
+   virtual ~DefaultValueArrayAllocator()
+   {
+   }
+
+   virtual ValueInternalArray *newArray()
+   {
+      return new ValueInternalArray();
+   }
+
+   virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other )
+   {
+      return new ValueInternalArray( other );
+   }
+
+   virtual void destructArray( ValueInternalArray *array )
+   {
+      delete array;
+   }
+
+   virtual void reallocateArrayPageIndex( Value **&indexes, 
+                                          ValueInternalArray::PageIndex &indexCount,
+                                          ValueInternalArray::PageIndex minNewIndexCount )
+   {
+      ValueInternalArray::PageIndex newIndexCount = (indexCount*3)/2 + 1;
+      if ( minNewIndexCount > newIndexCount )
+         newIndexCount = minNewIndexCount;
+      void *newIndexes = realloc( indexes, sizeof(Value*) * newIndexCount );
+      if ( !newIndexes )
+         throw std::bad_alloc();
+      indexCount = newIndexCount;
+      indexes = static_cast<Value **>( newIndexes );
+   }
+   virtual void releaseArrayPageIndex( Value **indexes, 
+                                       ValueInternalArray::PageIndex indexCount )
+   {
+      if ( indexes )
+         free( indexes );
+   }
+
+   virtual Value *allocateArrayPage()
+   {
+      return static_cast<Value *>( malloc( sizeof(Value) * ValueInternalArray::itemsPerPage ) );
+   }
+
+   virtual void releaseArrayPage( Value *value )
+   {
+      if ( value )
+         free( value );
+   }
+};
+
+#else // #ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
+/// @todo make this thread-safe (lock when accessign batch allocator)
+class DefaultValueArrayAllocator : public ValueArrayAllocator
+{
+public: // overridden from ValueArrayAllocator
+   virtual ~DefaultValueArrayAllocator()
+   {
+   }
+
+   virtual ValueInternalArray *newArray()
+   {
+      ValueInternalArray *array = arraysAllocator_.allocate();
+      new (array) ValueInternalArray(); // placement new
+      return array;
+   }
+
+   virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other )
+   {
+      ValueInternalArray *array = arraysAllocator_.allocate();
+      new (array) ValueInternalArray( other ); // placement new
+      return array;
+   }
+
+   virtual void destructArray( ValueInternalArray *array )
+   {
+      if ( array )
+      {
+         array->~ValueInternalArray();
+         arraysAllocator_.release( array );
+      }
+   }
+
+   virtual void reallocateArrayPageIndex( Value **&indexes, 
+                                          ValueInternalArray::PageIndex &indexCount,
+                                          ValueInternalArray::PageIndex minNewIndexCount )
+   {
+      ValueInternalArray::PageIndex newIndexCount = (indexCount*3)/2 + 1;
+      if ( minNewIndexCount > newIndexCount )
+         newIndexCount = minNewIndexCount;
+      void *newIndexes = realloc( indexes, sizeof(Value*) * newIndexCount );
+      if ( !newIndexes )
+         throw std::bad_alloc();
+      indexCount = newIndexCount;
+      indexes = static_cast<Value **>( newIndexes );
+   }
+   virtual void releaseArrayPageIndex( Value **indexes, 
+                                       ValueInternalArray::PageIndex indexCount )
+   {
+      if ( indexes )
+         free( indexes );
+   }
+
+   virtual Value *allocateArrayPage()
+   {
+      return static_cast<Value *>( pagesAllocator_.allocate() );
+   }
+
+   virtual void releaseArrayPage( Value *value )
+   {
+      if ( value )
+         pagesAllocator_.release( value );
+   }
+private:
+   BatchAllocator<ValueInternalArray,1> arraysAllocator_;
+   BatchAllocator<Value,ValueInternalArray::itemsPerPage> pagesAllocator_;
+};
+#endif // #ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
+
+static ValueArrayAllocator *&arrayAllocator()
+{
+   static DefaultValueArrayAllocator defaultAllocator;
+   static ValueArrayAllocator *arrayAllocator = &defaultAllocator;
+   return arrayAllocator;
+}
+
+static struct DummyArrayAllocatorInitializer {
+   DummyArrayAllocatorInitializer() 
+   {
+      arrayAllocator();      // ensure arrayAllocator() statics are initialized before main().
+   }
+} dummyArrayAllocatorInitializer;
+
+// //////////////////////////////////////////////////////////////////
+// class ValueInternalArray
+// //////////////////////////////////////////////////////////////////
+bool 
+ValueInternalArray::equals( const IteratorState &x, 
+                            const IteratorState &other )
+{
+   return x.array_ == other.array_  
+          &&  x.currentItemIndex_ == other.currentItemIndex_  
+          &&  x.currentPageIndex_ == other.currentPageIndex_;
+}
+
+
+void 
+ValueInternalArray::increment( IteratorState &it )
+{
+   JSON_ASSERT_MESSAGE( it.array_  &&
+      (it.currentPageIndex_ - it.array_->pages_)*itemsPerPage + it.currentItemIndex_
+      != it.array_->size_,
+      "ValueInternalArray::increment(): moving iterator beyond end" );
+   ++(it.currentItemIndex_);
+   if ( it.currentItemIndex_ == itemsPerPage )
+   {
+      it.currentItemIndex_ = 0;
+      ++(it.currentPageIndex_);
+   }
+}
+
+
+void 
+ValueInternalArray::decrement( IteratorState &it )
+{
+   JSON_ASSERT_MESSAGE( it.array_  &&  it.currentPageIndex_ == it.array_->pages_ 
+                        &&  it.currentItemIndex_ == 0,
+      "ValueInternalArray::decrement(): moving iterator beyond end" );
+   if ( it.currentItemIndex_ == 0 )
+   {
+      it.currentItemIndex_ = itemsPerPage-1;
+      --(it.currentPageIndex_);
+   }
+   else
+   {
+      --(it.currentItemIndex_);
+   }
+}
+
+
+Value &
+ValueInternalArray::unsafeDereference( const IteratorState &it )
+{
+   return (*(it.currentPageIndex_))[it.currentItemIndex_];
+}
+
+
+Value &
+ValueInternalArray::dereference( const IteratorState &it )
+{
+   JSON_ASSERT_MESSAGE( it.array_  &&
+      (it.currentPageIndex_ - it.array_->pages_)*itemsPerPage + it.currentItemIndex_
+      < it.array_->size_,
+      "ValueInternalArray::dereference(): dereferencing invalid iterator" );
+   return unsafeDereference( it );
+}
+
+void 
+ValueInternalArray::makeBeginIterator( IteratorState &it ) const
+{
+   it.array_ = const_cast<ValueInternalArray *>( this );
+   it.currentItemIndex_ = 0;
+   it.currentPageIndex_ = pages_;
+}
+
+
+void 
+ValueInternalArray::makeIterator( IteratorState &it, ArrayIndex index ) const
+{
+   it.array_ = const_cast<ValueInternalArray *>( this );
+   it.currentItemIndex_ = index % itemsPerPage;
+   it.currentPageIndex_ = pages_ + index / itemsPerPage;
+}
+
+
+void 
+ValueInternalArray::makeEndIterator( IteratorState &it ) const
+{
+   makeIterator( it, size_ );
+}
+
+
+ValueInternalArray::ValueInternalArray()
+   : pages_( 0 )
+   , size_( 0 )
+   , pageCount_( 0 )
+{
+}
+
+
+ValueInternalArray::ValueInternalArray( const ValueInternalArray &other )
+   : pages_( 0 )
+   , pageCount_( 0 )
+   , size_( other.size_ )
+{
+   PageIndex minNewPages = other.size_ / itemsPerPage;
+   arrayAllocator()->reallocateArrayPageIndex( pages_, pageCount_, minNewPages );
+   JSON_ASSERT_MESSAGE( pageCount_ >= minNewPages, 
+                        "ValueInternalArray::reserve(): bad reallocation" );
+   IteratorState itOther;
+   other.makeBeginIterator( itOther );
+   Value *value;
+   for ( ArrayIndex index = 0; index < size_; ++index, increment(itOther) )
+   {
+      if ( index % itemsPerPage == 0 )
+      {
+         PageIndex pageIndex = index / itemsPerPage;
+         value = arrayAllocator()->allocateArrayPage();
+         pages_[pageIndex] = value;
+      }
+      new (value) Value( dereference( itOther ) );
+   }
+}
+
+
+ValueInternalArray &
+ValueInternalArray::operator =( const ValueInternalArray &other )
+{
+   ValueInternalArray temp( other );
+   swap( temp );
+   return *this;
+}
+
+
+ValueInternalArray::~ValueInternalArray()
+{
+   // destroy all constructed items
+   IteratorState it;
+   IteratorState itEnd;
+   makeBeginIterator( it);
+   makeEndIterator( itEnd );
+   for ( ; !equals(it,itEnd); increment(it) )
+   {
+      Value *value = &dereference(it);
+      value->~Value();
+   }
+   // release all pages
+   PageIndex lastPageIndex = size_ / itemsPerPage;
+   for ( PageIndex pageIndex = 0; pageIndex < lastPageIndex; ++pageIndex )
+      arrayAllocator()->releaseArrayPage( pages_[pageIndex] );
+   // release pages index
+   arrayAllocator()->releaseArrayPageIndex( pages_, pageCount_ );
+}
+
+
+void 
+ValueInternalArray::swap( ValueInternalArray &other )
+{
+   Value **tempPages = pages_;
+   pages_ = other.pages_;
+   other.pages_ = tempPages;
+   ArrayIndex tempSize = size_;
+   size_ = other.size_;
+   other.size_ = tempSize;
+   PageIndex tempPageCount = pageCount_;
+   pageCount_ = other.pageCount_;
+   other.pageCount_ = tempPageCount;
+}
+
+void 
+ValueInternalArray::clear()
+{
+   ValueInternalArray dummy;
+   swap( dummy );
+}
+
+
+void 
+ValueInternalArray::resize( ArrayIndex newSize )
+{
+   if ( newSize == 0 )
+      clear();
+   else if ( newSize < size_ )
+   {
+      IteratorState it;
+      IteratorState itEnd;
+      makeIterator( it, newSize );
+      makeIterator( itEnd, size_ );
+      for ( ; !equals(it,itEnd); increment(it) )
+      {
+         Value *value = &dereference(it);
+         value->~Value();
+      }
+      PageIndex pageIndex = (newSize + itemsPerPage - 1) / itemsPerPage;
+      PageIndex lastPageIndex = size_ / itemsPerPage;
+      for ( ; pageIndex < lastPageIndex; ++pageIndex )
+         arrayAllocator()->releaseArrayPage( pages_[pageIndex] );
+      size_ = newSize;
+   }
+   else if ( newSize > size_ )
+      resolveReference( newSize );
+}
+
+
+void 
+ValueInternalArray::makeIndexValid( ArrayIndex index )
+{
+   // Need to enlarge page index ?
+   if ( index >= pageCount_ * itemsPerPage )
+   {
+      PageIndex minNewPages = (index + 1) / itemsPerPage;
+      arrayAllocator()->reallocateArrayPageIndex( pages_, pageCount_, minNewPages );
+      JSON_ASSERT_MESSAGE( pageCount_ >= minNewPages, "ValueInternalArray::reserve(): bad reallocation" );
+   }
+
+   // Need to allocate new pages ?
+   ArrayIndex nextPageIndex = 
+      (size_ % itemsPerPage) != 0 ? size_ - (size_%itemsPerPage) + itemsPerPage
+                                  : size_;
+   if ( nextPageIndex <= index )
+   {
+      PageIndex pageIndex = nextPageIndex / itemsPerPage;
+      PageIndex pageToAllocate = (index - nextPageIndex) / itemsPerPage + 1;
+      for ( ; pageToAllocate-- > 0; ++pageIndex )
+         pages_[pageIndex] = arrayAllocator()->allocateArrayPage();
+   }
+
+   // Initialize all new entries
+   IteratorState it;
+   IteratorState itEnd;
+   makeIterator( it, size_ );
+   size_ = index + 1;
+   makeIterator( itEnd, size_ );
+   for ( ; !equals(it,itEnd); increment(it) )
+   {
+      Value *value = &dereference(it);
+      new (value) Value(); // Construct a default value using placement new
+   }
+}
+
+Value &
+ValueInternalArray::resolveReference( ArrayIndex index )
+{
+   if ( index >= size_ )
+      makeIndexValid( index );
+   return pages_[index/itemsPerPage][index%itemsPerPage];
+}
+
+Value *
+ValueInternalArray::find( ArrayIndex index ) const
+{
+   if ( index >= size_ )
+      return 0;
+   return &(pages_[index/itemsPerPage][index%itemsPerPage]);
+}
+
+ValueInternalArray::ArrayIndex 
+ValueInternalArray::size() const
+{
+   return size_;
+}
+
+int 
+ValueInternalArray::distance( const IteratorState &x, const IteratorState &y )
+{
+   return indexOf(y) - indexOf(x);
+}
+
+
+ValueInternalArray::ArrayIndex 
+ValueInternalArray::indexOf( const IteratorState &iterator )
+{
+   if ( !iterator.array_ )
+      return ArrayIndex(-1);
+   return ArrayIndex(
+      (iterator.currentPageIndex_ - iterator.array_->pages_) * itemsPerPage 
+      + iterator.currentItemIndex_ );
+}
+
+
+int 
+ValueInternalArray::compare( const ValueInternalArray &other ) const
+{
+   int sizeDiff( size_ - other.size_ );
+   if ( sizeDiff != 0 )
+      return sizeDiff;
+   
+   for ( ArrayIndex index =0; index < size_; ++index )
+   {
+      int diff = pages_[index/itemsPerPage][index%itemsPerPage].compare( 
+         other.pages_[index/itemsPerPage][index%itemsPerPage] );
+      if ( diff != 0 )
+         return diff;
+   }
+   return 0;
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_internalmap.inl
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_internalmap.inl b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_internalmap.inl
new file mode 100644
index 0000000..ef37991
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_internalmap.inl
@@ -0,0 +1,607 @@
+// included by json_value.cpp
+// everything is within Json namespace
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class ValueInternalMap
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+/** \internal MUST be safely initialized using memset( this, 0, sizeof(ValueInternalLink) );
+   * This optimization is used by the fast allocator.
+   */
+ValueInternalLink::ValueInternalLink()
+   : previous_( 0 )
+   , next_( 0 )
+{
+}
+
+ValueInternalLink::~ValueInternalLink()
+{ 
+   for ( int index =0; index < itemPerLink; ++index )
+   {
+      if ( !items_[index].isItemAvailable() )
+      {
+         if ( !items_[index].isMemberNameStatic() )
+            free( keys_[index] );
+      }
+      else
+         break;
+   }
+}
+
+
+
+ValueMapAllocator::~ValueMapAllocator()
+{
+}
+
+#ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
+class DefaultValueMapAllocator : public ValueMapAllocator
+{
+public: // overridden from ValueMapAllocator
+   virtual ValueInternalMap *newMap()
+   {
+      return new ValueInternalMap();
+   }
+
+   virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other )
+   {
+      return new ValueInternalMap( other );
+   }
+
+   virtual void destructMap( ValueInternalMap *map )
+   {
+      delete map;
+   }
+
+   virtual ValueInternalLink *allocateMapBuckets( unsigned int size )
+   {
+      return new ValueInternalLink[size];
+   }
+
+   virtual void releaseMapBuckets( ValueInternalLink *links )
+   {
+      delete [] links;
+   }
+
+   virtual ValueInternalLink *allocateMapLink()
+   {
+      return new ValueInternalLink();
+   }
+
+   virtual void releaseMapLink( ValueInternalLink *link )
+   {
+      delete link;
+   }
+};
+#else
+/// @todo make this thread-safe (lock when accessign batch allocator)
+class DefaultValueMapAllocator : public ValueMapAllocator
+{
+public: // overridden from ValueMapAllocator
+   virtual ValueInternalMap *newMap()
+   {
+      ValueInternalMap *map = mapsAllocator_.allocate();
+      new (map) ValueInternalMap(); // placement new
+      return map;
+   }
+
+   virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other )
+   {
+      ValueInternalMap *map = mapsAllocator_.allocate();
+      new (map) ValueInternalMap( other ); // placement new
+      return map;
+   }
+
+   virtual void destructMap( ValueInternalMap *map )
+   {
+      if ( map )
+      {
+         map->~ValueInternalMap();
+         mapsAllocator_.release( map );
+      }
+   }
+
+   virtual ValueInternalLink *allocateMapBuckets( unsigned int size )
+   {
+      return new ValueInternalLink[size];
+   }
+
+   virtual void releaseMapBuckets( ValueInternalLink *links )
+   {
+      delete [] links;
+   }
+
+   virtual ValueInternalLink *allocateMapLink()
+   {
+      ValueInternalLink *link = linksAllocator_.allocate();
+      memset( link, 0, sizeof(ValueInternalLink) );
+      return link;
+   }
+
+   virtual void releaseMapLink( ValueInternalLink *link )
+   {
+      link->~ValueInternalLink();
+      linksAllocator_.release( link );
+   }
+private:
+   BatchAllocator<ValueInternalMap,1> mapsAllocator_;
+   BatchAllocator<ValueInternalLink,1> linksAllocator_;
+};
+#endif
+
+static ValueMapAllocator *&mapAllocator()
+{
+   static DefaultValueMapAllocator defaultAllocator;
+   static ValueMapAllocator *mapAllocator = &defaultAllocator;
+   return mapAllocator;
+}
+
+static struct DummyMapAllocatorInitializer {
+   DummyMapAllocatorInitializer() 
+   {
+      mapAllocator();      // ensure mapAllocator() statics are initialized before main().
+   }
+} dummyMapAllocatorInitializer;
+
+
+
+// h(K) = value * K >> w ; with w = 32 & K prime w.r.t. 2^32.
+
+/*
+use linked list hash map. 
+buckets array is a container.
+linked list element contains 6 key/values. (memory = (16+4) * 6 + 4 = 124)
+value have extra state: valid, available, deleted
+*/
+
+
+ValueInternalMap::ValueInternalMap()
+   : buckets_( 0 )
+   , tailLink_( 0 )
+   , bucketsSize_( 0 )
+   , itemCount_( 0 )
+{
+}
+
+
+ValueInternalMap::ValueInternalMap( const ValueInternalMap &other )
+   : buckets_( 0 )
+   , tailLink_( 0 )
+   , bucketsSize_( 0 )
+   , itemCount_( 0 )
+{
+   reserve( other.itemCount_ );
+   IteratorState it;
+   IteratorState itEnd;
+   other.makeBeginIterator( it );
+   other.makeEndIterator( itEnd );
+   for ( ; !equals(it,itEnd); increment(it) )
+   {
+      bool isStatic;
+      const char *memberName = key( it, isStatic );
+      const Value &aValue = value( it );
+      resolveReference(memberName, isStatic) = aValue;
+   }
+}
+
+
+ValueInternalMap &
+ValueInternalMap::operator =( const ValueInternalMap &other )
+{
+   ValueInternalMap dummy( other );
+   swap( dummy );
+   return *this;
+}
+
+
+ValueInternalMap::~ValueInternalMap()
+{
+   if ( buckets_ )
+   {
+      for ( BucketIndex bucketIndex =0; bucketIndex < bucketsSize_; ++bucketIndex )
+      {
+         ValueInternalLink *link = buckets_[bucketIndex].next_;
+         while ( link )
+         {
+            ValueInternalLink *linkToRelease = link;
+            link = link->next_;
+            mapAllocator()->releaseMapLink( linkToRelease );
+         }
+      }
+      mapAllocator()->releaseMapBuckets( buckets_ );
+   }
+}
+
+
+void 
+ValueInternalMap::swap( ValueInternalMap &other )
+{
+   ValueInternalLink *tempBuckets = buckets_;
+   buckets_ = other.buckets_;
+   other.buckets_ = tempBuckets;
+   ValueInternalLink *tempTailLink = tailLink_;
+   tailLink_ = other.tailLink_;
+   other.tailLink_ = tempTailLink;
+   BucketIndex tempBucketsSize = bucketsSize_;
+   bucketsSize_ = other.bucketsSize_;
+   other.bucketsSize_ = tempBucketsSize;
+   BucketIndex tempItemCount = itemCount_;
+   itemCount_ = other.itemCount_;
+   other.itemCount_ = tempItemCount;
+}
+
+
+void 
+ValueInternalMap::clear()
+{
+   ValueInternalMap dummy;
+   swap( dummy );
+}
+
+
+ValueInternalMap::BucketIndex 
+ValueInternalMap::size() const
+{
+   return itemCount_;
+}
+
+bool 
+ValueInternalMap::reserveDelta( BucketIndex growth )
+{
+   return reserve( itemCount_ + growth );
+}
+
+bool 
+ValueInternalMap::reserve( BucketIndex newItemCount )
+{
+   if ( !buckets_  &&  newItemCount > 0 )
+   {
+      buckets_ = mapAllocator()->allocateMapBuckets( 1 );
+      bucketsSize_ = 1;
+      tailLink_ = &buckets_[0];
+   }
+//   BucketIndex idealBucketCount = (newItemCount + ValueInternalLink::itemPerLink) / ValueInternalLink::itemPerLink;
+   return true;
+}
+
+
+const Value *
+ValueInternalMap::find( const char *key ) const
+{
+   if ( !bucketsSize_ )
+      return 0;
+   HashKey hashedKey = hash( key );
+   BucketIndex bucketIndex = hashedKey % bucketsSize_;
+   for ( const ValueInternalLink *current = &buckets_[bucketIndex]; 
+         current != 0; 
+         current = current->next_ )
+   {
+      for ( BucketIndex index=0; index < ValueInternalLink::itemPerLink; ++index )
+      {
+         if ( current->items_[index].isItemAvailable() )
+            return 0;
+         if ( strcmp( key, current->keys_[index] ) == 0 )
+            return &current->items_[index];
+      }
+   }
+   return 0;
+}
+
+
+Value *
+ValueInternalMap::find( const char *key )
+{
+   const ValueInternalMap *constThis = this;
+   return const_cast<Value *>( constThis->find( key ) );
+}
+
+
+Value &
+ValueInternalMap::resolveReference( const char *key,
+                                    bool isStatic )
+{
+   HashKey hashedKey = hash( key );
+   if ( bucketsSize_ )
+   {
+      BucketIndex bucketIndex = hashedKey % bucketsSize_;
+      ValueInternalLink **previous = 0;
+      BucketIndex index;
+      for ( ValueInternalLink *current = &buckets_[bucketIndex]; 
+            current != 0; 
+            previous = &current->next_, current = current->next_ )
+      {
+         for ( index=0; index < ValueInternalLink::itemPerLink; ++index )
+         {
+            if ( current->items_[index].isItemAvailable() )
+               return setNewItem( key, isStatic, current, index );
+            if ( strcmp( key, current->keys_[index] ) == 0 )
+               return current->items_[index];
+         }
+      }
+   }
+
+   reserveDelta( 1 );
+   return unsafeAdd( key, isStatic, hashedKey );
+}
+
+
+void 
+ValueInternalMap::remove( const char *key )
+{
+   HashKey hashedKey = hash( key );
+   if ( !bucketsSize_ )
+      return;
+   BucketIndex bucketIndex = hashedKey % bucketsSize_;
+   for ( ValueInternalLink *link = &buckets_[bucketIndex]; 
+         link != 0; 
+         link = link->next_ )
+   {
+      BucketIndex index;
+      for ( index =0; index < ValueInternalLink::itemPerLink; ++index )
+      {
+         if ( link->items_[index].isItemAvailable() )
+            return;
+         if ( strcmp( key, link->keys_[index] ) == 0 )
+         {
+            doActualRemove( link, index, bucketIndex );
+            return;
+         }
+      }
+   }
+}
+
+void 
+ValueInternalMap::doActualRemove( ValueInternalLink *link, 
+                                  BucketIndex index,
+                                  BucketIndex bucketIndex )
+{
+   // find last item of the bucket and swap it with the 'removed' one.
+   // set removed items flags to 'available'.
+   // if last page only contains 'available' items, then deallocate it (it's empty)
+   ValueInternalLink *&lastLink = getLastLinkInBucket( index );
+   BucketIndex lastItemIndex = 1; // a link can never be empty, so start at 1
+   for ( ;   
+         lastItemIndex < ValueInternalLink::itemPerLink; 
+         ++lastItemIndex ) // may be optimized with dicotomic search
+   {
+      if ( lastLink->items_[lastItemIndex].isItemAvailable() )
+         break;
+   }
+   
+   BucketIndex lastUsedIndex = lastItemIndex - 1;
+   Value *valueToDelete = &link->items_[index];
+   Value *valueToPreserve = &lastLink->items_[lastUsedIndex];
+   if ( valueToDelete != valueToPreserve )
+      valueToDelete->swap( *valueToPreserve );
+   if ( lastUsedIndex == 0 )  // page is now empty
+   {  // remove it from bucket linked list and delete it.
+      ValueInternalLink *linkPreviousToLast = lastLink->previous_;
+      if ( linkPreviousToLast != 0 )   // can not deleted bucket link.
+      {
+         mapAllocator()->releaseMapLink( lastLink );
+         linkPreviousToLast->next_ = 0;
+         lastLink = linkPreviousToLast;
+      }
+   }
+   else
+   {
+      Value dummy;
+      valueToPreserve->swap( dummy ); // restore deleted to default Value.
+      valueToPreserve->setItemUsed( false );
+   }
+   --itemCount_;
+}
+
+
+ValueInternalLink *&
+ValueInternalMap::getLastLinkInBucket( BucketIndex bucketIndex )
+{
+   if ( bucketIndex == bucketsSize_ - 1 )
+      return tailLink_;
+   ValueInternalLink *&previous = buckets_[bucketIndex+1].previous_;
+   if ( !previous )
+      previous = &buckets_[bucketIndex];
+   return previous;
+}
+
+
+Value &
+ValueInternalMap::setNewItem( const char *key, 
+                              bool isStatic,
+                              ValueInternalLink *link, 
+                              BucketIndex index )
+{
+   char *duplicatedKey = valueAllocator()->makeMemberName( key );
+   ++itemCount_;
+   link->keys_[index] = duplicatedKey;
+   link->items_[index].setItemUsed();
+   link->items_[index].setMemberNameIsStatic( isStatic );
+   return link->items_[index]; // items already default constructed.
+}
+
+
+Value &
+ValueInternalMap::unsafeAdd( const char *key, 
+                             bool isStatic, 
+                             HashKey hashedKey )
+{
+   JSON_ASSERT_MESSAGE( bucketsSize_ > 0, "ValueInternalMap::unsafeAdd(): internal logic error." );
+   BucketIndex bucketIndex = hashedKey % bucketsSize_;
+   ValueInternalLink *&previousLink = getLastLinkInBucket( bucketIndex );
+   ValueInternalLink *link = previousLink;
+   BucketIndex index;
+   for ( index =0; index < ValueInternalLink::itemPerLink; ++index )
+   {
+      if ( link->items_[index].isItemAvailable() )
+         break;
+   }
+   if ( index == ValueInternalLink::itemPerLink ) // need to add a new page
+   {
+      ValueInternalLink *newLink = mapAllocator()->allocateMapLink();
+      index = 0;
+      link->next_ = newLink;
+      previousLink = newLink;
+      link = newLink;
+   }
+   return setNewItem( key, isStatic, link, index );
+}
+
+
+ValueInternalMap::HashKey 
+ValueInternalMap::hash( const char *key ) const
+{
+   HashKey hash = 0;
+   while ( *key )
+      hash += *key++ * 37;
+   return hash;
+}
+
+
+int 
+ValueInternalMap::compare( const ValueInternalMap &other ) const
+{
+   int sizeDiff( itemCount_ - other.itemCount_ );
+   if ( sizeDiff != 0 )
+      return sizeDiff;
+   // Strict order guaranty is required. Compare all keys FIRST, then compare values.
+   IteratorState it;
+   IteratorState itEnd;
+   makeBeginIterator( it );
+   makeEndIterator( itEnd );
+   for ( ; !equals(it,itEnd); increment(it) )
+   {
+      if ( !other.find( key( it ) ) )
+         return 1;
+   }
+
+   // All keys are equals, let's compare values
+   makeBeginIterator( it );
+   for ( ; !equals(it,itEnd); increment(it) )
+   {
+      const Value *otherValue = other.find( key( it ) );
+      int valueDiff = value(it).compare( *otherValue );
+      if ( valueDiff != 0 )
+         return valueDiff;
+   }
+   return 0;
+}
+
+
+void 
+ValueInternalMap::makeBeginIterator( IteratorState &it ) const
+{
+   it.map_ = const_cast<ValueInternalMap *>( this );
+   it.bucketIndex_ = 0;
+   it.itemIndex_ = 0;
+   it.link_ = buckets_;
+}
+
+
+void 
+ValueInternalMap::makeEndIterator( IteratorState &it ) const
+{
+   it.map_ = const_cast<ValueInternalMap *>( this );
+   it.bucketIndex_ = bucketsSize_;
+   it.itemIndex_ = 0;
+   it.link_ = 0;
+}
+
+
+bool 
+ValueInternalMap::equals( const IteratorState &x, const IteratorState &other )
+{
+   return x.map_ == other.map_  
+          &&  x.bucketIndex_ == other.bucketIndex_  
+          &&  x.link_ == other.link_
+          &&  x.itemIndex_ == other.itemIndex_;
+}
+
+
+void 
+ValueInternalMap::incrementBucket( IteratorState &iterator )
+{
+   ++iterator.bucketIndex_;
+   JSON_ASSERT_MESSAGE( iterator.bucketIndex_ <= iterator.map_->bucketsSize_,
+      "ValueInternalMap::increment(): attempting to iterate beyond end." );
+   if ( iterator.bucketIndex_ == iterator.map_->bucketsSize_ )
+      iterator.link_ = 0;
+   else
+      iterator.link_ = &(iterator.map_->buckets_[iterator.bucketIndex_]);
+   iterator.itemIndex_ = 0;
+}
+
+
+void 
+ValueInternalMap::increment( IteratorState &iterator )
+{
+   JSON_ASSERT_MESSAGE( iterator.map_, "Attempting to iterator using invalid iterator." );
+   ++iterator.itemIndex_;
+   if ( iterator.itemIndex_ == ValueInternalLink::itemPerLink )
+   {
+      JSON_ASSERT_MESSAGE( iterator.link_ != 0,
+         "ValueInternalMap::increment(): attempting to iterate beyond end." );
+      iterator.link_ = iterator.link_->next_;
+      if ( iterator.link_ == 0 )
+         incrementBucket( iterator );
+   }
+   else if ( iterator.link_->items_[iterator.itemIndex_].isItemAvailable() )
+   {
+      incrementBucket( iterator );
+   }
+}
+
+
+void 
+ValueInternalMap::decrement( IteratorState &iterator )
+{
+   if ( iterator.itemIndex_ == 0 )
+   {
+      JSON_ASSERT_MESSAGE( iterator.map_, "Attempting to iterate using invalid iterator." );
+      if ( iterator.link_ == &iterator.map_->buckets_[iterator.bucketIndex_] )
+      {
+         JSON_ASSERT_MESSAGE( iterator.bucketIndex_ > 0, "Attempting to iterate beyond beginning." );
+         --(iterator.bucketIndex_);
+      }
+      iterator.link_ = iterator.link_->previous_;
+      iterator.itemIndex_ = ValueInternalLink::itemPerLink - 1;
+   }
+}
+
+
+const char *
+ValueInternalMap::key( const IteratorState &iterator )
+{
+   JSON_ASSERT_MESSAGE( iterator.link_, "Attempting to iterate using invalid iterator." );
+   return iterator.link_->keys_[iterator.itemIndex_];
+}
+
+const char *
+ValueInternalMap::key( const IteratorState &iterator, bool &isStatic )
+{
+   JSON_ASSERT_MESSAGE( iterator.link_, "Attempting to iterate using invalid iterator." );
+   isStatic = iterator.link_->items_[iterator.itemIndex_].isMemberNameStatic();
+   return iterator.link_->keys_[iterator.itemIndex_];
+}
+
+
+Value &
+ValueInternalMap::value( const IteratorState &iterator )
+{
+   JSON_ASSERT_MESSAGE( iterator.link_, "Attempting to iterate using invalid iterator." );
+   return iterator.link_->items_[iterator.itemIndex_];
+}
+
+
+int 
+ValueInternalMap::distance( const IteratorState &x, const IteratorState &y )
+{
+   int offset = 0;
+   IteratorState it = x;
+   while ( !equals( it, y ) )
+      increment( it );
+   return offset;
+}


[60/70] Remove all cordova-lib files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/value.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/value.h b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/value.h
deleted file mode 100644
index 912b830..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/value.h
+++ /dev/null
@@ -1,1069 +0,0 @@
-#ifndef CPPTL_JSON_H_INCLUDED
-# define CPPTL_JSON_H_INCLUDED
-
-# include "forwards.h"
-# include <string>
-# include <vector>
-
-# ifndef JSON_USE_CPPTL_SMALLMAP
-#  include <map>
-# else
-#  include <cpptl/smallmap.h>
-# endif
-# ifdef JSON_USE_CPPTL
-#  include <cpptl/forwards.h>
-# endif
-
-/** \brief JSON (JavaScript Object Notation).
- */
-namespace Json {
-
-   /** \brief Type of the value held by a Value object.
-    */
-   enum ValueType
-   {
-      nullValue = 0, ///< 'null' value
-      intValue,      ///< signed integer value
-      uintValue,     ///< unsigned integer value
-      realValue,     ///< double value
-      stringValue,   ///< UTF-8 string value
-      booleanValue,  ///< bool value
-      arrayValue,    ///< array value (ordered list)
-      objectValue    ///< object value (collection of name/value pairs).
-   };
-
-   enum CommentPlacement
-   {
-      commentBefore = 0,        ///< a comment placed on the line before a value
-      commentAfterOnSameLine,   ///< a comment just after a value on the same line
-      commentAfter,             ///< a comment on the line after a value (only make sense for root value)
-      numberOfCommentPlacement
-   };
-
-//# ifdef JSON_USE_CPPTL
-//   typedef CppTL::AnyEnumerator<const char *> EnumMemberNames;
-//   typedef CppTL::AnyEnumerator<const Value &> EnumValues;
-//# endif
-
-   /** \brief Lightweight wrapper to tag static string.
-    *
-    * Value constructor and objectValue member assignment takes advantage of the
-    * StaticString and avoid the cost of string duplication when storing the
-    * string or the member name.
-    *
-    * Example of usage:
-    * \code
-    * Json::Value aValue( StaticString("some text") );
-    * Json::Value object;
-    * static const StaticString code("code");
-    * object[code] = 1234;
-    * \endcode
-    */
-   class JSON_API StaticString
-   {
-   public:
-      explicit StaticString( const char *czstring )
-         : str_( czstring )
-      {
-      }
-
-      operator const char *() const
-      {
-         return str_;
-      }
-
-      const char *c_str() const
-      {
-         return str_;
-      }
-
-   private:
-      const char *str_;
-   };
-
-   /** \brief Represents a <a HREF="http://www.json.org">JSON</a> value.
-    *
-    * This class is a discriminated union wrapper that can represents a:
-    * - signed integer [range: Value::minInt - Value::maxInt]
-    * - unsigned integer (range: 0 - Value::maxUInt)
-    * - double
-    * - UTF-8 string
-    * - boolean
-    * - 'null'
-    * - an ordered list of Value
-    * - collection of name/value pairs (javascript object)
-    *
-    * The type of the held value is represented by a #ValueType and 
-    * can be obtained using type().
-    *
-    * values of an #objectValue or #arrayValue can be accessed using operator[]() methods. 
-    * Non const methods will automatically create the a #nullValue element 
-    * if it does not exist. 
-    * The sequence of an #arrayValue will be automatically resize and initialized 
-    * with #nullValue. resize() can be used to enlarge or truncate an #arrayValue.
-    *
-    * The get() methods can be used to obtains default value in the case the required element
-    * does not exist.
-    *
-    * It is possible to iterate over the list of a #objectValue values using 
-    * the getMemberNames() method.
-    */
-   class JSON_API Value 
-   {
-      friend class ValueIteratorBase;
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-      friend class ValueInternalLink;
-      friend class ValueInternalMap;
-# endif
-   public:
-      typedef std::vector<std::string> Members;
-      typedef ValueIterator iterator;
-      typedef ValueConstIterator const_iterator;
-      typedef Json::UInt UInt;
-      typedef Json::Int Int;
-      typedef UInt ArrayIndex;
-
-      static const Value null;
-      static const Int minInt;
-      static const Int maxInt;
-      static const UInt maxUInt;
-
-   private:
-#ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-# ifndef JSON_VALUE_USE_INTERNAL_MAP
-      class CZString 
-      {
-      public:
-         enum DuplicationPolicy 
-         {
-            noDuplication = 0,
-            duplicate,
-            duplicateOnCopy
-         };
-         CZString( int index );
-         CZString( const char *cstr, DuplicationPolicy allocate );
-         CZString( const CZString &other );
-         ~CZString();
-         CZString &operator =( const CZString &other );
-         bool operator<( const CZString &other ) const;
-         bool operator==( const CZString &other ) const;
-         int index() const;
-         const char *c_str() const;
-         bool isStaticString() const;
-      private:
-         void swap( CZString &other );
-         const char *cstr_;
-         int index_;
-      };
-
-   public:
-#  ifndef JSON_USE_CPPTL_SMALLMAP
-      typedef std::map<CZString, Value> ObjectValues;
-#  else
-      typedef CppTL::SmallMap<CZString, Value> ObjectValues;
-#  endif // ifndef JSON_USE_CPPTL_SMALLMAP
-# endif // ifndef JSON_VALUE_USE_INTERNAL_MAP
-#endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-
-   public:
-      /** \brief Create a default Value of the given type.
-
-        This is a very useful constructor.
-        To create an empty array, pass arrayValue.
-        To create an empty object, pass objectValue.
-        Another Value can then be set to this one by assignment.
-	This is useful since clear() and resize() will not alter types.
-
-        Examples:
-	\code
-	Json::Value null_value; // null
-	Json::Value arr_value(Json::arrayValue); // []
-	Json::Value obj_value(Json::objectValue); // {}
-	\endcode
-      */
-      Value( ValueType type = nullValue );
-      Value( Int value );
-      Value( UInt value );
-      Value( double value );
-      Value( const char *value );
-      Value( const char *beginValue, const char *endValue );
-      /** \brief Constructs a value from a static string.
-
-       * Like other value string constructor but do not duplicate the string for
-       * internal storage. The given string must remain alive after the call to this
-       * constructor.
-       * Example of usage:
-       * \code
-       * Json::Value aValue( StaticString("some text") );
-       * \endcode
-       */
-      Value( const StaticString &value );
-      Value( const std::string &value );
-# ifdef JSON_USE_CPPTL
-      Value( const CppTL::ConstString &value );
-# endif
-      Value( bool value );
-      Value( const Value &other );
-      ~Value();
-
-      Value &operator=( const Value &other );
-      /// Swap values.
-      /// \note Currently, comments are intentionally not swapped, for
-      /// both logic and efficiency.
-      void swap( Value &other );
-
-      ValueType type() const;
-
-      bool operator <( const Value &other ) const;
-      bool operator <=( const Value &other ) const;
-      bool operator >=( const Value &other ) const;
-      bool operator >( const Value &other ) const;
-
-      bool operator ==( const Value &other ) const;
-      bool operator !=( const Value &other ) const;
-
-      int compare( const Value &other );
-
-      const char *asCString() const;
-      std::string asString() const;
-# ifdef JSON_USE_CPPTL
-      CppTL::ConstString asConstString() const;
-# endif
-      Int asInt() const;
-      UInt asUInt() const;
-      double asDouble() const;
-      bool asBool() const;
-
-      bool isNull() const;
-      bool isBool() const;
-      bool isInt() const;
-      bool isUInt() const;
-      bool isIntegral() const;
-      bool isDouble() const;
-      bool isNumeric() const;
-      bool isString() const;
-      bool isArray() const;
-      bool isObject() const;
-
-      bool isConvertibleTo( ValueType other ) const;
-
-      /// Number of values in array or object
-      UInt size() const;
-
-      /// \brief Return true if empty array, empty object, or null;
-      /// otherwise, false.
-      bool empty() const;
-
-      /// Return isNull()
-      bool operator!() const;
-
-      /// Remove all object members and array elements.
-      /// \pre type() is arrayValue, objectValue, or nullValue
-      /// \post type() is unchanged
-      void clear();
-
-      /// Resize the array to size elements. 
-      /// New elements are initialized to null.
-      /// May only be called on nullValue or arrayValue.
-      /// \pre type() is arrayValue or nullValue
-      /// \post type() is arrayValue
-      void resize( UInt size );
-
-      /// Access an array element (zero based index ).
-      /// If the array contains less than index element, then null value are inserted
-      /// in the array so that its size is index+1.
-      /// (You may need to say 'value[0u]' to get your compiler to distinguish
-      ///  this from the operator[] which takes a string.)
-      Value &operator[]( UInt index );
-      /// Access an array element (zero based index )
-      /// (You may need to say 'value[0u]' to get your compiler to distinguish
-      ///  this from the operator[] which takes a string.)
-      const Value &operator[]( UInt index ) const;
-      /// If the array contains at least index+1 elements, returns the element value, 
-      /// otherwise returns defaultValue.
-      Value get( UInt index, 
-                 const Value &defaultValue ) const;
-      /// Return true if index < size().
-      bool isValidIndex( UInt index ) const;
-      /// \brief Append value to array at the end.
-      ///
-      /// Equivalent to jsonvalue[jsonvalue.size()] = value;
-      Value &append( const Value &value );
-
-      /// Access an object value by name, create a null member if it does not exist.
-      Value &operator[]( const char *key );
-      /// Access an object value by name, returns null if there is no member with that name.
-      const Value &operator[]( const char *key ) const;
-      /// Access an object value by name, create a null member if it does not exist.
-      Value &operator[]( const std::string &key );
-      /// Access an object value by name, returns null if there is no member with that name.
-      const Value &operator[]( const std::string &key ) const;
-      /** \brief Access an object value by name, create a null member if it does not exist.
-
-       * If the object as no entry for that name, then the member name used to store
-       * the new entry is not duplicated.
-       * Example of use:
-       * \code
-       * Json::Value object;
-       * static const StaticString code("code");
-       * object[code] = 1234;
-       * \endcode
-       */
-      Value &operator[]( const StaticString &key );
-# ifdef JSON_USE_CPPTL
-      /// Access an object value by name, create a null member if it does not exist.
-      Value &operator[]( const CppTL::ConstString &key );
-      /// Access an object value by name, returns null if there is no member with that name.
-      const Value &operator[]( const CppTL::ConstString &key ) const;
-# endif
-      /// Return the member named key if it exist, defaultValue otherwise.
-      Value get( const char *key, 
-                 const Value &defaultValue ) const;
-      /// Return the member named key if it exist, defaultValue otherwise.
-      Value get( const std::string &key,
-                 const Value &defaultValue ) const;
-# ifdef JSON_USE_CPPTL
-      /// Return the member named key if it exist, defaultValue otherwise.
-      Value get( const CppTL::ConstString &key,
-                 const Value &defaultValue ) const;
-# endif
-      /// \brief Remove and return the named member.  
-      ///
-      /// Do nothing if it did not exist.
-      /// \return the removed Value, or null.
-      /// \pre type() is objectValue or nullValue
-      /// \post type() is unchanged
-      Value removeMember( const char* key );
-      /// Same as removeMember(const char*)
-      Value removeMember( const std::string &key );
-
-      /// Return true if the object has a member named key.
-      bool isMember( const char *key ) const;
-      /// Return true if the object has a member named key.
-      bool isMember( const std::string &key ) const;
-# ifdef JSON_USE_CPPTL
-      /// Return true if the object has a member named key.
-      bool isMember( const CppTL::ConstString &key ) const;
-# endif
-
-      /// \brief Return a list of the member names.
-      ///
-      /// If null, return an empty list.
-      /// \pre type() is objectValue or nullValue
-      /// \post if type() was nullValue, it remains nullValue
-      Members getMemberNames() const;
-
-//# ifdef JSON_USE_CPPTL
-//      EnumMemberNames enumMemberNames() const;
-//      EnumValues enumValues() const;
-//# endif
-
-      /// Comments must be //... or /* ... */
-      void setComment( const char *comment,
-                       CommentPlacement placement );
-      /// Comments must be //... or /* ... */
-      void setComment( const std::string &comment,
-                       CommentPlacement placement );
-      bool hasComment( CommentPlacement placement ) const;
-      /// Include delimiters and embedded newlines.
-      std::string getComment( CommentPlacement placement ) const;
-
-      std::string toStyledString() const;
-
-      const_iterator begin() const;
-      const_iterator end() const;
-
-      iterator begin();
-      iterator end();
-
-   private:
-      Value &resolveReference( const char *key, 
-                               bool isStatic );
-
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-      inline bool isItemAvailable() const
-      {
-         return itemIsUsed_ == 0;
-      }
-
-      inline void setItemUsed( bool isUsed = true )
-      {
-         itemIsUsed_ = isUsed ? 1 : 0;
-      }
-
-      inline bool isMemberNameStatic() const
-      {
-         return memberNameIsStatic_ == 0;
-      }
-
-      inline void setMemberNameIsStatic( bool isStatic )
-      {
-         memberNameIsStatic_ = isStatic ? 1 : 0;
-      }
-# endif // # ifdef JSON_VALUE_USE_INTERNAL_MAP
-
-   private:
-      struct CommentInfo
-      {
-         CommentInfo();
-         ~CommentInfo();
-
-         void setComment( const char *text );
-
-         char *comment_;
-      };
-
-      //struct MemberNamesTransform
-      //{
-      //   typedef const char *result_type;
-      //   const char *operator()( const CZString &name ) const
-      //   {
-      //      return name.c_str();
-      //   }
-      //};
-
-      union ValueHolder
-      {
-         Int int_;
-         UInt uint_;
-         double real_;
-         bool bool_;
-         char *string_;
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-         ValueInternalArray *array_;
-         ValueInternalMap *map_;
-#else
-         ObjectValues *map_;
-# endif
-      } value_;
-      ValueType type_ : 8;
-      int allocated_ : 1;     // Notes: if declared as bool, bitfield is useless.
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-      unsigned int itemIsUsed_ : 1;      // used by the ValueInternalMap container.
-      int memberNameIsStatic_ : 1;       // used by the ValueInternalMap container.
-# endif
-      CommentInfo *comments_;
-   };
-
-
-   /** \brief Experimental and untested: represents an element of the "path" to access a node.
-    */
-   class PathArgument
-   {
-   public:
-      friend class Path;
-
-      PathArgument();
-      PathArgument( UInt index );
-      PathArgument( const char *key );
-      PathArgument( const std::string &key );
-
-   private:
-      enum Kind
-      {
-         kindNone = 0,
-         kindIndex,
-         kindKey
-      };
-      std::string key_;
-      UInt index_;
-      Kind kind_;
-   };
-
-   /** \brief Experimental and untested: represents a "path" to access a node.
-    *
-    * Syntax:
-    * - "." => root node
-    * - ".[n]" => elements at index 'n' of root node (an array value)
-    * - ".name" => member named 'name' of root node (an object value)
-    * - ".name1.name2.name3"
-    * - ".[0][1][2].name1[3]"
-    * - ".%" => member name is provided as parameter
-    * - ".[%]" => index is provided as parameter
-    */
-   class Path
-   {
-   public:
-      Path( const std::string &path,
-            const PathArgument &a1 = PathArgument(),
-            const PathArgument &a2 = PathArgument(),
-            const PathArgument &a3 = PathArgument(),
-            const PathArgument &a4 = PathArgument(),
-            const PathArgument &a5 = PathArgument() );
-
-      const Value &resolve( const Value &root ) const;
-      Value resolve( const Value &root, 
-                     const Value &defaultValue ) const;
-      /// Creates the "path" to access the specified node and returns a reference on the node.
-      Value &make( Value &root ) const;
-
-   private:
-      typedef std::vector<const PathArgument *> InArgs;
-      typedef std::vector<PathArgument> Args;
-
-      void makePath( const std::string &path,
-                     const InArgs &in );
-      void addPathInArg( const std::string &path, 
-                         const InArgs &in, 
-                         InArgs::const_iterator &itInArg, 
-                         PathArgument::Kind kind );
-      void invalidPath( const std::string &path, 
-                        int location );
-
-      Args args_;
-   };
-
-   /** \brief Experimental do not use: Allocator to customize member name and string value memory management done by Value.
-    *
-    * - makeMemberName() and releaseMemberName() are called to respectively duplicate and
-    *   free an Json::objectValue member name.
-    * - duplicateStringValue() and releaseStringValue() are called similarly to
-    *   duplicate and free a Json::stringValue value.
-    */
-   class ValueAllocator
-   {
-   public:
-      enum { unknown = (unsigned)-1 };
-
-      virtual ~ValueAllocator();
-
-      virtual char *makeMemberName( const char *memberName ) = 0;
-      virtual void releaseMemberName( char *memberName ) = 0;
-      virtual char *duplicateStringValue( const char *value, 
-                                          unsigned int length = unknown ) = 0;
-      virtual void releaseStringValue( char *value ) = 0;
-   };
-
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
-   /** \brief Allocator to customize Value internal map.
-    * Below is an example of a simple implementation (default implementation actually
-    * use memory pool for speed).
-    * \code
-      class DefaultValueMapAllocator : public ValueMapAllocator
-      {
-      public: // overridden from ValueMapAllocator
-         virtual ValueInternalMap *newMap()
-         {
-            return new ValueInternalMap();
-         }
-
-         virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other )
-         {
-            return new ValueInternalMap( other );
-         }
-
-         virtual void destructMap( ValueInternalMap *map )
-         {
-            delete map;
-         }
-
-         virtual ValueInternalLink *allocateMapBuckets( unsigned int size )
-         {
-            return new ValueInternalLink[size];
-         }
-
-         virtual void releaseMapBuckets( ValueInternalLink *links )
-         {
-            delete [] links;
-         }
-
-         virtual ValueInternalLink *allocateMapLink()
-         {
-            return new ValueInternalLink();
-         }
-
-         virtual void releaseMapLink( ValueInternalLink *link )
-         {
-            delete link;
-         }
-      };
-    * \endcode
-    */ 
-   class JSON_API ValueMapAllocator
-   {
-   public:
-      virtual ~ValueMapAllocator();
-      virtual ValueInternalMap *newMap() = 0;
-      virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other ) = 0;
-      virtual void destructMap( ValueInternalMap *map ) = 0;
-      virtual ValueInternalLink *allocateMapBuckets( unsigned int size ) = 0;
-      virtual void releaseMapBuckets( ValueInternalLink *links ) = 0;
-      virtual ValueInternalLink *allocateMapLink() = 0;
-      virtual void releaseMapLink( ValueInternalLink *link ) = 0;
-   };
-
-   /** \brief ValueInternalMap hash-map bucket chain link (for internal use only).
-    * \internal previous_ & next_ allows for bidirectional traversal.
-    */
-   class JSON_API ValueInternalLink
-   {
-   public:
-      enum { itemPerLink = 6 };  // sizeof(ValueInternalLink) = 128 on 32 bits architecture.
-      enum InternalFlags { 
-         flagAvailable = 0,
-         flagUsed = 1
-      };
-
-      ValueInternalLink();
-
-      ~ValueInternalLink();
-
-      Value items_[itemPerLink];
-      char *keys_[itemPerLink];
-      ValueInternalLink *previous_;
-      ValueInternalLink *next_;
-   };
-
-
-   /** \brief A linked page based hash-table implementation used internally by Value.
-    * \internal ValueInternalMap is a traditional bucket based hash-table, with a linked
-    * list in each bucket to handle collision. There is an addional twist in that
-    * each node of the collision linked list is a page containing a fixed amount of
-    * value. This provides a better compromise between memory usage and speed.
-    * 
-    * Each bucket is made up of a chained list of ValueInternalLink. The last
-    * link of a given bucket can be found in the 'previous_' field of the following bucket.
-    * The last link of the last bucket is stored in tailLink_ as it has no following bucket.
-    * Only the last link of a bucket may contains 'available' item. The last link always
-    * contains at least one element unless is it the bucket one very first link.
-    */
-   class JSON_API ValueInternalMap
-   {
-      friend class ValueIteratorBase;
-      friend class Value;
-   public:
-      typedef unsigned int HashKey;
-      typedef unsigned int BucketIndex;
-
-# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-      struct IteratorState
-      {
-         IteratorState() 
-            : map_(0)
-            , link_(0)
-            , itemIndex_(0)
-            , bucketIndex_(0) 
-         {
-         }
-         ValueInternalMap *map_;
-         ValueInternalLink *link_;
-         BucketIndex itemIndex_;
-         BucketIndex bucketIndex_;
-      };
-# endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-
-      ValueInternalMap();
-      ValueInternalMap( const ValueInternalMap &other );
-      ValueInternalMap &operator =( const ValueInternalMap &other );
-      ~ValueInternalMap();
-
-      void swap( ValueInternalMap &other );
-
-      BucketIndex size() const;
-
-      void clear();
-
-      bool reserveDelta( BucketIndex growth );
-
-      bool reserve( BucketIndex newItemCount );
-
-      const Value *find( const char *key ) const;
-
-      Value *find( const char *key );
-
-      Value &resolveReference( const char *key, 
-                               bool isStatic );
-
-      void remove( const char *key );
-
-      void doActualRemove( ValueInternalLink *link, 
-                           BucketIndex index,
-                           BucketIndex bucketIndex );
-
-      ValueInternalLink *&getLastLinkInBucket( BucketIndex bucketIndex );
-
-      Value &setNewItem( const char *key, 
-                         bool isStatic, 
-                         ValueInternalLink *link, 
-                         BucketIndex index );
-
-      Value &unsafeAdd( const char *key, 
-                        bool isStatic, 
-                        HashKey hashedKey );
-
-      HashKey hash( const char *key ) const;
-
-      int compare( const ValueInternalMap &other ) const;
-
-   private:
-      void makeBeginIterator( IteratorState &it ) const;
-      void makeEndIterator( IteratorState &it ) const;
-      static bool equals( const IteratorState &x, const IteratorState &other );
-      static void increment( IteratorState &iterator );
-      static void incrementBucket( IteratorState &iterator );
-      static void decrement( IteratorState &iterator );
-      static const char *key( const IteratorState &iterator );
-      static const char *key( const IteratorState &iterator, bool &isStatic );
-      static Value &value( const IteratorState &iterator );
-      static int distance( const IteratorState &x, const IteratorState &y );
-
-   private:
-      ValueInternalLink *buckets_;
-      ValueInternalLink *tailLink_;
-      BucketIndex bucketsSize_;
-      BucketIndex itemCount_;
-   };
-
-   /** \brief A simplified deque implementation used internally by Value.
-   * \internal
-   * It is based on a list of fixed "page", each page contains a fixed number of items.
-   * Instead of using a linked-list, a array of pointer is used for fast item look-up.
-   * Look-up for an element is as follow:
-   * - compute page index: pageIndex = itemIndex / itemsPerPage
-   * - look-up item in page: pages_[pageIndex][itemIndex % itemsPerPage]
-   *
-   * Insertion is amortized constant time (only the array containing the index of pointers
-   * need to be reallocated when items are appended).
-   */
-   class JSON_API ValueInternalArray
-   {
-      friend class Value;
-      friend class ValueIteratorBase;
-   public:
-      enum { itemsPerPage = 8 };    // should be a power of 2 for fast divide and modulo.
-      typedef Value::ArrayIndex ArrayIndex;
-      typedef unsigned int PageIndex;
-
-# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-      struct IteratorState // Must be a POD
-      {
-         IteratorState() 
-            : array_(0)
-            , currentPageIndex_(0)
-            , currentItemIndex_(0) 
-         {
-         }
-         ValueInternalArray *array_;
-         Value **currentPageIndex_;
-         unsigned int currentItemIndex_;
-      };
-# endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-
-      ValueInternalArray();
-      ValueInternalArray( const ValueInternalArray &other );
-      ValueInternalArray &operator =( const ValueInternalArray &other );
-      ~ValueInternalArray();
-      void swap( ValueInternalArray &other );
-
-      void clear();
-      void resize( ArrayIndex newSize );
-
-      Value &resolveReference( ArrayIndex index );
-
-      Value *find( ArrayIndex index ) const;
-
-      ArrayIndex size() const;
-
-      int compare( const ValueInternalArray &other ) const;
-
-   private:
-      static bool equals( const IteratorState &x, const IteratorState &other );
-      static void increment( IteratorState &iterator );
-      static void decrement( IteratorState &iterator );
-      static Value &dereference( const IteratorState &iterator );
-      static Value &unsafeDereference( const IteratorState &iterator );
-      static int distance( const IteratorState &x, const IteratorState &y );
-      static ArrayIndex indexOf( const IteratorState &iterator );
-      void makeBeginIterator( IteratorState &it ) const;
-      void makeEndIterator( IteratorState &it ) const;
-      void makeIterator( IteratorState &it, ArrayIndex index ) const;
-
-      void makeIndexValid( ArrayIndex index );
-
-      Value **pages_;
-      ArrayIndex size_;
-      PageIndex pageCount_;
-   };
-
-   /** \brief Experimental: do not use. Allocator to customize Value internal array.
-    * Below is an example of a simple implementation (actual implementation use
-    * memory pool).
-      \code
-class DefaultValueArrayAllocator : public ValueArrayAllocator
-{
-public: // overridden from ValueArrayAllocator
-   virtual ~DefaultValueArrayAllocator()
-   {
-   }
-
-   virtual ValueInternalArray *newArray()
-   {
-      return new ValueInternalArray();
-   }
-
-   virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other )
-   {
-      return new ValueInternalArray( other );
-   }
-
-   virtual void destruct( ValueInternalArray *array )
-   {
-      delete array;
-   }
-
-   virtual void reallocateArrayPageIndex( Value **&indexes, 
-                                          ValueInternalArray::PageIndex &indexCount,
-                                          ValueInternalArray::PageIndex minNewIndexCount )
-   {
-      ValueInternalArray::PageIndex newIndexCount = (indexCount*3)/2 + 1;
-      if ( minNewIndexCount > newIndexCount )
-         newIndexCount = minNewIndexCount;
-      void *newIndexes = realloc( indexes, sizeof(Value*) * newIndexCount );
-      if ( !newIndexes )
-         throw std::bad_alloc();
-      indexCount = newIndexCount;
-      indexes = static_cast<Value **>( newIndexes );
-   }
-   virtual void releaseArrayPageIndex( Value **indexes, 
-                                       ValueInternalArray::PageIndex indexCount )
-   {
-      if ( indexes )
-         free( indexes );
-   }
-
-   virtual Value *allocateArrayPage()
-   {
-      return static_cast<Value *>( malloc( sizeof(Value) * ValueInternalArray::itemsPerPage ) );
-   }
-
-   virtual void releaseArrayPage( Value *value )
-   {
-      if ( value )
-         free( value );
-   }
-};
-      \endcode
-    */ 
-   class JSON_API ValueArrayAllocator
-   {
-   public:
-      virtual ~ValueArrayAllocator();
-      virtual ValueInternalArray *newArray() = 0;
-      virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other ) = 0;
-      virtual void destructArray( ValueInternalArray *array ) = 0;
-      /** \brief Reallocate array page index.
-       * Reallocates an array of pointer on each page.
-       * \param indexes [input] pointer on the current index. May be \c NULL.
-       *                [output] pointer on the new index of at least 
-       *                         \a minNewIndexCount pages. 
-       * \param indexCount [input] current number of pages in the index.
-       *                   [output] number of page the reallocated index can handle.
-       *                            \b MUST be >= \a minNewIndexCount.
-       * \param minNewIndexCount Minimum number of page the new index must be able to
-       *                         handle.
-       */
-      virtual void reallocateArrayPageIndex( Value **&indexes, 
-                                             ValueInternalArray::PageIndex &indexCount,
-                                             ValueInternalArray::PageIndex minNewIndexCount ) = 0;
-      virtual void releaseArrayPageIndex( Value **indexes, 
-                                          ValueInternalArray::PageIndex indexCount ) = 0;
-      virtual Value *allocateArrayPage() = 0;
-      virtual void releaseArrayPage( Value *value ) = 0;
-   };
-#endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
-
-
-   /** \brief base class for Value iterators.
-    *
-    */
-   class ValueIteratorBase
-   {
-   public:
-      typedef unsigned int size_t;
-      typedef int difference_type;
-      typedef ValueIteratorBase SelfType;
-
-      ValueIteratorBase();
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-      explicit ValueIteratorBase( const Value::ObjectValues::iterator &current );
-#else
-      ValueIteratorBase( const ValueInternalArray::IteratorState &state );
-      ValueIteratorBase( const ValueInternalMap::IteratorState &state );
-#endif
-
-      bool operator ==( const SelfType &other ) const
-      {
-         return isEqual( other );
-      }
-
-      bool operator !=( const SelfType &other ) const
-      {
-         return !isEqual( other );
-      }
-
-      difference_type operator -( const SelfType &other ) const
-      {
-         return computeDistance( other );
-      }
-
-      /// Return either the index or the member name of the referenced value as a Value.
-      Value key() const;
-
-      /// Return the index of the referenced Value. -1 if it is not an arrayValue.
-      UInt index() const;
-
-      /// Return the member name of the referenced Value. "" if it is not an objectValue.
-      const char *memberName() const;
-
-   protected:
-      Value &deref() const;
-
-      void increment();
-
-      void decrement();
-
-      difference_type computeDistance( const SelfType &other ) const;
-
-      bool isEqual( const SelfType &other ) const;
-
-      void copy( const SelfType &other );
-
-   private:
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-      Value::ObjectValues::iterator current_;
-      // Indicates that iterator is for a null value.
-      bool isNull_;
-#else
-      union
-      {
-         ValueInternalArray::IteratorState array_;
-         ValueInternalMap::IteratorState map_;
-      } iterator_;
-      bool isArray_;
-#endif
-   };
-
-   /** \brief const iterator for object and array value.
-    *
-    */
-   class ValueConstIterator : public ValueIteratorBase
-   {
-      friend class Value;
-   public:
-      typedef unsigned int size_t;
-      typedef int difference_type;
-      typedef const Value &reference;
-      typedef const Value *pointer;
-      typedef ValueConstIterator SelfType;
-
-      ValueConstIterator();
-   private:
-      /*! \internal Use by Value to create an iterator.
-       */
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-      explicit ValueConstIterator( const Value::ObjectValues::iterator &current );
-#else
-      ValueConstIterator( const ValueInternalArray::IteratorState &state );
-      ValueConstIterator( const ValueInternalMap::IteratorState &state );
-#endif
-   public:
-      SelfType &operator =( const ValueIteratorBase &other );
-
-      SelfType operator++( int )
-      {
-         SelfType temp( *this );
-         ++*this;
-         return temp;
-      }
-
-      SelfType operator--( int )
-      {
-         SelfType temp( *this );
-         --*this;
-         return temp;
-      }
-
-      SelfType &operator--()
-      {
-         decrement();
-         return *this;
-      }
-
-      SelfType &operator++()
-      {
-         increment();
-         return *this;
-      }
-
-      reference operator *() const
-      {
-         return deref();
-      }
-   };
-
-
-   /** \brief Iterator for object and array value.
-    */
-   class ValueIterator : public ValueIteratorBase
-   {
-      friend class Value;
-   public:
-      typedef unsigned int size_t;
-      typedef int difference_type;
-      typedef Value &reference;
-      typedef Value *pointer;
-      typedef ValueIterator SelfType;
-
-      ValueIterator();
-      ValueIterator( const ValueConstIterator &other );
-      ValueIterator( const ValueIterator &other );
-   private:
-      /*! \internal Use by Value to create an iterator.
-       */
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-      explicit ValueIterator( const Value::ObjectValues::iterator &current );
-#else
-      ValueIterator( const ValueInternalArray::IteratorState &state );
-      ValueIterator( const ValueInternalMap::IteratorState &state );
-#endif
-   public:
-
-      SelfType &operator =( const SelfType &other );
-
-      SelfType operator++( int )
-      {
-         SelfType temp( *this );
-         ++*this;
-         return temp;
-      }
-
-      SelfType operator--( int )
-      {
-         SelfType temp( *this );
-         --*this;
-         return temp;
-      }
-
-      SelfType &operator--()
-      {
-         decrement();
-         return *this;
-      }
-
-      SelfType &operator++()
-      {
-         increment();
-         return *this;
-      }
-
-      reference operator *() const
-      {
-         return deref();
-      }
-   };
-
-
-} // namespace Json
-
-
-#endif // CPPTL_JSON_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/writer.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/writer.h b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/writer.h
deleted file mode 100644
index 16cf022..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/writer.h
+++ /dev/null
@@ -1,174 +0,0 @@
-#ifndef JSON_WRITER_H_INCLUDED
-# define JSON_WRITER_H_INCLUDED
-
-# include "value.h"
-# include <vector>
-# include <string>
-# include <iostream>
-
-namespace Json {
-
-   class Value;
-
-   /** \brief Abstract class for writers.
-    */
-   class JSON_API Writer
-   {
-   public:
-      virtual ~Writer();
-
-      virtual std::string write( const Value &root ) = 0;
-   };
-
-   /** \brief Outputs a Value in <a HREF="http://www.json.org">JSON</a> format without formatting (not human friendly).
-    *
-    * The JSON document is written in a single line. It is not intended for 'human' consumption,
-    * but may be useful to support feature such as RPC where bandwidth is limited.
-    * \sa Reader, Value
-    */
-   class JSON_API FastWriter : public Writer
-   {
-   public:
-      FastWriter();
-      virtual ~FastWriter(){}
-
-      void enableYAMLCompatibility();
-
-   public: // overridden from Writer
-      virtual std::string write( const Value &root );
-
-   private:
-      void writeValue( const Value &value );
-
-      std::string document_;
-      bool yamlCompatibilityEnabled_;
-   };
-
-   /** \brief Writes a Value in <a HREF="http://www.json.org">JSON</a> format in a human friendly way.
-    *
-    * The rules for line break and indent are as follow:
-    * - Object value:
-    *     - if empty then print {} without indent and line break
-    *     - if not empty the print '{', line break & indent, print one value per line
-    *       and then unindent and line break and print '}'.
-    * - Array value:
-    *     - if empty then print [] without indent and line break
-    *     - if the array contains no object value, empty array or some other value types,
-    *       and all the values fit on one lines, then print the array on a single line.
-    *     - otherwise, it the values do not fit on one line, or the array contains
-    *       object or non empty array, then print one value per line.
-    *
-    * If the Value have comments then they are outputed according to their #CommentPlacement.
-    *
-    * \sa Reader, Value, Value::setComment()
-    */
-   class JSON_API StyledWriter: public Writer
-   {
-   public:
-      StyledWriter();
-      virtual ~StyledWriter(){}
-
-   public: // overridden from Writer
-      /** \brief Serialize a Value in <a HREF="http://www.json.org">JSON</a> format.
-       * \param root Value to serialize.
-       * \return String containing the JSON document that represents the root value.
-       */
-      virtual std::string write( const Value &root );
-
-   private:
-      void writeValue( const Value &value );
-      void writeArrayValue( const Value &value );
-      bool isMultineArray( const Value &value );
-      void pushValue( const std::string &value );
-      void writeIndent();
-      void writeWithIndent( const std::string &value );
-      void indent();
-      void unindent();
-      void writeCommentBeforeValue( const Value &root );
-      void writeCommentAfterValueOnSameLine( const Value &root );
-      bool hasCommentForValue( const Value &value );
-      static std::string normalizeEOL( const std::string &text );
-
-      typedef std::vector<std::string> ChildValues;
-
-      ChildValues childValues_;
-      std::string document_;
-      std::string indentString_;
-      int rightMargin_;
-      int indentSize_;
-      bool addChildValues_;
-   };
-
-   /** \brief Writes a Value in <a HREF="http://www.json.org">JSON</a> format in a human friendly way,
-        to a stream rather than to a string.
-    *
-    * The rules for line break and indent are as follow:
-    * - Object value:
-    *     - if empty then print {} without indent and line break
-    *     - if not empty the print '{', line break & indent, print one value per line
-    *       and then unindent and line break and print '}'.
-    * - Array value:
-    *     - if empty then print [] without indent and line break
-    *     - if the array contains no object value, empty array or some other value types,
-    *       and all the values fit on one lines, then print the array on a single line.
-    *     - otherwise, it the values do not fit on one line, or the array contains
-    *       object or non empty array, then print one value per line.
-    *
-    * If the Value have comments then they are outputed according to their #CommentPlacement.
-    *
-    * \param indentation Each level will be indented by this amount extra.
-    * \sa Reader, Value, Value::setComment()
-    */
-   class JSON_API StyledStreamWriter
-   {
-   public:
-      StyledStreamWriter( std::string indentation="\t" );
-      ~StyledStreamWriter(){}
-
-   public:
-      /** \brief Serialize a Value in <a HREF="http://www.json.org">JSON</a> format.
-       * \param out Stream to write to. (Can be ostringstream, e.g.)
-       * \param root Value to serialize.
-       * \note There is no point in deriving from Writer, since write() should not return a value.
-       */
-      void write( std::ostream &out, const Value &root );
-
-   private:
-      void writeValue( const Value &value );
-      void writeArrayValue( const Value &value );
-      bool isMultineArray( const Value &value );
-      void pushValue( const std::string &value );
-      void writeIndent();
-      void writeWithIndent( const std::string &value );
-      void indent();
-      void unindent();
-      void writeCommentBeforeValue( const Value &root );
-      void writeCommentAfterValueOnSameLine( const Value &root );
-      bool hasCommentForValue( const Value &value );
-      static std::string normalizeEOL( const std::string &text );
-
-      typedef std::vector<std::string> ChildValues;
-
-      ChildValues childValues_;
-      std::ostream* document_;
-      std::string indentString_;
-      int rightMargin_;
-      std::string indentation_;
-      bool addChildValues_;
-   };
-
-   std::string JSON_API valueToString( Int value );
-   std::string JSON_API valueToString( UInt value );
-   std::string JSON_API valueToString( double value );
-   std::string JSON_API valueToString( bool value );
-   std::string JSON_API valueToQuotedString( const char *value );
-
-   /// \brief Output using the StyledStreamWriter.
-   /// \see Json::operator>>()
-   std::ostream& operator<<( std::ostream&, const Value &root );
-
-} // namespace Json
-
-
-
-#endif // JSON_WRITER_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_batchallocator.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_batchallocator.h b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_batchallocator.h
deleted file mode 100644
index 141ca77..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_batchallocator.h
+++ /dev/null
@@ -1,125 +0,0 @@
-#ifndef JSONCPP_BATCHALLOCATOR_H_INCLUDED
-# define JSONCPP_BATCHALLOCATOR_H_INCLUDED
-
-# include <stdlib.h>
-# include <assert.h>
-
-# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-
-namespace Json {
-
-/* Fast memory allocator.
- *
- * This memory allocator allocates memory for a batch of object (specified by
- * the page size, the number of object in each page).
- *
- * It does not allow the destruction of a single object. All the allocated objects
- * can be destroyed at once. The memory can be either released or reused for future
- * allocation.
- * 
- * The in-place new operator must be used to construct the object using the pointer
- * returned by allocate.
- */
-template<typename AllocatedType
-        ,const unsigned int objectPerAllocation>
-class BatchAllocator
-{
-public:
-   typedef AllocatedType Type;
-
-   BatchAllocator( unsigned int objectsPerPage = 255 )
-      : freeHead_( 0 )
-      , objectsPerPage_( objectsPerPage )
-   {
-//      printf( "Size: %d => %s\n", sizeof(AllocatedType), typeid(AllocatedType).name() );
-      assert( sizeof(AllocatedType) * objectPerAllocation >= sizeof(AllocatedType *) ); // We must be able to store a slist in the object free space.
-      assert( objectsPerPage >= 16 );
-      batches_ = allocateBatch( 0 );   // allocated a dummy page
-      currentBatch_ = batches_;
-   }
-
-   ~BatchAllocator()
-   {
-      for ( BatchInfo *batch = batches_; batch;  )
-      {
-         BatchInfo *nextBatch = batch->next_;
-         free( batch );
-         batch = nextBatch;
-      }
-   }
-
-   /// allocate space for an array of objectPerAllocation object.
-   /// @warning it is the responsibility of the caller to call objects constructors.
-   AllocatedType *allocate()
-   {
-      if ( freeHead_ ) // returns node from free list.
-      {
-         AllocatedType *object = freeHead_;
-         freeHead_ = *(AllocatedType **)object;
-         return object;
-      }
-      if ( currentBatch_->used_ == currentBatch_->end_ )
-      {
-         currentBatch_ = currentBatch_->next_;
-         while ( currentBatch_  &&  currentBatch_->used_ == currentBatch_->end_ )
-            currentBatch_ = currentBatch_->next_;
-
-         if ( !currentBatch_  ) // no free batch found, allocate a new one
-         { 
-            currentBatch_ = allocateBatch( objectsPerPage_ );
-            currentBatch_->next_ = batches_; // insert at the head of the list
-            batches_ = currentBatch_;
-         }
-      }
-      AllocatedType *allocated = currentBatch_->used_;
-      currentBatch_->used_ += objectPerAllocation;
-      return allocated;
-   }
-
-   /// Release the object.
-   /// @warning it is the responsibility of the caller to actually destruct the object.
-   void release( AllocatedType *object )
-   {
-      assert( object != 0 );
-      *(AllocatedType **)object = freeHead_;
-      freeHead_ = object;
-   }
-
-private:
-   struct BatchInfo
-   {
-      BatchInfo *next_;
-      AllocatedType *used_;
-      AllocatedType *end_;
-      AllocatedType buffer_[objectPerAllocation];
-   };
-
-   // disabled copy constructor and assignment operator.
-   BatchAllocator( const BatchAllocator & );
-   void operator =( const BatchAllocator &);
-
-   static BatchInfo *allocateBatch( unsigned int objectsPerPage )
-   {
-      const unsigned int mallocSize = sizeof(BatchInfo) - sizeof(AllocatedType)* objectPerAllocation
-                                + sizeof(AllocatedType) * objectPerAllocation * objectsPerPage;
-      BatchInfo *batch = static_cast<BatchInfo*>( malloc( mallocSize ) );
-      batch->next_ = 0;
-      batch->used_ = batch->buffer_;
-      batch->end_ = batch->buffer_ + objectsPerPage;
-      return batch;
-   }
-
-   BatchInfo *batches_;
-   BatchInfo *currentBatch_;
-   /// Head of a single linked list within the allocated space of freed object
-   AllocatedType *freeHead_;
-   unsigned int objectsPerPage_;
-};
-
-
-} // namespace Json
-
-# endif // ifndef JSONCPP_DOC_INCLUDE_IMPLEMENTATION
-
-#endif // JSONCPP_BATCHALLOCATOR_H_INCLUDED
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_internalarray.inl
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_internalarray.inl b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_internalarray.inl
deleted file mode 100644
index 9b985d2..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_internalarray.inl
+++ /dev/null
@@ -1,448 +0,0 @@
-// included by json_value.cpp
-// everything is within Json namespace
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class ValueInternalArray
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-ValueArrayAllocator::~ValueArrayAllocator()
-{
-}
-
-// //////////////////////////////////////////////////////////////////
-// class DefaultValueArrayAllocator
-// //////////////////////////////////////////////////////////////////
-#ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
-class DefaultValueArrayAllocator : public ValueArrayAllocator
-{
-public: // overridden from ValueArrayAllocator
-   virtual ~DefaultValueArrayAllocator()
-   {
-   }
-
-   virtual ValueInternalArray *newArray()
-   {
-      return new ValueInternalArray();
-   }
-
-   virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other )
-   {
-      return new ValueInternalArray( other );
-   }
-
-   virtual void destructArray( ValueInternalArray *array )
-   {
-      delete array;
-   }
-
-   virtual void reallocateArrayPageIndex( Value **&indexes, 
-                                          ValueInternalArray::PageIndex &indexCount,
-                                          ValueInternalArray::PageIndex minNewIndexCount )
-   {
-      ValueInternalArray::PageIndex newIndexCount = (indexCount*3)/2 + 1;
-      if ( minNewIndexCount > newIndexCount )
-         newIndexCount = minNewIndexCount;
-      void *newIndexes = realloc( indexes, sizeof(Value*) * newIndexCount );
-      if ( !newIndexes )
-         throw std::bad_alloc();
-      indexCount = newIndexCount;
-      indexes = static_cast<Value **>( newIndexes );
-   }
-   virtual void releaseArrayPageIndex( Value **indexes, 
-                                       ValueInternalArray::PageIndex indexCount )
-   {
-      if ( indexes )
-         free( indexes );
-   }
-
-   virtual Value *allocateArrayPage()
-   {
-      return static_cast<Value *>( malloc( sizeof(Value) * ValueInternalArray::itemsPerPage ) );
-   }
-
-   virtual void releaseArrayPage( Value *value )
-   {
-      if ( value )
-         free( value );
-   }
-};
-
-#else // #ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
-/// @todo make this thread-safe (lock when accessign batch allocator)
-class DefaultValueArrayAllocator : public ValueArrayAllocator
-{
-public: // overridden from ValueArrayAllocator
-   virtual ~DefaultValueArrayAllocator()
-   {
-   }
-
-   virtual ValueInternalArray *newArray()
-   {
-      ValueInternalArray *array = arraysAllocator_.allocate();
-      new (array) ValueInternalArray(); // placement new
-      return array;
-   }
-
-   virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other )
-   {
-      ValueInternalArray *array = arraysAllocator_.allocate();
-      new (array) ValueInternalArray( other ); // placement new
-      return array;
-   }
-
-   virtual void destructArray( ValueInternalArray *array )
-   {
-      if ( array )
-      {
-         array->~ValueInternalArray();
-         arraysAllocator_.release( array );
-      }
-   }
-
-   virtual void reallocateArrayPageIndex( Value **&indexes, 
-                                          ValueInternalArray::PageIndex &indexCount,
-                                          ValueInternalArray::PageIndex minNewIndexCount )
-   {
-      ValueInternalArray::PageIndex newIndexCount = (indexCount*3)/2 + 1;
-      if ( minNewIndexCount > newIndexCount )
-         newIndexCount = minNewIndexCount;
-      void *newIndexes = realloc( indexes, sizeof(Value*) * newIndexCount );
-      if ( !newIndexes )
-         throw std::bad_alloc();
-      indexCount = newIndexCount;
-      indexes = static_cast<Value **>( newIndexes );
-   }
-   virtual void releaseArrayPageIndex( Value **indexes, 
-                                       ValueInternalArray::PageIndex indexCount )
-   {
-      if ( indexes )
-         free( indexes );
-   }
-
-   virtual Value *allocateArrayPage()
-   {
-      return static_cast<Value *>( pagesAllocator_.allocate() );
-   }
-
-   virtual void releaseArrayPage( Value *value )
-   {
-      if ( value )
-         pagesAllocator_.release( value );
-   }
-private:
-   BatchAllocator<ValueInternalArray,1> arraysAllocator_;
-   BatchAllocator<Value,ValueInternalArray::itemsPerPage> pagesAllocator_;
-};
-#endif // #ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
-
-static ValueArrayAllocator *&arrayAllocator()
-{
-   static DefaultValueArrayAllocator defaultAllocator;
-   static ValueArrayAllocator *arrayAllocator = &defaultAllocator;
-   return arrayAllocator;
-}
-
-static struct DummyArrayAllocatorInitializer {
-   DummyArrayAllocatorInitializer() 
-   {
-      arrayAllocator();      // ensure arrayAllocator() statics are initialized before main().
-   }
-} dummyArrayAllocatorInitializer;
-
-// //////////////////////////////////////////////////////////////////
-// class ValueInternalArray
-// //////////////////////////////////////////////////////////////////
-bool 
-ValueInternalArray::equals( const IteratorState &x, 
-                            const IteratorState &other )
-{
-   return x.array_ == other.array_  
-          &&  x.currentItemIndex_ == other.currentItemIndex_  
-          &&  x.currentPageIndex_ == other.currentPageIndex_;
-}
-
-
-void 
-ValueInternalArray::increment( IteratorState &it )
-{
-   JSON_ASSERT_MESSAGE( it.array_  &&
-      (it.currentPageIndex_ - it.array_->pages_)*itemsPerPage + it.currentItemIndex_
-      != it.array_->size_,
-      "ValueInternalArray::increment(): moving iterator beyond end" );
-   ++(it.currentItemIndex_);
-   if ( it.currentItemIndex_ == itemsPerPage )
-   {
-      it.currentItemIndex_ = 0;
-      ++(it.currentPageIndex_);
-   }
-}
-
-
-void 
-ValueInternalArray::decrement( IteratorState &it )
-{
-   JSON_ASSERT_MESSAGE( it.array_  &&  it.currentPageIndex_ == it.array_->pages_ 
-                        &&  it.currentItemIndex_ == 0,
-      "ValueInternalArray::decrement(): moving iterator beyond end" );
-   if ( it.currentItemIndex_ == 0 )
-   {
-      it.currentItemIndex_ = itemsPerPage-1;
-      --(it.currentPageIndex_);
-   }
-   else
-   {
-      --(it.currentItemIndex_);
-   }
-}
-
-
-Value &
-ValueInternalArray::unsafeDereference( const IteratorState &it )
-{
-   return (*(it.currentPageIndex_))[it.currentItemIndex_];
-}
-
-
-Value &
-ValueInternalArray::dereference( const IteratorState &it )
-{
-   JSON_ASSERT_MESSAGE( it.array_  &&
-      (it.currentPageIndex_ - it.array_->pages_)*itemsPerPage + it.currentItemIndex_
-      < it.array_->size_,
-      "ValueInternalArray::dereference(): dereferencing invalid iterator" );
-   return unsafeDereference( it );
-}
-
-void 
-ValueInternalArray::makeBeginIterator( IteratorState &it ) const
-{
-   it.array_ = const_cast<ValueInternalArray *>( this );
-   it.currentItemIndex_ = 0;
-   it.currentPageIndex_ = pages_;
-}
-
-
-void 
-ValueInternalArray::makeIterator( IteratorState &it, ArrayIndex index ) const
-{
-   it.array_ = const_cast<ValueInternalArray *>( this );
-   it.currentItemIndex_ = index % itemsPerPage;
-   it.currentPageIndex_ = pages_ + index / itemsPerPage;
-}
-
-
-void 
-ValueInternalArray::makeEndIterator( IteratorState &it ) const
-{
-   makeIterator( it, size_ );
-}
-
-
-ValueInternalArray::ValueInternalArray()
-   : pages_( 0 )
-   , size_( 0 )
-   , pageCount_( 0 )
-{
-}
-
-
-ValueInternalArray::ValueInternalArray( const ValueInternalArray &other )
-   : pages_( 0 )
-   , pageCount_( 0 )
-   , size_( other.size_ )
-{
-   PageIndex minNewPages = other.size_ / itemsPerPage;
-   arrayAllocator()->reallocateArrayPageIndex( pages_, pageCount_, minNewPages );
-   JSON_ASSERT_MESSAGE( pageCount_ >= minNewPages, 
-                        "ValueInternalArray::reserve(): bad reallocation" );
-   IteratorState itOther;
-   other.makeBeginIterator( itOther );
-   Value *value;
-   for ( ArrayIndex index = 0; index < size_; ++index, increment(itOther) )
-   {
-      if ( index % itemsPerPage == 0 )
-      {
-         PageIndex pageIndex = index / itemsPerPage;
-         value = arrayAllocator()->allocateArrayPage();
-         pages_[pageIndex] = value;
-      }
-      new (value) Value( dereference( itOther ) );
-   }
-}
-
-
-ValueInternalArray &
-ValueInternalArray::operator =( const ValueInternalArray &other )
-{
-   ValueInternalArray temp( other );
-   swap( temp );
-   return *this;
-}
-
-
-ValueInternalArray::~ValueInternalArray()
-{
-   // destroy all constructed items
-   IteratorState it;
-   IteratorState itEnd;
-   makeBeginIterator( it);
-   makeEndIterator( itEnd );
-   for ( ; !equals(it,itEnd); increment(it) )
-   {
-      Value *value = &dereference(it);
-      value->~Value();
-   }
-   // release all pages
-   PageIndex lastPageIndex = size_ / itemsPerPage;
-   for ( PageIndex pageIndex = 0; pageIndex < lastPageIndex; ++pageIndex )
-      arrayAllocator()->releaseArrayPage( pages_[pageIndex] );
-   // release pages index
-   arrayAllocator()->releaseArrayPageIndex( pages_, pageCount_ );
-}
-
-
-void 
-ValueInternalArray::swap( ValueInternalArray &other )
-{
-   Value **tempPages = pages_;
-   pages_ = other.pages_;
-   other.pages_ = tempPages;
-   ArrayIndex tempSize = size_;
-   size_ = other.size_;
-   other.size_ = tempSize;
-   PageIndex tempPageCount = pageCount_;
-   pageCount_ = other.pageCount_;
-   other.pageCount_ = tempPageCount;
-}
-
-void 
-ValueInternalArray::clear()
-{
-   ValueInternalArray dummy;
-   swap( dummy );
-}
-
-
-void 
-ValueInternalArray::resize( ArrayIndex newSize )
-{
-   if ( newSize == 0 )
-      clear();
-   else if ( newSize < size_ )
-   {
-      IteratorState it;
-      IteratorState itEnd;
-      makeIterator( it, newSize );
-      makeIterator( itEnd, size_ );
-      for ( ; !equals(it,itEnd); increment(it) )
-      {
-         Value *value = &dereference(it);
-         value->~Value();
-      }
-      PageIndex pageIndex = (newSize + itemsPerPage - 1) / itemsPerPage;
-      PageIndex lastPageIndex = size_ / itemsPerPage;
-      for ( ; pageIndex < lastPageIndex; ++pageIndex )
-         arrayAllocator()->releaseArrayPage( pages_[pageIndex] );
-      size_ = newSize;
-   }
-   else if ( newSize > size_ )
-      resolveReference( newSize );
-}
-
-
-void 
-ValueInternalArray::makeIndexValid( ArrayIndex index )
-{
-   // Need to enlarge page index ?
-   if ( index >= pageCount_ * itemsPerPage )
-   {
-      PageIndex minNewPages = (index + 1) / itemsPerPage;
-      arrayAllocator()->reallocateArrayPageIndex( pages_, pageCount_, minNewPages );
-      JSON_ASSERT_MESSAGE( pageCount_ >= minNewPages, "ValueInternalArray::reserve(): bad reallocation" );
-   }
-
-   // Need to allocate new pages ?
-   ArrayIndex nextPageIndex = 
-      (size_ % itemsPerPage) != 0 ? size_ - (size_%itemsPerPage) + itemsPerPage
-                                  : size_;
-   if ( nextPageIndex <= index )
-   {
-      PageIndex pageIndex = nextPageIndex / itemsPerPage;
-      PageIndex pageToAllocate = (index - nextPageIndex) / itemsPerPage + 1;
-      for ( ; pageToAllocate-- > 0; ++pageIndex )
-         pages_[pageIndex] = arrayAllocator()->allocateArrayPage();
-   }
-
-   // Initialize all new entries
-   IteratorState it;
-   IteratorState itEnd;
-   makeIterator( it, size_ );
-   size_ = index + 1;
-   makeIterator( itEnd, size_ );
-   for ( ; !equals(it,itEnd); increment(it) )
-   {
-      Value *value = &dereference(it);
-      new (value) Value(); // Construct a default value using placement new
-   }
-}
-
-Value &
-ValueInternalArray::resolveReference( ArrayIndex index )
-{
-   if ( index >= size_ )
-      makeIndexValid( index );
-   return pages_[index/itemsPerPage][index%itemsPerPage];
-}
-
-Value *
-ValueInternalArray::find( ArrayIndex index ) const
-{
-   if ( index >= size_ )
-      return 0;
-   return &(pages_[index/itemsPerPage][index%itemsPerPage]);
-}
-
-ValueInternalArray::ArrayIndex 
-ValueInternalArray::size() const
-{
-   return size_;
-}
-
-int 
-ValueInternalArray::distance( const IteratorState &x, const IteratorState &y )
-{
-   return indexOf(y) - indexOf(x);
-}
-
-
-ValueInternalArray::ArrayIndex 
-ValueInternalArray::indexOf( const IteratorState &iterator )
-{
-   if ( !iterator.array_ )
-      return ArrayIndex(-1);
-   return ArrayIndex(
-      (iterator.currentPageIndex_ - iterator.array_->pages_) * itemsPerPage 
-      + iterator.currentItemIndex_ );
-}
-
-
-int 
-ValueInternalArray::compare( const ValueInternalArray &other ) const
-{
-   int sizeDiff( size_ - other.size_ );
-   if ( sizeDiff != 0 )
-      return sizeDiff;
-   
-   for ( ArrayIndex index =0; index < size_; ++index )
-   {
-      int diff = pages_[index/itemsPerPage][index%itemsPerPage].compare( 
-         other.pages_[index/itemsPerPage][index%itemsPerPage] );
-      if ( diff != 0 )
-         return diff;
-   }
-   return 0;
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_internalmap.inl
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_internalmap.inl b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_internalmap.inl
deleted file mode 100644
index ef37991..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_internalmap.inl
+++ /dev/null
@@ -1,607 +0,0 @@
-// included by json_value.cpp
-// everything is within Json namespace
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class ValueInternalMap
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-/** \internal MUST be safely initialized using memset( this, 0, sizeof(ValueInternalLink) );
-   * This optimization is used by the fast allocator.
-   */
-ValueInternalLink::ValueInternalLink()
-   : previous_( 0 )
-   , next_( 0 )
-{
-}
-
-ValueInternalLink::~ValueInternalLink()
-{ 
-   for ( int index =0; index < itemPerLink; ++index )
-   {
-      if ( !items_[index].isItemAvailable() )
-      {
-         if ( !items_[index].isMemberNameStatic() )
-            free( keys_[index] );
-      }
-      else
-         break;
-   }
-}
-
-
-
-ValueMapAllocator::~ValueMapAllocator()
-{
-}
-
-#ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
-class DefaultValueMapAllocator : public ValueMapAllocator
-{
-public: // overridden from ValueMapAllocator
-   virtual ValueInternalMap *newMap()
-   {
-      return new ValueInternalMap();
-   }
-
-   virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other )
-   {
-      return new ValueInternalMap( other );
-   }
-
-   virtual void destructMap( ValueInternalMap *map )
-   {
-      delete map;
-   }
-
-   virtual ValueInternalLink *allocateMapBuckets( unsigned int size )
-   {
-      return new ValueInternalLink[size];
-   }
-
-   virtual void releaseMapBuckets( ValueInternalLink *links )
-   {
-      delete [] links;
-   }
-
-   virtual ValueInternalLink *allocateMapLink()
-   {
-      return new ValueInternalLink();
-   }
-
-   virtual void releaseMapLink( ValueInternalLink *link )
-   {
-      delete link;
-   }
-};
-#else
-/// @todo make this thread-safe (lock when accessign batch allocator)
-class DefaultValueMapAllocator : public ValueMapAllocator
-{
-public: // overridden from ValueMapAllocator
-   virtual ValueInternalMap *newMap()
-   {
-      ValueInternalMap *map = mapsAllocator_.allocate();
-      new (map) ValueInternalMap(); // placement new
-      return map;
-   }
-
-   virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other )
-   {
-      ValueInternalMap *map = mapsAllocator_.allocate();
-      new (map) ValueInternalMap( other ); // placement new
-      return map;
-   }
-
-   virtual void destructMap( ValueInternalMap *map )
-   {
-      if ( map )
-      {
-         map->~ValueInternalMap();
-         mapsAllocator_.release( map );
-      }
-   }
-
-   virtual ValueInternalLink *allocateMapBuckets( unsigned int size )
-   {
-      return new ValueInternalLink[size];
-   }
-
-   virtual void releaseMapBuckets( ValueInternalLink *links )
-   {
-      delete [] links;
-   }
-
-   virtual ValueInternalLink *allocateMapLink()
-   {
-      ValueInternalLink *link = linksAllocator_.allocate();
-      memset( link, 0, sizeof(ValueInternalLink) );
-      return link;
-   }
-
-   virtual void releaseMapLink( ValueInternalLink *link )
-   {
-      link->~ValueInternalLink();
-      linksAllocator_.release( link );
-   }
-private:
-   BatchAllocator<ValueInternalMap,1> mapsAllocator_;
-   BatchAllocator<ValueInternalLink,1> linksAllocator_;
-};
-#endif
-
-static ValueMapAllocator *&mapAllocator()
-{
-   static DefaultValueMapAllocator defaultAllocator;
-   static ValueMapAllocator *mapAllocator = &defaultAllocator;
-   return mapAllocator;
-}
-
-static struct DummyMapAllocatorInitializer {
-   DummyMapAllocatorInitializer() 
-   {
-      mapAllocator();      // ensure mapAllocator() statics are initialized before main().
-   }
-} dummyMapAllocatorInitializer;
-
-
-
-// h(K) = value * K >> w ; with w = 32 & K prime w.r.t. 2^32.
-
-/*
-use linked list hash map. 
-buckets array is a container.
-linked list element contains 6 key/values. (memory = (16+4) * 6 + 4 = 124)
-value have extra state: valid, available, deleted
-*/
-
-
-ValueInternalMap::ValueInternalMap()
-   : buckets_( 0 )
-   , tailLink_( 0 )
-   , bucketsSize_( 0 )
-   , itemCount_( 0 )
-{
-}
-
-
-ValueInternalMap::ValueInternalMap( const ValueInternalMap &other )
-   : buckets_( 0 )
-   , tailLink_( 0 )
-   , bucketsSize_( 0 )
-   , itemCount_( 0 )
-{
-   reserve( other.itemCount_ );
-   IteratorState it;
-   IteratorState itEnd;
-   other.makeBeginIterator( it );
-   other.makeEndIterator( itEnd );
-   for ( ; !equals(it,itEnd); increment(it) )
-   {
-      bool isStatic;
-      const char *memberName = key( it, isStatic );
-      const Value &aValue = value( it );
-      resolveReference(memberName, isStatic) = aValue;
-   }
-}
-
-
-ValueInternalMap &
-ValueInternalMap::operator =( const ValueInternalMap &other )
-{
-   ValueInternalMap dummy( other );
-   swap( dummy );
-   return *this;
-}
-
-
-ValueInternalMap::~ValueInternalMap()
-{
-   if ( buckets_ )
-   {
-      for ( BucketIndex bucketIndex =0; bucketIndex < bucketsSize_; ++bucketIndex )
-      {
-         ValueInternalLink *link = buckets_[bucketIndex].next_;
-         while ( link )
-         {
-            ValueInternalLink *linkToRelease = link;
-            link = link->next_;
-            mapAllocator()->releaseMapLink( linkToRelease );
-         }
-      }
-      mapAllocator()->releaseMapBuckets( buckets_ );
-   }
-}
-
-
-void 
-ValueInternalMap::swap( ValueInternalMap &other )
-{
-   ValueInternalLink *tempBuckets = buckets_;
-   buckets_ = other.buckets_;
-   other.buckets_ = tempBuckets;
-   ValueInternalLink *tempTailLink = tailLink_;
-   tailLink_ = other.tailLink_;
-   other.tailLink_ = tempTailLink;
-   BucketIndex tempBucketsSize = bucketsSize_;
-   bucketsSize_ = other.bucketsSize_;
-   other.bucketsSize_ = tempBucketsSize;
-   BucketIndex tempItemCount = itemCount_;
-   itemCount_ = other.itemCount_;
-   other.itemCount_ = tempItemCount;
-}
-
-
-void 
-ValueInternalMap::clear()
-{
-   ValueInternalMap dummy;
-   swap( dummy );
-}
-
-
-ValueInternalMap::BucketIndex 
-ValueInternalMap::size() const
-{
-   return itemCount_;
-}
-
-bool 
-ValueInternalMap::reserveDelta( BucketIndex growth )
-{
-   return reserve( itemCount_ + growth );
-}
-
-bool 
-ValueInternalMap::reserve( BucketIndex newItemCount )
-{
-   if ( !buckets_  &&  newItemCount > 0 )
-   {
-      buckets_ = mapAllocator()->allocateMapBuckets( 1 );
-      bucketsSize_ = 1;
-      tailLink_ = &buckets_[0];
-   }
-//   BucketIndex idealBucketCount = (newItemCount + ValueInternalLink::itemPerLink) / ValueInternalLink::itemPerLink;
-   return true;
-}
-
-
-const Value *
-ValueInternalMap::find( const char *key ) const
-{
-   if ( !bucketsSize_ )
-      return 0;
-   HashKey hashedKey = hash( key );
-   BucketIndex bucketIndex = hashedKey % bucketsSize_;
-   for ( const ValueInternalLink *current = &buckets_[bucketIndex]; 
-         current != 0; 
-         current = current->next_ )
-   {
-      for ( BucketIndex index=0; index < ValueInternalLink::itemPerLink; ++index )
-      {
-         if ( current->items_[index].isItemAvailable() )
-            return 0;
-         if ( strcmp( key, current->keys_[index] ) == 0 )
-            return &current->items_[index];
-      }
-   }
-   return 0;
-}
-
-
-Value *
-ValueInternalMap::find( const char *key )
-{
-   const ValueInternalMap *constThis = this;
-   return const_cast<Value *>( constThis->find( key ) );
-}
-
-
-Value &
-ValueInternalMap::resolveReference( const char *key,
-                                    bool isStatic )
-{
-   HashKey hashedKey = hash( key );
-   if ( bucketsSize_ )
-   {
-      BucketIndex bucketIndex = hashedKey % bucketsSize_;
-      ValueInternalLink **previous = 0;
-      BucketIndex index;
-      for ( ValueInternalLink *current = &buckets_[bucketIndex]; 
-            current != 0; 
-            previous = &current->next_, current = current->next_ )
-      {
-         for ( index=0; index < ValueInternalLink::itemPerLink; ++index )
-         {
-            if ( current->items_[index].isItemAvailable() )
-               return setNewItem( key, isStatic, current, index );
-            if ( strcmp( key, current->keys_[index] ) == 0 )
-               return current->items_[index];
-         }
-      }
-   }
-
-   reserveDelta( 1 );
-   return unsafeAdd( key, isStatic, hashedKey );
-}
-
-
-void 
-ValueInternalMap::remove( const char *key )
-{
-   HashKey hashedKey = hash( key );
-   if ( !bucketsSize_ )
-      return;
-   BucketIndex bucketIndex = hashedKey % bucketsSize_;
-   for ( ValueInternalLink *link = &buckets_[bucketIndex]; 
-         link != 0; 
-         link = link->next_ )
-   {
-      BucketIndex index;
-      for ( index =0; index < ValueInternalLink::itemPerLink; ++index )
-      {
-         if ( link->items_[index].isItemAvailable() )
-            return;
-         if ( strcmp( key, link->keys_[index] ) == 0 )
-         {
-            doActualRemove( link, index, bucketIndex );
-            return;
-         }
-      }
-   }
-}
-
-void 
-ValueInternalMap::doActualRemove( ValueInternalLink *link, 
-                                  BucketIndex index,
-                                  BucketIndex bucketIndex )
-{
-   // find last item of the bucket and swap it with the 'removed' one.
-   // set removed items flags to 'available'.
-   // if last page only contains 'available' items, then deallocate it (it's empty)
-   ValueInternalLink *&lastLink = getLastLinkInBucket( index );
-   BucketIndex lastItemIndex = 1; // a link can never be empty, so start at 1
-   for ( ;   
-         lastItemIndex < ValueInternalLink::itemPerLink; 
-         ++lastItemIndex ) // may be optimized with dicotomic search
-   {
-      if ( lastLink->items_[lastItemIndex].isItemAvailable() )
-         break;
-   }
-   
-   BucketIndex lastUsedIndex = lastItemIndex - 1;
-   Value *valueToDelete = &link->items_[index];
-   Value *valueToPreserve = &lastLink->items_[lastUsedIndex];
-   if ( valueToDelete != valueToPreserve )
-      valueToDelete->swap( *valueToPreserve );
-   if ( lastUsedIndex == 0 )  // page is now empty
-   {  // remove it from bucket linked list and delete it.
-      ValueInternalLink *linkPreviousToLast = lastLink->previous_;
-      if ( linkPreviousToLast != 0 )   // can not deleted bucket link.
-      {
-         mapAllocator()->releaseMapLink( lastLink );
-         linkPreviousToLast->next_ = 0;
-         lastLink = linkPreviousToLast;
-      }
-   }
-   else
-   {
-      Value dummy;
-      valueToPreserve->swap( dummy ); // restore deleted to default Value.
-      valueToPreserve->setItemUsed( false );
-   }
-   --itemCount_;
-}
-
-
-ValueInternalLink *&
-ValueInternalMap::getLastLinkInBucket( BucketIndex bucketIndex )
-{
-   if ( bucketIndex == bucketsSize_ - 1 )
-      return tailLink_;
-   ValueInternalLink *&previous = buckets_[bucketIndex+1].previous_;
-   if ( !previous )
-      previous = &buckets_[bucketIndex];
-   return previous;
-}
-
-
-Value &
-ValueInternalMap::setNewItem( const char *key, 
-                              bool isStatic,
-                              ValueInternalLink *link, 
-                              BucketIndex index )
-{
-   char *duplicatedKey = valueAllocator()->makeMemberName( key );
-   ++itemCount_;
-   link->keys_[index] = duplicatedKey;
-   link->items_[index].setItemUsed();
-   link->items_[index].setMemberNameIsStatic( isStatic );
-   return link->items_[index]; // items already default constructed.
-}
-
-
-Value &
-ValueInternalMap::unsafeAdd( const char *key, 
-                             bool isStatic, 
-                             HashKey hashedKey )
-{
-   JSON_ASSERT_MESSAGE( bucketsSize_ > 0, "ValueInternalMap::unsafeAdd(): internal logic error." );
-   BucketIndex bucketIndex = hashedKey % bucketsSize_;
-   ValueInternalLink *&previousLink = getLastLinkInBucket( bucketIndex );
-   ValueInternalLink *link = previousLink;
-   BucketIndex index;
-   for ( index =0; index < ValueInternalLink::itemPerLink; ++index )
-   {
-      if ( link->items_[index].isItemAvailable() )
-         break;
-   }
-   if ( index == ValueInternalLink::itemPerLink ) // need to add a new page
-   {
-      ValueInternalLink *newLink = mapAllocator()->allocateMapLink();
-      index = 0;
-      link->next_ = newLink;
-      previousLink = newLink;
-      link = newLink;
-   }
-   return setNewItem( key, isStatic, link, index );
-}
-
-
-ValueInternalMap::HashKey 
-ValueInternalMap::hash( const char *key ) const
-{
-   HashKey hash = 0;
-   while ( *key )
-      hash += *key++ * 37;
-   return hash;
-}
-
-
-int 
-ValueInternalMap::compare( const ValueInternalMap &other ) const
-{
-   int sizeDiff( itemCount_ - other.itemCount_ );
-   if ( sizeDiff != 0 )
-      return sizeDiff;
-   // Strict order guaranty is required. Compare all keys FIRST, then compare values.
-   IteratorState it;
-   IteratorState itEnd;
-   makeBeginIterator( it );
-   makeEndIterator( itEnd );
-   for ( ; !equals(it,itEnd); increment(it) )
-   {
-      if ( !other.find( key( it ) ) )
-         return 1;
-   }
-
-   // All keys are equals, let's compare values
-   makeBeginIterator( it );
-   for ( ; !equals(it,itEnd); increment(it) )
-   {
-      const Value *otherValue = other.find( key( it ) );
-      int valueDiff = value(it).compare( *otherValue );
-      if ( valueDiff != 0 )
-         return valueDiff;
-   }
-   return 0;
-}
-
-
-void 
-ValueInternalMap::makeBeginIterator( IteratorState &it ) const
-{
-   it.map_ = const_cast<ValueInternalMap *>( this );
-   it.bucketIndex_ = 0;
-   it.itemIndex_ = 0;
-   it.link_ = buckets_;
-}
-
-
-void 
-ValueInternalMap::makeEndIterator( IteratorState &it ) const
-{
-   it.map_ = const_cast<ValueInternalMap *>( this );
-   it.bucketIndex_ = bucketsSize_;
-   it.itemIndex_ = 0;
-   it.link_ = 0;
-}
-
-
-bool 
-ValueInternalMap::equals( const IteratorState &x, const IteratorState &other )
-{
-   return x.map_ == other.map_  
-          &&  x.bucketIndex_ == other.bucketIndex_  
-          &&  x.link_ == other.link_
-          &&  x.itemIndex_ == other.itemIndex_;
-}
-
-
-void 
-ValueInternalMap::incrementBucket( IteratorState &iterator )
-{
-   ++iterator.bucketIndex_;
-   JSON_ASSERT_MESSAGE( iterator.bucketIndex_ <= iterator.map_->bucketsSize_,
-      "ValueInternalMap::increment(): attempting to iterate beyond end." );
-   if ( iterator.bucketIndex_ == iterator.map_->bucketsSize_ )
-      iterator.link_ = 0;
-   else
-      iterator.link_ = &(iterator.map_->buckets_[iterator.bucketIndex_]);
-   iterator.itemIndex_ = 0;
-}
-
-
-void 
-ValueInternalMap::increment( IteratorState &iterator )
-{
-   JSON_ASSERT_MESSAGE( iterator.map_, "Attempting to iterator using invalid iterator." );
-   ++iterator.itemIndex_;
-   if ( iterator.itemIndex_ == ValueInternalLink::itemPerLink )
-   {
-      JSON_ASSERT_MESSAGE( iterator.link_ != 0,
-         "ValueInternalMap::increment(): attempting to iterate beyond end." );
-      iterator.link_ = iterator.link_->next_;
-      if ( iterator.link_ == 0 )
-         incrementBucket( iterator );
-   }
-   else if ( iterator.link_->items_[iterator.itemIndex_].isItemAvailable() )
-   {
-      incrementBucket( iterator );
-   }
-}
-
-
-void 
-ValueInternalMap::decrement( IteratorState &iterator )
-{
-   if ( iterator.itemIndex_ == 0 )
-   {
-      JSON_ASSERT_MESSAGE( iterator.map_, "Attempting to iterate using invalid iterator." );
-      if ( iterator.link_ == &iterator.map_->buckets_[iterator.bucketIndex_] )
-      {
-         JSON_ASSERT_MESSAGE( iterator.bucketIndex_ > 0, "Attempting to iterate beyond beginning." );
-         --(iterator.bucketIndex_);
-      }
-      iterator.link_ = iterator.link_->previous_;
-      iterator.itemIndex_ = ValueInternalLink::itemPerLink - 1;
-   }
-}
-
-
-const char *
-ValueInternalMap::key( const IteratorState &iterator )
-{
-   JSON_ASSERT_MESSAGE( iterator.link_, "Attempting to iterate using invalid iterator." );
-   return iterator.link_->keys_[iterator.itemIndex_];
-}
-
-const char *
-ValueInternalMap::key( const IteratorState &iterator, bool &isStatic )
-{
-   JSON_ASSERT_MESSAGE( iterator.link_, "Attempting to iterate using invalid iterator." );
-   isStatic = iterator.link_->items_[iterator.itemIndex_].isMemberNameStatic();
-   return iterator.link_->keys_[iterator.itemIndex_];
-}
-
-
-Value &
-ValueInternalMap::value( const IteratorState &iterator )
-{
-   JSON_ASSERT_MESSAGE( iterator.link_, "Attempting to iterate using invalid iterator." );
-   return iterator.link_->items_[iterator.itemIndex_];
-}
-
-
-int 
-ValueInternalMap::distance( const IteratorState &x, const IteratorState &y )
-{
-   int offset = 0;
-   IteratorState it = x;
-   while ( !equals( it, y ) )
-      increment( it );
-   return offset;
-}


[25/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/platforms/ios.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/ios.js b/cordova-lib/src/plugman/platforms/ios.js
new file mode 100644
index 0000000..4f570c3
--- /dev/null
+++ b/cordova-lib/src/plugman/platforms/ios.js
@@ -0,0 +1,216 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed 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 path = require('path')
+  , fs   = require('fs')
+  , glob = require('glob')
+  , xcode = require('xcode')
+  , plist = require('plist-with-patches')
+  , shell = require('shelljs')
+  , events = require('../events')
+  , cachedProjectFiles = {};
+
+module.exports = {
+    www_dir:function(project_dir) {
+        return path.join(project_dir, 'www');
+    },
+    package_name:function(project_dir) {
+        var plist_file = glob.sync(path.join(project_dir, '**', '*-Info.plist'))[0];
+        return plist.parseFileSync(plist_file).CFBundleIdentifier;
+    },
+    "source-file":{
+        install:function(source_el, plugin_dir, project_dir, plugin_id, project) {
+            var src = source_el.attrib['src'];
+            var srcFile = path.resolve(plugin_dir, src);
+            var targetDir = path.resolve(project.plugins_dir, plugin_id, getRelativeDir(source_el));
+            var destFile = path.resolve(targetDir, path.basename(src));
+            var is_framework = source_el.attrib['framework'] && (source_el.attrib['framework'] == 'true' || source_el.attrib['framework'] == true);
+            var has_flags = source_el.attrib['compiler-flags'] && source_el.attrib['compiler-flags'].length ? true : false ;
+
+            if (!fs.existsSync(srcFile)) throw new Error('cannot find "' + srcFile + '" ios <source-file>');
+            if (fs.existsSync(destFile)) throw new Error('target destination "' + destFile + '" already exists');
+            var project_ref = path.join('Plugins', path.relative(project.plugins_dir, destFile));
+
+            if (is_framework) {
+                var weak = source_el.attrib['weak'];
+                var opt = { weak: (weak == undefined || weak == null || weak != 'true' ? false : true ) };
+                var project_relative = path.join(path.basename(project.xcode_path), project_ref);
+                project.xcode.addFramework(project_relative, opt);
+                project.xcode.addToLibrarySearchPaths({path:project_ref});
+            } else {
+                project.xcode.addSourceFile(project_ref, has_flags ? {compilerFlags:source_el.attrib['compiler-flags']} : {});
+            }
+            shell.mkdir('-p', targetDir);
+            shell.cp(srcFile, destFile);
+        },
+        uninstall:function(source_el, project_dir, plugin_id, project) {
+            var src = source_el.attrib['src'];
+            var targetDir = path.resolve(project.plugins_dir, plugin_id, getRelativeDir(source_el));
+            var destFile = path.resolve(targetDir, path.basename(src));
+            var is_framework = source_el.attrib['framework'] && (source_el.attrib['framework'] == 'true' || source_el.attrib['framework'] == true);
+
+            var project_ref = path.join('Plugins', path.relative(project.plugins_dir, destFile));
+            project.xcode.removeSourceFile(project_ref);
+            if (is_framework) {
+                var project_relative = path.join(path.basename(project.xcode_path), project_ref);
+                project.xcode.removeFramework(project_relative);
+                project.xcode.removeFromLibrarySearchPaths({path:project_ref});
+            }
+            shell.rm('-rf', destFile);
+
+            if(fs.existsSync(targetDir) && fs.readdirSync(targetDir).length>0){
+                shell.rm('-rf', targetDir);
+            }
+        }
+    },
+    "header-file":{
+        install:function(header_el, plugin_dir, project_dir, plugin_id, project) {
+            var src = header_el.attrib['src'];
+            var srcFile = path.resolve(plugin_dir, src);
+            var targetDir = path.resolve(project.plugins_dir, plugin_id, getRelativeDir(header_el));
+            var destFile = path.resolve(targetDir, path.basename(src));
+            if (!fs.existsSync(srcFile)) throw new Error('cannot find "' + srcFile + '" ios <header-file>');
+            if (fs.existsSync(destFile)) throw new Error('target destination "' + destFile + '" already exists');
+            project.xcode.addHeaderFile(path.join('Plugins', path.relative(project.plugins_dir, destFile)));
+            shell.mkdir('-p', targetDir);
+            shell.cp(srcFile, destFile);
+        },
+        uninstall:function(header_el, project_dir, plugin_id, project) {
+            var src = header_el.attrib['src'];
+            var targetDir = path.resolve(project.plugins_dir, plugin_id, getRelativeDir(header_el));
+            var destFile = path.resolve(targetDir, path.basename(src));
+            project.xcode.removeHeaderFile(path.join('Plugins', path.relative(project.plugins_dir, destFile)));
+            shell.rm('-rf', destFile);
+            if(fs.existsSync(targetDir) && fs.readdirSync(targetDir).length>0){
+                shell.rm('-rf', targetDir);
+            }
+        }
+    },
+    "resource-file":{
+        install:function(resource_el, plugin_dir, project_dir, plugin_id, project) {
+            var src = resource_el.attrib['src'],
+                srcFile = path.resolve(plugin_dir, src),
+                destFile = path.resolve(project.resources_dir, path.basename(src));
+            if (!fs.existsSync(srcFile)) throw new Error('cannot find "' + srcFile + '" ios <resource-file>');
+            if (fs.existsSync(destFile)) throw new Error('target destination "' + destFile + '" already exists');
+            project.xcode.addResourceFile(path.join('Resources', path.basename(src)));
+            shell.cp('-R', srcFile, project.resources_dir);
+        },
+        uninstall:function(resource_el, project_dir, plugin_id, project) {
+            var src = resource_el.attrib['src'],
+                destFile = path.resolve(project.resources_dir, path.basename(src));
+            project.xcode.removeResourceFile(path.join('Resources', path.basename(src)));
+            shell.rm('-rf', destFile);
+        }
+    },
+    "framework":{ // CB-5238 custom frameworks only
+        install:function(framework_el, plugin_dir, project_dir, plugin_id, project) {
+            var src = framework_el.attrib['src'],
+                custom = framework_el.attrib['custom'],
+                srcFile = path.resolve(plugin_dir, src),
+                targetDir = path.resolve(project.plugins_dir, plugin_id, path.basename(src));
+            if (!custom) throw new Error('cannot add non custom frameworks.');
+            if (!fs.existsSync(srcFile)) throw new Error('cannot find "' + srcFile + '" ios <framework>');
+            if (fs.existsSync(targetDir)) throw new Error('target destination "' + targetDir + '" already exists');
+            shell.mkdir('-p', path.dirname(targetDir));
+            shell.cp('-R', srcFile, path.dirname(targetDir)); // frameworks are directories
+            var project_relative = path.relative(project_dir, targetDir);
+            project.xcode.addFramework(project_relative, {customFramework: true});
+        },
+        uninstall:function(framework_el, project_dir, plugin_id, project) {
+            var src = framework_el.attrib['src'],
+                targetDir = path.resolve(project.plugins_dir, plugin_id, path.basename(src));
+            project.xcode.removeFramework(targetDir, {customFramework: true});
+            shell.rm('-rf', targetDir);
+        }
+    },
+    "lib-file": {
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'lib-file.install is not supported for ios');
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            events.emit('verbose', 'lib-file.uninstall is not supported for ios');
+        }
+    },
+    parseProjectFile:function(project_dir) {
+        // TODO: With ConfigKeeper introduced in config-changes.js
+        // there is now double caching of iOS project files.
+        // Remove the cache here when install can handle
+        // a list of plugins at once.
+        if (cachedProjectFiles[project_dir]) {
+            return cachedProjectFiles[project_dir];
+        }
+        // grab and parse pbxproj
+        // we don't want CordovaLib's xcode project
+        var project_files = glob.sync(path.join(project_dir, '*.xcodeproj', 'project.pbxproj'));
+
+        if (project_files.length === 0) {
+            throw new Error("does not appear to be an xcode project (no xcode project file)");
+        }
+        var pbxPath = project_files[0];
+        var xcodeproj = xcode.project(pbxPath);
+        xcodeproj.parseSync();
+
+        // grab and parse plist file or config.xml
+        var config_files = (glob.sync(path.join(project_dir, '**', '{PhoneGap,Cordova}.plist')).length == 0 ?
+                            glob.sync(path.join(project_dir, '**', 'config.xml')) :
+                            glob.sync(path.join(project_dir, '**', '{PhoneGap,Cordova}.plist'))
+                           );
+
+        config_files = config_files.filter(function (val) {
+            return !(/^build\//.test(val)) && !(/\/www\/config.xml$/.test(val));
+        });
+
+        if (config_files.length === 0) {
+            throw new Error("could not find PhoneGap/Cordova plist file, or config.xml file.");
+        }
+
+        var config_file = config_files[0];
+        var config_filename = path.basename(config_file);
+        var xcode_dir = path.dirname(config_file);
+        var pluginsDir = path.resolve(xcode_dir, 'Plugins');
+        var resourcesDir = path.resolve(xcode_dir, 'Resources');
+
+        cachedProjectFiles[project_dir] = {
+            plugins_dir:pluginsDir,
+            resources_dir:resourcesDir,
+            xcode:xcodeproj,
+            xcode_path:xcode_dir,
+            pbx: pbxPath,
+            write: function () {
+                fs.writeFileSync(pbxPath, xcodeproj.writeSync());
+            }
+        };
+
+        return cachedProjectFiles[project_dir];
+    },
+    purgeProjectFileCache:function(project_dir) {
+        delete cachedProjectFiles[project_dir];
+    }
+
+};
+
+function getRelativeDir(file) {
+    var targetDir = file.attrib['target-dir'];
+    if (targetDir) {
+        return targetDir;
+    } else {
+        return '';
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/platforms/tizen.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/tizen.js b/cordova-lib/src/plugman/platforms/tizen.js
new file mode 100644
index 0000000..efbeba9
--- /dev/null
+++ b/cordova-lib/src/plugman/platforms/tizen.js
@@ -0,0 +1,72 @@
+var path = require('path')
+    , fs = require('fs')
+    , common = require('./common')
+    , events = require('../events')
+    , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
+
+module.exports = {
+    www_dir: function(project_dir) {
+        return path.join(project_dir, 'www');
+    },
+    package_name:function(project_dir) {
+        // preferred location if cordova >= 3.4
+        var preferred_path = path.join(project_dir, 'config.xml');
+        if (!fs.existsSync(preferred_path)) {
+            // older location
+            old_config_path = path.join(module.exports.www_dir(project_dir), 'config.xml');
+            if (!fs.existsSync(old_config_path)) {
+                // output newer location and fail reading
+                config_path = preferred_path;
+                events.emit('verbose', 'unable to find '+config_path);
+            } else {
+                config_path = old_config_path;
+            }
+        } else {
+            config_path = preferred_path;
+        }
+        var widget_doc = xml_helpers.parseElementtreeSync(config_path);
+        return widget_doc._root.attrib['id'];
+    },
+    "source-file":{
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
+            common.copyFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
+            common.removeFile(project_dir, dest);
+        }
+    },
+    "header-file": {
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'header-fileinstall is not supported for firefoxos');
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            events.emit('verbose', 'header-file.uninstall is not supported for firefoxos');
+        }
+    },
+    "resource-file":{
+        install:function(el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'resource-file.install is not supported for firefoxos');
+        },
+        uninstall:function(el, project_dir, plugin_id) {
+            events.emit('verbose', 'resource-file.uninstall is not supported for firefoxos');
+        }
+    },
+    "framework": {
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'framework.install is not supported for firefoxos');
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            events.emit('verbose', 'framework.uninstall is not supported for firefoxos');
+        }
+    },
+    "lib-file": {
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'lib-file.install is not supported for firefoxos');
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            events.emit('verbose', 'lib-file.uninstall is not supported for firefoxos');
+        }
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/platforms/ubuntu.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/ubuntu.js b/cordova-lib/src/plugman/platforms/ubuntu.js
new file mode 100644
index 0000000..d04b774
--- /dev/null
+++ b/cordova-lib/src/plugman/platforms/ubuntu.js
@@ -0,0 +1,124 @@
+/*
+ *
+ * Copyright 2013 Canonical Ltd.
+ *
+ * Licensed 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.
+ *
+*/
+
+function replaceAt(str, index, char) {
+    return str.substr(0, index) + char + str.substr(index + char.length);
+}
+
+function toCamelCase(str) {
+    return str.split('-').map(function(str) {
+        return replaceAt(str, 0, str[0].toUpperCase());
+    }).join('');
+}
+
+var fs = require('fs')
+   , path = require('path')
+   , events = require('../events')
+   , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
+
+module.exports = {
+    www_dir:function(project_dir) {
+        return path.join(project_dir, 'www');
+    },
+
+    package_name:function (project_dir) {
+        var config_path = path.join(project_dir, 'config.xml');
+        var widget_doc = xml_helpers.parseElementtreeSync(config_path);
+        return widget_doc._root.attrib['id'];
+    },
+    "source-file":{
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            var shell = require('shelljs');
+            var dest = path.join(project_dir, "build", "src", "plugins", plugin_id);
+            shell.mkdir(dest);
+            shell.cp(path.join(plugin_dir, source_el.attrib.src), dest);
+
+            shell.exec('touch ' + path.join(project_dir, "CMakeLists.txt"))
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            var shell = require('shelljs');
+
+            var dest = path.join(project_dir, "build", "src", "plugins", plugin_id);
+            shell.rm(path.join(dest, path.basename(source_el.attrib.src)));
+        }
+    },
+    "header-file":{
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            var shell = require('shelljs');
+            var dest = path.join(project_dir, "build", "src", "plugins", plugin_id);
+            shell.mkdir(dest);
+            shell.cp(path.join(plugin_dir, source_el.attrib.src), dest);
+
+            var plugins = path.join(project_dir, "build", "src", "coreplugins.cpp");
+            src = String(fs.readFileSync(plugins));
+
+            src = src.replace('INSERT_HEADER_HERE', '#include "plugins/' + plugin_id + "/" + path.basename(source_el.attrib.src) +'"\nINSERT_HEADER_HERE');
+            var class_name = plugin_id.match(/\.[^.]+$/)[0].substr(1);
+            class_name = toCamelCase(class_name);
+            src = src.replace('INSERT_PLUGIN_HERE', 'INIT_PLUGIN(' + class_name + ');INSERT_PLUGIN_HERE');
+
+            fs.writeFileSync(plugins, src);
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            var shell = require('shelljs');
+            var dest = path.join(project_dir, "build", "src", "plugins", plugin_id);
+            shell.rm(path.join(dest, path.basename(source_el.attrib.src)));
+
+            var plugins = path.join(project_dir, "build", "src", "coreplugins.cpp");
+            src = String(fs.readFileSync(plugins));
+
+            src = src.replace('#include "plugins/' + plugin_id + "/" + path.basename(source_el.attrib.src) +'"', '');
+            var class_name = plugin_id.match(/\.[^.]+$/)[0].substr(1);
+            class_name = toCamelCase(class_name);
+            src = src.replace('INIT_PLUGIN(' + class_name + ');', '');
+
+            fs.writeFileSync(plugins, src);
+        }
+    },
+    "resource-file":{
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            var shell = require('shelljs');
+            var dest = path.join(project_dir, "qml");
+            shell.mkdir(dest);
+            shell.cp(path.join(plugin_dir, source_el.attrib.src), dest);
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            var shell = require('shelljs');
+
+            var dest = path.join(project_dir, "qml");
+            shell.rm(path.join(dest, path.basename(source_el.attrib.src)));
+        }
+    },
+    "framework": {
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'framework.install is not supported for ubuntu');
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            events.emit('verbose', 'framework.uninstall is not supported for ubuntu');
+        }
+    },
+    "lib-file": {
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'lib-file.install is not supported for ubuntu');
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            events.emit('verbose', 'lib-file.uninstall is not supported for ubuntu');
+        }
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/platforms/windows8.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/windows8.js b/cordova-lib/src/plugman/platforms/windows8.js
new file mode 100644
index 0000000..523dc6e
--- /dev/null
+++ b/cordova-lib/src/plugman/platforms/windows8.js
@@ -0,0 +1,134 @@
+/*
+ *
+ * Copyright 2013 Jesse MacFadyen
+ *
+ * Licensed 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 common = require('./common'),
+    path = require('path'),
+    glob = require('glob'),
+    shell = require('shelljs'),
+    fs = require('fs'),
+    w8jsproj = require('../util/w8jsproj'),
+    events = require('../events'),
+    xml_helpers = require('../util/xml-helpers');
+
+
+module.exports = {
+    platformName:"windows8",
+    InvalidProjectPathError:'does not appear to be a Windows Store JS project (no .jsproj file)',
+    www_dir:function(project_dir) {
+        return path.join(project_dir, 'www');
+    },
+    package_name:function(project_dir) {
+        var manifest = xml_helpers.parseElementtreeSync(path.join(project_dir, 'package.appxmanifest'));
+        return manifest.find("Properties/DisplayName").text;
+    },
+    parseProjectFile:function(project_dir) {
+        var project_files = glob.sync('*.jsproj', { cwd:project_dir });
+        if (project_files.length == 0) {
+            throw new Error(this.InvalidProjectPathError);
+        }
+        return new w8jsproj(path.join(project_dir, project_files[0]));
+    },
+    "source-file":{
+        install:function(source_el, plugin_dir, project_dir, plugin_id, project_file) {
+            var targetDir = source_el.attrib['target-dir'] || '';
+            var dest = path.join('www', 'plugins', plugin_id, targetDir, path.basename(source_el.attrib['src']));
+
+            common.copyNewFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
+            // add reference to this file to jsproj.
+            project_file.addSourceFile(dest);
+        },
+        uninstall:function(source_el, project_dir, plugin_id, project_file) {
+            var dest = path.join('www', 'plugins', plugin_id,
+                                 source_el.attrib['target-dir'] ? source_el.attrib['target-dir'] : '',
+                                 path.basename(source_el.attrib['src']));
+            common.removeFile(project_dir, dest);
+            // remove reference to this file from csproj.
+            project_file.removeSourceFile(dest);
+        }
+    },
+    "header-file": {
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'header-fileinstall is not supported for Windows 8');
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            events.emit('verbose', 'header-file.uninstall is not supported for Windows 8');
+        }
+    },
+    "resource-file":{
+        install:function(el, plugin_dir, project_dir, plugin_id, project_file) {
+            events.emit('verbose', 'resource-file is not supported for Windows 8');
+        },
+        uninstall:function(el, project_dir, plugin_id, project_file) {
+        }
+    },
+    "lib-file": {
+        install:function(el, plugin_dir, project_dir, plugin_id, project_file) {
+            var inc  = el.attrib['Include'];
+            project_file.addSDKRef(inc);
+        },
+        uninstall:function(el, project_dir, plugin_id, project_file) {
+            events.emit('verbose', 'windows8 lib-file uninstall :: ' + plugin_id);
+            var inc = el.attrib['Include'];
+            project_file.removeSDKRef(inc);
+        }
+    },
+    "framework": {
+        install:function(el, plugin_dir, project_dir, plugin_id, project_file) {
+            events.emit('verbose', 'windows8 framework install :: ' + plugin_id);
+
+            var src = el.attrib['src'];
+            var dest = src; // if !isCustom, we will just add a reference to the file in place
+            // technically it is not possible to get here without isCustom == true -jm
+            // var isCustom = el.attrib.custom == "true";
+            var type = el.attrib["type"];
+
+            if(type == "projectReference") {
+                project_file.addProjectReference(path.join(plugin_dir,src));
+            }
+            else {
+                // if(isCustom) {}
+                dest = path.join('plugins', plugin_id, path.basename(src));
+                common.copyFile(plugin_dir, src, project_dir, dest);
+                project_file.addReference(dest,src);
+            }
+
+        },
+        uninstall:function(el, project_dir, plugin_id, project_file) {
+            events.emit('verbose', 'windows8 framework uninstall :: ' + plugin_id  );
+
+            var src = el.attrib['src'];
+            // technically it is not possible to get here without isCustom == true -jm
+            // var isCustom = el.attrib.custom == "true";
+            var type = el.attrib["type"];
+            // unfortunately we have to generate the plugin_dir path because it is not passed to uninstall
+            var plugin_dir = path.join(project_dir,"cordova/plugins",plugin_id,src);
+
+            if(type == "projectReference") {
+                project_file.removeProjectReference(plugin_dir);
+            }
+            else {
+                // if(isCustom) {  }
+                var targetPath = path.join('plugins', plugin_id);
+                common.removeFile(project_dir, targetPath);
+                project_file.removeReference(src);
+            }
+        }
+
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/platforms/wp7.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/wp7.js b/cordova-lib/src/plugman/platforms/wp7.js
new file mode 100644
index 0000000..e6a76d0
--- /dev/null
+++ b/cordova-lib/src/plugman/platforms/wp7.js
@@ -0,0 +1,91 @@
+/*
+ *
+ * Copyright 2013 Jesse MacFadyen
+ *
+ * Licensed 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 common = require('./common'),
+    path = require('path'),
+    glob = require('glob'),
+    fs = require('fs'),
+    csproj = require('../util/csproj'),
+    events = require('../events'),
+    xml_helpers = require('../util/xml-helpers');
+
+module.exports = {
+    www_dir:function(project_dir) {
+        return path.join(project_dir, 'www');
+    },
+    package_name:function(project_dir) {
+        return xml_helpers.parseElementtreeSync(path.join(project_dir, 'Properties', 'WMAppManifest.xml')).find('App').attrib.ProductID;
+    },
+    parseProjectFile:function(project_dir) {
+        var project_files = glob.sync('*.csproj', {
+            cwd:project_dir
+        });
+        if (project_files.length === 0) {
+            throw new Error('does not appear to be a Windows Phone project (no .csproj file)');
+        }
+        return new csproj(path.join(project_dir, project_files[0]));
+    },
+    "source-file":{
+        install:function(source_el, plugin_dir, project_dir, plugin_id, project_file) {
+            var dest = path.join('Plugins', plugin_id, source_el.attrib['target-dir'] ? source_el.attrib['target-dir'] : '', path.basename(source_el.attrib['src']));
+
+            common.copyNewFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
+            // add reference to this file to csproj.
+            project_file.addSourceFile(dest);
+        },
+        uninstall:function(source_el, project_dir, plugin_id, project_file) {
+            var dest = path.join('Plugins', plugin_id, source_el.attrib['target-dir'] ? source_el.attrib['target-dir'] : '', path.basename(source_el.attrib['src']));
+            common.removeFile(project_dir, dest);
+            // remove reference to this file from csproj.
+            project_file.removeSourceFile(dest);
+        }
+    },
+    "header-file": {
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'header-fileinstall is not supported for wp7');
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            events.emit('verbose', 'header-file.uninstall is not supported for wp7');
+        }
+    },
+    "resource-file":{
+        install:function(el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'resource-file.install is not supported for wp7');
+        },
+        uninstall:function(el, project_dir, plugin_id) {
+            events.emit('verbose', 'resource-file.uninstall is not supported for wp7');
+        }
+    },
+    "framework": {
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'framework.install is not supported for wp7');
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            events.emit('verbose', 'framework.uninstall is not supported for wp7');
+        }
+    },
+    "lib-file": {
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'lib-file.install is not supported for wp7');
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            events.emit('verbose', 'lib-file.uninstall is not supported for wp7');
+        }
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/platforms/wp8.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/wp8.js b/cordova-lib/src/plugman/platforms/wp8.js
new file mode 100644
index 0000000..1163b44
--- /dev/null
+++ b/cordova-lib/src/plugman/platforms/wp8.js
@@ -0,0 +1,113 @@
+/*
+ *
+ * Copyright 2013 Jesse MacFadyen
+ *
+ * Licensed 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 common = require('./common'),
+    path = require('path'),
+    glob = require('glob'),
+    fs = require('fs'),
+    csproj = require('../util/csproj'),
+    events = require('../events'),
+    xml_helpers = require('../util/xml-helpers');
+
+module.exports = {
+    www_dir:function(project_dir) {
+        return path.join(project_dir, 'www');
+    },
+    package_name:function(project_dir) {
+        return xml_helpers.parseElementtreeSync(path.join(project_dir, 'Properties', 'WMAppManifest.xml')).find('App').attrib.ProductID;
+    },
+    parseProjectFile:function(project_dir) {
+        var project_files = glob.sync('*.csproj', {
+            cwd:project_dir
+        });
+        if (project_files.length === 0) {
+            throw new Error('does not appear to be a Windows Phone project (no .csproj file)');
+        }
+        return new csproj(path.join(project_dir, project_files[0]));
+    },
+    "source-file":{
+        install:function(source_el, plugin_dir, project_dir, plugin_id, project_file) {
+            var dest = path.join('Plugins', plugin_id, source_el.attrib['target-dir'] ? source_el.attrib['target-dir'] : '', path.basename(source_el.attrib['src']));
+
+            common.copyNewFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
+            // add reference to this file to csproj.
+            project_file.addSourceFile(dest);
+        },
+        uninstall:function(source_el, project_dir, plugin_id, project_file) {
+            var dest = path.join('Plugins', plugin_id, source_el.attrib['target-dir'] ? source_el.attrib['target-dir'] : '', path.basename(source_el.attrib['src']));
+            common.removeFile(project_dir, dest);
+            // remove reference to this file from csproj.
+            project_file.removeSourceFile(dest);
+        }
+    },
+    "header-file": {
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'header-file.install is not supported for wp8');
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            events.emit('verbose', 'header-file.uninstall is not supported for wp8');
+        }
+    },
+    "resource-file":{
+        install:function(el, plugin_dir, project_dir, plugin_id, project_file) {
+            events.emit('verbose', 'resource-file.install is not supported for wp8');
+        },
+        uninstall:function(el, project_dir, plugin_id, project_file) {
+            events.emit('verbose', 'resource-file.uninstall is not supported for wp8');
+        }
+    },
+    "framework":{
+        install:function(el, plugin_dir, project_dir, plugin_id, project_file) {
+            events.emit('verbose', 'wp8 framework install :: ' + plugin_id  );
+
+            var src = el.attrib['src'];
+            var dest = src; // if !isCustom, we will just add a reference to the file in place
+            var isCustom = el.attrib.custom == "true";
+
+            if(isCustom) {
+                dest = path.join('plugins', plugin_id, path.basename(src));
+                common.copyFile(plugin_dir, src, project_dir, dest);
+            }
+
+            project_file.addReference(dest);
+
+        },
+        uninstall:function(el, project_dir, plugin_id, project_file) {
+            events.emit('verbose', 'wp8 framework uninstall :: ' + plugin_id  );
+
+            var src = el.attrib['src'];
+            var isCustom = el.attrib.custom == "true";
+
+            if(isCustom) {
+                var dest = path.join('plugins', plugin_id);
+                common.removeFile(project_dir, dest);
+            }
+
+            project_file.removeReference(src);
+        }
+    },
+    "lib-file": {
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            events.emit('verbose', 'lib-file.install is not supported for wp8');
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            events.emit('verbose', 'lib-file.uninstall is not supported for wp8');
+        }
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/plugman.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/plugman.js b/cordova-lib/src/plugman/plugman.js
new file mode 100644
index 0000000..4aa1843
--- /dev/null
+++ b/cordova-lib/src/plugman/plugman.js
@@ -0,0 +1,207 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed 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.
+ *
+*/
+
+// copyright (c) 2013 Andrew Lunny, Adobe Systems
+
+var events = require('./src/events');
+var Q = require('q');
+
+function addProperty(o, symbol, modulePath, doWrap) {
+    var val = null;
+
+    if (doWrap) {
+        o[symbol] = function() {
+            val = val || require(modulePath);
+            if (arguments.length && typeof arguments[arguments.length - 1] === 'function') {
+                // If args exist and the last one is a function, it's the callback.
+                var args = Array.prototype.slice.call(arguments);
+                var cb = args.pop();
+                val.apply(o, args).done(function(result) {cb(undefined, result)}, cb);
+            } else {
+                val.apply(o, arguments).done(null, function(err){ throw err; });
+            }
+        };
+    } else {
+        // The top-level plugman.foo
+        Object.defineProperty(o, symbol, {
+            get : function() { return val = val || require(modulePath); },
+            set : function(v) { val = v; }
+        });
+    }
+
+    // The plugman.raw.foo
+    Object.defineProperty(o.raw, symbol, {
+        get : function() { return val = val || require(modulePath); },
+        set : function(v) { val = v; }
+    });
+}
+
+plugman = {
+    on:                 events.on.bind(events),
+    off:                events.removeListener.bind(events),
+    removeAllListeners: events.removeAllListeners.bind(events),
+    emit:               events.emit.bind(events),
+    raw:                {}
+};
+
+addProperty(plugman, 'help', './src/help');
+addProperty(plugman, 'install', './src/install', true);
+addProperty(plugman, 'uninstall', './src/uninstall', true);
+addProperty(plugman, 'fetch', './src/fetch', true);
+addProperty(plugman, 'prepare', './src/prepare');
+addProperty(plugman, 'config', './src/config', true);
+addProperty(plugman, 'owner', './src/owner', true);
+addProperty(plugman, 'adduser', './src/adduser', true);
+addProperty(plugman, 'publish', './src/publish', true);
+addProperty(plugman, 'unpublish', './src/unpublish', true);
+addProperty(plugman, 'search', './src/search', true);
+addProperty(plugman, 'info', './src/info', true);
+addProperty(plugman, 'create', './src/create', true);
+addProperty(plugman, 'platform', './src/platform_operation', true);
+addProperty(plugman, 'config_changes', './src/util/config-changes');
+
+plugman.commands =  {
+    'config'   : function(cli_opts) {
+        plugman.config(cli_opts.argv.remain, function(err) {
+            if (err) throw err;
+            else console.log('done');
+        });
+    },
+    'owner'   : function(cli_opts) {
+        plugman.owner(cli_opts.argv.remain);
+    },
+    'install'  : function(cli_opts) {
+        if(!cli_opts.platform || !cli_opts.project || !cli_opts.plugin) {
+            return console.log(plugman.help());
+        }
+        var cli_variables = {}
+        if (cli_opts.variable) {
+            cli_opts.variable.forEach(function (variable) {
+                    var tokens = variable.split('=');
+                    var key = tokens.shift().toUpperCase();
+                    if (/^[\w-_]+$/.test(key)) cli_variables[key] = tokens.join('=');
+                    });
+        }
+        var opts = {
+            subdir: '.',
+            cli_variables: cli_variables,
+            www_dir: cli_opts.www,
+            searchpath: cli_opts.searchpath
+        };
+
+        var p = Q();
+        cli_opts.plugin.forEach(function (pluginSrc) {
+            p = p.then(function () {
+                return plugman.raw.install(cli_opts.platform, cli_opts.project, pluginSrc, cli_opts.plugins_dir, opts);
+            })
+        });
+        
+        return p;
+    },
+    'uninstall': function(cli_opts) {
+        if(!cli_opts.platform || !cli_opts.project || !cli_opts.plugin) {
+            return console.log(plugman.help());
+        }
+
+        var p = Q();
+        cli_opts.plugin.forEach(function (pluginSrc) {
+            p = p.then(function () {
+                return plugman.raw.uninstall(cli_opts.platform, cli_opts.project, pluginSrc, cli_opts.plugins_dir, { www_dir: cli_opts.www });
+            });
+        });
+
+        return p;
+    },
+    'adduser'  : function(cli_opts) {
+        plugman.adduser(function(err) {
+            if (err) throw err;
+            else console.log('user added');
+        });
+    },
+
+    'search'   : function(cli_opts) {
+        plugman.search(cli_opts.argv.remain, function(err, plugins) {
+            if (err) throw err;
+            else {
+                for(var plugin in plugins) {
+                    console.log(plugins[plugin].name, '-', plugins[plugin].description || 'no description provided');
+                }
+            }
+        });
+    },
+    'info'     : function(cli_opts) {
+        plugman.info(cli_opts.argv.remain, function(err, plugin_info) {
+            if (err) throw err;
+            else {
+                console.log('name:', plugin_info.name);
+                console.log('version:', plugin_info.version);
+                if (plugin_info.engines) {
+                    for(var i = 0, j = plugin_info.engines.length ; i < j ; i++) {
+                        console.log(plugin_info.engines[i].name, 'version:', plugin_info.engines[i].version);
+                    }
+                }
+            }
+        });
+    },
+
+    'publish'  : function(cli_opts) {
+        var plugin_path = cli_opts.argv.remain;
+        if(!plugin_path) {
+            return console.log(plugman.help());
+        }
+        plugman.publish(plugin_path, function(err) {
+            if (err) throw err;
+            else console.log('Plugin published');
+        });
+    },
+
+    'unpublish': function(cli_opts) {
+        var plugin = cli_opts.argv.remain;
+        if(!plugin) {
+            return console.log(plugman.help());
+        }
+        plugman.unpublish(plugin, function(err) {
+            if (err) throw err;
+            else console.log('Plugin unpublished');
+        });
+    },
+    'create': function(cli_opts) {
+        if( !cli_opts.name || !cli_opts.plugin_id || !cli_opts.plugin_version) {
+            return console.log( plugman.help() );
+        }
+        var cli_variables = {};
+        if (cli_opts.variable) {
+            cli_opts.variable.forEach(function (variable) {
+                    var tokens = variable.split('=');
+                    var key = tokens.shift().toUpperCase();
+                    if (/^[\w-_]+$/.test(key)) cli_variables[key] = tokens.join('=');
+                    });
+        }
+        plugman.create( cli_opts.name, cli_opts.plugin_id, cli_opts.plugin_version, cli_opts.path || ".", cli_variables );
+    },
+    'platform': function(cli_opts) {
+        var operation = cli_opts.argv.remain[ 0 ] || "";
+        if( ( operation !== 'add' && operation !== 'remove' ) ||  !cli_opts.platform_name ) {
+            return console.log( plugman.help() );
+        }
+        plugman.platform( { operation: operation, platform_name: cli_opts.platform_name } );
+    }
+};
+
+module.exports = plugman;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/prepare.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/prepare.js b/cordova-lib/src/plugman/prepare.js
new file mode 100644
index 0000000..c650306
--- /dev/null
+++ b/cordova-lib/src/plugman/prepare.js
@@ -0,0 +1,232 @@
+/**
+    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.
+*/
+
+/* jshint node:true */
+
+var platform_modules = require('./platforms'),
+    path            = require('path'),
+    config_changes  = require('./util/config-changes'),
+    xml_helpers     = require('./util/xml-helpers'),
+    wp7             = require('./platforms/wp7'),
+    wp8             = require('./platforms/wp8'),
+    windows8        = require('./platforms/windows8'),
+    common          = require('./platforms/common');
+    fs              = require('fs'),
+    shell           = require('shelljs'),
+    util            = require('util'),
+    events          = require('./events'),
+    plugman         = require('../plugman'),
+    et              = require('elementtree');
+
+// Called on --prepare.
+// Sets up each plugin's Javascript code to be loaded properly.
+// Expects a path to the project (platforms/android in CLI, . in plugman-only),
+// a path to where the plugins are downloaded, the www dir, and the platform ('android', 'ios', etc.).
+module.exports = function handlePrepare(project_dir, platform, plugins_dir, www_dir) {
+    // Process:
+    // - Do config munging by calling into config-changes module
+    // - List all plugins in plugins_dir
+    // - Load and parse their plugin.xml files.
+    // - Skip those without support for this platform. (No <platform> tags means JS-only!)
+    // - Build a list of all their js-modules, including platform-specific js-modules.
+    // - For each js-module (general first, then platform) build up an object storing the path and any clobbers, merges and runs for it.
+    // - Write this object into www/cordova_plugins.json.
+    // - Cordova.js contains code to load them at runtime from that file.
+    events.emit('verbose', 'Preparing ' + platform + ' project');
+    var platform_json = config_changes.get_platform_json(plugins_dir, platform);
+    var wwwDir = www_dir || platform_modules[platform].www_dir(project_dir);
+
+    // Check if there are any plugins queued for uninstallation, and if so, remove any of their plugin web assets loaded in
+    // via <js-module> elements
+    var plugins_to_uninstall = platform_json.prepare_queue.uninstalled;
+    if (plugins_to_uninstall && plugins_to_uninstall.length) {
+        var plugins_www = path.join(wwwDir, 'plugins');
+        if (fs.existsSync(plugins_www)) {
+            plugins_to_uninstall.forEach(function(plug) {
+                var id = plug.id;
+                var plugin_modules = path.join(plugins_www, id);
+                if (fs.existsSync(plugin_modules)) {
+                    events.emit('verbose', 'Removing plugins directory from www "'+plugin_modules+'"');
+                    shell.rm('-rf', plugin_modules);
+                }
+            });
+        }
+    }
+
+    events.emit('verbose', 'Processing configuration changes for plugins.');
+    config_changes.process(plugins_dir, project_dir, platform);
+
+    // for windows phone platform we need to add all www resources to the .csproj file
+    // first we need to remove them all to prevent duplicates
+    var wp_csproj;
+    if(platform == 'wp7' || platform == 'wp8') {
+        wp_csproj = (platform == wp7? wp7.parseProjectFile(project_dir) : wp8.parseProjectFile(project_dir));
+        var item_groups = wp_csproj.xml.findall('ItemGroup');
+        for (var i = 0, l = item_groups.length; i < l; i++) {
+            var group = item_groups[i];
+            var files = group.findall('Content');
+            for (var j = 0, k = files.length; j < k; j++) {
+                var file = files[j];
+                if (file.attrib.Include.substr(0,11) == "www\\plugins" || file.attrib.Include == "www\\cordova_plugins.js") {
+                    // remove file reference
+                    group.remove(0, file);
+                    // remove ItemGroup if empty
+                    var new_group = group.findall('Content');
+                    if(new_group.length < 1) {
+                        wp_csproj.xml.getroot().remove(0, group);
+                    }
+                }
+            }
+        }
+    }
+    else if(platform == "windows8") {
+        wp_csproj = windows8.parseProjectFile(project_dir);
+        var item_groups = wp_csproj.xml.findall('ItemGroup');
+        for (var i = 0, l = item_groups.length; i < l; i++) {
+            var group = item_groups[i];
+            var files = group.findall('Content');
+            for (var j = 0, k = files.length; j < k; j++) {
+                var file = files[j];
+                if (file.attrib.Include.substr(0,11) == "www\\plugins" || file.attrib.Include == "www\\cordova_plugins.js") {
+                    // remove file reference
+                    group.remove(0, file);
+                    // remove ItemGroup if empty
+                    var new_group = group.findall('Content');
+                    if(new_group.length < 1) {
+                        wp_csproj.xml.getroot().remove(0, group);
+                    }
+                }
+            }
+        }
+
+    }
+
+    platform_json = config_changes.get_platform_json(plugins_dir, platform);
+    // This array holds all the metadata for each module and ends up in cordova_plugins.json
+    var plugins = Object.keys(platform_json.installed_plugins).concat(Object.keys(platform_json.dependent_plugins));
+    var moduleObjects = [];
+    var pluginMetadata = {};
+    events.emit('verbose', 'Iterating over installed plugins:', plugins);
+
+    plugins && plugins.forEach(function(plugin) {
+        var pluginDir = path.join(plugins_dir, plugin),
+            pluginXML = path.join(pluginDir, 'plugin.xml');
+        if (!fs.existsSync(pluginXML)) {
+            plugman.emit('warn', 'Missing file: ' + pluginXML);
+            return;
+        }
+        var xml = xml_helpers.parseElementtreeSync(pluginXML);
+
+        var plugin_id = xml.getroot().attrib.id;
+
+        // pluginMetadata is a mapping from plugin IDs to versions.
+        pluginMetadata[plugin_id] = xml.getroot().attrib.version;
+
+        // add the plugins dir to the platform's www.
+        var platformPluginsDir = path.join(wwwDir, 'plugins');
+        // XXX this should not be here if there are no js-module. It leaves an empty plugins/ directory
+        shell.mkdir('-p', platformPluginsDir);
+
+        var jsModules = xml.findall('./js-module');
+        var assets = xml.findall('asset');
+        var platformTag = xml.find(util.format('./platform[@name="%s"]', platform));
+
+        if (platformTag) {
+            assets = assets.concat(platformTag.findall('./asset'));
+            jsModules = jsModules.concat(platformTag.findall('./js-module'));
+        }
+
+        // Copy www assets described in <asset> tags.
+        assets = assets || [];
+        assets.forEach(function(asset) {
+            common.asset.install(asset, pluginDir, wwwDir);
+        });
+
+        jsModules.forEach(function(module) {
+            // Copy the plugin's files into the www directory.
+            // NB: We can't always use path.* functions here, because they will use platform slashes.
+            // But the path in the plugin.xml and in the cordova_plugins.js should be always forward slashes.
+            var pathParts = module.attrib.src.split('/');
+
+            var fsDirname = path.join.apply(path, pathParts.slice(0, -1));
+            var fsDir = path.join(platformPluginsDir, plugin_id, fsDirname);
+            shell.mkdir('-p', fsDir);
+
+            // Read in the file, prepend the cordova.define, and write it back out.
+            var moduleName = plugin_id + '.';
+            if (module.attrib.name) {
+                moduleName += module.attrib.name;
+            } else {
+                var result = module.attrib.src.match(/([^\/]+)\.js/);
+                moduleName += result[1];
+            }
+
+            var fsPath = path.join.apply(path, pathParts);
+            var scriptContent = fs.readFileSync(path.join(pluginDir, fsPath), 'utf-8');
+            scriptContent = 'cordova.define("' + moduleName + '", function(require, exports, module) { ' + scriptContent + '\n});\n';
+            fs.writeFileSync(path.join(platformPluginsDir, plugin_id, fsPath), scriptContent, 'utf-8');
+            if(platform == 'wp7' || platform == 'wp8' || platform == "windows8") {
+                wp_csproj.addSourceFile(path.join('www', 'plugins', plugin_id, fsPath));
+            }
+
+            // Prepare the object for cordova_plugins.json.
+            var obj = {
+                file: ['plugins', plugin_id, module.attrib.src].join('/'),
+                id: moduleName
+            };
+
+            // Loop over the children of the js-module tag, collecting clobbers, merges and runs.
+            module.getchildren().forEach(function(child) {
+                if (child.tag.toLowerCase() == 'clobbers') {
+                    if (!obj.clobbers) {
+                        obj.clobbers = [];
+                    }
+                    obj.clobbers.push(child.attrib.target);
+                } else if (child.tag.toLowerCase() == 'merges') {
+                    if (!obj.merges) {
+                        obj.merges = [];
+                    }
+                    obj.merges.push(child.attrib.target);
+                } else if (child.tag.toLowerCase() == 'runs') {
+                    obj.runs = true;
+                }
+            });
+
+            // Add it to the list of module objects bound for cordova_plugins.json
+            moduleObjects.push(obj);
+        });
+    });
+
+    // Write out moduleObjects as JSON wrapped in a cordova module to cordova_plugins.js
+    var final_contents = "cordova.define('cordova/plugin_list', function(require, exports, module) {\n";
+    final_contents += 'module.exports = ' + JSON.stringify(moduleObjects,null,'    ') + ';\n';
+    final_contents += 'module.exports.metadata = \n';
+    final_contents += '// TOP OF METADATA\n';
+    final_contents += JSON.stringify(pluginMetadata, null, '    ') + '\n';
+    final_contents += '// BOTTOM OF METADATA\n';
+    final_contents += '});'; // Close cordova.define.
+
+    events.emit('verbose', 'Writing out cordova_plugins.js...');
+    fs.writeFileSync(path.join(wwwDir, 'cordova_plugins.js'), final_contents, 'utf-8');
+
+    if(platform == 'wp7' || platform == 'wp8' || platform == "windows8") {
+        wp_csproj.addSourceFile(path.join('www', 'cordova_plugins.js'));
+        wp_csproj.write();
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/publish.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/publish.js b/cordova-lib/src/plugman/publish.js
new file mode 100644
index 0000000..05b5284
--- /dev/null
+++ b/cordova-lib/src/plugman/publish.js
@@ -0,0 +1,6 @@
+var registry = require('./registry/registry')
+
+module.exports = function(plugin_path) {
+    // plugin_path is an array of paths
+    return registry.publish(plugin_path);
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/registry/manifest.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/registry/manifest.js b/cordova-lib/src/plugman/registry/manifest.js
new file mode 100644
index 0000000..54f74b6
--- /dev/null
+++ b/cordova-lib/src/plugman/registry/manifest.js
@@ -0,0 +1,95 @@
+var xml_helpers = require('../util/xml-helpers'),
+    path = require('path'),
+    Q = require('q'),
+    fs = require('fs'),
+    whitelist = require('./whitelist');
+
+function validateName(name) {
+    if (!name.match(/^(\w+\.){2,}.*$/)) {
+        throw new Error('Invalid plugin ID. It has to follow the reverse domain `com.domain.plugin` format');
+    }
+
+    if (name.match(/org.apache.cordova\..*/) && whitelist.indexOf(name) === -1) {
+        throw new Error('Invalid Plugin ID. The "org.apache.cordova" prefix is reserved for plugins provided directly by the Cordova project.');
+    }
+
+    return true;
+}
+
+// Java world big-up!
+// Returns a promise.
+function generatePackageJsonFromPluginXml(plugin_path) {
+    return Q().then(function() {
+        var package_json = {};
+        var pluginXml = xml_helpers.parseElementtreeSync(path.join(plugin_path, 'plugin.xml'));
+
+        if(!pluginXml) throw new Error('invalid plugin.xml document');
+
+        var pluginElm = pluginXml.getroot();
+
+        if(!pluginElm) throw new Error('invalid plugin.xml document');
+
+        // REQUIRED: name, version
+        // OPTIONAL: description, license, keywords, engine
+        var name = pluginElm.attrib.id,
+            version = pluginElm.attrib.version,
+            cordova_name = pluginElm.findtext('name'),
+            description = pluginElm.findtext('description'),
+            license = pluginElm.findtext('license'),
+            keywords = pluginElm.findtext('keywords'),
+            repo = pluginElm.findtext('repo'),
+            issue = pluginElm.findtext('issue'),
+            engines = pluginElm.findall('engines/engine'),
+            platformsElm = pluginElm.findall('platform'),
+            englishdoc = "",
+            platforms = [];
+
+        platformsElm.forEach(function(plat){
+            platforms.push(plat.attrib.name);
+        })
+        if(!version) throw new Error('`version` required');
+
+        package_json.version = version;
+
+        if(!name) throw new Error('`id` is required');
+
+        validateName(name);
+
+        package_json.name = name.toLowerCase();
+
+        if(cordova_name) package_json.cordova_name = cordova_name;
+        if(description)  package_json.description  = description;
+        if(license)      package_json.license      = license;
+        if(repo)         package_json.repo         = repo;
+        if(issue)        package_json.issue        = issue;
+        if(keywords)     package_json.keywords     = keywords.split(',');
+        if(platforms)    package_json.platforms    = platforms;
+
+        // adding engines
+        if(engines) {
+            package_json.engines = [];
+            for(var i = 0, j = engines.length ; i < j ; i++) {
+                package_json.engines.push({name: engines[i].attrib.name, version: engines[i].attrib.version});
+            }
+        }
+
+        //set docs_path to doc/index.md exists
+        var docs_path = path.resolve(plugin_path, 'doc/index.md');
+        if(!(fs.existsSync(docs_path))){
+            //set docs_path to doc/en/index.md
+            docs_path = path.resolve(plugin_path, 'doc/en/index.md');
+        }
+        if(fs.existsSync(docs_path)){
+            englishdoc = fs.readFileSync(docs_path, 'utf-8');
+            package_json.englishdoc = englishdoc;
+        }
+
+        // write package.json
+        var package_json_path = path.resolve(plugin_path, 'package.json');
+        //console.log('about to write package.json');
+        fs.writeFileSync(package_json_path, JSON.stringify(package_json, null, 4), 'utf8');
+        return package_json;
+    });
+}
+
+module.exports.generatePackageJsonFromPluginXml = generatePackageJsonFromPluginXml;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/registry/registry.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/registry/registry.js b/cordova-lib/src/plugman/registry/registry.js
new file mode 100644
index 0000000..e0d733d
--- /dev/null
+++ b/cordova-lib/src/plugman/registry/registry.js
@@ -0,0 +1,290 @@
+var npm = require('npm'),
+    path = require('path'),
+    http = require('http'),
+    url = require('url'),
+    fs = require('fs'),
+    manifest = require('./manifest'),
+    os = require('os'),
+    rc = require('rc'),
+    Q = require('q'),
+    request = require('request'),
+    zlib = require('zlib'),
+    tar = require('tar'),
+    shell = require('shelljs'),
+    home = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE,
+    plugmanConfigDir = path.resolve(home, '.plugman'),
+    plugmanCacheDir = path.resolve(plugmanConfigDir, 'cache');
+
+/**
+ * @method getPackageInfo
+ * @param {String} args Package names
+ * @return {Promise.<Object>} Promised package info.
+ */
+function getPackageInfo(args) {
+    var thing = args.length ? args.shift().split("@") : [],
+        name = thing.shift(),
+        version = thing.join("@") || 'latest';
+    var settings = module.exports.settings;
+
+    var d = Q.defer();
+    var req = makeRequest('GET', settings.registry + '/' + name + '/' + version, function(err, res, body){
+        if(err || res.statusCode != 200) {
+          d.reject(new Error('Failed to fetch package information for '+name));
+        } else {
+          d.resolve(JSON.parse(body));
+        }
+    });
+    req.on('error', function(err) {
+        d.reject(err);
+    });
+    return d.promise;
+}
+
+/**
+ * @method fetchPackage
+ * @param {String} info Package info
+ * @return {Promise.<string>} Promised path to the package.
+ */
+function fetchPackage(info, cl) {
+    var settings = module.exports.settings;
+    var d = Q.defer();
+    var cached = path.resolve(settings.cache, info.name, info.version, 'package');
+    if(fs.existsSync(cached)) {
+        d.resolve(cached);
+    } else {
+        var download_dir = path.resolve(cached, '..');
+        shell.mkdir('-p', download_dir);
+
+        var req = makeRequest('GET', info.dist.tarball, function (err, res, body) {
+            if(err || res.statusCode != 200) {
+                d.reject(new Error('failed to fetch the plugin archive'));
+            } else {
+                // Update the download count for this plugin.
+                // Fingers crossed that the timestamps are unique, and that no plugin is downloaded
+                // twice in a single millisecond.
+                //
+                // This is acceptable, because the failure mode is Couch gracefully rejecting the second one
+                // (for lacking a _rev), and dropped a download count is not important.
+                var now = new Date();
+                var pkgId = info._id.substring(0, info._id.indexOf('@'));
+                var message = {
+                    day: now.getUTCFullYear() + '-' + (now.getUTCMonth()+1) + '-' + now.getUTCDate(),
+                    pkg: pkgId,
+                    client: cl
+                };
+                var remote = settings.registry + '/downloads'
+
+                makeRequest('POST', remote, message, function (err, res, body) {
+                    // ignore errors
+                });
+            }
+        });
+        req.pipe(zlib.createUnzip())
+        .pipe(tar.Extract({path:download_dir}))
+        .on('error', function(err) {
+            shell.rm('-rf', download_dir);
+            d.reject(err);
+        })
+        .on('end', function() {
+            d.resolve(path.resolve(download_dir, 'package'));
+        });
+    }
+    return d.promise;
+}
+
+module.exports = {
+    settings: null,
+    /**
+     * @method config
+     * @param {Array} args Command argument
+     * @return {Promise.<Object>} Promised configuration object.
+     */
+    config: function(args) {
+        return initSettings().then(function(settings) {
+            return Q.ninvoke(npm, 'load', settings)
+        })
+        .then(function() {
+            return Q.ninvoke(npm.commands, 'config', args);
+        });
+    },
+
+    /**
+     * @method owner
+     * @param {Array} args Command argument
+     * @return {Promise.<void>} Promise for completion.
+     */
+    owner: function(args) {
+        return initSettings().then(function(settings) {
+            return Q.ninvoke(npm, 'load', settings);
+        }).then(function() {
+            return Q.ninvoke(npm.commands, 'owner', args);
+        });
+    },
+    /**
+     * @method adduser
+     * @param {Array} args Command argument
+     * @return {Promise.<void>} Promise for completion.
+     */
+    adduser: function(args) {
+        return initSettings().then(function(settings) {
+            return Q.ninvoke(npm, 'load', settings)
+        })
+        .then(function() {
+            return Q.ninvoke(npm.commands, 'adduser', args);
+        });
+    },
+
+    /**
+     * @method publish
+     * @param {Array} args Command argument
+     * @return {Promise.<Object>} Promised published data.
+     */
+    publish: function(args) {
+        return initSettings()
+        .then(function(settings) {
+            return manifest.generatePackageJsonFromPluginXml(args[0])
+            .then(function() {
+                return Q.ninvoke(npm, 'load', settings);
+            }).then(function() {
+                return Q.ninvoke(npm.commands, 'publish', args)
+            }).fin(function() {
+                fs.unlink(path.resolve(args[0], 'package.json'));
+            });
+        });
+    },
+
+    /**
+     * @method search
+     * @param {Array} args Array of keywords
+     * @return {Promise.<Object>} Promised search results.
+     */
+    search: function(args) {
+        return initSettings()
+        .then(function(settings) {
+            return Q.ninvoke(npm, 'load', settings);
+        }).then(function() {
+            return Q.ninvoke(npm.commands, 'search', args, true);
+        });
+    },
+
+    /**
+     * @method unpublish
+     * @param {Array} args Command argument
+     * @return {Promise.<Object>} Promised results.
+     */
+    unpublish: function(args) {
+        return initSettings()
+        .then(function(settings) {
+            return Q.ninvoke(npm, 'load', settings);
+        }).then(function() {
+            return Q.ninvoke(npm.commands, 'unpublish', args);
+        }).then(function() {
+            return Q.ninvoke(npm.commands, 'cache', ["clean"]);
+        });
+    },
+
+    /**
+     * @method fetch
+     * @param {String} name Plugin name
+     * @return {Promise.<string>} Promised path to fetched package.
+     */
+    fetch: function(args, client) {
+        var cl = (client === 'plugman' ? 'plugman' : 'cordova-cli');
+        return initSettings()
+        .then(function(settings) {
+            return getPackageInfo(args);
+        }).then(function(info) {
+            return fetchPackage(info, cl);
+        });
+    },
+
+    /**
+     * @method info
+     * @param {String} name Plugin name
+     * @return {Promise.<Object>} Promised package info.
+     */
+    info: function(args) {
+        return initSettings()
+        .then(function() {
+            return getPackageInfo(args);
+        });
+    }
+}
+
+/**
+ * @method initSettings
+ * @return {Promise.<Object>} Promised settings.
+ */
+function initSettings() {
+    var settings = module.exports.settings;
+    // check if settings already set
+    if(settings != null) return Q(settings);
+
+    // setting up settings
+    // obviously if settings dir does not exist settings is going to be empty
+    if(!fs.existsSync(plugmanConfigDir)) {
+        fs.mkdirSync(plugmanConfigDir);
+        fs.mkdirSync(plugmanCacheDir);
+    }
+
+    settings =
+    module.exports.settings =
+    rc('plugman', {
+         cache: plugmanCacheDir,
+         force: true,
+         registry: 'http://registry.cordova.io',
+         logstream: fs.createWriteStream(path.resolve(plugmanConfigDir, 'plugman.log')),
+         userconfig: path.resolve(plugmanConfigDir, 'config')
+    });
+    return Q(settings);
+}
+
+
+function makeRequest (method, where, what, cb_) {
+  var settings = module.exports.settings
+  var remote = url.parse(where)
+  if (typeof cb_ !== "function") cb_ = what, what = null
+  var cbCalled = false
+  function cb () {
+    if (cbCalled) return
+    cbCalled = true
+    cb_.apply(null, arguments)
+  }
+
+  var strict = settings['strict-ssl']
+  if (strict === undefined) strict = true
+  var opts = { url: remote
+             , method: method
+             , ca: settings.ca
+             , strictSSL: strict }
+    , headers = opts.headers = {}
+
+  headers.accept = "application/json"
+
+  headers["user-agent"] = settings['user-agent'] ||
+                          'node/' + process.version
+
+  var p = settings.proxy
+  var sp = settings['https-proxy'] || p
+  opts.proxy = remote.protocol === "https:" ? sp : p
+
+  // figure out wth 'what' is
+  if (what) {
+    if (Buffer.isBuffer(what) || typeof what === "string") {
+      opts.body = what
+      headers["content-type"] = "application/json"
+      headers["content-length"] = Buffer.byteLength(what)
+    } else {
+      opts.json = what
+    }
+  }
+
+  var req = request(opts, cb)
+
+  req.on("error", cb)
+  req.on("socket", function (s) {
+    s.on("error", cb)
+  })
+
+  return req
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/registry/whitelist.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/registry/whitelist.js b/cordova-lib/src/plugman/registry/whitelist.js
new file mode 100644
index 0000000..5e7cfa6
--- /dev/null
+++ b/cordova-lib/src/plugman/registry/whitelist.js
@@ -0,0 +1,21 @@
+module.exports = [
+    'org.apache.cordova.splashscreen',
+    'org.apache.cordova.network-information',
+    'org.apache.cordova.file',
+    'org.apache.cordova.file-transfer',
+    'org.apache.cordova.media',
+    'org.apache.cordova.vibration',
+    'org.apache.cordova.media-capture',
+    'org.apache.cordova.inappbrowser',
+    'org.apache.cordova.globalization',
+    'org.apache.cordova.geolocation',
+    'org.apache.cordova.dialogs',
+    'org.apache.cordova.device-orientation',
+    'org.apache.cordova.device',
+    'org.apache.cordova.contacts',
+    'org.apache.cordova.console',
+    'org.apache.cordova.camera',
+    'org.apache.cordova.device-motion',
+    'org.apache.cordova.battery-status',
+    'org.apache.cordova.statusbar'
+]

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/search.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/search.js b/cordova-lib/src/plugman/search.js
new file mode 100644
index 0000000..000f58e
--- /dev/null
+++ b/cordova-lib/src/plugman/search.js
@@ -0,0 +1,5 @@
+var registry = require('./registry/registry')
+
+module.exports = function(search_opts) {
+    return registry.search(search_opts);
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/uninstall.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/uninstall.js b/cordova-lib/src/plugman/uninstall.js
new file mode 100644
index 0000000..04ecb1a
--- /dev/null
+++ b/cordova-lib/src/plugman/uninstall.js
@@ -0,0 +1,288 @@
+
+var path = require('path'),
+    fs   = require('fs'),
+    et   = require('elementtree'),
+    shell= require('shelljs'),
+    config_changes = require('./util/config-changes'),
+    xml_helpers = require('./util/xml-helpers'),
+    action_stack = require('./util/action-stack'),
+    dependencies = require('./util/dependencies'),
+    underscore = require('underscore'),
+    Q = require('q'),
+    plugins = require('./util/plugins'),
+    underscore = require('underscore'),
+    events = require('./events'),
+    platform_modules = require('./platforms'),
+    plugman = require('../plugman');
+
+// possible options: cli_variables, www_dir
+// Returns a promise.
+module.exports = function(platform, project_dir, id, plugins_dir, options) {
+    options = options || {};
+    options.is_top_level = true;
+    plugins_dir = plugins_dir || path.join(project_dir, 'cordova', 'plugins');
+
+    // Allow path to file to grab an ID
+    var xml_path = path.join(id, 'plugin.xml');
+    if ( fs.existsSync(xml_path) ) {
+        var plugin_et  = xml_helpers.parseElementtreeSync(xml_path),
+        id = plugin_et._root.attrib['id'];
+    }
+
+    return module.exports.uninstallPlatform(platform, project_dir, id, plugins_dir, options)
+    .then(function() {
+        return module.exports.uninstallPlugin(id, plugins_dir, options);
+    });
+}
+
+// Returns a promise.
+module.exports.uninstallPlatform = function(platform, project_dir, id, plugins_dir, options) {
+    options = options || {};
+    options.is_top_level = true;
+    plugins_dir = plugins_dir || path.join(project_dir, 'cordova', 'plugins');
+
+    if (!platform_modules[platform]) {
+        return Q.reject(new Error(platform + " not supported."));
+    }
+
+    var plugin_dir = path.join(plugins_dir, id);
+    if (!fs.existsSync(plugin_dir)) {
+        return Q.reject(new Error('Plugin "' + id + '" not found. Already uninstalled?'));
+    }
+
+    var current_stack = new action_stack();
+
+    return runUninstallPlatform(current_stack, platform, project_dir, plugin_dir, plugins_dir, options);
+};
+
+// Returns a promise.
+module.exports.uninstallPlugin = function(id, plugins_dir, options) {
+    options = options || {};
+
+    var plugin_dir = path.join(plugins_dir, id);
+
+    // @tests - important this event is checked spec/uninstall.spec.js
+    events.emit('log', 'Removing "'+ id +'"');
+
+    // If already removed, skip.
+    if ( !fs.existsSync(plugin_dir) ) {
+        events.emit('verbose', 'Plugin "'+ id +'" already removed ('+ plugin_dir +')');
+        return Q();
+    }
+
+    var xml_path  = path.join(plugin_dir, 'plugin.xml')
+      , plugin_et = xml_helpers.parseElementtreeSync(xml_path);
+
+    var doDelete = function(id) {
+        var plugin_dir = path.join(plugins_dir, id);
+        if ( !fs.existsSync(plugin_dir) ) {
+            events.emit('verbose', 'Plugin "'+ id +'" already removed ('+ plugin_dir +')');
+            return Q();
+        }
+
+        shell.rm('-rf', plugin_dir);
+        events.emit('verbose', 'Deleted "'+ id +'"');
+    };
+
+    // We've now lost the metadata for the plugins that have been uninstalled, so we can't use that info.
+    // Instead, we list all dependencies of the target plugin, and check the remaining metadata to see if
+    // anything depends on them, or if they're listed as top-level.
+    // If neither, they can be deleted.
+    var top_plugin_id = id;
+
+    // Recursively remove plugins which were installed as dependents (that are not top-level)
+    // optional?
+    var recursive = true;
+    var toDelete = recursive ? plugin_et.findall('dependency') : [];
+    toDelete = toDelete && toDelete.length ? toDelete.map(function(p) { return p.attrib.id; }) : [];
+    toDelete.push(top_plugin_id);
+
+    // Okay, now we check if any of these are depended on, or top-level.
+    // Find the installed platforms by whether they have a metadata file.
+    var platforms = Object.keys(platform_modules).filter(function(platform) {
+        return fs.existsSync(path.join(plugins_dir, platform + '.json'));
+    });
+
+    // Can have missing plugins on some platforms when not supported..
+    var dependList = {};
+    platforms.forEach(function(platform) {
+        var depsInfo = dependencies.generate_dependency_info(plugins_dir, platform);
+        var tlps = depsInfo.top_level_plugins,
+            deps, i;
+
+        // Top-level deps must always be explicitely asked to remove by user
+        tlps.forEach(function(plugin_id){
+            if(top_plugin_id == plugin_id)
+                return;
+
+            var i = toDelete.indexOf(plugin_id);
+            if(i >= 0)
+                toDelete.splice(i, 1);
+        });
+
+        toDelete.forEach(function(plugin) {
+            deps = dependencies.dependents(plugin, depsInfo);
+
+            var i = deps.indexOf(top_plugin_id);
+            if(i >= 0)
+                 deps.splice(i, 1); // remove current/top-level plugin as blocking uninstall
+
+            if(deps.length) {
+                dependList[plugin] = deps.join(', ');
+            }
+        });
+    });
+
+    var i, plugin_id, msg;
+    for(i in toDelete) {
+        plugin_id = toDelete[i];
+
+        if( dependList[plugin_id] ) {
+            msg = '"' + plugin_id + '" is required by ('+ dependList[plugin_id] + ')';
+            if(options.force) {
+                events.emit('log', msg +' but forcing removal.');
+            } else {
+                // @tests - error and event message is checked spec/uninstall.spec.js
+                msg += ' and cannot be removed (hint: use -f or --force)';
+
+                if(plugin_id == top_plugin_id) {
+                    return Q.reject( new Error(msg) );
+                } else {
+                    events.emit('warn', msg +' and cannot be removed (hint: use -f or --force)');
+                    continue;
+                }
+            }
+        }
+
+        doDelete(plugin_id);
+    }
+
+    return Q();
+};
+
+// possible options: cli_variables, www_dir, is_top_level
+// Returns a promise
+function runUninstallPlatform(actions, platform, project_dir, plugin_dir, plugins_dir, options) {
+    options = options || {};
+
+    var xml_path     = path.join(plugin_dir, 'plugin.xml');
+    var plugin_et    = xml_helpers.parseElementtreeSync(xml_path);
+    var plugin_id    = plugin_et._root.attrib['id'];
+
+    // Deps info can be passed recusively
+    var depsInfo = options.depsInfo || dependencies.generate_dependency_info(plugins_dir, platform, 'remove');
+
+    // Check that this plugin has no dependents.
+    var dependents = dependencies.dependents(plugin_id, depsInfo, platform);
+
+    if(options.is_top_level && dependents && dependents.length > 0) {
+        var msg = "The plugin '"+ plugin_id +"' is required by (" + dependents.join(', ') + ")";
+        if(options.force) {
+            events.emit("info", msg + " but forcing removal");
+        } else {
+            return Q.reject( new Error(msg + ", skipping uninstallation.") );
+        }
+    }
+
+    // Check how many dangling dependencies this plugin has.
+    var deps = depsInfo.graph.getChain(plugin_id);
+    var danglers = dependencies.danglers(plugin_id, depsInfo, platform);
+
+    var promise;
+    if (deps && deps.length && danglers && danglers.length) {
+
+        // @tests - important this event is checked spec/uninstall.spec.js
+        events.emit('log', 'Uninstalling ' + danglers.length + ' dependent plugins.');
+        promise = Q.all(
+            danglers.map(function(dangler) {
+                var dependent_path = dependencies.resolvePath(dangler, plugins_dir);
+
+                var opts = underscore.extend({}, options, {
+                    is_top_level: depsInfo.top_level_plugins.indexOf(dangler) > -1,
+                    depsInfo: depsInfo
+                });
+
+                return runUninstallPlatform(actions, platform, project_dir, dependent_path, plugins_dir, opts);
+            })
+        );
+    } else {
+        promise = Q();
+    }
+
+    return promise.then(function() {
+        return handleUninstall(actions, platform, plugin_id, plugin_et, project_dir, options.www_dir, plugins_dir, plugin_dir, options.is_top_level);
+    });
+}
+
+// Returns a promise.
+function handleUninstall(actions, platform, plugin_id, plugin_et, project_dir, www_dir, plugins_dir, plugin_dir, is_top_level) {
+    var platform_modules = require('./platforms');
+    var handler = platform_modules[platform];
+    var platformTag = plugin_et.find('./platform[@name="'+platform+'"]');
+    www_dir = www_dir || handler.www_dir(project_dir);
+    events.emit('log', 'Uninstalling ' + plugin_id + ' from ' + platform);
+
+    var assets = plugin_et.findall('./asset');
+    if (platformTag) {
+        var sourceFiles = platformTag.findall('./source-file'),
+            headerFiles = platformTag.findall('./header-file'),
+            libFiles = platformTag.findall('./lib-file'),
+            resourceFiles = platformTag.findall('./resource-file');
+            frameworkFiles = platformTag.findall('./framework[@custom="true"]');
+        assets = assets.concat(platformTag.findall('./asset'));
+
+        // queue up native stuff
+        sourceFiles && sourceFiles.forEach(function(source) {
+            actions.push(actions.createAction(handler["source-file"].uninstall,
+                                             [source, project_dir, plugin_id],
+                                             handler["source-file"].install,
+                                             [source, plugin_dir, project_dir, plugin_id]));
+        });
+
+        headerFiles && headerFiles.forEach(function(header) {
+            actions.push(actions.createAction(handler["header-file"].uninstall,
+                                             [header, project_dir, plugin_id],
+                                             handler["header-file"].install,
+                                             [header, plugin_dir, project_dir, plugin_id]));
+        });
+
+        resourceFiles && resourceFiles.forEach(function(resource) {
+            actions.push(actions.createAction(handler["resource-file"].uninstall,
+                                              [resource, project_dir, plugin_id],
+                                              handler["resource-file"].install,
+                                              [resource, plugin_dir, project_dir]));
+        });
+
+        // CB-5238 custom frameworks only
+        frameworkFiles && frameworkFiles.forEach(function(framework) {
+            actions.push(actions.createAction(handler["framework"].uninstall,
+                                              [framework, project_dir, plugin_id],
+                                              handler["framework"].install,
+                                              [framework, plugin_dir, project_dir]));
+        });
+
+        libFiles && libFiles.forEach(function(source) {
+            actions.push(actions.createAction(handler["lib-file"].uninstall,
+                                              [source, project_dir, plugin_id],
+                                              handler["lib-file"].install,
+                                              [source, plugin_dir, project_dir, plugin_id]));
+        });
+    }
+
+    // queue up asset installation
+    var common = require('./platforms/common');
+    assets && assets.forEach(function(asset) {
+        actions.push(actions.createAction(common.asset.uninstall, [asset, www_dir, plugin_id], common.asset.install, [asset, plugin_dir, www_dir]));
+    });
+
+    // run through the action stack
+    return actions.process(platform, project_dir)
+    .then(function() {
+        // WIN!
+        events.emit('verbose', plugin_id + ' uninstalled from ' + platform + '.');
+        // queue up the plugin so prepare can remove the config changes
+        config_changes.add_uninstalled_plugin_to_prepare_queue(plugins_dir, plugin_id, platform, is_top_level);
+        // call prepare after a successful uninstall
+        plugman.prepare(project_dir, platform, plugins_dir, www_dir);
+    });
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/unpublish.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/unpublish.js b/cordova-lib/src/plugman/unpublish.js
new file mode 100644
index 0000000..be1b4b4
--- /dev/null
+++ b/cordova-lib/src/plugman/unpublish.js
@@ -0,0 +1,5 @@
+var registry = require('./registry/registry')
+
+module.exports = function(plugin) {
+    return registry.unpublish(plugin);
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/util/action-stack.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/action-stack.js b/cordova-lib/src/plugman/util/action-stack.js
new file mode 100644
index 0000000..dd9dafb
--- /dev/null
+++ b/cordova-lib/src/plugman/util/action-stack.js
@@ -0,0 +1,85 @@
+var platforms = require("../platforms"),
+    events = require('../events'),
+    Q = require('q'),
+    fs = require('fs');
+
+function ActionStack() {
+    this.stack = [];
+    this.completed = [];
+}
+
+ActionStack.prototype = {
+    createAction:function(handler, action_params, reverter, revert_params) {
+        return {
+            handler:{
+                run:handler,
+                params:action_params
+            },
+            reverter:{
+                run:reverter,
+                params:revert_params
+            }
+        };
+    },
+    push:function(tx) {
+        this.stack.push(tx);
+    },
+    // Returns a promise.
+    process:function(platform, project_dir) {
+        events.emit('verbose', 'Beginning processing of action stack for ' + platform + ' project...');
+        var project_files;
+
+        // parse platform-specific project files once
+        if (platforms[platform].parseProjectFile) {
+            events.emit('verbose', 'Parsing ' + platform + ' project files...');
+            project_files = platforms[platform].parseProjectFile(project_dir);
+        }
+
+        while(this.stack.length) {
+            var action = this.stack.shift();
+            var handler = action.handler.run;
+            var action_params = action.handler.params;
+            if (project_files) {
+                action_params.push(project_files);
+            }
+
+            try {
+                handler.apply(null, action_params);
+            } catch(e) {
+                events.emit('warn', 'Error during processing of action! Attempting to revert...');
+                var incomplete = this.stack.unshift(action);
+                var issue = 'Uh oh!\n';
+                // revert completed tasks
+                while(this.completed.length) {
+                    var undo = this.completed.shift();
+                    var revert = undo.reverter.run;
+                    var revert_params = undo.reverter.params;
+
+                    if (project_files) {
+                        revert_params.push(project_files);
+                    }
+
+                    try {
+                        revert.apply(null, revert_params);
+                    } catch(err) {
+                        events.emit('warn', 'Error during reversion of action! We probably really messed up your project now, sorry! D:');
+                        issue += 'A reversion action failed: ' + err.message + '\n';
+                    }
+                }
+                e.message = issue + e.message;
+                return Q.reject(e);
+            }
+            this.completed.push(action);
+        }
+        events.emit('verbose', 'Action stack processing complete.');
+
+        if (project_files) {
+            events.emit('verbose', 'Writing out ' + platform + ' project files...');
+            project_files.write();
+        }
+
+        return Q();
+    }
+};
+
+module.exports = ActionStack;


[38/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.xib
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.xib b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.xib
new file mode 100644
index 0000000..cc8dd65
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.xib
@@ -0,0 +1,875 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
+	<data>
+		<int key="IBDocument.SystemTarget">768</int>
+		<string key="IBDocument.SystemVersion">10K540</string>
+		<string key="IBDocument.InterfaceBuilderVersion">851</string>
+		<string key="IBDocument.AppKitVersion">1038.36</string>
+		<string key="IBDocument.HIToolboxVersion">461.00</string>
+		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+			<string key="NS.object.0">141</string>
+		</object>
+		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+		</object>
+		<object class="NSArray" key="IBDocument.PluginDependencies">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+		</object>
+		<object class="NSMutableDictionary" key="IBDocument.Metadata">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="NSArray" key="dict.sortedKeys" id="0">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+			</object>
+			<object class="NSMutableArray" key="dict.values">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+			</object>
+		</object>
+		<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="IBProxyObject" id="372490531">
+				<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+			</object>
+			<object class="IBProxyObject" id="975951072">
+				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+			</object>
+			<object class="IBUIView" id="191373211">
+				<nil key="NSNextResponder"/>
+				<int key="NSvFlags">292</int>
+				<object class="NSMutableArray" key="NSSubviews">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="IBUIWebView" id="345761693">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">-2147483374</int>
+						<string key="NSFrameSize">{480, 229}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSNextKeyView" ref="471899933"/>
+						<object class="NSColor" key="IBUIBackgroundColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MCAwIDAAA</bytes>
+						</object>
+						<bool key="IBUIClipsSubviews">YES</bool>
+						<bool key="IBUIMultipleTouchEnabled">YES</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<int key="IBUIDataDetectorTypes">1</int>
+						<bool key="IBUIDetectsPhoneNumbers">YES</bool>
+					</object>
+					<object class="IBUIToolbar" id="471899933">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">266</int>
+						<string key="NSFrame">{{0, 256}, {480, 44}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSNextKeyView" ref="349240355"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<int key="IBUIBarStyle">1</int>
+						<object class="NSMutableArray" key="IBUIItems">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="IBUIBarButtonItem" id="966737436">
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<int key="IBUIStyle">1</int>
+								<reference key="IBUIToolbar" ref="471899933"/>
+								<int key="IBUISystemItemIdentifier">0</int>
+							</object>
+							<object class="IBUIBarButtonItem" id="312951844">
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<reference key="IBUIToolbar" ref="471899933"/>
+								<int key="IBUISystemItemIdentifier">5</int>
+							</object>
+							<object class="IBUIBarButtonItem" id="615970053">
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<reference key="IBUIToolbar" ref="471899933"/>
+							</object>
+							<object class="IBUIBarButtonItem" id="111711024">
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<reference key="IBUIToolbar" ref="471899933"/>
+								<int key="IBUISystemItemIdentifier">5</int>
+							</object>
+							<object class="IBUIBarButtonItem" id="227415391">
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<float key="IBUIWidth">32</float>
+								<reference key="IBUIToolbar" ref="471899933"/>
+							</object>
+							<object class="IBUIBarButtonItem" id="766205236">
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<reference key="IBUIToolbar" ref="471899933"/>
+								<int key="IBUISystemItemIdentifier">5</int>
+							</object>
+							<object class="IBUIBarButtonItem" id="283287216">
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<float key="IBUIWidth">32</float>
+								<reference key="IBUIToolbar" ref="471899933"/>
+							</object>
+							<object class="IBUIBarButtonItem" id="129413107">
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<reference key="IBUIToolbar" ref="471899933"/>
+								<int key="IBUISystemItemIdentifier">5</int>
+							</object>
+							<object class="IBUIBarButtonItem" id="1046195837">
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<float key="IBUIWidth">32</float>
+								<reference key="IBUIToolbar" ref="471899933"/>
+							</object>
+							<object class="IBUIBarButtonItem" id="667527307">
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<reference key="IBUIToolbar" ref="471899933"/>
+								<int key="IBUISystemItemIdentifier">5</int>
+							</object>
+						</object>
+					</object>
+					<object class="IBUILabel" id="349240355">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">270</int>
+						<string key="NSFrame">{{5, 230}, {418, 21}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSNextKeyView" ref="89602979"/>
+						<object class="NSColor" key="IBUIBackgroundColor">
+							<int key="NSColorSpace">4</int>
+							<bytes key="NSWhite">MC42NjY2NjY2OSAwAA</bytes>
+						</object>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClipsSubviews">YES</bool>
+						<bool key="IBUIUserInteractionEnabled">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<string key="IBUIText">Loading...</string>
+						<object class="NSFont" key="IBUIFont">
+							<string key="NSName">Helvetica</string>
+							<double key="NSSize">13</double>
+							<int key="NSfFlags">16</int>
+						</object>
+						<object class="NSColor" key="IBUITextColor">
+							<int key="NSColorSpace">3</int>
+							<bytes key="NSWhite">MQA</bytes>
+						</object>
+						<nil key="IBUIHighlightedColor"/>
+						<int key="IBUIBaselineAdjustment">1</int>
+						<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
+						<float key="IBUIMinimumFontSize">10</float>
+					</object>
+					<object class="IBUIActivityIndicatorView" id="89602979">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">-2147483383</int>
+						<string key="NSFrame">{{454, 231}, {20, 20}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<bool key="IBUIUserInteractionEnabled">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+					</object>
+				</object>
+				<string key="NSFrame">{{0, 20}, {480, 300}}</string>
+				<reference key="NSNextKeyView" ref="345761693"/>
+				<object class="NSColor" key="IBUIBackgroundColor">
+					<int key="NSColorSpace">3</int>
+					<bytes key="NSWhite">MC41AA</bytes>
+					<object class="NSColorSpace" key="NSCustomColorSpace">
+						<int key="NSID">2</int>
+					</object>
+				</object>
+				<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+				<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
+					<int key="interfaceOrientation">3</int>
+				</object>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+			</object>
+		</object>
+		<object class="IBObjectContainer" key="IBDocument.Objects">
+			<object class="NSMutableArray" key="connectionRecords">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">webView</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="345761693"/>
+					</object>
+					<int key="connectionID">17</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">addressLabel</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="349240355"/>
+					</object>
+					<int key="connectionID">18</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">backBtn</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="227415391"/>
+					</object>
+					<int key="connectionID">19</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">fwdBtn</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="283287216"/>
+					</object>
+					<int key="connectionID">22</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">refreshBtn</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="615970053"/>
+					</object>
+					<int key="connectionID">23</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">onDoneButtonPress:</string>
+						<reference key="source" ref="966737436"/>
+						<reference key="destination" ref="372490531"/>
+					</object>
+					<int key="connectionID">26</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">reload</string>
+						<reference key="source" ref="615970053"/>
+						<reference key="destination" ref="345761693"/>
+					</object>
+					<int key="connectionID">27</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">goBack</string>
+						<reference key="source" ref="227415391"/>
+						<reference key="destination" ref="345761693"/>
+					</object>
+					<int key="connectionID">28</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">goForward</string>
+						<reference key="source" ref="283287216"/>
+						<reference key="destination" ref="345761693"/>
+					</object>
+					<int key="connectionID">29</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">onSafariButtonPress:</string>
+						<reference key="source" ref="1046195837"/>
+						<reference key="destination" ref="372490531"/>
+					</object>
+					<int key="connectionID">31</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">view</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="191373211"/>
+					</object>
+					<int key="connectionID">35</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">spinner</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="89602979"/>
+					</object>
+					<int key="connectionID">36</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">safariBtn</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="1046195837"/>
+					</object>
+					<int key="connectionID">40</int>
+				</object>
+			</object>
+			<object class="IBMutableOrderedSet" key="objectRecords">
+				<object class="NSArray" key="orderedObjects">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="IBObjectRecord">
+						<int key="objectID">0</int>
+						<reference key="object" ref="0"/>
+						<reference key="children" ref="1000"/>
+						<nil key="parent"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">1</int>
+						<reference key="object" ref="191373211"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="471899933"/>
+							<reference ref="349240355"/>
+							<reference ref="89602979"/>
+							<reference ref="345761693"/>
+						</object>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-1</int>
+						<reference key="object" ref="372490531"/>
+						<reference key="parent" ref="0"/>
+						<string key="objectName">File's Owner</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-2</int>
+						<reference key="object" ref="975951072"/>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">4</int>
+						<reference key="object" ref="345761693"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">6</int>
+						<reference key="object" ref="471899933"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="966737436"/>
+							<reference ref="615970053"/>
+							<reference ref="227415391"/>
+							<reference ref="283287216"/>
+							<reference ref="1046195837"/>
+							<reference ref="111711024"/>
+							<reference ref="129413107"/>
+							<reference ref="312951844"/>
+							<reference ref="667527307"/>
+							<reference ref="766205236"/>
+						</object>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">7</int>
+						<reference key="object" ref="966737436"/>
+						<reference key="parent" ref="471899933"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">8</int>
+						<reference key="object" ref="615970053"/>
+						<reference key="parent" ref="471899933"/>
+						<string key="objectName">Bar Button Item (Reload)</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">9</int>
+						<reference key="object" ref="227415391"/>
+						<reference key="parent" ref="471899933"/>
+						<string key="objectName">Bar Button Item (Go Back)</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">10</int>
+						<reference key="object" ref="283287216"/>
+						<reference key="parent" ref="471899933"/>
+						<string key="objectName">Bar Button Item (Go Forward)</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">11</int>
+						<reference key="object" ref="1046195837"/>
+						<reference key="parent" ref="471899933"/>
+						<string key="objectName">Bar Button Item (Safari)</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">13</int>
+						<reference key="object" ref="349240355"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">14</int>
+						<reference key="object" ref="111711024"/>
+						<reference key="parent" ref="471899933"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">15</int>
+						<reference key="object" ref="129413107"/>
+						<reference key="parent" ref="471899933"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">32</int>
+						<reference key="object" ref="89602979"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">37</int>
+						<reference key="object" ref="312951844"/>
+						<reference key="parent" ref="471899933"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">38</int>
+						<reference key="object" ref="667527307"/>
+						<reference key="parent" ref="471899933"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">39</int>
+						<reference key="object" ref="766205236"/>
+						<reference key="parent" ref="471899933"/>
+					</object>
+				</object>
+			</object>
+			<object class="NSMutableDictionary" key="flattenedProperties">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="NSArray" key="dict.sortedKeys">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>-1.CustomClassName</string>
+					<string>-2.CustomClassName</string>
+					<string>1.IBEditorWindowLastContentRect</string>
+					<string>1.IBPluginDependency</string>
+					<string>10.IBPluginDependency</string>
+					<string>11.IBPluginDependency</string>
+					<string>13.IBPluginDependency</string>
+					<string>13.IBViewBoundsToFrameTransform</string>
+					<string>14.IBPluginDependency</string>
+					<string>15.IBPluginDependency</string>
+					<string>32.IBPluginDependency</string>
+					<string>32.IBViewBoundsToFrameTransform</string>
+					<string>37.IBPluginDependency</string>
+					<string>38.IBPluginDependency</string>
+					<string>39.IBPluginDependency</string>
+					<string>4.IBPluginDependency</string>
+					<string>4.IBViewBoundsToFrameTransform</string>
+					<string>6.IBPluginDependency</string>
+					<string>6.IBViewBoundsToFrameTransform</string>
+					<string>7.IBPluginDependency</string>
+					<string>8.IBPluginDependency</string>
+					<string>9.IBPluginDependency</string>
+				</object>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>ChildBrowserViewController</string>
+					<string>UIResponder</string>
+					<string>{{250, 643}, {480, 320}}</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<object class="NSAffineTransform">
+						<bytes key="NSTransformStruct">P4AAAL+AAABCoAAAwygAAA</bytes>
+					</object>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<object class="NSAffineTransform">
+						<bytes key="NSTransformStruct">P4AAAL+AAABD5gAAw3kAAA</bytes>
+					</object>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<object class="NSAffineTransform">
+						<bytes key="NSTransformStruct">P4AAAL+AAABB8AAAwwUAAA</bytes>
+					</object>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<object class="NSAffineTransform">
+						<bytes key="NSTransformStruct">P4AAAL+AAAAAAAAAw10AAA</bytes>
+					</object>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				</object>
+			</object>
+			<object class="NSMutableDictionary" key="unlocalizedProperties">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<reference key="dict.sortedKeys" ref="0"/>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+				</object>
+			</object>
+			<nil key="activeLocalization"/>
+			<object class="NSMutableDictionary" key="localizations">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<reference key="dict.sortedKeys" ref="0"/>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+				</object>
+			</object>
+			<nil key="sourceID"/>
+			<int key="maxID">40</int>
+		</object>
+		<object class="IBClassDescriber" key="IBDocument.Classes">
+			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBPartialClassDescription">
+					<string key="className">ChildBrowserViewController</string>
+					<string key="superclassName">UIViewController</string>
+					<object class="NSMutableDictionary" key="actions">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>onDoneButtonPress:</string>
+							<string>onSafariButtonPress:</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>id</string>
+							<string>id</string>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="actionInfosByName">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>onDoneButtonPress:</string>
+							<string>onSafariButtonPress:</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="IBActionInfo">
+								<string key="name">onDoneButtonPress:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">onSafariButtonPress:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="outlets">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>addressLabel</string>
+							<string>backBtn</string>
+							<string>closeBtn</string>
+							<string>delegate</string>
+							<string>fwdBtn</string>
+							<string>refreshBtn</string>
+							<string>safariBtn</string>
+							<string>spinner</string>
+							<string>webView</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>UILabel</string>
+							<string>UIBarButtonItem</string>
+							<string>UIBarButtonItem</string>
+							<string>id</string>
+							<string>UIBarButtonItem</string>
+							<string>UIBarButtonItem</string>
+							<string>UIBarButtonItem</string>
+							<string>UIActivityIndicatorView</string>
+							<string>UIWebView</string>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="toOneOutletInfosByName">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>addressLabel</string>
+							<string>backBtn</string>
+							<string>closeBtn</string>
+							<string>delegate</string>
+							<string>fwdBtn</string>
+							<string>refreshBtn</string>
+							<string>safariBtn</string>
+							<string>spinner</string>
+							<string>webView</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="IBToOneOutletInfo">
+								<string key="name">addressLabel</string>
+								<string key="candidateClassName">UILabel</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">backBtn</string>
+								<string key="candidateClassName">UIBarButtonItem</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">closeBtn</string>
+								<string key="candidateClassName">UIBarButtonItem</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">delegate</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">fwdBtn</string>
+								<string key="candidateClassName">UIBarButtonItem</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">refreshBtn</string>
+								<string key="candidateClassName">UIBarButtonItem</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">safariBtn</string>
+								<string key="candidateClassName">UIBarButtonItem</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">spinner</string>
+								<string key="candidateClassName">UIActivityIndicatorView</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">webView</string>
+								<string key="candidateClassName">UIWebView</string>
+							</object>
+						</object>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">Plugins/ChildBrowser/ChildBrowserViewController.h</string>
+					</object>
+				</object>
+			</object>
+			<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSError.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">QuartzCore.framework/Headers/CAAnimation.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">QuartzCore.framework/Headers/CALayer.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier" id="485348283">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIActivityIndicatorView</string>
+					<string key="superclassName">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIActivityIndicatorView.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIBarButtonItem</string>
+					<string key="superclassName">UIBarItem</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIBarButtonItem.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIBarItem</string>
+					<string key="superclassName">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIBarItem.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UILabel</string>
+					<string key="superclassName">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UILabel.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIResponder</string>
+					<string key="superclassName">NSObject</string>
+					<reference key="sourceIdentifier" ref="485348283"/>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UISearchBar</string>
+					<string key="superclassName">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UISearchDisplayController</string>
+					<string key="superclassName">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIToolbar</string>
+					<string key="superclassName">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIToolbar.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIView</string>
+					<string key="superclassName">UIResponder</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIViewController</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">MediaPlayer.framework/Headers/MPMoviePlayerViewController.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIViewController</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIViewController</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIViewController</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIViewController</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIViewController</string>
+					<string key="superclassName">UIResponder</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIWebView</string>
+					<string key="superclassName">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIWebView.h</string>
+					</object>
+				</object>
+			</object>
+		</object>
+		<int key="IBDocument.localizationMode">0</int>
+		<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+			<integer value="768" key="NS.object.0"/>
+		</object>
+		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+			<integer value="1056" key="NS.object.0"/>
+		</object>
+		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+			<integer value="3000" key="NS.object.0"/>
+		</object>
+		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+		<nil key="IBDocument.LastKnownRelativeProjectPath"/>
+		<int key="IBDocument.defaultPropertyAccessControl">3</int>
+		<string key="IBCocoaTouchPluginVersion">141</string>
+	</data>
+</archive>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/.gitignore
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/.gitignore b/cordova-lib/spec-plugman/plugins/cordova.echo/.gitignore
new file mode 100644
index 0000000..e43b0f9
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/.gitignore
@@ -0,0 +1 @@
+.DS_Store

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/plugin.xml b/cordova-lib/spec-plugman/plugins/cordova.echo/plugin.xml
new file mode 100644
index 0000000..a9145e7
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/plugin.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    id="com.cordova.echo"
+    version="1.0.0">
+
+    <engines>
+        <engine name="cordova" version=">=2.3.0" />
+    </engines>
+
+    <name>cordova echo</name>
+
+    <js-module src="www/client.js">
+        <clobbers target="cordova.echo"/>
+    </js-module>
+
+    <platform name="blackberry10">
+        <source-file src="src/blackberry10/index.js" target-dir="cordova.echo"/>
+        <lib-file src="src/blackberry10/native/device/echoJnext.so" arch="device"/>
+        <lib-file src="src/blackberry10/native/simulator/echoJnext.so" arch="simulator"/>
+        <config-file target="config.xml" parent="/widget">
+            <feature id="cordova.echo" required="true" version="1.0.0.0"/>
+        </config-file>
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/index.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/index.js b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/index.js
new file mode 100644
index 0000000..0759a20
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/index.js
@@ -0,0 +1,85 @@
+/*
+ *
+ * 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 echoJNext,
+    _event = require("../../lib/event"),
+    winCallback = null,
+    failCallback = null;
+    
+module.exports = {   
+    doEcho: function (success, fail, args) {
+        var invokeData = { "message" : JSON.parse(decodeURIComponent(args.message)) };
+        try {
+            success(echoJNext.getEchoJNext(invokeData));
+        } catch (e) {
+            fail(-1, e);
+        }
+    }
+};
+
+///////////////////////////////////////////////////////////////////
+// JavaScript wrapper for JNEXT plugin
+///////////////////////////////////////////////////////////////////
+
+JNEXT.EchoJNext = function ()
+{   
+    var _self = this;
+
+    _self.getEchoJNext = function (args) {
+        return JNEXT.invoke(_self._id, "doEcho " + JSON.stringify(args));
+    };
+
+    _self.getId = function () {
+        return _self._id;
+    };
+
+    _self.init = function () {
+        if (!JNEXT.require("echoJnext")) {
+            return false;
+        }
+
+        _self._id = JNEXT.createObject("echoJnext.Echo");
+
+        if (!_self._id || _self._id === "") {
+            return false;
+        }
+
+        JNEXT.registerEvents(_self);
+    };
+
+    _self.onEvent = function (strData) {
+        var arData = strData.split(" "),
+            strEventId = arData[0],
+            args = arData[1],
+            info = {};
+            
+        if (strEventId === "cordova.echo.callback") {
+            _event.trigger("echoCallback", args);
+        }
+                  
+    };
+    
+    _self._id = "";
+    
+    _self.init();
+};
+
+echoJNext = new JNEXT.EchoJNext();

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/device/echoJnext.so
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/device/echoJnext.so b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/device/echoJnext.so
new file mode 100755
index 0000000..169714a
Binary files /dev/null and b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/device/echoJnext.so differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/autolink.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/autolink.h b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/autolink.h
new file mode 100644
index 0000000..37c9258
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/autolink.h
@@ -0,0 +1,19 @@
+#ifndef JSON_AUTOLINK_H_INCLUDED
+# define JSON_AUTOLINK_H_INCLUDED
+
+# include "config.h"
+
+# ifdef JSON_IN_CPPTL
+#  include <cpptl/cpptl_autolink.h>
+# endif
+
+# if !defined(JSON_NO_AUTOLINK)  &&  !defined(JSON_DLL_BUILD)  &&  !defined(JSON_IN_CPPTL)
+#  define CPPTL_AUTOLINK_NAME "json"
+#  undef CPPTL_AUTOLINK_DLL
+#  ifdef JSON_DLL
+#   define CPPTL_AUTOLINK_DLL
+#  endif
+#  include "autolink.h"
+# endif
+
+#endif // JSON_AUTOLINK_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/config.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/config.h b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/config.h
new file mode 100644
index 0000000..5d334cb
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/config.h
@@ -0,0 +1,43 @@
+#ifndef JSON_CONFIG_H_INCLUDED
+# define JSON_CONFIG_H_INCLUDED
+
+/// If defined, indicates that json library is embedded in CppTL library.
+//# define JSON_IN_CPPTL 1
+
+/// If defined, indicates that json may leverage CppTL library
+//#  define JSON_USE_CPPTL 1
+/// If defined, indicates that cpptl vector based map should be used instead of std::map
+/// as Value container.
+//#  define JSON_USE_CPPTL_SMALLMAP 1
+/// If defined, indicates that Json specific container should be used
+/// (hash table & simple deque container with customizable allocator).
+/// THIS FEATURE IS STILL EXPERIMENTAL!
+//#  define JSON_VALUE_USE_INTERNAL_MAP 1
+/// Force usage of standard new/malloc based allocator instead of memory pool based allocator.
+/// The memory pools allocator used optimization (initializing Value and ValueInternalLink
+/// as if it was a POD) that may cause some validation tool to report errors.
+/// Only has effects if JSON_VALUE_USE_INTERNAL_MAP is defined.
+//#  define JSON_USE_SIMPLE_INTERNAL_ALLOCATOR 1
+
+/// If defined, indicates that Json use exception to report invalid type manipulation
+/// instead of C assert macro.
+# define JSON_USE_EXCEPTION 1
+
+# ifdef JSON_IN_CPPTL
+#  include <cpptl/config.h>
+#  ifndef JSON_USE_CPPTL
+#   define JSON_USE_CPPTL 1
+#  endif
+# endif
+
+# ifdef JSON_IN_CPPTL
+#  define JSON_API CPPTL_API
+# elif defined(JSON_DLL_BUILD)
+#  define JSON_API __declspec(dllexport)
+# elif defined(JSON_DLL)
+#  define JSON_API __declspec(dllimport)
+# else
+#  define JSON_API
+# endif
+
+#endif // JSON_CONFIG_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/features.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/features.h b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/features.h
new file mode 100644
index 0000000..5a9adec
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/features.h
@@ -0,0 +1,42 @@
+#ifndef CPPTL_JSON_FEATURES_H_INCLUDED
+# define CPPTL_JSON_FEATURES_H_INCLUDED
+
+# include "forwards.h"
+
+namespace Json {
+
+   /** \brief Configuration passed to reader and writer.
+    * This configuration object can be used to force the Reader or Writer
+    * to behave in a standard conforming way.
+    */
+   class JSON_API Features
+   {
+   public:
+      /** \brief A configuration that allows all features and assumes all strings are UTF-8.
+       * - C & C++ comments are allowed
+       * - Root object can be any JSON value
+       * - Assumes Value strings are encoded in UTF-8
+       */
+      static Features all();
+
+      /** \brief A configuration that is strictly compatible with the JSON specification.
+       * - Comments are forbidden.
+       * - Root object must be either an array or an object value.
+       * - Assumes Value strings are encoded in UTF-8
+       */
+      static Features strictMode();
+
+      /** \brief Initialize the configuration like JsonConfig::allFeatures;
+       */
+      Features();
+
+      /// \c true if comments are allowed. Default: \c true.
+      bool allowComments_;
+
+      /// \c true if root must be either an array or an object value. Default: \c false.
+      bool strictRoot_;
+   };
+
+} // namespace Json
+
+#endif // CPPTL_JSON_FEATURES_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/forwards.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/forwards.h b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/forwards.h
new file mode 100644
index 0000000..d0ce830
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/forwards.h
@@ -0,0 +1,39 @@
+#ifndef JSON_FORWARDS_H_INCLUDED
+# define JSON_FORWARDS_H_INCLUDED
+
+# include "config.h"
+
+namespace Json {
+
+   // writer.h
+   class FastWriter;
+   class StyledWriter;
+
+   // reader.h
+   class Reader;
+
+   // features.h
+   class Features;
+
+   // value.h
+   typedef int Int;
+   typedef unsigned int UInt;
+   class StaticString;
+   class Path;
+   class PathArgument;
+   class Value;
+   class ValueIteratorBase;
+   class ValueIterator;
+   class ValueConstIterator;
+#ifdef JSON_VALUE_USE_INTERNAL_MAP
+   class ValueAllocator;
+   class ValueMapAllocator;
+   class ValueInternalLink;
+   class ValueInternalArray;
+   class ValueInternalMap;
+#endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
+
+} // namespace Json
+
+
+#endif // JSON_FORWARDS_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/json.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/json.h b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/json.h
new file mode 100644
index 0000000..c71ed65
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/json.h
@@ -0,0 +1,10 @@
+#ifndef JSON_JSON_H_INCLUDED
+# define JSON_JSON_H_INCLUDED
+
+# include "autolink.h"
+# include "value.h"
+# include "reader.h"
+# include "writer.h"
+# include "features.h"
+
+#endif // JSON_JSON_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/reader.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/reader.h b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/reader.h
new file mode 100644
index 0000000..ee1d6a2
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/reader.h
@@ -0,0 +1,196 @@
+#ifndef CPPTL_JSON_READER_H_INCLUDED
+# define CPPTL_JSON_READER_H_INCLUDED
+
+# include "features.h"
+# include "value.h"
+# include <deque>
+# include <stack>
+# include <string>
+# include <iostream>
+
+namespace Json {
+
+   /** \brief Unserialize a <a HREF="http://www.json.org">JSON</a> document into a Value.
+    *
+    */
+   class JSON_API Reader
+   {
+   public:
+      typedef char Char;
+      typedef const Char *Location;
+
+      /** \brief Constructs a Reader allowing all features
+       * for parsing.
+       */
+      Reader();
+
+      /** \brief Constructs a Reader allowing the specified feature set
+       * for parsing.
+       */
+      Reader( const Features &features );
+
+      /** \brief Read a Value from a <a HREF="http://www.json.org">JSON</a> document.
+       * \param document UTF-8 encoded string containing the document to read.
+       * \param root [out] Contains the root value of the document if it was
+       *             successfully parsed.
+       * \param collectComments \c true to collect comment and allow writing them back during
+       *                        serialization, \c false to discard comments.
+       *                        This parameter is ignored if Features::allowComments_
+       *                        is \c false.
+       * \return \c true if the document was successfully parsed, \c false if an error occurred.
+       */
+      bool parse( const std::string &document, 
+                  Value &root,
+                  bool collectComments = true );
+
+      /** \brief Read a Value from a <a HREF="http://www.json.org">JSON</a> document.
+       * \param document UTF-8 encoded string containing the document to read.
+       * \param root [out] Contains the root value of the document if it was
+       *             successfully parsed.
+       * \param collectComments \c true to collect comment and allow writing them back during
+       *                        serialization, \c false to discard comments.
+       *                        This parameter is ignored if Features::allowComments_
+       *                        is \c false.
+       * \return \c true if the document was successfully parsed, \c false if an error occurred.
+       */
+      bool parse( const char *beginDoc, const char *endDoc, 
+                  Value &root,
+                  bool collectComments = true );
+
+      /// \brief Parse from input stream.
+      /// \see Json::operator>>(std::istream&, Json::Value&).
+      bool parse( std::istream &is,
+                  Value &root,
+                  bool collectComments = true );
+
+      /** \brief Returns a user friendly string that list errors in the parsed document.
+       * \return Formatted error message with the list of errors with their location in 
+       *         the parsed document. An empty string is returned if no error occurred
+       *         during parsing.
+       */
+      std::string getFormatedErrorMessages() const;
+
+   private:
+      enum TokenType
+      {
+         tokenEndOfStream = 0,
+         tokenObjectBegin,
+         tokenObjectEnd,
+         tokenArrayBegin,
+         tokenArrayEnd,
+         tokenString,
+         tokenNumber,
+         tokenTrue,
+         tokenFalse,
+         tokenNull,
+         tokenArraySeparator,
+         tokenMemberSeparator,
+         tokenComment,
+         tokenError
+      };
+
+      class Token
+      {
+      public:
+         TokenType type_;
+         Location start_;
+         Location end_;
+      };
+
+      class ErrorInfo
+      {
+      public:
+         Token token_;
+         std::string message_;
+         Location extra_;
+      };
+
+      typedef std::deque<ErrorInfo> Errors;
+
+      bool expectToken( TokenType type, Token &token, const char *message );
+      bool readToken( Token &token );
+      void skipSpaces();
+      bool match( Location pattern, 
+                  int patternLength );
+      bool readComment();
+      bool readCStyleComment();
+      bool readCppStyleComment();
+      bool readString();
+      void readNumber();
+      bool readValue();
+      bool readObject( Token &token );
+      bool readArray( Token &token );
+      bool decodeNumber( Token &token );
+      bool decodeString( Token &token );
+      bool decodeString( Token &token, std::string &decoded );
+      bool decodeDouble( Token &token );
+      bool decodeUnicodeCodePoint( Token &token, 
+                                   Location &current, 
+                                   Location end, 
+                                   unsigned int &unicode );
+      bool decodeUnicodeEscapeSequence( Token &token, 
+                                        Location &current, 
+                                        Location end, 
+                                        unsigned int &unicode );
+      bool addError( const std::string &message, 
+                     Token &token,
+                     Location extra = 0 );
+      bool recoverFromError( TokenType skipUntilToken );
+      bool addErrorAndRecover( const std::string &message, 
+                               Token &token,
+                               TokenType skipUntilToken );
+      void skipUntilSpace();
+      Value &currentValue();
+      Char getNextChar();
+      void getLocationLineAndColumn( Location location,
+                                     int &line,
+                                     int &column ) const;
+      std::string getLocationLineAndColumn( Location location ) const;
+      void addComment( Location begin, 
+                       Location end, 
+                       CommentPlacement placement );
+      void skipCommentTokens( Token &token );
+   
+      typedef std::stack<Value *> Nodes;
+      Nodes nodes_;
+      Errors errors_;
+      std::string document_;
+      Location begin_;
+      Location end_;
+      Location current_;
+      Location lastValueEnd_;
+      Value *lastValue_;
+      std::string commentsBefore_;
+      Features features_;
+      bool collectComments_;
+   };
+
+   /** \brief Read from 'sin' into 'root'.
+
+    Always keep comments from the input JSON.
+
+    This can be used to read a file into a particular sub-object.
+    For example:
+    \code
+    Json::Value root;
+    cin >> root["dir"]["file"];
+    cout << root;
+    \endcode
+    Result:
+    \verbatim
+    {
+	"dir": {
+	    "file": {
+		// The input stream JSON would be nested here.
+	    }
+	}
+    }
+    \endverbatim
+    \throw std::exception on parse error.
+    \see Json::operator<<()
+   */
+   std::istream& operator>>( std::istream&, Value& );
+
+} // namespace Json
+
+#endif // CPPTL_JSON_READER_H_INCLUDED


[65/70] Remove all cordova-lib files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/src/android/ContactManager.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/android/ContactManager.java b/cordova-lib/spec-plugman/plugins/Contacts/src/android/ContactManager.java
deleted file mode 100755
index 1c086e1..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/src/android/ContactManager.java
+++ /dev/null
@@ -1,122 +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.
-*/
-package org.apache.cordova.core;
-
-import org.apache.cordova.CallbackContext;
-import org.apache.cordova.CordovaPlugin;
-import org.apache.cordova.PluginResult;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-import android.util.Log;
-
-public class ContactManager extends CordovaPlugin {
-
-    private ContactAccessor contactAccessor;
-    private static final String LOG_TAG = "Contact Query";
-
-    public static final int UNKNOWN_ERROR = 0;
-    public static final int INVALID_ARGUMENT_ERROR = 1;
-    public static final int TIMEOUT_ERROR = 2;
-    public static final int PENDING_OPERATION_ERROR = 3;
-    public static final int IO_ERROR = 4;
-    public static final int NOT_SUPPORTED_ERROR = 5;
-    public static final int PERMISSION_DENIED_ERROR = 20;
-
-    /**
-     * Constructor.
-     */
-    public ContactManager() {
-    }
-
-    /**
-     * Executes the request and returns PluginResult.
-     *
-     * @param action            The action to execute.
-     * @param args              JSONArray of arguments for the plugin.
-     * @param callbackContext   The callback context used when calling back into JavaScript.
-     * @return                  True if the action was valid, false otherwise.
-     */
-    public boolean execute(String action, JSONArray args, final CallbackContext callbackContext) throws JSONException {
-        /**
-         * Check to see if we are on an Android 1.X device.  If we are return an error as we
-         * do not support this as of Cordova 1.0.
-         */
-        if (android.os.Build.VERSION.RELEASE.startsWith("1.")) {
-            callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, ContactManager.NOT_SUPPORTED_ERROR));
-            return true;
-        }
-
-        /**
-         * Only create the contactAccessor after we check the Android version or the program will crash
-         * older phones.
-         */
-        if (this.contactAccessor == null) {
-            this.contactAccessor = new ContactAccessorSdk5(this.webView, this.cordova);
-        }
-
-        if (action.equals("search")) {
-            final JSONArray filter = args.getJSONArray(0);
-            final JSONObject options = args.getJSONObject(1);
-            this.cordova.getThreadPool().execute(new Runnable() {
-                public void run() {
-                    JSONArray res = contactAccessor.search(filter, options);
-                    callbackContext.success(res);
-                }
-            });
-        }
-        else if (action.equals("save")) {
-            final JSONObject contact = args.getJSONObject(0);
-            this.cordova.getThreadPool().execute(new Runnable() {
-                public void run() {
-                    JSONObject res = null;
-                    String id = contactAccessor.save(contact);
-                    if (id != null) {
-                        try {
-                            res = contactAccessor.getContactById(id);
-                        } catch (JSONException e) {
-                            Log.e(LOG_TAG, "JSON fail.", e);
-                        }
-                    }
-                    if (res != null) {
-                        callbackContext.success(res);
-                    } else {
-                        callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, UNKNOWN_ERROR));
-                    }
-                }
-            });
-        }
-        else if (action.equals("remove")) {
-            final String contactId = args.getString(0);
-            this.cordova.getThreadPool().execute(new Runnable() {
-                public void run() {
-                    if (contactAccessor.remove(contactId)) {
-                        callbackContext.success();
-                    } else {
-                        callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, UNKNOWN_ERROR));
-                    }
-                }
-            });
-        }
-        else {
-            return false;
-        }
-        return true;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactActivity.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactActivity.js b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactActivity.js
deleted file mode 100644
index f0f82b3..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactActivity.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2012 Research In Motion Limited.
- *
- * Licensed 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 ContactActivity = function (args) {
-    this.direction = args.direction || null;
-    this.description = args.description || "";
-    this.mimeType = args.mimeType || "";
-    this.timestamp = new Date(parseInt(args.timestamp, 10)) || null;
-};
-
-Object.defineProperty(ContactActivity, "INCOMING", {"value": true});
-Object.defineProperty(ContactActivity, "OUTGOING", {"value": false});
-
-module.exports = ContactActivity;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactAddress.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactAddress.js b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactAddress.js
deleted file mode 100644
index 1ba9fe4..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactAddress.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2012 Research In Motion Limited.
- *
- * Licensed 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 ContactAddress = function (properties) {
-    this.type = properties && properties.type ? properties.type : "";
-    this.streetAddress = properties && properties.streetAddress ? properties.streetAddress : "";
-    this.streetOther = properties && properties.streetOther ? properties.streetOther : "";
-    this.locality = properties && properties.locality ? properties.locality : "";
-    this.region = properties && properties.region ? properties.region : "";
-    this.postalCode = properties && properties.postalCode ? properties.postalCode : "";
-    this.country = properties && properties.country ? properties.country : "";
-};
-
-Object.defineProperty(ContactAddress, "HOME", {"value": "home"});
-Object.defineProperty(ContactAddress, "WORK", {"value": "work"});
-Object.defineProperty(ContactAddress, "OTHER", {"value": "other"});
-
-module.exports = ContactAddress;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactError.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactError.js b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactError.js
deleted file mode 100644
index f20f85e..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactError.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2012 Research In Motion Limited.
- *
- * Licensed 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 ContactError = function (code, msg) {
-    this.code = code;
-    this.message = msg;
-};
-
-Object.defineProperty(ContactError, "UNKNOWN_ERROR", { "value": 0 });
-Object.defineProperty(ContactError, "INVALID_ARGUMENT_ERROR", { "value": 1 });
-Object.defineProperty(ContactError, "TIMEOUT_ERROR", { "value": 2 });
-Object.defineProperty(ContactError, "PENDING_OPERATION_ERROR", { "value": 3 });
-Object.defineProperty(ContactError, "IO_ERROR", { "value": 4 });
-Object.defineProperty(ContactError, "NOT_SUPPORTED_ERROR", { "value": 5 });
-Object.defineProperty(ContactError, "PERMISSION_DENIED_ERROR", { "value": 20 });
-
-module.exports = ContactError;
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactField.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactField.js b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactField.js
deleted file mode 100644
index aad735c..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactField.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2012 Research In Motion Limited.
- *
- * Licensed 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 ContactField = function (type, value) {
-    this.type = type || "";
-    this.value = value || "";
-};
-
-Object.defineProperty(ContactField, "HOME", {"value": "home"});
-Object.defineProperty(ContactField, "WORK", {"value": "work"});
-Object.defineProperty(ContactField, "OTHER", {"value": "other"});
-Object.defineProperty(ContactField, "MOBILE", {"value": "mobile"});
-Object.defineProperty(ContactField, "DIRECT", {"value": "direct"});
-
-module.exports = ContactField;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactFindOptions.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactFindOptions.js b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactFindOptions.js
deleted file mode 100644
index 8be830d..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactFindOptions.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2012 Research In Motion Limited.
- *
- * Licensed 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.
- */
-
-/**
- * ContactFindOptions.
- * @constructor
- * @param filter search fields
- * @param sort sort fields and order
- * @param limit max number of contacts to return
- * @param favorite if set, only favorite contacts will be returned
- */
-
-var ContactFindOptions = function (filter, sort, limit, favorite) {
-    this.filter = filter || null;
-    this.sort = sort || null;
-    this.limit = limit || -1; // -1 for returning all results
-    this.favorite = favorite || false;
-    this.includeAccounts = [];
-    this.excludeAccounts = [];
-};
-
-Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_GIVEN_NAME", { "value": 0 });
-Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_FAMILY_NAME", { "value": 1 });
-Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_ORGANIZATION_NAME", { "value": 2 });
-Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_PHONE", { "value": 3 });
-Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_EMAIL", { "value": 4 });
-Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_BBMPIN", { "value": 5 });
-Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_LINKEDIN", { "value": 6 });
-Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_TWITTER", { "value": 7 });
-Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_VIDEO_CHAT", { "value": 8 });
-
-Object.defineProperty(ContactFindOptions, "SORT_FIELD_GIVEN_NAME", { "value": 0 });
-Object.defineProperty(ContactFindOptions, "SORT_FIELD_FAMILY_NAME", { "value": 1 });
-Object.defineProperty(ContactFindOptions, "SORT_FIELD_ORGANIZATION_NAME", { "value": 2 });
-
-module.exports = ContactFindOptions;
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactName.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactName.js b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactName.js
deleted file mode 100644
index 9b74753..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactName.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2012 Research In Motion Limited.
- *
- * Licensed 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.
- */
-
-function toFormattedName(properties) {
-    var formatted = "";
-    if (properties && properties.givenName) {
-        formatted = properties.givenName;
-        if (properties && properties.familyName) {
-            formatted += " " + properties.familyName;
-        }
-    }
-    return formatted;
-}
-
-var ContactName = function (properties) {
-    this.familyName = properties && properties.familyName ? properties.familyName : "";
-    this.givenName = properties && properties.givenName ? properties.givenName : "";
-    this.formatted = toFormattedName(properties);
-    this.middleName = properties && properties.middleName ? properties.middleName : "";
-    this.honorificPrefix = properties && properties.honorificPrefix ? properties.honorificPrefix : "";
-    this.honorificSuffix = properties && properties.honorificSuffix ? properties.honorificSuffix : "";
-    this.phoneticFamilyName = properties && properties.phoneticFamilyName ? properties.phoneticFamilyName : "";
-    this.phoneticGivenName = properties && properties.phoneticGivenName ? properties.phoneticGivenName : "";
-};
-
-module.exports = ContactName;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactNews.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactNews.js b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactNews.js
deleted file mode 100644
index 9fb86dc..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactNews.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2012 Research In Motion Limited.
- *
- * Licensed 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 ContactNews = function (args) {
-    this.title = args.title || "";
-    this.body = args.body || "";
-    this.articleSource = args.articleSource || "";
-    this.companies = args.companies || [];
-    this.publishedAt = new Date(parseInt(args.publishedAt, 10)) || null;
-    this.uri = args.uri || "";
-    this.type = args.type || "";
-};
-
-module.exports = ContactNews;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactOrganization.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactOrganization.js b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactOrganization.js
deleted file mode 100644
index 987310f..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactOrganization.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright 2012 Research In Motion Limited.
- *
- * Licensed 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 ContactOrganization = function (properties) {
-    this.name = properties && properties.name ? properties.name : "";
-    this.department = properties && properties.department ? properties.department : "";
-    this.title = properties && properties.title ? properties.title : "";
-};
-
-module.exports = ContactOrganization;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactPhoto.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactPhoto.js b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactPhoto.js
deleted file mode 100644
index eeaa263..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/ContactPhoto.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright 2012 Research In Motion Limited.
- *
- * Licensed 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 ContactPhoto = function (originalFilePath, pref) {
-    this.originalFilePath = originalFilePath || "";
-    this.pref = pref || false;
-    this.largeFilePath = "";
-    this.smallFilePath = "";
-};
-
-module.exports = ContactPhoto;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/contactConsts.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/contactConsts.js b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/contactConsts.js
deleted file mode 100644
index ef25206..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/contactConsts.js
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
-* Copyright 2012 Research In Motion Limited.
-*
-* Licensed 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 ATTRIBUTE_KIND,
-    ATTRIBUTE_SUBKIND,
-    kindAttributeMap = {},
-    subKindAttributeMap = {},
-    _TITLE = 26,
-    _START_DATE = 43,
-    _END_DATE = 44;
-
-function populateKindAttributeMap() {
-    ATTRIBUTE_KIND = {
-        Invalid: 0,
-        Phone: 1,
-        Fax: 2,
-        Pager: 3,
-        Email: 4,
-        Website: 5,
-        Feed: 6,
-        Profile: 7,
-        Family: 8,
-        Person: 9,
-        Date: 10,
-        Group: 11,
-        Name: 12,
-        StockSymbol: 13,
-        Ranking: 14,
-        OrganizationAffiliation: 15,
-        Education: 16,
-        Note: 17,
-        InstantMessaging: 18,
-        VideoChat: 19,
-        ConnectionCount: 20,
-        Hidden: 21,
-        Biography: 22,
-        Sound: 23,
-        Notification: 24,
-        MessageSound: 25,
-        MessageNotification: 26
-    };
-
-    kindAttributeMap[ATTRIBUTE_KIND.Phone] = "phoneNumbers";
-    kindAttributeMap[ATTRIBUTE_KIND.Fax] = "faxNumbers";
-    kindAttributeMap[ATTRIBUTE_KIND.Pager] = "pagerNumber";
-    kindAttributeMap[ATTRIBUTE_KIND.Email] = "emails";
-    kindAttributeMap[ATTRIBUTE_KIND.Website] = "urls";
-    kindAttributeMap[ATTRIBUTE_KIND.Profile] = "socialNetworks";
-    kindAttributeMap[ATTRIBUTE_KIND.OrganizationAffiliation] = "organizations";
-    kindAttributeMap[ATTRIBUTE_KIND.Education] = "education";
-    kindAttributeMap[ATTRIBUTE_KIND.Note] = "note";
-    kindAttributeMap[ATTRIBUTE_KIND.InstantMessaging] = "ims";
-    kindAttributeMap[ATTRIBUTE_KIND.VideoChat] = "videoChat";
-    kindAttributeMap[ATTRIBUTE_KIND.Sound] = "ringtone";
-}
-
-function populateSubKindAttributeMap() {
-    ATTRIBUTE_SUBKIND = {
-        Invalid: 0,
-        Other: 1,
-        Home: 2,
-        Work: 3,
-        PhoneMobile: 4,
-        FaxDirect: 5,
-        Blog: 6,
-        WebsiteResume: 7,
-        WebsitePortfolio: 8,
-        WebsitePersonal: 9,
-        WebsiteCompany: 10,
-        ProfileFacebook: 11,
-        ProfileTwitter: 12,
-        ProfileLinkedIn: 13,
-        ProfileGist: 14,
-        ProfileTungle: 15,
-        FamilySpouse: 16,
-        FamilyChild: 17,
-        FamilyParent: 18,
-        PersonManager: 19,
-        PersonAssistant: 20,
-        DateBirthday: 21,
-        DateAnniversary: 22,
-        GroupDepartment: 23,
-        NameGiven: 24,
-        NameSurname: 25,
-        Title: _TITLE,
-        NameSuffix: 27,
-        NameMiddle: 28,
-        NameNickname: 29,
-        NameAlias: 30,
-        NameDisplayName: 31,
-        NamePhoneticGiven: 32,
-        NamePhoneticSurname: 33,
-        StockSymbolNyse: 34,
-        StockSymbolNasdaq: 35,
-        StockSymbolTse: 36,
-        StockSymbolLse: 37,
-        StockSymbolTsx: 38,
-        RankingKlout: 39,
-        RankingTrstRank: 40,
-        OrganizationAffiliationName: 41,
-        OrganizationAffiliationPhoneticName: 42,
-        OrganizationAffiliationTitle: _TITLE,
-        StartDate: _START_DATE,
-        EndDate: _END_DATE,
-        OrganizationAffiliationDetails: 45,
-        EducationInstitutionName: 46,
-        EducationStartDate: _START_DATE,
-        EducationEndDate: _END_DATE,
-        EducationDegree: 47,
-        EducationConcentration: 48,
-        EducationActivities: 49,
-        EducationNotes: 50,
-        InstantMessagingBbmPin: 51,
-        InstantMessagingAim: 52,
-        InstantMessagingAliwangwang: 53,
-        InstantMessagingGoogleTalk: 54,
-        InstantMessagingSametime: 55,
-        InstantMessagingIcq: 56,
-        InstantMessagingIrc: 57,
-        InstantMessagingJabber: 58,
-        InstantMessagingMsLcs: 59,
-        InstantMessagingMsn: 60,
-        InstantMessagingQq: 61,
-        InstantMessagingSkype: 62,
-        InstantMessagingYahooMessenger: 63,
-        InstantMessagingYahooMessengerJapan: 64,
-        VideoChatBbPlaybook: 65,
-        HiddenLinkedIn: 66,
-        HiddenFacebook: 67,
-        HiddenTwitter: 68,
-        ConnectionCountLinkedIn: 69,
-        ConnectionCountFacebook: 70,
-        ConnectionCountTwitter: 71,
-        HiddenChecksum: 72,
-        HiddenSpeedDial: 73,
-        BiographyFacebook: 74,
-        BiographyTwitter: 75,
-        BiographyLinkedIn: 76,
-        SoundRingtone: 77,
-        SimContactType: 78,
-        EcoID: 79,
-        Personal: 80,
-        StockSymbolAll: 81,
-        NotificationVibration: 82,
-        NotificationLED: 83,
-        MessageNotificationVibration: 84,
-        MessageNotificationLED: 85,
-        MessageNotificationDuringCall: 86,
-        VideoChatPin: 87
-    };
-
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.Other] = "other";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.Home] = "home";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.Work] = "work";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.PhoneMobile] = "mobile";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.FaxDirect] = "direct";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.Blog] = "blog";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.WebsiteResume] = "resume";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.WebsitePortfolio] = "portfolio";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.WebsitePersonal] = "personal";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.WebsiteCompany] = "company";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.ProfileFacebook] = "facebook";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.ProfileTwitter] = "twitter";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.ProfileLinkedIn] = "linkedin";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.ProfileGist] = "gist";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.ProfileTungle] = "tungle";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.DateBirthday] = "birthday";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.DateAnniversary] = "anniversary";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.NameGiven] = "givenName";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.NameSurname] = "familyName";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.Title] = "honorificPrefix";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.NameSuffix] = "honorificSuffix";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.NameMiddle] = "middleName";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.NamePhoneticGiven] = "phoneticGivenName";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.NamePhoneticSurname] = "phoneticFamilyName";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.NameNickname] = "nickname";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.NameDisplayName] = "displayName";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.OrganizationAffiliationName] = "name";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.OrganizationAffiliationDetails] = "department";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.Title] = "title";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingBbmPin] = "BbmPin";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingAim] = "Aim";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingAliwangwang] = "Aliwangwang";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingGoogleTalk] = "GoogleTalk";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingSametime] = "Sametime";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingIcq] = "Icq";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingJabber] = "Jabber";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingMsLcs] = "MsLcs";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingSkype] = "Skype";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingYahooMessenger] = "YahooMessenger";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingYahooMessengerJapan] = "YahooMessegerJapan";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.VideoChatBbPlaybook] = "BbPlaybook";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.SoundRingtone] = "ringtone";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.Personal] = "personal";
-}
-
-module.exports = {
-    getKindAttributeMap: function () {
-        if (!ATTRIBUTE_KIND) {
-            populateKindAttributeMap();
-        }
-
-        return kindAttributeMap;
-    },
-    getSubKindAttributeMap: function () {
-        if (!ATTRIBUTE_SUBKIND) {
-            populateSubKindAttributeMap();
-        }
-
-        return subKindAttributeMap;
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/contactUtils.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/contactUtils.js b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/contactUtils.js
deleted file mode 100644
index cd022c4..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/contactUtils.js
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * Copyright 2012 Research In Motion Limited.
- *
- * Licensed 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 self,
-    ContactFindOptions = require("./ContactFindOptions"),
-    ContactError = require("./ContactError"),
-    ContactName = require("./ContactName"),
-    ContactOrganization = require("./ContactOrganization"),
-    ContactAddress = require("./ContactAddress"),
-    ContactField = require("./ContactField"),
-    contactConsts = require("./contactConsts"),
-    ContactPhoto = require("./ContactPhoto"),
-    ContactNews = require("./ContactNews"),
-    ContactActivity = require("./ContactActivity");
-
-function populateFieldArray(contactProps, field, ClassName) {
-    if (contactProps[field]) {
-        var list = [],
-        obj;
-
-        contactProps[field].forEach(function (args) {
-            if (ClassName === ContactField) {
-                list.push(new ClassName(args.type, args.value));
-            } else if (ClassName === ContactPhoto) {
-                obj = new ContactPhoto(args.originalFilePath, args.pref);
-                obj.largeFilePath = args.largeFilePath;
-                obj.smallFilePath = args.smallFilePath;
-                list.push(obj);
-            } else if (ClassName === ContactNews) {
-                obj = new ContactNews(args);
-                list.push(obj);
-            } else if (ClassName === ContactActivity) {
-                obj = new ContactActivity(args);
-                list.push(obj);
-            } else {
-                list.push(new ClassName(args));
-            }
-        });
-        contactProps[field] = list;
-    }
-}
-
-function populateDate(contactProps, field) {
-    if (contactProps[field]) {
-        contactProps[field] = new Date(contactProps[field]);
-    }
-}
-
-function validateFindArguments(findOptions) {
-    var error = false;
-    
-    // findOptions is mandatory
-    if (!findOptions) {
-        error = true;
-    } else {
-        // findOptions.filter is optional
-        if (findOptions.filter) {
-            findOptions.filter.forEach(function (f) {
-                switch (f.fieldName) {
-                case ContactFindOptions.SEARCH_FIELD_GIVEN_NAME:
-                case ContactFindOptions.SEARCH_FIELD_FAMILY_NAME:
-                case ContactFindOptions.SEARCH_FIELD_ORGANIZATION_NAME:
-                case ContactFindOptions.SEARCH_FIELD_PHONE:
-                case ContactFindOptions.SEARCH_FIELD_EMAIL:
-                case ContactFindOptions.SEARCH_FIELD_BBMPIN:
-                case ContactFindOptions.SEARCH_FIELD_LINKEDIN:
-                case ContactFindOptions.SEARCH_FIELD_TWITTER:
-                case ContactFindOptions.SEARCH_FIELD_VIDEO_CHAT:
-                    break;
-                default:
-                    error = true;
-                }
-
-                if (!f.fieldValue) {
-                    error = true;
-                }
-            });
-        } 
-
-        //findOptions.limit is optional
-        if (findOptions.limit) {
-            if (typeof findOptions.limit !== "number") {
-                error = true;
-            } 
-        } 
-
-        //findOptions.favorite is optional
-        if (findOptions.favorite) {
-            if (typeof findOptions.favorite !== "boolean") {
-                error = true;
-            }
-        }
-
-        // findOptions.sort is optional
-        if (!error && findOptions.sort && Array.isArray(findOptions.sort)) {
-            findOptions.sort.forEach(function (s) {
-                switch (s.fieldName) {
-                case ContactFindOptions.SORT_FIELD_GIVEN_NAME:
-                case ContactFindOptions.SORT_FIELD_FAMILY_NAME:
-                case ContactFindOptions.SORT_FIELD_ORGANIZATION_NAME:
-                    break;
-                default:
-                    error = true;
-                }
-
-                if (s.desc === undefined || typeof s.desc !== "boolean") {
-                    error = true;
-                }
-            });
-        }
-
-        if (!error && findOptions.includeAccounts) {
-            if (!Array.isArray(findOptions.includeAccounts)) {
-                error = true;
-            } else {
-                findOptions.includeAccounts.forEach(function (acct) {
-                    if (!error && (!acct.id || window.isNaN(window.parseInt(acct.id, 10)))) {
-                        error = true;
-                    }
-                });
-            }
-        }
-
-        if (!error && findOptions.excludeAccounts) {
-            if (!Array.isArray(findOptions.excludeAccounts)) {
-                error = true;
-            } else {
-                findOptions.excludeAccounts.forEach(function (acct) {
-                    if (!error && (!acct.id || window.isNaN(window.parseInt(acct.id, 10)))) {
-                        error = true;
-                    }
-                });
-            }
-        }
-    }
-    return !error;
-}
-
-function validateContactsPickerFilter(filter) {
-    var isValid = true,
-        availableFields = {};
-
-    if (typeof(filter) === "undefined") {
-        isValid = false;
-    } else {
-        if (filter && Array.isArray(filter)) {
-            availableFields = contactConsts.getKindAttributeMap();
-            filter.forEach(function (e) {
-                isValid = isValid && Object.getOwnPropertyNames(availableFields).reduce(
-                    function (found, key) {
-                        return found || availableFields[key] === e;
-                    }, false);
-            });
-        }
-    }
-
-    return isValid;
-}
-
-function validateContactsPickerOptions(options) {
-    var isValid = false,
-        mode = options.mode;
-
-    if (typeof(options) === "undefined") {
-        isValid = false;
-    } else {
-        isValid = mode === ContactPickerOptions.MODE_SINGLE || mode === ContactPickerOptions.MODE_MULTIPLE || mode === ContactPickerOptions.MODE_ATTRIBUTE;
-
-        // if mode is attribute, fields must be defined
-        if (mode === ContactPickerOptions.MODE_ATTRIBUTE && !validateContactsPickerFilter(options.fields)) {
-            isValid = false;
-        }
-    }
-
-    return isValid;
-}
-
-self = module.exports = {
-    populateContact: function (contact) {
-        if (contact.name) {
-            contact.name = new ContactName(contact.name);
-        }
-
-        populateFieldArray(contact, "addresses", ContactAddress);
-        populateFieldArray(contact, "organizations", ContactOrganization);
-        populateFieldArray(contact, "emails", ContactField);
-        populateFieldArray(contact, "phoneNumbers", ContactField);
-        populateFieldArray(contact, "faxNumbers", ContactField);
-        populateFieldArray(contact, "pagerNumbers", ContactField);
-        populateFieldArray(contact, "ims", ContactField);
-        populateFieldArray(contact, "socialNetworks", ContactField);
-        populateFieldArray(contact, "urls", ContactField);
-        populateFieldArray(contact, "photos", ContactPhoto);
-        populateFieldArray(contact, "news", ContactNews);
-        populateFieldArray(contact, "activities", ContactActivity);
-        // TODO categories
-
-        populateDate(contact, "birthday");
-        populateDate(contact, "anniversary");
-    },
-    invokeErrorCallback: function (errorCallback, code) {
-        if (errorCallback) {
-            errorCallback(new ContactError(code));
-        }
-    },
-    validateFindArguments: validateFindArguments,
-    validateContactsPickerFilter: validateContactsPickerFilter,
-    validateContactsPickerOptions: validateContactsPickerOptions
-};
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/index.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/index.js b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/index.js
deleted file mode 100644
index 09a4bd2..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/index.js
+++ /dev/null
@@ -1,374 +0,0 @@
-/*
- * Copyright 2013 Research In Motion Limited.
- *
- * Licensed 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 pimContacts,
-    contactUtils = require("./contactUtils"),
-    contactConsts = require("./contactConsts"),
-    ContactError = require("./ContactError"),
-    ContactName = require("./ContactName"),
-    ContactFindOptions = require("./ContactFindOptions"),
-    noop = function () {};
-
-function getAccountFilters(options) {
-    if (options.includeAccounts) {
-        options.includeAccounts = options.includeAccounts.map(function (acct) {
-            return acct.id.toString();
-        });
-    }
-
-    if (options.excludeAccounts) {
-        options.excludeAccounts = options.excludeAccounts.map(function (acct) {
-            return acct.id.toString();
-        });
-    }
-}
-
-function populateSearchFields(fields) {
-    var i,
-        l,
-        key,
-        searchFieldsObject = {},
-        searchFields = [];
-
-    for (i = 0, l = fields.length; i < l; i++) {
-        if (fields[i] === "*") {
-            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_GIVEN_NAME] = true;
-            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_FAMILY_NAME] = true;
-            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_PHONE] = true;
-            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_EMAIL] = true;
-            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_ORGANIZATION_NAME] = true;
-        } else if (fields[i] === "displayName" || fields[i] === "name") {
-            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_GIVEN_NAME] = true;
-            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_FAMILY_NAME] = true;
-        } else if (fields[i] === "nickname") {
-            // not supported by Cascades
-        } else if (fields[i] === "phoneNumbers") {
-            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_PHONE] = true;
-        } else if (fields[i] === "emails") {
-            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_EMAIL] = true;
-        } else if (field === "addresses") {
-            // not supported by Cascades
-        } else if (field === "ims") {
-            // not supported by Cascades
-        } else if (field === "organizations") {
-            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_ORGANIZATION_NAME] = true;
-        } else if (field === "birthday") {
-            // not supported by Cascades
-        } else if (field === "note") {
-            // not supported by Cascades
-        } else if (field === "photos") {
-            // not supported by Cascades
-        } else if (field === "categories") {
-            // not supported by Cascades
-        } else if (field === "urls") {
-            // not supported by Cascades
-        }
-    }
-
-    for (key in searchFieldsObject) {
-        if (searchFieldsObject.hasOwnProperty(key)) {
-            searchFields.push(window.parseInt(key));
-        }
-    }
-
-    return searchFields;
-}
-
-function convertBirthday(birthday) {
-    //Convert date string from native to milliseconds since epoch for cordova-js
-    var birthdayInfo;
-    if (birthday) {
-        birthdayInfo = birthday.split("-");
-        return new Date(birthdayInfo[0], birthdayInfo[1] - 1, birthdayInfo[2]).getTime();
-    } else {
-        return null;
-    }
-}
-
-function processJnextSaveData(result, JnextData) {
-    var data = JnextData,
-        birthdayInfo;
-
-    if (data._success === true) {
-        data.birthday = convertBirthday(data.birthday);
-        result.callbackOk(data, false);
-    } else {
-        result.callbackError(data.code, false);
-    }
-}
-
-function processJnextRemoveData(result, JnextData) {
-    var data = JnextData;
-
-    if (data._success === true) {
-        result.callbackOk(data);
-    } else {
-        result.callbackError(ContactError.UNKNOWN_ERROR, false);
-    }
-}
-
-function processJnextFindData(eventId, eventHandler, JnextData) {
-    var data = JnextData,
-        i,
-        l,
-        more = false,
-        resultsObject = {},
-        birthdayInfo;
-
-    if (data.contacts) {
-        for (i = 0, l = data.contacts.length; i < l; i++) {
-            data.contacts[i].birthday = convertBirthday(data.contacts[i].birthday);
-            data.contacts[i].name = new ContactName(data.contacts[i].name);
-        }
-    } else {
-        data.contacts = []; // if JnextData.contacts return null, return an empty array
-    }
-
-    if (data._success === true) {
-        eventHandler.error = false;
-    }
-
-    if (eventHandler.multiple) {
-        // Concatenate results; do not add the same contacts
-        for (i = 0, l = eventHandler.searchResult.length; i < l; i++) {
-            resultsObject[eventHandler.searchResult[i].id] = true;
-        }
-
-        for (i = 0, l = data.contacts.length; i < l; i++) {
-            if (resultsObject[data.contacts[i].id]) {
-                // Already existing
-            } else {
-                eventHandler.searchResult.push(data.contacts[i]);
-            }
-        }
-
-        // check if more search is required
-        eventHandler.searchFieldIndex++;
-        if (eventHandler.searchFieldIndex < eventHandler.searchFields.length) {
-            more = true;
-        }
-    } else {
-        eventHandler.searchResult = data.contacts;
-    }
-
-    if (more) {
-        pimContacts.getInstance().invokeJnextSearch(eventId);
-    } else {
-        if (eventHandler.error) {
-            eventHandler.result.callbackError(data.code, false);
-        } else {
-            eventHandler.result.callbackOk(eventHandler.searchResult, false);
-        }
-    }
-}
-
-module.exports = {
-    search: function (successCb, failCb, args, env) {
-        var cordovaFindOptions = {},
-            result = new PluginResult(args, env),
-            key;
-
-        for (key in args) {
-            if (args.hasOwnProperty(key)) {
-                cordovaFindOptions[key] = JSON.parse(decodeURIComponent(args[key]));
-            }
-        }
-
-        pimContacts.getInstance().find(cordovaFindOptions, result, processJnextFindData);
-        result.noResult(true);
-    },
-    save: function (successCb, failCb, args, env) {
-        var attributes = {},
-            result = new PluginResult(args, env),
-            key,
-            nativeEmails = [];
-
-        attributes = JSON.parse(decodeURIComponent(args[0]));
-
-        //convert birthday format for our native .so file
-        if (attributes.birthday) {
-            attributes.birthday = new Date(attributes.birthday).toDateString();
-        }
-
-        if (attributes.emails) {
-            attributes.emails.forEach(function (email) {
-                if (email.value) {
-                    if (email.type) {
-                        nativeEmails.push({ "type" : email.type, "value" : email.value });
-                    } else {
-                        nativeEmails.push({ "type" : "home", "value" : email.value });
-                    }
-                }
-            });
-            attributes.emails = nativeEmails;
-        }
-
-        if (attributes.id !== null) {
-            attributes.id = window.parseInt(attributes.id);
-        }
-
-        attributes._eventId = result.callbackId;
-        pimContacts.getInstance().save(attributes, result, processJnextSaveData);
-        result.noResult(true);
-    },
-    remove: function (successCb, failCb, args, env) {
-        var result = new PluginResult(args, env),
-            attributes = {
-                "contactId": window.parseInt(JSON.parse(decodeURIComponent(args[0]))),
-                "_eventId": result.callbackId
-            };
-
-        if (!window.isNaN(attributes.contactId)) {
-            pimContacts.getInstance().remove(attributes, result, processJnextRemoveData);
-            result.noResult(true);
-        } else {
-            result.error(ContactError.UNKNOWN_ERROR);
-            result.noResult(false);
-        }
-    }
-};
-
-///////////////////////////////////////////////////////////////////
-// JavaScript wrapper for JNEXT plugin
-///////////////////////////////////////////////////////////////////
-
-JNEXT.PimContacts = function ()
-{
-    var self = this,
-        hasInstance = false;
-
-    self.find = function (cordovaFindOptions, pluginResult, handler) {
-        //register find eventHandler for when JNEXT onEvent fires
-        self.eventHandlers[cordovaFindOptions.callbackId] = {
-            "result" : pluginResult,
-            "action" : "find",
-            "multiple" : cordovaFindOptions[1].filter ? true : false,
-            "fields" : cordovaFindOptions[0],
-            "searchFilter" : cordovaFindOptions[1].filter,
-            "searchFields" : cordovaFindOptions[1].filter ? populateSearchFields(cordovaFindOptions[0]) : null,
-            "searchFieldIndex" : 0,
-            "searchResult" : [],
-            "handler" : handler,
-            "error" : true
-        };
-
-        self.invokeJnextSearch(cordovaFindOptions.callbackId);
-        return "";
-    };
-
-    self.invokeJnextSearch = function(eventId) {
-        var jnextArgs = {},
-            findHandler = self.eventHandlers[eventId];
-
-        jnextArgs._eventId = eventId;
-        jnextArgs.fields = findHandler.fields;
-        jnextArgs.options = {};
-        jnextArgs.options.filter = [];
-
-        if (findHandler.multiple) {
-            jnextArgs.options.filter.push({
-                "fieldName" : findHandler.searchFields[findHandler.searchFieldIndex],
-                "fieldValue" : findHandler.searchFilter
-            });
-            //findHandler.searchFieldIndex++;
-        }
-
-        JNEXT.invoke(self.m_id, "find " + JSON.stringify(jnextArgs));
-    }
-
-    self.getContact = function (args) {
-        return JSON.parse(JNEXT.invoke(self.m_id, "getContact " + JSON.stringify(args)));
-    };
-
-    self.save = function (args, pluginResult, handler) {
-        //register save eventHandler for when JNEXT onEvent fires
-        self.eventHandlers[args._eventId] = {
-            "result" : pluginResult,
-            "action" : "save",
-            "handler" : handler
-        };
-        JNEXT.invoke(self.m_id, "save " + JSON.stringify(args));
-        return "";
-    };
-
-    self.remove = function (args, pluginResult, handler) {
-        //register remove eventHandler for when JNEXT onEvent fires
-        self.eventHandlers[args._eventId] = {
-            "result" : pluginResult,
-            "action" : "remove",
-            "handler" : handler
-        };
-        JNEXT.invoke(self.m_id, "remove " + JSON.stringify(args));
-        return "";
-    };
-
-    self.getId = function () {
-        return self.m_id;
-    };
-
-    self.getContactAccounts = function () {
-        var value = JNEXT.invoke(self.m_id, "getContactAccounts");
-        return JSON.parse(value);
-    };
-
-    self.init = function () {
-        if (!JNEXT.require("libpimcontacts")) {
-            return false;
-        }
-
-        self.m_id = JNEXT.createObject("libpimcontacts.PimContacts");
-
-        if (self.m_id === "") {
-            return false;
-        }
-
-        JNEXT.registerEvents(self);
-    };
-
-    // Handle data coming back from JNEXT native layer. Each async function registers a handler and a PluginResult object.
-    // When JNEXT fires onEvent we parse the result string  back into JSON and trigger the appropriate handler (eventHandlers map
-    // uses callbackId as key), along with the actual data coming back from the native layer. Each function may have its own way of
-    // processing native data so we do not do any processing here.
-
-    self.onEvent = function (strData) {
-        var arData = strData.split(" "),
-            strEventDesc = arData[0],
-            eventHandler,
-            args = {};
-
-        if (strEventDesc === "result") {
-            args.result = escape(strData.split(" ").slice(2).join(" "));
-            eventHandler = self.eventHandlers[arData[1]];
-            if (eventHandler.action === "save" || eventHandler.action === "remove") {
-                eventHandler.handler(eventHandler.result, JSON.parse(decodeURIComponent(args.result)));
-            } else if (eventHandler.action === "find") {
-                eventHandler.handler(arData[1], eventHandler, JSON.parse(decodeURIComponent(args.result)));
-            }
-        }
-    };
-
-    self.m_id = "";
-    self.eventHandlers = {};
-
-    self.getInstance = function () {
-        if (!hasInstance) {
-            self.init();
-            hasInstance = true;
-        }
-        return self;
-    };
-};
-
-pimContacts = new JNEXT.PimContacts();

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/plugin.xml b/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/plugin.xml
deleted file mode 100644
index d163585..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/src/blackberry10/plugin.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed 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.
-
--->
-
-<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
-    id="org.apache.cordova.core.Contacts"
-    version="0.0.1">
-
-    <name>Contacts</name>
-
-    <platform name="blackberry10">
-        <config-file target="www/config.xml" parent="/widget">
-            <feature name="Contacts" value="Contacts"/>
-        </config-file>
-        <source-file src="src/blackberry10/index.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactActivity.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactAddress.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/contactConsts.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactError.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactField.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactFindOptions.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactName.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactNews.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactOrganization.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactPhoto.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/contactUtils.js" target-dir="Contacts"></source-file>
-      </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContact.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContact.h b/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContact.h
deleted file mode 100644
index 5187efc..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContact.h
+++ /dev/null
@@ -1,136 +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.
- */
-
-#import <Foundation/Foundation.h>
-#import <AddressBook/ABAddressBook.h>
-#import <AddressBookUI/AddressBookUI.h>
-
-enum CDVContactError {
-    UNKNOWN_ERROR = 0,
-    INVALID_ARGUMENT_ERROR = 1,
-    TIMEOUT_ERROR = 2,
-    PENDING_OPERATION_ERROR = 3,
-    IO_ERROR = 4,
-    NOT_SUPPORTED_ERROR = 5,
-    PERMISSION_DENIED_ERROR = 20
-};
-typedef NSUInteger CDVContactError;
-
-@interface CDVContact : NSObject {
-    ABRecordRef record;         // the ABRecord associated with this contact
-    NSDictionary* returnFields; // dictionary of fields to return when performing search
-}
-
-@property (nonatomic, assign) ABRecordRef record;
-@property (nonatomic, strong) NSDictionary* returnFields;
-
-+ (NSDictionary*)defaultABtoW3C;
-+ (NSDictionary*)defaultW3CtoAB;
-+ (NSSet*)defaultW3CtoNull;
-+ (NSDictionary*)defaultObjectAndProperties;
-+ (NSDictionary*)defaultFields;
-
-+ (NSDictionary*)calcReturnFields:(NSArray*)fields;
-- (id)init;
-- (id)initFromABRecord:(ABRecordRef)aRecord;
-- (bool)setFromContactDict:(NSDictionary*)aContact asUpdate:(BOOL)bUpdate;
-
-+ (BOOL)needsConversion:(NSString*)W3Label;
-+ (CFStringRef)convertContactTypeToPropertyLabel:(NSString*)label;
-+ (NSString*)convertPropertyLabelToContactType:(NSString*)label;
-+ (BOOL)isValidW3ContactType:(NSString*)label;
-- (bool)setValue:(id)aValue forProperty:(ABPropertyID)aProperty inRecord:(ABRecordRef)aRecord asUpdate:(BOOL)bUpdate;
-
-- (NSDictionary*)toDictionary:(NSDictionary*)withFields;
-- (NSNumber*)getDateAsNumber:(ABPropertyID)datePropId;
-- (NSObject*)extractName;
-- (NSObject*)extractMultiValue:(NSString*)propertyId;
-- (NSObject*)extractAddresses;
-- (NSObject*)extractIms;
-- (NSObject*)extractOrganizations;
-- (NSObject*)extractPhotos;
-
-- (NSMutableDictionary*)translateW3Dict:(NSDictionary*)dict forProperty:(ABPropertyID)prop;
-- (bool)setMultiValueStrings:(NSArray*)fieldArray forProperty:(ABPropertyID)prop inRecord:(ABRecordRef)person asUpdate:(BOOL)bUpdate;
-- (bool)setMultiValueDictionary:(NSArray*)array forProperty:(ABPropertyID)prop inRecord:(ABRecordRef)person asUpdate:(BOOL)bUpdate;
-- (ABMultiValueRef)allocStringMultiValueFromArray:array;
-- (ABMultiValueRef)allocDictMultiValueFromArray:array forProperty:(ABPropertyID)prop;
-- (BOOL)foundValue:(NSString*)testValue inFields:(NSDictionary*)searchFields;
-- (BOOL)testStringValue:(NSString*)testValue forW3CProperty:(NSString*)property;
-- (BOOL)testDateValue:(NSString*)testValue forW3CProperty:(NSString*)property;
-- (BOOL)searchContactFields:(NSArray*)fields forMVStringProperty:(ABPropertyID)propId withValue:testValue;
-- (BOOL)testMultiValueStrings:(NSString*)testValue forProperty:(ABPropertyID)propId ofType:(NSString*)type;
-- (NSArray*)valuesForProperty:(ABPropertyID)propId inRecord:(ABRecordRef)aRecord;
-- (NSArray*)labelsForProperty:(ABPropertyID)propId inRecord:(ABRecordRef)aRecord;
-- (BOOL)searchContactFields:(NSArray*)fields forMVDictionaryProperty:(ABPropertyID)propId withValue:(NSString*)testValue;
-
-@end
-
-// generic ContactField types
-#define kW3ContactFieldType @"type"
-#define kW3ContactFieldValue @"value"
-#define kW3ContactFieldPrimary @"pref"
-// Various labels for ContactField types
-#define kW3ContactWorkLabel @"work"
-#define kW3ContactHomeLabel @"home"
-#define kW3ContactOtherLabel @"other"
-#define kW3ContactPhoneFaxLabel @"fax"
-#define kW3ContactPhoneMobileLabel @"mobile"
-#define kW3ContactPhonePagerLabel @"pager"
-#define kW3ContactUrlBlog @"blog"
-#define kW3ContactUrlProfile @"profile"
-#define kW3ContactImAIMLabel @"aim"
-#define kW3ContactImICQLabel @"icq"
-#define kW3ContactImMSNLabel @"msn"
-#define kW3ContactImYahooLabel @"yahoo"
-#define kW3ContactFieldId @"id"
-// special translation for IM field value and type
-#define kW3ContactImType @"type"
-#define kW3ContactImValue @"value"
-
-// Contact object
-#define kW3ContactId @"id"
-#define kW3ContactName @"name"
-#define kW3ContactFormattedName @"formatted"
-#define kW3ContactGivenName @"givenName"
-#define kW3ContactFamilyName @"familyName"
-#define kW3ContactMiddleName @"middleName"
-#define kW3ContactHonorificPrefix @"honorificPrefix"
-#define kW3ContactHonorificSuffix @"honorificSuffix"
-#define kW3ContactDisplayName @"displayName"
-#define kW3ContactNickname @"nickname"
-#define kW3ContactPhoneNumbers @"phoneNumbers"
-#define kW3ContactAddresses @"addresses"
-#define kW3ContactAddressFormatted @"formatted"
-#define kW3ContactStreetAddress @"streetAddress"
-#define kW3ContactLocality @"locality"
-#define kW3ContactRegion @"region"
-#define kW3ContactPostalCode @"postalCode"
-#define kW3ContactCountry @"country"
-#define kW3ContactEmails @"emails"
-#define kW3ContactIms @"ims"
-#define kW3ContactOrganizations @"organizations"
-#define kW3ContactOrganizationName @"name"
-#define kW3ContactTitle @"title"
-#define kW3ContactDepartment @"department"
-#define kW3ContactBirthday @"birthday"
-#define kW3ContactNote @"note"
-#define kW3ContactPhotos @"photos"
-#define kW3ContactCategories @"categories"
-#define kW3ContactUrls @"urls"


[36/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_reader.cpp
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_reader.cpp b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_reader.cpp
new file mode 100644
index 0000000..750088c
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_reader.cpp
@@ -0,0 +1,894 @@
+#include <json/reader.h>
+#include <json/value.h>
+#include <utility>
+#include <cstdio>
+#include <cassert>
+#include <cstring>
+#include <iostream>
+#include <stdexcept>
+
+#if _MSC_VER >= 1400 // VC++ 8.0
+#pragma warning( disable : 4996 )   // disable warning about strdup being deprecated.
+#endif
+
+namespace Json {
+
+// QNX is strict about declaring C symbols in the std namespace.
+#ifdef __QNXNTO__
+using std::memcpy;
+using std::sprintf;
+using std::sscanf;
+#endif
+
+// Implementation of class Features
+// ////////////////////////////////
+
+Features::Features()
+   : allowComments_( true )
+   , strictRoot_( false )
+{
+}
+
+
+Features 
+Features::all()
+{
+   return Features();
+}
+
+
+Features 
+Features::strictMode()
+{
+   Features features;
+   features.allowComments_ = false;
+   features.strictRoot_ = true;
+   return features;
+}
+
+// Implementation of class Reader
+// ////////////////////////////////
+
+
+static inline bool 
+in( Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4 )
+{
+   return c == c1  ||  c == c2  ||  c == c3  ||  c == c4;
+}
+
+static inline bool 
+in( Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4, Reader::Char c5 )
+{
+   return c == c1  ||  c == c2  ||  c == c3  ||  c == c4  ||  c == c5;
+}
+
+
+static bool 
+containsNewLine( Reader::Location begin, 
+                 Reader::Location end )
+{
+   for ( ;begin < end; ++begin )
+      if ( *begin == '\n'  ||  *begin == '\r' )
+         return true;
+   return false;
+}
+
+static std::string codePointToUTF8(unsigned int cp)
+{
+   std::string result;
+   
+   // based on description from http://en.wikipedia.org/wiki/UTF-8
+
+   if (cp <= 0x7f) 
+   {
+      result.resize(1);
+      result[0] = static_cast<char>(cp);
+   } 
+   else if (cp <= 0x7FF) 
+   {
+      result.resize(2);
+      result[1] = static_cast<char>(0x80 | (0x3f & cp));
+      result[0] = static_cast<char>(0xC0 | (0x1f & (cp >> 6)));
+   } 
+   else if (cp <= 0xFFFF) 
+   {
+      result.resize(3);
+      result[2] = static_cast<char>(0x80 | (0x3f & cp));
+      result[1] = 0x80 | static_cast<char>((0x3f & (cp >> 6)));
+      result[0] = 0xE0 | static_cast<char>((0xf & (cp >> 12)));
+   }
+   else if (cp <= 0x10FFFF) 
+   {
+      result.resize(4);
+      result[3] = static_cast<char>(0x80 | (0x3f & cp));
+      result[2] = static_cast<char>(0x80 | (0x3f & (cp >> 6)));
+      result[1] = static_cast<char>(0x80 | (0x3f & (cp >> 12)));
+      result[0] = static_cast<char>(0xF0 | (0x7 & (cp >> 18)));
+   }
+
+   return result;
+}
+
+
+// Class Reader
+// //////////////////////////////////////////////////////////////////
+
+Reader::Reader()
+   : features_( Features::all() )
+{
+}
+
+
+Reader::Reader( const Features &features )
+   : features_( features )
+{
+}
+
+
+bool
+Reader::parse( const std::string &document, 
+               Value &root,
+               bool collectComments )
+{
+   document_ = document;
+   const char *begin = document_.c_str();
+   const char *end = begin + document_.length();
+   return parse( begin, end, root, collectComments );
+}
+
+
+bool
+Reader::parse( std::istream& sin,
+               Value &root,
+               bool collectComments )
+{
+   //std::istream_iterator<char> begin(sin);
+   //std::istream_iterator<char> end;
+   // Those would allow streamed input from a file, if parse() were a
+   // template function.
+
+   // Since std::string is reference-counted, this at least does not
+   // create an extra copy.
+   std::string doc;
+   std::getline(sin, doc, (char)EOF);
+   return parse( doc, root, collectComments );
+}
+
+bool 
+Reader::parse( const char *beginDoc, const char *endDoc, 
+               Value &root,
+               bool collectComments )
+{
+   if ( !features_.allowComments_ )
+   {
+      collectComments = false;
+   }
+
+   begin_ = beginDoc;
+   end_ = endDoc;
+   collectComments_ = collectComments;
+   current_ = begin_;
+   lastValueEnd_ = 0;
+   lastValue_ = 0;
+   commentsBefore_ = "";
+   errors_.clear();
+   while ( !nodes_.empty() )
+      nodes_.pop();
+   nodes_.push( &root );
+   
+   bool successful = readValue();
+   Token token;
+   skipCommentTokens( token );
+   if ( collectComments_  &&  !commentsBefore_.empty() )
+      root.setComment( commentsBefore_, commentAfter );
+   if ( features_.strictRoot_ )
+   {
+      if ( !root.isArray()  &&  !root.isObject() )
+      {
+         // Set error location to start of doc, ideally should be first token found in doc
+         token.type_ = tokenError;
+         token.start_ = beginDoc;
+         token.end_ = endDoc;
+         addError( "A valid JSON document must be either an array or an object value.",
+                   token );
+         return false;
+      }
+   }
+   return successful;
+}
+
+
+bool
+Reader::readValue()
+{
+   Token token;
+   skipCommentTokens( token );
+   bool successful = true;
+
+   if ( collectComments_  &&  !commentsBefore_.empty() )
+   {
+      currentValue().setComment( commentsBefore_, commentBefore );
+      commentsBefore_ = "";
+   }
+
+
+   switch ( token.type_ )
+   {
+   case tokenObjectBegin:
+      successful = readObject( token );
+      break;
+   case tokenArrayBegin:
+      successful = readArray( token );
+      break;
+   case tokenNumber:
+      successful = decodeNumber( token );
+      break;
+   case tokenString:
+      successful = decodeString( token );
+      break;
+   case tokenTrue:
+      currentValue() = true;
+      break;
+   case tokenFalse:
+      currentValue() = false;
+      break;
+   case tokenNull:
+      currentValue() = Value();
+      break;
+   default:
+      return addError( "Syntax error: value, object or array expected.", token );
+   }
+
+   if ( collectComments_ )
+   {
+      lastValueEnd_ = current_;
+      lastValue_ = &currentValue();
+   }
+
+   return successful;
+}
+
+
+void 
+Reader::skipCommentTokens( Token &token )
+{
+   if ( features_.allowComments_ )
+   {
+      do
+      {
+         readToken( token );
+      }
+      while ( token.type_ == tokenComment );
+   }
+   else
+   {
+      readToken( token );
+   }
+}
+
+
+bool 
+Reader::expectToken( TokenType type, Token &token, const char *message )
+{
+   readToken( token );
+   if ( token.type_ != type )
+      return addError( message, token );
+   return true;
+}
+
+
+bool 
+Reader::readToken( Token &token )
+{
+   skipSpaces();
+   token.start_ = current_;
+   Char c = getNextChar();
+   bool ok = true;
+   switch ( c )
+   {
+   case '{':
+      token.type_ = tokenObjectBegin;
+      break;
+   case '}':
+      token.type_ = tokenObjectEnd;
+      break;
+   case '[':
+      token.type_ = tokenArrayBegin;
+      break;
+   case ']':
+      token.type_ = tokenArrayEnd;
+      break;
+   case '"':
+      token.type_ = tokenString;
+      ok = readString();
+      break;
+   case '/':
+      token.type_ = tokenComment;
+      ok = readComment();
+      break;
+   case '0':
+   case '1':
+   case '2':
+   case '3':
+   case '4':
+   case '5':
+   case '6':
+   case '7':
+   case '8':
+   case '9':
+   case '-':
+      token.type_ = tokenNumber;
+      readNumber();
+      break;
+   case 't':
+      token.type_ = tokenTrue;
+      ok = match( "rue", 3 );
+      break;
+   case 'f':
+      token.type_ = tokenFalse;
+      ok = match( "alse", 4 );
+      break;
+   case 'n':
+      token.type_ = tokenNull;
+      ok = match( "ull", 3 );
+      break;
+   case ',':
+      token.type_ = tokenArraySeparator;
+      break;
+   case ':':
+      token.type_ = tokenMemberSeparator;
+      break;
+   case 0:
+      token.type_ = tokenEndOfStream;
+      break;
+   default:
+      ok = false;
+      break;
+   }
+   if ( !ok )
+      token.type_ = tokenError;
+   token.end_ = current_;
+   return true;
+}
+
+
+void 
+Reader::skipSpaces()
+{
+   while ( current_ != end_ )
+   {
+      Char c = *current_;
+      if ( c == ' '  ||  c == '\t'  ||  c == '\r'  ||  c == '\n' )
+         ++current_;
+      else
+         break;
+   }
+}
+
+
+bool 
+Reader::match( Location pattern, 
+               int patternLength )
+{
+   if ( end_ - current_ < patternLength )
+      return false;
+   int index = patternLength;
+   while ( index-- )
+      if ( current_[index] != pattern[index] )
+         return false;
+   current_ += patternLength;
+   return true;
+}
+
+
+bool
+Reader::readComment()
+{
+   Location commentBegin = current_ - 1;
+   Char c = getNextChar();
+   bool successful = false;
+   if ( c == '*' )
+      successful = readCStyleComment();
+   else if ( c == '/' )
+      successful = readCppStyleComment();
+   if ( !successful )
+      return false;
+
+   if ( collectComments_ )
+   {
+      CommentPlacement placement = commentBefore;
+      if ( lastValueEnd_  &&  !containsNewLine( lastValueEnd_, commentBegin ) )
+      {
+         if ( c != '*'  ||  !containsNewLine( commentBegin, current_ ) )
+            placement = commentAfterOnSameLine;
+      }
+
+      addComment( commentBegin, current_, placement );
+   }
+   return true;
+}
+
+
+void 
+Reader::addComment( Location begin, 
+                    Location end, 
+                    CommentPlacement placement )
+{
+   assert( collectComments_ );
+   if ( placement == commentAfterOnSameLine )
+   {
+      assert( lastValue_ != 0 );
+      lastValue_->setComment( std::string( begin, end ), placement );
+   }
+   else
+   {
+      if ( !commentsBefore_.empty() )
+         commentsBefore_ += "\n";
+      commentsBefore_ += std::string( begin, end );
+   }
+}
+
+
+bool 
+Reader::readCStyleComment()
+{
+   while ( current_ != end_ )
+   {
+      Char c = getNextChar();
+      if ( c == '*'  &&  *current_ == '/' )
+         break;
+   }
+   return getNextChar() == '/';
+}
+
+
+bool 
+Reader::readCppStyleComment()
+{
+   while ( current_ != end_ )
+   {
+      Char c = getNextChar();
+      if (  c == '\r'  ||  c == '\n' )
+         break;
+   }
+   return true;
+}
+
+
+void 
+Reader::readNumber()
+{
+   while ( current_ != end_ )
+   {
+      if ( !(*current_ >= '0'  &&  *current_ <= '9')  &&
+           !in( *current_, '.', 'e', 'E', '+', '-' ) )
+         break;
+      ++current_;
+   }
+}
+
+bool
+Reader::readString()
+{
+   Char c = 0;
+   while ( current_ != end_ )
+   {
+      c = getNextChar();
+      if ( c == '\\' )
+         getNextChar();
+      else if ( c == '"' )
+         break;
+   }
+   return c == '"';
+}
+
+
+bool 
+Reader::readObject( Token &tokenStart )
+{
+   Token tokenName;
+   Token something = tokenStart;
+   std::string name;
+   currentValue() = Value( objectValue );
+   while ( readToken( tokenName ) )
+   {
+      bool initialTokenOk = true;
+      while ( tokenName.type_ == tokenComment  &&  initialTokenOk )
+         initialTokenOk = readToken( tokenName );
+      if  ( !initialTokenOk )
+         break;
+      if ( tokenName.type_ == tokenObjectEnd  &&  name.empty() )  // empty object
+         return true;
+      if ( tokenName.type_ != tokenString )
+         break;
+      
+      name = "";
+      if ( !decodeString( tokenName, name ) )
+         return recoverFromError( tokenObjectEnd );
+
+      Token colon;
+      if ( !readToken( colon ) ||  colon.type_ != tokenMemberSeparator )
+      {
+         return addErrorAndRecover( "Missing ':' after object member name", 
+                                    colon, 
+                                    tokenObjectEnd );
+      }
+      Value &value = currentValue()[ name ];
+      nodes_.push( &value );
+      bool ok = readValue();
+      nodes_.pop();
+      if ( !ok ) // error already set
+         return recoverFromError( tokenObjectEnd );
+
+      Token comma;
+      if ( !readToken( comma )
+            ||  ( comma.type_ != tokenObjectEnd  &&  
+                  comma.type_ != tokenArraySeparator &&
+		  comma.type_ != tokenComment ) )
+      {
+         return addErrorAndRecover( "Missing ',' or '}' in object declaration", 
+                                    comma, 
+                                    tokenObjectEnd );
+      }
+      bool finalizeTokenOk = true;
+      while ( comma.type_ == tokenComment &&
+              finalizeTokenOk )
+         finalizeTokenOk = readToken( comma );
+      if ( comma.type_ == tokenObjectEnd )
+         return true;
+   }
+   return addErrorAndRecover( "Missing '}' or object member name", 
+                              tokenName, 
+                              tokenObjectEnd );
+}
+
+
+bool 
+Reader::readArray( Token &tokenStart )
+{
+   Token something = tokenStart;
+   currentValue() = Value( arrayValue );
+   skipSpaces();
+   if ( *current_ == ']' ) // empty array
+   {
+      Token endArray;
+      readToken( endArray );
+      return true;
+   }
+   int index = 0;
+   while ( true )
+   {
+      Value &value = currentValue()[ index++ ];
+      nodes_.push( &value );
+      bool ok = readValue();
+      nodes_.pop();
+      if ( !ok ) // error already set
+         return recoverFromError( tokenArrayEnd );
+
+      Token token;
+      // Accept Comment after last item in the array.
+      ok = readToken( token );
+      while ( token.type_ == tokenComment  &&  ok )
+      {
+         ok = readToken( token );
+      }
+      bool badTokenType = ( token.type_ == tokenArraySeparator  &&  
+                            token.type_ == tokenArrayEnd );
+      if ( !ok  ||  badTokenType )
+      {
+         return addErrorAndRecover( "Missing ',' or ']' in array declaration", 
+                                    token, 
+                                    tokenArrayEnd );
+      }
+      if ( token.type_ == tokenArrayEnd )
+         break;
+   }
+   return true;
+}
+
+
+bool 
+Reader::decodeNumber( Token &token )
+{
+   bool isDouble = false;
+   for ( Location inspect = token.start_; inspect != token.end_; ++inspect )
+   {
+      isDouble = isDouble  
+                 ||  in( *inspect, '.', 'e', 'E', '+' )  
+                 ||  ( *inspect == '-'  &&  inspect != token.start_ );
+   }
+   if ( isDouble )
+      return decodeDouble( token );
+   Location current = token.start_;
+   bool isNegative = *current == '-';
+   if ( isNegative )
+      ++current;
+   Value::UInt threshold = (isNegative ? Value::UInt(-Value::minInt) 
+                                       : Value::maxUInt) / 10;
+   Value::UInt value = 0;
+   while ( current < token.end_ )
+   {
+      Char c = *current++;
+      if ( c < '0'  ||  c > '9' )
+         return addError( "'" + std::string( token.start_, token.end_ ) + "' is not a number.", token );
+      if ( value >= threshold )
+         return decodeDouble( token );
+      value = value * 10 + Value::UInt(c - '0');
+   }
+   if ( isNegative )
+      currentValue() = -Value::Int( value );
+   else if ( value <= Value::UInt(Value::maxInt) )
+      currentValue() = Value::Int( value );
+   else
+      currentValue() = value;
+   return true;
+}
+
+
+bool 
+Reader::decodeDouble( Token &token )
+{
+   double value = 0;
+   const int bufferSize = 32;
+   int count;
+   int length = int(token.end_ - token.start_);
+   if ( length <= bufferSize )
+   {
+      Char buffer[bufferSize];
+      memcpy( buffer, token.start_, length );
+      buffer[length] = 0;
+      count = sscanf( buffer, "%lf", &value );
+   }
+   else
+   {
+      std::string buffer( token.start_, token.end_ );
+      count = sscanf( buffer.c_str(), "%lf", &value );
+   }
+
+   if ( count != 1 )
+      return addError( "'" + std::string( token.start_, token.end_ ) + "' is not a number.", token );
+   currentValue() = value;
+   return true;
+}
+
+
+bool 
+Reader::decodeString( Token &token )
+{
+   std::string decoded;
+   if ( !decodeString( token, decoded ) )
+      return false;
+   currentValue() = decoded;
+   return true;
+}
+
+
+bool 
+Reader::decodeString( Token &token, std::string &decoded )
+{
+   decoded.reserve( token.end_ - token.start_ - 2 );
+   Location current = token.start_ + 1; // skip '"'
+   Location end = token.end_ - 1;      // do not include '"'
+   while ( current != end )
+   {
+      Char c = *current++;
+      if ( c == '"' )
+         break;
+      else if ( c == '\\' )
+      {
+         if ( current == end )
+            return addError( "Empty escape sequence in string", token, current );
+         Char escape = *current++;
+         switch ( escape )
+         {
+         case '"': decoded += '"'; break;
+         case '/': decoded += '/'; break;
+         case '\\': decoded += '\\'; break;
+         case 'b': decoded += '\b'; break;
+         case 'f': decoded += '\f'; break;
+         case 'n': decoded += '\n'; break;
+         case 'r': decoded += '\r'; break;
+         case 't': decoded += '\t'; break;
+         case 'u':
+            {
+               unsigned int unicode;
+               if ( !decodeUnicodeCodePoint( token, current, end, unicode ) )
+                  return false;
+               decoded += codePointToUTF8(unicode);
+            }
+            break;
+         default:
+            return addError( "Bad escape sequence in string", token, current );
+         }
+      }
+      else
+      {
+         decoded += c;
+      }
+   }
+   return true;
+}
+
+bool
+Reader::decodeUnicodeCodePoint( Token &token, 
+                                     Location &current, 
+                                     Location end, 
+                                     unsigned int &unicode )
+{
+
+   if ( !decodeUnicodeEscapeSequence( token, current, end, unicode ) )
+      return false;
+   if (unicode >= 0xD800 && unicode <= 0xDBFF)
+   {
+      // surrogate pairs
+      if (end - current < 6)
+         return addError( "additional six characters expected to parse unicode surrogate pair.", token, current );
+      unsigned int surrogatePair;
+      if (*(current++) == '\\' && *(current++)== 'u')
+      {
+         if (decodeUnicodeEscapeSequence( token, current, end, surrogatePair ))
+         {
+            unicode = 0x10000 + ((unicode & 0x3FF) << 10) + (surrogatePair & 0x3FF);
+         } 
+         else
+            return false;
+      } 
+      else
+         return addError( "expecting another \\u token to begin the second half of a unicode surrogate pair", token, current );
+   }
+   return true;
+}
+
+bool 
+Reader::decodeUnicodeEscapeSequence( Token &token, 
+                                     Location &current, 
+                                     Location end, 
+                                     unsigned int &unicode )
+{
+   if ( end - current < 4 )
+      return addError( "Bad unicode escape sequence in string: four digits expected.", token, current );
+   unicode = 0;
+   for ( int index =0; index < 4; ++index )
+   {
+      Char c = *current++;
+      unicode *= 16;
+      if ( c >= '0'  &&  c <= '9' )
+         unicode += c - '0';
+      else if ( c >= 'a'  &&  c <= 'f' )
+         unicode += c - 'a' + 10;
+      else if ( c >= 'A'  &&  c <= 'F' )
+         unicode += c - 'A' + 10;
+      else
+         return addError( "Bad unicode escape sequence in string: hexadecimal digit expected.", token, current );
+   }
+   return true;
+}
+
+
+bool 
+Reader::addError( const std::string &message, 
+                  Token &token,
+                  Location extra )
+{
+   ErrorInfo info;
+   info.token_ = token;
+   info.message_ = message;
+   info.extra_ = extra;
+   errors_.push_back( info );
+   return false;
+}
+
+
+bool 
+Reader::recoverFromError( TokenType skipUntilToken )
+{
+   int errorCount = int(errors_.size());
+   Token skip;
+   while ( true )
+   {
+      if ( !readToken(skip) )
+         errors_.resize( errorCount ); // discard errors caused by recovery
+      if ( skip.type_ == skipUntilToken  ||  skip.type_ == tokenEndOfStream )
+         break;
+   }
+   errors_.resize( errorCount );
+   return false;
+}
+
+
+bool 
+Reader::addErrorAndRecover( const std::string &message, 
+                            Token &token,
+                            TokenType skipUntilToken )
+{
+   addError( message, token );
+   return recoverFromError( skipUntilToken );
+}
+
+
+Value &
+Reader::currentValue()
+{
+   return *(nodes_.top());
+}
+
+
+Reader::Char 
+Reader::getNextChar()
+{
+   if ( current_ == end_ )
+      return 0;
+   return *current_++;
+}
+
+
+void 
+Reader::getLocationLineAndColumn( Location location,
+                                  int &line,
+                                  int &column ) const
+{
+   Location current = begin_;
+   Location lastLineStart = current;
+   line = 0;
+   while ( current < location  &&  current != end_ )
+   {
+      Char c = *current++;
+      if ( c == '\r' )
+      {
+         if ( *current == '\n' )
+            ++current;
+         lastLineStart = current;
+         ++line;
+      }
+      else if ( c == '\n' )
+      {
+         lastLineStart = current;
+         ++line;
+      }
+   }
+   // column & line start at 1
+   column = int(location - lastLineStart) + 1;
+   ++line;
+}
+
+
+std::string
+Reader::getLocationLineAndColumn( Location location ) const
+{
+   int line, column;
+   getLocationLineAndColumn( location, line, column );
+   char buffer[18+16+16+1];
+   sprintf( buffer, "Line %d, Column %d", line, column );
+   return buffer;
+}
+
+
+std::string 
+Reader::getFormatedErrorMessages() const
+{
+   std::string formattedMessage;
+   for ( Errors::const_iterator itError = errors_.begin();
+         itError != errors_.end();
+         ++itError )
+   {
+      const ErrorInfo &error = *itError;
+      formattedMessage += "* " + getLocationLineAndColumn( error.token_.start_ ) + "\n";
+      formattedMessage += "  " + error.message_ + "\n";
+      if ( error.extra_ )
+         formattedMessage += "See " + getLocationLineAndColumn( error.extra_ ) + " for detail.\n";
+   }
+   return formattedMessage;
+}
+
+
+std::istream& operator>>( std::istream &sin, Value &root )
+{
+    Json::Reader reader;
+    bool ok = reader.parse(sin, root, true);
+    //JSON_ASSERT( ok );
+    if (!ok) throw std::runtime_error(reader.getFormatedErrorMessages());
+    return sin;
+}
+
+
+} // namespace Json

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_value.cpp
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_value.cpp b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_value.cpp
new file mode 100644
index 0000000..67638ca
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_value.cpp
@@ -0,0 +1,1726 @@
+#include <iostream>
+#include <json/value.h>
+#include <json/writer.h>
+#include <utility>
+#include <stdexcept>
+#include <cstring>
+#include <cassert>
+#ifdef JSON_USE_CPPTL
+# include <cpptl/conststring.h>
+#endif
+#include <cstddef>    // size_t
+#ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
+# include "json_batchallocator.h"
+#endif // #ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
+
+#define JSON_ASSERT_UNREACHABLE assert( false )
+#define JSON_ASSERT( condition ) assert( condition );  // @todo <= change this into an exception throw
+#define JSON_ASSERT_MESSAGE( condition, message ) if (!( condition )) throw std::runtime_error( message );
+
+namespace Json {
+
+// QNX is strict about declaring C symbols in the std namespace.
+#ifdef __QNXNTO__
+using std::memcpy;
+using std::strchr;
+using std::strcmp;
+using std::strlen;
+#endif
+
+const Value Value::null;
+const Int Value::minInt = Int( ~(UInt(-1)/2) );
+const Int Value::maxInt = Int( UInt(-1)/2 );
+const UInt Value::maxUInt = UInt(-1);
+
+// A "safe" implementation of strdup. Allow null pointer to be passed. 
+// Also avoid warning on msvc80.
+//
+//inline char *safeStringDup( const char *czstring )
+//{
+//   if ( czstring )
+//   {
+//      const size_t length = (unsigned int)( strlen(czstring) + 1 );
+//      char *newString = static_cast<char *>( malloc( length ) );
+//      memcpy( newString, czstring, length );
+//      return newString;
+//   }
+//   return 0;
+//}
+//
+//inline char *safeStringDup( const std::string &str )
+//{
+//   if ( !str.empty() )
+//   {
+//      const size_t length = str.length();
+//      char *newString = static_cast<char *>( malloc( length + 1 ) );
+//      memcpy( newString, str.c_str(), length );
+//      newString[length] = 0;
+//      return newString;
+//   }
+//   return 0;
+//}
+
+ValueAllocator::~ValueAllocator()
+{
+}
+
+class DefaultValueAllocator : public ValueAllocator
+{
+public:
+   virtual ~DefaultValueAllocator()
+   {
+   }
+
+   virtual char *makeMemberName( const char *memberName )
+   {
+      return duplicateStringValue( memberName );
+   }
+
+   virtual void releaseMemberName( char *memberName )
+   {
+      releaseStringValue( memberName );
+   }
+
+   virtual char *duplicateStringValue( const char *value, 
+                                       unsigned int length = unknown )
+   {
+      //@todo investigate this old optimization
+      //if ( !value  ||  value[0] == 0 )
+      //   return 0;
+
+      if ( length == unknown )
+         length = (unsigned int)strlen(value);
+      char *newString = static_cast<char *>( malloc( length + 1 ) );
+      memcpy( newString, value, length );
+      newString[length] = 0;
+      return newString;
+   }
+
+   virtual void releaseStringValue( char *value )
+   {
+      if ( value )
+         free( value );
+   }
+};
+
+static ValueAllocator *&valueAllocator()
+{
+   static DefaultValueAllocator defaultAllocator;
+   static ValueAllocator *valueAllocator = &defaultAllocator;
+   return valueAllocator;
+}
+
+static struct DummyValueAllocatorInitializer {
+   DummyValueAllocatorInitializer() 
+   {
+      valueAllocator();      // ensure valueAllocator() statics are initialized before main().
+   }
+} dummyValueAllocatorInitializer;
+
+
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// ValueInternals...
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+#ifdef JSON_VALUE_USE_INTERNAL_MAP
+# include "json_internalarray.inl"
+# include "json_internalmap.inl"
+#endif // JSON_VALUE_USE_INTERNAL_MAP
+
+# include "json_valueiterator.inl"
+
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class Value::CommentInfo
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+
+Value::CommentInfo::CommentInfo()
+   : comment_( 0 )
+{
+}
+
+Value::CommentInfo::~CommentInfo()
+{
+   if ( comment_ )
+      valueAllocator()->releaseStringValue( comment_ );
+}
+
+
+void 
+Value::CommentInfo::setComment( const char *text )
+{
+   if ( comment_ )
+      valueAllocator()->releaseStringValue( comment_ );
+   JSON_ASSERT( text );
+   JSON_ASSERT_MESSAGE( text[0]=='\0' || text[0]=='/', "Comments must start with /");
+   // It seems that /**/ style comments are acceptable as well.
+   comment_ = valueAllocator()->duplicateStringValue( text );
+}
+
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class Value::CZString
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+# ifndef JSON_VALUE_USE_INTERNAL_MAP
+
+// Notes: index_ indicates if the string was allocated when
+// a string is stored.
+
+Value::CZString::CZString( int index )
+   : cstr_( 0 )
+   , index_( index )
+{
+}
+
+Value::CZString::CZString( const char *cstr, DuplicationPolicy allocate )
+   : cstr_( allocate == duplicate ? valueAllocator()->makeMemberName(cstr) 
+                                  : cstr )
+   , index_( allocate )
+{
+}
+
+Value::CZString::CZString( const CZString &other )
+: cstr_( other.index_ != noDuplication &&  other.cstr_ != 0
+                ?  valueAllocator()->makeMemberName( other.cstr_ )
+                : other.cstr_ )
+   , index_( other.cstr_ ? (other.index_ == noDuplication ? noDuplication : duplicate)
+                         : other.index_ )
+{
+}
+
+Value::CZString::~CZString()
+{
+   if ( cstr_  &&  index_ == duplicate )
+      valueAllocator()->releaseMemberName( const_cast<char *>( cstr_ ) );
+}
+
+void 
+Value::CZString::swap( CZString &other )
+{
+   std::swap( cstr_, other.cstr_ );
+   std::swap( index_, other.index_ );
+}
+
+Value::CZString &
+Value::CZString::operator =( const CZString &other )
+{
+   CZString temp( other );
+   swap( temp );
+   return *this;
+}
+
+bool 
+Value::CZString::operator<( const CZString &other ) const 
+{
+   if ( cstr_ )
+      return strcmp( cstr_, other.cstr_ ) < 0;
+   return index_ < other.index_;
+}
+
+bool 
+Value::CZString::operator==( const CZString &other ) const 
+{
+   if ( cstr_ )
+      return strcmp( cstr_, other.cstr_ ) == 0;
+   return index_ == other.index_;
+}
+
+
+int 
+Value::CZString::index() const
+{
+   return index_;
+}
+
+
+const char *
+Value::CZString::c_str() const
+{
+   return cstr_;
+}
+
+bool 
+Value::CZString::isStaticString() const
+{
+   return index_ == noDuplication;
+}
+
+#endif // ifndef JSON_VALUE_USE_INTERNAL_MAP
+
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class Value::Value
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+/*! \internal Default constructor initialization must be equivalent to:
+ * memset( this, 0, sizeof(Value) )
+ * This optimization is used in ValueInternalMap fast allocator.
+ */
+Value::Value( ValueType type )
+   : type_( type )
+   , allocated_( 0 )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   switch ( type )
+   {
+   case nullValue:
+      break;
+   case intValue:
+   case uintValue:
+      value_.int_ = 0;
+      break;
+   case realValue:
+      value_.real_ = 0.0;
+      break;
+   case stringValue:
+      value_.string_ = 0;
+      break;
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+   case objectValue:
+      value_.map_ = new ObjectValues();
+      break;
+#else
+   case arrayValue:
+      value_.array_ = arrayAllocator()->newArray();
+      break;
+   case objectValue:
+      value_.map_ = mapAllocator()->newMap();
+      break;
+#endif
+   case booleanValue:
+      value_.bool_ = false;
+      break;
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+}
+
+
+Value::Value( Int value )
+   : type_( intValue )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.int_ = value;
+}
+
+
+Value::Value( UInt value )
+   : type_( uintValue )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.uint_ = value;
+}
+
+Value::Value( double value )
+   : type_( realValue )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.real_ = value;
+}
+
+Value::Value( const char *value )
+   : type_( stringValue )
+   , allocated_( true )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.string_ = valueAllocator()->duplicateStringValue( value );
+}
+
+
+Value::Value( const char *beginValue, 
+              const char *endValue )
+   : type_( stringValue )
+   , allocated_( true )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.string_ = valueAllocator()->duplicateStringValue( beginValue, 
+                                                            UInt(endValue - beginValue) );
+}
+
+
+Value::Value( const std::string &value )
+   : type_( stringValue )
+   , allocated_( true )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.string_ = valueAllocator()->duplicateStringValue( value.c_str(), 
+                                                            (unsigned int)value.length() );
+
+}
+
+Value::Value( const StaticString &value )
+   : type_( stringValue )
+   , allocated_( false )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.string_ = const_cast<char *>( value.c_str() );
+}
+
+
+# ifdef JSON_USE_CPPTL
+Value::Value( const CppTL::ConstString &value )
+   : type_( stringValue )
+   , allocated_( true )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.string_ = valueAllocator()->duplicateStringValue( value, value.length() );
+}
+# endif
+
+Value::Value( bool value )
+   : type_( booleanValue )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.bool_ = value;
+}
+
+
+Value::Value( const Value &other )
+   : type_( other.type_ )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   switch ( type_ )
+   {
+   case nullValue:
+   case intValue:
+   case uintValue:
+   case realValue:
+   case booleanValue:
+      value_ = other.value_;
+      break;
+   case stringValue:
+      if ( other.value_.string_ )
+      {
+         value_.string_ = valueAllocator()->duplicateStringValue( other.value_.string_ );
+         allocated_ = true;
+      }
+      else
+         value_.string_ = 0;
+      break;
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+   case objectValue:
+      value_.map_ = new ObjectValues( *other.value_.map_ );
+      break;
+#else
+   case arrayValue:
+      value_.array_ = arrayAllocator()->newArrayCopy( *other.value_.array_ );
+      break;
+   case objectValue:
+      value_.map_ = mapAllocator()->newMapCopy( *other.value_.map_ );
+      break;
+#endif
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   if ( other.comments_ )
+   {
+      comments_ = new CommentInfo[numberOfCommentPlacement];
+      for ( int comment =0; comment < numberOfCommentPlacement; ++comment )
+      {
+         const CommentInfo &otherComment = other.comments_[comment];
+         if ( otherComment.comment_ )
+            comments_[comment].setComment( otherComment.comment_ );
+      }
+   }
+}
+
+
+Value::~Value()
+{
+   switch ( type_ )
+   {
+   case nullValue:
+   case intValue:
+   case uintValue:
+   case realValue:
+   case booleanValue:
+      break;
+   case stringValue:
+      if ( allocated_ )
+         valueAllocator()->releaseStringValue( value_.string_ );
+      break;
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+   case objectValue:
+      delete value_.map_;
+      break;
+#else
+   case arrayValue:
+      arrayAllocator()->destructArray( value_.array_ );
+      break;
+   case objectValue:
+      mapAllocator()->destructMap( value_.map_ );
+      break;
+#endif
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+
+   if ( comments_ )
+      delete[] comments_;
+}
+
+Value &
+Value::operator=( const Value &other )
+{
+   Value temp( other );
+   swap( temp );
+   return *this;
+}
+
+void 
+Value::swap( Value &other )
+{
+   ValueType temp = type_;
+   type_ = other.type_;
+   other.type_ = temp;
+   std::swap( value_, other.value_ );
+   int temp2 = allocated_;
+   allocated_ = other.allocated_;
+   other.allocated_ = temp2;
+}
+
+ValueType 
+Value::type() const
+{
+   return type_;
+}
+
+
+int 
+Value::compare( const Value &other )
+{
+   /*
+   int typeDelta = other.type_ - type_;
+   switch ( type_ )
+   {
+   case nullValue:
+
+      return other.type_ == type_;
+   case intValue:
+      if ( other.type_.isNumeric()
+   case uintValue:
+   case realValue:
+   case booleanValue:
+      break;
+   case stringValue,
+      break;
+   case arrayValue:
+      delete value_.array_;
+      break;
+   case objectValue:
+      delete value_.map_;
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   */
+   return 0;  // unreachable
+}
+
+bool 
+Value::operator <( const Value &other ) const
+{
+   int typeDelta = type_ - other.type_;
+   if ( typeDelta )
+      return typeDelta < 0 ? true : false;
+   switch ( type_ )
+   {
+   case nullValue:
+      return false;
+   case intValue:
+      return value_.int_ < other.value_.int_;
+   case uintValue:
+      return value_.uint_ < other.value_.uint_;
+   case realValue:
+      return value_.real_ < other.value_.real_;
+   case booleanValue:
+      return value_.bool_ < other.value_.bool_;
+   case stringValue:
+      return ( value_.string_ == 0  &&  other.value_.string_ )
+             || ( other.value_.string_  
+                  &&  value_.string_  
+                  && strcmp( value_.string_, other.value_.string_ ) < 0 );
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+   case objectValue:
+      {
+         int delta = int( value_.map_->size() - other.value_.map_->size() );
+         if ( delta )
+            return delta < 0;
+         return (*value_.map_) < (*other.value_.map_);
+      }
+#else
+   case arrayValue:
+      return value_.array_->compare( *(other.value_.array_) ) < 0;
+   case objectValue:
+      return value_.map_->compare( *(other.value_.map_) ) < 0;
+#endif
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return 0;  // unreachable
+}
+
+bool 
+Value::operator <=( const Value &other ) const
+{
+   return !(other > *this);
+}
+
+bool 
+Value::operator >=( const Value &other ) const
+{
+   return !(*this < other);
+}
+
+bool 
+Value::operator >( const Value &other ) const
+{
+   return other < *this;
+}
+
+bool 
+Value::operator ==( const Value &other ) const
+{
+   //if ( type_ != other.type_ )
+   // GCC 2.95.3 says:
+   // attempt to take address of bit-field structure member `Json::Value::type_'
+   // Beats me, but a temp solves the problem.
+   int temp = other.type_;
+   if ( type_ != temp )
+      return false;
+   switch ( type_ )
+   {
+   case nullValue:
+      return true;
+   case intValue:
+      return value_.int_ == other.value_.int_;
+   case uintValue:
+      return value_.uint_ == other.value_.uint_;
+   case realValue:
+      return value_.real_ == other.value_.real_;
+   case booleanValue:
+      return value_.bool_ == other.value_.bool_;
+   case stringValue:
+      return ( value_.string_ == other.value_.string_ )
+             || ( other.value_.string_  
+                  &&  value_.string_  
+                  && strcmp( value_.string_, other.value_.string_ ) == 0 );
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+   case objectValue:
+      return value_.map_->size() == other.value_.map_->size()
+             && (*value_.map_) == (*other.value_.map_);
+#else
+   case arrayValue:
+      return value_.array_->compare( *(other.value_.array_) ) == 0;
+   case objectValue:
+      return value_.map_->compare( *(other.value_.map_) ) == 0;
+#endif
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return 0;  // unreachable
+}
+
+bool 
+Value::operator !=( const Value &other ) const
+{
+   return !( *this == other );
+}
+
+const char *
+Value::asCString() const
+{
+   JSON_ASSERT( type_ == stringValue );
+   return value_.string_;
+}
+
+
+std::string 
+Value::asString() const
+{
+   switch ( type_ )
+   {
+   case nullValue:
+      return "";
+   case stringValue:
+      return value_.string_ ? value_.string_ : "";
+   case booleanValue:
+      return value_.bool_ ? "true" : "false";
+   case intValue:
+   case uintValue:
+   case realValue:
+   case arrayValue:
+   case objectValue:
+      JSON_ASSERT_MESSAGE( false, "Type is not convertible to string" );
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return ""; // unreachable
+}
+
+# ifdef JSON_USE_CPPTL
+CppTL::ConstString 
+Value::asConstString() const
+{
+   return CppTL::ConstString( asString().c_str() );
+}
+# endif
+
+Value::Int 
+Value::asInt() const
+{
+   switch ( type_ )
+   {
+   case nullValue:
+      return 0;
+   case intValue:
+      return value_.int_;
+   case uintValue:
+      JSON_ASSERT_MESSAGE( value_.uint_ < (unsigned)maxInt, "integer out of signed integer range" );
+      return value_.uint_;
+   case realValue:
+      JSON_ASSERT_MESSAGE( value_.real_ >= minInt  &&  value_.real_ <= maxInt, "Real out of signed integer range" );
+      return Int( value_.real_ );
+   case booleanValue:
+      return value_.bool_ ? 1 : 0;
+   case stringValue:
+   case arrayValue:
+   case objectValue:
+      JSON_ASSERT_MESSAGE( false, "Type is not convertible to int" );
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return 0; // unreachable;
+}
+
+Value::UInt 
+Value::asUInt() const
+{
+   switch ( type_ )
+   {
+   case nullValue:
+      return 0;
+   case intValue:
+      JSON_ASSERT_MESSAGE( value_.int_ >= 0, "Negative integer can not be converted to unsigned integer" );
+      return value_.int_;
+   case uintValue:
+      return value_.uint_;
+   case realValue:
+      JSON_ASSERT_MESSAGE( value_.real_ >= 0  &&  value_.real_ <= maxUInt,  "Real out of unsigned integer range" );
+      return UInt( value_.real_ );
+   case booleanValue:
+      return value_.bool_ ? 1 : 0;
+   case stringValue:
+   case arrayValue:
+   case objectValue:
+      JSON_ASSERT_MESSAGE( false, "Type is not convertible to uint" );
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return 0; // unreachable;
+}
+
+double 
+Value::asDouble() const
+{
+   switch ( type_ )
+   {
+   case nullValue:
+      return 0.0;
+   case intValue:
+      return value_.int_;
+   case uintValue:
+      return value_.uint_;
+   case realValue:
+      return value_.real_;
+   case booleanValue:
+      return value_.bool_ ? 1.0 : 0.0;
+   case stringValue:
+   case arrayValue:
+   case objectValue:
+      JSON_ASSERT_MESSAGE( false, "Type is not convertible to double" );
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return 0; // unreachable;
+}
+
+bool 
+Value::asBool() const
+{
+   switch ( type_ )
+   {
+   case nullValue:
+      return false;
+   case intValue:
+   case uintValue:
+      return value_.int_ != 0;
+   case realValue:
+      return value_.real_ != 0.0;
+   case booleanValue:
+      return value_.bool_;
+   case stringValue:
+      return value_.string_  &&  value_.string_[0] != 0;
+   case arrayValue:
+   case objectValue:
+      return value_.map_->size() != 0;
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return false; // unreachable;
+}
+
+
+bool 
+Value::isConvertibleTo( ValueType other ) const
+{
+   switch ( type_ )
+   {
+   case nullValue:
+      return true;
+   case intValue:
+      return ( other == nullValue  &&  value_.int_ == 0 )
+             || other == intValue
+             || ( other == uintValue  && value_.int_ >= 0 )
+             || other == realValue
+             || other == stringValue
+             || other == booleanValue;
+   case uintValue:
+      return ( other == nullValue  &&  value_.uint_ == 0 )
+             || ( other == intValue  && value_.uint_ <= (unsigned)maxInt )
+             || other == uintValue
+             || other == realValue
+             || other == stringValue
+             || other == booleanValue;
+   case realValue:
+      return ( other == nullValue  &&  value_.real_ == 0.0 )
+             || ( other == intValue  &&  value_.real_ >= minInt  &&  value_.real_ <= maxInt )
+             || ( other == uintValue  &&  value_.real_ >= 0  &&  value_.real_ <= maxUInt )
+             || other == realValue
+             || other == stringValue
+             || other == booleanValue;
+   case booleanValue:
+      return ( other == nullValue  &&  value_.bool_ == false )
+             || other == intValue
+             || other == uintValue
+             || other == realValue
+             || other == stringValue
+             || other == booleanValue;
+   case stringValue:
+      return other == stringValue
+             || ( other == nullValue  &&  (!value_.string_  ||  value_.string_[0] == 0) );
+   case arrayValue:
+      return other == arrayValue
+             ||  ( other == nullValue  &&  value_.map_->size() == 0 );
+   case objectValue:
+      return other == objectValue
+             ||  ( other == nullValue  &&  value_.map_->size() == 0 );
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return false; // unreachable;
+}
+
+
+/// Number of values in array or object
+Value::UInt 
+Value::size() const
+{
+   switch ( type_ )
+   {
+   case nullValue:
+   case intValue:
+   case uintValue:
+   case realValue:
+   case booleanValue:
+   case stringValue:
+      return 0;
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:  // size of the array is highest index + 1
+      if ( !value_.map_->empty() )
+      {
+         ObjectValues::const_iterator itLast = value_.map_->end();
+         --itLast;
+         return (*itLast).first.index()+1;
+      }
+      return 0;
+   case objectValue:
+      return Int( value_.map_->size() );
+#else
+   case arrayValue:
+      return Int( value_.array_->size() );
+   case objectValue:
+      return Int( value_.map_->size() );
+#endif
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return 0; // unreachable;
+}
+
+
+bool 
+Value::empty() const
+{
+   if ( isNull() || isArray() || isObject() )
+      return size() == 0u;
+   else
+      return false;
+}
+
+
+bool
+Value::operator!() const
+{
+   return isNull();
+}
+
+
+void 
+Value::clear()
+{
+   JSON_ASSERT( type_ == nullValue  ||  type_ == arrayValue  || type_ == objectValue );
+
+   switch ( type_ )
+   {
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+   case objectValue:
+      value_.map_->clear();
+      break;
+#else
+   case arrayValue:
+      value_.array_->clear();
+      break;
+   case objectValue:
+      value_.map_->clear();
+      break;
+#endif
+   default:
+      break;
+   }
+}
+
+void 
+Value::resize( UInt newSize )
+{
+   JSON_ASSERT( type_ == nullValue  ||  type_ == arrayValue );
+   if ( type_ == nullValue )
+      *this = Value( arrayValue );
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   UInt oldSize = size();
+   if ( newSize == 0 )
+      clear();
+   else if ( newSize > oldSize )
+      (*this)[ newSize - 1 ];
+   else
+   {
+      for ( UInt index = newSize; index < oldSize; ++index )
+         value_.map_->erase( index );
+      assert( size() == newSize );
+   }
+#else
+   value_.array_->resize( newSize );
+#endif
+}
+
+
+Value &
+Value::operator[]( UInt index )
+{
+   JSON_ASSERT( type_ == nullValue  ||  type_ == arrayValue );
+   if ( type_ == nullValue )
+      *this = Value( arrayValue );
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   CZString key( index );
+   ObjectValues::iterator it = value_.map_->lower_bound( key );
+   if ( it != value_.map_->end()  &&  (*it).first == key )
+      return (*it).second;
+
+   ObjectValues::value_type defaultValue( key, null );
+   it = value_.map_->insert( it, defaultValue );
+   return (*it).second;
+#else
+   return value_.array_->resolveReference( index );
+#endif
+}
+
+
+const Value &
+Value::operator[]( UInt index ) const
+{
+   JSON_ASSERT( type_ == nullValue  ||  type_ == arrayValue );
+   if ( type_ == nullValue )
+      return null;
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   CZString key( index );
+   ObjectValues::const_iterator it = value_.map_->find( key );
+   if ( it == value_.map_->end() )
+      return null;
+   return (*it).second;
+#else
+   Value *value = value_.array_->find( index );
+   return value ? *value : null;
+#endif
+}
+
+
+Value &
+Value::operator[]( const char *key )
+{
+   return resolveReference( key, false );
+}
+
+
+Value &
+Value::resolveReference( const char *key, 
+                         bool isStatic )
+{
+   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
+   if ( type_ == nullValue )
+      *this = Value( objectValue );
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   CZString actualKey( key, isStatic ? CZString::noDuplication 
+                                     : CZString::duplicateOnCopy );
+   ObjectValues::iterator it = value_.map_->lower_bound( actualKey );
+   if ( it != value_.map_->end()  &&  (*it).first == actualKey )
+      return (*it).second;
+
+   ObjectValues::value_type defaultValue( actualKey, null );
+   it = value_.map_->insert( it, defaultValue );
+   Value &value = (*it).second;
+   return value;
+#else
+   return value_.map_->resolveReference( key, isStatic );
+#endif
+}
+
+
+Value 
+Value::get( UInt index, 
+            const Value &defaultValue ) const
+{
+   const Value *value = &((*this)[index]);
+   return value == &null ? defaultValue : *value;
+}
+
+
+bool 
+Value::isValidIndex( UInt index ) const
+{
+   return index < size();
+}
+
+
+
+const Value &
+Value::operator[]( const char *key ) const
+{
+   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
+   if ( type_ == nullValue )
+      return null;
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   CZString actualKey( key, CZString::noDuplication );
+   ObjectValues::const_iterator it = value_.map_->find( actualKey );
+   if ( it == value_.map_->end() )
+      return null;
+   return (*it).second;
+#else
+   const Value *value = value_.map_->find( key );
+   return value ? *value : null;
+#endif
+}
+
+
+Value &
+Value::operator[]( const std::string &key )
+{
+   return (*this)[ key.c_str() ];
+}
+
+
+const Value &
+Value::operator[]( const std::string &key ) const
+{
+   return (*this)[ key.c_str() ];
+}
+
+Value &
+Value::operator[]( const StaticString &key )
+{
+   return resolveReference( key, true );
+}
+
+
+# ifdef JSON_USE_CPPTL
+Value &
+Value::operator[]( const CppTL::ConstString &key )
+{
+   return (*this)[ key.c_str() ];
+}
+
+
+const Value &
+Value::operator[]( const CppTL::ConstString &key ) const
+{
+   return (*this)[ key.c_str() ];
+}
+# endif
+
+
+Value &
+Value::append( const Value &value )
+{
+   return (*this)[size()] = value;
+}
+
+
+Value 
+Value::get( const char *key, 
+            const Value &defaultValue ) const
+{
+   const Value *value = &((*this)[key]);
+   return value == &null ? defaultValue : *value;
+}
+
+
+Value 
+Value::get( const std::string &key,
+            const Value &defaultValue ) const
+{
+   return get( key.c_str(), defaultValue );
+}
+
+Value
+Value::removeMember( const char* key )
+{
+   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
+   if ( type_ == nullValue )
+      return null;
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   CZString actualKey( key, CZString::noDuplication );
+   ObjectValues::iterator it = value_.map_->find( actualKey );
+   if ( it == value_.map_->end() )
+      return null;
+   Value old(it->second);
+   value_.map_->erase(it);
+   return old;
+#else
+   Value *value = value_.map_->find( key );
+   if (value){
+      Value old(*value);
+      value_.map_.remove( key );
+      return old;
+   } else {
+      return null;
+   }
+#endif
+}
+
+Value
+Value::removeMember( const std::string &key )
+{
+   return removeMember( key.c_str() );
+}
+
+# ifdef JSON_USE_CPPTL
+Value 
+Value::get( const CppTL::ConstString &key,
+            const Value &defaultValue ) const
+{
+   return get( key.c_str(), defaultValue );
+}
+# endif
+
+bool 
+Value::isMember( const char *key ) const
+{
+   const Value *value = &((*this)[key]);
+   return value != &null;
+}
+
+
+bool 
+Value::isMember( const std::string &key ) const
+{
+   return isMember( key.c_str() );
+}
+
+
+# ifdef JSON_USE_CPPTL
+bool 
+Value::isMember( const CppTL::ConstString &key ) const
+{
+   return isMember( key.c_str() );
+}
+#endif
+
+Value::Members 
+Value::getMemberNames() const
+{
+   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
+   if ( type_ == nullValue )
+       return Value::Members();
+   Members members;
+   members.reserve( value_.map_->size() );
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   ObjectValues::const_iterator it = value_.map_->begin();
+   ObjectValues::const_iterator itEnd = value_.map_->end();
+   for ( ; it != itEnd; ++it )
+      members.push_back( std::string( (*it).first.c_str() ) );
+#else
+   ValueInternalMap::IteratorState it;
+   ValueInternalMap::IteratorState itEnd;
+   value_.map_->makeBeginIterator( it );
+   value_.map_->makeEndIterator( itEnd );
+   for ( ; !ValueInternalMap::equals( it, itEnd ); ValueInternalMap::increment(it) )
+      members.push_back( std::string( ValueInternalMap::key( it ) ) );
+#endif
+   return members;
+}
+//
+//# ifdef JSON_USE_CPPTL
+//EnumMemberNames
+//Value::enumMemberNames() const
+//{
+//   if ( type_ == objectValue )
+//   {
+//      return CppTL::Enum::any(  CppTL::Enum::transform(
+//         CppTL::Enum::keys( *(value_.map_), CppTL::Type<const CZString &>() ),
+//         MemberNamesTransform() ) );
+//   }
+//   return EnumMemberNames();
+//}
+//
+//
+//EnumValues 
+//Value::enumValues() const
+//{
+//   if ( type_ == objectValue  ||  type_ == arrayValue )
+//      return CppTL::Enum::anyValues( *(value_.map_), 
+//                                     CppTL::Type<const Value &>() );
+//   return EnumValues();
+//}
+//
+//# endif
+
+
+bool
+Value::isNull() const
+{
+   return type_ == nullValue;
+}
+
+
+bool 
+Value::isBool() const
+{
+   return type_ == booleanValue;
+}
+
+
+bool 
+Value::isInt() const
+{
+   return type_ == intValue;
+}
+
+
+bool 
+Value::isUInt() const
+{
+   return type_ == uintValue;
+}
+
+
+bool 
+Value::isIntegral() const
+{
+   return type_ == intValue  
+          ||  type_ == uintValue  
+          ||  type_ == booleanValue;
+}
+
+
+bool 
+Value::isDouble() const
+{
+   return type_ == realValue;
+}
+
+
+bool 
+Value::isNumeric() const
+{
+   return isIntegral() || isDouble();
+}
+
+
+bool 
+Value::isString() const
+{
+   return type_ == stringValue;
+}
+
+
+bool 
+Value::isArray() const
+{
+   return type_ == nullValue  ||  type_ == arrayValue;
+}
+
+
+bool 
+Value::isObject() const
+{
+   return type_ == nullValue  ||  type_ == objectValue;
+}
+
+
+void 
+Value::setComment( const char *comment,
+                   CommentPlacement placement )
+{
+   if ( !comments_ )
+      comments_ = new CommentInfo[numberOfCommentPlacement];
+   comments_[placement].setComment( comment );
+}
+
+
+void 
+Value::setComment( const std::string &comment,
+                   CommentPlacement placement )
+{
+   setComment( comment.c_str(), placement );
+}
+
+
+bool 
+Value::hasComment( CommentPlacement placement ) const
+{
+   return comments_ != 0  &&  comments_[placement].comment_ != 0;
+}
+
+std::string 
+Value::getComment( CommentPlacement placement ) const
+{
+   if ( hasComment(placement) )
+      return comments_[placement].comment_;
+   return "";
+}
+
+
+std::string 
+Value::toStyledString() const
+{
+   StyledWriter writer;
+   return writer.write( *this );
+}
+
+
+Value::const_iterator 
+Value::begin() const
+{
+   switch ( type_ )
+   {
+#ifdef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+      if ( value_.array_ )
+      {
+         ValueInternalArray::IteratorState it;
+         value_.array_->makeBeginIterator( it );
+         return const_iterator( it );
+      }
+      break;
+   case objectValue:
+      if ( value_.map_ )
+      {
+         ValueInternalMap::IteratorState it;
+         value_.map_->makeBeginIterator( it );
+         return const_iterator( it );
+      }
+      break;
+#else
+   case arrayValue:
+   case objectValue:
+      if ( value_.map_ )
+         return const_iterator( value_.map_->begin() );
+      break;
+#endif
+   default:
+      break;
+   }
+   return const_iterator();
+}
+
+Value::const_iterator 
+Value::end() const
+{
+   switch ( type_ )
+   {
+#ifdef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+      if ( value_.array_ )
+      {
+         ValueInternalArray::IteratorState it;
+         value_.array_->makeEndIterator( it );
+         return const_iterator( it );
+      }
+      break;
+   case objectValue:
+      if ( value_.map_ )
+      {
+         ValueInternalMap::IteratorState it;
+         value_.map_->makeEndIterator( it );
+         return const_iterator( it );
+      }
+      break;
+#else
+   case arrayValue:
+   case objectValue:
+      if ( value_.map_ )
+         return const_iterator( value_.map_->end() );
+      break;
+#endif
+   default:
+      break;
+   }
+   return const_iterator();
+}
+
+
+Value::iterator 
+Value::begin()
+{
+   switch ( type_ )
+   {
+#ifdef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+      if ( value_.array_ )
+      {
+         ValueInternalArray::IteratorState it;
+         value_.array_->makeBeginIterator( it );
+         return iterator( it );
+      }
+      break;
+   case objectValue:
+      if ( value_.map_ )
+      {
+         ValueInternalMap::IteratorState it;
+         value_.map_->makeBeginIterator( it );
+         return iterator( it );
+      }
+      break;
+#else
+   case arrayValue:
+   case objectValue:
+      if ( value_.map_ )
+         return iterator( value_.map_->begin() );
+      break;
+#endif
+   default:
+      break;
+   }
+   return iterator();
+}
+
+Value::iterator 
+Value::end()
+{
+   switch ( type_ )
+   {
+#ifdef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+      if ( value_.array_ )
+      {
+         ValueInternalArray::IteratorState it;
+         value_.array_->makeEndIterator( it );
+         return iterator( it );
+      }
+      break;
+   case objectValue:
+      if ( value_.map_ )
+      {
+         ValueInternalMap::IteratorState it;
+         value_.map_->makeEndIterator( it );
+         return iterator( it );
+      }
+      break;
+#else
+   case arrayValue:
+   case objectValue:
+      if ( value_.map_ )
+         return iterator( value_.map_->end() );
+      break;
+#endif
+   default:
+      break;
+   }
+   return iterator();
+}
+
+
+// class PathArgument
+// //////////////////////////////////////////////////////////////////
+
+PathArgument::PathArgument()
+   : kind_( kindNone )
+{
+}
+
+
+PathArgument::PathArgument( Value::UInt index )
+   : index_( index )
+   , kind_( kindIndex )
+{
+}
+
+
+PathArgument::PathArgument( const char *key )
+   : key_( key )
+   , kind_( kindKey )
+{
+}
+
+
+PathArgument::PathArgument( const std::string &key )
+   : key_( key.c_str() )
+   , kind_( kindKey )
+{
+}
+
+// class Path
+// //////////////////////////////////////////////////////////////////
+
+Path::Path( const std::string &path,
+            const PathArgument &a1,
+            const PathArgument &a2,
+            const PathArgument &a3,
+            const PathArgument &a4,
+            const PathArgument &a5 )
+{
+   InArgs in;
+   in.push_back( &a1 );
+   in.push_back( &a2 );
+   in.push_back( &a3 );
+   in.push_back( &a4 );
+   in.push_back( &a5 );
+   makePath( path, in );
+}
+
+
+void 
+Path::makePath( const std::string &path,
+                const InArgs &in )
+{
+   const char *current = path.c_str();
+   const char *end = current + path.length();
+   InArgs::const_iterator itInArg = in.begin();
+   while ( current != end )
+   {
+      if ( *current == '[' )
+      {
+         ++current;
+         if ( *current == '%' )
+            addPathInArg( path, in, itInArg, PathArgument::kindIndex );
+         else
+         {
+            Value::UInt index = 0;
+            for ( ; current != end && *current >= '0'  &&  *current <= '9'; ++current )
+               index = index * 10 + Value::UInt(*current - '0');
+            args_.push_back( index );
+         }
+         if ( current == end  ||  *current++ != ']' )
+            invalidPath( path, int(current - path.c_str()) );
+      }
+      else if ( *current == '%' )
+      {
+         addPathInArg( path, in, itInArg, PathArgument::kindKey );
+         ++current;
+      }
+      else if ( *current == '.' )
+      {
+         ++current;
+      }
+      else
+      {
+         const char *beginName = current;
+         while ( current != end  &&  !strchr( "[.", *current ) )
+            ++current;
+         args_.push_back( std::string( beginName, current ) );
+      }
+   }
+}
+
+
+void 
+Path::addPathInArg( const std::string &path, 
+                    const InArgs &in, 
+                    InArgs::const_iterator &itInArg, 
+                    PathArgument::Kind kind )
+{
+   if ( itInArg == in.end() )
+   {
+      // Error: missing argument %d
+   }
+   else if ( (*itInArg)->kind_ != kind )
+   {
+      // Error: bad argument type
+   }
+   else
+   {
+      args_.push_back( **itInArg );
+   }
+}
+
+
+void 
+Path::invalidPath( const std::string &path, 
+                   int location )
+{
+   // Error: invalid path.
+}
+
+
+const Value &
+Path::resolve( const Value &root ) const
+{
+   const Value *node = &root;
+   for ( Args::const_iterator it = args_.begin(); it != args_.end(); ++it )
+   {
+      const PathArgument &arg = *it;
+      if ( arg.kind_ == PathArgument::kindIndex )
+      {
+         if ( !node->isArray()  ||  node->isValidIndex( arg.index_ ) )
+         {
+            // Error: unable to resolve path (array value expected at position...
+         }
+         node = &((*node)[arg.index_]);
+      }
+      else if ( arg.kind_ == PathArgument::kindKey )
+      {
+         if ( !node->isObject() )
+         {
+            // Error: unable to resolve path (object value expected at position...)
+         }
+         node = &((*node)[arg.key_]);
+         if ( node == &Value::null )
+         {
+            // Error: unable to resolve path (object has no member named '' at position...)
+         }
+      }
+   }
+   return *node;
+}
+
+
+Value 
+Path::resolve( const Value &root, 
+               const Value &defaultValue ) const
+{
+   const Value *node = &root;
+   for ( Args::const_iterator it = args_.begin(); it != args_.end(); ++it )
+   {
+      const PathArgument &arg = *it;
+      if ( arg.kind_ == PathArgument::kindIndex )
+      {
+         if ( !node->isArray()  ||  node->isValidIndex( arg.index_ ) )
+            return defaultValue;
+         node = &((*node)[arg.index_]);
+      }
+      else if ( arg.kind_ == PathArgument::kindKey )
+      {
+         if ( !node->isObject() )
+            return defaultValue;
+         node = &((*node)[arg.key_]);
+         if ( node == &Value::null )
+            return defaultValue;
+      }
+   }
+   return *node;
+}
+
+
+Value &
+Path::make( Value &root ) const
+{
+   Value *node = &root;
+   for ( Args::const_iterator it = args_.begin(); it != args_.end(); ++it )
+   {
+      const PathArgument &arg = *it;
+      if ( arg.kind_ == PathArgument::kindIndex )
+      {
+         if ( !node->isArray() )
+         {
+            // Error: node is not an array at position ...
+         }
+         node = &((*node)[arg.index_]);
+      }
+      else if ( arg.kind_ == PathArgument::kindKey )
+      {
+         if ( !node->isObject() )
+         {
+            // Error: node is not an object at position...
+         }
+         node = &((*node)[arg.key_]);
+      }
+   }
+   return *node;
+}
+
+
+} // namespace Json

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_valueiterator.inl
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_valueiterator.inl b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_valueiterator.inl
new file mode 100644
index 0000000..736e260
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_valueiterator.inl
@@ -0,0 +1,292 @@
+// included by json_value.cpp
+// everything is within Json namespace
+
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class ValueIteratorBase
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+ValueIteratorBase::ValueIteratorBase()
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   : current_()
+   , isNull_( true )
+{
+}
+#else
+   : isArray_( true )
+   , isNull_( true )
+{
+   iterator_.array_ = ValueInternalArray::IteratorState();
+}
+#endif
+
+
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+ValueIteratorBase::ValueIteratorBase( const Value::ObjectValues::iterator &current )
+   : current_( current )
+   , isNull_( false )
+{
+}
+#else
+ValueIteratorBase::ValueIteratorBase( const ValueInternalArray::IteratorState &state )
+   : isArray_( true )
+{
+   iterator_.array_ = state;
+}
+
+
+ValueIteratorBase::ValueIteratorBase( const ValueInternalMap::IteratorState &state )
+   : isArray_( false )
+{
+   iterator_.map_ = state;
+}
+#endif
+
+Value &
+ValueIteratorBase::deref() const
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   return current_->second;
+#else
+   if ( isArray_ )
+      return ValueInternalArray::dereference( iterator_.array_ );
+   return ValueInternalMap::value( iterator_.map_ );
+#endif
+}
+
+
+void 
+ValueIteratorBase::increment()
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   ++current_;
+#else
+   if ( isArray_ )
+      ValueInternalArray::increment( iterator_.array_ );
+   ValueInternalMap::increment( iterator_.map_ );
+#endif
+}
+
+
+void 
+ValueIteratorBase::decrement()
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   --current_;
+#else
+   if ( isArray_ )
+      ValueInternalArray::decrement( iterator_.array_ );
+   ValueInternalMap::decrement( iterator_.map_ );
+#endif
+}
+
+
+ValueIteratorBase::difference_type 
+ValueIteratorBase::computeDistance( const SelfType &other ) const
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+# ifdef JSON_USE_CPPTL_SMALLMAP
+   return current_ - other.current_;
+# else
+   // Iterator for null value are initialized using the default
+   // constructor, which initialize current_ to the default
+   // std::map::iterator. As begin() and end() are two instance 
+   // of the default std::map::iterator, they can not be compared.
+   // To allow this, we handle this comparison specifically.
+   if ( isNull_  &&  other.isNull_ )
+   {
+      return 0;
+   }
+
+
+   // Usage of std::distance is not portable (does not compile with Sun Studio 12 RogueWave STL,
+   // which is the one used by default).
+   // Using a portable hand-made version for non random iterator instead:
+   //   return difference_type( std::distance( current_, other.current_ ) );
+   difference_type myDistance = 0;
+   for ( Value::ObjectValues::iterator it = current_; it != other.current_; ++it )
+   {
+      ++myDistance;
+   }
+   return myDistance;
+# endif
+#else
+   if ( isArray_ )
+      return ValueInternalArray::distance( iterator_.array_, other.iterator_.array_ );
+   return ValueInternalMap::distance( iterator_.map_, other.iterator_.map_ );
+#endif
+}
+
+
+bool 
+ValueIteratorBase::isEqual( const SelfType &other ) const
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   if ( isNull_ )
+   {
+      return other.isNull_;
+   }
+   return current_ == other.current_;
+#else
+   if ( isArray_ )
+      return ValueInternalArray::equals( iterator_.array_, other.iterator_.array_ );
+   return ValueInternalMap::equals( iterator_.map_, other.iterator_.map_ );
+#endif
+}
+
+
+void 
+ValueIteratorBase::copy( const SelfType &other )
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   current_ = other.current_;
+#else
+   if ( isArray_ )
+      iterator_.array_ = other.iterator_.array_;
+   iterator_.map_ = other.iterator_.map_;
+#endif
+}
+
+
+Value 
+ValueIteratorBase::key() const
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   const Value::CZString czstring = (*current_).first;
+   if ( czstring.c_str() )
+   {
+      if ( czstring.isStaticString() )
+         return Value( StaticString( czstring.c_str() ) );
+      return Value( czstring.c_str() );
+   }
+   return Value( czstring.index() );
+#else
+   if ( isArray_ )
+      return Value( ValueInternalArray::indexOf( iterator_.array_ ) );
+   bool isStatic;
+   const char *memberName = ValueInternalMap::key( iterator_.map_, isStatic );
+   if ( isStatic )
+      return Value( StaticString( memberName ) );
+   return Value( memberName );
+#endif
+}
+
+
+UInt 
+ValueIteratorBase::index() const
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   const Value::CZString czstring = (*current_).first;
+   if ( !czstring.c_str() )
+      return czstring.index();
+   return Value::UInt( -1 );
+#else
+   if ( isArray_ )
+      return Value::UInt( ValueInternalArray::indexOf( iterator_.array_ ) );
+   return Value::UInt( -1 );
+#endif
+}
+
+
+const char *
+ValueIteratorBase::memberName() const
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   const char *name = (*current_).first.c_str();
+   return name ? name : "";
+#else
+   if ( !isArray_ )
+      return ValueInternalMap::key( iterator_.map_ );
+   return "";
+#endif
+}
+
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class ValueConstIterator
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+ValueConstIterator::ValueConstIterator()
+{
+}
+
+
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+ValueConstIterator::ValueConstIterator( const Value::ObjectValues::iterator &current )
+   : ValueIteratorBase( current )
+{
+}
+#else
+ValueConstIterator::ValueConstIterator( const ValueInternalArray::IteratorState &state )
+   : ValueIteratorBase( state )
+{
+}
+
+ValueConstIterator::ValueConstIterator( const ValueInternalMap::IteratorState &state )
+   : ValueIteratorBase( state )
+{
+}
+#endif
+
+ValueConstIterator &
+ValueConstIterator::operator =( const ValueIteratorBase &other )
+{
+   copy( other );
+   return *this;
+}
+
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class ValueIterator
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+ValueIterator::ValueIterator()
+{
+}
+
+
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+ValueIterator::ValueIterator( const Value::ObjectValues::iterator &current )
+   : ValueIteratorBase( current )
+{
+}
+#else
+ValueIterator::ValueIterator( const ValueInternalArray::IteratorState &state )
+   : ValueIteratorBase( state )
+{
+}
+
+ValueIterator::ValueIterator( const ValueInternalMap::IteratorState &state )
+   : ValueIteratorBase( state )
+{
+}
+#endif
+
+ValueIterator::ValueIterator( const ValueConstIterator &other )
+   : ValueIteratorBase( other )
+{
+}
+
+ValueIterator::ValueIterator( const ValueIterator &other )
+   : ValueIteratorBase( other )
+{
+}
+
+ValueIterator &
+ValueIterator::operator =( const SelfType &other )
+{
+   copy( other );
+   return *this;
+}


[19/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/src/android/ContactManager.java
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/src/android/ContactManager.java b/spec/plugins/Contacts/src/android/ContactManager.java
deleted file mode 100755
index 1c086e1..0000000
--- a/spec/plugins/Contacts/src/android/ContactManager.java
+++ /dev/null
@@ -1,122 +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.
-*/
-package org.apache.cordova.core;
-
-import org.apache.cordova.CallbackContext;
-import org.apache.cordova.CordovaPlugin;
-import org.apache.cordova.PluginResult;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-import android.util.Log;
-
-public class ContactManager extends CordovaPlugin {
-
-    private ContactAccessor contactAccessor;
-    private static final String LOG_TAG = "Contact Query";
-
-    public static final int UNKNOWN_ERROR = 0;
-    public static final int INVALID_ARGUMENT_ERROR = 1;
-    public static final int TIMEOUT_ERROR = 2;
-    public static final int PENDING_OPERATION_ERROR = 3;
-    public static final int IO_ERROR = 4;
-    public static final int NOT_SUPPORTED_ERROR = 5;
-    public static final int PERMISSION_DENIED_ERROR = 20;
-
-    /**
-     * Constructor.
-     */
-    public ContactManager() {
-    }
-
-    /**
-     * Executes the request and returns PluginResult.
-     *
-     * @param action            The action to execute.
-     * @param args              JSONArray of arguments for the plugin.
-     * @param callbackContext   The callback context used when calling back into JavaScript.
-     * @return                  True if the action was valid, false otherwise.
-     */
-    public boolean execute(String action, JSONArray args, final CallbackContext callbackContext) throws JSONException {
-        /**
-         * Check to see if we are on an Android 1.X device.  If we are return an error as we
-         * do not support this as of Cordova 1.0.
-         */
-        if (android.os.Build.VERSION.RELEASE.startsWith("1.")) {
-            callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, ContactManager.NOT_SUPPORTED_ERROR));
-            return true;
-        }
-
-        /**
-         * Only create the contactAccessor after we check the Android version or the program will crash
-         * older phones.
-         */
-        if (this.contactAccessor == null) {
-            this.contactAccessor = new ContactAccessorSdk5(this.webView, this.cordova);
-        }
-
-        if (action.equals("search")) {
-            final JSONArray filter = args.getJSONArray(0);
-            final JSONObject options = args.getJSONObject(1);
-            this.cordova.getThreadPool().execute(new Runnable() {
-                public void run() {
-                    JSONArray res = contactAccessor.search(filter, options);
-                    callbackContext.success(res);
-                }
-            });
-        }
-        else if (action.equals("save")) {
-            final JSONObject contact = args.getJSONObject(0);
-            this.cordova.getThreadPool().execute(new Runnable() {
-                public void run() {
-                    JSONObject res = null;
-                    String id = contactAccessor.save(contact);
-                    if (id != null) {
-                        try {
-                            res = contactAccessor.getContactById(id);
-                        } catch (JSONException e) {
-                            Log.e(LOG_TAG, "JSON fail.", e);
-                        }
-                    }
-                    if (res != null) {
-                        callbackContext.success(res);
-                    } else {
-                        callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, UNKNOWN_ERROR));
-                    }
-                }
-            });
-        }
-        else if (action.equals("remove")) {
-            final String contactId = args.getString(0);
-            this.cordova.getThreadPool().execute(new Runnable() {
-                public void run() {
-                    if (contactAccessor.remove(contactId)) {
-                        callbackContext.success();
-                    } else {
-                        callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, UNKNOWN_ERROR));
-                    }
-                }
-            });
-        }
-        else {
-            return false;
-        }
-        return true;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/src/blackberry10/ContactActivity.js
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/src/blackberry10/ContactActivity.js b/spec/plugins/Contacts/src/blackberry10/ContactActivity.js
deleted file mode 100644
index f0f82b3..0000000
--- a/spec/plugins/Contacts/src/blackberry10/ContactActivity.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2012 Research In Motion Limited.
- *
- * Licensed 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 ContactActivity = function (args) {
-    this.direction = args.direction || null;
-    this.description = args.description || "";
-    this.mimeType = args.mimeType || "";
-    this.timestamp = new Date(parseInt(args.timestamp, 10)) || null;
-};
-
-Object.defineProperty(ContactActivity, "INCOMING", {"value": true});
-Object.defineProperty(ContactActivity, "OUTGOING", {"value": false});
-
-module.exports = ContactActivity;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/src/blackberry10/ContactAddress.js
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/src/blackberry10/ContactAddress.js b/spec/plugins/Contacts/src/blackberry10/ContactAddress.js
deleted file mode 100644
index 1ba9fe4..0000000
--- a/spec/plugins/Contacts/src/blackberry10/ContactAddress.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2012 Research In Motion Limited.
- *
- * Licensed 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 ContactAddress = function (properties) {
-    this.type = properties && properties.type ? properties.type : "";
-    this.streetAddress = properties && properties.streetAddress ? properties.streetAddress : "";
-    this.streetOther = properties && properties.streetOther ? properties.streetOther : "";
-    this.locality = properties && properties.locality ? properties.locality : "";
-    this.region = properties && properties.region ? properties.region : "";
-    this.postalCode = properties && properties.postalCode ? properties.postalCode : "";
-    this.country = properties && properties.country ? properties.country : "";
-};
-
-Object.defineProperty(ContactAddress, "HOME", {"value": "home"});
-Object.defineProperty(ContactAddress, "WORK", {"value": "work"});
-Object.defineProperty(ContactAddress, "OTHER", {"value": "other"});
-
-module.exports = ContactAddress;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/src/blackberry10/ContactError.js
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/src/blackberry10/ContactError.js b/spec/plugins/Contacts/src/blackberry10/ContactError.js
deleted file mode 100644
index f20f85e..0000000
--- a/spec/plugins/Contacts/src/blackberry10/ContactError.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2012 Research In Motion Limited.
- *
- * Licensed 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 ContactError = function (code, msg) {
-    this.code = code;
-    this.message = msg;
-};
-
-Object.defineProperty(ContactError, "UNKNOWN_ERROR", { "value": 0 });
-Object.defineProperty(ContactError, "INVALID_ARGUMENT_ERROR", { "value": 1 });
-Object.defineProperty(ContactError, "TIMEOUT_ERROR", { "value": 2 });
-Object.defineProperty(ContactError, "PENDING_OPERATION_ERROR", { "value": 3 });
-Object.defineProperty(ContactError, "IO_ERROR", { "value": 4 });
-Object.defineProperty(ContactError, "NOT_SUPPORTED_ERROR", { "value": 5 });
-Object.defineProperty(ContactError, "PERMISSION_DENIED_ERROR", { "value": 20 });
-
-module.exports = ContactError;
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/src/blackberry10/ContactField.js
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/src/blackberry10/ContactField.js b/spec/plugins/Contacts/src/blackberry10/ContactField.js
deleted file mode 100644
index aad735c..0000000
--- a/spec/plugins/Contacts/src/blackberry10/ContactField.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2012 Research In Motion Limited.
- *
- * Licensed 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 ContactField = function (type, value) {
-    this.type = type || "";
-    this.value = value || "";
-};
-
-Object.defineProperty(ContactField, "HOME", {"value": "home"});
-Object.defineProperty(ContactField, "WORK", {"value": "work"});
-Object.defineProperty(ContactField, "OTHER", {"value": "other"});
-Object.defineProperty(ContactField, "MOBILE", {"value": "mobile"});
-Object.defineProperty(ContactField, "DIRECT", {"value": "direct"});
-
-module.exports = ContactField;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/src/blackberry10/ContactFindOptions.js
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/src/blackberry10/ContactFindOptions.js b/spec/plugins/Contacts/src/blackberry10/ContactFindOptions.js
deleted file mode 100644
index 8be830d..0000000
--- a/spec/plugins/Contacts/src/blackberry10/ContactFindOptions.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2012 Research In Motion Limited.
- *
- * Licensed 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.
- */
-
-/**
- * ContactFindOptions.
- * @constructor
- * @param filter search fields
- * @param sort sort fields and order
- * @param limit max number of contacts to return
- * @param favorite if set, only favorite contacts will be returned
- */
-
-var ContactFindOptions = function (filter, sort, limit, favorite) {
-    this.filter = filter || null;
-    this.sort = sort || null;
-    this.limit = limit || -1; // -1 for returning all results
-    this.favorite = favorite || false;
-    this.includeAccounts = [];
-    this.excludeAccounts = [];
-};
-
-Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_GIVEN_NAME", { "value": 0 });
-Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_FAMILY_NAME", { "value": 1 });
-Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_ORGANIZATION_NAME", { "value": 2 });
-Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_PHONE", { "value": 3 });
-Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_EMAIL", { "value": 4 });
-Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_BBMPIN", { "value": 5 });
-Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_LINKEDIN", { "value": 6 });
-Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_TWITTER", { "value": 7 });
-Object.defineProperty(ContactFindOptions, "SEARCH_FIELD_VIDEO_CHAT", { "value": 8 });
-
-Object.defineProperty(ContactFindOptions, "SORT_FIELD_GIVEN_NAME", { "value": 0 });
-Object.defineProperty(ContactFindOptions, "SORT_FIELD_FAMILY_NAME", { "value": 1 });
-Object.defineProperty(ContactFindOptions, "SORT_FIELD_ORGANIZATION_NAME", { "value": 2 });
-
-module.exports = ContactFindOptions;
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/src/blackberry10/ContactName.js
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/src/blackberry10/ContactName.js b/spec/plugins/Contacts/src/blackberry10/ContactName.js
deleted file mode 100644
index 9b74753..0000000
--- a/spec/plugins/Contacts/src/blackberry10/ContactName.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2012 Research In Motion Limited.
- *
- * Licensed 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.
- */
-
-function toFormattedName(properties) {
-    var formatted = "";
-    if (properties && properties.givenName) {
-        formatted = properties.givenName;
-        if (properties && properties.familyName) {
-            formatted += " " + properties.familyName;
-        }
-    }
-    return formatted;
-}
-
-var ContactName = function (properties) {
-    this.familyName = properties && properties.familyName ? properties.familyName : "";
-    this.givenName = properties && properties.givenName ? properties.givenName : "";
-    this.formatted = toFormattedName(properties);
-    this.middleName = properties && properties.middleName ? properties.middleName : "";
-    this.honorificPrefix = properties && properties.honorificPrefix ? properties.honorificPrefix : "";
-    this.honorificSuffix = properties && properties.honorificSuffix ? properties.honorificSuffix : "";
-    this.phoneticFamilyName = properties && properties.phoneticFamilyName ? properties.phoneticFamilyName : "";
-    this.phoneticGivenName = properties && properties.phoneticGivenName ? properties.phoneticGivenName : "";
-};
-
-module.exports = ContactName;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/src/blackberry10/ContactNews.js
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/src/blackberry10/ContactNews.js b/spec/plugins/Contacts/src/blackberry10/ContactNews.js
deleted file mode 100644
index 9fb86dc..0000000
--- a/spec/plugins/Contacts/src/blackberry10/ContactNews.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2012 Research In Motion Limited.
- *
- * Licensed 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 ContactNews = function (args) {
-    this.title = args.title || "";
-    this.body = args.body || "";
-    this.articleSource = args.articleSource || "";
-    this.companies = args.companies || [];
-    this.publishedAt = new Date(parseInt(args.publishedAt, 10)) || null;
-    this.uri = args.uri || "";
-    this.type = args.type || "";
-};
-
-module.exports = ContactNews;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/src/blackberry10/ContactOrganization.js
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/src/blackberry10/ContactOrganization.js b/spec/plugins/Contacts/src/blackberry10/ContactOrganization.js
deleted file mode 100644
index 987310f..0000000
--- a/spec/plugins/Contacts/src/blackberry10/ContactOrganization.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright 2012 Research In Motion Limited.
- *
- * Licensed 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 ContactOrganization = function (properties) {
-    this.name = properties && properties.name ? properties.name : "";
-    this.department = properties && properties.department ? properties.department : "";
-    this.title = properties && properties.title ? properties.title : "";
-};
-
-module.exports = ContactOrganization;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/src/blackberry10/ContactPhoto.js
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/src/blackberry10/ContactPhoto.js b/spec/plugins/Contacts/src/blackberry10/ContactPhoto.js
deleted file mode 100644
index eeaa263..0000000
--- a/spec/plugins/Contacts/src/blackberry10/ContactPhoto.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright 2012 Research In Motion Limited.
- *
- * Licensed 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 ContactPhoto = function (originalFilePath, pref) {
-    this.originalFilePath = originalFilePath || "";
-    this.pref = pref || false;
-    this.largeFilePath = "";
-    this.smallFilePath = "";
-};
-
-module.exports = ContactPhoto;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/src/blackberry10/contactConsts.js
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/src/blackberry10/contactConsts.js b/spec/plugins/Contacts/src/blackberry10/contactConsts.js
deleted file mode 100644
index ef25206..0000000
--- a/spec/plugins/Contacts/src/blackberry10/contactConsts.js
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
-* Copyright 2012 Research In Motion Limited.
-*
-* Licensed 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 ATTRIBUTE_KIND,
-    ATTRIBUTE_SUBKIND,
-    kindAttributeMap = {},
-    subKindAttributeMap = {},
-    _TITLE = 26,
-    _START_DATE = 43,
-    _END_DATE = 44;
-
-function populateKindAttributeMap() {
-    ATTRIBUTE_KIND = {
-        Invalid: 0,
-        Phone: 1,
-        Fax: 2,
-        Pager: 3,
-        Email: 4,
-        Website: 5,
-        Feed: 6,
-        Profile: 7,
-        Family: 8,
-        Person: 9,
-        Date: 10,
-        Group: 11,
-        Name: 12,
-        StockSymbol: 13,
-        Ranking: 14,
-        OrganizationAffiliation: 15,
-        Education: 16,
-        Note: 17,
-        InstantMessaging: 18,
-        VideoChat: 19,
-        ConnectionCount: 20,
-        Hidden: 21,
-        Biography: 22,
-        Sound: 23,
-        Notification: 24,
-        MessageSound: 25,
-        MessageNotification: 26
-    };
-
-    kindAttributeMap[ATTRIBUTE_KIND.Phone] = "phoneNumbers";
-    kindAttributeMap[ATTRIBUTE_KIND.Fax] = "faxNumbers";
-    kindAttributeMap[ATTRIBUTE_KIND.Pager] = "pagerNumber";
-    kindAttributeMap[ATTRIBUTE_KIND.Email] = "emails";
-    kindAttributeMap[ATTRIBUTE_KIND.Website] = "urls";
-    kindAttributeMap[ATTRIBUTE_KIND.Profile] = "socialNetworks";
-    kindAttributeMap[ATTRIBUTE_KIND.OrganizationAffiliation] = "organizations";
-    kindAttributeMap[ATTRIBUTE_KIND.Education] = "education";
-    kindAttributeMap[ATTRIBUTE_KIND.Note] = "note";
-    kindAttributeMap[ATTRIBUTE_KIND.InstantMessaging] = "ims";
-    kindAttributeMap[ATTRIBUTE_KIND.VideoChat] = "videoChat";
-    kindAttributeMap[ATTRIBUTE_KIND.Sound] = "ringtone";
-}
-
-function populateSubKindAttributeMap() {
-    ATTRIBUTE_SUBKIND = {
-        Invalid: 0,
-        Other: 1,
-        Home: 2,
-        Work: 3,
-        PhoneMobile: 4,
-        FaxDirect: 5,
-        Blog: 6,
-        WebsiteResume: 7,
-        WebsitePortfolio: 8,
-        WebsitePersonal: 9,
-        WebsiteCompany: 10,
-        ProfileFacebook: 11,
-        ProfileTwitter: 12,
-        ProfileLinkedIn: 13,
-        ProfileGist: 14,
-        ProfileTungle: 15,
-        FamilySpouse: 16,
-        FamilyChild: 17,
-        FamilyParent: 18,
-        PersonManager: 19,
-        PersonAssistant: 20,
-        DateBirthday: 21,
-        DateAnniversary: 22,
-        GroupDepartment: 23,
-        NameGiven: 24,
-        NameSurname: 25,
-        Title: _TITLE,
-        NameSuffix: 27,
-        NameMiddle: 28,
-        NameNickname: 29,
-        NameAlias: 30,
-        NameDisplayName: 31,
-        NamePhoneticGiven: 32,
-        NamePhoneticSurname: 33,
-        StockSymbolNyse: 34,
-        StockSymbolNasdaq: 35,
-        StockSymbolTse: 36,
-        StockSymbolLse: 37,
-        StockSymbolTsx: 38,
-        RankingKlout: 39,
-        RankingTrstRank: 40,
-        OrganizationAffiliationName: 41,
-        OrganizationAffiliationPhoneticName: 42,
-        OrganizationAffiliationTitle: _TITLE,
-        StartDate: _START_DATE,
-        EndDate: _END_DATE,
-        OrganizationAffiliationDetails: 45,
-        EducationInstitutionName: 46,
-        EducationStartDate: _START_DATE,
-        EducationEndDate: _END_DATE,
-        EducationDegree: 47,
-        EducationConcentration: 48,
-        EducationActivities: 49,
-        EducationNotes: 50,
-        InstantMessagingBbmPin: 51,
-        InstantMessagingAim: 52,
-        InstantMessagingAliwangwang: 53,
-        InstantMessagingGoogleTalk: 54,
-        InstantMessagingSametime: 55,
-        InstantMessagingIcq: 56,
-        InstantMessagingIrc: 57,
-        InstantMessagingJabber: 58,
-        InstantMessagingMsLcs: 59,
-        InstantMessagingMsn: 60,
-        InstantMessagingQq: 61,
-        InstantMessagingSkype: 62,
-        InstantMessagingYahooMessenger: 63,
-        InstantMessagingYahooMessengerJapan: 64,
-        VideoChatBbPlaybook: 65,
-        HiddenLinkedIn: 66,
-        HiddenFacebook: 67,
-        HiddenTwitter: 68,
-        ConnectionCountLinkedIn: 69,
-        ConnectionCountFacebook: 70,
-        ConnectionCountTwitter: 71,
-        HiddenChecksum: 72,
-        HiddenSpeedDial: 73,
-        BiographyFacebook: 74,
-        BiographyTwitter: 75,
-        BiographyLinkedIn: 76,
-        SoundRingtone: 77,
-        SimContactType: 78,
-        EcoID: 79,
-        Personal: 80,
-        StockSymbolAll: 81,
-        NotificationVibration: 82,
-        NotificationLED: 83,
-        MessageNotificationVibration: 84,
-        MessageNotificationLED: 85,
-        MessageNotificationDuringCall: 86,
-        VideoChatPin: 87
-    };
-
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.Other] = "other";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.Home] = "home";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.Work] = "work";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.PhoneMobile] = "mobile";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.FaxDirect] = "direct";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.Blog] = "blog";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.WebsiteResume] = "resume";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.WebsitePortfolio] = "portfolio";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.WebsitePersonal] = "personal";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.WebsiteCompany] = "company";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.ProfileFacebook] = "facebook";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.ProfileTwitter] = "twitter";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.ProfileLinkedIn] = "linkedin";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.ProfileGist] = "gist";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.ProfileTungle] = "tungle";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.DateBirthday] = "birthday";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.DateAnniversary] = "anniversary";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.NameGiven] = "givenName";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.NameSurname] = "familyName";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.Title] = "honorificPrefix";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.NameSuffix] = "honorificSuffix";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.NameMiddle] = "middleName";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.NamePhoneticGiven] = "phoneticGivenName";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.NamePhoneticSurname] = "phoneticFamilyName";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.NameNickname] = "nickname";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.NameDisplayName] = "displayName";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.OrganizationAffiliationName] = "name";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.OrganizationAffiliationDetails] = "department";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.Title] = "title";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingBbmPin] = "BbmPin";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingAim] = "Aim";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingAliwangwang] = "Aliwangwang";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingGoogleTalk] = "GoogleTalk";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingSametime] = "Sametime";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingIcq] = "Icq";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingJabber] = "Jabber";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingMsLcs] = "MsLcs";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingSkype] = "Skype";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingYahooMessenger] = "YahooMessenger";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.InstantMessagingYahooMessengerJapan] = "YahooMessegerJapan";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.VideoChatBbPlaybook] = "BbPlaybook";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.SoundRingtone] = "ringtone";
-    subKindAttributeMap[ATTRIBUTE_SUBKIND.Personal] = "personal";
-}
-
-module.exports = {
-    getKindAttributeMap: function () {
-        if (!ATTRIBUTE_KIND) {
-            populateKindAttributeMap();
-        }
-
-        return kindAttributeMap;
-    },
-    getSubKindAttributeMap: function () {
-        if (!ATTRIBUTE_SUBKIND) {
-            populateSubKindAttributeMap();
-        }
-
-        return subKindAttributeMap;
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/src/blackberry10/contactUtils.js
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/src/blackberry10/contactUtils.js b/spec/plugins/Contacts/src/blackberry10/contactUtils.js
deleted file mode 100644
index cd022c4..0000000
--- a/spec/plugins/Contacts/src/blackberry10/contactUtils.js
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * Copyright 2012 Research In Motion Limited.
- *
- * Licensed 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 self,
-    ContactFindOptions = require("./ContactFindOptions"),
-    ContactError = require("./ContactError"),
-    ContactName = require("./ContactName"),
-    ContactOrganization = require("./ContactOrganization"),
-    ContactAddress = require("./ContactAddress"),
-    ContactField = require("./ContactField"),
-    contactConsts = require("./contactConsts"),
-    ContactPhoto = require("./ContactPhoto"),
-    ContactNews = require("./ContactNews"),
-    ContactActivity = require("./ContactActivity");
-
-function populateFieldArray(contactProps, field, ClassName) {
-    if (contactProps[field]) {
-        var list = [],
-        obj;
-
-        contactProps[field].forEach(function (args) {
-            if (ClassName === ContactField) {
-                list.push(new ClassName(args.type, args.value));
-            } else if (ClassName === ContactPhoto) {
-                obj = new ContactPhoto(args.originalFilePath, args.pref);
-                obj.largeFilePath = args.largeFilePath;
-                obj.smallFilePath = args.smallFilePath;
-                list.push(obj);
-            } else if (ClassName === ContactNews) {
-                obj = new ContactNews(args);
-                list.push(obj);
-            } else if (ClassName === ContactActivity) {
-                obj = new ContactActivity(args);
-                list.push(obj);
-            } else {
-                list.push(new ClassName(args));
-            }
-        });
-        contactProps[field] = list;
-    }
-}
-
-function populateDate(contactProps, field) {
-    if (contactProps[field]) {
-        contactProps[field] = new Date(contactProps[field]);
-    }
-}
-
-function validateFindArguments(findOptions) {
-    var error = false;
-    
-    // findOptions is mandatory
-    if (!findOptions) {
-        error = true;
-    } else {
-        // findOptions.filter is optional
-        if (findOptions.filter) {
-            findOptions.filter.forEach(function (f) {
-                switch (f.fieldName) {
-                case ContactFindOptions.SEARCH_FIELD_GIVEN_NAME:
-                case ContactFindOptions.SEARCH_FIELD_FAMILY_NAME:
-                case ContactFindOptions.SEARCH_FIELD_ORGANIZATION_NAME:
-                case ContactFindOptions.SEARCH_FIELD_PHONE:
-                case ContactFindOptions.SEARCH_FIELD_EMAIL:
-                case ContactFindOptions.SEARCH_FIELD_BBMPIN:
-                case ContactFindOptions.SEARCH_FIELD_LINKEDIN:
-                case ContactFindOptions.SEARCH_FIELD_TWITTER:
-                case ContactFindOptions.SEARCH_FIELD_VIDEO_CHAT:
-                    break;
-                default:
-                    error = true;
-                }
-
-                if (!f.fieldValue) {
-                    error = true;
-                }
-            });
-        } 
-
-        //findOptions.limit is optional
-        if (findOptions.limit) {
-            if (typeof findOptions.limit !== "number") {
-                error = true;
-            } 
-        } 
-
-        //findOptions.favorite is optional
-        if (findOptions.favorite) {
-            if (typeof findOptions.favorite !== "boolean") {
-                error = true;
-            }
-        }
-
-        // findOptions.sort is optional
-        if (!error && findOptions.sort && Array.isArray(findOptions.sort)) {
-            findOptions.sort.forEach(function (s) {
-                switch (s.fieldName) {
-                case ContactFindOptions.SORT_FIELD_GIVEN_NAME:
-                case ContactFindOptions.SORT_FIELD_FAMILY_NAME:
-                case ContactFindOptions.SORT_FIELD_ORGANIZATION_NAME:
-                    break;
-                default:
-                    error = true;
-                }
-
-                if (s.desc === undefined || typeof s.desc !== "boolean") {
-                    error = true;
-                }
-            });
-        }
-
-        if (!error && findOptions.includeAccounts) {
-            if (!Array.isArray(findOptions.includeAccounts)) {
-                error = true;
-            } else {
-                findOptions.includeAccounts.forEach(function (acct) {
-                    if (!error && (!acct.id || window.isNaN(window.parseInt(acct.id, 10)))) {
-                        error = true;
-                    }
-                });
-            }
-        }
-
-        if (!error && findOptions.excludeAccounts) {
-            if (!Array.isArray(findOptions.excludeAccounts)) {
-                error = true;
-            } else {
-                findOptions.excludeAccounts.forEach(function (acct) {
-                    if (!error && (!acct.id || window.isNaN(window.parseInt(acct.id, 10)))) {
-                        error = true;
-                    }
-                });
-            }
-        }
-    }
-    return !error;
-}
-
-function validateContactsPickerFilter(filter) {
-    var isValid = true,
-        availableFields = {};
-
-    if (typeof(filter) === "undefined") {
-        isValid = false;
-    } else {
-        if (filter && Array.isArray(filter)) {
-            availableFields = contactConsts.getKindAttributeMap();
-            filter.forEach(function (e) {
-                isValid = isValid && Object.getOwnPropertyNames(availableFields).reduce(
-                    function (found, key) {
-                        return found || availableFields[key] === e;
-                    }, false);
-            });
-        }
-    }
-
-    return isValid;
-}
-
-function validateContactsPickerOptions(options) {
-    var isValid = false,
-        mode = options.mode;
-
-    if (typeof(options) === "undefined") {
-        isValid = false;
-    } else {
-        isValid = mode === ContactPickerOptions.MODE_SINGLE || mode === ContactPickerOptions.MODE_MULTIPLE || mode === ContactPickerOptions.MODE_ATTRIBUTE;
-
-        // if mode is attribute, fields must be defined
-        if (mode === ContactPickerOptions.MODE_ATTRIBUTE && !validateContactsPickerFilter(options.fields)) {
-            isValid = false;
-        }
-    }
-
-    return isValid;
-}
-
-self = module.exports = {
-    populateContact: function (contact) {
-        if (contact.name) {
-            contact.name = new ContactName(contact.name);
-        }
-
-        populateFieldArray(contact, "addresses", ContactAddress);
-        populateFieldArray(contact, "organizations", ContactOrganization);
-        populateFieldArray(contact, "emails", ContactField);
-        populateFieldArray(contact, "phoneNumbers", ContactField);
-        populateFieldArray(contact, "faxNumbers", ContactField);
-        populateFieldArray(contact, "pagerNumbers", ContactField);
-        populateFieldArray(contact, "ims", ContactField);
-        populateFieldArray(contact, "socialNetworks", ContactField);
-        populateFieldArray(contact, "urls", ContactField);
-        populateFieldArray(contact, "photos", ContactPhoto);
-        populateFieldArray(contact, "news", ContactNews);
-        populateFieldArray(contact, "activities", ContactActivity);
-        // TODO categories
-
-        populateDate(contact, "birthday");
-        populateDate(contact, "anniversary");
-    },
-    invokeErrorCallback: function (errorCallback, code) {
-        if (errorCallback) {
-            errorCallback(new ContactError(code));
-        }
-    },
-    validateFindArguments: validateFindArguments,
-    validateContactsPickerFilter: validateContactsPickerFilter,
-    validateContactsPickerOptions: validateContactsPickerOptions
-};
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/src/blackberry10/index.js
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/src/blackberry10/index.js b/spec/plugins/Contacts/src/blackberry10/index.js
deleted file mode 100644
index 09a4bd2..0000000
--- a/spec/plugins/Contacts/src/blackberry10/index.js
+++ /dev/null
@@ -1,374 +0,0 @@
-/*
- * Copyright 2013 Research In Motion Limited.
- *
- * Licensed 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 pimContacts,
-    contactUtils = require("./contactUtils"),
-    contactConsts = require("./contactConsts"),
-    ContactError = require("./ContactError"),
-    ContactName = require("./ContactName"),
-    ContactFindOptions = require("./ContactFindOptions"),
-    noop = function () {};
-
-function getAccountFilters(options) {
-    if (options.includeAccounts) {
-        options.includeAccounts = options.includeAccounts.map(function (acct) {
-            return acct.id.toString();
-        });
-    }
-
-    if (options.excludeAccounts) {
-        options.excludeAccounts = options.excludeAccounts.map(function (acct) {
-            return acct.id.toString();
-        });
-    }
-}
-
-function populateSearchFields(fields) {
-    var i,
-        l,
-        key,
-        searchFieldsObject = {},
-        searchFields = [];
-
-    for (i = 0, l = fields.length; i < l; i++) {
-        if (fields[i] === "*") {
-            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_GIVEN_NAME] = true;
-            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_FAMILY_NAME] = true;
-            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_PHONE] = true;
-            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_EMAIL] = true;
-            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_ORGANIZATION_NAME] = true;
-        } else if (fields[i] === "displayName" || fields[i] === "name") {
-            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_GIVEN_NAME] = true;
-            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_FAMILY_NAME] = true;
-        } else if (fields[i] === "nickname") {
-            // not supported by Cascades
-        } else if (fields[i] === "phoneNumbers") {
-            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_PHONE] = true;
-        } else if (fields[i] === "emails") {
-            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_EMAIL] = true;
-        } else if (field === "addresses") {
-            // not supported by Cascades
-        } else if (field === "ims") {
-            // not supported by Cascades
-        } else if (field === "organizations") {
-            searchFieldsObject[ContactFindOptions.SEARCH_FIELD_ORGANIZATION_NAME] = true;
-        } else if (field === "birthday") {
-            // not supported by Cascades
-        } else if (field === "note") {
-            // not supported by Cascades
-        } else if (field === "photos") {
-            // not supported by Cascades
-        } else if (field === "categories") {
-            // not supported by Cascades
-        } else if (field === "urls") {
-            // not supported by Cascades
-        }
-    }
-
-    for (key in searchFieldsObject) {
-        if (searchFieldsObject.hasOwnProperty(key)) {
-            searchFields.push(window.parseInt(key));
-        }
-    }
-
-    return searchFields;
-}
-
-function convertBirthday(birthday) {
-    //Convert date string from native to milliseconds since epoch for cordova-js
-    var birthdayInfo;
-    if (birthday) {
-        birthdayInfo = birthday.split("-");
-        return new Date(birthdayInfo[0], birthdayInfo[1] - 1, birthdayInfo[2]).getTime();
-    } else {
-        return null;
-    }
-}
-
-function processJnextSaveData(result, JnextData) {
-    var data = JnextData,
-        birthdayInfo;
-
-    if (data._success === true) {
-        data.birthday = convertBirthday(data.birthday);
-        result.callbackOk(data, false);
-    } else {
-        result.callbackError(data.code, false);
-    }
-}
-
-function processJnextRemoveData(result, JnextData) {
-    var data = JnextData;
-
-    if (data._success === true) {
-        result.callbackOk(data);
-    } else {
-        result.callbackError(ContactError.UNKNOWN_ERROR, false);
-    }
-}
-
-function processJnextFindData(eventId, eventHandler, JnextData) {
-    var data = JnextData,
-        i,
-        l,
-        more = false,
-        resultsObject = {},
-        birthdayInfo;
-
-    if (data.contacts) {
-        for (i = 0, l = data.contacts.length; i < l; i++) {
-            data.contacts[i].birthday = convertBirthday(data.contacts[i].birthday);
-            data.contacts[i].name = new ContactName(data.contacts[i].name);
-        }
-    } else {
-        data.contacts = []; // if JnextData.contacts return null, return an empty array
-    }
-
-    if (data._success === true) {
-        eventHandler.error = false;
-    }
-
-    if (eventHandler.multiple) {
-        // Concatenate results; do not add the same contacts
-        for (i = 0, l = eventHandler.searchResult.length; i < l; i++) {
-            resultsObject[eventHandler.searchResult[i].id] = true;
-        }
-
-        for (i = 0, l = data.contacts.length; i < l; i++) {
-            if (resultsObject[data.contacts[i].id]) {
-                // Already existing
-            } else {
-                eventHandler.searchResult.push(data.contacts[i]);
-            }
-        }
-
-        // check if more search is required
-        eventHandler.searchFieldIndex++;
-        if (eventHandler.searchFieldIndex < eventHandler.searchFields.length) {
-            more = true;
-        }
-    } else {
-        eventHandler.searchResult = data.contacts;
-    }
-
-    if (more) {
-        pimContacts.getInstance().invokeJnextSearch(eventId);
-    } else {
-        if (eventHandler.error) {
-            eventHandler.result.callbackError(data.code, false);
-        } else {
-            eventHandler.result.callbackOk(eventHandler.searchResult, false);
-        }
-    }
-}
-
-module.exports = {
-    search: function (successCb, failCb, args, env) {
-        var cordovaFindOptions = {},
-            result = new PluginResult(args, env),
-            key;
-
-        for (key in args) {
-            if (args.hasOwnProperty(key)) {
-                cordovaFindOptions[key] = JSON.parse(decodeURIComponent(args[key]));
-            }
-        }
-
-        pimContacts.getInstance().find(cordovaFindOptions, result, processJnextFindData);
-        result.noResult(true);
-    },
-    save: function (successCb, failCb, args, env) {
-        var attributes = {},
-            result = new PluginResult(args, env),
-            key,
-            nativeEmails = [];
-
-        attributes = JSON.parse(decodeURIComponent(args[0]));
-
-        //convert birthday format for our native .so file
-        if (attributes.birthday) {
-            attributes.birthday = new Date(attributes.birthday).toDateString();
-        }
-
-        if (attributes.emails) {
-            attributes.emails.forEach(function (email) {
-                if (email.value) {
-                    if (email.type) {
-                        nativeEmails.push({ "type" : email.type, "value" : email.value });
-                    } else {
-                        nativeEmails.push({ "type" : "home", "value" : email.value });
-                    }
-                }
-            });
-            attributes.emails = nativeEmails;
-        }
-
-        if (attributes.id !== null) {
-            attributes.id = window.parseInt(attributes.id);
-        }
-
-        attributes._eventId = result.callbackId;
-        pimContacts.getInstance().save(attributes, result, processJnextSaveData);
-        result.noResult(true);
-    },
-    remove: function (successCb, failCb, args, env) {
-        var result = new PluginResult(args, env),
-            attributes = {
-                "contactId": window.parseInt(JSON.parse(decodeURIComponent(args[0]))),
-                "_eventId": result.callbackId
-            };
-
-        if (!window.isNaN(attributes.contactId)) {
-            pimContacts.getInstance().remove(attributes, result, processJnextRemoveData);
-            result.noResult(true);
-        } else {
-            result.error(ContactError.UNKNOWN_ERROR);
-            result.noResult(false);
-        }
-    }
-};
-
-///////////////////////////////////////////////////////////////////
-// JavaScript wrapper for JNEXT plugin
-///////////////////////////////////////////////////////////////////
-
-JNEXT.PimContacts = function ()
-{
-    var self = this,
-        hasInstance = false;
-
-    self.find = function (cordovaFindOptions, pluginResult, handler) {
-        //register find eventHandler for when JNEXT onEvent fires
-        self.eventHandlers[cordovaFindOptions.callbackId] = {
-            "result" : pluginResult,
-            "action" : "find",
-            "multiple" : cordovaFindOptions[1].filter ? true : false,
-            "fields" : cordovaFindOptions[0],
-            "searchFilter" : cordovaFindOptions[1].filter,
-            "searchFields" : cordovaFindOptions[1].filter ? populateSearchFields(cordovaFindOptions[0]) : null,
-            "searchFieldIndex" : 0,
-            "searchResult" : [],
-            "handler" : handler,
-            "error" : true
-        };
-
-        self.invokeJnextSearch(cordovaFindOptions.callbackId);
-        return "";
-    };
-
-    self.invokeJnextSearch = function(eventId) {
-        var jnextArgs = {},
-            findHandler = self.eventHandlers[eventId];
-
-        jnextArgs._eventId = eventId;
-        jnextArgs.fields = findHandler.fields;
-        jnextArgs.options = {};
-        jnextArgs.options.filter = [];
-
-        if (findHandler.multiple) {
-            jnextArgs.options.filter.push({
-                "fieldName" : findHandler.searchFields[findHandler.searchFieldIndex],
-                "fieldValue" : findHandler.searchFilter
-            });
-            //findHandler.searchFieldIndex++;
-        }
-
-        JNEXT.invoke(self.m_id, "find " + JSON.stringify(jnextArgs));
-    }
-
-    self.getContact = function (args) {
-        return JSON.parse(JNEXT.invoke(self.m_id, "getContact " + JSON.stringify(args)));
-    };
-
-    self.save = function (args, pluginResult, handler) {
-        //register save eventHandler for when JNEXT onEvent fires
-        self.eventHandlers[args._eventId] = {
-            "result" : pluginResult,
-            "action" : "save",
-            "handler" : handler
-        };
-        JNEXT.invoke(self.m_id, "save " + JSON.stringify(args));
-        return "";
-    };
-
-    self.remove = function (args, pluginResult, handler) {
-        //register remove eventHandler for when JNEXT onEvent fires
-        self.eventHandlers[args._eventId] = {
-            "result" : pluginResult,
-            "action" : "remove",
-            "handler" : handler
-        };
-        JNEXT.invoke(self.m_id, "remove " + JSON.stringify(args));
-        return "";
-    };
-
-    self.getId = function () {
-        return self.m_id;
-    };
-
-    self.getContactAccounts = function () {
-        var value = JNEXT.invoke(self.m_id, "getContactAccounts");
-        return JSON.parse(value);
-    };
-
-    self.init = function () {
-        if (!JNEXT.require("libpimcontacts")) {
-            return false;
-        }
-
-        self.m_id = JNEXT.createObject("libpimcontacts.PimContacts");
-
-        if (self.m_id === "") {
-            return false;
-        }
-
-        JNEXT.registerEvents(self);
-    };
-
-    // Handle data coming back from JNEXT native layer. Each async function registers a handler and a PluginResult object.
-    // When JNEXT fires onEvent we parse the result string  back into JSON and trigger the appropriate handler (eventHandlers map
-    // uses callbackId as key), along with the actual data coming back from the native layer. Each function may have its own way of
-    // processing native data so we do not do any processing here.
-
-    self.onEvent = function (strData) {
-        var arData = strData.split(" "),
-            strEventDesc = arData[0],
-            eventHandler,
-            args = {};
-
-        if (strEventDesc === "result") {
-            args.result = escape(strData.split(" ").slice(2).join(" "));
-            eventHandler = self.eventHandlers[arData[1]];
-            if (eventHandler.action === "save" || eventHandler.action === "remove") {
-                eventHandler.handler(eventHandler.result, JSON.parse(decodeURIComponent(args.result)));
-            } else if (eventHandler.action === "find") {
-                eventHandler.handler(arData[1], eventHandler, JSON.parse(decodeURIComponent(args.result)));
-            }
-        }
-    };
-
-    self.m_id = "";
-    self.eventHandlers = {};
-
-    self.getInstance = function () {
-        if (!hasInstance) {
-            self.init();
-            hasInstance = true;
-        }
-        return self;
-    };
-};
-
-pimContacts = new JNEXT.PimContacts();

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/src/blackberry10/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/src/blackberry10/plugin.xml b/spec/plugins/Contacts/src/blackberry10/plugin.xml
deleted file mode 100644
index d163585..0000000
--- a/spec/plugins/Contacts/src/blackberry10/plugin.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed 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.
-
--->
-
-<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
-    id="org.apache.cordova.core.Contacts"
-    version="0.0.1">
-
-    <name>Contacts</name>
-
-    <platform name="blackberry10">
-        <config-file target="www/config.xml" parent="/widget">
-            <feature name="Contacts" value="Contacts"/>
-        </config-file>
-        <source-file src="src/blackberry10/index.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactActivity.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactAddress.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/contactConsts.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactError.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactField.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactFindOptions.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactName.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactNews.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactOrganization.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/ContactPhoto.js" target-dir="Contacts"></source-file>
-        <source-file src="src/blackberry10/contactUtils.js" target-dir="Contacts"></source-file>
-      </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/src/ios/CDVContact.h
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/src/ios/CDVContact.h b/spec/plugins/Contacts/src/ios/CDVContact.h
deleted file mode 100644
index 5187efc..0000000
--- a/spec/plugins/Contacts/src/ios/CDVContact.h
+++ /dev/null
@@ -1,136 +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.
- */
-
-#import <Foundation/Foundation.h>
-#import <AddressBook/ABAddressBook.h>
-#import <AddressBookUI/AddressBookUI.h>
-
-enum CDVContactError {
-    UNKNOWN_ERROR = 0,
-    INVALID_ARGUMENT_ERROR = 1,
-    TIMEOUT_ERROR = 2,
-    PENDING_OPERATION_ERROR = 3,
-    IO_ERROR = 4,
-    NOT_SUPPORTED_ERROR = 5,
-    PERMISSION_DENIED_ERROR = 20
-};
-typedef NSUInteger CDVContactError;
-
-@interface CDVContact : NSObject {
-    ABRecordRef record;         // the ABRecord associated with this contact
-    NSDictionary* returnFields; // dictionary of fields to return when performing search
-}
-
-@property (nonatomic, assign) ABRecordRef record;
-@property (nonatomic, strong) NSDictionary* returnFields;
-
-+ (NSDictionary*)defaultABtoW3C;
-+ (NSDictionary*)defaultW3CtoAB;
-+ (NSSet*)defaultW3CtoNull;
-+ (NSDictionary*)defaultObjectAndProperties;
-+ (NSDictionary*)defaultFields;
-
-+ (NSDictionary*)calcReturnFields:(NSArray*)fields;
-- (id)init;
-- (id)initFromABRecord:(ABRecordRef)aRecord;
-- (bool)setFromContactDict:(NSDictionary*)aContact asUpdate:(BOOL)bUpdate;
-
-+ (BOOL)needsConversion:(NSString*)W3Label;
-+ (CFStringRef)convertContactTypeToPropertyLabel:(NSString*)label;
-+ (NSString*)convertPropertyLabelToContactType:(NSString*)label;
-+ (BOOL)isValidW3ContactType:(NSString*)label;
-- (bool)setValue:(id)aValue forProperty:(ABPropertyID)aProperty inRecord:(ABRecordRef)aRecord asUpdate:(BOOL)bUpdate;
-
-- (NSDictionary*)toDictionary:(NSDictionary*)withFields;
-- (NSNumber*)getDateAsNumber:(ABPropertyID)datePropId;
-- (NSObject*)extractName;
-- (NSObject*)extractMultiValue:(NSString*)propertyId;
-- (NSObject*)extractAddresses;
-- (NSObject*)extractIms;
-- (NSObject*)extractOrganizations;
-- (NSObject*)extractPhotos;
-
-- (NSMutableDictionary*)translateW3Dict:(NSDictionary*)dict forProperty:(ABPropertyID)prop;
-- (bool)setMultiValueStrings:(NSArray*)fieldArray forProperty:(ABPropertyID)prop inRecord:(ABRecordRef)person asUpdate:(BOOL)bUpdate;
-- (bool)setMultiValueDictionary:(NSArray*)array forProperty:(ABPropertyID)prop inRecord:(ABRecordRef)person asUpdate:(BOOL)bUpdate;
-- (ABMultiValueRef)allocStringMultiValueFromArray:array;
-- (ABMultiValueRef)allocDictMultiValueFromArray:array forProperty:(ABPropertyID)prop;
-- (BOOL)foundValue:(NSString*)testValue inFields:(NSDictionary*)searchFields;
-- (BOOL)testStringValue:(NSString*)testValue forW3CProperty:(NSString*)property;
-- (BOOL)testDateValue:(NSString*)testValue forW3CProperty:(NSString*)property;
-- (BOOL)searchContactFields:(NSArray*)fields forMVStringProperty:(ABPropertyID)propId withValue:testValue;
-- (BOOL)testMultiValueStrings:(NSString*)testValue forProperty:(ABPropertyID)propId ofType:(NSString*)type;
-- (NSArray*)valuesForProperty:(ABPropertyID)propId inRecord:(ABRecordRef)aRecord;
-- (NSArray*)labelsForProperty:(ABPropertyID)propId inRecord:(ABRecordRef)aRecord;
-- (BOOL)searchContactFields:(NSArray*)fields forMVDictionaryProperty:(ABPropertyID)propId withValue:(NSString*)testValue;
-
-@end
-
-// generic ContactField types
-#define kW3ContactFieldType @"type"
-#define kW3ContactFieldValue @"value"
-#define kW3ContactFieldPrimary @"pref"
-// Various labels for ContactField types
-#define kW3ContactWorkLabel @"work"
-#define kW3ContactHomeLabel @"home"
-#define kW3ContactOtherLabel @"other"
-#define kW3ContactPhoneFaxLabel @"fax"
-#define kW3ContactPhoneMobileLabel @"mobile"
-#define kW3ContactPhonePagerLabel @"pager"
-#define kW3ContactUrlBlog @"blog"
-#define kW3ContactUrlProfile @"profile"
-#define kW3ContactImAIMLabel @"aim"
-#define kW3ContactImICQLabel @"icq"
-#define kW3ContactImMSNLabel @"msn"
-#define kW3ContactImYahooLabel @"yahoo"
-#define kW3ContactFieldId @"id"
-// special translation for IM field value and type
-#define kW3ContactImType @"type"
-#define kW3ContactImValue @"value"
-
-// Contact object
-#define kW3ContactId @"id"
-#define kW3ContactName @"name"
-#define kW3ContactFormattedName @"formatted"
-#define kW3ContactGivenName @"givenName"
-#define kW3ContactFamilyName @"familyName"
-#define kW3ContactMiddleName @"middleName"
-#define kW3ContactHonorificPrefix @"honorificPrefix"
-#define kW3ContactHonorificSuffix @"honorificSuffix"
-#define kW3ContactDisplayName @"displayName"
-#define kW3ContactNickname @"nickname"
-#define kW3ContactPhoneNumbers @"phoneNumbers"
-#define kW3ContactAddresses @"addresses"
-#define kW3ContactAddressFormatted @"formatted"
-#define kW3ContactStreetAddress @"streetAddress"
-#define kW3ContactLocality @"locality"
-#define kW3ContactRegion @"region"
-#define kW3ContactPostalCode @"postalCode"
-#define kW3ContactCountry @"country"
-#define kW3ContactEmails @"emails"
-#define kW3ContactIms @"ims"
-#define kW3ContactOrganizations @"organizations"
-#define kW3ContactOrganizationName @"name"
-#define kW3ContactTitle @"title"
-#define kW3ContactDepartment @"department"
-#define kW3ContactBirthday @"birthday"
-#define kW3ContactNote @"note"
-#define kW3ContactPhotos @"photos"
-#define kW3ContactCategories @"categories"
-#define kW3ContactUrls @"urls"


[48/70] Remove all cordova-lib files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/platforms/ios.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/ios.js b/cordova-lib/src/plugman/platforms/ios.js
deleted file mode 100644
index 4f570c3..0000000
--- a/cordova-lib/src/plugman/platforms/ios.js
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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 path = require('path')
-  , fs   = require('fs')
-  , glob = require('glob')
-  , xcode = require('xcode')
-  , plist = require('plist-with-patches')
-  , shell = require('shelljs')
-  , events = require('../events')
-  , cachedProjectFiles = {};
-
-module.exports = {
-    www_dir:function(project_dir) {
-        return path.join(project_dir, 'www');
-    },
-    package_name:function(project_dir) {
-        var plist_file = glob.sync(path.join(project_dir, '**', '*-Info.plist'))[0];
-        return plist.parseFileSync(plist_file).CFBundleIdentifier;
-    },
-    "source-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id, project) {
-            var src = source_el.attrib['src'];
-            var srcFile = path.resolve(plugin_dir, src);
-            var targetDir = path.resolve(project.plugins_dir, plugin_id, getRelativeDir(source_el));
-            var destFile = path.resolve(targetDir, path.basename(src));
-            var is_framework = source_el.attrib['framework'] && (source_el.attrib['framework'] == 'true' || source_el.attrib['framework'] == true);
-            var has_flags = source_el.attrib['compiler-flags'] && source_el.attrib['compiler-flags'].length ? true : false ;
-
-            if (!fs.existsSync(srcFile)) throw new Error('cannot find "' + srcFile + '" ios <source-file>');
-            if (fs.existsSync(destFile)) throw new Error('target destination "' + destFile + '" already exists');
-            var project_ref = path.join('Plugins', path.relative(project.plugins_dir, destFile));
-
-            if (is_framework) {
-                var weak = source_el.attrib['weak'];
-                var opt = { weak: (weak == undefined || weak == null || weak != 'true' ? false : true ) };
-                var project_relative = path.join(path.basename(project.xcode_path), project_ref);
-                project.xcode.addFramework(project_relative, opt);
-                project.xcode.addToLibrarySearchPaths({path:project_ref});
-            } else {
-                project.xcode.addSourceFile(project_ref, has_flags ? {compilerFlags:source_el.attrib['compiler-flags']} : {});
-            }
-            shell.mkdir('-p', targetDir);
-            shell.cp(srcFile, destFile);
-        },
-        uninstall:function(source_el, project_dir, plugin_id, project) {
-            var src = source_el.attrib['src'];
-            var targetDir = path.resolve(project.plugins_dir, plugin_id, getRelativeDir(source_el));
-            var destFile = path.resolve(targetDir, path.basename(src));
-            var is_framework = source_el.attrib['framework'] && (source_el.attrib['framework'] == 'true' || source_el.attrib['framework'] == true);
-
-            var project_ref = path.join('Plugins', path.relative(project.plugins_dir, destFile));
-            project.xcode.removeSourceFile(project_ref);
-            if (is_framework) {
-                var project_relative = path.join(path.basename(project.xcode_path), project_ref);
-                project.xcode.removeFramework(project_relative);
-                project.xcode.removeFromLibrarySearchPaths({path:project_ref});
-            }
-            shell.rm('-rf', destFile);
-
-            if(fs.existsSync(targetDir) && fs.readdirSync(targetDir).length>0){
-                shell.rm('-rf', targetDir);
-            }
-        }
-    },
-    "header-file":{
-        install:function(header_el, plugin_dir, project_dir, plugin_id, project) {
-            var src = header_el.attrib['src'];
-            var srcFile = path.resolve(plugin_dir, src);
-            var targetDir = path.resolve(project.plugins_dir, plugin_id, getRelativeDir(header_el));
-            var destFile = path.resolve(targetDir, path.basename(src));
-            if (!fs.existsSync(srcFile)) throw new Error('cannot find "' + srcFile + '" ios <header-file>');
-            if (fs.existsSync(destFile)) throw new Error('target destination "' + destFile + '" already exists');
-            project.xcode.addHeaderFile(path.join('Plugins', path.relative(project.plugins_dir, destFile)));
-            shell.mkdir('-p', targetDir);
-            shell.cp(srcFile, destFile);
-        },
-        uninstall:function(header_el, project_dir, plugin_id, project) {
-            var src = header_el.attrib['src'];
-            var targetDir = path.resolve(project.plugins_dir, plugin_id, getRelativeDir(header_el));
-            var destFile = path.resolve(targetDir, path.basename(src));
-            project.xcode.removeHeaderFile(path.join('Plugins', path.relative(project.plugins_dir, destFile)));
-            shell.rm('-rf', destFile);
-            if(fs.existsSync(targetDir) && fs.readdirSync(targetDir).length>0){
-                shell.rm('-rf', targetDir);
-            }
-        }
-    },
-    "resource-file":{
-        install:function(resource_el, plugin_dir, project_dir, plugin_id, project) {
-            var src = resource_el.attrib['src'],
-                srcFile = path.resolve(plugin_dir, src),
-                destFile = path.resolve(project.resources_dir, path.basename(src));
-            if (!fs.existsSync(srcFile)) throw new Error('cannot find "' + srcFile + '" ios <resource-file>');
-            if (fs.existsSync(destFile)) throw new Error('target destination "' + destFile + '" already exists');
-            project.xcode.addResourceFile(path.join('Resources', path.basename(src)));
-            shell.cp('-R', srcFile, project.resources_dir);
-        },
-        uninstall:function(resource_el, project_dir, plugin_id, project) {
-            var src = resource_el.attrib['src'],
-                destFile = path.resolve(project.resources_dir, path.basename(src));
-            project.xcode.removeResourceFile(path.join('Resources', path.basename(src)));
-            shell.rm('-rf', destFile);
-        }
-    },
-    "framework":{ // CB-5238 custom frameworks only
-        install:function(framework_el, plugin_dir, project_dir, plugin_id, project) {
-            var src = framework_el.attrib['src'],
-                custom = framework_el.attrib['custom'],
-                srcFile = path.resolve(plugin_dir, src),
-                targetDir = path.resolve(project.plugins_dir, plugin_id, path.basename(src));
-            if (!custom) throw new Error('cannot add non custom frameworks.');
-            if (!fs.existsSync(srcFile)) throw new Error('cannot find "' + srcFile + '" ios <framework>');
-            if (fs.existsSync(targetDir)) throw new Error('target destination "' + targetDir + '" already exists');
-            shell.mkdir('-p', path.dirname(targetDir));
-            shell.cp('-R', srcFile, path.dirname(targetDir)); // frameworks are directories
-            var project_relative = path.relative(project_dir, targetDir);
-            project.xcode.addFramework(project_relative, {customFramework: true});
-        },
-        uninstall:function(framework_el, project_dir, plugin_id, project) {
-            var src = framework_el.attrib['src'],
-                targetDir = path.resolve(project.plugins_dir, plugin_id, path.basename(src));
-            project.xcode.removeFramework(targetDir, {customFramework: true});
-            shell.rm('-rf', targetDir);
-        }
-    },
-    "lib-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.install is not supported for ios');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.uninstall is not supported for ios');
-        }
-    },
-    parseProjectFile:function(project_dir) {
-        // TODO: With ConfigKeeper introduced in config-changes.js
-        // there is now double caching of iOS project files.
-        // Remove the cache here when install can handle
-        // a list of plugins at once.
-        if (cachedProjectFiles[project_dir]) {
-            return cachedProjectFiles[project_dir];
-        }
-        // grab and parse pbxproj
-        // we don't want CordovaLib's xcode project
-        var project_files = glob.sync(path.join(project_dir, '*.xcodeproj', 'project.pbxproj'));
-
-        if (project_files.length === 0) {
-            throw new Error("does not appear to be an xcode project (no xcode project file)");
-        }
-        var pbxPath = project_files[0];
-        var xcodeproj = xcode.project(pbxPath);
-        xcodeproj.parseSync();
-
-        // grab and parse plist file or config.xml
-        var config_files = (glob.sync(path.join(project_dir, '**', '{PhoneGap,Cordova}.plist')).length == 0 ?
-                            glob.sync(path.join(project_dir, '**', 'config.xml')) :
-                            glob.sync(path.join(project_dir, '**', '{PhoneGap,Cordova}.plist'))
-                           );
-
-        config_files = config_files.filter(function (val) {
-            return !(/^build\//.test(val)) && !(/\/www\/config.xml$/.test(val));
-        });
-
-        if (config_files.length === 0) {
-            throw new Error("could not find PhoneGap/Cordova plist file, or config.xml file.");
-        }
-
-        var config_file = config_files[0];
-        var config_filename = path.basename(config_file);
-        var xcode_dir = path.dirname(config_file);
-        var pluginsDir = path.resolve(xcode_dir, 'Plugins');
-        var resourcesDir = path.resolve(xcode_dir, 'Resources');
-
-        cachedProjectFiles[project_dir] = {
-            plugins_dir:pluginsDir,
-            resources_dir:resourcesDir,
-            xcode:xcodeproj,
-            xcode_path:xcode_dir,
-            pbx: pbxPath,
-            write: function () {
-                fs.writeFileSync(pbxPath, xcodeproj.writeSync());
-            }
-        };
-
-        return cachedProjectFiles[project_dir];
-    },
-    purgeProjectFileCache:function(project_dir) {
-        delete cachedProjectFiles[project_dir];
-    }
-
-};
-
-function getRelativeDir(file) {
-    var targetDir = file.attrib['target-dir'];
-    if (targetDir) {
-        return targetDir;
-    } else {
-        return '';
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/platforms/tizen.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/tizen.js b/cordova-lib/src/plugman/platforms/tizen.js
deleted file mode 100644
index efbeba9..0000000
--- a/cordova-lib/src/plugman/platforms/tizen.js
+++ /dev/null
@@ -1,72 +0,0 @@
-var path = require('path')
-    , fs = require('fs')
-    , common = require('./common')
-    , events = require('../events')
-    , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
-
-module.exports = {
-    www_dir: function(project_dir) {
-        return path.join(project_dir, 'www');
-    },
-    package_name:function(project_dir) {
-        // preferred location if cordova >= 3.4
-        var preferred_path = path.join(project_dir, 'config.xml');
-        if (!fs.existsSync(preferred_path)) {
-            // older location
-            old_config_path = path.join(module.exports.www_dir(project_dir), 'config.xml');
-            if (!fs.existsSync(old_config_path)) {
-                // output newer location and fail reading
-                config_path = preferred_path;
-                events.emit('verbose', 'unable to find '+config_path);
-            } else {
-                config_path = old_config_path;
-            }
-        } else {
-            config_path = preferred_path;
-        }
-        var widget_doc = xml_helpers.parseElementtreeSync(config_path);
-        return widget_doc._root.attrib['id'];
-    },
-    "source-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
-            common.copyFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
-            common.removeFile(project_dir, dest);
-        }
-    },
-    "header-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'header-fileinstall is not supported for firefoxos');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'header-file.uninstall is not supported for firefoxos');
-        }
-    },
-    "resource-file":{
-        install:function(el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'resource-file.install is not supported for firefoxos');
-        },
-        uninstall:function(el, project_dir, plugin_id) {
-            events.emit('verbose', 'resource-file.uninstall is not supported for firefoxos');
-        }
-    },
-    "framework": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.install is not supported for firefoxos');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.uninstall is not supported for firefoxos');
-        }
-    },
-    "lib-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.install is not supported for firefoxos');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.uninstall is not supported for firefoxos');
-        }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/platforms/ubuntu.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/ubuntu.js b/cordova-lib/src/plugman/platforms/ubuntu.js
deleted file mode 100644
index d04b774..0000000
--- a/cordova-lib/src/plugman/platforms/ubuntu.js
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- *
- * Copyright 2013 Canonical Ltd.
- *
- * Licensed 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.
- *
-*/
-
-function replaceAt(str, index, char) {
-    return str.substr(0, index) + char + str.substr(index + char.length);
-}
-
-function toCamelCase(str) {
-    return str.split('-').map(function(str) {
-        return replaceAt(str, 0, str[0].toUpperCase());
-    }).join('');
-}
-
-var fs = require('fs')
-   , path = require('path')
-   , events = require('../events')
-   , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
-
-module.exports = {
-    www_dir:function(project_dir) {
-        return path.join(project_dir, 'www');
-    },
-
-    package_name:function (project_dir) {
-        var config_path = path.join(project_dir, 'config.xml');
-        var widget_doc = xml_helpers.parseElementtreeSync(config_path);
-        return widget_doc._root.attrib['id'];
-    },
-    "source-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            var shell = require('shelljs');
-            var dest = path.join(project_dir, "build", "src", "plugins", plugin_id);
-            shell.mkdir(dest);
-            shell.cp(path.join(plugin_dir, source_el.attrib.src), dest);
-
-            shell.exec('touch ' + path.join(project_dir, "CMakeLists.txt"))
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            var shell = require('shelljs');
-
-            var dest = path.join(project_dir, "build", "src", "plugins", plugin_id);
-            shell.rm(path.join(dest, path.basename(source_el.attrib.src)));
-        }
-    },
-    "header-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            var shell = require('shelljs');
-            var dest = path.join(project_dir, "build", "src", "plugins", plugin_id);
-            shell.mkdir(dest);
-            shell.cp(path.join(plugin_dir, source_el.attrib.src), dest);
-
-            var plugins = path.join(project_dir, "build", "src", "coreplugins.cpp");
-            src = String(fs.readFileSync(plugins));
-
-            src = src.replace('INSERT_HEADER_HERE', '#include "plugins/' + plugin_id + "/" + path.basename(source_el.attrib.src) +'"\nINSERT_HEADER_HERE');
-            var class_name = plugin_id.match(/\.[^.]+$/)[0].substr(1);
-            class_name = toCamelCase(class_name);
-            src = src.replace('INSERT_PLUGIN_HERE', 'INIT_PLUGIN(' + class_name + ');INSERT_PLUGIN_HERE');
-
-            fs.writeFileSync(plugins, src);
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            var shell = require('shelljs');
-            var dest = path.join(project_dir, "build", "src", "plugins", plugin_id);
-            shell.rm(path.join(dest, path.basename(source_el.attrib.src)));
-
-            var plugins = path.join(project_dir, "build", "src", "coreplugins.cpp");
-            src = String(fs.readFileSync(plugins));
-
-            src = src.replace('#include "plugins/' + plugin_id + "/" + path.basename(source_el.attrib.src) +'"', '');
-            var class_name = plugin_id.match(/\.[^.]+$/)[0].substr(1);
-            class_name = toCamelCase(class_name);
-            src = src.replace('INIT_PLUGIN(' + class_name + ');', '');
-
-            fs.writeFileSync(plugins, src);
-        }
-    },
-    "resource-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            var shell = require('shelljs');
-            var dest = path.join(project_dir, "qml");
-            shell.mkdir(dest);
-            shell.cp(path.join(plugin_dir, source_el.attrib.src), dest);
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            var shell = require('shelljs');
-
-            var dest = path.join(project_dir, "qml");
-            shell.rm(path.join(dest, path.basename(source_el.attrib.src)));
-        }
-    },
-    "framework": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.install is not supported for ubuntu');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.uninstall is not supported for ubuntu');
-        }
-    },
-    "lib-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.install is not supported for ubuntu');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.uninstall is not supported for ubuntu');
-        }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/platforms/windows8.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/windows8.js b/cordova-lib/src/plugman/platforms/windows8.js
deleted file mode 100644
index 523dc6e..0000000
--- a/cordova-lib/src/plugman/platforms/windows8.js
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- *
- * Copyright 2013 Jesse MacFadyen
- *
- * Licensed 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 common = require('./common'),
-    path = require('path'),
-    glob = require('glob'),
-    shell = require('shelljs'),
-    fs = require('fs'),
-    w8jsproj = require('../util/w8jsproj'),
-    events = require('../events'),
-    xml_helpers = require('../util/xml-helpers');
-
-
-module.exports = {
-    platformName:"windows8",
-    InvalidProjectPathError:'does not appear to be a Windows Store JS project (no .jsproj file)',
-    www_dir:function(project_dir) {
-        return path.join(project_dir, 'www');
-    },
-    package_name:function(project_dir) {
-        var manifest = xml_helpers.parseElementtreeSync(path.join(project_dir, 'package.appxmanifest'));
-        return manifest.find("Properties/DisplayName").text;
-    },
-    parseProjectFile:function(project_dir) {
-        var project_files = glob.sync('*.jsproj', { cwd:project_dir });
-        if (project_files.length == 0) {
-            throw new Error(this.InvalidProjectPathError);
-        }
-        return new w8jsproj(path.join(project_dir, project_files[0]));
-    },
-    "source-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id, project_file) {
-            var targetDir = source_el.attrib['target-dir'] || '';
-            var dest = path.join('www', 'plugins', plugin_id, targetDir, path.basename(source_el.attrib['src']));
-
-            common.copyNewFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
-            // add reference to this file to jsproj.
-            project_file.addSourceFile(dest);
-        },
-        uninstall:function(source_el, project_dir, plugin_id, project_file) {
-            var dest = path.join('www', 'plugins', plugin_id,
-                                 source_el.attrib['target-dir'] ? source_el.attrib['target-dir'] : '',
-                                 path.basename(source_el.attrib['src']));
-            common.removeFile(project_dir, dest);
-            // remove reference to this file from csproj.
-            project_file.removeSourceFile(dest);
-        }
-    },
-    "header-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'header-fileinstall is not supported for Windows 8');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'header-file.uninstall is not supported for Windows 8');
-        }
-    },
-    "resource-file":{
-        install:function(el, plugin_dir, project_dir, plugin_id, project_file) {
-            events.emit('verbose', 'resource-file is not supported for Windows 8');
-        },
-        uninstall:function(el, project_dir, plugin_id, project_file) {
-        }
-    },
-    "lib-file": {
-        install:function(el, plugin_dir, project_dir, plugin_id, project_file) {
-            var inc  = el.attrib['Include'];
-            project_file.addSDKRef(inc);
-        },
-        uninstall:function(el, project_dir, plugin_id, project_file) {
-            events.emit('verbose', 'windows8 lib-file uninstall :: ' + plugin_id);
-            var inc = el.attrib['Include'];
-            project_file.removeSDKRef(inc);
-        }
-    },
-    "framework": {
-        install:function(el, plugin_dir, project_dir, plugin_id, project_file) {
-            events.emit('verbose', 'windows8 framework install :: ' + plugin_id);
-
-            var src = el.attrib['src'];
-            var dest = src; // if !isCustom, we will just add a reference to the file in place
-            // technically it is not possible to get here without isCustom == true -jm
-            // var isCustom = el.attrib.custom == "true";
-            var type = el.attrib["type"];
-
-            if(type == "projectReference") {
-                project_file.addProjectReference(path.join(plugin_dir,src));
-            }
-            else {
-                // if(isCustom) {}
-                dest = path.join('plugins', plugin_id, path.basename(src));
-                common.copyFile(plugin_dir, src, project_dir, dest);
-                project_file.addReference(dest,src);
-            }
-
-        },
-        uninstall:function(el, project_dir, plugin_id, project_file) {
-            events.emit('verbose', 'windows8 framework uninstall :: ' + plugin_id  );
-
-            var src = el.attrib['src'];
-            // technically it is not possible to get here without isCustom == true -jm
-            // var isCustom = el.attrib.custom == "true";
-            var type = el.attrib["type"];
-            // unfortunately we have to generate the plugin_dir path because it is not passed to uninstall
-            var plugin_dir = path.join(project_dir,"cordova/plugins",plugin_id,src);
-
-            if(type == "projectReference") {
-                project_file.removeProjectReference(plugin_dir);
-            }
-            else {
-                // if(isCustom) {  }
-                var targetPath = path.join('plugins', plugin_id);
-                common.removeFile(project_dir, targetPath);
-                project_file.removeReference(src);
-            }
-        }
-
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/platforms/wp7.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/wp7.js b/cordova-lib/src/plugman/platforms/wp7.js
deleted file mode 100644
index e6a76d0..0000000
--- a/cordova-lib/src/plugman/platforms/wp7.js
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- *
- * Copyright 2013 Jesse MacFadyen
- *
- * Licensed 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 common = require('./common'),
-    path = require('path'),
-    glob = require('glob'),
-    fs = require('fs'),
-    csproj = require('../util/csproj'),
-    events = require('../events'),
-    xml_helpers = require('../util/xml-helpers');
-
-module.exports = {
-    www_dir:function(project_dir) {
-        return path.join(project_dir, 'www');
-    },
-    package_name:function(project_dir) {
-        return xml_helpers.parseElementtreeSync(path.join(project_dir, 'Properties', 'WMAppManifest.xml')).find('App').attrib.ProductID;
-    },
-    parseProjectFile:function(project_dir) {
-        var project_files = glob.sync('*.csproj', {
-            cwd:project_dir
-        });
-        if (project_files.length === 0) {
-            throw new Error('does not appear to be a Windows Phone project (no .csproj file)');
-        }
-        return new csproj(path.join(project_dir, project_files[0]));
-    },
-    "source-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id, project_file) {
-            var dest = path.join('Plugins', plugin_id, source_el.attrib['target-dir'] ? source_el.attrib['target-dir'] : '', path.basename(source_el.attrib['src']));
-
-            common.copyNewFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
-            // add reference to this file to csproj.
-            project_file.addSourceFile(dest);
-        },
-        uninstall:function(source_el, project_dir, plugin_id, project_file) {
-            var dest = path.join('Plugins', plugin_id, source_el.attrib['target-dir'] ? source_el.attrib['target-dir'] : '', path.basename(source_el.attrib['src']));
-            common.removeFile(project_dir, dest);
-            // remove reference to this file from csproj.
-            project_file.removeSourceFile(dest);
-        }
-    },
-    "header-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'header-fileinstall is not supported for wp7');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'header-file.uninstall is not supported for wp7');
-        }
-    },
-    "resource-file":{
-        install:function(el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'resource-file.install is not supported for wp7');
-        },
-        uninstall:function(el, project_dir, plugin_id) {
-            events.emit('verbose', 'resource-file.uninstall is not supported for wp7');
-        }
-    },
-    "framework": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.install is not supported for wp7');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.uninstall is not supported for wp7');
-        }
-    },
-    "lib-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.install is not supported for wp7');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.uninstall is not supported for wp7');
-        }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/platforms/wp8.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/wp8.js b/cordova-lib/src/plugman/platforms/wp8.js
deleted file mode 100644
index 1163b44..0000000
--- a/cordova-lib/src/plugman/platforms/wp8.js
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- *
- * Copyright 2013 Jesse MacFadyen
- *
- * Licensed 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 common = require('./common'),
-    path = require('path'),
-    glob = require('glob'),
-    fs = require('fs'),
-    csproj = require('../util/csproj'),
-    events = require('../events'),
-    xml_helpers = require('../util/xml-helpers');
-
-module.exports = {
-    www_dir:function(project_dir) {
-        return path.join(project_dir, 'www');
-    },
-    package_name:function(project_dir) {
-        return xml_helpers.parseElementtreeSync(path.join(project_dir, 'Properties', 'WMAppManifest.xml')).find('App').attrib.ProductID;
-    },
-    parseProjectFile:function(project_dir) {
-        var project_files = glob.sync('*.csproj', {
-            cwd:project_dir
-        });
-        if (project_files.length === 0) {
-            throw new Error('does not appear to be a Windows Phone project (no .csproj file)');
-        }
-        return new csproj(path.join(project_dir, project_files[0]));
-    },
-    "source-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id, project_file) {
-            var dest = path.join('Plugins', plugin_id, source_el.attrib['target-dir'] ? source_el.attrib['target-dir'] : '', path.basename(source_el.attrib['src']));
-
-            common.copyNewFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
-            // add reference to this file to csproj.
-            project_file.addSourceFile(dest);
-        },
-        uninstall:function(source_el, project_dir, plugin_id, project_file) {
-            var dest = path.join('Plugins', plugin_id, source_el.attrib['target-dir'] ? source_el.attrib['target-dir'] : '', path.basename(source_el.attrib['src']));
-            common.removeFile(project_dir, dest);
-            // remove reference to this file from csproj.
-            project_file.removeSourceFile(dest);
-        }
-    },
-    "header-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'header-file.install is not supported for wp8');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'header-file.uninstall is not supported for wp8');
-        }
-    },
-    "resource-file":{
-        install:function(el, plugin_dir, project_dir, plugin_id, project_file) {
-            events.emit('verbose', 'resource-file.install is not supported for wp8');
-        },
-        uninstall:function(el, project_dir, plugin_id, project_file) {
-            events.emit('verbose', 'resource-file.uninstall is not supported for wp8');
-        }
-    },
-    "framework":{
-        install:function(el, plugin_dir, project_dir, plugin_id, project_file) {
-            events.emit('verbose', 'wp8 framework install :: ' + plugin_id  );
-
-            var src = el.attrib['src'];
-            var dest = src; // if !isCustom, we will just add a reference to the file in place
-            var isCustom = el.attrib.custom == "true";
-
-            if(isCustom) {
-                dest = path.join('plugins', plugin_id, path.basename(src));
-                common.copyFile(plugin_dir, src, project_dir, dest);
-            }
-
-            project_file.addReference(dest);
-
-        },
-        uninstall:function(el, project_dir, plugin_id, project_file) {
-            events.emit('verbose', 'wp8 framework uninstall :: ' + plugin_id  );
-
-            var src = el.attrib['src'];
-            var isCustom = el.attrib.custom == "true";
-
-            if(isCustom) {
-                var dest = path.join('plugins', plugin_id);
-                common.removeFile(project_dir, dest);
-            }
-
-            project_file.removeReference(src);
-        }
-    },
-    "lib-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.install is not supported for wp8');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.uninstall is not supported for wp8');
-        }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/plugman.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/plugman.js b/cordova-lib/src/plugman/plugman.js
deleted file mode 100644
index 4aa1843..0000000
--- a/cordova-lib/src/plugman/plugman.js
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-
-// copyright (c) 2013 Andrew Lunny, Adobe Systems
-
-var events = require('./src/events');
-var Q = require('q');
-
-function addProperty(o, symbol, modulePath, doWrap) {
-    var val = null;
-
-    if (doWrap) {
-        o[symbol] = function() {
-            val = val || require(modulePath);
-            if (arguments.length && typeof arguments[arguments.length - 1] === 'function') {
-                // If args exist and the last one is a function, it's the callback.
-                var args = Array.prototype.slice.call(arguments);
-                var cb = args.pop();
-                val.apply(o, args).done(function(result) {cb(undefined, result)}, cb);
-            } else {
-                val.apply(o, arguments).done(null, function(err){ throw err; });
-            }
-        };
-    } else {
-        // The top-level plugman.foo
-        Object.defineProperty(o, symbol, {
-            get : function() { return val = val || require(modulePath); },
-            set : function(v) { val = v; }
-        });
-    }
-
-    // The plugman.raw.foo
-    Object.defineProperty(o.raw, symbol, {
-        get : function() { return val = val || require(modulePath); },
-        set : function(v) { val = v; }
-    });
-}
-
-plugman = {
-    on:                 events.on.bind(events),
-    off:                events.removeListener.bind(events),
-    removeAllListeners: events.removeAllListeners.bind(events),
-    emit:               events.emit.bind(events),
-    raw:                {}
-};
-
-addProperty(plugman, 'help', './src/help');
-addProperty(plugman, 'install', './src/install', true);
-addProperty(plugman, 'uninstall', './src/uninstall', true);
-addProperty(plugman, 'fetch', './src/fetch', true);
-addProperty(plugman, 'prepare', './src/prepare');
-addProperty(plugman, 'config', './src/config', true);
-addProperty(plugman, 'owner', './src/owner', true);
-addProperty(plugman, 'adduser', './src/adduser', true);
-addProperty(plugman, 'publish', './src/publish', true);
-addProperty(plugman, 'unpublish', './src/unpublish', true);
-addProperty(plugman, 'search', './src/search', true);
-addProperty(plugman, 'info', './src/info', true);
-addProperty(plugman, 'create', './src/create', true);
-addProperty(plugman, 'platform', './src/platform_operation', true);
-addProperty(plugman, 'config_changes', './src/util/config-changes');
-
-plugman.commands =  {
-    'config'   : function(cli_opts) {
-        plugman.config(cli_opts.argv.remain, function(err) {
-            if (err) throw err;
-            else console.log('done');
-        });
-    },
-    'owner'   : function(cli_opts) {
-        plugman.owner(cli_opts.argv.remain);
-    },
-    'install'  : function(cli_opts) {
-        if(!cli_opts.platform || !cli_opts.project || !cli_opts.plugin) {
-            return console.log(plugman.help());
-        }
-        var cli_variables = {}
-        if (cli_opts.variable) {
-            cli_opts.variable.forEach(function (variable) {
-                    var tokens = variable.split('=');
-                    var key = tokens.shift().toUpperCase();
-                    if (/^[\w-_]+$/.test(key)) cli_variables[key] = tokens.join('=');
-                    });
-        }
-        var opts = {
-            subdir: '.',
-            cli_variables: cli_variables,
-            www_dir: cli_opts.www,
-            searchpath: cli_opts.searchpath
-        };
-
-        var p = Q();
-        cli_opts.plugin.forEach(function (pluginSrc) {
-            p = p.then(function () {
-                return plugman.raw.install(cli_opts.platform, cli_opts.project, pluginSrc, cli_opts.plugins_dir, opts);
-            })
-        });
-        
-        return p;
-    },
-    'uninstall': function(cli_opts) {
-        if(!cli_opts.platform || !cli_opts.project || !cli_opts.plugin) {
-            return console.log(plugman.help());
-        }
-
-        var p = Q();
-        cli_opts.plugin.forEach(function (pluginSrc) {
-            p = p.then(function () {
-                return plugman.raw.uninstall(cli_opts.platform, cli_opts.project, pluginSrc, cli_opts.plugins_dir, { www_dir: cli_opts.www });
-            });
-        });
-
-        return p;
-    },
-    'adduser'  : function(cli_opts) {
-        plugman.adduser(function(err) {
-            if (err) throw err;
-            else console.log('user added');
-        });
-    },
-
-    'search'   : function(cli_opts) {
-        plugman.search(cli_opts.argv.remain, function(err, plugins) {
-            if (err) throw err;
-            else {
-                for(var plugin in plugins) {
-                    console.log(plugins[plugin].name, '-', plugins[plugin].description || 'no description provided');
-                }
-            }
-        });
-    },
-    'info'     : function(cli_opts) {
-        plugman.info(cli_opts.argv.remain, function(err, plugin_info) {
-            if (err) throw err;
-            else {
-                console.log('name:', plugin_info.name);
-                console.log('version:', plugin_info.version);
-                if (plugin_info.engines) {
-                    for(var i = 0, j = plugin_info.engines.length ; i < j ; i++) {
-                        console.log(plugin_info.engines[i].name, 'version:', plugin_info.engines[i].version);
-                    }
-                }
-            }
-        });
-    },
-
-    'publish'  : function(cli_opts) {
-        var plugin_path = cli_opts.argv.remain;
-        if(!plugin_path) {
-            return console.log(plugman.help());
-        }
-        plugman.publish(plugin_path, function(err) {
-            if (err) throw err;
-            else console.log('Plugin published');
-        });
-    },
-
-    'unpublish': function(cli_opts) {
-        var plugin = cli_opts.argv.remain;
-        if(!plugin) {
-            return console.log(plugman.help());
-        }
-        plugman.unpublish(plugin, function(err) {
-            if (err) throw err;
-            else console.log('Plugin unpublished');
-        });
-    },
-    'create': function(cli_opts) {
-        if( !cli_opts.name || !cli_opts.plugin_id || !cli_opts.plugin_version) {
-            return console.log( plugman.help() );
-        }
-        var cli_variables = {};
-        if (cli_opts.variable) {
-            cli_opts.variable.forEach(function (variable) {
-                    var tokens = variable.split('=');
-                    var key = tokens.shift().toUpperCase();
-                    if (/^[\w-_]+$/.test(key)) cli_variables[key] = tokens.join('=');
-                    });
-        }
-        plugman.create( cli_opts.name, cli_opts.plugin_id, cli_opts.plugin_version, cli_opts.path || ".", cli_variables );
-    },
-    'platform': function(cli_opts) {
-        var operation = cli_opts.argv.remain[ 0 ] || "";
-        if( ( operation !== 'add' && operation !== 'remove' ) ||  !cli_opts.platform_name ) {
-            return console.log( plugman.help() );
-        }
-        plugman.platform( { operation: operation, platform_name: cli_opts.platform_name } );
-    }
-};
-
-module.exports = plugman;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/prepare.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/prepare.js b/cordova-lib/src/plugman/prepare.js
deleted file mode 100644
index c650306..0000000
--- a/cordova-lib/src/plugman/prepare.js
+++ /dev/null
@@ -1,232 +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.
-*/
-
-/* jshint node:true */
-
-var platform_modules = require('./platforms'),
-    path            = require('path'),
-    config_changes  = require('./util/config-changes'),
-    xml_helpers     = require('./util/xml-helpers'),
-    wp7             = require('./platforms/wp7'),
-    wp8             = require('./platforms/wp8'),
-    windows8        = require('./platforms/windows8'),
-    common          = require('./platforms/common');
-    fs              = require('fs'),
-    shell           = require('shelljs'),
-    util            = require('util'),
-    events          = require('./events'),
-    plugman         = require('../plugman'),
-    et              = require('elementtree');
-
-// Called on --prepare.
-// Sets up each plugin's Javascript code to be loaded properly.
-// Expects a path to the project (platforms/android in CLI, . in plugman-only),
-// a path to where the plugins are downloaded, the www dir, and the platform ('android', 'ios', etc.).
-module.exports = function handlePrepare(project_dir, platform, plugins_dir, www_dir) {
-    // Process:
-    // - Do config munging by calling into config-changes module
-    // - List all plugins in plugins_dir
-    // - Load and parse their plugin.xml files.
-    // - Skip those without support for this platform. (No <platform> tags means JS-only!)
-    // - Build a list of all their js-modules, including platform-specific js-modules.
-    // - For each js-module (general first, then platform) build up an object storing the path and any clobbers, merges and runs for it.
-    // - Write this object into www/cordova_plugins.json.
-    // - Cordova.js contains code to load them at runtime from that file.
-    events.emit('verbose', 'Preparing ' + platform + ' project');
-    var platform_json = config_changes.get_platform_json(plugins_dir, platform);
-    var wwwDir = www_dir || platform_modules[platform].www_dir(project_dir);
-
-    // Check if there are any plugins queued for uninstallation, and if so, remove any of their plugin web assets loaded in
-    // via <js-module> elements
-    var plugins_to_uninstall = platform_json.prepare_queue.uninstalled;
-    if (plugins_to_uninstall && plugins_to_uninstall.length) {
-        var plugins_www = path.join(wwwDir, 'plugins');
-        if (fs.existsSync(plugins_www)) {
-            plugins_to_uninstall.forEach(function(plug) {
-                var id = plug.id;
-                var plugin_modules = path.join(plugins_www, id);
-                if (fs.existsSync(plugin_modules)) {
-                    events.emit('verbose', 'Removing plugins directory from www "'+plugin_modules+'"');
-                    shell.rm('-rf', plugin_modules);
-                }
-            });
-        }
-    }
-
-    events.emit('verbose', 'Processing configuration changes for plugins.');
-    config_changes.process(plugins_dir, project_dir, platform);
-
-    // for windows phone platform we need to add all www resources to the .csproj file
-    // first we need to remove them all to prevent duplicates
-    var wp_csproj;
-    if(platform == 'wp7' || platform == 'wp8') {
-        wp_csproj = (platform == wp7? wp7.parseProjectFile(project_dir) : wp8.parseProjectFile(project_dir));
-        var item_groups = wp_csproj.xml.findall('ItemGroup');
-        for (var i = 0, l = item_groups.length; i < l; i++) {
-            var group = item_groups[i];
-            var files = group.findall('Content');
-            for (var j = 0, k = files.length; j < k; j++) {
-                var file = files[j];
-                if (file.attrib.Include.substr(0,11) == "www\\plugins" || file.attrib.Include == "www\\cordova_plugins.js") {
-                    // remove file reference
-                    group.remove(0, file);
-                    // remove ItemGroup if empty
-                    var new_group = group.findall('Content');
-                    if(new_group.length < 1) {
-                        wp_csproj.xml.getroot().remove(0, group);
-                    }
-                }
-            }
-        }
-    }
-    else if(platform == "windows8") {
-        wp_csproj = windows8.parseProjectFile(project_dir);
-        var item_groups = wp_csproj.xml.findall('ItemGroup');
-        for (var i = 0, l = item_groups.length; i < l; i++) {
-            var group = item_groups[i];
-            var files = group.findall('Content');
-            for (var j = 0, k = files.length; j < k; j++) {
-                var file = files[j];
-                if (file.attrib.Include.substr(0,11) == "www\\plugins" || file.attrib.Include == "www\\cordova_plugins.js") {
-                    // remove file reference
-                    group.remove(0, file);
-                    // remove ItemGroup if empty
-                    var new_group = group.findall('Content');
-                    if(new_group.length < 1) {
-                        wp_csproj.xml.getroot().remove(0, group);
-                    }
-                }
-            }
-        }
-
-    }
-
-    platform_json = config_changes.get_platform_json(plugins_dir, platform);
-    // This array holds all the metadata for each module and ends up in cordova_plugins.json
-    var plugins = Object.keys(platform_json.installed_plugins).concat(Object.keys(platform_json.dependent_plugins));
-    var moduleObjects = [];
-    var pluginMetadata = {};
-    events.emit('verbose', 'Iterating over installed plugins:', plugins);
-
-    plugins && plugins.forEach(function(plugin) {
-        var pluginDir = path.join(plugins_dir, plugin),
-            pluginXML = path.join(pluginDir, 'plugin.xml');
-        if (!fs.existsSync(pluginXML)) {
-            plugman.emit('warn', 'Missing file: ' + pluginXML);
-            return;
-        }
-        var xml = xml_helpers.parseElementtreeSync(pluginXML);
-
-        var plugin_id = xml.getroot().attrib.id;
-
-        // pluginMetadata is a mapping from plugin IDs to versions.
-        pluginMetadata[plugin_id] = xml.getroot().attrib.version;
-
-        // add the plugins dir to the platform's www.
-        var platformPluginsDir = path.join(wwwDir, 'plugins');
-        // XXX this should not be here if there are no js-module. It leaves an empty plugins/ directory
-        shell.mkdir('-p', platformPluginsDir);
-
-        var jsModules = xml.findall('./js-module');
-        var assets = xml.findall('asset');
-        var platformTag = xml.find(util.format('./platform[@name="%s"]', platform));
-
-        if (platformTag) {
-            assets = assets.concat(platformTag.findall('./asset'));
-            jsModules = jsModules.concat(platformTag.findall('./js-module'));
-        }
-
-        // Copy www assets described in <asset> tags.
-        assets = assets || [];
-        assets.forEach(function(asset) {
-            common.asset.install(asset, pluginDir, wwwDir);
-        });
-
-        jsModules.forEach(function(module) {
-            // Copy the plugin's files into the www directory.
-            // NB: We can't always use path.* functions here, because they will use platform slashes.
-            // But the path in the plugin.xml and in the cordova_plugins.js should be always forward slashes.
-            var pathParts = module.attrib.src.split('/');
-
-            var fsDirname = path.join.apply(path, pathParts.slice(0, -1));
-            var fsDir = path.join(platformPluginsDir, plugin_id, fsDirname);
-            shell.mkdir('-p', fsDir);
-
-            // Read in the file, prepend the cordova.define, and write it back out.
-            var moduleName = plugin_id + '.';
-            if (module.attrib.name) {
-                moduleName += module.attrib.name;
-            } else {
-                var result = module.attrib.src.match(/([^\/]+)\.js/);
-                moduleName += result[1];
-            }
-
-            var fsPath = path.join.apply(path, pathParts);
-            var scriptContent = fs.readFileSync(path.join(pluginDir, fsPath), 'utf-8');
-            scriptContent = 'cordova.define("' + moduleName + '", function(require, exports, module) { ' + scriptContent + '\n});\n';
-            fs.writeFileSync(path.join(platformPluginsDir, plugin_id, fsPath), scriptContent, 'utf-8');
-            if(platform == 'wp7' || platform == 'wp8' || platform == "windows8") {
-                wp_csproj.addSourceFile(path.join('www', 'plugins', plugin_id, fsPath));
-            }
-
-            // Prepare the object for cordova_plugins.json.
-            var obj = {
-                file: ['plugins', plugin_id, module.attrib.src].join('/'),
-                id: moduleName
-            };
-
-            // Loop over the children of the js-module tag, collecting clobbers, merges and runs.
-            module.getchildren().forEach(function(child) {
-                if (child.tag.toLowerCase() == 'clobbers') {
-                    if (!obj.clobbers) {
-                        obj.clobbers = [];
-                    }
-                    obj.clobbers.push(child.attrib.target);
-                } else if (child.tag.toLowerCase() == 'merges') {
-                    if (!obj.merges) {
-                        obj.merges = [];
-                    }
-                    obj.merges.push(child.attrib.target);
-                } else if (child.tag.toLowerCase() == 'runs') {
-                    obj.runs = true;
-                }
-            });
-
-            // Add it to the list of module objects bound for cordova_plugins.json
-            moduleObjects.push(obj);
-        });
-    });
-
-    // Write out moduleObjects as JSON wrapped in a cordova module to cordova_plugins.js
-    var final_contents = "cordova.define('cordova/plugin_list', function(require, exports, module) {\n";
-    final_contents += 'module.exports = ' + JSON.stringify(moduleObjects,null,'    ') + ';\n';
-    final_contents += 'module.exports.metadata = \n';
-    final_contents += '// TOP OF METADATA\n';
-    final_contents += JSON.stringify(pluginMetadata, null, '    ') + '\n';
-    final_contents += '// BOTTOM OF METADATA\n';
-    final_contents += '});'; // Close cordova.define.
-
-    events.emit('verbose', 'Writing out cordova_plugins.js...');
-    fs.writeFileSync(path.join(wwwDir, 'cordova_plugins.js'), final_contents, 'utf-8');
-
-    if(platform == 'wp7' || platform == 'wp8' || platform == "windows8") {
-        wp_csproj.addSourceFile(path.join('www', 'cordova_plugins.js'));
-        wp_csproj.write();
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/publish.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/publish.js b/cordova-lib/src/plugman/publish.js
deleted file mode 100644
index 05b5284..0000000
--- a/cordova-lib/src/plugman/publish.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var registry = require('./registry/registry')
-
-module.exports = function(plugin_path) {
-    // plugin_path is an array of paths
-    return registry.publish(plugin_path);
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/registry/manifest.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/registry/manifest.js b/cordova-lib/src/plugman/registry/manifest.js
deleted file mode 100644
index 54f74b6..0000000
--- a/cordova-lib/src/plugman/registry/manifest.js
+++ /dev/null
@@ -1,95 +0,0 @@
-var xml_helpers = require('../util/xml-helpers'),
-    path = require('path'),
-    Q = require('q'),
-    fs = require('fs'),
-    whitelist = require('./whitelist');
-
-function validateName(name) {
-    if (!name.match(/^(\w+\.){2,}.*$/)) {
-        throw new Error('Invalid plugin ID. It has to follow the reverse domain `com.domain.plugin` format');
-    }
-
-    if (name.match(/org.apache.cordova\..*/) && whitelist.indexOf(name) === -1) {
-        throw new Error('Invalid Plugin ID. The "org.apache.cordova" prefix is reserved for plugins provided directly by the Cordova project.');
-    }
-
-    return true;
-}
-
-// Java world big-up!
-// Returns a promise.
-function generatePackageJsonFromPluginXml(plugin_path) {
-    return Q().then(function() {
-        var package_json = {};
-        var pluginXml = xml_helpers.parseElementtreeSync(path.join(plugin_path, 'plugin.xml'));
-
-        if(!pluginXml) throw new Error('invalid plugin.xml document');
-
-        var pluginElm = pluginXml.getroot();
-
-        if(!pluginElm) throw new Error('invalid plugin.xml document');
-
-        // REQUIRED: name, version
-        // OPTIONAL: description, license, keywords, engine
-        var name = pluginElm.attrib.id,
-            version = pluginElm.attrib.version,
-            cordova_name = pluginElm.findtext('name'),
-            description = pluginElm.findtext('description'),
-            license = pluginElm.findtext('license'),
-            keywords = pluginElm.findtext('keywords'),
-            repo = pluginElm.findtext('repo'),
-            issue = pluginElm.findtext('issue'),
-            engines = pluginElm.findall('engines/engine'),
-            platformsElm = pluginElm.findall('platform'),
-            englishdoc = "",
-            platforms = [];
-
-        platformsElm.forEach(function(plat){
-            platforms.push(plat.attrib.name);
-        })
-        if(!version) throw new Error('`version` required');
-
-        package_json.version = version;
-
-        if(!name) throw new Error('`id` is required');
-
-        validateName(name);
-
-        package_json.name = name.toLowerCase();
-
-        if(cordova_name) package_json.cordova_name = cordova_name;
-        if(description)  package_json.description  = description;
-        if(license)      package_json.license      = license;
-        if(repo)         package_json.repo         = repo;
-        if(issue)        package_json.issue        = issue;
-        if(keywords)     package_json.keywords     = keywords.split(',');
-        if(platforms)    package_json.platforms    = platforms;
-
-        // adding engines
-        if(engines) {
-            package_json.engines = [];
-            for(var i = 0, j = engines.length ; i < j ; i++) {
-                package_json.engines.push({name: engines[i].attrib.name, version: engines[i].attrib.version});
-            }
-        }
-
-        //set docs_path to doc/index.md exists
-        var docs_path = path.resolve(plugin_path, 'doc/index.md');
-        if(!(fs.existsSync(docs_path))){
-            //set docs_path to doc/en/index.md
-            docs_path = path.resolve(plugin_path, 'doc/en/index.md');
-        }
-        if(fs.existsSync(docs_path)){
-            englishdoc = fs.readFileSync(docs_path, 'utf-8');
-            package_json.englishdoc = englishdoc;
-        }
-
-        // write package.json
-        var package_json_path = path.resolve(plugin_path, 'package.json');
-        //console.log('about to write package.json');
-        fs.writeFileSync(package_json_path, JSON.stringify(package_json, null, 4), 'utf8');
-        return package_json;
-    });
-}
-
-module.exports.generatePackageJsonFromPluginXml = generatePackageJsonFromPluginXml;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/registry/registry.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/registry/registry.js b/cordova-lib/src/plugman/registry/registry.js
deleted file mode 100644
index e0d733d..0000000
--- a/cordova-lib/src/plugman/registry/registry.js
+++ /dev/null
@@ -1,290 +0,0 @@
-var npm = require('npm'),
-    path = require('path'),
-    http = require('http'),
-    url = require('url'),
-    fs = require('fs'),
-    manifest = require('./manifest'),
-    os = require('os'),
-    rc = require('rc'),
-    Q = require('q'),
-    request = require('request'),
-    zlib = require('zlib'),
-    tar = require('tar'),
-    shell = require('shelljs'),
-    home = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE,
-    plugmanConfigDir = path.resolve(home, '.plugman'),
-    plugmanCacheDir = path.resolve(plugmanConfigDir, 'cache');
-
-/**
- * @method getPackageInfo
- * @param {String} args Package names
- * @return {Promise.<Object>} Promised package info.
- */
-function getPackageInfo(args) {
-    var thing = args.length ? args.shift().split("@") : [],
-        name = thing.shift(),
-        version = thing.join("@") || 'latest';
-    var settings = module.exports.settings;
-
-    var d = Q.defer();
-    var req = makeRequest('GET', settings.registry + '/' + name + '/' + version, function(err, res, body){
-        if(err || res.statusCode != 200) {
-          d.reject(new Error('Failed to fetch package information for '+name));
-        } else {
-          d.resolve(JSON.parse(body));
-        }
-    });
-    req.on('error', function(err) {
-        d.reject(err);
-    });
-    return d.promise;
-}
-
-/**
- * @method fetchPackage
- * @param {String} info Package info
- * @return {Promise.<string>} Promised path to the package.
- */
-function fetchPackage(info, cl) {
-    var settings = module.exports.settings;
-    var d = Q.defer();
-    var cached = path.resolve(settings.cache, info.name, info.version, 'package');
-    if(fs.existsSync(cached)) {
-        d.resolve(cached);
-    } else {
-        var download_dir = path.resolve(cached, '..');
-        shell.mkdir('-p', download_dir);
-
-        var req = makeRequest('GET', info.dist.tarball, function (err, res, body) {
-            if(err || res.statusCode != 200) {
-                d.reject(new Error('failed to fetch the plugin archive'));
-            } else {
-                // Update the download count for this plugin.
-                // Fingers crossed that the timestamps are unique, and that no plugin is downloaded
-                // twice in a single millisecond.
-                //
-                // This is acceptable, because the failure mode is Couch gracefully rejecting the second one
-                // (for lacking a _rev), and dropped a download count is not important.
-                var now = new Date();
-                var pkgId = info._id.substring(0, info._id.indexOf('@'));
-                var message = {
-                    day: now.getUTCFullYear() + '-' + (now.getUTCMonth()+1) + '-' + now.getUTCDate(),
-                    pkg: pkgId,
-                    client: cl
-                };
-                var remote = settings.registry + '/downloads'
-
-                makeRequest('POST', remote, message, function (err, res, body) {
-                    // ignore errors
-                });
-            }
-        });
-        req.pipe(zlib.createUnzip())
-        .pipe(tar.Extract({path:download_dir}))
-        .on('error', function(err) {
-            shell.rm('-rf', download_dir);
-            d.reject(err);
-        })
-        .on('end', function() {
-            d.resolve(path.resolve(download_dir, 'package'));
-        });
-    }
-    return d.promise;
-}
-
-module.exports = {
-    settings: null,
-    /**
-     * @method config
-     * @param {Array} args Command argument
-     * @return {Promise.<Object>} Promised configuration object.
-     */
-    config: function(args) {
-        return initSettings().then(function(settings) {
-            return Q.ninvoke(npm, 'load', settings)
-        })
-        .then(function() {
-            return Q.ninvoke(npm.commands, 'config', args);
-        });
-    },
-
-    /**
-     * @method owner
-     * @param {Array} args Command argument
-     * @return {Promise.<void>} Promise for completion.
-     */
-    owner: function(args) {
-        return initSettings().then(function(settings) {
-            return Q.ninvoke(npm, 'load', settings);
-        }).then(function() {
-            return Q.ninvoke(npm.commands, 'owner', args);
-        });
-    },
-    /**
-     * @method adduser
-     * @param {Array} args Command argument
-     * @return {Promise.<void>} Promise for completion.
-     */
-    adduser: function(args) {
-        return initSettings().then(function(settings) {
-            return Q.ninvoke(npm, 'load', settings)
-        })
-        .then(function() {
-            return Q.ninvoke(npm.commands, 'adduser', args);
-        });
-    },
-
-    /**
-     * @method publish
-     * @param {Array} args Command argument
-     * @return {Promise.<Object>} Promised published data.
-     */
-    publish: function(args) {
-        return initSettings()
-        .then(function(settings) {
-            return manifest.generatePackageJsonFromPluginXml(args[0])
-            .then(function() {
-                return Q.ninvoke(npm, 'load', settings);
-            }).then(function() {
-                return Q.ninvoke(npm.commands, 'publish', args)
-            }).fin(function() {
-                fs.unlink(path.resolve(args[0], 'package.json'));
-            });
-        });
-    },
-
-    /**
-     * @method search
-     * @param {Array} args Array of keywords
-     * @return {Promise.<Object>} Promised search results.
-     */
-    search: function(args) {
-        return initSettings()
-        .then(function(settings) {
-            return Q.ninvoke(npm, 'load', settings);
-        }).then(function() {
-            return Q.ninvoke(npm.commands, 'search', args, true);
-        });
-    },
-
-    /**
-     * @method unpublish
-     * @param {Array} args Command argument
-     * @return {Promise.<Object>} Promised results.
-     */
-    unpublish: function(args) {
-        return initSettings()
-        .then(function(settings) {
-            return Q.ninvoke(npm, 'load', settings);
-        }).then(function() {
-            return Q.ninvoke(npm.commands, 'unpublish', args);
-        }).then(function() {
-            return Q.ninvoke(npm.commands, 'cache', ["clean"]);
-        });
-    },
-
-    /**
-     * @method fetch
-     * @param {String} name Plugin name
-     * @return {Promise.<string>} Promised path to fetched package.
-     */
-    fetch: function(args, client) {
-        var cl = (client === 'plugman' ? 'plugman' : 'cordova-cli');
-        return initSettings()
-        .then(function(settings) {
-            return getPackageInfo(args);
-        }).then(function(info) {
-            return fetchPackage(info, cl);
-        });
-    },
-
-    /**
-     * @method info
-     * @param {String} name Plugin name
-     * @return {Promise.<Object>} Promised package info.
-     */
-    info: function(args) {
-        return initSettings()
-        .then(function() {
-            return getPackageInfo(args);
-        });
-    }
-}
-
-/**
- * @method initSettings
- * @return {Promise.<Object>} Promised settings.
- */
-function initSettings() {
-    var settings = module.exports.settings;
-    // check if settings already set
-    if(settings != null) return Q(settings);
-
-    // setting up settings
-    // obviously if settings dir does not exist settings is going to be empty
-    if(!fs.existsSync(plugmanConfigDir)) {
-        fs.mkdirSync(plugmanConfigDir);
-        fs.mkdirSync(plugmanCacheDir);
-    }
-
-    settings =
-    module.exports.settings =
-    rc('plugman', {
-         cache: plugmanCacheDir,
-         force: true,
-         registry: 'http://registry.cordova.io',
-         logstream: fs.createWriteStream(path.resolve(plugmanConfigDir, 'plugman.log')),
-         userconfig: path.resolve(plugmanConfigDir, 'config')
-    });
-    return Q(settings);
-}
-
-
-function makeRequest (method, where, what, cb_) {
-  var settings = module.exports.settings
-  var remote = url.parse(where)
-  if (typeof cb_ !== "function") cb_ = what, what = null
-  var cbCalled = false
-  function cb () {
-    if (cbCalled) return
-    cbCalled = true
-    cb_.apply(null, arguments)
-  }
-
-  var strict = settings['strict-ssl']
-  if (strict === undefined) strict = true
-  var opts = { url: remote
-             , method: method
-             , ca: settings.ca
-             , strictSSL: strict }
-    , headers = opts.headers = {}
-
-  headers.accept = "application/json"
-
-  headers["user-agent"] = settings['user-agent'] ||
-                          'node/' + process.version
-
-  var p = settings.proxy
-  var sp = settings['https-proxy'] || p
-  opts.proxy = remote.protocol === "https:" ? sp : p
-
-  // figure out wth 'what' is
-  if (what) {
-    if (Buffer.isBuffer(what) || typeof what === "string") {
-      opts.body = what
-      headers["content-type"] = "application/json"
-      headers["content-length"] = Buffer.byteLength(what)
-    } else {
-      opts.json = what
-    }
-  }
-
-  var req = request(opts, cb)
-
-  req.on("error", cb)
-  req.on("socket", function (s) {
-    s.on("error", cb)
-  })
-
-  return req
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/registry/whitelist.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/registry/whitelist.js b/cordova-lib/src/plugman/registry/whitelist.js
deleted file mode 100644
index 5e7cfa6..0000000
--- a/cordova-lib/src/plugman/registry/whitelist.js
+++ /dev/null
@@ -1,21 +0,0 @@
-module.exports = [
-    'org.apache.cordova.splashscreen',
-    'org.apache.cordova.network-information',
-    'org.apache.cordova.file',
-    'org.apache.cordova.file-transfer',
-    'org.apache.cordova.media',
-    'org.apache.cordova.vibration',
-    'org.apache.cordova.media-capture',
-    'org.apache.cordova.inappbrowser',
-    'org.apache.cordova.globalization',
-    'org.apache.cordova.geolocation',
-    'org.apache.cordova.dialogs',
-    'org.apache.cordova.device-orientation',
-    'org.apache.cordova.device',
-    'org.apache.cordova.contacts',
-    'org.apache.cordova.console',
-    'org.apache.cordova.camera',
-    'org.apache.cordova.device-motion',
-    'org.apache.cordova.battery-status',
-    'org.apache.cordova.statusbar'
-]

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/search.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/search.js b/cordova-lib/src/plugman/search.js
deleted file mode 100644
index 000f58e..0000000
--- a/cordova-lib/src/plugman/search.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var registry = require('./registry/registry')
-
-module.exports = function(search_opts) {
-    return registry.search(search_opts);
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/uninstall.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/uninstall.js b/cordova-lib/src/plugman/uninstall.js
deleted file mode 100644
index 04ecb1a..0000000
--- a/cordova-lib/src/plugman/uninstall.js
+++ /dev/null
@@ -1,288 +0,0 @@
-
-var path = require('path'),
-    fs   = require('fs'),
-    et   = require('elementtree'),
-    shell= require('shelljs'),
-    config_changes = require('./util/config-changes'),
-    xml_helpers = require('./util/xml-helpers'),
-    action_stack = require('./util/action-stack'),
-    dependencies = require('./util/dependencies'),
-    underscore = require('underscore'),
-    Q = require('q'),
-    plugins = require('./util/plugins'),
-    underscore = require('underscore'),
-    events = require('./events'),
-    platform_modules = require('./platforms'),
-    plugman = require('../plugman');
-
-// possible options: cli_variables, www_dir
-// Returns a promise.
-module.exports = function(platform, project_dir, id, plugins_dir, options) {
-    options = options || {};
-    options.is_top_level = true;
-    plugins_dir = plugins_dir || path.join(project_dir, 'cordova', 'plugins');
-
-    // Allow path to file to grab an ID
-    var xml_path = path.join(id, 'plugin.xml');
-    if ( fs.existsSync(xml_path) ) {
-        var plugin_et  = xml_helpers.parseElementtreeSync(xml_path),
-        id = plugin_et._root.attrib['id'];
-    }
-
-    return module.exports.uninstallPlatform(platform, project_dir, id, plugins_dir, options)
-    .then(function() {
-        return module.exports.uninstallPlugin(id, plugins_dir, options);
-    });
-}
-
-// Returns a promise.
-module.exports.uninstallPlatform = function(platform, project_dir, id, plugins_dir, options) {
-    options = options || {};
-    options.is_top_level = true;
-    plugins_dir = plugins_dir || path.join(project_dir, 'cordova', 'plugins');
-
-    if (!platform_modules[platform]) {
-        return Q.reject(new Error(platform + " not supported."));
-    }
-
-    var plugin_dir = path.join(plugins_dir, id);
-    if (!fs.existsSync(plugin_dir)) {
-        return Q.reject(new Error('Plugin "' + id + '" not found. Already uninstalled?'));
-    }
-
-    var current_stack = new action_stack();
-
-    return runUninstallPlatform(current_stack, platform, project_dir, plugin_dir, plugins_dir, options);
-};
-
-// Returns a promise.
-module.exports.uninstallPlugin = function(id, plugins_dir, options) {
-    options = options || {};
-
-    var plugin_dir = path.join(plugins_dir, id);
-
-    // @tests - important this event is checked spec/uninstall.spec.js
-    events.emit('log', 'Removing "'+ id +'"');
-
-    // If already removed, skip.
-    if ( !fs.existsSync(plugin_dir) ) {
-        events.emit('verbose', 'Plugin "'+ id +'" already removed ('+ plugin_dir +')');
-        return Q();
-    }
-
-    var xml_path  = path.join(plugin_dir, 'plugin.xml')
-      , plugin_et = xml_helpers.parseElementtreeSync(xml_path);
-
-    var doDelete = function(id) {
-        var plugin_dir = path.join(plugins_dir, id);
-        if ( !fs.existsSync(plugin_dir) ) {
-            events.emit('verbose', 'Plugin "'+ id +'" already removed ('+ plugin_dir +')');
-            return Q();
-        }
-
-        shell.rm('-rf', plugin_dir);
-        events.emit('verbose', 'Deleted "'+ id +'"');
-    };
-
-    // We've now lost the metadata for the plugins that have been uninstalled, so we can't use that info.
-    // Instead, we list all dependencies of the target plugin, and check the remaining metadata to see if
-    // anything depends on them, or if they're listed as top-level.
-    // If neither, they can be deleted.
-    var top_plugin_id = id;
-
-    // Recursively remove plugins which were installed as dependents (that are not top-level)
-    // optional?
-    var recursive = true;
-    var toDelete = recursive ? plugin_et.findall('dependency') : [];
-    toDelete = toDelete && toDelete.length ? toDelete.map(function(p) { return p.attrib.id; }) : [];
-    toDelete.push(top_plugin_id);
-
-    // Okay, now we check if any of these are depended on, or top-level.
-    // Find the installed platforms by whether they have a metadata file.
-    var platforms = Object.keys(platform_modules).filter(function(platform) {
-        return fs.existsSync(path.join(plugins_dir, platform + '.json'));
-    });
-
-    // Can have missing plugins on some platforms when not supported..
-    var dependList = {};
-    platforms.forEach(function(platform) {
-        var depsInfo = dependencies.generate_dependency_info(plugins_dir, platform);
-        var tlps = depsInfo.top_level_plugins,
-            deps, i;
-
-        // Top-level deps must always be explicitely asked to remove by user
-        tlps.forEach(function(plugin_id){
-            if(top_plugin_id == plugin_id)
-                return;
-
-            var i = toDelete.indexOf(plugin_id);
-            if(i >= 0)
-                toDelete.splice(i, 1);
-        });
-
-        toDelete.forEach(function(plugin) {
-            deps = dependencies.dependents(plugin, depsInfo);
-
-            var i = deps.indexOf(top_plugin_id);
-            if(i >= 0)
-                 deps.splice(i, 1); // remove current/top-level plugin as blocking uninstall
-
-            if(deps.length) {
-                dependList[plugin] = deps.join(', ');
-            }
-        });
-    });
-
-    var i, plugin_id, msg;
-    for(i in toDelete) {
-        plugin_id = toDelete[i];
-
-        if( dependList[plugin_id] ) {
-            msg = '"' + plugin_id + '" is required by ('+ dependList[plugin_id] + ')';
-            if(options.force) {
-                events.emit('log', msg +' but forcing removal.');
-            } else {
-                // @tests - error and event message is checked spec/uninstall.spec.js
-                msg += ' and cannot be removed (hint: use -f or --force)';
-
-                if(plugin_id == top_plugin_id) {
-                    return Q.reject( new Error(msg) );
-                } else {
-                    events.emit('warn', msg +' and cannot be removed (hint: use -f or --force)');
-                    continue;
-                }
-            }
-        }
-
-        doDelete(plugin_id);
-    }
-
-    return Q();
-};
-
-// possible options: cli_variables, www_dir, is_top_level
-// Returns a promise
-function runUninstallPlatform(actions, platform, project_dir, plugin_dir, plugins_dir, options) {
-    options = options || {};
-
-    var xml_path     = path.join(plugin_dir, 'plugin.xml');
-    var plugin_et    = xml_helpers.parseElementtreeSync(xml_path);
-    var plugin_id    = plugin_et._root.attrib['id'];
-
-    // Deps info can be passed recusively
-    var depsInfo = options.depsInfo || dependencies.generate_dependency_info(plugins_dir, platform, 'remove');
-
-    // Check that this plugin has no dependents.
-    var dependents = dependencies.dependents(plugin_id, depsInfo, platform);
-
-    if(options.is_top_level && dependents && dependents.length > 0) {
-        var msg = "The plugin '"+ plugin_id +"' is required by (" + dependents.join(', ') + ")";
-        if(options.force) {
-            events.emit("info", msg + " but forcing removal");
-        } else {
-            return Q.reject( new Error(msg + ", skipping uninstallation.") );
-        }
-    }
-
-    // Check how many dangling dependencies this plugin has.
-    var deps = depsInfo.graph.getChain(plugin_id);
-    var danglers = dependencies.danglers(plugin_id, depsInfo, platform);
-
-    var promise;
-    if (deps && deps.length && danglers && danglers.length) {
-
-        // @tests - important this event is checked spec/uninstall.spec.js
-        events.emit('log', 'Uninstalling ' + danglers.length + ' dependent plugins.');
-        promise = Q.all(
-            danglers.map(function(dangler) {
-                var dependent_path = dependencies.resolvePath(dangler, plugins_dir);
-
-                var opts = underscore.extend({}, options, {
-                    is_top_level: depsInfo.top_level_plugins.indexOf(dangler) > -1,
-                    depsInfo: depsInfo
-                });
-
-                return runUninstallPlatform(actions, platform, project_dir, dependent_path, plugins_dir, opts);
-            })
-        );
-    } else {
-        promise = Q();
-    }
-
-    return promise.then(function() {
-        return handleUninstall(actions, platform, plugin_id, plugin_et, project_dir, options.www_dir, plugins_dir, plugin_dir, options.is_top_level);
-    });
-}
-
-// Returns a promise.
-function handleUninstall(actions, platform, plugin_id, plugin_et, project_dir, www_dir, plugins_dir, plugin_dir, is_top_level) {
-    var platform_modules = require('./platforms');
-    var handler = platform_modules[platform];
-    var platformTag = plugin_et.find('./platform[@name="'+platform+'"]');
-    www_dir = www_dir || handler.www_dir(project_dir);
-    events.emit('log', 'Uninstalling ' + plugin_id + ' from ' + platform);
-
-    var assets = plugin_et.findall('./asset');
-    if (platformTag) {
-        var sourceFiles = platformTag.findall('./source-file'),
-            headerFiles = platformTag.findall('./header-file'),
-            libFiles = platformTag.findall('./lib-file'),
-            resourceFiles = platformTag.findall('./resource-file');
-            frameworkFiles = platformTag.findall('./framework[@custom="true"]');
-        assets = assets.concat(platformTag.findall('./asset'));
-
-        // queue up native stuff
-        sourceFiles && sourceFiles.forEach(function(source) {
-            actions.push(actions.createAction(handler["source-file"].uninstall,
-                                             [source, project_dir, plugin_id],
-                                             handler["source-file"].install,
-                                             [source, plugin_dir, project_dir, plugin_id]));
-        });
-
-        headerFiles && headerFiles.forEach(function(header) {
-            actions.push(actions.createAction(handler["header-file"].uninstall,
-                                             [header, project_dir, plugin_id],
-                                             handler["header-file"].install,
-                                             [header, plugin_dir, project_dir, plugin_id]));
-        });
-
-        resourceFiles && resourceFiles.forEach(function(resource) {
-            actions.push(actions.createAction(handler["resource-file"].uninstall,
-                                              [resource, project_dir, plugin_id],
-                                              handler["resource-file"].install,
-                                              [resource, plugin_dir, project_dir]));
-        });
-
-        // CB-5238 custom frameworks only
-        frameworkFiles && frameworkFiles.forEach(function(framework) {
-            actions.push(actions.createAction(handler["framework"].uninstall,
-                                              [framework, project_dir, plugin_id],
-                                              handler["framework"].install,
-                                              [framework, plugin_dir, project_dir]));
-        });
-
-        libFiles && libFiles.forEach(function(source) {
-            actions.push(actions.createAction(handler["lib-file"].uninstall,
-                                              [source, project_dir, plugin_id],
-                                              handler["lib-file"].install,
-                                              [source, plugin_dir, project_dir, plugin_id]));
-        });
-    }
-
-    // queue up asset installation
-    var common = require('./platforms/common');
-    assets && assets.forEach(function(asset) {
-        actions.push(actions.createAction(common.asset.uninstall, [asset, www_dir, plugin_id], common.asset.install, [asset, plugin_dir, www_dir]));
-    });
-
-    // run through the action stack
-    return actions.process(platform, project_dir)
-    .then(function() {
-        // WIN!
-        events.emit('verbose', plugin_id + ' uninstalled from ' + platform + '.');
-        // queue up the plugin so prepare can remove the config changes
-        config_changes.add_uninstalled_plugin_to_prepare_queue(plugins_dir, plugin_id, platform, is_top_level);
-        // call prepare after a successful uninstall
-        plugman.prepare(project_dir, platform, plugins_dir, www_dir);
-    });
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/unpublish.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/unpublish.js b/cordova-lib/src/plugman/unpublish.js
deleted file mode 100644
index be1b4b4..0000000
--- a/cordova-lib/src/plugman/unpublish.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var registry = require('./registry/registry')
-
-module.exports = function(plugin) {
-    return registry.unpublish(plugin);
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/util/action-stack.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/action-stack.js b/cordova-lib/src/plugman/util/action-stack.js
deleted file mode 100644
index dd9dafb..0000000
--- a/cordova-lib/src/plugman/util/action-stack.js
+++ /dev/null
@@ -1,85 +0,0 @@
-var platforms = require("../platforms"),
-    events = require('../events'),
-    Q = require('q'),
-    fs = require('fs');
-
-function ActionStack() {
-    this.stack = [];
-    this.completed = [];
-}
-
-ActionStack.prototype = {
-    createAction:function(handler, action_params, reverter, revert_params) {
-        return {
-            handler:{
-                run:handler,
-                params:action_params
-            },
-            reverter:{
-                run:reverter,
-                params:revert_params
-            }
-        };
-    },
-    push:function(tx) {
-        this.stack.push(tx);
-    },
-    // Returns a promise.
-    process:function(platform, project_dir) {
-        events.emit('verbose', 'Beginning processing of action stack for ' + platform + ' project...');
-        var project_files;
-
-        // parse platform-specific project files once
-        if (platforms[platform].parseProjectFile) {
-            events.emit('verbose', 'Parsing ' + platform + ' project files...');
-            project_files = platforms[platform].parseProjectFile(project_dir);
-        }
-
-        while(this.stack.length) {
-            var action = this.stack.shift();
-            var handler = action.handler.run;
-            var action_params = action.handler.params;
-            if (project_files) {
-                action_params.push(project_files);
-            }
-
-            try {
-                handler.apply(null, action_params);
-            } catch(e) {
-                events.emit('warn', 'Error during processing of action! Attempting to revert...');
-                var incomplete = this.stack.unshift(action);
-                var issue = 'Uh oh!\n';
-                // revert completed tasks
-                while(this.completed.length) {
-                    var undo = this.completed.shift();
-                    var revert = undo.reverter.run;
-                    var revert_params = undo.reverter.params;
-
-                    if (project_files) {
-                        revert_params.push(project_files);
-                    }
-
-                    try {
-                        revert.apply(null, revert_params);
-                    } catch(err) {
-                        events.emit('warn', 'Error during reversion of action! We probably really messed up your project now, sorry! D:');
-                        issue += 'A reversion action failed: ' + err.message + '\n';
-                    }
-                }
-                e.message = issue + e.message;
-                return Q.reject(e);
-            }
-            this.completed.push(action);
-        }
-        events.emit('verbose', 'Action stack processing complete.');
-
-        if (project_files) {
-            events.emit('verbose', 'Writing out ' + platform + ' project files...');
-            project_files.write();
-        }
-
-        return Q();
-    }
-};
-
-module.exports = ActionStack;


[58/70] Remove all cordova-lib files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_writer.cpp
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_writer.cpp b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_writer.cpp
deleted file mode 100644
index a522ef6..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_writer.cpp
+++ /dev/null
@@ -1,829 +0,0 @@
-#include <json/writer.h>
-#include <utility>
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
-#include <iostream>
-#include <sstream>
-#include <iomanip>
-
-#if _MSC_VER >= 1400 // VC++ 8.0
-#pragma warning( disable : 4996 )   // disable warning about strdup being deprecated.
-#endif
-
-namespace Json {
-
-static bool isControlCharacter(char ch)
-{
-   return ch > 0 && ch <= 0x1F;
-}
-
-static bool containsControlCharacter( const char* str )
-{
-   while ( *str ) 
-   {
-      if ( isControlCharacter( *(str++) ) )
-         return true;
-   }
-   return false;
-}
-static void uintToString( unsigned int value, 
-                          char *&current )
-{
-   *--current = 0;
-   do
-   {
-      *--current = (value % 10) + '0';
-      value /= 10;
-   }
-   while ( value != 0 );
-}
-
-std::string valueToString( Int value )
-{
-   char buffer[32];
-   char *current = buffer + sizeof(buffer);
-   bool isNegative = value < 0;
-   if ( isNegative )
-      value = -value;
-   uintToString( UInt(value), current );
-   if ( isNegative )
-      *--current = '-';
-   assert( current >= buffer );
-   return current;
-}
-
-
-std::string valueToString( UInt value )
-{
-   char buffer[32];
-   char *current = buffer + sizeof(buffer);
-   uintToString( value, current );
-   assert( current >= buffer );
-   return current;
-}
-
-std::string valueToString( double value )
-{
-   char buffer[32];
-#if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__) // Use secure version with visual studio 2005 to avoid warning. 
-   sprintf_s(buffer, sizeof(buffer), "%#.16g", value); 
-#else	
-   sprintf(buffer, "%#.16g", value); 
-#endif
-   char* ch = buffer + strlen(buffer) - 1;
-   if (*ch != '0') return buffer; // nothing to truncate, so save time
-   while(ch > buffer && *ch == '0'){
-     --ch;
-   }
-   char* last_nonzero = ch;
-   while(ch >= buffer){
-     switch(*ch){
-     case '0':
-     case '1':
-     case '2':
-     case '3':
-     case '4':
-     case '5':
-     case '6':
-     case '7':
-     case '8':
-     case '9':
-       --ch;
-       continue;
-     case '.':
-       // Truncate zeroes to save bytes in output, but keep one.
-       *(last_nonzero+2) = '\0';
-       return buffer;
-     default:
-       return buffer;
-     }
-   }
-   return buffer;
-}
-
-
-std::string valueToString( bool value )
-{
-   return value ? "true" : "false";
-}
-
-std::string valueToQuotedString( const char *value )
-{
-   // Not sure how to handle unicode...
-   if (strpbrk(value, "\"\\\b\f\n\r\t") == NULL && !containsControlCharacter( value ))
-      return std::string("\"") + value + "\"";
-   // We have to walk value and escape any special characters.
-   // Appending to std::string is not efficient, but this should be rare.
-   // (Note: forward slashes are *not* rare, but I am not escaping them.)
-   unsigned maxsize = strlen(value)*2 + 3; // allescaped+quotes+NULL
-   std::string result;
-   result.reserve(maxsize); // to avoid lots of mallocs
-   result += "\"";
-   for (const char* c=value; *c != 0; ++c)
-   {
-      switch(*c)
-      {
-         case '\"':
-            result += "\\\"";
-            break;
-         case '\\':
-            result += "\\\\";
-            break;
-         case '\b':
-            result += "\\b";
-            break;
-         case '\f':
-            result += "\\f";
-            break;
-         case '\n':
-            result += "\\n";
-            break;
-         case '\r':
-            result += "\\r";
-            break;
-         case '\t':
-            result += "\\t";
-            break;
-         //case '/':
-            // Even though \/ is considered a legal escape in JSON, a bare
-            // slash is also legal, so I see no reason to escape it.
-            // (I hope I am not misunderstanding something.
-            // blep notes: actually escaping \/ may be useful in javascript to avoid </ 
-            // sequence.
-            // Should add a flag to allow this compatibility mode and prevent this 
-            // sequence from occurring.
-         default:
-            if ( isControlCharacter( *c ) )
-            {
-               std::ostringstream oss;
-               oss << "\\u" << std::hex << std::uppercase << std::setfill('0') << std::setw(4) << static_cast<int>(*c);
-               result += oss.str();
-            }
-            else
-            {
-               result += *c;
-            }
-            break;
-      }
-   }
-   result += "\"";
-   return result;
-}
-
-// Class Writer
-// //////////////////////////////////////////////////////////////////
-Writer::~Writer()
-{
-}
-
-
-// Class FastWriter
-// //////////////////////////////////////////////////////////////////
-
-FastWriter::FastWriter()
-   : yamlCompatibilityEnabled_( false )
-{
-}
-
-
-void 
-FastWriter::enableYAMLCompatibility()
-{
-   yamlCompatibilityEnabled_ = true;
-}
-
-
-std::string 
-FastWriter::write( const Value &root )
-{
-   document_ = "";
-   writeValue( root );
-   document_ += "\n";
-   return document_;
-}
-
-
-void 
-FastWriter::writeValue( const Value &value )
-{
-   switch ( value.type() )
-   {
-   case nullValue:
-      document_ += "null";
-      break;
-   case intValue:
-      document_ += valueToString( value.asInt() );
-      break;
-   case uintValue:
-      document_ += valueToString( value.asUInt() );
-      break;
-   case realValue:
-      document_ += valueToString( value.asDouble() );
-      break;
-   case stringValue:
-      document_ += valueToQuotedString( value.asCString() );
-      break;
-   case booleanValue:
-      document_ += valueToString( value.asBool() );
-      break;
-   case arrayValue:
-      {
-         document_ += "[";
-         int size = value.size();
-         for ( int index =0; index < size; ++index )
-         {
-            if ( index > 0 )
-               document_ += ",";
-            writeValue( value[index] );
-         }
-         document_ += "]";
-      }
-      break;
-   case objectValue:
-      {
-         Value::Members members( value.getMemberNames() );
-         document_ += "{";
-         for ( Value::Members::iterator it = members.begin(); 
-               it != members.end(); 
-               ++it )
-         {
-            const std::string &name = *it;
-            if ( it != members.begin() )
-               document_ += ",";
-            document_ += valueToQuotedString( name.c_str() );
-            document_ += yamlCompatibilityEnabled_ ? ": " 
-                                                  : ":";
-            writeValue( value[name] );
-         }
-         document_ += "}";
-      }
-      break;
-   }
-}
-
-
-// Class StyledWriter
-// //////////////////////////////////////////////////////////////////
-
-StyledWriter::StyledWriter()
-   : rightMargin_( 74 )
-   , indentSize_( 3 )
-{
-}
-
-
-std::string 
-StyledWriter::write( const Value &root )
-{
-   document_ = "";
-   addChildValues_ = false;
-   indentString_ = "";
-   writeCommentBeforeValue( root );
-   writeValue( root );
-   writeCommentAfterValueOnSameLine( root );
-   document_ += "\n";
-   return document_;
-}
-
-
-void 
-StyledWriter::writeValue( const Value &value )
-{
-   switch ( value.type() )
-   {
-   case nullValue:
-      pushValue( "null" );
-      break;
-   case intValue:
-      pushValue( valueToString( value.asInt() ) );
-      break;
-   case uintValue:
-      pushValue( valueToString( value.asUInt() ) );
-      break;
-   case realValue:
-      pushValue( valueToString( value.asDouble() ) );
-      break;
-   case stringValue:
-      pushValue( valueToQuotedString( value.asCString() ) );
-      break;
-   case booleanValue:
-      pushValue( valueToString( value.asBool() ) );
-      break;
-   case arrayValue:
-      writeArrayValue( value);
-      break;
-   case objectValue:
-      {
-         Value::Members members( value.getMemberNames() );
-         if ( members.empty() )
-            pushValue( "{}" );
-         else
-         {
-            writeWithIndent( "{" );
-            indent();
-            Value::Members::iterator it = members.begin();
-            while ( true )
-            {
-               const std::string &name = *it;
-               const Value &childValue = value[name];
-               writeCommentBeforeValue( childValue );
-               writeWithIndent( valueToQuotedString( name.c_str() ) );
-               document_ += " : ";
-               writeValue( childValue );
-               if ( ++it == members.end() )
-               {
-                  writeCommentAfterValueOnSameLine( childValue );
-                  break;
-               }
-               document_ += ",";
-               writeCommentAfterValueOnSameLine( childValue );
-            }
-            unindent();
-            writeWithIndent( "}" );
-         }
-      }
-      break;
-   }
-}
-
-
-void 
-StyledWriter::writeArrayValue( const Value &value )
-{
-   unsigned size = value.size();
-   if ( size == 0 )
-      pushValue( "[]" );
-   else
-   {
-      bool isArrayMultiLine = isMultineArray( value );
-      if ( isArrayMultiLine )
-      {
-         writeWithIndent( "[" );
-         indent();
-         bool hasChildValue = !childValues_.empty();
-         unsigned index =0;
-         while ( true )
-         {
-            const Value &childValue = value[index];
-            writeCommentBeforeValue( childValue );
-            if ( hasChildValue )
-               writeWithIndent( childValues_[index] );
-            else
-            {
-               writeIndent();
-               writeValue( childValue );
-            }
-            if ( ++index == size )
-            {
-               writeCommentAfterValueOnSameLine( childValue );
-               break;
-            }
-            document_ += ",";
-            writeCommentAfterValueOnSameLine( childValue );
-         }
-         unindent();
-         writeWithIndent( "]" );
-      }
-      else // output on a single line
-      {
-         assert( childValues_.size() == size );
-         document_ += "[ ";
-         for ( unsigned index =0; index < size; ++index )
-         {
-            if ( index > 0 )
-               document_ += ", ";
-            document_ += childValues_[index];
-         }
-         document_ += " ]";
-      }
-   }
-}
-
-
-bool 
-StyledWriter::isMultineArray( const Value &value )
-{
-   int size = value.size();
-   bool isMultiLine = size*3 >= rightMargin_ ;
-   childValues_.clear();
-   for ( int index =0; index < size  &&  !isMultiLine; ++index )
-   {
-      const Value &childValue = value[index];
-      isMultiLine = isMultiLine  ||
-                     ( (childValue.isArray()  ||  childValue.isObject())  &&  
-                        childValue.size() > 0 );
-   }
-   if ( !isMultiLine ) // check if line length > max line length
-   {
-      childValues_.reserve( size );
-      addChildValues_ = true;
-      int lineLength = 4 + (size-1)*2; // '[ ' + ', '*n + ' ]'
-      for ( int index =0; index < size  &&  !isMultiLine; ++index )
-      {
-         writeValue( value[index] );
-         lineLength += int( childValues_[index].length() );
-         isMultiLine = isMultiLine  &&  hasCommentForValue( value[index] );
-      }
-      addChildValues_ = false;
-      isMultiLine = isMultiLine  ||  lineLength >= rightMargin_;
-   }
-   return isMultiLine;
-}
-
-
-void 
-StyledWriter::pushValue( const std::string &value )
-{
-   if ( addChildValues_ )
-      childValues_.push_back( value );
-   else
-      document_ += value;
-}
-
-
-void 
-StyledWriter::writeIndent()
-{
-   if ( !document_.empty() )
-   {
-      char last = document_[document_.length()-1];
-      if ( last == ' ' )     // already indented
-         return;
-      if ( last != '\n' )    // Comments may add new-line
-         document_ += '\n';
-   }
-   document_ += indentString_;
-}
-
-
-void 
-StyledWriter::writeWithIndent( const std::string &value )
-{
-   writeIndent();
-   document_ += value;
-}
-
-
-void 
-StyledWriter::indent()
-{
-   indentString_ += std::string( indentSize_, ' ' );
-}
-
-
-void 
-StyledWriter::unindent()
-{
-   assert( int(indentString_.size()) >= indentSize_ );
-   indentString_.resize( indentString_.size() - indentSize_ );
-}
-
-
-void 
-StyledWriter::writeCommentBeforeValue( const Value &root )
-{
-   if ( !root.hasComment( commentBefore ) )
-      return;
-   document_ += normalizeEOL( root.getComment( commentBefore ) );
-   document_ += "\n";
-}
-
-
-void 
-StyledWriter::writeCommentAfterValueOnSameLine( const Value &root )
-{
-   if ( root.hasComment( commentAfterOnSameLine ) )
-      document_ += " " + normalizeEOL( root.getComment( commentAfterOnSameLine ) );
-
-   if ( root.hasComment( commentAfter ) )
-   {
-      document_ += "\n";
-      document_ += normalizeEOL( root.getComment( commentAfter ) );
-      document_ += "\n";
-   }
-}
-
-
-bool 
-StyledWriter::hasCommentForValue( const Value &value )
-{
-   return value.hasComment( commentBefore )
-          ||  value.hasComment( commentAfterOnSameLine )
-          ||  value.hasComment( commentAfter );
-}
-
-
-std::string 
-StyledWriter::normalizeEOL( const std::string &text )
-{
-   std::string normalized;
-   normalized.reserve( text.length() );
-   const char *begin = text.c_str();
-   const char *end = begin + text.length();
-   const char *current = begin;
-   while ( current != end )
-   {
-      char c = *current++;
-      if ( c == '\r' ) // mac or dos EOL
-      {
-         if ( *current == '\n' ) // convert dos EOL
-            ++current;
-         normalized += '\n';
-      }
-      else // handle unix EOL & other char
-         normalized += c;
-   }
-   return normalized;
-}
-
-
-// Class StyledStreamWriter
-// //////////////////////////////////////////////////////////////////
-
-StyledStreamWriter::StyledStreamWriter( std::string indentation )
-   : document_(NULL)
-   , rightMargin_( 74 )
-   , indentation_( indentation )
-{
-}
-
-
-void
-StyledStreamWriter::write( std::ostream &out, const Value &root )
-{
-   document_ = &out;
-   addChildValues_ = false;
-   indentString_ = "";
-   writeCommentBeforeValue( root );
-   writeValue( root );
-   writeCommentAfterValueOnSameLine( root );
-   *document_ << "\n";
-   document_ = NULL; // Forget the stream, for safety.
-}
-
-
-void 
-StyledStreamWriter::writeValue( const Value &value )
-{
-   switch ( value.type() )
-   {
-   case nullValue:
-      pushValue( "null" );
-      break;
-   case intValue:
-      pushValue( valueToString( value.asInt() ) );
-      break;
-   case uintValue:
-      pushValue( valueToString( value.asUInt() ) );
-      break;
-   case realValue:
-      pushValue( valueToString( value.asDouble() ) );
-      break;
-   case stringValue:
-      pushValue( valueToQuotedString( value.asCString() ) );
-      break;
-   case booleanValue:
-      pushValue( valueToString( value.asBool() ) );
-      break;
-   case arrayValue:
-      writeArrayValue( value);
-      break;
-   case objectValue:
-      {
-         Value::Members members( value.getMemberNames() );
-         if ( members.empty() )
-            pushValue( "{}" );
-         else
-         {
-            writeWithIndent( "{" );
-            indent();
-            Value::Members::iterator it = members.begin();
-            while ( true )
-            {
-               const std::string &name = *it;
-               const Value &childValue = value[name];
-               writeCommentBeforeValue( childValue );
-               writeWithIndent( valueToQuotedString( name.c_str() ) );
-               *document_ << " : ";
-               writeValue( childValue );
-               if ( ++it == members.end() )
-               {
-                  writeCommentAfterValueOnSameLine( childValue );
-                  break;
-               }
-               *document_ << ",";
-               writeCommentAfterValueOnSameLine( childValue );
-            }
-            unindent();
-            writeWithIndent( "}" );
-         }
-      }
-      break;
-   }
-}
-
-
-void 
-StyledStreamWriter::writeArrayValue( const Value &value )
-{
-   unsigned size = value.size();
-   if ( size == 0 )
-      pushValue( "[]" );
-   else
-   {
-      bool isArrayMultiLine = isMultineArray( value );
-      if ( isArrayMultiLine )
-      {
-         writeWithIndent( "[" );
-         indent();
-         bool hasChildValue = !childValues_.empty();
-         unsigned index =0;
-         while ( true )
-         {
-            const Value &childValue = value[index];
-            writeCommentBeforeValue( childValue );
-            if ( hasChildValue )
-               writeWithIndent( childValues_[index] );
-            else
-            {
-	       writeIndent();
-               writeValue( childValue );
-            }
-            if ( ++index == size )
-            {
-               writeCommentAfterValueOnSameLine( childValue );
-               break;
-            }
-            *document_ << ",";
-            writeCommentAfterValueOnSameLine( childValue );
-         }
-         unindent();
-         writeWithIndent( "]" );
-      }
-      else // output on a single line
-      {
-         assert( childValues_.size() == size );
-         *document_ << "[ ";
-         for ( unsigned index =0; index < size; ++index )
-         {
-            if ( index > 0 )
-               *document_ << ", ";
-            *document_ << childValues_[index];
-         }
-         *document_ << " ]";
-      }
-   }
-}
-
-
-bool 
-StyledStreamWriter::isMultineArray( const Value &value )
-{
-   int size = value.size();
-   bool isMultiLine = size*3 >= rightMargin_ ;
-   childValues_.clear();
-   for ( int index =0; index < size  &&  !isMultiLine; ++index )
-   {
-      const Value &childValue = value[index];
-      isMultiLine = isMultiLine  ||
-                     ( (childValue.isArray()  ||  childValue.isObject())  &&  
-                        childValue.size() > 0 );
-   }
-   if ( !isMultiLine ) // check if line length > max line length
-   {
-      childValues_.reserve( size );
-      addChildValues_ = true;
-      int lineLength = 4 + (size-1)*2; // '[ ' + ', '*n + ' ]'
-      for ( int index =0; index < size  &&  !isMultiLine; ++index )
-      {
-         writeValue( value[index] );
-         lineLength += int( childValues_[index].length() );
-         isMultiLine = isMultiLine  &&  hasCommentForValue( value[index] );
-      }
-      addChildValues_ = false;
-      isMultiLine = isMultiLine  ||  lineLength >= rightMargin_;
-   }
-   return isMultiLine;
-}
-
-
-void 
-StyledStreamWriter::pushValue( const std::string &value )
-{
-   if ( addChildValues_ )
-      childValues_.push_back( value );
-   else
-      *document_ << value;
-}
-
-
-void 
-StyledStreamWriter::writeIndent()
-{
-  /*
-    Some comments in this method would have been nice. ;-)
-
-   if ( !document_.empty() )
-   {
-      char last = document_[document_.length()-1];
-      if ( last == ' ' )     // already indented
-         return;
-      if ( last != '\n' )    // Comments may add new-line
-         *document_ << '\n';
-   }
-  */
-   *document_ << '\n' << indentString_;
-}
-
-
-void 
-StyledStreamWriter::writeWithIndent( const std::string &value )
-{
-   writeIndent();
-   *document_ << value;
-}
-
-
-void 
-StyledStreamWriter::indent()
-{
-   indentString_ += indentation_;
-}
-
-
-void 
-StyledStreamWriter::unindent()
-{
-   assert( indentString_.size() >= indentation_.size() );
-   indentString_.resize( indentString_.size() - indentation_.size() );
-}
-
-
-void 
-StyledStreamWriter::writeCommentBeforeValue( const Value &root )
-{
-   if ( !root.hasComment( commentBefore ) )
-      return;
-   *document_ << normalizeEOL( root.getComment( commentBefore ) );
-   *document_ << "\n";
-}
-
-
-void 
-StyledStreamWriter::writeCommentAfterValueOnSameLine( const Value &root )
-{
-   if ( root.hasComment( commentAfterOnSameLine ) )
-      *document_ << " " + normalizeEOL( root.getComment( commentAfterOnSameLine ) );
-
-   if ( root.hasComment( commentAfter ) )
-   {
-      *document_ << "\n";
-      *document_ << normalizeEOL( root.getComment( commentAfter ) );
-      *document_ << "\n";
-   }
-}
-
-
-bool 
-StyledStreamWriter::hasCommentForValue( const Value &value )
-{
-   return value.hasComment( commentBefore )
-          ||  value.hasComment( commentAfterOnSameLine )
-          ||  value.hasComment( commentAfter );
-}
-
-
-std::string 
-StyledStreamWriter::normalizeEOL( const std::string &text )
-{
-   std::string normalized;
-   normalized.reserve( text.length() );
-   const char *begin = text.c_str();
-   const char *end = begin + text.length();
-   const char *current = begin;
-   while ( current != end )
-   {
-      char c = *current++;
-      if ( c == '\r' ) // mac or dos EOL
-      {
-         if ( *current == '\n' ) // convert dos EOL
-            ++current;
-         normalized += '\n';
-      }
-      else // handle unix EOL & other char
-         normalized += c;
-   }
-   return normalized;
-}
-
-
-std::ostream& operator<<( std::ostream &sout, const Value &root )
-{
-   Json::StyledStreamWriter writer;
-   writer.write(sout, root);
-   return sout;
-}
-
-
-} // namespace Json

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/plugin.cpp
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/plugin.cpp b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/plugin.cpp
deleted file mode 100644
index 387fcea..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/plugin.cpp
+++ /dev/null
@@ -1,320 +0,0 @@
-#include "plugin.h"
-#include "tokenizer.h"
-
-#ifdef _WINDOWS
-#include <windows.h>
-BOOL APIENTRY DllMain( HANDLE hModule,
-                       DWORD ul_reason_for_call,
-                       LPVOID lpReserved )
-{
-    return TRUE;
-}
-#else
-#include <errno.h>
-#include <string.h>
-
-extern int errno;
-#endif
-
-SendPluginEv SendPluginEvent;
-
-string g_GetSysErrMsg( void )
-{
-    string strError = "Unknown";
-    // Problem loading
-#ifdef _WINDOWS
-    int nErrorCode = GetLastError();
-    LPTSTR s;
-    if ( ::FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
-    NULL, nErrorCode, 0, ( LPTSTR ) &s, 0, NULL ) )
-    {
-        strError = s;
-    }
-    else
-    {
-        char szBuf[ 20 ];
-        _snprintf_s( szBuf, _countof(szBuf), 19, "%d", nErrorCode );
-        strError = szBuf;
-    }
-#else
-    char szError[80];
-    if ( strerror_r( errno, szError, sizeof(szError)  ) )
-    {
-        strError = "no description found";
-    }
-    else
-    {
-        strError = szError;
-    }
-#endif
-    return strError;
-}
-
-void g_sleep( unsigned int mseconds )
-{
-#ifdef _WINDOWS
-    Sleep( mseconds );
-#else
-    usleep( mseconds * 1000 );
-#endif
-}
-
-string& g_trim( string& str )
-{
-    // Whitespace characters
-    char whspc[] = " \t\r\n\v\f";
-
-    // Whack off first part
-    size_t pos = str.find_first_not_of( whspc );
-
-    if ( pos != string::npos )
-        str.replace( 0, pos, "" );
-
-    // Whack off trailing stuff
-    pos = str.find_last_not_of( whspc );
-
-    if ( pos != string::npos )
-        str.replace( pos + 1, str.length() - pos, "" );
-
-    return str;
-}
-
-void g_tokenize( const string& str, const string& delimiters, vector<string>& tokens )
-{
-    tokenize( str, tokens, delimiters );
-}
-
-char* SetEventFunc( SendPluginEv funcPtr )
-{
-    static char * szObjList = onGetObjList();
-    SendPluginEvent = funcPtr;
-    return szObjList;
-}
-
-
-const int nMAXSIZE = 512;
-char* g_pszRetVal = NULL;
-
-//-----------------------------------------------------------
-// Map from an object Id to an object instance
-//-----------------------------------------------------------
-typedef std::map<string, JSExt*> StringToJExt_T;
-
-//-----------------------------------------------------------
-// Map from a browser context to an id mapping
-//-----------------------------------------------------------
-typedef std::map<void*, StringToJExt_T*> VoidToMap_T;
-
-VoidToMap_T g_context2Map;
-
-class GlobalSharedModule
-{
-
-public:
-    GlobalSharedModule( void )
-    {
-        g_pszRetVal = new char[ nMAXSIZE ];
-    }
-
-    ~GlobalSharedModule()
-    {
-        delete [] g_pszRetVal;
-
-        VoidToMap_T::iterator posMaps;
-
-        for ( posMaps = g_context2Map.begin(); posMaps != g_context2Map.end(); ++posMaps )
-        {
-            StringToJExt_T& id2Obj = *posMaps->second;
-            StringToJExt_T::iterator posMap;
-
-            for ( posMap = id2Obj.begin(); posMap != id2Obj.end(); ++posMap )
-            {
-                JSExt* pJSExt = posMap->second;
-
-                if ( pJSExt->CanDelete() )
-                {
-                    delete pJSExt;
-                }
-            }
-
-            id2Obj.erase( id2Obj.begin(), id2Obj.end() );
-        }
-
-        g_context2Map.erase( g_context2Map.begin(), g_context2Map.end() );
-    }
-};
-
-GlobalSharedModule g_sharedModule;
-
-char* g_str2global( const string& strRetVal )
-{
-    int nLen = strRetVal.size();
-
-    if ( nLen >= nMAXSIZE )
-    {
-        delete [] g_pszRetVal;
-        g_pszRetVal = new char[ nLen + 1 ];
-    }
-
-    else
-    {
-        // To minimize the number of memory reallocations, the assumption
-        // is that in most times this will be the case
-        delete [] g_pszRetVal;
-        g_pszRetVal = new char[ nMAXSIZE ];
-    }
-
-    strcpy( g_pszRetVal, strRetVal.c_str() );
-    return g_pszRetVal;
-}
-
-bool g_unregisterObject( const string& strObjId, void* pContext )
-{
-    // Called by the plugin extension implementation
-    // if the extension handles the deletion of its object
-
-    StringToJExt_T * pID2Obj = NULL;
-
-    VoidToMap_T::iterator iter = g_context2Map.find( pContext );
-
-    if ( iter != g_context2Map.end() )
-    {
-        pID2Obj = iter->second;
-    }
-    else
-    {
-        return false;
-    }
-
-    StringToJExt_T& mapID2Obj = *pID2Obj;
-
-    StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
-
-    if ( r == mapID2Obj.end() )
-    {
-        return false;
-    }
-
-    mapID2Obj.erase( strObjId );
-    return true;
-}
-
-char* InvokeFunction( const char* szCommand, void* pContext )
-{
-    StringToJExt_T * pID2Obj = NULL;
-
-    VoidToMap_T::iterator iter = g_context2Map.find( pContext );
-
-    if ( iter != g_context2Map.end() )
-    {
-        pID2Obj = iter->second;
-    }
-    else
-    {
-        pID2Obj = new StringToJExt_T;
-        g_context2Map[ pContext ] = pID2Obj;
-    }
-
-    StringToJExt_T& mapID2Obj = *pID2Obj;
-
-    string strFullCommand = szCommand;
-    vector<string> arParams;
-    g_tokenize( strFullCommand, " ", arParams );
-    string strCommand = arParams[ 0 ];
-    string strRetVal = szERROR;
-
-    if ( strCommand == szCREATE )
-    {
-        string strClassName = arParams[ 1 ];
-        string strObjId = arParams[ 2 ];
-
-        StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
-
-        if ( r != mapID2Obj.end() )
-        {
-            strRetVal += strObjId;
-            strRetVal += " :Object already exists.";
-            return g_str2global( strRetVal );
-        }
-
-        JSExt* pJSExt = onCreateObject( strClassName, strObjId );
-
-        if ( pJSExt == NULL )
-        {
-            strRetVal += strObjId;
-            strRetVal += " :Unknown object type ";
-            strRetVal += strClassName;
-            return g_str2global( strRetVal );
-        }
-
-        pJSExt->m_pContext = pContext;
-        mapID2Obj[ strObjId ] = pJSExt;
-
-        strRetVal = szOK;
-        strRetVal += strObjId;
-        return g_str2global( strRetVal );
-    }
-    else
-    if ( strCommand == szINVOKE )
-    {
-        string strObjId = arParams[ 1 ];
-        string strMethod = arParams[ 2 ];
-
-        StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
-
-        if ( r == mapID2Obj.end() )
-        {
-            strRetVal += strObjId;
-            strRetVal += " :No object found for id.";
-            return g_str2global( strRetVal );
-        }
-
-        JSExt* pJSExt = r->second;
-
-        size_t nLoc = strFullCommand.find( strObjId );
-
-        if ( nLoc == string::npos )
-        {
-            strRetVal += strObjId;
-            strRetVal += " :Internal InvokeMethod error.";
-            return g_str2global( strRetVal );
-        }
-
-        if ( strMethod == szDISPOSE )
-        {
-            StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
-
-            if ( r == mapID2Obj.end() )
-            {
-                strRetVal = szERROR;
-                strRetVal += strObjId;
-                return g_str2global( strRetVal );
-            }
-
-            JSExt * pJSExt = mapID2Obj[ strObjId ];
-
-            if ( pJSExt->CanDelete() )
-            {
-                delete pJSExt;
-            }
-
-            mapID2Obj.erase( strObjId );
-            strRetVal = szOK;
-            strRetVal += strObjId;
-            return g_str2global( strRetVal );
-        }
-
-        size_t nSuffixLoc = nLoc + strObjId.size();
-        string strInvoke = strFullCommand.substr( nSuffixLoc );
-        strInvoke = g_trim( strInvoke );
-        strRetVal = pJSExt->InvokeMethod( strInvoke );
-        return g_str2global( strRetVal );
-    }
-
-    strRetVal += " :Unknown command ";
-    strRetVal += strCommand;
-    return g_str2global( strRetVal );
-}
-
-//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/plugin.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/plugin.h b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/plugin.h
deleted file mode 100644
index 4ef7116..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/plugin.h
+++ /dev/null
@@ -1,70 +0,0 @@
-#ifndef _PLUGIN_H
-#define _PLUGIN_H
-
-#include <map>
-#include <string>
-#include <vector>
-#include <unistd.h>
-//#include "tokenizer.h"
-
-using namespace std;
-
-//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-//%% Functions exported by this DLL
-//%% Should always be only SetEventFunc and InvokeFunction
-//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-// g++ requires extern "C" otherwise the names of SetEventFunc and InvokeFunction
-// are mangled C++ style. MS Visual Studio doesn't seem to care though.
-extern "C"
-{
-    typedef void (*SendPluginEv)( const char* szEvent, void* pContext );
-    char* SetEventFunc(SendPluginEv funcPtr);
-    char* InvokeFunction( const char* szCommand, void* pContext );
-}
-
-// JNEXT Framework function of the form:
-// typedef void (*SendPluginEv)( const char* szEvent );
-// used to notify JavaScript of an asynchronous event
-extern SendPluginEv SendPluginEvent;
-
-/////////////////////////////////////////////////////////////////////////
-// Constants and methods common to all JNEXT extensions types
-/////////////////////////////////////////////////////////////////////////
-#define szERROR         "Error "
-#define szOK            "Ok "
-
-#define szDISPOSE       "Dispose"
-#define szINVOKE        "InvokeMethod"
-#define szCREATE        "CreateObj"
-
-/////////////////////////////////////////////////////////////////////////
-// Utility functions
-/////////////////////////////////////////////////////////////////////////
-string& g_trim( string& str );
-void g_tokenize(const string& str,const string& delimiters, vector<string>& tokens);
-char* g_str2static( const string& strRetVal );
-void g_sleep( unsigned int mseconds );
-bool g_unregisterObject( const string& strObjId, void* pContext );
-
-
-/////////////////////////////////////////////////////////////////////////
-// Abstract extension object
-/////////////////////////////////////////////////////////////////////////
-class JSExt
-{
-public:
-    virtual ~JSExt() {};
-    virtual string InvokeMethod( const string& strCommand ) = 0;
-    virtual bool CanDelete( void ) = 0;
-    virtual void TryDelete( void ) {}
-public:
-    void* m_pContext;
-};
-
-/////////////////////////////////////////////////////////////////////////
-// Callback functions to be implemented by the plugin implementation
-/////////////////////////////////////////////////////////////////////////
-extern char* onGetObjList( void );
-extern JSExt* onCreateObject( const string& strClassName, const string& strObjId );
-
-#endif

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/tokenizer.cpp
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/tokenizer.cpp b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/tokenizer.cpp
deleted file mode 100644
index 4a39573..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/tokenizer.cpp
+++ /dev/null
@@ -1,222 +0,0 @@
-/************************************************************************
-The zlib/libpng License
-
-Copyright (c) 2006 Joerg Wiedenmann
-
-This software is provided 'as-is', without any express or implied warranty.
-In no event will the authors be held liable for any damages arising from
-the use of this software.
-
-Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it
-freely, subject to the following restrictions:
-
-1. The origin of this software must not be misrepresented;
-you must not claim that you wrote the original software.
-If you use this software in a product, an acknowledgment
-in the product documentation would be appreciated but is
-not required.
-
-2. Altered source versions must be plainly marked as such,
-and must not be misrepresented as being the original software.
-
-3. This notice may not be removed or altered from any source distribution.
-
-***********************************************************************/
-
-/********************************************************************
-	created:	2006-01-28
-	filename: 	tokenizer.cpp
-	author:		J�rg Wiedenmann
-	
-	purpose:	A tokenizer function which provides a very
-				customizable way of breaking up strings.
-
-	history:	2006-01-28, Original version
-				2006-03-04, Fixed a small parsing bug, thanks Elias.
-*********************************************************************/
-
-#include "tokenizer.h"
-
-using namespace std;
-
-void tokenize ( const string& str, vector<string>& result,
-			   const string& delimiters, const string& delimiters_preserve,
-			   const string& quote, const string& esc )
-{
-	// clear the vector
-	if ( false == result.empty() )
-	{
-		result.clear();
-	}
-
-	string::size_type pos = 0; // the current position (char) in the string
-	char ch = 0; // buffer for the current character
-	char delimiter = 0;	// the buffer for the delimiter char which
-							// will be added to the tokens if the delimiter
-							// is preserved
-	char current_quote = 0; // the char of the current open quote
-	bool quoted = false; // indicator if there is an open quote
-	string token;  // string buffer for the token
-	bool token_complete = false; // indicates if the current token is
-								 // read to be added to the result vector
-	string::size_type len = str.length();  // length of the input-string
-
-	// for every char in the input-string
-	while ( len > pos )
-	{
-		// get the character of the string and reset the delimiter buffer
-		ch = str.at(pos);
-		delimiter = 0;
-
-		// assume ch isn't a delimiter
-		bool add_char = true;
-
-		// check ...
-
-		// ... if the delimiter is an escaped character
-		bool escaped = false; // indicates if the next char is protected
-		if ( false == esc.empty() ) // check if esc-chars are  provided
-		{
-			if ( string::npos != esc.find_first_of(ch) )
-			{
-				// get the escaped char
-				++pos;
-				if ( pos < len ) // if there are more chars left
-				{
-					// get the next one
-					ch = str.at(pos);
-
-					// add the escaped character to the token
-					add_char = true;
-				}
-				else // cannot get any more characters
-				{
-					// don't add the esc-char
-					add_char = false;
-				}
-
-				// ignore the remaining delimiter checks
-				escaped = true;
-			}
-		}
-
-		// ... if the delimiter is a quote
-		if ( false == quote.empty() && false == escaped )
-		{
-			// if quote chars are provided and the char isn't protected
-			if ( string::npos != quote.find_first_of(ch) )
-			{
-				// if not quoted, set state to open quote and set
-				// the quote character
-				if ( false == quoted )
-				{
-					quoted = true;
-					current_quote = ch;
-
-					// don't add the quote-char to the token
-					add_char = false;
-				}
-				else // if quote is open already
-				{
-					// check if it is the matching character to close it
-					if ( current_quote == ch )
-					{
-						// close quote and reset the quote character
-						quoted = false;
-						current_quote = 0;
-
-						// don't add the quote-char to the token
-						add_char = false;
-					}
-				} // else
-			}
-		}
-
-		// ... if the delimiter isn't preserved
-		if ( false == delimiters.empty() && false == escaped &&
-			 false == quoted )
-		{
-			// if a delimiter is provided and the char isn't protected by
-			// quote or escape char
-			if ( string::npos != delimiters.find_first_of(ch) )
-			{
-				// if ch is a delimiter and the token string isn't empty
-				// the token is complete
-				if ( false == token.empty() ) // BUGFIX: 2006-03-04
-				{
-					token_complete = true;
-				}
-
-				// don't add the delimiter to the token
-				add_char = false;
-			}
-		}
-
-		// ... if the delimiter is preserved - add it as a token
-		bool add_delimiter = false;
-		if ( false == delimiters_preserve.empty() && false == escaped &&
-			 false == quoted )
-		{
-			// if a delimiter which will be preserved is provided and the
-			// char isn't protected by quote or escape char
-			if ( string::npos != delimiters_preserve.find_first_of(ch) )
-			{
-				// if ch is a delimiter and the token string isn't empty
-				// the token is complete
-				if ( false == token.empty() ) // BUGFIX: 2006-03-04
-				{
-					token_complete = true;
-				}
-
-				// don't add the delimiter to the token
-				add_char = false;
-
-				// add the delimiter
-				delimiter = ch;
-				add_delimiter = true;
-			}
-		}
-
-
-		// add the character to the token
-		if ( true == add_char )
-		{
-			// add the current char
-			token.push_back( ch );
-		}
-
-		// add the token if it is complete
-		if ( true == token_complete && false == token.empty() )
-		{
-			// add the token string
-			result.push_back( token );
-
-			// clear the contents
-			token.clear();
-
-			// build the next token
-			token_complete = false;
-		}
-
-		// add the delimiter
-		if ( true == add_delimiter )
-		{
-			// the next token is the delimiter
-			string delim_token;
-			delim_token.push_back( delimiter );
-			result.push_back( delim_token );
-
-			// REMOVED: 2006-03-04, Bugfix
-		}
-
-		// repeat for the next character
-		++pos;
-	} // while
-
-	// add the final token
-	if ( false == token.empty() )
-	{
-		result.push_back( token );
-	}
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/tokenizer.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/tokenizer.h b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/tokenizer.h
deleted file mode 100644
index 75f567c..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/tokenizer.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/************************************************************************
-The zlib/libpng License
-
-Copyright (c) 2006 Joerg Wiedenmann
-
-This software is provided 'as-is', without any express or implied warranty.
-In no event will the authors be held liable for any damages arising from
-the use of this software.
-
-Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it
-freely, subject to the following restrictions:
-
-1. The origin of this software must not be misrepresented;
-	you must not claim that you wrote the original software.
-	If you use this software in a product, an acknowledgment
-	in the product documentation would be appreciated but is
-	not required.
-
-2. Altered source versions must be plainly marked as such,
-	and must not be misrepresented as being the original software.
-
-3. This notice may not be removed or altered from any source distribution.
-
-***********************************************************************/
-
-/********************************************************************
-	created:	2006-01-28
-	filename: 	tokenizer.cpp
-	author:		J�rg Wiedenmann
-
-	purpose:	A tokenizer function which provides a very
-				customizable way of breaking up strings.
-*********************************************************************/
-
-#include <vector>
-#include <string>
-using namespace std;
-
-// Function to break up a string into tokens
-//
-// Parameters:
-//-----------
-// str = the input string that will be tokenized
-// result = the tokens for str
-// delimiters = the delimiter characters
-// delimiters preserve = same as above, but the delimiter characters
-//		will be put into the result as a token
-// quote = characters to protect the enclosed characters
-// esc = characters to protect a single character
-//
-
-void tokenize ( const string& str, vector<string>& result,
-			const string& delimiters, const string& delimiters_preserve = "",
-			const string& quote = "\"", const string& esc = "\\" );

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/simulator/echoJnext.so
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/simulator/echoJnext.so b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/simulator/echoJnext.so
deleted file mode 100644
index 2b3c5f5..0000000
Binary files a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/simulator/echoJnext.so and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/src/echo.cpp
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/src/echo.cpp b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/src/echo.cpp
deleted file mode 100644
index 0d5cc2f..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/src/echo.cpp
+++ /dev/null
@@ -1,121 +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.
- *
-*/
-
-
-#include <../public/json/reader.h>
-#include <string>
-#include <sstream>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "echo.hpp"
-
-using namespace std;
-
-/**
- * Default constructor.
- */
-Echo::Echo(const std::string& id) : m_id(id) {
-}
-
-/**
- * Memory destructor.
- */
-Echo::~Echo() {
-}
-
-/**
- * This method returns the list of objects implemented by this native
- * extension.
- */
-char* onGetObjList() {
-    static char name[] = "Echo";
-    return name;
-}
-
-/**
- * This method is used by JNext to instantiate the Memory object when
- * an object is created on the JavaScript server side.
- */
-JSExt* onCreateObject(const string& className, const string& id) {
-    if (className == "Echo") {
-        return new Echo(id);
-    }
-
-    return NULL;
-}
-
-/**
- * Method used by JNext to determine if the object can be deleted.
- */
-bool Echo::CanDelete() {
-    return true;
-}
-
-/**
- * It will be called from JNext JavaScript side with passed string.
- * This method implements the interface for the JavaScript to native binding
- * for invoking native code. This method is triggered when JNext.invoke is
- * called on the JavaScript side with this native objects id.
- */
-string Echo::InvokeMethod(const string& command) {
-    int index = command.find_first_of(" ");
-    std::string method = command.substr(0, index);
-    
-    // read in arguments
-    Json::Value obj;
-    if (static_cast<int>(command.length()) > index && index != -1) {
-        std::string jsonObject = command.substr(index + 1, command.length());
-        Json::Reader reader;
-
-        bool parse = reader.parse(jsonObject, obj);
-        if (!parse) {
-            fprintf(stderr, "%s", "error parsing\n");
-            return "Cannot parse JSON object";
-        }
-    }    
-    
-    // Determine which function should be executed
-    if (method == "doEcho") {
-        std::string message = obj["message"].asString();
-        if(message.length() > 0) {
-            return doEcho(message);
-        }else{
-             return doEcho("Nothing to echo.");
-        }
-    }else{
-        return doEcho("Unsupported Method");
-    }
-}
-
-/**
- * Method that sends off Event message
- */
-string Echo::doEcho(const std::string& message) {
-    std::string eventString = m_id;
-    eventString.append(" ");
-    eventString.append("cordova.echo.callback");
-    eventString.append(" ");
-    eventString.append(message);
-    SendPluginEvent(eventString.c_str(), m_pContext);
-    return eventString;
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/src/echo.hpp
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/src/echo.hpp b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/src/echo.hpp
deleted file mode 100644
index 408be69..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/src/echo.hpp
+++ /dev/null
@@ -1,45 +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.
- *
-*/
-
-#ifndef ECHO_HPP_
-#define ECHO_HPP_
-
-#include <string>
-#include <pthread.h>
-#include "../public/plugin.h"
-
-class Echo: public JSExt {
-
-public:
-    explicit Echo(const std::string& id);
-    virtual ~Echo();
-
-// Interfaces of JSExt
-    virtual bool CanDelete();
-    virtual std::string InvokeMethod(const std::string& command);
-
-private:
-    std::string doEcho(const std::string& message);
-
-    std::string m_id;
-};
-
-#endif /* ECHO_HPP_ */

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/www/client.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/www/client.js b/cordova-lib/spec-plugman/plugins/cordova.echo/www/client.js
deleted file mode 100644
index 4e7a1b3..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/www/client.js
+++ /dev/null
@@ -1,53 +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 _self = {},
-    _ID = require("./manifest.json").namespace,
-    win = null,
-    fail = null;
-
-function handleCallback(result) {
-    if (result) {
-        if(win){
-            win(result);
-        }
-    } else {
-        if(fail){
-            fail(result);
-        }
-    }
-    win = null;
-    fail = null;
-}
-
-_self.doEcho = function (args, theWin, theFail) {
-    var data = { "message" : args.message || "" };
-    
-    win = theWin;
-    fail = theFail;
-    
-    window.webworks.event.add(_ID, "echoCallback", handleCallback);
-    
-    return window.webworks.execSync(_ID, "doEcho", data);
-};
-
-
-module.exports = _self;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/A/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/A/plugin.xml b/cordova-lib/spec-plugman/plugins/dependencies/A/plugin.xml
deleted file mode 100644
index ec83e8c..0000000
--- a/cordova-lib/spec-plugman/plugins/dependencies/A/plugin.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="A"
-    version="0.6.0">
-
-    <name>Plugin A</name>
-
-    <dependency id="C" url="C" />
-    <dependency id="D" url="D" />
-
-    <asset src="www/plugin-a.js" target="plugin-a.js" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-    </config-file>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="plugins">
-            <plugin name="A"
-                value="com.phonegap.A.A"/>
-        </config-file>
-
-        <source-file src="src/android/A.java"
-                target-dir="src/com/phonegap/A" />
-    </platform>
-
-        
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="plugins">
-            <plugin name="A"
-                value="APluginCommand"/>
-        </config-file>
-
-        <header-file src="src/ios/APluginCommand.h" />
-        <source-file src="src/ios/APluginCommand.m"/>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/A/src/android/A.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/A/src/android/A.java b/cordova-lib/spec-plugman/plugins/dependencies/A/src/android/A.java
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/A/src/ios/APluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/A/src/ios/APluginCommand.h b/cordova-lib/spec-plugman/plugins/dependencies/A/src/ios/APluginCommand.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/A/src/ios/APluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/A/src/ios/APluginCommand.m b/cordova-lib/spec-plugman/plugins/dependencies/A/src/ios/APluginCommand.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/A/www/plugin-a.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/A/www/plugin-a.js b/cordova-lib/spec-plugman/plugins/dependencies/A/www/plugin-a.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/B/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/B/plugin.xml b/cordova-lib/spec-plugman/plugins/dependencies/B/plugin.xml
deleted file mode 100644
index ee32e2d..0000000
--- a/cordova-lib/spec-plugman/plugins/dependencies/B/plugin.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="B"
-    version="0.6.0">
-
-    <name>Plugin B</name>
-
-    <dependency id="D" url="." subdir="D"/>
-    <dependency id="E" url="." subdir="subdir/E"/>
-
-    <asset src="www/plugin-b.js" target="plugin-b.js" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-    </config-file>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="plugins">
-            <plugin name="B"
-                value="com.phonegap.B.B"/>
-        </config-file>
-
-        <source-file src="src/android/B.java"
-                target-dir="src/com/phonegap/B" />
-    </platform>
-
-
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="plugins">
-            <plugin name="B"
-                value="BPluginCommand"/>
-        </config-file>
-
-        <header-file src="src/ios/BPluginCommand.h" />
-        <source-file src="src/ios/BPluginCommand.m"/>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/B/src/android/B.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/B/src/android/B.java b/cordova-lib/spec-plugman/plugins/dependencies/B/src/android/B.java
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/B/src/ios/BPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/B/src/ios/BPluginCommand.h b/cordova-lib/spec-plugman/plugins/dependencies/B/src/ios/BPluginCommand.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/B/src/ios/BPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/B/src/ios/BPluginCommand.m b/cordova-lib/spec-plugman/plugins/dependencies/B/src/ios/BPluginCommand.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/B/www/plugin-b.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/B/www/plugin-b.js b/cordova-lib/spec-plugman/plugins/dependencies/B/www/plugin-b.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/C/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/C/plugin.xml b/cordova-lib/spec-plugman/plugins/dependencies/C/plugin.xml
deleted file mode 100644
index 88c2d2c..0000000
--- a/cordova-lib/spec-plugman/plugins/dependencies/C/plugin.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="C"
-    version="0.6.0">
-
-    <name>Plugin C</name>
-
-    <asset src="www/plugin-c.js" target="plugin-c.js" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-    </config-file>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="plugins">
-            <plugin name="C"
-                value="com.phonegap.C.C"/>
-        </config-file>
-
-        <source-file src="src/android/C.java"
-                target-dir="src/com/phonegap/C" />
-    </platform>
-
-        
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="plugins">
-            <plugin name="C"
-                value="CPluginCommand"/>
-        </config-file>
-
-        <header-file src="src/ios/CPluginCommand.h" />
-        <source-file src="src/ios/CPluginCommand.m"/>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/C/src/android/C.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/C/src/android/C.java b/cordova-lib/spec-plugman/plugins/dependencies/C/src/android/C.java
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/C/src/ios/CPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/C/src/ios/CPluginCommand.h b/cordova-lib/spec-plugman/plugins/dependencies/C/src/ios/CPluginCommand.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/C/src/ios/CPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/C/src/ios/CPluginCommand.m b/cordova-lib/spec-plugman/plugins/dependencies/C/src/ios/CPluginCommand.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/C/www/plugin-c.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/C/www/plugin-c.js b/cordova-lib/spec-plugman/plugins/dependencies/C/www/plugin-c.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/D/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/D/plugin.xml b/cordova-lib/spec-plugman/plugins/dependencies/D/plugin.xml
deleted file mode 100644
index f07b063..0000000
--- a/cordova-lib/spec-plugman/plugins/dependencies/D/plugin.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="D"
-    version="0.6.0">
-
-    <name>Plugin D</name>
-
-    <asset src="www/plugin-d.js" target="plugin-d.js" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-    </config-file>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="plugins">
-            <plugin name="D"
-                value="com.phonegap.D.D"/>
-        </config-file>
-
-        <source-file src="src/android/D.java"
-                target-dir="src/com/phonegap/D" />
-    </platform>
-
-        
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="plugins">
-            <plugin name="D"
-                value="DPluginCommand"/>
-        </config-file>
-
-        <header-file src="src/ios/DPluginCommand.h" />
-        <source-file src="src/ios/DPluginCommand.m"/>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/D/src/android/D.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/D/src/android/D.java b/cordova-lib/spec-plugman/plugins/dependencies/D/src/android/D.java
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/D/src/ios/DPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/D/src/ios/DPluginCommand.h b/cordova-lib/spec-plugman/plugins/dependencies/D/src/ios/DPluginCommand.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/D/src/ios/DPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/D/src/ios/DPluginCommand.m b/cordova-lib/spec-plugman/plugins/dependencies/D/src/ios/DPluginCommand.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/D/www/plugin-d.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/D/www/plugin-d.js b/cordova-lib/spec-plugman/plugins/dependencies/D/www/plugin-d.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/E/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/E/plugin.xml b/cordova-lib/spec-plugman/plugins/dependencies/E/plugin.xml
deleted file mode 100644
index bb28fa1..0000000
--- a/cordova-lib/spec-plugman/plugins/dependencies/E/plugin.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="E"
-    version="0.6.0">
-
-    <name>Plugin E</name>
-
-    <asset src="www/plugin-e.js" target="plugin-e.js" />
-
-    <dependency id="D" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-    </config-file>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="plugins">
-            <plugin name="E"
-                value="com.phonegap.E.E"/>
-        </config-file>
-
-        <source-file src="src/android/E.java"
-                target-dir="src/com/phonegap/E" />
-    </platform>
-
-        
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="plugins">
-            <plugin name="E"
-                value="EPluginCommand"/>
-        </config-file>
-
-        <header-file src="src/ios/EPluginCommand.h" />
-        <source-file src="src/ios/EPluginCommand.m"/>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/E/src/android/E.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/E/src/android/E.java b/cordova-lib/spec-plugman/plugins/dependencies/E/src/android/E.java
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/E/src/ios/EPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/E/src/ios/EPluginCommand.h b/cordova-lib/spec-plugman/plugins/dependencies/E/src/ios/EPluginCommand.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/E/src/ios/EPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/E/src/ios/EPluginCommand.m b/cordova-lib/spec-plugman/plugins/dependencies/E/src/ios/EPluginCommand.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/E/www/plugin-d.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/E/www/plugin-d.js b/cordova-lib/spec-plugman/plugins/dependencies/E/www/plugin-d.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/F/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/F/plugin.xml b/cordova-lib/spec-plugman/plugins/dependencies/F/plugin.xml
deleted file mode 100644
index 86869ba..0000000
--- a/cordova-lib/spec-plugman/plugins/dependencies/F/plugin.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="F"
-    version="0.6.0">
-
-    <name>Plugin F</name>
-
-    <asset src="www/plugin-f.js" target="plugin-f.js" />
-
-    <dependency id="A" />
-    <dependency id="D" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-    </config-file>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="plugins">
-            <plugin name="F"
-                value="com.phonegap.F.F"/>
-        </config-file>
-
-        <source-file src="src/android/F.java"
-                target-dir="src/com/phonegap/F" />
-    </platform>
-
-
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="plugins">
-            <plugin name="F"
-                value="FPluginCommand"/>
-        </config-file>
-
-        <header-file src="src/ios/FPluginCommand.h" />
-        <source-file src="src/ios/FPluginCommand.m"/>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/F/src/android/F.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/F/src/android/F.java b/cordova-lib/spec-plugman/plugins/dependencies/F/src/android/F.java
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/F/src/ios/FPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/F/src/ios/FPluginCommand.h b/cordova-lib/spec-plugman/plugins/dependencies/F/src/ios/FPluginCommand.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/F/src/ios/FPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/F/src/ios/FPluginCommand.m b/cordova-lib/spec-plugman/plugins/dependencies/F/src/ios/FPluginCommand.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/F/www/plugin-f.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/F/www/plugin-f.js b/cordova-lib/spec-plugman/plugins/dependencies/F/www/plugin-f.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/G/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/G/plugin.xml b/cordova-lib/spec-plugman/plugins/dependencies/G/plugin.xml
deleted file mode 100644
index 0e365da..0000000
--- a/cordova-lib/spec-plugman/plugins/dependencies/G/plugin.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="G"
-    version="0.6.0">
-
-    <name>Plugin G</name>
-
-    <asset src="www/plugin-g.js" target="plugin-g.js" />
-
-    <dependency id="H" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-    </config-file>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="plugins">
-            <plugin name="G"
-                value="com.phonegap.G.G"/>
-        </config-file>
-
-        <source-file src="src/android/G.java"
-                target-dir="src/com/phonegap/G" />
-    </platform>
-
-
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="plugins">
-            <plugin name="G"
-                value="GPluginCommand"/>
-        </config-file>
-
-        <header-file src="src/ios/GPluginCommand.h" />
-        <source-file src="src/ios/GPluginCommand.m"/>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/G/src/android/G.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/G/src/android/G.java b/cordova-lib/spec-plugman/plugins/dependencies/G/src/android/G.java
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/G/src/ios/EPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/G/src/ios/EPluginCommand.m b/cordova-lib/spec-plugman/plugins/dependencies/G/src/ios/EPluginCommand.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/G/src/ios/GPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/G/src/ios/GPluginCommand.h b/cordova-lib/spec-plugman/plugins/dependencies/G/src/ios/GPluginCommand.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/G/www/plugin-g.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/G/www/plugin-g.js b/cordova-lib/spec-plugman/plugins/dependencies/G/www/plugin-g.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/H/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/H/plugin.xml b/cordova-lib/spec-plugman/plugins/dependencies/H/plugin.xml
deleted file mode 100644
index e72a19a..0000000
--- a/cordova-lib/spec-plugman/plugins/dependencies/H/plugin.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="H"
-    version="0.6.0">
-
-    <name>Plugin H</name>
-
-    <asset src="www/plugin-h.js" target="plugin-h.js" />
-
-    <dependency id="G" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-    </config-file>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="plugins">
-            <plugin name="H"
-                value="com.phonegap.H.H"/>
-        </config-file>
-
-        <source-file src="src/android/H.java"
-                target-dir="src/com/phonegap/H" />
-    </platform>
-
-
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="plugins">
-            <plugin name="H"
-                value="HPluginCommand"/>
-        </config-file>
-
-        <header-file src="src/ios/HPluginCommand.h" />
-        <source-file src="src/ios/HPluginCommand.m"/>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/H/src/android/H.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/H/src/android/H.java b/cordova-lib/spec-plugman/plugins/dependencies/H/src/android/H.java
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/H/src/ios/HPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/H/src/ios/HPluginCommand.h b/cordova-lib/spec-plugman/plugins/dependencies/H/src/ios/HPluginCommand.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/H/src/ios/HPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/H/src/ios/HPluginCommand.m b/cordova-lib/spec-plugman/plugins/dependencies/H/src/ios/HPluginCommand.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/H/www/plugin-h.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/H/www/plugin-h.js b/cordova-lib/spec-plugman/plugins/dependencies/H/www/plugin-h.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/README.md
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/README.md b/cordova-lib/spec-plugman/plugins/dependencies/README.md
deleted file mode 100644
index 0955be5..0000000
--- a/cordova-lib/spec-plugman/plugins/dependencies/README.md
+++ /dev/null
@@ -1,10 +0,0 @@
-Here's a general overview of how the plugins in this directory are dependent on each other:
-
-          F
-         / \
-        A   \      B
-       / \   \    / \
-      C   '---D--'   E
-
-
-   G <-> H

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/meta/D/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/meta/D/plugin.xml b/cordova-lib/spec-plugman/plugins/dependencies/meta/D/plugin.xml
deleted file mode 100644
index 941bd57..0000000
--- a/cordova-lib/spec-plugman/plugins/dependencies/meta/D/plugin.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="D"
-    version="0.6.0">
-
-    <name>Plugin D</name>
-
-    <asset src="www/plugin-d.js" target="plugin-d.js" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-    </config-file>
-
-    <engines>
-        <engine name="cordova" version=">=1.0.0"/>
-    </engines>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="plugins">
-            <plugin name="D"
-                value="com.phonegap.D.D"/>
-        </config-file>
-
-        <source-file src="src/android/D.java"
-                target-dir="src/com/phonegap/D" />
-    </platform>
-
-        
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="plugins">
-            <plugin name="D"
-                value="DPluginCommand"/>
-        </config-file>
-
-        <header-file src="src/ios/DPluginCommand.h" />
-        <source-file src="src/ios/DPluginCommand.m"/>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/meta/D/src/android/D.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/meta/D/src/android/D.java b/cordova-lib/spec-plugman/plugins/dependencies/meta/D/src/android/D.java
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/meta/D/src/ios/DPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/meta/D/src/ios/DPluginCommand.h b/cordova-lib/spec-plugman/plugins/dependencies/meta/D/src/ios/DPluginCommand.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/meta/D/src/ios/DPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/meta/D/src/ios/DPluginCommand.m b/cordova-lib/spec-plugman/plugins/dependencies/meta/D/src/ios/DPluginCommand.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/meta/D/www/plugin-d.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/meta/D/www/plugin-d.js b/cordova-lib/spec-plugman/plugins/dependencies/meta/D/www/plugin-d.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/plugin.xml b/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/plugin.xml
deleted file mode 100644
index 57d96d9..0000000
--- a/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/plugin.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="E"
-    version="0.6.0">
-
-    <name>Plugin E</name>
-
-    <asset src="www/plugin-e.js" target="plugin-e.js" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-    </config-file>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="plugins">
-            <plugin name="E"
-                value="com.phonegap.E.E"/>
-        </config-file>
-
-        <source-file src="src/android/E.java"
-                target-dir="src/com/phonegap/E" />
-    </platform>
-
-        
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="plugins">
-            <plugin name="E"
-                value="EPluginCommand"/>
-        </config-file>
-
-        <header-file src="src/ios/EPluginCommand.h" />
-        <source-file src="src/ios/EPluginCommand.m"/>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/src/android/E.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/src/android/E.java b/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/src/android/E.java
deleted file mode 100644
index e69de29..0000000


[22/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/platforms/ios.spec.js
----------------------------------------------------------------------
diff --git a/spec/platforms/ios.spec.js b/spec/platforms/ios.spec.js
deleted file mode 100644
index e2589e0..0000000
--- a/spec/platforms/ios.spec.js
+++ /dev/null
@@ -1,390 +0,0 @@
-var ios = require('../../src/platforms/ios'),
-    install = require('../../src/install'),
-    path = require('path'),
-    fs = require('fs'),
-    et = require('elementtree'),
-    shell = require('shelljs'),
-    os = require('osenv'),
-    common = require('../../src/platforms/common'),
-    xcode = require('xcode'),
-    plist = require('plist-with-patches'),
-    bplist = require('bplist-parser'),
-    temp = path.join(os.tmpdir(), 'plugman'),
-    plugins_dir = path.join(temp, 'cordova', 'plugins'),
-    ios_config_xml_project = path.join(__dirname, '..', 'projects', 'ios-config-xml', '*'),
-    ios_plist_project = path.join(__dirname, '..', 'projects', 'ios-plist', '*'),
-    ios_project = path.join(ios_config_xml_project, '..'),
-    xml_helpers = require('../../src/util/xml-helpers'),
-    variableplugin = path.join(__dirname, '..', 'plugins', 'VariablePlugin'),
-    faultyplugin = path.join(__dirname, '..', 'plugins', 'FaultyPlugin'),
-    plistplugin = path.join(__dirname, '..', 'plugins', 'PluginsPlistOnly'),
-    dummyplugin = path.join(__dirname, '..', 'plugins', 'DummyPlugin');
-
-var xml_path = path.join(dummyplugin, 'plugin.xml'),
-    xml_test = fs.readFileSync(xml_path, 'utf-8'),
-    plugin_et = new et.ElementTree(et.XML(xml_test));
-
-var platformTag = plugin_et.find('./platform[@name="ios"]');
-var dummy_id = plugin_et._root.attrib['id'];
-var valid_source = platformTag.findall('./source-file'),
-    valid_assets = plugin_et.findall('./asset'),
-    valid_headers = platformTag.findall('./header-file'),
-    valid_resources = platformTag.findall('./resource-file'),
-    valid_custom_frameworks = platformTag.findall('./framework[@custom="true"]'),
-    valid_frameworks = platformTag.findall('./framework'),
-    plist_els = platformTag.findall('./plugins-plist'),
-    dummy_configs = platformTag.findall('./config-file');
-
-xml_path = path.join(variableplugin, 'plugin.xml');
-xml_test = fs.readFileSync(xml_path, 'utf-8');
-plugin_et = new et.ElementTree(et.XML(xml_test));
-platformTag = plugin_et.find('./platform[@name="ios"]');
-
-var variable_id = plugin_et._root.attrib['id'];
-var variable_configs = platformTag.findall('./config-file');
-
-xml_path = path.join(faultyplugin, 'plugin.xml');
-xml_test = fs.readFileSync(xml_path, 'utf-8');
-plugin_et = new et.ElementTree(et.XML(xml_test));
-platformTag = plugin_et.find('./platform[@name="ios"]');
-
-var faulty_id = plugin_et._root.attrib['id'];
-var invalid_assets = plugin_et.findall('./asset');
-var invalid_source = platformTag.findall('./source-file');
-var invalid_headers = platformTag.findall('./header-file');
-var invalid_resources = platformTag.findall('./resource-file');
-var invalid_custom_frameworks = platformTag.findall('./framework[@custom="true"]');
-var invalid_frameworks = platformTag.findall('./framework');
-
-xml_path = path.join(plistplugin, 'plugin.xml');
-xml_test = fs.readFileSync(xml_path, 'utf-8');
-plugin_et = new et.ElementTree(et.XML(xml_test));
-platformTag = plugin_et.find('./platform[@name="ios"]');
-
-var plist_id = plugin_et._root.attrib['id'];
-var plist_only_els = platformTag.findall('./plugins-plist');
-
-shell.mkdir('-p', temp);
-shell.cp('-rf', ios_config_xml_project, temp);
-var proj_files = ios.parseProjectFile(temp);
-shell.rm('-rf', temp);
-ios.purgeProjectFileCache(temp);
-
-function copyArray(arr) {
-    return Array.prototype.slice.call(arr, 0);
-}
-
-describe('ios project handler', function() {
-    beforeEach(function() {
-        shell.mkdir('-p', temp);
-        shell.mkdir('-p', plugins_dir);
-    });
-    afterEach(function() {
-        shell.rm('-rf', temp);
-        ios.purgeProjectFileCache(temp);
-    });
-
-    describe('www_dir method', function() {
-        it('should return cordova-ios project www location using www_dir', function() {
-            expect(ios.www_dir(path.sep)).toEqual(path.sep + 'www');
-        });
-    });
-
-    describe('package_name method', function() {
-        it('should return the CFBundleIdentifier from the project\'s Info.plist file', function() {
-            expect(ios.package_name(ios_project)).toEqual('com.example.friendstring');
-        });
-    });
-
-    describe('parseProjectFile method', function () {
-        it('should throw if project is not an xcode project', function() {
-            expect(function() {
-                ios.parseProjectFile(temp);
-            }).toThrow('does not appear to be an xcode project (no xcode project file)');
-        });
-        it('should throw if project does not contain an appropriate PhoneGap/Cordova.plist file or config.xml file', function() {
-            shell.cp('-rf', ios_config_xml_project, temp);
-            shell.rm(path.join(temp, 'SampleApp', 'config.xml'));
-
-            expect(function() {
-                ios.parseProjectFile(temp);
-            }).toThrow('could not find PhoneGap/Cordova plist file, or config.xml file.');
-        });
-    });
-
-    describe('installation', function() {
-        describe('of <source-file> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', ios_config_xml_project, temp);
-            });
-
-            it('should throw if source-file src cannot be found', function() {
-                var source = copyArray(invalid_source);
-                expect(function() {
-                    ios['source-file'].install(source[1], faultyplugin, temp, faulty_id, proj_files);
-                }).toThrow('cannot find "' + path.resolve(faultyplugin, 'src/ios/FaultyPluginCommand.m') + '" ios <source-file>');
-            });
-            it('should throw if source-file target already exists', function() {
-                var source = copyArray(valid_source);
-                var target = path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'DummyPluginCommand.m');
-                shell.mkdir('-p', path.dirname(target));
-                fs.writeFileSync(target, 'some bs', 'utf-8');
-                expect(function() {
-                    ios['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
-                }).toThrow('target destination "' + target + '" already exists');
-            });
-            it('should call into xcodeproj\'s addSourceFile appropriately when element has no target-dir', function() {
-                var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] == undefined});
-                var spy = spyOn(proj_files.xcode, 'addSourceFile');
-                ios['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'DummyPluginCommand.m'), {});
-            });
-            it('should call into xcodeproj\'s addSourceFile appropriately when element has a target-dir', function() {
-                var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] != undefined});
-                var spy = spyOn(proj_files.xcode, 'addSourceFile');
-                ios['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'targetDir', 'TargetDirTest.m'), {});
-            });
-            it('should cp the file to the right target location when element has no target-dir', function() {
-                var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] == undefined});
-                var spy = spyOn(shell, 'cp');
-                ios['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join(dummyplugin, 'src', 'ios', 'DummyPluginCommand.m'), path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'DummyPluginCommand.m'));
-            });
-            it('should cp the file to the right target location when element has a target-dir', function() {
-                var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] != undefined});
-                var spy = spyOn(shell, 'cp');
-                ios['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join(dummyplugin, 'src', 'ios', 'TargetDirTest.m'), path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'targetDir', 'TargetDirTest.m'));
-            });
-            it('should call into xcodeproj\'s addFramework appropriately when element has framework=true set', function() {
-                var source = copyArray(valid_source).filter(function(s) { return s.attrib['framework'] == "true"});
-                spyOn(proj_files.xcode, 'addSourceFile');
-                var spy = spyOn(proj_files.xcode, 'addFramework');
-                ios['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join('SampleApp', 'Plugins', dummy_id, 'SourceWithFramework.m'), {weak:false});
-            });
-        });
-
-        describe('of <header-file> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', ios_config_xml_project, temp);
-            });
-
-            it('should throw if header-file src cannot be found', function() {
-                var headers = copyArray(invalid_headers);
-                expect(function() {
-                    ios['header-file'].install(headers[1], faultyplugin, temp, faulty_id, proj_files);
-                }).toThrow('cannot find "' + path.resolve(faultyplugin, 'src/ios/FaultyPluginCommand.h') + '" ios <header-file>');
-            });
-            it('should throw if header-file target already exists', function() {
-                var headers = copyArray(valid_headers);
-                var target = path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'DummyPluginCommand.h');
-                shell.mkdir('-p', path.dirname(target));
-                fs.writeFileSync(target, 'some bs', 'utf-8');
-                expect(function() {
-                    ios['header-file'].install(headers[0], dummyplugin, temp, dummy_id, proj_files);
-                }).toThrow('target destination "' + target + '" already exists');
-            });
-            it('should call into xcodeproj\'s addHeaderFile appropriately when element has no target-dir', function() {
-                var headers = copyArray(valid_headers).filter(function(s) { return s.attrib['target-dir'] == undefined});
-                var spy = spyOn(proj_files.xcode, 'addHeaderFile');
-                ios['header-file'].install(headers[0], dummyplugin, temp, dummy_id,  proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'DummyPluginCommand.h'));
-            });
-            it('should call into xcodeproj\'s addHeaderFile appropriately when element a target-dir', function() {
-                var headers = copyArray(valid_headers).filter(function(s) { return s.attrib['target-dir'] != undefined});
-                var spy = spyOn(proj_files.xcode, 'addHeaderFile');
-                ios['header-file'].install(headers[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'targetDir', 'TargetDirTest.h'));
-            });
-            it('should cp the file to the right target location when element has no target-dir', function() {
-                var headers = copyArray(valid_headers).filter(function(s) { return s.attrib['target-dir'] == undefined});
-                var spy = spyOn(shell, 'cp');
-                ios['header-file'].install(headers[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join(dummyplugin, 'src', 'ios', 'DummyPluginCommand.h'), path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'DummyPluginCommand.h'));
-            });
-            it('should cp the file to the right target location when element has a target-dir', function() {
-                var headers = copyArray(valid_headers).filter(function(s) { return s.attrib['target-dir'] != undefined});
-                var spy = spyOn(shell, 'cp');
-                ios['header-file'].install(headers[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join(dummyplugin, 'src', 'ios', 'TargetDirTest.h'), path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'targetDir', 'TargetDirTest.h'));
-            });
-        });
-
-        describe('of <resource-file> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', ios_config_xml_project, temp);
-            });
-            it('should throw if resource-file src cannot be found', function() {
-                var resources = copyArray(invalid_resources);
-                expect(function() {
-                    ios['resource-file'].install(resources[0], faultyplugin, temp, "pluginid", proj_files);
-                }).toThrow('cannot find "' + path.resolve(faultyplugin, 'src/ios/IDontExist.bundle') + '" ios <resource-file>');
-            });
-            it('should throw if resource-file target already exists', function() {
-                var resources = copyArray(valid_resources);
-                var target = path.join(temp, 'SampleApp', 'Resources', 'DummyPlugin.bundle');
-                shell.mkdir('-p', path.dirname(target));
-                fs.writeFileSync(target, 'some bs', 'utf-8');
-                expect(function() {
-                    ios['resource-file'].install(resources[0], dummyplugin, temp, "pluginid",proj_files);
-                }).toThrow('target destination "' + target + '" already exists');
-            });
-            it('should call into xcodeproj\'s addResourceFile', function() {
-                var resources = copyArray(valid_resources);
-                var spy = spyOn(proj_files.xcode, 'addResourceFile');
-                ios['resource-file'].install(resources[0], dummyplugin, temp, "pluginid", proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join('Resources', 'DummyPlugin.bundle'));
-            });
-            it('should cp the file to the right target location', function() {
-                var resources = copyArray(valid_resources);
-                var spy = spyOn(shell, 'cp');
-                ios['resource-file'].install(resources[0], dummyplugin, temp, "pluginid", proj_files);
-                expect(spy).toHaveBeenCalledWith('-R', path.join(dummyplugin, 'src', 'ios', 'DummyPlugin.bundle'), path.join(temp, 'SampleApp', 'Resources'));
-            });
-        });
-        describe('of <framework custom="true"> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', ios_config_xml_project, temp);
-            });
-            it('should throw if framework src cannot be found', function() {
-                var frameworks = copyArray(invalid_custom_frameworks);
-                expect(function() {
-                    ios['framework'].install(frameworks[0], faultyplugin, temp, dummy_id, proj_files);
-                }).toThrow('cannot find "' + path.resolve(faultyplugin, 'src/ios/NonExistantCustomFramework.framework') + '" ios <framework>');
-            });
-            it('should throw if framework target already exists', function() {
-                var frameworks = copyArray(valid_custom_frameworks);
-                var target = path.join(temp, 'SampleApp/Plugins/com.phonegap.plugins.dummyplugin/Custom.framework');
-                shell.mkdir('-p', target);
-                expect(function() {
-                    ios['framework'].install(frameworks[0], dummyplugin, temp, dummy_id, proj_files);
-                }).toThrow('target destination "' + target + '" already exists');
-            });
-            it('should call into xcodeproj\'s addFramework', function() {
-                var frameworks = copyArray(valid_custom_frameworks);
-                var spy = spyOn(proj_files.xcode, 'addFramework');
-                ios['framework'].install(frameworks[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.normalize('SampleApp/Plugins/com.phonegap.plugins.dummyplugin/Custom.framework'), {customFramework:true});
-            });
-            it('should cp the file to the right target location', function() {
-                var frameworks = copyArray(valid_custom_frameworks);
-                var spy = spyOn(shell, 'cp');
-                ios['framework'].install(frameworks[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith('-R', path.join(dummyplugin, 'src', 'ios', 'Custom.framework'),
-                                                 path.join(temp, 'SampleApp/Plugins/com.phonegap.plugins.dummyplugin'));
-            });
-        });
-    });
-
-    describe('uninstallation', function() {
-        describe('of <source-file> elements', function() {
-            it('should call into xcodeproj\'s removeSourceFile appropriately when element has no target-dir', function(){
-                var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] == undefined});
-                shell.cp('-rf', ios_config_xml_project, temp);
-                var spy = spyOn(proj_files.xcode, 'removeSourceFile');
-                ios['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'DummyPluginCommand.m'));
-            });
-            it('should call into xcodeproj\'s removeSourceFile appropriately when element a target-dir', function(){
-                var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] != undefined});
-                shell.cp('-rf', ios_config_xml_project, temp);
-                var spy = spyOn(proj_files.xcode, 'removeSourceFile');
-                ios['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'targetDir', 'TargetDirTest.m'));
-            });
-            it('should rm the file from the right target location when element has no target-dir', function(){
-                var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] == undefined});
-                shell.cp('-rf', ios_config_xml_project, temp);
-
-                var spy = spyOn(shell, 'rm');
-                ios['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith('-rf', path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'DummyPluginCommand.m'));
-            });
-            it('should rm the file from the right target location when element has a target-dir', function(){
-                var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] != undefined});
-                shell.cp('-rf', ios_config_xml_project, temp);
-                var spy = spyOn(shell, 'rm');
-
-                ios['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith('-rf', path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'targetDir', 'TargetDirTest.m'));
-            });
-            it('should call into xcodeproj\'s removeFramework appropriately when element framework=true set', function(){
-                var source = copyArray(valid_source).filter(function(s) { return s.attrib['framework'] == "true"});
-                shell.cp('-rf', ios_config_xml_project, temp);
-                var spy = spyOn(proj_files.xcode, 'removeFramework');
-
-                ios['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join('SampleApp', 'Plugins', dummy_id, 'SourceWithFramework.m'));
-            });
-        });
-
-        describe('of <header-file> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', ios_config_xml_project, temp);
-            });
-            it('should call into xcodeproj\'s removeHeaderFile appropriately when element has no target-dir', function(){
-                var headers = copyArray(valid_headers).filter(function(s) { return s.attrib['target-dir'] == undefined});
-                var spy = spyOn(proj_files.xcode, 'removeHeaderFile');
-
-                ios['header-file'].uninstall(headers[0], temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'DummyPluginCommand.h'));
-            });
-            it('should call into xcodeproj\'s removeHeaderFile appropriately when element a target-dir', function(){
-                var headers = copyArray(valid_headers).filter(function(s) { return s.attrib['target-dir'] != undefined});
-
-                var spy = spyOn(proj_files.xcode, 'removeHeaderFile');
-
-                ios['header-file'].uninstall(headers[0], temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'targetDir', 'TargetDirTest.h'));
-            });
-            it('should rm the file from the right target location', function(){
-                var headers = copyArray(valid_headers).filter(function(s) { return s.attrib['target-dir'] != undefined});
-                var spy = spyOn(shell, 'rm');
-
-                ios['header-file'].uninstall(headers[0], temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith('-rf', path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'targetDir', 'TargetDirTest.h'));
-            });
-        });
-
-        describe('of <resource-file> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', ios_config_xml_project, temp);
-            });
-            it('should call into xcodeproj\'s removeResourceFile', function(){
-                var resources = copyArray(valid_resources);
-                var spy = spyOn(proj_files.xcode, 'removeResourceFile');
-
-                ios['resource-file'].uninstall(resources[0], temp, "pluginid", proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join('Resources', 'DummyPlugin.bundle'));
-            });
-            it('should rm the file from the right target location', function(){
-                var resources = copyArray(valid_resources);
-                var spy = spyOn(shell, 'rm');
-
-                ios['resource-file'].uninstall(resources[0], temp, "pluginid", proj_files);
-                expect(spy).toHaveBeenCalledWith('-rf', path.join(temp, 'SampleApp', 'Resources', 'DummyPlugin.bundle'));
-            });
-        });
-        describe('of <framework custom="true"> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', ios_config_xml_project, temp);
-            });
-            it('should call into xcodeproj\'s removeFramework', function(){
-                var frameworks = copyArray(valid_custom_frameworks);
-                var spy = spyOn(proj_files.xcode, 'removeFramework');
-
-                ios['framework'].uninstall(frameworks[0], temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith(path.join(temp, 'SampleApp/Plugins/com.phonegap.plugins.dummyplugin/Custom.framework'), {customFramework:true});
-            });
-            it('should rm the file from the right target location', function(){
-                var frameworks = copyArray(valid_custom_frameworks);
-                var spy = spyOn(shell, 'rm');
-
-                ios['framework'].uninstall(frameworks[0], temp, dummy_id, proj_files);
-                expect(spy).toHaveBeenCalledWith('-rf', path.join(temp, 'SampleApp/Plugins/com.phonegap.plugins.dummyplugin/Custom.framework'));
-            });
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/platforms/tizen.spec.js
----------------------------------------------------------------------
diff --git a/spec/platforms/tizen.spec.js b/spec/platforms/tizen.spec.js
deleted file mode 100644
index 372e4d3..0000000
--- a/spec/platforms/tizen.spec.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *
- *
- * Licensed 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 tizen = require('../../src/platforms/tizen'),
-	common = require('../../src/platforms/common'),
-	temp = require('temp'),
-	os = require('osenv'),
-	fs = require('fs'),
-	et = require('elementtree'),
-	path = require('path'),
-	tizen_project = path.join(__dirname, '..', 'projects', 'tizen'),
-	destination = temp.path(),
-	shell = require('shelljs'),
-	dummyPluginPath = path.join(__dirname, '..', 'plugins', 'DummyPlugin'),
-	dummyPlugin = et.XML(fs.readFileSync(
-		path.join(dummyPluginPath, 'plugin.xml'), {encoding: "utf-8"})),
-	dummySources = dummyPlugin
-		.find('./platform[@name="tizen"]')
-		.findall('./source-file');
-
-describe('Tizen project handler', function() {
-	describe('www_dir method', function() {
-		it('should append www to the directory passed in', function() {
-			expect(tizen.www_dir(path.sep)).toEqual(path.join(path.sep, 'www'));
-		});
-	});
-	describe('Manipulating project files', function() {
-		beforeEach(function() {
-			shell.cp('-rf', path.join(tizen_project, '*'), destination);
-		});
-		afterEach(function() {
-			shell.rm('-rf', destination);
-		});
-		describe('package_name method', function() {
-			it('should return the id of the config.xml root element', function() {
-				expect(tizen.package_name(destination)).toEqual("TizenTestPackage");
-			});
-		});
-	});
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/platforms/windows8.spec.js
----------------------------------------------------------------------
diff --git a/spec/platforms/windows8.spec.js b/spec/platforms/windows8.spec.js
deleted file mode 100644
index 99a5cb7..0000000
--- a/spec/platforms/windows8.spec.js
+++ /dev/null
@@ -1,135 +0,0 @@
-var windows8 = require('../../src/platforms/windows8'),
-    common  = require('../../src/platforms/common'),
-    install = require('../../src/install'),
-    path    = require('path'),
-    fs      = require('fs'),
-    shell   = require('shelljs'),
-    et      = require('elementtree'),
-    os      = require('osenv'),
-    temp    = path.join(os.tmpdir(), 'plugman'),
-    plugins_dir = path.join(temp, 'cordova', 'plugins'),
-    xml_helpers = require('../../src/util/xml-helpers'),
-    plugins_module = require('../../src/util/plugins'),
-    dummyplugin = path.join(__dirname, '..', 'plugins', 'DummyPlugin'),
-    faultyplugin = path.join(__dirname, '..', 'plugins', 'FaultyPlugin'),
-    windows8_project = path.join(__dirname, '..', 'projects', 'windows8');
-
-var xml_path     = path.join(dummyplugin, 'plugin.xml')
-  , xml_text     = fs.readFileSync(xml_path, 'utf-8')
-  , plugin_et    = new et.ElementTree(et.XML(xml_text));
-
-var platformTag = plugin_et.find('./platform[@name="windows8"]');
-var dummy_id = plugin_et._root.attrib['id'];
-
-var valid_source = platformTag.findall('./source-file');
-var assets = plugin_et.findall('./asset');
-
-var configChanges = platformTag.findall('./config-file');
-
-xml_path  = path.join(faultyplugin, 'plugin.xml')
-xml_text  = fs.readFileSync(xml_path, 'utf-8');
-
-plugin_et = new et.ElementTree(et.XML(xml_text));
-
-platformTag = plugin_et.find('./platform[@name="windows8"]');
-
-var invalid_source = platformTag.findall('./source-file');
-
-var faulty_id = plugin_et._root.attrib['id'];
-
-shell.mkdir('-p', temp);
-shell.cp('-rf', path.join(windows8_project, '*'), temp);
-var proj_files = windows8.parseProjectFile(temp);
-shell.rm('-rf', temp);
-
-function copyArray(arr) {
-    return Array.prototype.slice.call(arr, 0);
-}
-
-describe('windows8 project handler', function() {
-
-    beforeEach(function() {
-        shell.mkdir('-p', temp);
-        shell.mkdir('-p', plugins_dir);
-    });
-    afterEach(function() {
-        shell.rm('-rf', temp);
-    });
-
-    describe('www_dir method', function() {
-        it('should return cordova-windows8 project www location using www_dir', function() {
-            expect(windows8.www_dir(path.sep)).toEqual(path.sep + 'www');
-        });
-    });
-    describe('package_name method', function() {
-        it('should return a windows8 project\'s proper package name', function() {
-            expect(windows8.package_name(windows8_project)).toEqual("CordovaApp");
-        });
-    });
-
-    describe('parseProjectFile method', function() {
-        it('should throw if project is not an windows8 project', function() {
-            expect(function() {
-                windows8.parseProjectFile(temp);
-            }).toThrow(windows8.InvalidProjectPathError);
-        });
-    });
-
-    describe('installation', function() {
-        beforeEach(function() {
-            shell.mkdir('-p', temp);
-        });
-        afterEach(function() {
-            shell.rm('-rf', temp);
-        });
-        describe('of <source-file> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', path.join(windows8_project, '*'), temp);
-            });
-            it('should copy stuff from one location to another by calling common.copyFile', function() {
-                var source = copyArray(valid_source);
-                var s = spyOn(common, 'copyFile');
-                windows8['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/windows8/dummer.js', temp, path.join('www', 'plugins', 'com.phonegap.plugins.dummyplugin', 'dummer.js'));
-            });
-            it('should throw if source-file src cannot be found', function() {
-                var source = copyArray(invalid_source);
-                expect(function() {
-                    windows8['source-file'].install(source[1], faultyplugin, temp, faulty_id, proj_files);
-                }).toThrow('"' + path.resolve(faultyplugin, 'src/windows8/NotHere.js') + '" not found!');
-            });
-            it('should throw if source-file target already exists', function() {
-                var source = copyArray(valid_source);
-                var target = path.join(temp, 'www', 'plugins', dummy_id, 'dummer.js');
-                shell.mkdir('-p', path.dirname(target));
-                fs.writeFileSync(target, 'some bs', 'utf-8');
-                expect(function() {
-                    windows8['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
-                }).toThrow('"' + target + '" already exists!');
-            });
-        });
-    });
-
-    describe('uninstallation', function() {
-        beforeEach(function() {
-            shell.mkdir('-p', temp);
-            shell.mkdir('-p', plugins_dir);
-            shell.cp('-rf', path.join(windows8_project, '*'), temp);
-        });
-        afterEach(function() {
-            shell.rm('-rf', temp);
-        });
-        describe('of <source-file> elements', function() {
-            it('should remove stuff by calling common.removeFile', function(done) {
-                var s = spyOn(common, 'removeFile');
-                install('windows8', temp, dummyplugin, plugins_dir, {})
-                .then(function() {
-                    var source = copyArray(valid_source);
-                    windows8['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
-                    expect(s).toHaveBeenCalledWith(temp, path.join('www', 'plugins',  'com.phonegap.plugins.dummyplugin', 'dummer.js'));
-                    done();
-                });
-            });
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/platforms/wp7.spec.js
----------------------------------------------------------------------
diff --git a/spec/platforms/wp7.spec.js b/spec/platforms/wp7.spec.js
deleted file mode 100644
index 262e851..0000000
--- a/spec/platforms/wp7.spec.js
+++ /dev/null
@@ -1,129 +0,0 @@
-var wp7 = require('../../src/platforms/wp7'),
-    common  = require('../../src/platforms/common'),
-    install = require('../../src/install'),
-    path    = require('path'),
-    fs      = require('fs'),
-    shell   = require('shelljs'),
-    et      = require('elementtree'),
-    os      = require('osenv'),
-    temp    = path.join(os.tmpdir(), 'plugman'),
-    plugins_dir = path.join(temp, 'cordova', 'plugins'),
-    xml_helpers = require('../../src/util/xml-helpers'),
-    plugins_module = require('../../src/util/plugins'),
-    dummyplugin = path.join(__dirname, '..', 'plugins', 'DummyPlugin'),
-    faultyplugin = path.join(__dirname, '..', 'plugins', 'FaultyPlugin'),
-    wp7_project = path.join(__dirname, '..', 'projects', 'wp7');
-
-var xml_path     = path.join(dummyplugin, 'plugin.xml')
-  , xml_text     = fs.readFileSync(xml_path, 'utf-8')
-  , plugin_et    = new et.ElementTree(et.XML(xml_text));
-
-var platformTag = plugin_et.find('./platform[@name="wp7"]');
-var dummy_id = plugin_et._root.attrib['id'];
-var valid_source = platformTag.findall('./source-file'),
-    assets = plugin_et.findall('./asset'),
-    configChanges = platformTag.findall('./config-file');
-xml_path  = path.join(faultyplugin, 'plugin.xml')
-xml_text  = fs.readFileSync(xml_path, 'utf-8')
-plugin_et = new et.ElementTree(et.XML(xml_text));
-
-platformTag = plugin_et.find('./platform[@name="wp7"]');
-var invalid_source = platformTag.findall('./source-file');
-var faulty_id = plugin_et._root.attrib['id'];
-
-shell.mkdir('-p', temp);
-shell.cp('-rf', path.join(wp7_project, '*'), temp);
-var proj_files = wp7.parseProjectFile(temp);
-shell.rm('-rf', temp);
-
-function copyArray(arr) {
-    return Array.prototype.slice.call(arr, 0);
-}
-
-describe('wp7 project handler', function() {
-
-    beforeEach(function() {
-        shell.mkdir('-p', temp);
-        shell.mkdir('-p', plugins_dir);
-    });
-    afterEach(function() {
-        shell.rm('-rf', temp);
-    });
-
-    describe('www_dir method', function() {
-        it('should return cordova-wp7 project www location using www_dir', function() {
-            expect(wp7.www_dir(path.sep)).toEqual(path.sep + 'www');
-        });
-    });
-    describe('package_name method', function() {
-        it('should return a wp7 project\'s proper package name', function() {
-            expect(wp7.package_name(wp7_project)).toEqual("{5FC10D78-8779-4EDB-9B61-1D04F0A755D4}");
-        });
-    });
-
-    describe('parseProjectFile method', function() {
-        it('should throw if project is not an wp7 project', function() {
-            expect(function() {
-                wp7.parseProjectFile(temp);
-            }).toThrow('does not appear to be a Windows Phone project (no .csproj file)');
-        });
-    });
-
-    describe('installation', function() {
-        beforeEach(function() {
-            shell.mkdir('-p', temp);
-        });
-        afterEach(function() {
-            shell.rm('-rf', temp);
-        });
-        describe('of <source-file> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', path.join(wp7_project, '*'), temp);
-            });
-            it('should copy stuff from one location to another by calling common.copyFile', function() {
-                var source = copyArray(valid_source);
-                var s = spyOn(common, 'copyFile');
-                wp7['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/wp7/DummyPlugin.cs', temp, path.join('Plugins', 'com.phonegap.plugins.dummyplugin', 'DummyPlugin.cs'));
-            });
-            it('should throw if source-file src cannot be found', function() {
-                var source = copyArray(invalid_source);
-                expect(function() {
-                    wp7['source-file'].install(source[1], faultyplugin, temp, faulty_id, proj_files);
-                }).toThrow('"' + path.resolve(faultyplugin, 'src/wp7/NotHere.cs') + '" not found!');
-            });
-            it('should throw if source-file target already exists', function() {
-                var source = copyArray(valid_source);
-                var target = path.join(temp, 'Plugins', dummy_id, 'DummyPlugin.cs');
-                shell.mkdir('-p', path.dirname(target));
-                fs.writeFileSync(target, 'some bs', 'utf-8');
-                expect(function() {
-                    wp7['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
-                }).toThrow('"' + target + '" already exists!');
-            });
-        });
-    });
-
-    describe('uninstallation', function() {
-        beforeEach(function() {
-            shell.mkdir('-p', temp);
-            shell.mkdir('-p', plugins_dir);
-            shell.cp('-rf', path.join(wp7_project, '*'), temp);
-        });
-        afterEach(function() {
-            shell.rm('-rf', temp);
-        });
-        describe('of <source-file> elements', function() {
-            it('should remove stuff by calling common.removeFile', function(done) {
-                var s = spyOn(common, 'removeFile');
-                install('wp7', temp, dummyplugin, plugins_dir, {})
-                .then(function() {
-                    var source = copyArray(valid_source);
-                    wp7['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
-                    expect(s).toHaveBeenCalledWith(temp, path.join('Plugins', 'com.phonegap.plugins.dummyplugin', 'DummyPlugin.cs'));
-                    done();
-                });
-            });
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/platforms/wp8.spec.js
----------------------------------------------------------------------
diff --git a/spec/platforms/wp8.spec.js b/spec/platforms/wp8.spec.js
deleted file mode 100644
index ba9cdb4..0000000
--- a/spec/platforms/wp8.spec.js
+++ /dev/null
@@ -1,150 +0,0 @@
-var wp8 = require('../../src/platforms/wp8'),
-    common  = require('../../src/platforms/common'),
-    install = require('../../src/install'),
-    path    = require('path'),
-    fs      = require('fs'),
-    shell   = require('shelljs'),
-    et      = require('elementtree'),
-    os      = require('osenv'),
-    temp    = path.join(os.tmpdir(), 'plugman'),
-    plugins_dir = path.join(temp, 'cordova', 'plugins'),
-    xml_helpers = require('../../src/util/xml-helpers'),
-    plugins_module = require('../../src/util/plugins'),
-    dummyplugin = path.join(__dirname, '..', 'plugins', 'DummyPlugin'),
-    faultyplugin = path.join(__dirname, '..', 'plugins', 'FaultyPlugin'),
-    wp8_project = path.join(__dirname, '..', 'projects', 'wp8');
-
-var xml_path     = path.join(dummyplugin, 'plugin.xml')
-  , xml_text     = fs.readFileSync(xml_path, 'utf-8')
-  , plugin_et    = new et.ElementTree(et.XML(xml_text));
-
-var platformTag = plugin_et.find('./platform[@name="wp8"]');
-var dummy_id = plugin_et._root.attrib['id'];
-var valid_source = platformTag.findall('./source-file'),
-    assets = plugin_et.findall('./asset'),
-    configChanges = platformTag.findall('./config-file');
-xml_path  = path.join(faultyplugin, 'plugin.xml')
-xml_text  = fs.readFileSync(xml_path, 'utf-8')
-plugin_et = new et.ElementTree(et.XML(xml_text));
-
-platformTag = plugin_et.find('./platform[@name="wp8"]');
-var invalid_source = platformTag.findall('./source-file');
-var faulty_id = plugin_et._root.attrib['id'];
-
-shell.mkdir('-p', temp);
-shell.cp('-rf', path.join(wp8_project, '*'), temp);
-var proj_files = wp8.parseProjectFile(temp);
-shell.rm('-rf', temp);
-
-function copyArray(arr) {
-    return Array.prototype.slice.call(arr, 0);
-}
-
-describe('wp8 project handler', function() {
-
-    beforeEach(function() {
-        shell.mkdir('-p', temp);
-        shell.mkdir('-p', plugins_dir);
-    });
-    afterEach(function() {
-        shell.rm('-rf', temp);
-    });
-
-    describe('www_dir method', function() {
-        it('should return cordova-wp8 project www location using www_dir', function() {
-            expect(wp8.www_dir(path.sep)).toEqual(path.sep + 'www');
-        });
-    });
-    describe('package_name method', function() {
-        it('should return a wp8 project\'s proper package name', function() {
-            expect(wp8.package_name(wp8_project)).toEqual("{F3A8197B-6B16-456D-B5F4-DD4F04AC0BEC}");
-        });
-    });
-
-    describe('parseProjectFile method', function() {
-        it('should throw if project is not an wp8 project', function() {
-            expect(function() {
-                wp8.parseProjectFile(temp);
-            }).toThrow('does not appear to be a Windows Phone project (no .csproj file)');
-        });
-    });
-
-    describe('installation', function() {
-        var done;
-        function installPromise(f) {
-            done = false;
-            f.then(function() { done = true; }, function(err) { done = err; });
-        }
-        beforeEach(function() {
-            shell.mkdir('-p', temp);
-        });
-        afterEach(function() {
-            shell.rm('-rf', temp);
-        });
-        describe('of <source-file> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', path.join(wp8_project, '*'), temp);
-            });
-            it('should copy stuff from one location to another by calling common.copyFile', function() {
-                var source = copyArray(valid_source);
-                var s = spyOn(common, 'copyFile');
-                wp8['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
-                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/wp8/DummyPlugin.cs', temp, path.join('Plugins', 'com.phonegap.plugins.dummyplugin', 'DummyPlugin.cs'));
-            });
-            it('should throw if source-file src cannot be found', function() {
-                var source = copyArray(invalid_source);
-                expect(function() {
-                    wp8['source-file'].install(source[1], faultyplugin, temp, faulty_id, proj_files);
-                }).toThrow('"' + path.resolve(faultyplugin, 'src/wp8/NotHere.cs') + '" not found!');
-            });
-            it('should throw if source-file target already exists', function() {
-                var source = copyArray(valid_source);
-                var target = path.join(temp, 'Plugins', dummy_id, 'DummyPlugin.cs');
-                shell.mkdir('-p', path.dirname(target));
-                fs.writeFileSync(target, 'some bs', 'utf-8');
-                expect(function() {
-                    wp8['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
-                }).toThrow('"' + target + '" already exists!');
-            });
-        });
-        describe('of <config-changes> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', path.join(wp8_project, '*'), temp);
-            });
-            it('should process and pass the after parameter to graftXML', function () {
-                var graftXML = spyOn(xml_helpers, 'graftXML').andCallThrough();
-
-                runs(function () { installPromise(install('wp8', temp, dummyplugin, plugins_dir, {})); });
-                waitsFor(function () { return done; }, 'install promise never resolved', 500);
-                runs(function () {
-                    expect(graftXML).toHaveBeenCalledWith(jasmine.any(Object), jasmine.any(Array), "/Deployment/App", "Tokens");
-                    expect(graftXML).toHaveBeenCalledWith(jasmine.any(Object), jasmine.any(Array), "/Deployment/App/Extensions", "Extension");
-                    expect(graftXML).toHaveBeenCalledWith(jasmine.any(Object), jasmine.any(Array), "/Deployment/App/Extensions", "FileTypeAssociation;Extension");
-                });
-            });
-        });
-    });
-
-    describe('uninstallation', function() {
-        beforeEach(function() {
-            shell.mkdir('-p', temp);
-            shell.mkdir('-p', plugins_dir);
-            shell.cp('-rf', path.join(wp8_project, '*'), temp);
-        });
-        afterEach(function() {
-            shell.rm('-rf', temp);
-        });
-        describe('of <source-file> elements', function() {
-            it('should remove stuff by calling common.removeFile', function(done) {
-                var s = spyOn(common, 'removeFile');
-                install('wp8', temp, dummyplugin, plugins_dir, {})
-                .then(function() {
-                    var source = copyArray(valid_source);
-                    wp8['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
-                    expect(s).toHaveBeenCalledWith(temp, path.join('Plugins', 'com.phonegap.plugins.dummyplugin', 'DummyPlugin.cs'));
-                    done();
-                });
-            });
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/.gitkeep
----------------------------------------------------------------------
diff --git a/spec/plugins/.gitkeep b/spec/plugins/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/AndroidJS/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/AndroidJS/plugin.xml b/spec/plugins/AndroidJS/plugin.xml
deleted file mode 100644
index 1a68749..0000000
--- a/spec/plugins/AndroidJS/plugin.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="com.phonegap.androidonly"
-    version="3.0.0">
-
-    <name>JavaScript in yo droidz</name>
-
-    <!-- android -->
-    <platform name="android">
-        <js-module src="www/android.js" name="Android">
-            <clobbers target="android" />
-        </js-module>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/AndroidJS/www/android.js
----------------------------------------------------------------------
diff --git a/spec/plugins/AndroidJS/www/android.js b/spec/plugins/AndroidJS/www/android.js
deleted file mode 100644
index d268b7d..0000000
--- a/spec/plugins/AndroidJS/www/android.js
+++ /dev/null
@@ -1 +0,0 @@
-{};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/ChildBrowser/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/ChildBrowser/plugin.xml b/spec/plugins/ChildBrowser/plugin.xml
deleted file mode 100644
index 2dfd692..0000000
--- a/spec/plugins/ChildBrowser/plugin.xml
+++ /dev/null
@@ -1,143 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="com.phonegap.plugins.childbrowser"
-    version="0.6.0">
-
-    <name>Child Browser</name>
-
-    <asset src="www/childbrowser" target="childbrowser" />
-    <asset src="www/childbrowser_file.html" target="childbrowser_file.html" />
-
-    <js-module src="www/childbrowser.js" name="ChildBrowser">
-        <clobbers target="childbrowser" />
-    </js-module>
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-        <access origin="s3.amazonaws.com" />
-    </config-file>
-    
-    <info>No matter what platform you are installing to, this notice is very important.</info>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="AndroidManifest.xml" parent="/manifest/application">
-            <activity android:name="com.phonegap.plugins.childBrowser.ChildBrowser"
-                      android:label="@string/app_name">
-                <intent-filter>
-                </intent-filter>
-            </activity>
-        </config-file>
-
-        <!-- CDV < 2.0 -->
-        <config-file target="res/xml/plugins.xml" parent="/plugins">
-            <plugin name="ChildBrowser"
-                value="com.phonegap.plugins.childBrowser.ChildBrowser"/>
-        </config-file>
-
-        <!-- CDV 2.0+ (for now) -->
-        <config-file target="res/xml/config.xml" parent="/cordova/plugins">
-            <plugin name="ChildBrowser"
-                value="com.phonegap.plugins.childBrowser.ChildBrowser"/>
-        </config-file>
-
-        <source-file src="src/android/ChildBrowser.java"
-                target-dir="src/com/phonegap/plugins/childBrowser" />
-        <info>Please make sure you read this because it is very important to complete the installation of your plugin.</info>
-    </platform>
-
-    <!-- ios -->
-    <platform name="ios">
-        <plugins-plist key="com.phonegap.plugins.childbrowser"
-            string="ChildBrowserCommand" />
-
-        <config-file target="config.xml" parent="/widget/plugins">
-            <plugin name="ChildBrowser"
-                value="ChildBrowserCommand" />
-        </config-file>
-
-        <resource-file src="src/ios/ChildBrowser.bundle" />
-        <resource-file src="src/ios/ChildBrowserViewController.xib" />
-
-        <config-file target="*-Info.plist" parent="AppId">
-            <string>$APP_ID</string>
-        </config-file>
-        
-        <config-file target="*-Info.plist" parent="CFBundleURLTypes">
-            <array>
-              <dict>
-                <key>PackageName</key>
-                <string>$PACKAGE_NAME</string>
-              </dict>
-            </array>
-        </config-file>
-
-        <header-file src="src/ios/ChildBrowserCommand.h" />
-        <header-file src="src/ios/ChildBrowserViewController.h" />
-        <header-file src="src/ios/TargetDirTest.h" target-dir="targetDir"/>
-
-        <source-file src="src/ios/ChildBrowserCommand.m" />
-        <source-file src="src/ios/ChildBrowserViewController.m" />
-        <source-file src="src/ios/preserveDirs/PreserveDirsTest.m" preserve-dirs="true" />
-        <header-file src="src/ios/TargetDirTest.m" target-dir="targetDir"/>
-
-        <!-- framework for testing (not actual dependency of ChildBrowser -->
-        <framework src="libsqlite3.dylib" />
-        <framework src="social.framework" weak="true" />
-        <framework src="music.framework" weak="rabbit" />
-        <framework src="Custom.framework" custom="true" />
-    </platform>
-    <!-- wp7 -->
-    <platform name="wp7">
-        <resource-file src="src\wp7\Images\appbar.back.rest.png" />
-        <config-file target="config.xml" parent="/widget/plugins">
-            <plugin name="ChildBrowser"
-                value="ChildBrowser"/>
-        </config-file>
-
-        <source-file src="src\wp7\ChildBrowserCommand.cs"
-                     target-dir="Plugins\" />
-
-        <!-- modify the project file to include the added files -->
-        <config-file target=".csproj" parent=".">  
-        </config-file> 
-
-    </platform>
-
-    <!-- wp8 -->
-    <platform name="wp8">
-        <resource-file src="src\wp7\Images\appbar.back.rest.png" />
-        <config-file target="config.xml" parent="/widget/plugins">
-            <plugin name="ChildBrowser"
-                value="ChildBrowser"/>
-        </config-file>
-
-        <source-file src="src\wp7\ChildBrowserCommand.cs"
-                     target-dir="Plugins\" />
-
-        <!-- modify the project file to include the added files -->
-        <config-file target=".csproj" parent=".">  
-        </config-file> 
-
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/ChildBrowser/src/android/ChildBrowser.java
----------------------------------------------------------------------
diff --git a/spec/plugins/ChildBrowser/src/android/ChildBrowser.java b/spec/plugins/ChildBrowser/src/android/ChildBrowser.java
deleted file mode 100644
index 5263b0c..0000000
--- a/spec/plugins/ChildBrowser/src/android/ChildBrowser.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_left.png
----------------------------------------------------------------------
diff --git a/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_left.png b/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_left.png
deleted file mode 100644
index 530e12b..0000000
Binary files a/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_left.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_left@2x.png
----------------------------------------------------------------------
diff --git a/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_left@2x.png b/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_left@2x.png
deleted file mode 100644
index 530e12b..0000000
Binary files a/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_left@2x.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_right.png
----------------------------------------------------------------------
diff --git a/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_right.png b/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_right.png
deleted file mode 100644
index 8b3d855..0000000
Binary files a/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_right.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_right@2x.png
----------------------------------------------------------------------
diff --git a/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_right@2x.png b/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_right@2x.png
deleted file mode 100644
index 8b3d855..0000000
Binary files a/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_right@2x.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/but_refresh.png
----------------------------------------------------------------------
diff --git a/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/but_refresh.png b/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/but_refresh.png
deleted file mode 100644
index 309b6bd..0000000
Binary files a/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/but_refresh.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/but_refresh@2x.png
----------------------------------------------------------------------
diff --git a/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/but_refresh@2x.png b/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/but_refresh@2x.png
deleted file mode 100644
index 309b6bd..0000000
Binary files a/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/but_refresh@2x.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/compass.png
----------------------------------------------------------------------
diff --git a/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/compass.png b/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/compass.png
deleted file mode 100644
index 46a8901..0000000
Binary files a/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/compass.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/compass@2x.png
----------------------------------------------------------------------
diff --git a/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/compass@2x.png b/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/compass@2x.png
deleted file mode 100644
index 46a8901..0000000
Binary files a/spec/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/compass@2x.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/ChildBrowser/src/ios/ChildBrowserCommand.h
----------------------------------------------------------------------
diff --git a/spec/plugins/ChildBrowser/src/ios/ChildBrowserCommand.h b/spec/plugins/ChildBrowser/src/ios/ChildBrowserCommand.h
deleted file mode 100644
index 6a23ab6..0000000
--- a/spec/plugins/ChildBrowser/src/ios/ChildBrowserCommand.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-
-//
-//  PhoneGap ! ChildBrowserCommand
-//
-//
-//  Created by Jesse MacFadyen on 10-05-29.
-//  Copyright 2010 Nitobi. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#ifdef PHONEGAP_FRAMEWORK
-	#import <PhoneGap/PGPlugin.h>
-#else
-	#import "PGPlugin.h"
-#endif
-#import "ChildBrowserViewController.h"
-
-
-
-@interface ChildBrowserCommand : PGPlugin <ChildBrowserDelegate>  {
-
-	ChildBrowserViewController* childBrowser;
-}
-
-@property (nonatomic, retain) ChildBrowserViewController *childBrowser;
-
-
-- (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
--(void) onChildLocationChange:(NSString*)newLoc;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/ChildBrowser/src/ios/ChildBrowserCommand.m
----------------------------------------------------------------------
diff --git a/spec/plugins/ChildBrowser/src/ios/ChildBrowserCommand.m b/spec/plugins/ChildBrowser/src/ios/ChildBrowserCommand.m
deleted file mode 100644
index 38aaf64..0000000
--- a/spec/plugins/ChildBrowser/src/ios/ChildBrowserCommand.m
+++ /dev/null
@@ -1,86 +0,0 @@
-//
-
-// 
-//
-//  Created by Jesse MacFadyen on 10-05-29.
-//  Copyright 2010 Nitobi. All rights reserved.
-//  Copyright (c) 2011, IBM Corporation
-//  Copyright 2011, Randy McMillan
-//
-
-#import "ChildBrowserCommand.h"
-
-#ifdef PHONEGAP_FRAMEWORK
-	#import <PhoneGap/PhoneGapViewController.h>
-#else
-	#import "PhoneGapViewController.h"
-#endif
-
-
-@implementation ChildBrowserCommand
-
-@synthesize childBrowser;
-
-- (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options // args: url
-{	
-	
-    if(childBrowser == NULL)
-	{
-		childBrowser = [[ ChildBrowserViewController alloc ] initWithScale:FALSE ];
-		childBrowser.delegate = self;
-	}
-	
-/* // TODO: Work in progress
-	NSString* strOrientations = [ options objectForKey:@"supportedOrientations"];
-	NSArray* supportedOrientations = [strOrientations componentsSeparatedByString:@","];
-*/
-    PhoneGapViewController* cont = (PhoneGapViewController*)[ super appViewController ];
-    childBrowser.supportedOrientations = cont.supportedOrientations;
-    
-    if ([cont respondsToSelector:@selector(presentViewController)]) {
-        //Reference UIViewController.h Line:179 for update to iOS 5 difference - @RandyMcMillan
-        [cont presentViewController:childBrowser animated:YES completion:nil];        
-    } else {
-        [ cont presentModalViewController:childBrowser animated:YES ];
-    }                 
-        
-    NSString *url = (NSString*) [arguments objectAtIndex:0];
-        
-    [childBrowser loadURL:url  ];
-        
-}
-
--(void) close:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options // args: url
-{
-    [ childBrowser closeBrowser];
-	
-}
-
--(void) onClose
-{
-	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onClose();",@""];
-	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
-}
-
--(void) onOpenInSafari
-{
-	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onOpenExternal();",@""];
-	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
-}
-
-
--(void) onChildLocationChange:(NSString*)newLoc
-{
-	
-	NSString* tempLoc = [NSString stringWithFormat:@"%@",newLoc];
-	NSString* encUrl = [tempLoc stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
-	 
-	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onLocationChange('%@');",encUrl];
-	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
-
-}
-
-
-
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/ChildBrowser/src/ios/ChildBrowserViewController.h
----------------------------------------------------------------------
diff --git a/spec/plugins/ChildBrowser/src/ios/ChildBrowserViewController.h b/spec/plugins/ChildBrowser/src/ios/ChildBrowserViewController.h
deleted file mode 100644
index d6fc139..0000000
--- a/spec/plugins/ChildBrowser/src/ios/ChildBrowserViewController.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-
-//
-//  ChildBrowserViewController.h
-//
-//  Created by Jesse MacFadyen on 21/07/09.
-//  Copyright 2009 Nitobi. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-@protocol ChildBrowserDelegate<NSObject>
-
-
-
-/*
- *  onChildLocationChanging:newLoc
- *  
- *  Discussion:
- *    Invoked when a new page has loaded
- */
--(void) onChildLocationChange:(NSString*)newLoc;
--(void) onOpenInSafari;
--(void) onClose;
-@end
-
-
-@interface ChildBrowserViewController : UIViewController < UIWebViewDelegate > {
-	IBOutlet UIWebView* webView;
-	IBOutlet UIBarButtonItem* closeBtn;
-	IBOutlet UIBarButtonItem* refreshBtn;
-	IBOutlet UILabel* addressLabel;
-	IBOutlet UIBarButtonItem* backBtn;
-	IBOutlet UIBarButtonItem* fwdBtn;
-	IBOutlet UIBarButtonItem* safariBtn;
-	IBOutlet UIActivityIndicatorView* spinner;
-	BOOL scaleEnabled;
-	BOOL isImage;
-	NSString* imageURL;
-	NSArray* supportedOrientations;
-	id <ChildBrowserDelegate> delegate;
-}
-
-@property (nonatomic, retain)id <ChildBrowserDelegate> delegate;
-@property (nonatomic, retain) 	NSArray* supportedOrientations;
-@property(retain) NSString* imageURL;
-@property(assign) BOOL isImage;
-
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation; 
-- (ChildBrowserViewController*)initWithScale:(BOOL)enabled;
-- (IBAction)onDoneButtonPress:(id)sender;
-- (IBAction)onSafariButtonPress:(id)sender;
-- (void)loadURL:(NSString*)url;
--(void)closeBrowser;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/ChildBrowser/src/ios/ChildBrowserViewController.m
----------------------------------------------------------------------
diff --git a/spec/plugins/ChildBrowser/src/ios/ChildBrowserViewController.m b/spec/plugins/ChildBrowser/src/ios/ChildBrowserViewController.m
deleted file mode 100644
index 167ef98..0000000
--- a/spec/plugins/ChildBrowser/src/ios/ChildBrowserViewController.m
+++ /dev/null
@@ -1,239 +0,0 @@
-//
-//  ChildBrowserViewController.m
-//
-//  Created by Jesse MacFadyen on 21/07/09.
-//  Copyright 2009 Nitobi. All rights reserved.
-//  Copyright (c) 2011, IBM Corporation
-//  Copyright 2011, Randy McMillan
-//
-
-#import "ChildBrowserViewController.h"
-
-
-@implementation ChildBrowserViewController
-
-@synthesize imageURL;
-@synthesize supportedOrientations;
-@synthesize isImage;
-@synthesize delegate;
-
-/*
- // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
-- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
-    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
-        // Custom initialization
-    }
-    return self;
-}
-*/
-
-+ (NSString*) resolveImageResource:(NSString*)resource
-{
-	NSString* systemVersion = [[UIDevice currentDevice] systemVersion];
-	BOOL isLessThaniOS4 = ([systemVersion compare:@"4.0" options:NSNumericSearch] == NSOrderedAscending);
-	
-	// the iPad image (nor retina) differentiation code was not in 3.x, and we have to explicitly set the path
-	if (isLessThaniOS4)
-	{
-        return [NSString stringWithFormat:@"%@.png", resource];
-	}
-	
-	return resource;
-}
-
-
-- (ChildBrowserViewController*)initWithScale:(BOOL)enabled
-{
-    self = [super init];
-	
-	
-	scaleEnabled = enabled;
-	
-	return self;	
-}
-
-// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    
-	refreshBtn.image = [UIImage imageNamed:[[self class] resolveImageResource:@"ChildBrowser.bundle/but_refresh"]];
-	backBtn.image = [UIImage imageNamed:[[self class] resolveImageResource:@"ChildBrowser.bundle/arrow_left"]];
-	fwdBtn.image = [UIImage imageNamed:[[self class] resolveImageResource:@"ChildBrowser.bundle/arrow_right"]];
-	safariBtn.image = [UIImage imageNamed:[[self class] resolveImageResource:@"ChildBrowser.bundle/compass"]];
-
-	webView.delegate = self;
-	webView.scalesPageToFit = TRUE;
-	webView.backgroundColor = [UIColor whiteColor];
-	NSLog(@"View did load");
-}
-
-
-
-
-
-- (void)didReceiveMemoryWarning {
-	// Releases the view if it doesn't have a superview.
-    [super didReceiveMemoryWarning];
-	
-	// Release any cached data, images, etc that aren't in use.
-}
-
-- (void)viewDidUnload {
-	// Release any retained subviews of the main view.
-	// e.g. self.myOutlet = nil;
-	NSLog(@"View did UN-load");
-}
-
-
-- (void)dealloc {
-
-	webView.delegate = nil;
-	
-	[webView release];
-	[closeBtn release];
-	[refreshBtn release];
-	[addressLabel release];
-	[backBtn release];
-	[fwdBtn release];
-	[safariBtn release];
-	[spinner release];
-	[ supportedOrientations release];
-	[super dealloc];
-}
-
--(void)closeBrowser
-{
-	
-	if(delegate != NULL)
-	{
-		[delegate onClose];		
-	}
-    if ([self respondsToSelector:@selector(presentingViewController)]) { 
-        //Reference UIViewController.h Line:179 for update to iOS 5 difference - @RandyMcMillan
-        [[self presentingViewController] dismissViewControllerAnimated:YES completion:nil];
-    } else {
-        [[self parentViewController] dismissModalViewControllerAnimated:YES];
-    }
-}
-
--(IBAction) onDoneButtonPress:(id)sender
-{
-	[ self closeBrowser];
-
-    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]];
-    [webView loadRequest:request];
-}
-
-
--(IBAction) onSafariButtonPress:(id)sender
-{
-	
-	if(delegate != NULL)
-	{
-		[delegate onOpenInSafari];		
-	}
-	
-	if(isImage)
-	{
-		NSURL* pURL = [[ [NSURL alloc] initWithString:imageURL ] autorelease];
-		[ [ UIApplication sharedApplication ] openURL:pURL  ];
-	}
-	else
-	{
-		NSURLRequest *request = webView.request;
-		[[UIApplication sharedApplication] openURL:request.URL];
-	}
-
-	 
-}
-
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation 
-{
-	BOOL autoRotate = [self.supportedOrientations count] > 1; // autorotate if only more than 1 orientation supported
-	if (autoRotate)
-	{
-		if ([self.supportedOrientations containsObject:
-			 [NSNumber numberWithInt:interfaceOrientation]]) {
-			return YES;
-		}
-    }
-	
-	return NO;
-}
-
-
-
-
-- (void)loadURL:(NSString*)url
-{
-	NSLog(@"Opening Url : %@",url);
-	 
-	if( [url hasSuffix:@".png" ]  || 
-	    [url hasSuffix:@".jpg" ]  || 
-		[url hasSuffix:@".jpeg" ] || 
-		[url hasSuffix:@".bmp" ]  || 
-		[url hasSuffix:@".gif" ]  )
-	{
-		[ imageURL release ];
-		imageURL = [url copy];
-		isImage = YES;
-		NSString* htmlText = @"<html><body style='background-color:#333;margin:0px;padding:0px;'><img style='min-height:200px;margin:0px;padding:0px;width:100%;height:auto;' alt='' src='IMGSRC'/></body></html>";
-		htmlText = [ htmlText stringByReplacingOccurrencesOfString:@"IMGSRC" withString:url ];
-
-		[webView loadHTMLString:htmlText baseURL:[NSURL URLWithString:@""]];
-		
-	}
-	else
-	{
-		imageURL = @"";
-		isImage = NO;
-		NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:url]];
-		[webView loadRequest:request];
-	}
-	webView.hidden = NO;
-}
-
-
-- (void)webViewDidStartLoad:(UIWebView *)sender {
-	addressLabel.text = @"Loading...";
-	backBtn.enabled = webView.canGoBack;
-	fwdBtn.enabled = webView.canGoForward;
-	
-	[ spinner startAnimating ];
-	
-}
-
-- (void)webViewDidFinishLoad:(UIWebView *)sender 
-{
-	NSURLRequest *request = webView.request;
-	NSLog(@"New Address is : %@",request.URL.absoluteString);
-	addressLabel.text = request.URL.absoluteString;
-	backBtn.enabled = webView.canGoBack;
-	fwdBtn.enabled = webView.canGoForward;
-	[ spinner stopAnimating ];
-	
-	if(delegate != NULL)
-	{
-		[delegate onChildLocationChange:request.URL.absoluteString];		
-	}
-
-}
-
-- (void)webView:(UIWebView *)wv didFailLoadWithError:(NSError *)error {
-    NSLog (@"webView:didFailLoadWithError");
-    [spinner stopAnimating];
-    addressLabel.text = @"Failed";
-    if (error != NULL) {
-        UIAlertView *errorAlert = [[UIAlertView alloc]
-                                   initWithTitle: [error localizedDescription]
-                                   message: [error localizedFailureReason]
-                                   delegate:nil
-                                   cancelButtonTitle:@"OK"
-                                   otherButtonTitles:nil];
-        [errorAlert show];
-        [errorAlert release];
-    }
-}
-
-
-@end


[03/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/util/plugins.spec.js
----------------------------------------------------------------------
diff --git a/spec/util/plugins.spec.js b/spec/util/plugins.spec.js
deleted file mode 100644
index 63d0aac..0000000
--- a/spec/util/plugins.spec.js
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/usr/bin/env node
-/*
- *
- *
- * Licensed 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 http   = require('http'),
-    osenv  = require('osenv'),
-    path   = require('path'),
-    fs     = require('fs'),
-    temp   = path.join(osenv.tmpdir(), 'plugman'),
-    shell  = require('shelljs'),
-    child_process = require('child_process'),
-    plugins = require('../../src/util/plugins'),
-    xml_helpers = require('../../src/util/xml-helpers');
-
-describe('plugins utility module', function(){
-    describe('clonePluginGitRepo', function(){
-        var fake_id = 'VillageDrunkard';
-        var execSpy, cp_spy, xml_spy, done;
-        beforeEach(function() {
-            execSpy = spyOn(child_process, 'exec').andCallFake(function(cmd, opts, cb) {
-                if (!cb) cb = opts;
-                cb(null, 'git output');
-            });
-            spyOn(shell, 'which').andReturn(true);
-            cp_spy = spyOn(shell, 'cp');
-            xml_spy = spyOn(xml_helpers, 'parseElementtreeSync').andReturn({
-                getroot:function() {
-                    return {
-                        attrib:{id:fake_id}
-                    };
-                }
-            });
-            done = false;
-        });
-        it('should shell out to git clone with correct arguments', function(){
-            var plugin_git_url = 'https://github.com/imhotep/ChildBrowser';
-            var callback = jasmine.createSpy();
-
-            runs(function() {
-                plugins.clonePluginGitRepo(plugin_git_url, temp, '.', undefined)
-                .then(function(val) { done = val; }, function(err) { done = err; });
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 500);
-            runs(function() {
-                expect(execSpy).toHaveBeenCalled();
-                var git_clone_regex = new RegExp('^git clone "' + plugin_git_url + '" ".*"$', 'gi');
-                expect(execSpy.mostRecentCall.args[0]).toMatch(git_clone_regex);
-
-                expect(done).toMatch(new RegExp(path.sep + fake_id + '$'));
-            });
-        });
-        it('should take into account subdirectory argument when copying over final repository into plugins+plugin_id directory', function() {
-            var plugin_git_url = 'https://github.com/imhotep/ChildBrowser';
-            var fake_subdir = 'TheBrainRecoilsInHorror';
-            runs(function() {
-                plugins.clonePluginGitRepo(plugin_git_url, temp, fake_subdir)
-                .then(function(val) { done = val || true; }, function(err) { done = err; });
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 500);
-            runs(function() {
-                var expected_subdir_cp_path = new RegExp(fake_subdir + '[\\\\\\/]\\*$', 'gi');
-                expect(cp_spy.mostRecentCall.args[1]).toMatch(expected_subdir_cp_path);
-                expect(cp_spy.mostRecentCall.args[2]).toEqual(path.join(temp, fake_id));
-            });
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/util/xml-helpers.spec.js
----------------------------------------------------------------------
diff --git a/spec/util/xml-helpers.spec.js b/spec/util/xml-helpers.spec.js
deleted file mode 100644
index edcdedb..0000000
--- a/spec/util/xml-helpers.spec.js
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- *
- *
- * Licensed 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 path = require('path')
-  , xml_helpers = require('../../src/util/xml-helpers')
-  , et = require('elementtree')
-
-  , title = et.XML('<title>HELLO</title>')
-  , usesNetworkOne = et.XML('<uses-permission ' +
-			'android:name="PACKAGE_NAME.permission.C2D_MESSAGE"/>')
-  , usesNetworkTwo = et.XML("<uses-permission android:name=\
-            \"PACKAGE_NAME.permission.C2D_MESSAGE\" />")
-  , usesReceive = et.XML("<uses-permission android:name=\
-            \"com.google.android.c2dm.permission.RECEIVE\"/>")
-  , helloTagOne = et.XML("<h1>HELLO</h1>")
-  , goodbyeTag = et.XML("<h1>GOODBYE</h1>")
-  , helloTagTwo = et.XML("<h1>  HELLO  </h1>");
-
-
-describe('xml-helpers', function(){
-    describe('equalNodes', function() {
-        it('should return false for different tags', function(){
-            expect(xml_helpers.equalNodes(usesNetworkOne, title)).toBe(false);
-        });
-
-        it('should return true for identical tags', function(){
-            expect(xml_helpers.equalNodes(usesNetworkOne, usesNetworkTwo)).toBe(true);
-        });
-
-        it('should return false for different attributes', function(){
-            expect(xml_helpers.equalNodes(usesNetworkOne, usesReceive)).toBe(false);
-        });
-
-        it('should distinguish between text', function(){
-            expect(xml_helpers.equalNodes(helloTagOne, goodbyeTag)).toBe(false);
-        });
-
-        it('should ignore whitespace in text', function(){
-            expect(xml_helpers.equalNodes(helloTagOne, helloTagTwo)).toBe(true);
-        });
-
-        describe('should compare children', function(){
-            it('by child quantity', function(){
-                var one = et.XML('<i><b>o</b></i>'),
-                    two = et.XML('<i><b>o</b><u></u></i>');
-
-                expect(xml_helpers.equalNodes(one, two)).toBe(false);
-            });
-
-            it('by child equality', function(){
-                var one = et.XML('<i><b>o</b></i>'),
-                    two = et.XML('<i><u></u></i>'),
-                    uno = et.XML('<i>\n<b>o</b>\n</i>');
-
-                expect(xml_helpers.equalNodes(one, uno)).toBe(true);
-                expect(xml_helpers.equalNodes(one, two)).toBe(false);
-            });
-        });
-    });
-    describe('pruneXML', function() {
-        var config_xml;
-
-        beforeEach(function() {
-            config_xml = xml_helpers.parseElementtreeSync(path.join(__dirname, '..', 'projects', 'android_two', 'res', 'xml', 'config.xml'));
-        });
-
-        it('should remove any children that match the specified selector', function() {
-            var children = config_xml.findall('plugins/plugin');
-            xml_helpers.pruneXML(config_xml, children, 'plugins');
-            expect(config_xml.find('plugins').getchildren().length).toEqual(0);
-        });
-        it('should do nothing if the children cannot be found', function() {
-            var children = [title];
-            xml_helpers.pruneXML(config_xml, children, 'plugins');
-            expect(config_xml.find('plugins').getchildren().length).toEqual(17);
-        });
-        it('should be able to handle absolute selectors', function() {
-            var children = config_xml.findall('plugins/plugin');
-            xml_helpers.pruneXML(config_xml, children, '/cordova/plugins');
-            expect(config_xml.find('plugins').getchildren().length).toEqual(0);
-        });
-        it('should be able to handle absolute selectors with wildcards', function() {
-            var children = config_xml.findall('plugins/plugin');
-            xml_helpers.pruneXML(config_xml, children, '/*/plugins');
-            expect(config_xml.find('plugins').getchildren().length).toEqual(0);
-        });
-    });
-
-    describe('graftXML', function() {
-        var config_xml, plugin_xml;
-
-        beforeEach(function() {
-            config_xml = xml_helpers.parseElementtreeSync(path.join(__dirname, '..', 'projects', 'android_two', 'res', 'xml', 'config.xml'));
-            plugin_xml = xml_helpers.parseElementtreeSync(path.join(__dirname, '..', 'plugins', 'ChildBrowser', 'plugin.xml'));
-        });
-
-        it('should add children to the specified selector', function() {
-            var children = plugin_xml.find('config-file').getchildren();
-            xml_helpers.graftXML(config_xml, children, 'plugins');
-            expect(config_xml.find('plugins').getchildren().length).toEqual(19);
-        });
-        it('should be able to handle absolute selectors', function() {
-            var children = plugin_xml.find('config-file').getchildren();
-            xml_helpers.graftXML(config_xml, children, '/cordova');
-            expect(config_xml.findall('access').length).toEqual(3);
-        });
-        it('should be able to handle absolute selectors with wildcards', function() {
-            var children = plugin_xml.find('config-file').getchildren();
-            xml_helpers.graftXML(config_xml, children, '/*');
-            expect(config_xml.findall('access').length).toEqual(3);
-        });
-
-        it('for simple XPath paths, the parent should be created if not present', function () {
-            var doc = new et.ElementTree(et.XML('<widget>')),
-                children = [et.XML('<rim:permits> super_awesome_permission </rim:permits>')],
-                selector= "/widget/rim:permissions";
-            expect(xml_helpers.graftXML(doc, children, selector)).toBe(true);
-            expect(et.tostring(doc.getroot())).toContain("<rim:permissions><rim:permits> super_awesome_permission </rim:permits></rim:permissions>");
-        });
-
-        it('returns false for more complicated selectors', function () {
-            var doc = new et.ElementTree(et.XML('<widget>')),
-                children = [et.XML('<rim:permits> super_awesome_permission </rim:permits>')],
-                selector= "/bookstore/book[price>35]/title";
-            expect(xml_helpers.graftXML(doc, children, selector)).toBe(false);
-        });
-
-        it('appends children after the specified sibling', function () {
-            var doc = new et.ElementTree(et.XML('<widget><A/><B/><C/></widget>')),
-                children = [et.XML('<B id="new"/>'), et.XML('<B id="new2"/>')],
-                selector= "/widget",
-                after= "B;A";
-            expect(xml_helpers.graftXML(doc, children, selector, after)).toBe(true);
-            expect(et.tostring(doc.getroot())).toContain('<B /><B id="new" /><B id="new2" />');
-        });
-
-        it('appends children after the 2nd priority sibling if the 1st one is missing', function () {
-            var doc = new et.ElementTree(et.XML('<widget><A/><C/></widget>')),
-                children = [et.XML('<B id="new"/>'), et.XML('<B id="new2"/>')],
-                selector= "/widget",
-                after= "B;A";
-            expect(xml_helpers.graftXML(doc, children, selector, after)).toBe(true);
-            expect(et.tostring(doc.getroot())).toContain('<A /><B id="new" /><B id="new2" />');
-        });
-
-        it('inserts children at the beginning if specified sibling is missing', function () {
-            var doc = new et.ElementTree(et.XML('<widget><B/><C/></widget>')),
-                children = [et.XML('<A id="new"/>'), et.XML('<A id="new2"/>')],
-                selector= "/widget",
-                after= "A";
-            expect(xml_helpers.graftXML(doc, children, selector, after)).toBe(true);
-            expect(et.tostring(doc.getroot())).toContain('<widget><A id="new" /><A id="new2" />');
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/wrappers.spec.js
----------------------------------------------------------------------
diff --git a/spec/wrappers.spec.js b/spec/wrappers.spec.js
deleted file mode 100644
index 3e61eb7..0000000
--- a/spec/wrappers.spec.js
+++ /dev/null
@@ -1,40 +0,0 @@
-var Q = require('q'),
-    plugman = require('../plugman');
-
-describe('callback wrapper', function() {
-    var calls = ['install', 'uninstall', 'fetch', 'config', 'owner', 'adduser', 'publish', 'unpublish', 'search', 'info', 'create', 'platform'];
-    for (var i = 0; i < calls.length; i++) {
-        var call = calls[i];
-
-        describe('`' + call + '`', function() {
-            var raw;
-            beforeEach(function() {
-                raw = spyOn(plugman.raw, call);
-            });
-
-            it('should work with no callback and success', function() {
-                raw.andReturn(Q());
-                plugman[call]();
-                expect(raw).toHaveBeenCalled();
-            });
-
-            it('should call the callback on success', function(done) {
-                raw.andReturn(Q(1));
-                plugman[call](function(err) {
-                    expect(err).toBeUndefined();
-                    done();
-                });
-            });
-
-            it('should call the callback with the error on failure', function(done) {
-                var err = new Error('junk');
-                raw.andCallFake(function() { return Q.reject(err)});
-                plugman[call](function(err) {
-                    expect(err).toEqual(err);
-                    done();
-                });
-            });
-        });
-    }
-});
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/adduser.js
----------------------------------------------------------------------
diff --git a/src/adduser.js b/src/adduser.js
deleted file mode 100644
index b83a676..0000000
--- a/src/adduser.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var registry = require('./registry/registry')
-
-module.exports = function() {
-    return registry.adduser(null);
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/config.js
----------------------------------------------------------------------
diff --git a/src/config.js b/src/config.js
deleted file mode 100644
index e892425..0000000
--- a/src/config.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var registry = require('./registry/registry')
-
-module.exports = function(params) {
-    return registry.config(params)
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/create.js
----------------------------------------------------------------------
diff --git a/src/create.js b/src/create.js
deleted file mode 100644
index 7db67b7..0000000
--- a/src/create.js
+++ /dev/null
@@ -1,81 +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 Q = require('q'),
-    fs = require('fs'),
-    path = require('path'),
-    shell = require('shelljs'),
-    et = require('elementtree');
-
-module.exports = function create( name, id, version, pluginPath, options ) {
-    var cwd = pluginPath + "/" + name + "/",
-        docDir = path.join(__dirname, '..', 'doc/'),
-        baseJS,
-        root,
-        pluginName,
-        clobber,
-        jsMod,
-        pluginxml;
-
-    //check we are not already in a plugin
-    if( fs.existsSync( cwd + 'plugin.xml' ) ) {
-        return Q.reject( new Error( 'plugin.xml already exists. Are you already in a plugin?' ) );
-    }
-
-    //Create a plugin.xml file
-    root = et.Element( 'plugin' );
-    root.set( 'xmlns', 'http://apache.org/cordova/ns/plugins/1.0' );
-    root.set( 'xmlns:android', 'http://schemas.android.com/apk/res/android' );
-    root.set( 'id', id );
-    root.set( 'version', version );
-
-    //Add the name tag
-    pluginName = et.XML( "<name>" );
-    pluginName.text = name;
-    root.append( pluginName );
-
-    //loop through the options( variables ) for other tags
-    for( var key in options ) {
-        var temp = et.XML( "<" + key + ">");
-        temp.text = options[ key ];
-        root.append( temp );
-    }
-
-    //setup the directory structure
-    shell.mkdir( '-p', cwd + "www" );
-    shell.mkdir( '-p', cwd + "src" );
-
-    //create a base plugin.js file
-    baseJS = fs.readFileSync( docDir + 'base.js', 'utf-8').replace( /%pluginName%/g, name );
-    fs.writeFileSync( cwd + 'www/' + name + '.js', baseJS, 'utf-8' );
-    //Add it to the xml as a js module
-    jsMod = et.Element( 'js-module' );
-    jsMod.set( 'src', 'www/' + name + '.js' );
-    jsMod.set( 'name', name );
-
-    clobber = et.Element( 'clobbers' );
-    clobber.set( 'target', 'cordova.plugins.' + name );
-    jsMod.append( clobber );
-
-    root.append( jsMod );
-
-    //Write out the plugin.xml file
-    fs.writeFileSync( cwd + "plugin.xml", new et.ElementTree( root ).write( {indent: 4} ), 'utf-8' );
-
-    return Q();
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/events.js
----------------------------------------------------------------------
diff --git a/src/events.js b/src/events.js
deleted file mode 100644
index ed78839..0000000
--- a/src/events.js
+++ /dev/null
@@ -1,2 +0,0 @@
-
-module.exports = new (require('events').EventEmitter)();

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/fetch.js
----------------------------------------------------------------------
diff --git a/src/fetch.js b/src/fetch.js
deleted file mode 100644
index 9948b7f..0000000
--- a/src/fetch.js
+++ /dev/null
@@ -1,175 +0,0 @@
-var shell   = require('shelljs'),
-    fs      = require('fs'),
-    url     = require('url'),
-    plugins = require('./util/plugins'),
-    xml_helpers = require('./util/xml-helpers'),
-    events = require('./events'),
-    metadata = require('./util/metadata'),
-    path    = require('path'),
-    Q       = require('q'),
-    registry = require('./registry/registry');
-// XXX: leave the require('../plugman') because jasmine shits itself if you declare it up top
-// possible options: link, subdir, git_ref, client, expected_id
-// Returns a promise.
-module.exports = function fetchPlugin(plugin_src, plugins_dir, options) {
-    // Ensure the containing directory exists.
-    shell.mkdir('-p', plugins_dir);
-
-    options = options || {};
-    options.subdir = options.subdir || '.';
-    options.searchpath = options.searchpath || [];
-    if ( typeof options.searchpath === 'string' ) {
-        options.searchpath = options.searchpath.split(path.delimiter);
-    }
-
-    // clone from git repository
-    var uri = url.parse(plugin_src);
-
-    // If the hash exists, it has the form from npm: http://foo.com/bar#git-ref[:subdir]
-    // NB: No leading or trailing slash on the subdir.
-    if (uri.hash) {
-        var result = uri.hash.match(/^#([^:]*)(?::\/?(.*?)\/?)?$/);
-        if (result) {
-            if (result[1])
-                options.git_ref = result[1];
-            if(result[2])
-                options.subdir = result[2];
-
-            // Recurse and exit with the new options and truncated URL.
-            var new_dir = plugin_src.substring(0, plugin_src.indexOf('#'));
-            return fetchPlugin(new_dir, plugins_dir, options);
-        }
-    }
-
-    // If it looks like a network URL, git clone it.
-    if ( uri.protocol && uri.protocol != 'file:' && uri.protocol != 'c:' && !plugin_src.match(/^\w+:\\/)) {
-        events.emit('log', 'Fetching plugin "' + plugin_src + '" via git clone');
-        if (options.link) {
-            return Q.reject(new Error('--link is not supported for git URLs'));
-        } else {
-            var data = {
-                source: {
-                    type: 'git',
-                    url:  plugin_src,
-                    subdir: options.subdir,
-                    ref: options.git_ref
-                }
-            };
-
-            return plugins.clonePluginGit(plugin_src, plugins_dir, options)
-            .then(function(dir) {
-                return checkID(options.expected_id, dir);
-            })
-            .then(function(dir) {
-                metadata.save_fetch_metadata(dir, data);
-                return dir;
-            });
-        }
-    } else {
-        // If it's not a network URL, it's either a local path or a plugin ID.
-
-        var p,  // The Q promise to be returned.
-            linkable = true,
-            plugin_dir = path.join(plugin_src, options.subdir);
-
-        if (fs.existsSync(plugin_dir)) {
-            p = Q(plugin_dir);
-        } else {
-            // If there is no such local path, it's a plugin id.
-            // First look for it in the local search path (if provided).
-            var local_dir = findLocalPlugin(plugin_src, options.searchpath);
-            if (local_dir) {
-                p = Q(local_dir);
-                events.emit('verbose', 'Found ' + plugin_src + ' at ' + local_dir);
-            } else {
-                // If not found in local search path, fetch from the registry.
-                linkable = false;
-                events.emit('log', 'Fetching plugin "' + plugin_src + '" via plugin registry');
-                p = registry.fetch([plugin_src], options.client);
-            }
-        }
-
-        return p
-        .then(function(dir) {
-                options.plugin_src_dir = dir;
-
-                return copyPlugin(dir, plugins_dir, options.link && linkable);
-            })
-        .then(function(dir) {
-                return checkID(options.expected_id, dir);
-            });
-    }
-};
-
-function readId(dir) {
-    var xml_path = path.join(dir, 'plugin.xml');
-    var et = xml_helpers.parseElementtreeSync(path.join(dir, 'plugin.xml'));
-    var plugin_id = et.getroot().attrib.id;
-    return plugin_id;
-}
-
-// Helper function for checking expected plugin IDs against reality.
-function checkID(expected_id, dir) {
-    if ( expected_id ) {
-        var id = readId(dir);
-        if (expected_id != id) {
-            throw new Error('Expected fetched plugin to have ID "' + expected_id + '" but got "' + id + '".');
-        }
-    }
-    return dir;
-}
-
-var idCache = Object.create(null);
-// Look for plugin in local search path.
-function findLocalPlugin(plugin_id, searchpath) {
-    function tryPath(p) {
-        if (!(p in idCache)) {
-            var id = null;
-            if (fs.existsSync(path.join(p, 'plugin.xml'))) {
-                id = readId(p);
-            }
-            idCache[p] = id;
-        }
-        return (plugin_id === idCache[p]);
-    }
-
-    for (var i = 0; i < searchpath.length; i++) {
-        // Allow search path to point right to a plugin.
-        if (tryPath(searchpath[i])) {
-            return searchpath[i];
-        }
-        var files = fs.readdirSync(searchpath[i]);
-        for (var j = 0; j < files.length; j++) {
-            var pluginPath = path.join(searchpath[i], files[j]);
-            if (tryPath(pluginPath)) {
-                return pluginPath;
-            }
-        }
-    }
-    return null;
-}
-
-
-// Copy or link a plugin from plugin_dir to plugins_dir/plugin_id.
-function copyPlugin(plugin_dir, plugins_dir, link) {
-    var plugin_id = readId(plugin_dir);
-    var dest = path.join(plugins_dir, plugin_id);
-    shell.rm('-rf', dest);
-    if (link) {
-        events.emit('verbose', 'Linking plugin "' + plugin_dir + '" => "' + dest + '"');
-        fs.symlinkSync(plugin_dir, dest, 'dir');
-    } else {
-        shell.mkdir('-p', dest);
-        events.emit('verbose', 'Copying plugin "' + plugin_dir + '" => "' + dest + '"');
-        shell.cp('-R', path.join(plugin_dir, '*') , dest);
-    }
-
-    var data = {
-        source: {
-        type: 'local',
-              path: plugin_dir
-        }
-    };
-    metadata.save_fetch_metadata(dest, data);
-    return dest;
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/info.js
----------------------------------------------------------------------
diff --git a/src/info.js b/src/info.js
deleted file mode 100644
index 34c2af7..0000000
--- a/src/info.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var registry = require('./registry/registry')
-
-// Returns a promise.
-module.exports = function(plugin) {
-    return registry.info(plugin);
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/install.js
----------------------------------------------------------------------
diff --git a/src/install.js b/src/install.js
deleted file mode 100644
index cce145d..0000000
--- a/src/install.js
+++ /dev/null
@@ -1,629 +0,0 @@
-var path = require('path'),
-    fs   = require('fs'),
-    action_stack = require('./util/action-stack'),
-    dep_graph = require('dep-graph'),
-    elementtree = require('elementtree'),
-    child_process = require('child_process'),
-    semver = require('semver'),
-    config_changes = require('./util/config-changes'),
-    xml_helpers = require('./util/xml-helpers'),
-    Q = require('q'),
-    platform_modules = require('./platforms'),
-    os = require('os'),
-    underscore = require('underscore'),
-    shell   = require('shelljs'),
-    events = require('./events'),
-    plugman = require('../plugman'),
-    isWindows = (os.platform().substr(0,3) === 'win');
-
-/* INSTALL FLOW
-   ------------
-   There are four functions install "flows" through. Here is an attempt at
-   providing a high-level logic flow overview.
-   1. module.exports (installPlugin)
-     a) checks that the platform is supported
-     b) invokes possiblyFetch
-   2. possiblyFetch
-     a) checks that the plugin is fetched. if so, calls runInstall
-     b) if not, invokes plugman.fetch, and when done, calls runInstall
-   3. runInstall
-     a) checks if the plugin is already installed. if so, calls back (done).
-     b) if possible, will check the version of the project and make sure it is compatible with the plugin (checks <engine> tags)
-     c) makes sure that any variables required by the plugin are specified. if they are not specified, plugman will throw or callback with an error.
-     d) if dependencies are listed in the plugin, it will recurse for each dependent plugin and call possiblyFetch (2) on each one. When each dependent plugin is successfully installed, it will then proceed to call handleInstall (4)
-   4. handleInstall
-     a) queues up actions into a queue (asset, source-file, headers, etc)
-     b) processes the queue
-     c) calls back (done)
-*/
-
-// possible options: subdir, cli_variables, www_dir
-// Returns a promise.
-module.exports = function installPlugin(platform, project_dir, id, plugins_dir, options) {
-    options = options || {};
-    options.is_top_level = true;
-    plugins_dir = plugins_dir || path.join(project_dir, 'cordova', 'plugins');
-
-    if (!platform_modules[platform]) {
-        return Q.reject(new Error(platform + " not supported."));
-    }
-
-    var current_stack = new action_stack();
-
-    return possiblyFetch(id, plugins_dir, options)
-    .then(function(plugin_dir) {
-        return runInstall(current_stack, platform, project_dir, plugin_dir, plugins_dir, options);
-    });
-};
-
-// possible options: subdir, cli_variables, www_dir, git_ref, is_top_level
-// Returns a promise.
-function possiblyFetch(id, plugins_dir, options) {
-
-    // if plugin is a relative path, check if it already exists
-    var plugin_src_dir = path.join(plugins_dir, id);
-    if( isAbsolutePath(id) )
-        plugin_src_dir = id;
-
-    // Check that the plugin has already been fetched.
-    if (fs.existsSync(plugin_src_dir)) {
-        return Q(plugin_src_dir);
-    }
-
-    var opts = underscore.extend({}, options, {
-        link: false,
-        client: 'plugman'
-    });
-
-    // if plugin doesnt exist, use fetch to get it.
-    return plugman.raw.fetch(id, plugins_dir, opts);
-}
-
-function checkEngines(engines) {
-
-    for(var i = 0; i < engines.length; i++) {
-        var engine = engines[i];
-
-        if(semver.satisfies(engine.currentVersion, engine.minVersion) || engine.currentVersion === null){
-            // engine ok!
-        }else{
-            return Q.reject(new Error('Plugin doesn\'t support this project\'s '+engine.name+' version. '+engine.name+': ' + engine.currentVersion + ', failed version requirement: ' + engine.minVersion));
-        }
-    }
-
-    return Q(true);
-}
-
-function cleanVersionOutput(version, name){
-    var out = version.trim();
-    var rc_index = out.indexOf('rc');
-    var dev_index = out.indexOf('dev');
-    if (rc_index > -1) {
-        out = out.substr(0, rc_index) + '-' + out.substr(rc_index);
-    }
-
-    // put a warning about using the dev branch
-    if (dev_index > -1) {
-        // some platform still lists dev branches as just dev, set to null and continue
-        if(out=="dev"){
-            out = null;
-        }
-        events.emit('verbose', name+' has been detected as using a development branch. Attemping to install anyways.');
-    }
-
-    // add extra period/digits to conform to semver - some version scripts will output
-    // just a major or major minor version number
-    var majorReg = /\d+/,
-        minorReg = /\d+\.\d+/,
-        patchReg = /\d+\.\d+\.\d+/;
-
-    if(patchReg.test(out)){
-
-    }else if(minorReg.test(out)){
-        out = out.match(minorReg)[0]+'.0';
-    }else if(majorReg.test(out)){
-        out = out.match(majorReg)[0]+'.0.0';
-    }
-
-    return out;
-}
-
-// exec engine scripts in order to get the current engine version
-// Returns a promise for the array of engines.
-function callEngineScripts(engines) {
-    var engineScriptVersion;
-
-    return Q.all(
-        engines.map(function(engine){
-            // CB-5192; on Windows scriptSrc doesn't have file extension so we shouldn't check whether the script exists
-
-            var scriptPath = engine.scriptSrc ? '"' + engine.scriptSrc + '"' : null;
-
-            if(scriptPath && (isWindows || fs.existsSync(engine.scriptSrc)) ) {
-
-                var d = Q.defer();
-                if(!isWindows) { // not required on Windows
-                    fs.chmodSync(engine.scriptSrc, '755');
-                }
-                child_process.exec(scriptPath, function(error, stdout, stderr) {
-                    if (error) {
-                        events.emit('warn', engine.name +' version check failed ('+ scriptPath +'), continuing anyways.');
-                        engine.currentVersion = null;
-                    } else {
-                        engine.currentVersion = cleanVersionOutput(stdout, engine.name);
-                    }
-
-                    d.resolve(engine);
-                });
-                return d.promise;
-
-            } else {
-
-                if(engine.currentVersion) {
-                    engine.currentVersion = cleanVersionOutput(engine.currentVersion, engine.name)
-                } else {
-                    events.emit('warn', engine.name +' version not detected (lacks script '+ scriptPath +' ), continuing.');
-                }
-
-                return Q(engine);
-            }
-        })
-    );
-}
-
-// return only the engines we care about/need
-function getEngines(pluginElement, platform, project_dir, plugin_dir){
-    var engines = pluginElement.findall('engines/engine');
-    var defaultEngines = require('./util/default-engines')(project_dir);
-    var uncheckedEngines = [];
-    var cordovaEngineIndex, cordovaPlatformEngineIndex, theName, platformIndex, defaultPlatformIndex;
-    // load in known defaults and update when necessary
-
-    engines.forEach(function(engine){
-        theName = engine.attrib["name"];
-
-        // check to see if the engine is listed as a default engine
-        if(defaultEngines[theName]){
-            // make sure engine is for platform we are installing on
-            defaultPlatformIndex = defaultEngines[theName].platform.indexOf(platform);
-            if(defaultPlatformIndex > -1 || defaultEngines[theName].platform === '*'){
-                defaultEngines[theName].minVersion = defaultEngines[theName].minVersion ? defaultEngines[theName].minVersion : engine.attrib["version"];
-                defaultEngines[theName].currentVersion = defaultEngines[theName].currentVersion ? defaultEngines[theName].currentVersion : null;
-                defaultEngines[theName].scriptSrc = defaultEngines[theName].scriptSrc ? defaultEngines[theName].scriptSrc : null;
-                defaultEngines[theName].name = theName;
-
-                // set the indices so we can pop the cordova engine when needed
-                if(theName==='cordova') cordovaEngineIndex = uncheckedEngines.length;
-                if(theName==='cordova-'+platform) cordovaPlatformEngineIndex = uncheckedEngines.length;
-
-                uncheckedEngines.push(defaultEngines[theName]);
-            }
-        // check for other engines
-        }else{
-            platformIndex = engine.attrib["platform"].indexOf(platform);
-            if(platformIndex > -1 || engine.attrib["platform"] === '*'){
-                uncheckedEngines.push({ 'name': theName, 'platform': engine.attrib["platform"], 'scriptSrc':path.resolve(plugin_dir, engine.attrib["scriptSrc"]), 'minVersion' :  engine.attrib["version"]});
-            }
-        }
-    });
-
-    // make sure we check for platform req's and not just cordova reqs
-    if(cordovaEngineIndex && cordovaPlatformEngineIndex) uncheckedEngines.pop(cordovaEngineIndex);
-    return uncheckedEngines;
-}
-
-
-function isPluginInstalled(plugins_dir, platform, plugin_id) {
-    var platform_config = config_changes.get_platform_json(plugins_dir, platform);
-    for (var installed_plugin_id in platform_config.installed_plugins) {
-        if (installed_plugin_id == plugin_id) {
-            return true;
-        }
-    }
-    for (var installed_plugin_id in platform_config.dependent_plugins) {
-        if (installed_plugin_id == plugin_id) {
-            return true;
-        }
-    }
-    return false;
-}
-
-// possible options: cli_variables, www_dir, is_top_level
-// Returns a promise.
-var runInstall = module.exports.runInstall = function runInstall(actions, platform, project_dir, plugin_dir, plugins_dir, options) {
-    var xml_path     = path.join(plugin_dir, 'plugin.xml')
-      , plugin_et    = xml_helpers.parseElementtreeSync(xml_path)
-      , filtered_variables = {};
-    var name         = plugin_et.findall('name').text;
-    var plugin_id    = plugin_et.getroot().attrib['id'];
-
-    options = options || {};
-    options.graph = options.graph || new dep_graph();
-
-    if (isPluginInstalled(plugins_dir, platform, plugin_id)) {
-        if (options.is_top_level) {
-            events.emit('results', 'Plugin "' + plugin_id + '" already installed on ' + platform + '.');
-        } else {
-            events.emit('verbose', 'Dependent plugin "' + plugin_id + '" already installed on ' + platform + '.');
-        }
-        return Q();
-    }
-    events.emit('log', 'Installing "' + plugin_id + '" for ' + platform);
-
-    var theEngines = getEngines(plugin_et, platform, project_dir, plugin_dir);
-
-    var install = {
-        actions: actions,
-        platform: platform,
-        project_dir: project_dir,
-        plugins_dir: plugins_dir,
-        top_plugin_id: plugin_id,
-        top_plugin_dir: plugin_dir
-    }
-
-    return callEngineScripts(theEngines)
-    .then(checkEngines)
-    .then(
-        function() {
-            // checking preferences, if certain variables are not provided, we should throw.
-            var prefs = plugin_et.findall('./preference') || [];
-            prefs = prefs.concat(plugin_et.findall('./platform[@name="'+platform+'"]/preference'));
-            var missing_vars = [];
-            prefs.forEach(function (pref) {
-                var key = pref.attrib["name"].toUpperCase();
-                options.cli_variables = options.cli_variables || {};
-                if (options.cli_variables[key] === undefined)
-                    missing_vars.push(key)
-                else
-                    filtered_variables[key] = options.cli_variables[key]
-            });
-            install.filtered_variables = filtered_variables;
-
-            if (missing_vars.length > 0) {
-                throw new Error('Variable(s) missing: ' + missing_vars.join(", "));
-            }
-
-            // Check for dependencies
-            var dependencies = plugin_et.findall('dependency') || [];
-            dependencies = dependencies.concat(plugin_et.findall('./platform[@name="'+platform+'"]/dependency'));
-            if(dependencies && dependencies.length) {
-                return installDependencies(install, dependencies, options);
-            }
-            return Q(true);
-        }
-    ).then(
-        function(){
-            var install_plugin_dir = path.join(plugins_dir, plugin_id);
-
-            // may need to copy to destination...
-            if ( !fs.existsSync(install_plugin_dir) ) {
-                copyPlugin(plugin_dir, plugins_dir, options.link);
-            }
-
-            return handleInstall(actions, plugin_id, plugin_et, platform, project_dir, plugins_dir, install_plugin_dir, filtered_variables, options.www_dir, options.is_top_level);
-        }
-    ).fail(
-        function (error) {
-            events.emit('warn', "Failed to install '"+plugin_id+"':"+ error.stack);
-            throw error;
-        }
-    );
-}
-
-function installDependencies(install, dependencies, options) {
-    events.emit('verbose', 'Dependencies detected, iterating through them...');
-
-    var top_plugins = path.join(options.plugin_src_dir || install.top_plugin_dir, '..')
-
-    // Add directory of top-level plugin to search path
-    options.searchpath = options.searchpath || [];
-    if( top_plugins != install.plugins_dir && options.searchpath.indexOf(top_plugins) == -1 )
-        options.searchpath.push(top_plugins);
-
-    // Search for dependency by Id is:
-    // a) Look for {$top_plugins}/{$depId} directory
-    // b) Scan the top level plugin directory {$top_plugins} for matching id (searchpath)
-    // c) Fetch from registry
-
-    return dependencies.reduce(function(soFar, depXml) {
-        return soFar.then(
-            function() {
-                var dep = {
-                    id: depXml.attrib.id,
-                    subdir: depXml.attrib.subdir || '',
-                    url: depXml.attrib.url || '',
-                    git_ref: depXml.attrib.commit
-                }
-
-                if (dep.subdir.length) {
-                    dep.subdir = path.normalize(dep.subdir);
-                }
-
-                if (!dep.id) {
-                    throw new Error('<dependency> tag is missing id attribute: ' + elementtree.tostring(depXml, {xml_declaration:false}));
-                }
-
-                // We build the dependency graph only to be able to detect cycles, getChain will throw an error if it detects one
-                options.graph.add(install.top_plugin_id, dep.id);
-                options.graph.getChain(install.top_plugin_id);
-
-                return tryFetchDependency(dep, install, options)
-                .then(
-                    function(url){
-                        dep.url = url;
-                        return installDependency(dep, install, options);
-                    }
-                );
-            }
-        );
-
-    }, Q(true));
-}
-
-function tryFetchDependency(dep, install, options) {
-
-    // Handle relative dependency paths by expanding and resolving them.
-    // The easy case of relative paths is to have a URL of '.' and a different subdir.
-    // TODO: Implement the hard case of different repo URLs, rather than the special case of
-    // same-repo-different-subdir.
-    if ( dep.url == '.' ) {
-
-        // Look up the parent plugin's fetch metadata and determine the correct URL.
-        var fetchdata = require('./util/metadata').get_fetch_metadata(install.top_plugin_dir);
-        if (!fetchdata || !(fetchdata.source && fetchdata.source.type)) {
-
-            var relativePath = dep.subdir || dep.id;
-
-            events.emit('warn', 'No fetch metadata found for plugin ' + install.top_plugin_id + '. checking for ' + relativePath + ' in '+ options.searchpath.join(','));
-
-            return Q(relativePath);
-        }
-
-        // Now there are two cases here: local directory, and git URL.
-        var d = Q.defer();
-
-        if (fetchdata.source.type === 'local') {
-
-            dep.url = fetchdata.source.path;
-
-            child_process.exec('git rev-parse --show-toplevel', { cwd:dep.url }, function(err, stdout, stderr) {
-                if (err) {
-                    if (err.code == 128) {
-                        return d.reject(new Error('Plugin ' + dep.id + ' is not in git repository. All plugins must be in a git repository.'));
-                    } else {
-                        return d.reject(new Error('Failed to locate git repository for ' + dep.id + ' plugin.'));
-                    }
-                }
-                return d.resolve(stdout.trim());
-            });
-
-            return d.promise.then(function(git_repo) {
-                //Clear out the subdir since the url now contains it
-                var url = path.join(git_repo, dep.subdir);
-                dep.subdir = "";
-                return Q(url);
-            }).fail(function(error){
-//console.log("Failed to resolve url='.': " + error);
-                return Q(dep.url);
-            });
-
-        } else if (fetchdata.source.type === 'git') {
-            return Q(fetchdata.source.url);
-        } else if (fetchdata.source.type === 'dir') {
-
-            // Note: With fetch() independant from install()
-            // $md5 = md5(uri)
-            // Need a Hash(uri) --> $tmpDir/cordova-fetch/git-hostname.com-$md5/
-            // plugin[id].install.source --> searchpath that matches fetch uri
-
-            // mapping to a directory of OS containing fetched plugins
-            var tmpDir = fetchdata.source.url;
-            tmpDir = tmpDir.replace('$tmpDir', os.tmpdir());
-
-            var pluginSrc = '';
-            if(dep.subdir.length) {
-                // Plugin is relative to directory
-                pluginSrc = path.join(tmpDir, dep.subdir);
-            }
-
-            // Try searchpath in dir, if that fails re-fetch
-            if( !pluginSrc.length || !fs.existsSync(pluginSrc) ) {
-                pluginSrc = dep.id;
-
-                // Add search path
-                if( options.searchpath.indexOf(tmpDir) == -1 )
-                    options.searchpath.unshift(tmpDir); // place at top of search
-            }
-
-            return Q( pluginSrc );
-        }
-    }
-
-    // Test relative to parent folder
-    if( dep.url && isRelativePath(dep.url) ) {
-        var relativePath = path.resolve(install.top_plugin_dir, '../' + dep.url);
-
-        if( fs.existsSync(relativePath) ) {
-           dep.url = relativePath;
-        }
-    }
-
-    // CB-4770: registry fetching
-    if(dep.url === undefined) {
-        dep.url = dep.id;
-    }
-
-    return Q(dep.url);
-}
-
-function installDependency(dep, install, options) {
-
-    dep.install_dir = path.join(install.plugins_dir, dep.id);
-
-    if ( fs.existsSync(dep.install_dir) ) {
-        events.emit('verbose', 'Dependent plugin "' + dep.id + '" already fetched, using that version.');
-        var opts = underscore.extend({}, options, {
-            cli_variables: install.filtered_variables,
-            is_top_level: false
-        });
-
-       return runInstall(install.actions, install.platform, install.project_dir, dep.install_dir, install.plugins_dir, opts);
-
-    } else {
-        events.emit('verbose', 'Dependent plugin "' + dep.id + '" not fetched, retrieving then installing.');
-
-        var opts = underscore.extend({}, options, {
-            cli_variables: install.filtered_variables,
-            is_top_level: false,
-            subdir: dep.subdir,
-            git_ref: dep.git_ref,
-            expected_id: dep.id
-        });
-
-        var dep_src = dep.url.length ? dep.url : dep.id;
-
-        return possiblyFetch(dep_src, install.plugins_dir, opts)
-        .then(
-            function(plugin_dir) {
-                return runInstall(install.actions, install.platform, install.project_dir, plugin_dir, install.plugins_dir, opts);
-            }
-        );
-    };
-}
-
-function handleInstall(actions, plugin_id, plugin_et, platform, project_dir, plugins_dir, plugin_dir, filtered_variables, www_dir, is_top_level) {
-
-    // @tests - important this event is checked spec/install.spec.js
-    events.emit('verbose', 'Install start for "' + plugin_id + '" on ' + platform + '.');
-
-    var handler = platform_modules[platform];
-    www_dir = www_dir || handler.www_dir(project_dir);
-
-    var platformTag = plugin_et.find('./platform[@name="'+platform+'"]');
-    var assets = plugin_et.findall('asset');
-    if (platformTag) {
-
-
-        var sourceFiles = platformTag.findall('./source-file'),
-            headerFiles = platformTag.findall('./header-file'),
-            resourceFiles = platformTag.findall('./resource-file'),
-            frameworkFiles = platformTag.findall('./framework[@custom="true"]'), // CB-5238 adding only custom frameworks
-            libFiles = platformTag.findall('./lib-file'),
-            assets = assets.concat(platformTag.findall('./asset'));
-
-        // queue up native stuff
-        sourceFiles && sourceFiles.forEach(function(item) {
-            actions.push(actions.createAction(handler["source-file"].install,
-                                              [item, plugin_dir, project_dir, plugin_id],
-                                              handler["source-file"].uninstall,
-                                              [item, project_dir, plugin_id]));
-        });
-
-        headerFiles && headerFiles.forEach(function(item) {
-            actions.push(actions.createAction(handler["header-file"].install,
-                                             [item, plugin_dir, project_dir, plugin_id],
-                                             handler["header-file"].uninstall,
-                                             [item, project_dir, plugin_id]));
-        });
-
-        resourceFiles && resourceFiles.forEach(function(item) {
-            actions.push(actions.createAction(handler["resource-file"].install,
-                                              [item, plugin_dir, project_dir, plugin_id],
-                                              handler["resource-file"].uninstall,
-                                              [item, project_dir, plugin_id]));
-        });
-        // CB-5238 custom frameworks only
-        frameworkFiles && frameworkFiles.forEach(function(item) {
-            actions.push(actions.createAction(handler["framework"].install,
-                                             [item, plugin_dir, project_dir, plugin_id],
-                                             handler["framework"].uninstall,
-                                             [item, project_dir, plugin_id]));
-        });
-
-        libFiles && libFiles.forEach(function(item) {
-            actions.push(actions.createAction(handler["lib-file"].install,
-                                                [item, plugin_dir, project_dir, plugin_id],
-                                                handler["lib-file"].uninstall,
-                                                [item, project_dir, plugin_id]));
-
-        });
-    }
-
-    // run through the action stack
-    return actions.process(platform, project_dir)
-    .then(function(err) {
-        // queue up the plugin so prepare knows what to do.
-        config_changes.add_installed_plugin_to_prepare_queue(plugins_dir, plugin_id, platform, filtered_variables, is_top_level);
-        // call prepare after a successful install
-        plugman.prepare(project_dir, platform, plugins_dir, www_dir);
-
-        events.emit('verbose', 'Install complete for ' + plugin_id + ' on ' + platform + '.');
-        // WIN!
-        // Log out plugin INFO element contents in case additional install steps are necessary
-        var info = plugin_et.findall('./info');
-        if(info.length) {
-            events.emit('results', interp_vars(filtered_variables, info[0].text));
-        }
-        info = (platformTag ? platformTag.findall('./info') : []);
-        if(info.length) {
-            events.emit('results', interp_vars(filtered_variables, info[0].text));
-        }
-    });
-}
-
-function interp_vars(vars, text) {
-    vars && Object.keys(vars).forEach(function(key) {
-        var regExp = new RegExp("\\$" + key, "g");
-        text = text.replace(regExp, vars[key]);
-    });
-    return text;
-}
-
-function isAbsolutePath(path) {
-    return path && (path[0] === '/' || path[0] === '\\' || path.indexOf(':\\') > 0 );
-}
-
-function isRelativePath(path) {
-    return !isAbsolutePath();
-}
-
-function readId(plugin_dir) {
-    var xml_path = path.join(plugin_dir, 'plugin.xml');
-    events.emit('verbose', 'Fetch is reading plugin.xml from location "' + xml_path + '"...');
-    var et = xml_helpers.parseElementtreeSync(xml_path);
-
-    return et.getroot().attrib.id;
-}
-
-// Copy or link a plugin from plugin_dir to plugins_dir/plugin_id.
-function copyPlugin(plugin_src_dir, plugins_dir, link) {
-    var plugin_id = readId(plugin_src_dir);
-    var dest = path.join(plugins_dir, plugin_id);
-    shell.rm('-rf', dest);
-
-    if (link) {
-        events.emit('verbose', 'Symlinking from location "' + plugin_src_dir + '" to location "' + dest + '"');
-        fs.symlinkSync(plugin_src_dir, dest, 'dir');
-    } else {
-        shell.mkdir('-p', dest);
-        events.emit('verbose', 'Copying from location "' + plugin_src_dir + '" to location "' + dest + '"');
-        shell.cp('-R', path.join(plugin_src_dir, '*') , dest);
-    }
-
-    return dest;
-}
-
-function isPluginInstalled(plugins_dir, platform, plugin_id) {
-    var platform_config = config_changes.get_platform_json(plugins_dir, platform);
-    for (var installed_plugin_id in platform_config.installed_plugins) {
-        if (installed_plugin_id == plugin_id) {
-            return true;
-        }
-    }
-    for (var installed_plugin_id in platform_config.dependent_plugins) {
-        if (installed_plugin_id == plugin_id) {
-            return true;
-        }
-    }
-    return false;
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/owner.js
----------------------------------------------------------------------
diff --git a/src/owner.js b/src/owner.js
deleted file mode 100644
index 9eaf152..0000000
--- a/src/owner.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var registry = require('./registry/registry');
-
-// Returns a promise.
-module.exports = function(args) {
-    return registry.owner(args);
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/platform.js
----------------------------------------------------------------------
diff --git a/src/platform.js b/src/platform.js
deleted file mode 100644
index c80ac75..0000000
--- a/src/platform.js
+++ /dev/null
@@ -1,119 +0,0 @@
-var Q = require('q'),
-    et = require('elementtree'),
-    fs = require('fs'),
-    shell = require('shelljs'),
-    path = require('path');
-
-module.exports = {
-    add: function( platformName ) {
-        var pluginxml,
-            platform;
-
-        //check to make sure we are in the plugin first
-        if( !fs.existsSync( 'plugin.xml' ) ) {
-            return Q.reject( new Error( "can't find a plugin.xml.  Are you in the plugin?" ) );
-        }
-
-        //Get the current plugin.xml file
-        pluginxml = et.parse( fs.readFileSync('plugin.xml', 'utf-8') );
-
-        //Check if this platform exists
-        if( pluginxml.find("./platform/[@name='"+ platformName +"']") ) {
-            return Q.reject( new Error( "platform: " + platformName + " already added"  ) );
-        }
-
-        //Get the platform specific elements
-        platform = doPlatform( platformName, pluginxml.find("./name").text, pluginxml.getroot().get( "id" ) );
-
-        //Make sure we support it
-        if( !platform ) {
-            return Q.reject( new Error( "platform: " + platformName + " not yet supported"  ) );
-        }
-
-        pluginxml.getroot().append( platform.getroot() );
-
-        fs.writeFileSync( "plugin.xml", pluginxml.write( "plugin.xml", {indent: 4} ), 'utf-8' );
-        return Q();
-    },
-    remove: function( platformName ) {
-        //check to make sure we are in the plugin first
-        if( !fs.existsSync( 'plugin.xml' ) ) {
-            return Q.reject( new Error( "can't find a plugin.xml.  Are you in the plugin?" ) );
-        }
-
-        //Get the current plugin.xml file
-        pluginxml = et.parse( fs.readFileSync('plugin.xml', 'utf-8') );
-
-        //Check if this platform exists
-        if( !pluginxml.find("./platform/[@name='"+ platformName +"']") ) {
-            return Q.reject( new Error( "platform: " + platformName + " hasn't been added"  ) );
-        }
-
-        //Remove the Platform in question
-        pluginxml.getroot().remove( 0, pluginxml.find("./platform/[@name='"+ platformName +"']") );
-
-        //Rewrite the plugin.xml file back out
-        fs.writeFileSync( "plugin.xml", pluginxml.write( "plugin.xml", {indent: 4} ), 'utf-8' );
-
-        //Remove the src/"platform"
-        shell.rm( '-rf', 'src/' + platformName );
-
-        return Q();
-    }
-};
-
-function doPlatform( platformName, pluginName, pluginID, pluginVersion ) {
-    var docDir = path.join(__dirname, '..', 'doc/platforms/' + platformName + "/"),
-        platformFile = docDir + platformName + ".xml",
-        platform;
-
-    if( !fs.existsSync( platformFile ) ) {
-        return false;
-    }
-
-    platform = fs.readFileSync( platformFile, 'utf-8' )
-                .replace( /%pluginName%/g, pluginName )
-                .replace( /%pluginID%/g, pluginID )
-                .replace( /%packageName%/g, pluginID.replace( /[.]/g, '/' ) );
-    platform = new et.ElementTree( et.XML( platform ) );
-
-    doPlatformBase( docDir, platformName, pluginName, pluginID, pluginVersion );
-
-    return platform;
-}
-
-function doPlatformBase( docDir, platformName, pluginName, pluginID, pluginVersion ) {
-    //Create the default plugin file
-    var baseFiles = [],
-        i = 0;
-
-    switch( platformName ) {
-    case 'android':
-        baseFiles.push (
-            {
-                file: fs.readFileSync( docDir + "base.java", "utf-8" )
-                    .replace( /%pluginName%/g, pluginName )
-                    .replace( /%pluginID%/g, pluginID ),
-                extension: "java"
-            }
-        );
-
-        break;
-    case 'ios':
-        baseFiles.push(
-            {
-                file: fs.readFileSync( docDir + "base.m", "utf-8" )
-                    .replace( /%pluginName%/g, pluginName ),
-                extension: "m"
-            }
-        );
-        break;
-    }
-
-    shell.mkdir( '-p', 'src/' + platformName );
-
-    for( i; i < baseFiles.length; i++ ) {
-        fs.writeFileSync( 'src/' + platformName + '/' + pluginName + '.' + baseFiles[ i ].extension, baseFiles[ i ].file, 'utf-8' );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/platform_operation.js
----------------------------------------------------------------------
diff --git a/src/platform_operation.js b/src/platform_operation.js
deleted file mode 100644
index e17f5db..0000000
--- a/src/platform_operation.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var platform = require('./platform');
-
-module.exports = function( args ) {
-    return platform[ args.operation ]( args.platform_name );
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/platforms.js
----------------------------------------------------------------------
diff --git a/src/platforms.js b/src/platforms.js
deleted file mode 100644
index a2ad634..0000000
--- a/src/platforms.js
+++ /dev/null
@@ -1,12 +0,0 @@
-module.exports = {
-    'android': require('./platforms/android'),
-    'amazon-fireos': require('./platforms/amazon-fireos'),
-    'ios': require('./platforms/ios'),
-    'blackberry10': require('./platforms/blackberry10'),
-    'wp7': require('./platforms/wp7'),
-    'wp8': require('./platforms/wp8'),
-    'windows8' : require('./platforms/windows8'),
-    'firefoxos': require('./platforms/firefoxos'),
-    'ubuntu': require('./platforms/ubuntu'),
-    'tizen': require('./platforms/tizen')
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/platforms/amazon-fireos.js
----------------------------------------------------------------------
diff --git a/src/platforms/amazon-fireos.js b/src/platforms/amazon-fireos.js
deleted file mode 100644
index adfc847..0000000
--- a/src/platforms/amazon-fireos.js
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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 fs = require('fs')  // use existsSync in 0.6.x
-   , path = require('path')
-   , common = require('./common')
-   , events = require('../events')
-   , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
-
-module.exports = {
-    www_dir:function(project_dir) {
-        return path.join(project_dir, 'assets', 'www');
-    },
-    // reads the package name out of the Android Manifest file
-    // @param string project_dir the absolute path to the directory containing the project
-    // @return string the name of the package
-    package_name:function (project_dir) {
-        var mDoc = xml_helpers.parseElementtreeSync(path.join(project_dir, 'AndroidManifest.xml'));
-
-        return mDoc._root.attrib['package'];
-    },
-    "source-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
-            common.copyFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
-            common.deleteJava(project_dir, dest);
-        }
-    },
-    "header-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'header-fileinstall is not supported for amazon-fireos');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'header-file.uninstall is not supported for amazon-fireos');
-        }
-    },
-    "lib-file":{
-        install:function(lib_el, plugin_dir, project_dir, plugin_id) {
-            var src = lib_el.attrib.src;
-            var dest = path.join("libs", path.basename(src));
-            common.copyFile(plugin_dir, src, project_dir, dest);
-        },
-        uninstall:function(lib_el, project_dir, plugin_id) {
-            var src = lib_el.attrib.src;
-            var dest = path.join("libs", path.basename(src));
-            common.removeFile(project_dir, dest);
-        }
-    },
-    "resource-file":{
-        install:function(el, plugin_dir, project_dir, plugin_id) {
-            var src = el.attrib.src;
-            var target = el.attrib.target;
-            events.emit('verbose', 'Copying resource file ' + src + ' to ' + target);
-            common.copyFile(plugin_dir, src, project_dir, target);
-        },
-        uninstall:function(el, project_dir, plugin_id) {
-            var target = el.attrib.target;
-            common.removeFile(project_dir, target);
-        }
-    },
-    "framework": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.install is not supported for amazon-fireos');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.uninstall is not supported for amazon-fireos');
-        }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/platforms/android.js
----------------------------------------------------------------------
diff --git a/src/platforms/android.js b/src/platforms/android.js
deleted file mode 100644
index c323790..0000000
--- a/src/platforms/android.js
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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 fs = require('fs')  // use existsSync in 0.6.x
-   , path = require('path')
-   , common = require('./common')
-   , events = require('../events')
-   , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
-
-module.exports = {
-    www_dir:function(project_dir) {
-        return path.join(project_dir, 'assets', 'www');
-    },
-    // reads the package name out of the Android Manifest file
-    // @param string project_dir the absolute path to the directory containing the project
-    // @return string the name of the package
-    package_name:function (project_dir) {
-        var mDoc = xml_helpers.parseElementtreeSync(path.join(project_dir, 'AndroidManifest.xml'));
-
-        return mDoc._root.attrib['package'];
-    },
-    "source-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
-
-            common.copyNewFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
-            common.deleteJava(project_dir, dest);
-        }
-    },
-    "header-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'header-file.install is not supported for android');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'header-file.uninstall is not supported for android');
-        }
-    },
-    "lib-file":{
-        install:function(lib_el, plugin_dir, project_dir, plugin_id) {
-            var src = lib_el.attrib.src;
-            var dest = path.join("libs", path.basename(src));
-            common.copyFile(plugin_dir, src, project_dir, dest);
-        },
-        uninstall:function(lib_el, project_dir, plugin_id) {
-            var src = lib_el.attrib.src;
-            var dest = path.join("libs", path.basename(src));
-            common.removeFile(project_dir, dest);
-        }
-    },
-    "resource-file":{
-        install:function(el, plugin_dir, project_dir, plugin_id) {
-            var src = el.attrib.src;
-            var target = el.attrib.target;
-            events.emit('verbose', 'Copying resource file ' + src + ' to ' + target);
-            common.copyFile(plugin_dir, src, project_dir, path.normalize(target));
-        },
-        uninstall:function(el, project_dir, plugin_id) {
-            var target = el.attrib.target;
-            common.removeFile(project_dir, path.normalize(target));
-        }
-    },
-    "framework": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.install is not supported for android');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.uninstall is not supported for android');
-        }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/platforms/blackberry10.js
----------------------------------------------------------------------
diff --git a/src/platforms/blackberry10.js b/src/platforms/blackberry10.js
deleted file mode 100644
index 9e370b6..0000000
--- a/src/platforms/blackberry10.js
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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 fs = require('fs')  // use existsSync in 0.6.x
-   , path = require('path')
-   , common = require('./common')
-   , events = require('../events')
-   , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
-
-var TARGETS = ["device", "simulator"];
-
-module.exports = {
-    www_dir:function(project_dir) {
-        return path.join(project_dir, 'www');
-    },
-    package_name:function(project_dir) {
-        var config_path = path.join(module.exports.www_dir(project_dir), 'config.xml');
-        var widget_doc = xml_helpers.parseElementtreeSync(config_path);
-        return widget_doc._root.attrib['id'];
-    },
-    "source-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            var src = source_el.attrib['src'];
-            var target = source_el.attrib['target-dir'] || plugin_id;
-            TARGETS.forEach(function(arch) {
-                var dest = path.join("native", arch, "chrome", "plugin", target, path.basename(src));
-
-                common.copyNewFile(plugin_dir, src, project_dir, dest);
-            });
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            var src = source_el.attrib['src'];
-            var target = source_el.attrib['target-dir'] || plugin_id;
-            TARGETS.forEach(function(arch) {
-                var dest = path.join("native", arch, "chrome", "plugin", target, path.basename(src));
-                common.removeFile(project_dir, dest);
-            });
-        }
-    },
-    "header-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'header-file.install is not supported for blackberry');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'header-file.uninstall is not supported for blackberry');
-        }
-    },
-    "lib-file":{
-        install:function(lib_el, plugin_dir, project_dir, plugin_id) {
-            var src = lib_el.attrib.src;
-            var arch = lib_el.attrib.arch;
-            var dest = path.join("native", arch, "plugins", "jnext", path.basename(src));
-            common.copyFile(plugin_dir, src, project_dir, dest);
-        },
-        uninstall:function(lib_el, project_dir, plugin_id) {
-            var src = lib_el.attrib.src;
-            var arch = lib_el.attrib.arch;
-            var dest = path.join("native", arch, "plugins", "jnext", path.basename(src));
-            common.removeFile(project_dir, dest);
-        }
-    },
-    "resource-file":{
-        install:function(el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'resource-file.install is not supported for blackberry');
-        },
-        uninstall:function(el, project_dir, plugin_id) {
-            events.emit('verbose', 'resource-file.uninstall is not supported for blackberry');
-        }
-    },
-    "framework": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.install is not supported for blackberry');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.uninstall is not supported for blackberry');
-        }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/platforms/common.js
----------------------------------------------------------------------
diff --git a/src/platforms/common.js b/src/platforms/common.js
deleted file mode 100644
index 399da00..0000000
--- a/src/platforms/common.js
+++ /dev/null
@@ -1,94 +0,0 @@
-var shell = require('shelljs'),
-    path  = require('path'),
-    fs    = require('fs'),
-    common;
-
-module.exports = common = {
-    // helper for resolving source paths from plugin.xml
-    resolveSrcPath:function(plugin_dir, relative_path) {
-        var full_path = path.resolve(plugin_dir, relative_path);
-        return full_path;
-    },
-    // helper for resolving target paths from plugin.xml into a cordova project
-    resolveTargetPath:function(project_dir, relative_path) {
-        var full_path = path.resolve(project_dir, relative_path);
-        return full_path;
-    },
-    // Many times we simply need to copy shit over, knowing if a source path doesnt exist or if a target path already exists
-    copyFile:function(plugin_dir, src, project_dir, dest) {
-        src = module.exports.resolveSrcPath(plugin_dir, src);
-        if (!fs.existsSync(src)) throw new Error('"' + src + '" not found!');
-        dest = module.exports.resolveTargetPath(project_dir, dest);
-        shell.mkdir('-p', path.dirname(dest));
-
-        // XXX shelljs decides to create a directory when -R|-r is used which sucks. http://goo.gl/nbsjq
-        if(fs.statSync(src).isDirectory()) {
-            shell.cp('-Rf', src+'/*', dest);
-        } else {
-            shell.cp('-f', src, dest);
-        }
-    },
-    // Same as copy file but throws error if target exists
-    copyNewFile:function(plugin_dir, src, project_dir, dest) {
-        var target_path = common.resolveTargetPath(project_dir, dest);
-        if (fs.existsSync(target_path))
-            throw new Error('"' + target_path + '" already exists!');
-
-        common.copyFile(plugin_dir, src, project_dir, dest);
-    },
-    // checks if file exists and then deletes. Error if doesn't exist
-    removeFile:function(project_dir, src) {
-        var file = module.exports.resolveSrcPath(project_dir, src);
-        shell.rm('-Rf', file);
-    },
-    // deletes file/directory without checking
-    removeFileF:function(file) {
-        shell.rm('-Rf', file);
-    },
-    // Sometimes we want to remove some java, and prune any unnecessary empty directories
-    deleteJava:function(project_dir, destFile) {
-        var file = path.resolve(project_dir, destFile);
-        if (!fs.existsSync(file)) return;
-
-        common.removeFileF(file);
-
-        // check if directory is empty
-        var curDir = path.dirname(file);
-
-        while(curDir !== path.resolve(project_dir, 'src')) {
-            if(fs.existsSync(curDir) && fs.readdirSync(curDir) == 0) {
-                fs.rmdirSync(curDir);
-                curDir = path.resolve(curDir, '..');
-            } else {
-                // directory not empty...do nothing
-                break;
-            }
-        }
-    },
-    // handle <asset> elements
-    asset:{
-        install:function(asset_el, plugin_dir, www_dir) {
-            var src = asset_el.attrib.src;
-            var target = asset_el.attrib.target;
-
-            if (!src) {
-                throw new Error('<asset> tag without required "src" attribute');
-            }
-            if (!target) {
-                throw new Error('<asset> tag without required "target" attribute');
-            }
-
-            common.copyFile(plugin_dir, src, www_dir, target);
-        },
-        uninstall:function(asset_el, www_dir, plugin_id) {
-            var target = asset_el.attrib.target || asset_el.attrib.src;
-
-            if (!target) {
-                throw new Error('<asset> tag without required "target" attribute');
-            }
-
-            common.removeFile(www_dir, target);
-            common.removeFileF(path.resolve(www_dir, 'plugins', plugin_id));
-        }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/platforms/firefoxos.js
----------------------------------------------------------------------
diff --git a/src/platforms/firefoxos.js b/src/platforms/firefoxos.js
deleted file mode 100644
index efbeba9..0000000
--- a/src/platforms/firefoxos.js
+++ /dev/null
@@ -1,72 +0,0 @@
-var path = require('path')
-    , fs = require('fs')
-    , common = require('./common')
-    , events = require('../events')
-    , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
-
-module.exports = {
-    www_dir: function(project_dir) {
-        return path.join(project_dir, 'www');
-    },
-    package_name:function(project_dir) {
-        // preferred location if cordova >= 3.4
-        var preferred_path = path.join(project_dir, 'config.xml');
-        if (!fs.existsSync(preferred_path)) {
-            // older location
-            old_config_path = path.join(module.exports.www_dir(project_dir), 'config.xml');
-            if (!fs.existsSync(old_config_path)) {
-                // output newer location and fail reading
-                config_path = preferred_path;
-                events.emit('verbose', 'unable to find '+config_path);
-            } else {
-                config_path = old_config_path;
-            }
-        } else {
-            config_path = preferred_path;
-        }
-        var widget_doc = xml_helpers.parseElementtreeSync(config_path);
-        return widget_doc._root.attrib['id'];
-    },
-    "source-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
-            common.copyFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
-            common.removeFile(project_dir, dest);
-        }
-    },
-    "header-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'header-fileinstall is not supported for firefoxos');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'header-file.uninstall is not supported for firefoxos');
-        }
-    },
-    "resource-file":{
-        install:function(el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'resource-file.install is not supported for firefoxos');
-        },
-        uninstall:function(el, project_dir, plugin_id) {
-            events.emit('verbose', 'resource-file.uninstall is not supported for firefoxos');
-        }
-    },
-    "framework": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.install is not supported for firefoxos');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'framework.uninstall is not supported for firefoxos');
-        }
-    },
-    "lib-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.install is not supported for firefoxos');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.uninstall is not supported for firefoxos');
-        }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/src/platforms/ios.js
----------------------------------------------------------------------
diff --git a/src/platforms/ios.js b/src/platforms/ios.js
deleted file mode 100644
index 4f570c3..0000000
--- a/src/platforms/ios.js
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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 path = require('path')
-  , fs   = require('fs')
-  , glob = require('glob')
-  , xcode = require('xcode')
-  , plist = require('plist-with-patches')
-  , shell = require('shelljs')
-  , events = require('../events')
-  , cachedProjectFiles = {};
-
-module.exports = {
-    www_dir:function(project_dir) {
-        return path.join(project_dir, 'www');
-    },
-    package_name:function(project_dir) {
-        var plist_file = glob.sync(path.join(project_dir, '**', '*-Info.plist'))[0];
-        return plist.parseFileSync(plist_file).CFBundleIdentifier;
-    },
-    "source-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id, project) {
-            var src = source_el.attrib['src'];
-            var srcFile = path.resolve(plugin_dir, src);
-            var targetDir = path.resolve(project.plugins_dir, plugin_id, getRelativeDir(source_el));
-            var destFile = path.resolve(targetDir, path.basename(src));
-            var is_framework = source_el.attrib['framework'] && (source_el.attrib['framework'] == 'true' || source_el.attrib['framework'] == true);
-            var has_flags = source_el.attrib['compiler-flags'] && source_el.attrib['compiler-flags'].length ? true : false ;
-
-            if (!fs.existsSync(srcFile)) throw new Error('cannot find "' + srcFile + '" ios <source-file>');
-            if (fs.existsSync(destFile)) throw new Error('target destination "' + destFile + '" already exists');
-            var project_ref = path.join('Plugins', path.relative(project.plugins_dir, destFile));
-
-            if (is_framework) {
-                var weak = source_el.attrib['weak'];
-                var opt = { weak: (weak == undefined || weak == null || weak != 'true' ? false : true ) };
-                var project_relative = path.join(path.basename(project.xcode_path), project_ref);
-                project.xcode.addFramework(project_relative, opt);
-                project.xcode.addToLibrarySearchPaths({path:project_ref});
-            } else {
-                project.xcode.addSourceFile(project_ref, has_flags ? {compilerFlags:source_el.attrib['compiler-flags']} : {});
-            }
-            shell.mkdir('-p', targetDir);
-            shell.cp(srcFile, destFile);
-        },
-        uninstall:function(source_el, project_dir, plugin_id, project) {
-            var src = source_el.attrib['src'];
-            var targetDir = path.resolve(project.plugins_dir, plugin_id, getRelativeDir(source_el));
-            var destFile = path.resolve(targetDir, path.basename(src));
-            var is_framework = source_el.attrib['framework'] && (source_el.attrib['framework'] == 'true' || source_el.attrib['framework'] == true);
-
-            var project_ref = path.join('Plugins', path.relative(project.plugins_dir, destFile));
-            project.xcode.removeSourceFile(project_ref);
-            if (is_framework) {
-                var project_relative = path.join(path.basename(project.xcode_path), project_ref);
-                project.xcode.removeFramework(project_relative);
-                project.xcode.removeFromLibrarySearchPaths({path:project_ref});
-            }
-            shell.rm('-rf', destFile);
-
-            if(fs.existsSync(targetDir) && fs.readdirSync(targetDir).length>0){
-                shell.rm('-rf', targetDir);
-            }
-        }
-    },
-    "header-file":{
-        install:function(header_el, plugin_dir, project_dir, plugin_id, project) {
-            var src = header_el.attrib['src'];
-            var srcFile = path.resolve(plugin_dir, src);
-            var targetDir = path.resolve(project.plugins_dir, plugin_id, getRelativeDir(header_el));
-            var destFile = path.resolve(targetDir, path.basename(src));
-            if (!fs.existsSync(srcFile)) throw new Error('cannot find "' + srcFile + '" ios <header-file>');
-            if (fs.existsSync(destFile)) throw new Error('target destination "' + destFile + '" already exists');
-            project.xcode.addHeaderFile(path.join('Plugins', path.relative(project.plugins_dir, destFile)));
-            shell.mkdir('-p', targetDir);
-            shell.cp(srcFile, destFile);
-        },
-        uninstall:function(header_el, project_dir, plugin_id, project) {
-            var src = header_el.attrib['src'];
-            var targetDir = path.resolve(project.plugins_dir, plugin_id, getRelativeDir(header_el));
-            var destFile = path.resolve(targetDir, path.basename(src));
-            project.xcode.removeHeaderFile(path.join('Plugins', path.relative(project.plugins_dir, destFile)));
-            shell.rm('-rf', destFile);
-            if(fs.existsSync(targetDir) && fs.readdirSync(targetDir).length>0){
-                shell.rm('-rf', targetDir);
-            }
-        }
-    },
-    "resource-file":{
-        install:function(resource_el, plugin_dir, project_dir, plugin_id, project) {
-            var src = resource_el.attrib['src'],
-                srcFile = path.resolve(plugin_dir, src),
-                destFile = path.resolve(project.resources_dir, path.basename(src));
-            if (!fs.existsSync(srcFile)) throw new Error('cannot find "' + srcFile + '" ios <resource-file>');
-            if (fs.existsSync(destFile)) throw new Error('target destination "' + destFile + '" already exists');
-            project.xcode.addResourceFile(path.join('Resources', path.basename(src)));
-            shell.cp('-R', srcFile, project.resources_dir);
-        },
-        uninstall:function(resource_el, project_dir, plugin_id, project) {
-            var src = resource_el.attrib['src'],
-                destFile = path.resolve(project.resources_dir, path.basename(src));
-            project.xcode.removeResourceFile(path.join('Resources', path.basename(src)));
-            shell.rm('-rf', destFile);
-        }
-    },
-    "framework":{ // CB-5238 custom frameworks only
-        install:function(framework_el, plugin_dir, project_dir, plugin_id, project) {
-            var src = framework_el.attrib['src'],
-                custom = framework_el.attrib['custom'],
-                srcFile = path.resolve(plugin_dir, src),
-                targetDir = path.resolve(project.plugins_dir, plugin_id, path.basename(src));
-            if (!custom) throw new Error('cannot add non custom frameworks.');
-            if (!fs.existsSync(srcFile)) throw new Error('cannot find "' + srcFile + '" ios <framework>');
-            if (fs.existsSync(targetDir)) throw new Error('target destination "' + targetDir + '" already exists');
-            shell.mkdir('-p', path.dirname(targetDir));
-            shell.cp('-R', srcFile, path.dirname(targetDir)); // frameworks are directories
-            var project_relative = path.relative(project_dir, targetDir);
-            project.xcode.addFramework(project_relative, {customFramework: true});
-        },
-        uninstall:function(framework_el, project_dir, plugin_id, project) {
-            var src = framework_el.attrib['src'],
-                targetDir = path.resolve(project.plugins_dir, plugin_id, path.basename(src));
-            project.xcode.removeFramework(targetDir, {customFramework: true});
-            shell.rm('-rf', targetDir);
-        }
-    },
-    "lib-file": {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.install is not supported for ios');
-        },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.uninstall is not supported for ios');
-        }
-    },
-    parseProjectFile:function(project_dir) {
-        // TODO: With ConfigKeeper introduced in config-changes.js
-        // there is now double caching of iOS project files.
-        // Remove the cache here when install can handle
-        // a list of plugins at once.
-        if (cachedProjectFiles[project_dir]) {
-            return cachedProjectFiles[project_dir];
-        }
-        // grab and parse pbxproj
-        // we don't want CordovaLib's xcode project
-        var project_files = glob.sync(path.join(project_dir, '*.xcodeproj', 'project.pbxproj'));
-
-        if (project_files.length === 0) {
-            throw new Error("does not appear to be an xcode project (no xcode project file)");
-        }
-        var pbxPath = project_files[0];
-        var xcodeproj = xcode.project(pbxPath);
-        xcodeproj.parseSync();
-
-        // grab and parse plist file or config.xml
-        var config_files = (glob.sync(path.join(project_dir, '**', '{PhoneGap,Cordova}.plist')).length == 0 ?
-                            glob.sync(path.join(project_dir, '**', 'config.xml')) :
-                            glob.sync(path.join(project_dir, '**', '{PhoneGap,Cordova}.plist'))
-                           );
-
-        config_files = config_files.filter(function (val) {
-            return !(/^build\//.test(val)) && !(/\/www\/config.xml$/.test(val));
-        });
-
-        if (config_files.length === 0) {
-            throw new Error("could not find PhoneGap/Cordova plist file, or config.xml file.");
-        }
-
-        var config_file = config_files[0];
-        var config_filename = path.basename(config_file);
-        var xcode_dir = path.dirname(config_file);
-        var pluginsDir = path.resolve(xcode_dir, 'Plugins');
-        var resourcesDir = path.resolve(xcode_dir, 'Resources');
-
-        cachedProjectFiles[project_dir] = {
-            plugins_dir:pluginsDir,
-            resources_dir:resourcesDir,
-            xcode:xcodeproj,
-            xcode_path:xcode_dir,
-            pbx: pbxPath,
-            write: function () {
-                fs.writeFileSync(pbxPath, xcodeproj.writeSync());
-            }
-        };
-
-        return cachedProjectFiles[project_dir];
-    },
-    purgeProjectFileCache:function(project_dir) {
-        delete cachedProjectFiles[project_dir];
-    }
-
-};
-
-function getRelativeDir(file) {
-    var targetDir = file.attrib['target-dir'];
-    if (targetDir) {
-        return targetDir;
-    } else {
-        return '';
-    }
-}


[16/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/DummyPlugin/src/blackberry10/index.js
----------------------------------------------------------------------
diff --git a/spec/plugins/DummyPlugin/src/blackberry10/index.js b/spec/plugins/DummyPlugin/src/blackberry10/index.js
deleted file mode 100644
index 5263b0c..0000000
--- a/spec/plugins/DummyPlugin/src/blackberry10/index.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/DummyPlugin/src/ios/Custom.framework/someFheader.h
----------------------------------------------------------------------
diff --git a/spec/plugins/DummyPlugin/src/ios/Custom.framework/someFheader.h b/spec/plugins/DummyPlugin/src/ios/Custom.framework/someFheader.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/DummyPlugin/src/ios/Custom.framework/somebinlib
----------------------------------------------------------------------
diff --git a/spec/plugins/DummyPlugin/src/ios/Custom.framework/somebinlib b/spec/plugins/DummyPlugin/src/ios/Custom.framework/somebinlib
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/DummyPlugin/src/ios/DummyPlugin.bundle
----------------------------------------------------------------------
diff --git a/spec/plugins/DummyPlugin/src/ios/DummyPlugin.bundle b/spec/plugins/DummyPlugin/src/ios/DummyPlugin.bundle
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/DummyPlugin/src/ios/DummyPluginCommand.h
----------------------------------------------------------------------
diff --git a/spec/plugins/DummyPlugin/src/ios/DummyPluginCommand.h b/spec/plugins/DummyPlugin/src/ios/DummyPluginCommand.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/DummyPlugin/src/ios/DummyPluginCommand.m
----------------------------------------------------------------------
diff --git a/spec/plugins/DummyPlugin/src/ios/DummyPluginCommand.m b/spec/plugins/DummyPlugin/src/ios/DummyPluginCommand.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/DummyPlugin/src/ios/SourceWithFramework.m
----------------------------------------------------------------------
diff --git a/spec/plugins/DummyPlugin/src/ios/SourceWithFramework.m b/spec/plugins/DummyPlugin/src/ios/SourceWithFramework.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/DummyPlugin/src/ios/TargetDirTest.h
----------------------------------------------------------------------
diff --git a/spec/plugins/DummyPlugin/src/ios/TargetDirTest.h b/spec/plugins/DummyPlugin/src/ios/TargetDirTest.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/DummyPlugin/src/ios/TargetDirTest.m
----------------------------------------------------------------------
diff --git a/spec/plugins/DummyPlugin/src/ios/TargetDirTest.m b/spec/plugins/DummyPlugin/src/ios/TargetDirTest.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/DummyPlugin/src/ios/libsqlite3.dylib
----------------------------------------------------------------------
diff --git a/spec/plugins/DummyPlugin/src/ios/libsqlite3.dylib b/spec/plugins/DummyPlugin/src/ios/libsqlite3.dylib
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/DummyPlugin/src/tizen/dummer.js
----------------------------------------------------------------------
diff --git a/spec/plugins/DummyPlugin/src/tizen/dummer.js b/spec/plugins/DummyPlugin/src/tizen/dummer.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/DummyPlugin/src/windows8/dummer.js
----------------------------------------------------------------------
diff --git a/spec/plugins/DummyPlugin/src/windows8/dummer.js b/spec/plugins/DummyPlugin/src/windows8/dummer.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/DummyPlugin/src/wp7/DummyPlugin.cs
----------------------------------------------------------------------
diff --git a/spec/plugins/DummyPlugin/src/wp7/DummyPlugin.cs b/spec/plugins/DummyPlugin/src/wp7/DummyPlugin.cs
deleted file mode 100644
index 273dc3b..0000000
--- a/spec/plugins/DummyPlugin/src/wp7/DummyPlugin.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *
- * Copyright 2013 Benn Mapes
- *
- * Licensed 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.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/DummyPlugin/src/wp8/DummyPlugin.cs
----------------------------------------------------------------------
diff --git a/spec/plugins/DummyPlugin/src/wp8/DummyPlugin.cs b/spec/plugins/DummyPlugin/src/wp8/DummyPlugin.cs
deleted file mode 100644
index 273dc3b..0000000
--- a/spec/plugins/DummyPlugin/src/wp8/DummyPlugin.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *
- * Copyright 2013 Benn Mapes
- *
- * Licensed 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.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/DummyPlugin/www/dummyplugin.js
----------------------------------------------------------------------
diff --git a/spec/plugins/DummyPlugin/www/dummyplugin.js b/spec/plugins/DummyPlugin/www/dummyplugin.js
deleted file mode 100644
index 5263b0c..0000000
--- a/spec/plugins/DummyPlugin/www/dummyplugin.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/DummyPlugin/www/dummyplugin/image.jpg
----------------------------------------------------------------------
diff --git a/spec/plugins/DummyPlugin/www/dummyplugin/image.jpg b/spec/plugins/DummyPlugin/www/dummyplugin/image.jpg
deleted file mode 100644
index 257cc56..0000000
--- a/spec/plugins/DummyPlugin/www/dummyplugin/image.jpg
+++ /dev/null
@@ -1 +0,0 @@
-foo

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/EnginePlugin/megaBoringVersion
----------------------------------------------------------------------
diff --git a/spec/plugins/EnginePlugin/megaBoringVersion b/spec/plugins/EnginePlugin/megaBoringVersion
deleted file mode 100755
index cbf7911..0000000
--- a/spec/plugins/EnginePlugin/megaBoringVersion
+++ /dev/null
@@ -1,23 +0,0 @@
-#! /bin/sh
-
-#
-# 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.
-#
-
-echo 4.0.0
-exit 0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/EnginePlugin/megaFunVersion
----------------------------------------------------------------------
diff --git a/spec/plugins/EnginePlugin/megaFunVersion b/spec/plugins/EnginePlugin/megaFunVersion
deleted file mode 100755
index 1e4c706..0000000
--- a/spec/plugins/EnginePlugin/megaFunVersion
+++ /dev/null
@@ -1,23 +0,0 @@
-#! /bin/sh
-
-#
-# 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.
-#
-
-echo 1.0.0
-exit 0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/EnginePlugin/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/EnginePlugin/plugin.xml b/spec/plugins/EnginePlugin/plugin.xml
deleted file mode 100644
index a58f19e..0000000
--- a/spec/plugins/EnginePlugin/plugin.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
-    xmlns="http://www.phonegap.com/ns/plugins/1.0"
-    id="com.cordova.engine"
-    version="1.0.0">
-
-    <name>Engine Choo Choo</name>
-
-    <engines>
-        <engine name="cordova" version=">=2.3.0"/>
-        <engine name="cordova-plugman" version=">=0.10.0" />
-        <engine name="mega-fun-plugin" version=">=1.0.0" scriptSrc="megaFunVersion" platform="*" />
-        <engine name="mega-boring-plugin" version=">=3.0.0" scriptSrc="megaBoringVersion" platform="ios|android" />
-    </engines>
-    
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/EnginePluginAndroid/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/EnginePluginAndroid/plugin.xml b/spec/plugins/EnginePluginAndroid/plugin.xml
deleted file mode 100644
index fe2bce2..0000000
--- a/spec/plugins/EnginePluginAndroid/plugin.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
-    xmlns="http://www.phonegap.com/ns/plugins/1.0"
-    id="com.cordova.engine"
-    version="1.0.0">
-
-    <name>Engine Choo Choo</name>
-
-    <engines>
-        <engine name="cordova" version=">=3.0.0"/>
-        <engine name="cordova-android" version=">=3.1.0"/>
-        <engine name="android-sdk" version=">=18"/>
-    </engines>
-    
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/EnginePluginiOS/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/EnginePluginiOS/plugin.xml b/spec/plugins/EnginePluginiOS/plugin.xml
deleted file mode 100644
index d7a9a8e..0000000
--- a/spec/plugins/EnginePluginiOS/plugin.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
-    xmlns="http://www.phonegap.com/ns/plugins/1.0"
-    id="com.cordova.engine"
-    version="1.0.0">
-
-    <name>Engine Choo Choo</name>
-
-    <engines>
-        <engine name="cordova" version=">=3.0.0"/>
-        <engine name="cordova-android" version=">=3.1.0"/>
-        <engine name="apple-ios" version="6.1"/>
-        <engine name="apple-osx" version=">10.0"/>
-        <engine name="apple-xcode" version=">=4.6.3"/>
-    </engines>
-    
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/FaultyPlugin/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/FaultyPlugin/plugin.xml b/spec/plugins/FaultyPlugin/plugin.xml
deleted file mode 100644
index 22564e7..0000000
--- a/spec/plugins/FaultyPlugin/plugin.xml
+++ /dev/null
@@ -1,161 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="com.phonegap.plugins.faultyplugin"
-    version="0.6.0">
-
-    <name>Faulty Plugin</name>
-
-    <access origin="build.phonegap.com" />
-    <access origin="s3.amazonaws.com" />
-    <!-- file doesn't exist -->
-
-    <config-file target="config.xml" parent="/widget">
-        <asset src="www/main.js" target="faultyplugin/main.js" />
-        <asset src="www/index.js" target="faultyplugin/index.js" />
-    </config-file>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="AndroidManifest.xml" parent="/manifest/application">
-            <activity android:name="com.phonegap.plugins.faultyplugin.FaultyPlugin"
-                      android:label="@string/app_name">
-                <intent-filter>
-                </intent-filter>
-            </activity>
-        </config-file>
-
-        <!-- CDV < 2.0 -->
-        <config-file target="res/xml/plugins.xml" parent="/plugins">
-            <plugin name="FaultyPlugin"
-                value="com.phonegap.plugins.faultyplugin.FaultyPlugin"/>
-        </config-file>
-
-        <!-- CDV 2.0+ (for now) -->
-        <config-file target="res/xml/config.xml" parent="/cordova/plugins">
-            <plugin name="FaultyPlugin"
-                value="com.phonegap.plugins.faultyplugin.FaultyPlugin"/>
-        </config-file>
-
-        <!-- this file doesn't exist -->
-        <source-file src="src/android/NotHere.java"
-                target-dir="src/com/phonegap/plugins/faultyplugin" />
-    </platform>
-    
-    <!-- android -->
-    <platform name="amazon-fireos">
-        <config-file target="AndroidManifest.xml" parent="/manifest/application">
-            <activity android:name="com.phonegap.plugins.faultyplugin.FaultyPlugin"
-                      android:label="@string/app_name">
-                <intent-filter>
-                </intent-filter>
-            </activity>
-        </config-file>
-
-        <!-- CDV < 2.0 -->
-        <config-file target="res/xml/plugins.xml" parent="/plugins">
-            <plugin name="FaultyPlugin"
-                value="com.phonegap.plugins.faultyplugin.FaultyPlugin"/>
-        </config-file>
-
-        <!-- CDV 2.0+ (for now) -->
-        <config-file target="res/xml/config.xml" parent="/cordova/plugins">
-            <plugin name="FaultyPlugin"
-                value="com.phonegap.plugins.faultyplugin.FaultyPlugin"/>
-        </config-file>
-
-        <!-- this file doesn't exist -->
-        <source-file src="src/android/NotHere.java"
-                target-dir="src/com/phonegap/plugins/faultyplugin" />
-    </platform>
-
-    <!-- ios -->
-    <platform name="ios">
-        <!-- /cordova/plugins no longer exists, it is now /widget/plugins -->
-        <!-- this should fail to install on ios -->
-        <config-file target="config.xml" parent="/cordova/plugins">
-            <plugin name="FaultyPlugin"
-                value="FaultyPlugin"/>
-        </config-file>
-
-        <header-file src="src/ios/FaultyPlugin.h" />
-        <source-file src="src/ios/FaultyPlugin.m" />
-        <!-- these files don't exist -->
-        <header-file src="src/ios/FaultyPluginCommand.h" />
-        <source-file src="src/ios/FaultyPluginCommand.m" />
-        <resource-file src="src/ios/IDontExist.bundle" />
-        <framework src="src/ios/Nopers.lib" />
-        <framework src="src/ios/NonExistantCustomFramework.framework" custom="true" />
-    </platform>
-    <platform name="blackberry10">
-        <config-file target="config.xml" parent="/widget">
-            <feature id="cordova.echo" required="true" version="1.0.0.0"/>
-        </config-file>
-
-        <source-file src="src/blackberry10/index.js" target-dir="ext-qnx/cordova.echo" />
-        <!-- these dont exist -->
-        <lib-file src="src/blackberry10/device/echoJnext.so" target-dir="ext-qnx/cordova.echo/device" />
-        <lib-file src="src/blackberry10/simulator/echoJnext.so" target-dir="ext-qnx/cordova.echo/simulator" />
-    </platform>
-
-    <!-- wp7 -->
-    <platform name="wp7">
-        <config-file target="config.xml" parent="/*">
-            <feature name="FaultyPlugin">
-                <param name="wp-package" value="FaultyPlugin"/>
-            </feature>
-        </config-file>
-
-        <source-file src="src/wp7/FaultyPlugin.cs" />
-
-        <!-- this doesn't exist -->
-        <source-file src="src/wp7/NotHere.cs" />
-    </platform>
-
-    <!-- wp8 -->
-    <platform name="wp8">
-        <config-file target="config.xml" parent="/*">
-            <feature name="FaultyPlugin">
-                <param name="wp-package" value="FaultyPlugin"/>
-            </feature>
-        </config-file>
-
-        <source-file src="src/wp8/FaultyPlugin.cs" />
-
-        <!-- this doesn't exist -->
-        <source-file src="src/wp8/NotHere.cs" />
-    </platform>
-
-    <!-- wp8 -->
-    <platform name="windows8">
-        <config-file target="config.xml" parent="/*">
-            <feature name="FaultyPlugin">
-                <param name="windows8-package" value="FaultyPlugin"/>
-            </feature>
-        </config-file>
-
-        <source-file src="src/windows8/faultyPlugin.js" />
-
-        <!-- does not exist -->
-        <source-file src="src/windows8/NotHere.js" />
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/FaultyPlugin/src/android/FaultyPlugin.java
----------------------------------------------------------------------
diff --git a/spec/plugins/FaultyPlugin/src/android/FaultyPlugin.java b/spec/plugins/FaultyPlugin/src/android/FaultyPlugin.java
deleted file mode 100644
index 5263b0c..0000000
--- a/spec/plugins/FaultyPlugin/src/android/FaultyPlugin.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/FaultyPlugin/src/blackberry10/client.js
----------------------------------------------------------------------
diff --git a/spec/plugins/FaultyPlugin/src/blackberry10/client.js b/spec/plugins/FaultyPlugin/src/blackberry10/client.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/FaultyPlugin/src/ios/FaultyPlugin.h
----------------------------------------------------------------------
diff --git a/spec/plugins/FaultyPlugin/src/ios/FaultyPlugin.h b/spec/plugins/FaultyPlugin/src/ios/FaultyPlugin.h
deleted file mode 100644
index 6a23ab6..0000000
--- a/spec/plugins/FaultyPlugin/src/ios/FaultyPlugin.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-
-//
-//  PhoneGap ! ChildBrowserCommand
-//
-//
-//  Created by Jesse MacFadyen on 10-05-29.
-//  Copyright 2010 Nitobi. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#ifdef PHONEGAP_FRAMEWORK
-	#import <PhoneGap/PGPlugin.h>
-#else
-	#import "PGPlugin.h"
-#endif
-#import "ChildBrowserViewController.h"
-
-
-
-@interface ChildBrowserCommand : PGPlugin <ChildBrowserDelegate>  {
-
-	ChildBrowserViewController* childBrowser;
-}
-
-@property (nonatomic, retain) ChildBrowserViewController *childBrowser;
-
-
-- (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
--(void) onChildLocationChange:(NSString*)newLoc;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/FaultyPlugin/src/ios/FaultyPlugin.m
----------------------------------------------------------------------
diff --git a/spec/plugins/FaultyPlugin/src/ios/FaultyPlugin.m b/spec/plugins/FaultyPlugin/src/ios/FaultyPlugin.m
deleted file mode 100644
index 38aaf64..0000000
--- a/spec/plugins/FaultyPlugin/src/ios/FaultyPlugin.m
+++ /dev/null
@@ -1,86 +0,0 @@
-//
-
-// 
-//
-//  Created by Jesse MacFadyen on 10-05-29.
-//  Copyright 2010 Nitobi. All rights reserved.
-//  Copyright (c) 2011, IBM Corporation
-//  Copyright 2011, Randy McMillan
-//
-
-#import "ChildBrowserCommand.h"
-
-#ifdef PHONEGAP_FRAMEWORK
-	#import <PhoneGap/PhoneGapViewController.h>
-#else
-	#import "PhoneGapViewController.h"
-#endif
-
-
-@implementation ChildBrowserCommand
-
-@synthesize childBrowser;
-
-- (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options // args: url
-{	
-	
-    if(childBrowser == NULL)
-	{
-		childBrowser = [[ ChildBrowserViewController alloc ] initWithScale:FALSE ];
-		childBrowser.delegate = self;
-	}
-	
-/* // TODO: Work in progress
-	NSString* strOrientations = [ options objectForKey:@"supportedOrientations"];
-	NSArray* supportedOrientations = [strOrientations componentsSeparatedByString:@","];
-*/
-    PhoneGapViewController* cont = (PhoneGapViewController*)[ super appViewController ];
-    childBrowser.supportedOrientations = cont.supportedOrientations;
-    
-    if ([cont respondsToSelector:@selector(presentViewController)]) {
-        //Reference UIViewController.h Line:179 for update to iOS 5 difference - @RandyMcMillan
-        [cont presentViewController:childBrowser animated:YES completion:nil];        
-    } else {
-        [ cont presentModalViewController:childBrowser animated:YES ];
-    }                 
-        
-    NSString *url = (NSString*) [arguments objectAtIndex:0];
-        
-    [childBrowser loadURL:url  ];
-        
-}
-
--(void) close:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options // args: url
-{
-    [ childBrowser closeBrowser];
-	
-}
-
--(void) onClose
-{
-	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onClose();",@""];
-	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
-}
-
--(void) onOpenInSafari
-{
-	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onOpenExternal();",@""];
-	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
-}
-
-
--(void) onChildLocationChange:(NSString*)newLoc
-{
-	
-	NSString* tempLoc = [NSString stringWithFormat:@"%@",newLoc];
-	NSString* encUrl = [tempLoc stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
-	 
-	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onLocationChange('%@');",encUrl];
-	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
-
-}
-
-
-
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/FaultyPlugin/src/windows8/faultyPlugin.js
----------------------------------------------------------------------
diff --git a/spec/plugins/FaultyPlugin/src/windows8/faultyPlugin.js b/spec/plugins/FaultyPlugin/src/windows8/faultyPlugin.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/FaultyPlugin/src/wp7/FaultyPlugin.cs
----------------------------------------------------------------------
diff --git a/spec/plugins/FaultyPlugin/src/wp7/FaultyPlugin.cs b/spec/plugins/FaultyPlugin/src/wp7/FaultyPlugin.cs
deleted file mode 100644
index 5263b0c..0000000
--- a/spec/plugins/FaultyPlugin/src/wp7/FaultyPlugin.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/FaultyPlugin/src/wp8/FaultyPlugin.cs
----------------------------------------------------------------------
diff --git a/spec/plugins/FaultyPlugin/src/wp8/FaultyPlugin.cs b/spec/plugins/FaultyPlugin/src/wp8/FaultyPlugin.cs
deleted file mode 100644
index 5263b0c..0000000
--- a/spec/plugins/FaultyPlugin/src/wp8/FaultyPlugin.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/PluginsPlistOnly/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/PluginsPlistOnly/plugin.xml b/spec/plugins/PluginsPlistOnly/plugin.xml
deleted file mode 100644
index 0e00504..0000000
--- a/spec/plugins/PluginsPlistOnly/plugin.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    id="com.phonegap.plugins.oldskewl"
-    version="0.0.1">
-
-    <name>Old Skewl Plugin using Plists</name>
-
-    <!-- ios -->
-    <platform name="ios">
-        <plugins-plist key="OldSkewl" string="OldSkewlCommand" />
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/VariablePlugin/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/VariablePlugin/plugin.xml b/spec/plugins/VariablePlugin/plugin.xml
deleted file mode 100644
index 9eff729..0000000
--- a/spec/plugins/VariablePlugin/plugin.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="com.adobe.vars"
-    version="3.0.0">
-
-    <name>Use Variables</name>
-
-    <preference name="API_KEY" />
-
-    <info>Remember that your api key is $API_KEY!</info>
-    <!-- android -->
-    <platform name="android">
-		<config-file target="AndroidManifest.xml" parent="/manifest">
-            <poop name="GoogleMapsApiKey" value="$API_KEY" />
-            <package>$PACKAGE_NAME</package>
-		</config-file>
-		
-    </platform>
-    
-    <!-- amazon fireos -->
-    <platform name="amazon-fireos">
-		<config-file target="AndroidManifest.xml" parent="/manifest">
-            <poop name="GoogleMapsApiKey" value="$API_KEY" />
-            <package>$PACKAGE_NAME</package>
-		</config-file>
-		
-    </platform>
-
-    <!-- ios -->
-    <platform name="ios">
-        <config-file target="config.xml" parent="/widget">
-            <awesome value="$API_KEY" />
-            <cfbundleid>$PACKAGE_NAME</cfbundleid>
-        </config-file>
-        <config-file target="*-Info.plist" parent="APluginNode">
-            <string></string>
-        </config-file>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/WebNotifications/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/WebNotifications/plugin.xml b/spec/plugins/WebNotifications/plugin.xml
deleted file mode 100644
index b9026f1..0000000
--- a/spec/plugins/WebNotifications/plugin.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="com.phonegap.plugins.webnotifications"
-    version="0.0.1">
-
-    <name>Web Notifications</name>
-
-    <asset src="www/webnotifications.js" target="webnotifications.js" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-        <access origin="s3.amazonaws.com" />
-    </config-file>
-	
-    <!-- ios -->
-    <platform name="ios">
-        <config-file target="config.xml" parent="/*/plugins">
-            <plugin name="WebNotifications"
-                value="WebNotifications"/>
-        </config-file>
-
-        <header-file src="src/ios/WebNotifications.h" />
-
-        <source-file src="src/ios/WebNotifications.m" />
-
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/WebNotifications/src/ios/AppDelegate.m.diff
----------------------------------------------------------------------
diff --git a/spec/plugins/WebNotifications/src/ios/AppDelegate.m.diff b/spec/plugins/WebNotifications/src/ios/AppDelegate.m.diff
deleted file mode 100644
index 754d079..0000000
--- a/spec/plugins/WebNotifications/src/ios/AppDelegate.m.diff
+++ /dev/null
@@ -1,18 +0,0 @@
-- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
-{
-    // Note: if app wasn't running, you can still get a LN and then it doesn't call this function,
-    // I think it calls app start but notifies you that LN caused the app start or something like that.
-    
-    //UIApplicationState state = [application applicationState];
-    //BOOL wasForeground = (state == UIApplicationStateActive);
-    
-    //NSString *title = [notification.userInfo objectForKey:@"title"];
-    //NSString *body = [notification.userInfo objectForKey:@"body"];
-    NSString *tag = [notification.userInfo objectForKey:@"tag"];
-    
-    [(WebNotifications*)[self.viewController getCommandInstance:@"WebNotifications"] clickNotification:tag];
-    
-    application.applicationIconBadgeNumber = 0;
-    application.scheduledLocalNotifications = [NSArray arrayWithArray:application.scheduledLocalNotifications]; // "hack" to clear seen notifications
-}
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/WebNotifications/src/ios/WebNotifications.h
----------------------------------------------------------------------
diff --git a/spec/plugins/WebNotifications/src/ios/WebNotifications.h b/spec/plugins/WebNotifications/src/ios/WebNotifications.h
deleted file mode 100644
index 1702f40..0000000
--- a/spec/plugins/WebNotifications/src/ios/WebNotifications.h
+++ /dev/null
@@ -1,35 +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.
- */
-
-#import <Foundation/Foundation.h>
-#import <Cordova/CDVPlugin.h>
-
-@interface WebNotifications : CDVPlugin {
-}
-
-@property (nonatomic, strong) NSMutableArray* activeNotifications;
-
-- (CDVPlugin*)initWithWebView:(UIWebView*)theWebView;
-
-- (void)createNotification:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
-- (void)closeNotification:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
-
-- (void)clickNotification:(NSString*)tag;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/WebNotifications/src/ios/WebNotifications.m
----------------------------------------------------------------------
diff --git a/spec/plugins/WebNotifications/src/ios/WebNotifications.m b/spec/plugins/WebNotifications/src/ios/WebNotifications.m
deleted file mode 100644
index 6f0c11f..0000000
--- a/spec/plugins/WebNotifications/src/ios/WebNotifications.m
+++ /dev/null
@@ -1,124 +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.
- */
-
-#define Log(fmt, ...) NSLog((@"%d: %s " fmt), __LINE__, __PRETTY_FUNCTION__, ##__VA_ARGS__);
-
-#import "WebNotifications.h"
-#import "MainViewController.h"
-
-@implementation WebNotifications
-
-@synthesize activeNotifications;
-
-- (CDVPlugin*)initWithWebView:(UIWebView*)theWebView
-{
-    self = [super init];
-    if (self) {
-        self.activeNotifications = [NSMutableArray array];
-    }
-    return self;
-}
-
-- (void)createNotification:(CDVInvokedUrlCommand*)command
-{
-    NSDictionary* options = [command.arguments objectAtIndex:0];
-
-    // w3c options:
-	NSString *title = [options objectForKey:@"title"];
-	NSString *body = [options objectForKey:@"body"];
-	NSString *tag = [options objectForKey:@"tag"];
-    //NSString *iconUrl = [options objectForKey:@"iconUrl"]; // Not supported
-    
-    // cordova option extensions:
-    NSUInteger delay = [[options objectForKey:@"delay"] unsignedIntegerValue];
-    NSString *soundUrl = [options objectForKey:@"soundUrl"];
-    NSInteger badgeNumber = [[options objectForKey:@"badgeNumber"] intValue];
-    
-    Log(@"addNotification title: %@  body: %@  tag: %@  delay: %u  badge: %u", title, body, tag, delay, badgeNumber);
-    
-    //NSString *action = [options objectForKey:@"action"];
-    //bool hasAction = ([[options objectForKey:@"hasAction"] intValue] == 1) ? YES : NO;
-    //alertAction
-    
-	UILocalNotification *notif = [[UILocalNotification alloc] init];
-	notif.alertBody = [NSString stringWithFormat:@"[%@] %@: %@", tag, title, body];
-    notif.timeZone = [NSTimeZone defaultTimeZone];
-    
-    notif.soundName = soundUrl;
-    notif.applicationIconBadgeNumber = badgeNumber;
-	
-	NSDictionary *userDict = [NSDictionary dictionaryWithObjectsAndKeys:title,@"title",body,@"body",tag,@"tag",nil];
-    notif.userInfo = userDict;
-	
-    if (delay != 0) {
-        notif.fireDate = [[NSDate date] addTimeInterval:delay];
-        //notif.repeatInterval = [[repeatDict objectForKey: repeat] intValue];
-        
-        [[UIApplication sharedApplication] scheduleLocalNotification:notif];
-    } else {
-        [[UIApplication sharedApplication] presentLocalNotificationNow:notif];
-    }
-    
-    [self.activeNotifications addObject:notif];
-}
-
-- (void)closeNotification:(CDVInvokedUrlCommand*)command
-{
-//    command.callbackId;
-    NSDictionary* options = [command.arguments objectAtIndex:0];
-    NSString *tag = [options objectForKey:@"tag"];
-
-    NSArray *notifications = [[UIApplication sharedApplication] scheduledLocalNotifications];
-    for (UILocalNotification *notification in notifications) {
-        if ([[notification.userInfo objectForKey:@"tag"] isEqualToString:tag]) {
-            Log(@"Cancelling notification with tag: %@", tag);
-            [[UIApplication sharedApplication] cancelLocalNotification:notification];
-            [self.activeNotifications removeObject:notification];
-            [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:0] callbackId:command.callbackId];
-        }
-    }
-    [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:0] callbackId:command.callbackId];
-}
-
-- (void)clickNotification:(NSString*)tag {
-    NSString *jsCallBack;
-    
-    jsCallBack = [NSString stringWithFormat:@"window.Notification.callOnclickByTag('%@')", tag];
-    [((CDVViewController*)self.viewController).webView stringByEvaluatingJavaScriptFromString:jsCallBack];
-    
-    NSArray *scheduledNotifications = [[UIApplication sharedApplication] scheduledLocalNotifications];
-    NSMutableArray *toDiscard = [NSMutableArray array];
-    for (UILocalNotification *notification in self.activeNotifications) {
-        if (![scheduledNotifications containsObject:notification]) {
-            // This notification is active, but no longer scheduled, so it must be displayed
-            jsCallBack = [NSString stringWithFormat:@"window.Notification.callOncloseByTag('%@')", [notification.userInfo objectForKey:@"tag"]];
-            [((CDVViewController*)self.viewController).webView stringByEvaluatingJavaScriptFromString:jsCallBack];
-            [toDiscard addObject:notification];
-        }
-    }
-    [self.activeNotifications removeObjectsInArray:toDiscard];
-}
-
-/*
-- (void)cancelAllNotifications:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options {
-	[[UIApplication sharedApplication] cancelAllLocalNotifications];
-}
-*/
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/WebNotifications/www/webnotifications.js
----------------------------------------------------------------------
diff --git a/spec/plugins/WebNotifications/www/webnotifications.js b/spec/plugins/WebNotifications/www/webnotifications.js
deleted file mode 100644
index 6597337..0000000
--- a/spec/plugins/WebNotifications/www/webnotifications.js
+++ /dev/null
@@ -1,123 +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.
- */
-
-/*
- * The W3C window.Notification API: http://www.w3.org/TR/notifications/
- */
-if (typeof window.Notification == 'undefined') {
-
-    /**
-     * Creates and shows a new notification.
-     * @param title
-     * @param options
-     */
-    window.Notification = function(title, options) {
-        options = options || {};
-
-        this.title = title || 'defaultTitle';
-
-        // w3c options:
-        this.body = options.body || '';
-        this.tag = options.tag || 'defaultTag';
-        this.iconUrl = options.iconUrl || '';
-        // titleDir, bodyDir are not supported
-
-        // cordova option extensions:
-        this.delay = options.delay || 0;
-        this.soundUrl = options.soundUrl || '';
-        this.badgeNumber = options.badgeNumber || 0;
-
-        // there must be one unique notification per tag, so close any existing outstanding notifications
-        if (window.Notification.active[this.tag])
-            window.Notification.active[this.tag].close();
-        window.Notification.active[this.tag] = this;
-
-        // Spec claims these must be defined
-        this.onclick = options.onclick;
-        this.onerror = options.onerror;
-        this.onclose = options.onclose;
-        this.onshow = options.onshow;
-        if (this.onshow) {
-            console.log("Warning, WebNotifications plugin will never call onshow"); // this may change on other platforms
-        }
-
-        var self = this;
-        cordova.exec(null, function(error) {
-            if (self.onerror) {
-                self.onerror(error);
-            }
-        }, 'WebNotifications', 'createNotification', [{
-            tag: this.tag,
-            title: this.title,
-            body: this.body,
-            delay: this.delay,
-        }]);
-    };
-
-    // TODO: change name to something internal looking?
-    window.Notification.permission = 'granted';
-
-    window.Notification.requestPermission = function(callback) {
-        setTimeout(function() {
-            callback(window.Notification.permission);
-        }, 0);
-    };
-
-    // Not part of the W3C API. Used by the native side to call onclick handlers.
-    // TODO: change name to something internal looking?
-    window.Notification.callOnclickByTag = function(tag) {
-        var notification = window.Notification.active[tag];
-        if (notification && notification.onclick && typeof notification.onclick == 'function') {
-            notification.onclick(tag);
-        }
-        delete window.Notification.active[tag];
-    };
-
-    window.Notification.callOncloseByTag = function(tag) {
-        var notification = window.Notification.active[tag];
-        if (notification && notification.onclose && typeof notification.onclose == 'function') {
-            notification.onclose(tag);
-        }
-        delete window.Notification.active[tag];
-    };
-
-    // A global map of notifications by tag, so their onclick callbacks can be called.
-    // TODO: change name to something internal looking?
-    window.Notification.active = {};
-
-    /**
-     * Dismiss a notification.
-     */
-    window.Notification.prototype.close = function() {
-        var self = this;
-        cordova.exec(function() {
-            if (self.onclose) {
-                self.onclose();
-            }
-            delete window.Notification[self.tag];
-        }, function(error) {
-            if (self.onerror) {
-                self.onerror(error);
-            }
-            delete window.Notification[self.tag];
-        }, 'WebNotifications', 'closeNotification', [{
-            tag: this.tag,
-        }]);
-    };
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/WeblessPlugin/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/WeblessPlugin/plugin.xml b/spec/plugins/WeblessPlugin/plugin.xml
deleted file mode 100644
index 5522d22..0000000
--- a/spec/plugins/WeblessPlugin/plugin.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="com.phonegap.plugins.weblessplugin"
-    version="0.6.0">
-
-    <name>Webless Plugin</name>
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-        <access origin="s3.amazonaws.com" />
-    </config-file>
-	
-    <!-- android -->
-    <platform name="android">
-        <config-file target="AndroidManifest.xml" parent="/manifest/application">
-            <activity android:name="com.phonegap.plugins.weblessplugin.WeblessPlugin"
-                      android:label="@string/app_name">
-                <intent-filter>
-                </intent-filter>
-            </activity>
-        </config-file>
-
-        <!-- CDV < 2.0 -->
-        <config-file target="res/xml/plugins.xml" parent="/plugins">
-            <plugin name="WeblessPlugin"
-                value="com.phonegap.plugins.weblessplugin.WeblessPlugin"/>
-        </config-file>
-
-        <!-- CDV 2.0+ (for now) -->
-        <config-file target="res/xml/config.xml" parent="/cordova/plugins">
-            <plugin name="WeblessPlugin"
-                value="com.phonegap.plugins.weblessplugin.WeblessPlugin"/>
-        </config-file>
-
-        <source-file src="src/android/WeblessPlugin.java"
-                target-dir="src/com/phonegap/plugins/weblessplugin" />
-    </platform>
-
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV < 2.4 -->
-        <plugins-plist key="com.phonegap.plugins.weblessplugin"
-            string="WeblessPluginCommand" />
-        <!-- CDV 2.4 had a /cordova/plugins instead of /widget/plugins so ignored! -->
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="/widget/plugins">
-            <plugin name="WeblessPlugin"
-                value="WeblessPluginCommand"/>
-        </config-file>
-
-        <resource-file src="src/ios/WeblessPlugin.bundle" />
-        <resource-file src="src/ios/WeblessPluginViewController.xib" />
-
-        <header-file src="src/ios/WeblessPluginCommand.h" />
-        <header-file src="src/ios/WeblessPluginViewController.h" />
-
-        <source-file src="src/ios/WeblessPluginCommand.m" />
-        <source-file src="src/ios/WeblessPluginViewController.m" />
-
-        <!-- framework for testing (not actual dependency of WeblessPlugin -->
-        <framework src="libsqlite3.dylib" />
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/WeblessPlugin/src/android/WeblessPlugin.java
----------------------------------------------------------------------
diff --git a/spec/plugins/WeblessPlugin/src/android/WeblessPlugin.java b/spec/plugins/WeblessPlugin/src/android/WeblessPlugin.java
deleted file mode 100644
index 5263b0c..0000000
--- a/spec/plugins/WeblessPlugin/src/android/WeblessPlugin.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_left.png
----------------------------------------------------------------------
diff --git a/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_left.png b/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_left.png
deleted file mode 100644
index 530e12b..0000000
Binary files a/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_left.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_left@2x.png
----------------------------------------------------------------------
diff --git a/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_left@2x.png b/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_left@2x.png
deleted file mode 100644
index 530e12b..0000000
Binary files a/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_left@2x.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_right.png
----------------------------------------------------------------------
diff --git a/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_right.png b/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_right.png
deleted file mode 100644
index 8b3d855..0000000
Binary files a/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_right.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_right@2x.png
----------------------------------------------------------------------
diff --git a/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_right@2x.png b/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_right@2x.png
deleted file mode 100644
index 8b3d855..0000000
Binary files a/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_right@2x.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/but_refresh.png
----------------------------------------------------------------------
diff --git a/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/but_refresh.png b/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/but_refresh.png
deleted file mode 100644
index 309b6bd..0000000
Binary files a/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/but_refresh.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/but_refresh@2x.png
----------------------------------------------------------------------
diff --git a/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/but_refresh@2x.png b/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/but_refresh@2x.png
deleted file mode 100644
index 309b6bd..0000000
Binary files a/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/but_refresh@2x.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/compass.png
----------------------------------------------------------------------
diff --git a/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/compass.png b/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/compass.png
deleted file mode 100644
index 46a8901..0000000
Binary files a/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/compass.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/compass@2x.png
----------------------------------------------------------------------
diff --git a/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/compass@2x.png b/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/compass@2x.png
deleted file mode 100644
index 46a8901..0000000
Binary files a/spec/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/compass@2x.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/WeblessPlugin/src/ios/WeblessPluginCommand.h
----------------------------------------------------------------------
diff --git a/spec/plugins/WeblessPlugin/src/ios/WeblessPluginCommand.h b/spec/plugins/WeblessPlugin/src/ios/WeblessPluginCommand.h
deleted file mode 100644
index 6a23ab6..0000000
--- a/spec/plugins/WeblessPlugin/src/ios/WeblessPluginCommand.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-
-//
-//  PhoneGap ! ChildBrowserCommand
-//
-//
-//  Created by Jesse MacFadyen on 10-05-29.
-//  Copyright 2010 Nitobi. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#ifdef PHONEGAP_FRAMEWORK
-	#import <PhoneGap/PGPlugin.h>
-#else
-	#import "PGPlugin.h"
-#endif
-#import "ChildBrowserViewController.h"
-
-
-
-@interface ChildBrowserCommand : PGPlugin <ChildBrowserDelegate>  {
-
-	ChildBrowserViewController* childBrowser;
-}
-
-@property (nonatomic, retain) ChildBrowserViewController *childBrowser;
-
-
-- (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
--(void) onChildLocationChange:(NSString*)newLoc;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/WeblessPlugin/src/ios/WeblessPluginCommand.m
----------------------------------------------------------------------
diff --git a/spec/plugins/WeblessPlugin/src/ios/WeblessPluginCommand.m b/spec/plugins/WeblessPlugin/src/ios/WeblessPluginCommand.m
deleted file mode 100644
index 38aaf64..0000000
--- a/spec/plugins/WeblessPlugin/src/ios/WeblessPluginCommand.m
+++ /dev/null
@@ -1,86 +0,0 @@
-//
-
-// 
-//
-//  Created by Jesse MacFadyen on 10-05-29.
-//  Copyright 2010 Nitobi. All rights reserved.
-//  Copyright (c) 2011, IBM Corporation
-//  Copyright 2011, Randy McMillan
-//
-
-#import "ChildBrowserCommand.h"
-
-#ifdef PHONEGAP_FRAMEWORK
-	#import <PhoneGap/PhoneGapViewController.h>
-#else
-	#import "PhoneGapViewController.h"
-#endif
-
-
-@implementation ChildBrowserCommand
-
-@synthesize childBrowser;
-
-- (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options // args: url
-{	
-	
-    if(childBrowser == NULL)
-	{
-		childBrowser = [[ ChildBrowserViewController alloc ] initWithScale:FALSE ];
-		childBrowser.delegate = self;
-	}
-	
-/* // TODO: Work in progress
-	NSString* strOrientations = [ options objectForKey:@"supportedOrientations"];
-	NSArray* supportedOrientations = [strOrientations componentsSeparatedByString:@","];
-*/
-    PhoneGapViewController* cont = (PhoneGapViewController*)[ super appViewController ];
-    childBrowser.supportedOrientations = cont.supportedOrientations;
-    
-    if ([cont respondsToSelector:@selector(presentViewController)]) {
-        //Reference UIViewController.h Line:179 for update to iOS 5 difference - @RandyMcMillan
-        [cont presentViewController:childBrowser animated:YES completion:nil];        
-    } else {
-        [ cont presentModalViewController:childBrowser animated:YES ];
-    }                 
-        
-    NSString *url = (NSString*) [arguments objectAtIndex:0];
-        
-    [childBrowser loadURL:url  ];
-        
-}
-
--(void) close:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options // args: url
-{
-    [ childBrowser closeBrowser];
-	
-}
-
--(void) onClose
-{
-	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onClose();",@""];
-	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
-}
-
--(void) onOpenInSafari
-{
-	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onOpenExternal();",@""];
-	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
-}
-
-
--(void) onChildLocationChange:(NSString*)newLoc
-{
-	
-	NSString* tempLoc = [NSString stringWithFormat:@"%@",newLoc];
-	NSString* encUrl = [tempLoc stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
-	 
-	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onLocationChange('%@');",encUrl];
-	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
-
-}
-
-
-
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.h
----------------------------------------------------------------------
diff --git a/spec/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.h b/spec/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.h
deleted file mode 100644
index d6fc139..0000000
--- a/spec/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-
-//
-//  ChildBrowserViewController.h
-//
-//  Created by Jesse MacFadyen on 21/07/09.
-//  Copyright 2009 Nitobi. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-@protocol ChildBrowserDelegate<NSObject>
-
-
-
-/*
- *  onChildLocationChanging:newLoc
- *  
- *  Discussion:
- *    Invoked when a new page has loaded
- */
--(void) onChildLocationChange:(NSString*)newLoc;
--(void) onOpenInSafari;
--(void) onClose;
-@end
-
-
-@interface ChildBrowserViewController : UIViewController < UIWebViewDelegate > {
-	IBOutlet UIWebView* webView;
-	IBOutlet UIBarButtonItem* closeBtn;
-	IBOutlet UIBarButtonItem* refreshBtn;
-	IBOutlet UILabel* addressLabel;
-	IBOutlet UIBarButtonItem* backBtn;
-	IBOutlet UIBarButtonItem* fwdBtn;
-	IBOutlet UIBarButtonItem* safariBtn;
-	IBOutlet UIActivityIndicatorView* spinner;
-	BOOL scaleEnabled;
-	BOOL isImage;
-	NSString* imageURL;
-	NSArray* supportedOrientations;
-	id <ChildBrowserDelegate> delegate;
-}
-
-@property (nonatomic, retain)id <ChildBrowserDelegate> delegate;
-@property (nonatomic, retain) 	NSArray* supportedOrientations;
-@property(retain) NSString* imageURL;
-@property(assign) BOOL isImage;
-
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation; 
-- (ChildBrowserViewController*)initWithScale:(BOOL)enabled;
-- (IBAction)onDoneButtonPress:(id)sender;
-- (IBAction)onSafariButtonPress:(id)sender;
-- (void)loadURL:(NSString*)url;
--(void)closeBrowser;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.m
----------------------------------------------------------------------
diff --git a/spec/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.m b/spec/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.m
deleted file mode 100644
index 167ef98..0000000
--- a/spec/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.m
+++ /dev/null
@@ -1,239 +0,0 @@
-//
-//  ChildBrowserViewController.m
-//
-//  Created by Jesse MacFadyen on 21/07/09.
-//  Copyright 2009 Nitobi. All rights reserved.
-//  Copyright (c) 2011, IBM Corporation
-//  Copyright 2011, Randy McMillan
-//
-
-#import "ChildBrowserViewController.h"
-
-
-@implementation ChildBrowserViewController
-
-@synthesize imageURL;
-@synthesize supportedOrientations;
-@synthesize isImage;
-@synthesize delegate;
-
-/*
- // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
-- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
-    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
-        // Custom initialization
-    }
-    return self;
-}
-*/
-
-+ (NSString*) resolveImageResource:(NSString*)resource
-{
-	NSString* systemVersion = [[UIDevice currentDevice] systemVersion];
-	BOOL isLessThaniOS4 = ([systemVersion compare:@"4.0" options:NSNumericSearch] == NSOrderedAscending);
-	
-	// the iPad image (nor retina) differentiation code was not in 3.x, and we have to explicitly set the path
-	if (isLessThaniOS4)
-	{
-        return [NSString stringWithFormat:@"%@.png", resource];
-	}
-	
-	return resource;
-}
-
-
-- (ChildBrowserViewController*)initWithScale:(BOOL)enabled
-{
-    self = [super init];
-	
-	
-	scaleEnabled = enabled;
-	
-	return self;	
-}
-
-// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    
-	refreshBtn.image = [UIImage imageNamed:[[self class] resolveImageResource:@"ChildBrowser.bundle/but_refresh"]];
-	backBtn.image = [UIImage imageNamed:[[self class] resolveImageResource:@"ChildBrowser.bundle/arrow_left"]];
-	fwdBtn.image = [UIImage imageNamed:[[self class] resolveImageResource:@"ChildBrowser.bundle/arrow_right"]];
-	safariBtn.image = [UIImage imageNamed:[[self class] resolveImageResource:@"ChildBrowser.bundle/compass"]];
-
-	webView.delegate = self;
-	webView.scalesPageToFit = TRUE;
-	webView.backgroundColor = [UIColor whiteColor];
-	NSLog(@"View did load");
-}
-
-
-
-
-
-- (void)didReceiveMemoryWarning {
-	// Releases the view if it doesn't have a superview.
-    [super didReceiveMemoryWarning];
-	
-	// Release any cached data, images, etc that aren't in use.
-}
-
-- (void)viewDidUnload {
-	// Release any retained subviews of the main view.
-	// e.g. self.myOutlet = nil;
-	NSLog(@"View did UN-load");
-}
-
-
-- (void)dealloc {
-
-	webView.delegate = nil;
-	
-	[webView release];
-	[closeBtn release];
-	[refreshBtn release];
-	[addressLabel release];
-	[backBtn release];
-	[fwdBtn release];
-	[safariBtn release];
-	[spinner release];
-	[ supportedOrientations release];
-	[super dealloc];
-}
-
--(void)closeBrowser
-{
-	
-	if(delegate != NULL)
-	{
-		[delegate onClose];		
-	}
-    if ([self respondsToSelector:@selector(presentingViewController)]) { 
-        //Reference UIViewController.h Line:179 for update to iOS 5 difference - @RandyMcMillan
-        [[self presentingViewController] dismissViewControllerAnimated:YES completion:nil];
-    } else {
-        [[self parentViewController] dismissModalViewControllerAnimated:YES];
-    }
-}
-
--(IBAction) onDoneButtonPress:(id)sender
-{
-	[ self closeBrowser];
-
-    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]];
-    [webView loadRequest:request];
-}
-
-
--(IBAction) onSafariButtonPress:(id)sender
-{
-	
-	if(delegate != NULL)
-	{
-		[delegate onOpenInSafari];		
-	}
-	
-	if(isImage)
-	{
-		NSURL* pURL = [[ [NSURL alloc] initWithString:imageURL ] autorelease];
-		[ [ UIApplication sharedApplication ] openURL:pURL  ];
-	}
-	else
-	{
-		NSURLRequest *request = webView.request;
-		[[UIApplication sharedApplication] openURL:request.URL];
-	}
-
-	 
-}
-
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation 
-{
-	BOOL autoRotate = [self.supportedOrientations count] > 1; // autorotate if only more than 1 orientation supported
-	if (autoRotate)
-	{
-		if ([self.supportedOrientations containsObject:
-			 [NSNumber numberWithInt:interfaceOrientation]]) {
-			return YES;
-		}
-    }
-	
-	return NO;
-}
-
-
-
-
-- (void)loadURL:(NSString*)url
-{
-	NSLog(@"Opening Url : %@",url);
-	 
-	if( [url hasSuffix:@".png" ]  || 
-	    [url hasSuffix:@".jpg" ]  || 
-		[url hasSuffix:@".jpeg" ] || 
-		[url hasSuffix:@".bmp" ]  || 
-		[url hasSuffix:@".gif" ]  )
-	{
-		[ imageURL release ];
-		imageURL = [url copy];
-		isImage = YES;
-		NSString* htmlText = @"<html><body style='background-color:#333;margin:0px;padding:0px;'><img style='min-height:200px;margin:0px;padding:0px;width:100%;height:auto;' alt='' src='IMGSRC'/></body></html>";
-		htmlText = [ htmlText stringByReplacingOccurrencesOfString:@"IMGSRC" withString:url ];
-
-		[webView loadHTMLString:htmlText baseURL:[NSURL URLWithString:@""]];
-		
-	}
-	else
-	{
-		imageURL = @"";
-		isImage = NO;
-		NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:url]];
-		[webView loadRequest:request];
-	}
-	webView.hidden = NO;
-}
-
-
-- (void)webViewDidStartLoad:(UIWebView *)sender {
-	addressLabel.text = @"Loading...";
-	backBtn.enabled = webView.canGoBack;
-	fwdBtn.enabled = webView.canGoForward;
-	
-	[ spinner startAnimating ];
-	
-}
-
-- (void)webViewDidFinishLoad:(UIWebView *)sender 
-{
-	NSURLRequest *request = webView.request;
-	NSLog(@"New Address is : %@",request.URL.absoluteString);
-	addressLabel.text = request.URL.absoluteString;
-	backBtn.enabled = webView.canGoBack;
-	fwdBtn.enabled = webView.canGoForward;
-	[ spinner stopAnimating ];
-	
-	if(delegate != NULL)
-	{
-		[delegate onChildLocationChange:request.URL.absoluteString];		
-	}
-
-}
-
-- (void)webView:(UIWebView *)wv didFailLoadWithError:(NSError *)error {
-    NSLog (@"webView:didFailLoadWithError");
-    [spinner stopAnimating];
-    addressLabel.text = @"Failed";
-    if (error != NULL) {
-        UIAlertView *errorAlert = [[UIAlertView alloc]
-                                   initWithTitle: [error localizedDescription]
-                                   message: [error localizedFailureReason]
-                                   delegate:nil
-                                   cancelButtonTitle:@"OK"
-                                   otherButtonTitles:nil];
-        [errorAlert show];
-        [errorAlert release];
-    }
-}
-
-
-@end


[13/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/src/blackberry10/native/public/json_reader.cpp
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/src/blackberry10/native/public/json_reader.cpp b/spec/plugins/cordova.echo/src/blackberry10/native/public/json_reader.cpp
deleted file mode 100644
index 750088c..0000000
--- a/spec/plugins/cordova.echo/src/blackberry10/native/public/json_reader.cpp
+++ /dev/null
@@ -1,894 +0,0 @@
-#include <json/reader.h>
-#include <json/value.h>
-#include <utility>
-#include <cstdio>
-#include <cassert>
-#include <cstring>
-#include <iostream>
-#include <stdexcept>
-
-#if _MSC_VER >= 1400 // VC++ 8.0
-#pragma warning( disable : 4996 )   // disable warning about strdup being deprecated.
-#endif
-
-namespace Json {
-
-// QNX is strict about declaring C symbols in the std namespace.
-#ifdef __QNXNTO__
-using std::memcpy;
-using std::sprintf;
-using std::sscanf;
-#endif
-
-// Implementation of class Features
-// ////////////////////////////////
-
-Features::Features()
-   : allowComments_( true )
-   , strictRoot_( false )
-{
-}
-
-
-Features 
-Features::all()
-{
-   return Features();
-}
-
-
-Features 
-Features::strictMode()
-{
-   Features features;
-   features.allowComments_ = false;
-   features.strictRoot_ = true;
-   return features;
-}
-
-// Implementation of class Reader
-// ////////////////////////////////
-
-
-static inline bool 
-in( Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4 )
-{
-   return c == c1  ||  c == c2  ||  c == c3  ||  c == c4;
-}
-
-static inline bool 
-in( Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4, Reader::Char c5 )
-{
-   return c == c1  ||  c == c2  ||  c == c3  ||  c == c4  ||  c == c5;
-}
-
-
-static bool 
-containsNewLine( Reader::Location begin, 
-                 Reader::Location end )
-{
-   for ( ;begin < end; ++begin )
-      if ( *begin == '\n'  ||  *begin == '\r' )
-         return true;
-   return false;
-}
-
-static std::string codePointToUTF8(unsigned int cp)
-{
-   std::string result;
-   
-   // based on description from http://en.wikipedia.org/wiki/UTF-8
-
-   if (cp <= 0x7f) 
-   {
-      result.resize(1);
-      result[0] = static_cast<char>(cp);
-   } 
-   else if (cp <= 0x7FF) 
-   {
-      result.resize(2);
-      result[1] = static_cast<char>(0x80 | (0x3f & cp));
-      result[0] = static_cast<char>(0xC0 | (0x1f & (cp >> 6)));
-   } 
-   else if (cp <= 0xFFFF) 
-   {
-      result.resize(3);
-      result[2] = static_cast<char>(0x80 | (0x3f & cp));
-      result[1] = 0x80 | static_cast<char>((0x3f & (cp >> 6)));
-      result[0] = 0xE0 | static_cast<char>((0xf & (cp >> 12)));
-   }
-   else if (cp <= 0x10FFFF) 
-   {
-      result.resize(4);
-      result[3] = static_cast<char>(0x80 | (0x3f & cp));
-      result[2] = static_cast<char>(0x80 | (0x3f & (cp >> 6)));
-      result[1] = static_cast<char>(0x80 | (0x3f & (cp >> 12)));
-      result[0] = static_cast<char>(0xF0 | (0x7 & (cp >> 18)));
-   }
-
-   return result;
-}
-
-
-// Class Reader
-// //////////////////////////////////////////////////////////////////
-
-Reader::Reader()
-   : features_( Features::all() )
-{
-}
-
-
-Reader::Reader( const Features &features )
-   : features_( features )
-{
-}
-
-
-bool
-Reader::parse( const std::string &document, 
-               Value &root,
-               bool collectComments )
-{
-   document_ = document;
-   const char *begin = document_.c_str();
-   const char *end = begin + document_.length();
-   return parse( begin, end, root, collectComments );
-}
-
-
-bool
-Reader::parse( std::istream& sin,
-               Value &root,
-               bool collectComments )
-{
-   //std::istream_iterator<char> begin(sin);
-   //std::istream_iterator<char> end;
-   // Those would allow streamed input from a file, if parse() were a
-   // template function.
-
-   // Since std::string is reference-counted, this at least does not
-   // create an extra copy.
-   std::string doc;
-   std::getline(sin, doc, (char)EOF);
-   return parse( doc, root, collectComments );
-}
-
-bool 
-Reader::parse( const char *beginDoc, const char *endDoc, 
-               Value &root,
-               bool collectComments )
-{
-   if ( !features_.allowComments_ )
-   {
-      collectComments = false;
-   }
-
-   begin_ = beginDoc;
-   end_ = endDoc;
-   collectComments_ = collectComments;
-   current_ = begin_;
-   lastValueEnd_ = 0;
-   lastValue_ = 0;
-   commentsBefore_ = "";
-   errors_.clear();
-   while ( !nodes_.empty() )
-      nodes_.pop();
-   nodes_.push( &root );
-   
-   bool successful = readValue();
-   Token token;
-   skipCommentTokens( token );
-   if ( collectComments_  &&  !commentsBefore_.empty() )
-      root.setComment( commentsBefore_, commentAfter );
-   if ( features_.strictRoot_ )
-   {
-      if ( !root.isArray()  &&  !root.isObject() )
-      {
-         // Set error location to start of doc, ideally should be first token found in doc
-         token.type_ = tokenError;
-         token.start_ = beginDoc;
-         token.end_ = endDoc;
-         addError( "A valid JSON document must be either an array or an object value.",
-                   token );
-         return false;
-      }
-   }
-   return successful;
-}
-
-
-bool
-Reader::readValue()
-{
-   Token token;
-   skipCommentTokens( token );
-   bool successful = true;
-
-   if ( collectComments_  &&  !commentsBefore_.empty() )
-   {
-      currentValue().setComment( commentsBefore_, commentBefore );
-      commentsBefore_ = "";
-   }
-
-
-   switch ( token.type_ )
-   {
-   case tokenObjectBegin:
-      successful = readObject( token );
-      break;
-   case tokenArrayBegin:
-      successful = readArray( token );
-      break;
-   case tokenNumber:
-      successful = decodeNumber( token );
-      break;
-   case tokenString:
-      successful = decodeString( token );
-      break;
-   case tokenTrue:
-      currentValue() = true;
-      break;
-   case tokenFalse:
-      currentValue() = false;
-      break;
-   case tokenNull:
-      currentValue() = Value();
-      break;
-   default:
-      return addError( "Syntax error: value, object or array expected.", token );
-   }
-
-   if ( collectComments_ )
-   {
-      lastValueEnd_ = current_;
-      lastValue_ = &currentValue();
-   }
-
-   return successful;
-}
-
-
-void 
-Reader::skipCommentTokens( Token &token )
-{
-   if ( features_.allowComments_ )
-   {
-      do
-      {
-         readToken( token );
-      }
-      while ( token.type_ == tokenComment );
-   }
-   else
-   {
-      readToken( token );
-   }
-}
-
-
-bool 
-Reader::expectToken( TokenType type, Token &token, const char *message )
-{
-   readToken( token );
-   if ( token.type_ != type )
-      return addError( message, token );
-   return true;
-}
-
-
-bool 
-Reader::readToken( Token &token )
-{
-   skipSpaces();
-   token.start_ = current_;
-   Char c = getNextChar();
-   bool ok = true;
-   switch ( c )
-   {
-   case '{':
-      token.type_ = tokenObjectBegin;
-      break;
-   case '}':
-      token.type_ = tokenObjectEnd;
-      break;
-   case '[':
-      token.type_ = tokenArrayBegin;
-      break;
-   case ']':
-      token.type_ = tokenArrayEnd;
-      break;
-   case '"':
-      token.type_ = tokenString;
-      ok = readString();
-      break;
-   case '/':
-      token.type_ = tokenComment;
-      ok = readComment();
-      break;
-   case '0':
-   case '1':
-   case '2':
-   case '3':
-   case '4':
-   case '5':
-   case '6':
-   case '7':
-   case '8':
-   case '9':
-   case '-':
-      token.type_ = tokenNumber;
-      readNumber();
-      break;
-   case 't':
-      token.type_ = tokenTrue;
-      ok = match( "rue", 3 );
-      break;
-   case 'f':
-      token.type_ = tokenFalse;
-      ok = match( "alse", 4 );
-      break;
-   case 'n':
-      token.type_ = tokenNull;
-      ok = match( "ull", 3 );
-      break;
-   case ',':
-      token.type_ = tokenArraySeparator;
-      break;
-   case ':':
-      token.type_ = tokenMemberSeparator;
-      break;
-   case 0:
-      token.type_ = tokenEndOfStream;
-      break;
-   default:
-      ok = false;
-      break;
-   }
-   if ( !ok )
-      token.type_ = tokenError;
-   token.end_ = current_;
-   return true;
-}
-
-
-void 
-Reader::skipSpaces()
-{
-   while ( current_ != end_ )
-   {
-      Char c = *current_;
-      if ( c == ' '  ||  c == '\t'  ||  c == '\r'  ||  c == '\n' )
-         ++current_;
-      else
-         break;
-   }
-}
-
-
-bool 
-Reader::match( Location pattern, 
-               int patternLength )
-{
-   if ( end_ - current_ < patternLength )
-      return false;
-   int index = patternLength;
-   while ( index-- )
-      if ( current_[index] != pattern[index] )
-         return false;
-   current_ += patternLength;
-   return true;
-}
-
-
-bool
-Reader::readComment()
-{
-   Location commentBegin = current_ - 1;
-   Char c = getNextChar();
-   bool successful = false;
-   if ( c == '*' )
-      successful = readCStyleComment();
-   else if ( c == '/' )
-      successful = readCppStyleComment();
-   if ( !successful )
-      return false;
-
-   if ( collectComments_ )
-   {
-      CommentPlacement placement = commentBefore;
-      if ( lastValueEnd_  &&  !containsNewLine( lastValueEnd_, commentBegin ) )
-      {
-         if ( c != '*'  ||  !containsNewLine( commentBegin, current_ ) )
-            placement = commentAfterOnSameLine;
-      }
-
-      addComment( commentBegin, current_, placement );
-   }
-   return true;
-}
-
-
-void 
-Reader::addComment( Location begin, 
-                    Location end, 
-                    CommentPlacement placement )
-{
-   assert( collectComments_ );
-   if ( placement == commentAfterOnSameLine )
-   {
-      assert( lastValue_ != 0 );
-      lastValue_->setComment( std::string( begin, end ), placement );
-   }
-   else
-   {
-      if ( !commentsBefore_.empty() )
-         commentsBefore_ += "\n";
-      commentsBefore_ += std::string( begin, end );
-   }
-}
-
-
-bool 
-Reader::readCStyleComment()
-{
-   while ( current_ != end_ )
-   {
-      Char c = getNextChar();
-      if ( c == '*'  &&  *current_ == '/' )
-         break;
-   }
-   return getNextChar() == '/';
-}
-
-
-bool 
-Reader::readCppStyleComment()
-{
-   while ( current_ != end_ )
-   {
-      Char c = getNextChar();
-      if (  c == '\r'  ||  c == '\n' )
-         break;
-   }
-   return true;
-}
-
-
-void 
-Reader::readNumber()
-{
-   while ( current_ != end_ )
-   {
-      if ( !(*current_ >= '0'  &&  *current_ <= '9')  &&
-           !in( *current_, '.', 'e', 'E', '+', '-' ) )
-         break;
-      ++current_;
-   }
-}
-
-bool
-Reader::readString()
-{
-   Char c = 0;
-   while ( current_ != end_ )
-   {
-      c = getNextChar();
-      if ( c == '\\' )
-         getNextChar();
-      else if ( c == '"' )
-         break;
-   }
-   return c == '"';
-}
-
-
-bool 
-Reader::readObject( Token &tokenStart )
-{
-   Token tokenName;
-   Token something = tokenStart;
-   std::string name;
-   currentValue() = Value( objectValue );
-   while ( readToken( tokenName ) )
-   {
-      bool initialTokenOk = true;
-      while ( tokenName.type_ == tokenComment  &&  initialTokenOk )
-         initialTokenOk = readToken( tokenName );
-      if  ( !initialTokenOk )
-         break;
-      if ( tokenName.type_ == tokenObjectEnd  &&  name.empty() )  // empty object
-         return true;
-      if ( tokenName.type_ != tokenString )
-         break;
-      
-      name = "";
-      if ( !decodeString( tokenName, name ) )
-         return recoverFromError( tokenObjectEnd );
-
-      Token colon;
-      if ( !readToken( colon ) ||  colon.type_ != tokenMemberSeparator )
-      {
-         return addErrorAndRecover( "Missing ':' after object member name", 
-                                    colon, 
-                                    tokenObjectEnd );
-      }
-      Value &value = currentValue()[ name ];
-      nodes_.push( &value );
-      bool ok = readValue();
-      nodes_.pop();
-      if ( !ok ) // error already set
-         return recoverFromError( tokenObjectEnd );
-
-      Token comma;
-      if ( !readToken( comma )
-            ||  ( comma.type_ != tokenObjectEnd  &&  
-                  comma.type_ != tokenArraySeparator &&
-		  comma.type_ != tokenComment ) )
-      {
-         return addErrorAndRecover( "Missing ',' or '}' in object declaration", 
-                                    comma, 
-                                    tokenObjectEnd );
-      }
-      bool finalizeTokenOk = true;
-      while ( comma.type_ == tokenComment &&
-              finalizeTokenOk )
-         finalizeTokenOk = readToken( comma );
-      if ( comma.type_ == tokenObjectEnd )
-         return true;
-   }
-   return addErrorAndRecover( "Missing '}' or object member name", 
-                              tokenName, 
-                              tokenObjectEnd );
-}
-
-
-bool 
-Reader::readArray( Token &tokenStart )
-{
-   Token something = tokenStart;
-   currentValue() = Value( arrayValue );
-   skipSpaces();
-   if ( *current_ == ']' ) // empty array
-   {
-      Token endArray;
-      readToken( endArray );
-      return true;
-   }
-   int index = 0;
-   while ( true )
-   {
-      Value &value = currentValue()[ index++ ];
-      nodes_.push( &value );
-      bool ok = readValue();
-      nodes_.pop();
-      if ( !ok ) // error already set
-         return recoverFromError( tokenArrayEnd );
-
-      Token token;
-      // Accept Comment after last item in the array.
-      ok = readToken( token );
-      while ( token.type_ == tokenComment  &&  ok )
-      {
-         ok = readToken( token );
-      }
-      bool badTokenType = ( token.type_ == tokenArraySeparator  &&  
-                            token.type_ == tokenArrayEnd );
-      if ( !ok  ||  badTokenType )
-      {
-         return addErrorAndRecover( "Missing ',' or ']' in array declaration", 
-                                    token, 
-                                    tokenArrayEnd );
-      }
-      if ( token.type_ == tokenArrayEnd )
-         break;
-   }
-   return true;
-}
-
-
-bool 
-Reader::decodeNumber( Token &token )
-{
-   bool isDouble = false;
-   for ( Location inspect = token.start_; inspect != token.end_; ++inspect )
-   {
-      isDouble = isDouble  
-                 ||  in( *inspect, '.', 'e', 'E', '+' )  
-                 ||  ( *inspect == '-'  &&  inspect != token.start_ );
-   }
-   if ( isDouble )
-      return decodeDouble( token );
-   Location current = token.start_;
-   bool isNegative = *current == '-';
-   if ( isNegative )
-      ++current;
-   Value::UInt threshold = (isNegative ? Value::UInt(-Value::minInt) 
-                                       : Value::maxUInt) / 10;
-   Value::UInt value = 0;
-   while ( current < token.end_ )
-   {
-      Char c = *current++;
-      if ( c < '0'  ||  c > '9' )
-         return addError( "'" + std::string( token.start_, token.end_ ) + "' is not a number.", token );
-      if ( value >= threshold )
-         return decodeDouble( token );
-      value = value * 10 + Value::UInt(c - '0');
-   }
-   if ( isNegative )
-      currentValue() = -Value::Int( value );
-   else if ( value <= Value::UInt(Value::maxInt) )
-      currentValue() = Value::Int( value );
-   else
-      currentValue() = value;
-   return true;
-}
-
-
-bool 
-Reader::decodeDouble( Token &token )
-{
-   double value = 0;
-   const int bufferSize = 32;
-   int count;
-   int length = int(token.end_ - token.start_);
-   if ( length <= bufferSize )
-   {
-      Char buffer[bufferSize];
-      memcpy( buffer, token.start_, length );
-      buffer[length] = 0;
-      count = sscanf( buffer, "%lf", &value );
-   }
-   else
-   {
-      std::string buffer( token.start_, token.end_ );
-      count = sscanf( buffer.c_str(), "%lf", &value );
-   }
-
-   if ( count != 1 )
-      return addError( "'" + std::string( token.start_, token.end_ ) + "' is not a number.", token );
-   currentValue() = value;
-   return true;
-}
-
-
-bool 
-Reader::decodeString( Token &token )
-{
-   std::string decoded;
-   if ( !decodeString( token, decoded ) )
-      return false;
-   currentValue() = decoded;
-   return true;
-}
-
-
-bool 
-Reader::decodeString( Token &token, std::string &decoded )
-{
-   decoded.reserve( token.end_ - token.start_ - 2 );
-   Location current = token.start_ + 1; // skip '"'
-   Location end = token.end_ - 1;      // do not include '"'
-   while ( current != end )
-   {
-      Char c = *current++;
-      if ( c == '"' )
-         break;
-      else if ( c == '\\' )
-      {
-         if ( current == end )
-            return addError( "Empty escape sequence in string", token, current );
-         Char escape = *current++;
-         switch ( escape )
-         {
-         case '"': decoded += '"'; break;
-         case '/': decoded += '/'; break;
-         case '\\': decoded += '\\'; break;
-         case 'b': decoded += '\b'; break;
-         case 'f': decoded += '\f'; break;
-         case 'n': decoded += '\n'; break;
-         case 'r': decoded += '\r'; break;
-         case 't': decoded += '\t'; break;
-         case 'u':
-            {
-               unsigned int unicode;
-               if ( !decodeUnicodeCodePoint( token, current, end, unicode ) )
-                  return false;
-               decoded += codePointToUTF8(unicode);
-            }
-            break;
-         default:
-            return addError( "Bad escape sequence in string", token, current );
-         }
-      }
-      else
-      {
-         decoded += c;
-      }
-   }
-   return true;
-}
-
-bool
-Reader::decodeUnicodeCodePoint( Token &token, 
-                                     Location &current, 
-                                     Location end, 
-                                     unsigned int &unicode )
-{
-
-   if ( !decodeUnicodeEscapeSequence( token, current, end, unicode ) )
-      return false;
-   if (unicode >= 0xD800 && unicode <= 0xDBFF)
-   {
-      // surrogate pairs
-      if (end - current < 6)
-         return addError( "additional six characters expected to parse unicode surrogate pair.", token, current );
-      unsigned int surrogatePair;
-      if (*(current++) == '\\' && *(current++)== 'u')
-      {
-         if (decodeUnicodeEscapeSequence( token, current, end, surrogatePair ))
-         {
-            unicode = 0x10000 + ((unicode & 0x3FF) << 10) + (surrogatePair & 0x3FF);
-         } 
-         else
-            return false;
-      } 
-      else
-         return addError( "expecting another \\u token to begin the second half of a unicode surrogate pair", token, current );
-   }
-   return true;
-}
-
-bool 
-Reader::decodeUnicodeEscapeSequence( Token &token, 
-                                     Location &current, 
-                                     Location end, 
-                                     unsigned int &unicode )
-{
-   if ( end - current < 4 )
-      return addError( "Bad unicode escape sequence in string: four digits expected.", token, current );
-   unicode = 0;
-   for ( int index =0; index < 4; ++index )
-   {
-      Char c = *current++;
-      unicode *= 16;
-      if ( c >= '0'  &&  c <= '9' )
-         unicode += c - '0';
-      else if ( c >= 'a'  &&  c <= 'f' )
-         unicode += c - 'a' + 10;
-      else if ( c >= 'A'  &&  c <= 'F' )
-         unicode += c - 'A' + 10;
-      else
-         return addError( "Bad unicode escape sequence in string: hexadecimal digit expected.", token, current );
-   }
-   return true;
-}
-
-
-bool 
-Reader::addError( const std::string &message, 
-                  Token &token,
-                  Location extra )
-{
-   ErrorInfo info;
-   info.token_ = token;
-   info.message_ = message;
-   info.extra_ = extra;
-   errors_.push_back( info );
-   return false;
-}
-
-
-bool 
-Reader::recoverFromError( TokenType skipUntilToken )
-{
-   int errorCount = int(errors_.size());
-   Token skip;
-   while ( true )
-   {
-      if ( !readToken(skip) )
-         errors_.resize( errorCount ); // discard errors caused by recovery
-      if ( skip.type_ == skipUntilToken  ||  skip.type_ == tokenEndOfStream )
-         break;
-   }
-   errors_.resize( errorCount );
-   return false;
-}
-
-
-bool 
-Reader::addErrorAndRecover( const std::string &message, 
-                            Token &token,
-                            TokenType skipUntilToken )
-{
-   addError( message, token );
-   return recoverFromError( skipUntilToken );
-}
-
-
-Value &
-Reader::currentValue()
-{
-   return *(nodes_.top());
-}
-
-
-Reader::Char 
-Reader::getNextChar()
-{
-   if ( current_ == end_ )
-      return 0;
-   return *current_++;
-}
-
-
-void 
-Reader::getLocationLineAndColumn( Location location,
-                                  int &line,
-                                  int &column ) const
-{
-   Location current = begin_;
-   Location lastLineStart = current;
-   line = 0;
-   while ( current < location  &&  current != end_ )
-   {
-      Char c = *current++;
-      if ( c == '\r' )
-      {
-         if ( *current == '\n' )
-            ++current;
-         lastLineStart = current;
-         ++line;
-      }
-      else if ( c == '\n' )
-      {
-         lastLineStart = current;
-         ++line;
-      }
-   }
-   // column & line start at 1
-   column = int(location - lastLineStart) + 1;
-   ++line;
-}
-
-
-std::string
-Reader::getLocationLineAndColumn( Location location ) const
-{
-   int line, column;
-   getLocationLineAndColumn( location, line, column );
-   char buffer[18+16+16+1];
-   sprintf( buffer, "Line %d, Column %d", line, column );
-   return buffer;
-}
-
-
-std::string 
-Reader::getFormatedErrorMessages() const
-{
-   std::string formattedMessage;
-   for ( Errors::const_iterator itError = errors_.begin();
-         itError != errors_.end();
-         ++itError )
-   {
-      const ErrorInfo &error = *itError;
-      formattedMessage += "* " + getLocationLineAndColumn( error.token_.start_ ) + "\n";
-      formattedMessage += "  " + error.message_ + "\n";
-      if ( error.extra_ )
-         formattedMessage += "See " + getLocationLineAndColumn( error.extra_ ) + " for detail.\n";
-   }
-   return formattedMessage;
-}
-
-
-std::istream& operator>>( std::istream &sin, Value &root )
-{
-    Json::Reader reader;
-    bool ok = reader.parse(sin, root, true);
-    //JSON_ASSERT( ok );
-    if (!ok) throw std::runtime_error(reader.getFormatedErrorMessages());
-    return sin;
-}
-
-
-} // namespace Json

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/src/blackberry10/native/public/json_value.cpp
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/src/blackberry10/native/public/json_value.cpp b/spec/plugins/cordova.echo/src/blackberry10/native/public/json_value.cpp
deleted file mode 100644
index 67638ca..0000000
--- a/spec/plugins/cordova.echo/src/blackberry10/native/public/json_value.cpp
+++ /dev/null
@@ -1,1726 +0,0 @@
-#include <iostream>
-#include <json/value.h>
-#include <json/writer.h>
-#include <utility>
-#include <stdexcept>
-#include <cstring>
-#include <cassert>
-#ifdef JSON_USE_CPPTL
-# include <cpptl/conststring.h>
-#endif
-#include <cstddef>    // size_t
-#ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
-# include "json_batchallocator.h"
-#endif // #ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
-
-#define JSON_ASSERT_UNREACHABLE assert( false )
-#define JSON_ASSERT( condition ) assert( condition );  // @todo <= change this into an exception throw
-#define JSON_ASSERT_MESSAGE( condition, message ) if (!( condition )) throw std::runtime_error( message );
-
-namespace Json {
-
-// QNX is strict about declaring C symbols in the std namespace.
-#ifdef __QNXNTO__
-using std::memcpy;
-using std::strchr;
-using std::strcmp;
-using std::strlen;
-#endif
-
-const Value Value::null;
-const Int Value::minInt = Int( ~(UInt(-1)/2) );
-const Int Value::maxInt = Int( UInt(-1)/2 );
-const UInt Value::maxUInt = UInt(-1);
-
-// A "safe" implementation of strdup. Allow null pointer to be passed. 
-// Also avoid warning on msvc80.
-//
-//inline char *safeStringDup( const char *czstring )
-//{
-//   if ( czstring )
-//   {
-//      const size_t length = (unsigned int)( strlen(czstring) + 1 );
-//      char *newString = static_cast<char *>( malloc( length ) );
-//      memcpy( newString, czstring, length );
-//      return newString;
-//   }
-//   return 0;
-//}
-//
-//inline char *safeStringDup( const std::string &str )
-//{
-//   if ( !str.empty() )
-//   {
-//      const size_t length = str.length();
-//      char *newString = static_cast<char *>( malloc( length + 1 ) );
-//      memcpy( newString, str.c_str(), length );
-//      newString[length] = 0;
-//      return newString;
-//   }
-//   return 0;
-//}
-
-ValueAllocator::~ValueAllocator()
-{
-}
-
-class DefaultValueAllocator : public ValueAllocator
-{
-public:
-   virtual ~DefaultValueAllocator()
-   {
-   }
-
-   virtual char *makeMemberName( const char *memberName )
-   {
-      return duplicateStringValue( memberName );
-   }
-
-   virtual void releaseMemberName( char *memberName )
-   {
-      releaseStringValue( memberName );
-   }
-
-   virtual char *duplicateStringValue( const char *value, 
-                                       unsigned int length = unknown )
-   {
-      //@todo investigate this old optimization
-      //if ( !value  ||  value[0] == 0 )
-      //   return 0;
-
-      if ( length == unknown )
-         length = (unsigned int)strlen(value);
-      char *newString = static_cast<char *>( malloc( length + 1 ) );
-      memcpy( newString, value, length );
-      newString[length] = 0;
-      return newString;
-   }
-
-   virtual void releaseStringValue( char *value )
-   {
-      if ( value )
-         free( value );
-   }
-};
-
-static ValueAllocator *&valueAllocator()
-{
-   static DefaultValueAllocator defaultAllocator;
-   static ValueAllocator *valueAllocator = &defaultAllocator;
-   return valueAllocator;
-}
-
-static struct DummyValueAllocatorInitializer {
-   DummyValueAllocatorInitializer() 
-   {
-      valueAllocator();      // ensure valueAllocator() statics are initialized before main().
-   }
-} dummyValueAllocatorInitializer;
-
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// ValueInternals...
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
-# include "json_internalarray.inl"
-# include "json_internalmap.inl"
-#endif // JSON_VALUE_USE_INTERNAL_MAP
-
-# include "json_valueiterator.inl"
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class Value::CommentInfo
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-
-Value::CommentInfo::CommentInfo()
-   : comment_( 0 )
-{
-}
-
-Value::CommentInfo::~CommentInfo()
-{
-   if ( comment_ )
-      valueAllocator()->releaseStringValue( comment_ );
-}
-
-
-void 
-Value::CommentInfo::setComment( const char *text )
-{
-   if ( comment_ )
-      valueAllocator()->releaseStringValue( comment_ );
-   JSON_ASSERT( text );
-   JSON_ASSERT_MESSAGE( text[0]=='\0' || text[0]=='/', "Comments must start with /");
-   // It seems that /**/ style comments are acceptable as well.
-   comment_ = valueAllocator()->duplicateStringValue( text );
-}
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class Value::CZString
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-# ifndef JSON_VALUE_USE_INTERNAL_MAP
-
-// Notes: index_ indicates if the string was allocated when
-// a string is stored.
-
-Value::CZString::CZString( int index )
-   : cstr_( 0 )
-   , index_( index )
-{
-}
-
-Value::CZString::CZString( const char *cstr, DuplicationPolicy allocate )
-   : cstr_( allocate == duplicate ? valueAllocator()->makeMemberName(cstr) 
-                                  : cstr )
-   , index_( allocate )
-{
-}
-
-Value::CZString::CZString( const CZString &other )
-: cstr_( other.index_ != noDuplication &&  other.cstr_ != 0
-                ?  valueAllocator()->makeMemberName( other.cstr_ )
-                : other.cstr_ )
-   , index_( other.cstr_ ? (other.index_ == noDuplication ? noDuplication : duplicate)
-                         : other.index_ )
-{
-}
-
-Value::CZString::~CZString()
-{
-   if ( cstr_  &&  index_ == duplicate )
-      valueAllocator()->releaseMemberName( const_cast<char *>( cstr_ ) );
-}
-
-void 
-Value::CZString::swap( CZString &other )
-{
-   std::swap( cstr_, other.cstr_ );
-   std::swap( index_, other.index_ );
-}
-
-Value::CZString &
-Value::CZString::operator =( const CZString &other )
-{
-   CZString temp( other );
-   swap( temp );
-   return *this;
-}
-
-bool 
-Value::CZString::operator<( const CZString &other ) const 
-{
-   if ( cstr_ )
-      return strcmp( cstr_, other.cstr_ ) < 0;
-   return index_ < other.index_;
-}
-
-bool 
-Value::CZString::operator==( const CZString &other ) const 
-{
-   if ( cstr_ )
-      return strcmp( cstr_, other.cstr_ ) == 0;
-   return index_ == other.index_;
-}
-
-
-int 
-Value::CZString::index() const
-{
-   return index_;
-}
-
-
-const char *
-Value::CZString::c_str() const
-{
-   return cstr_;
-}
-
-bool 
-Value::CZString::isStaticString() const
-{
-   return index_ == noDuplication;
-}
-
-#endif // ifndef JSON_VALUE_USE_INTERNAL_MAP
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class Value::Value
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-/*! \internal Default constructor initialization must be equivalent to:
- * memset( this, 0, sizeof(Value) )
- * This optimization is used in ValueInternalMap fast allocator.
- */
-Value::Value( ValueType type )
-   : type_( type )
-   , allocated_( 0 )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   switch ( type )
-   {
-   case nullValue:
-      break;
-   case intValue:
-   case uintValue:
-      value_.int_ = 0;
-      break;
-   case realValue:
-      value_.real_ = 0.0;
-      break;
-   case stringValue:
-      value_.string_ = 0;
-      break;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-   case objectValue:
-      value_.map_ = new ObjectValues();
-      break;
-#else
-   case arrayValue:
-      value_.array_ = arrayAllocator()->newArray();
-      break;
-   case objectValue:
-      value_.map_ = mapAllocator()->newMap();
-      break;
-#endif
-   case booleanValue:
-      value_.bool_ = false;
-      break;
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-}
-
-
-Value::Value( Int value )
-   : type_( intValue )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.int_ = value;
-}
-
-
-Value::Value( UInt value )
-   : type_( uintValue )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.uint_ = value;
-}
-
-Value::Value( double value )
-   : type_( realValue )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.real_ = value;
-}
-
-Value::Value( const char *value )
-   : type_( stringValue )
-   , allocated_( true )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.string_ = valueAllocator()->duplicateStringValue( value );
-}
-
-
-Value::Value( const char *beginValue, 
-              const char *endValue )
-   : type_( stringValue )
-   , allocated_( true )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.string_ = valueAllocator()->duplicateStringValue( beginValue, 
-                                                            UInt(endValue - beginValue) );
-}
-
-
-Value::Value( const std::string &value )
-   : type_( stringValue )
-   , allocated_( true )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.string_ = valueAllocator()->duplicateStringValue( value.c_str(), 
-                                                            (unsigned int)value.length() );
-
-}
-
-Value::Value( const StaticString &value )
-   : type_( stringValue )
-   , allocated_( false )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.string_ = const_cast<char *>( value.c_str() );
-}
-
-
-# ifdef JSON_USE_CPPTL
-Value::Value( const CppTL::ConstString &value )
-   : type_( stringValue )
-   , allocated_( true )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.string_ = valueAllocator()->duplicateStringValue( value, value.length() );
-}
-# endif
-
-Value::Value( bool value )
-   : type_( booleanValue )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.bool_ = value;
-}
-
-
-Value::Value( const Value &other )
-   : type_( other.type_ )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   switch ( type_ )
-   {
-   case nullValue:
-   case intValue:
-   case uintValue:
-   case realValue:
-   case booleanValue:
-      value_ = other.value_;
-      break;
-   case stringValue:
-      if ( other.value_.string_ )
-      {
-         value_.string_ = valueAllocator()->duplicateStringValue( other.value_.string_ );
-         allocated_ = true;
-      }
-      else
-         value_.string_ = 0;
-      break;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-   case objectValue:
-      value_.map_ = new ObjectValues( *other.value_.map_ );
-      break;
-#else
-   case arrayValue:
-      value_.array_ = arrayAllocator()->newArrayCopy( *other.value_.array_ );
-      break;
-   case objectValue:
-      value_.map_ = mapAllocator()->newMapCopy( *other.value_.map_ );
-      break;
-#endif
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   if ( other.comments_ )
-   {
-      comments_ = new CommentInfo[numberOfCommentPlacement];
-      for ( int comment =0; comment < numberOfCommentPlacement; ++comment )
-      {
-         const CommentInfo &otherComment = other.comments_[comment];
-         if ( otherComment.comment_ )
-            comments_[comment].setComment( otherComment.comment_ );
-      }
-   }
-}
-
-
-Value::~Value()
-{
-   switch ( type_ )
-   {
-   case nullValue:
-   case intValue:
-   case uintValue:
-   case realValue:
-   case booleanValue:
-      break;
-   case stringValue:
-      if ( allocated_ )
-         valueAllocator()->releaseStringValue( value_.string_ );
-      break;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-   case objectValue:
-      delete value_.map_;
-      break;
-#else
-   case arrayValue:
-      arrayAllocator()->destructArray( value_.array_ );
-      break;
-   case objectValue:
-      mapAllocator()->destructMap( value_.map_ );
-      break;
-#endif
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-
-   if ( comments_ )
-      delete[] comments_;
-}
-
-Value &
-Value::operator=( const Value &other )
-{
-   Value temp( other );
-   swap( temp );
-   return *this;
-}
-
-void 
-Value::swap( Value &other )
-{
-   ValueType temp = type_;
-   type_ = other.type_;
-   other.type_ = temp;
-   std::swap( value_, other.value_ );
-   int temp2 = allocated_;
-   allocated_ = other.allocated_;
-   other.allocated_ = temp2;
-}
-
-ValueType 
-Value::type() const
-{
-   return type_;
-}
-
-
-int 
-Value::compare( const Value &other )
-{
-   /*
-   int typeDelta = other.type_ - type_;
-   switch ( type_ )
-   {
-   case nullValue:
-
-      return other.type_ == type_;
-   case intValue:
-      if ( other.type_.isNumeric()
-   case uintValue:
-   case realValue:
-   case booleanValue:
-      break;
-   case stringValue,
-      break;
-   case arrayValue:
-      delete value_.array_;
-      break;
-   case objectValue:
-      delete value_.map_;
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   */
-   return 0;  // unreachable
-}
-
-bool 
-Value::operator <( const Value &other ) const
-{
-   int typeDelta = type_ - other.type_;
-   if ( typeDelta )
-      return typeDelta < 0 ? true : false;
-   switch ( type_ )
-   {
-   case nullValue:
-      return false;
-   case intValue:
-      return value_.int_ < other.value_.int_;
-   case uintValue:
-      return value_.uint_ < other.value_.uint_;
-   case realValue:
-      return value_.real_ < other.value_.real_;
-   case booleanValue:
-      return value_.bool_ < other.value_.bool_;
-   case stringValue:
-      return ( value_.string_ == 0  &&  other.value_.string_ )
-             || ( other.value_.string_  
-                  &&  value_.string_  
-                  && strcmp( value_.string_, other.value_.string_ ) < 0 );
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-   case objectValue:
-      {
-         int delta = int( value_.map_->size() - other.value_.map_->size() );
-         if ( delta )
-            return delta < 0;
-         return (*value_.map_) < (*other.value_.map_);
-      }
-#else
-   case arrayValue:
-      return value_.array_->compare( *(other.value_.array_) ) < 0;
-   case objectValue:
-      return value_.map_->compare( *(other.value_.map_) ) < 0;
-#endif
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return 0;  // unreachable
-}
-
-bool 
-Value::operator <=( const Value &other ) const
-{
-   return !(other > *this);
-}
-
-bool 
-Value::operator >=( const Value &other ) const
-{
-   return !(*this < other);
-}
-
-bool 
-Value::operator >( const Value &other ) const
-{
-   return other < *this;
-}
-
-bool 
-Value::operator ==( const Value &other ) const
-{
-   //if ( type_ != other.type_ )
-   // GCC 2.95.3 says:
-   // attempt to take address of bit-field structure member `Json::Value::type_'
-   // Beats me, but a temp solves the problem.
-   int temp = other.type_;
-   if ( type_ != temp )
-      return false;
-   switch ( type_ )
-   {
-   case nullValue:
-      return true;
-   case intValue:
-      return value_.int_ == other.value_.int_;
-   case uintValue:
-      return value_.uint_ == other.value_.uint_;
-   case realValue:
-      return value_.real_ == other.value_.real_;
-   case booleanValue:
-      return value_.bool_ == other.value_.bool_;
-   case stringValue:
-      return ( value_.string_ == other.value_.string_ )
-             || ( other.value_.string_  
-                  &&  value_.string_  
-                  && strcmp( value_.string_, other.value_.string_ ) == 0 );
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-   case objectValue:
-      return value_.map_->size() == other.value_.map_->size()
-             && (*value_.map_) == (*other.value_.map_);
-#else
-   case arrayValue:
-      return value_.array_->compare( *(other.value_.array_) ) == 0;
-   case objectValue:
-      return value_.map_->compare( *(other.value_.map_) ) == 0;
-#endif
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return 0;  // unreachable
-}
-
-bool 
-Value::operator !=( const Value &other ) const
-{
-   return !( *this == other );
-}
-
-const char *
-Value::asCString() const
-{
-   JSON_ASSERT( type_ == stringValue );
-   return value_.string_;
-}
-
-
-std::string 
-Value::asString() const
-{
-   switch ( type_ )
-   {
-   case nullValue:
-      return "";
-   case stringValue:
-      return value_.string_ ? value_.string_ : "";
-   case booleanValue:
-      return value_.bool_ ? "true" : "false";
-   case intValue:
-   case uintValue:
-   case realValue:
-   case arrayValue:
-   case objectValue:
-      JSON_ASSERT_MESSAGE( false, "Type is not convertible to string" );
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return ""; // unreachable
-}
-
-# ifdef JSON_USE_CPPTL
-CppTL::ConstString 
-Value::asConstString() const
-{
-   return CppTL::ConstString( asString().c_str() );
-}
-# endif
-
-Value::Int 
-Value::asInt() const
-{
-   switch ( type_ )
-   {
-   case nullValue:
-      return 0;
-   case intValue:
-      return value_.int_;
-   case uintValue:
-      JSON_ASSERT_MESSAGE( value_.uint_ < (unsigned)maxInt, "integer out of signed integer range" );
-      return value_.uint_;
-   case realValue:
-      JSON_ASSERT_MESSAGE( value_.real_ >= minInt  &&  value_.real_ <= maxInt, "Real out of signed integer range" );
-      return Int( value_.real_ );
-   case booleanValue:
-      return value_.bool_ ? 1 : 0;
-   case stringValue:
-   case arrayValue:
-   case objectValue:
-      JSON_ASSERT_MESSAGE( false, "Type is not convertible to int" );
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return 0; // unreachable;
-}
-
-Value::UInt 
-Value::asUInt() const
-{
-   switch ( type_ )
-   {
-   case nullValue:
-      return 0;
-   case intValue:
-      JSON_ASSERT_MESSAGE( value_.int_ >= 0, "Negative integer can not be converted to unsigned integer" );
-      return value_.int_;
-   case uintValue:
-      return value_.uint_;
-   case realValue:
-      JSON_ASSERT_MESSAGE( value_.real_ >= 0  &&  value_.real_ <= maxUInt,  "Real out of unsigned integer range" );
-      return UInt( value_.real_ );
-   case booleanValue:
-      return value_.bool_ ? 1 : 0;
-   case stringValue:
-   case arrayValue:
-   case objectValue:
-      JSON_ASSERT_MESSAGE( false, "Type is not convertible to uint" );
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return 0; // unreachable;
-}
-
-double 
-Value::asDouble() const
-{
-   switch ( type_ )
-   {
-   case nullValue:
-      return 0.0;
-   case intValue:
-      return value_.int_;
-   case uintValue:
-      return value_.uint_;
-   case realValue:
-      return value_.real_;
-   case booleanValue:
-      return value_.bool_ ? 1.0 : 0.0;
-   case stringValue:
-   case arrayValue:
-   case objectValue:
-      JSON_ASSERT_MESSAGE( false, "Type is not convertible to double" );
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return 0; // unreachable;
-}
-
-bool 
-Value::asBool() const
-{
-   switch ( type_ )
-   {
-   case nullValue:
-      return false;
-   case intValue:
-   case uintValue:
-      return value_.int_ != 0;
-   case realValue:
-      return value_.real_ != 0.0;
-   case booleanValue:
-      return value_.bool_;
-   case stringValue:
-      return value_.string_  &&  value_.string_[0] != 0;
-   case arrayValue:
-   case objectValue:
-      return value_.map_->size() != 0;
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return false; // unreachable;
-}
-
-
-bool 
-Value::isConvertibleTo( ValueType other ) const
-{
-   switch ( type_ )
-   {
-   case nullValue:
-      return true;
-   case intValue:
-      return ( other == nullValue  &&  value_.int_ == 0 )
-             || other == intValue
-             || ( other == uintValue  && value_.int_ >= 0 )
-             || other == realValue
-             || other == stringValue
-             || other == booleanValue;
-   case uintValue:
-      return ( other == nullValue  &&  value_.uint_ == 0 )
-             || ( other == intValue  && value_.uint_ <= (unsigned)maxInt )
-             || other == uintValue
-             || other == realValue
-             || other == stringValue
-             || other == booleanValue;
-   case realValue:
-      return ( other == nullValue  &&  value_.real_ == 0.0 )
-             || ( other == intValue  &&  value_.real_ >= minInt  &&  value_.real_ <= maxInt )
-             || ( other == uintValue  &&  value_.real_ >= 0  &&  value_.real_ <= maxUInt )
-             || other == realValue
-             || other == stringValue
-             || other == booleanValue;
-   case booleanValue:
-      return ( other == nullValue  &&  value_.bool_ == false )
-             || other == intValue
-             || other == uintValue
-             || other == realValue
-             || other == stringValue
-             || other == booleanValue;
-   case stringValue:
-      return other == stringValue
-             || ( other == nullValue  &&  (!value_.string_  ||  value_.string_[0] == 0) );
-   case arrayValue:
-      return other == arrayValue
-             ||  ( other == nullValue  &&  value_.map_->size() == 0 );
-   case objectValue:
-      return other == objectValue
-             ||  ( other == nullValue  &&  value_.map_->size() == 0 );
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return false; // unreachable;
-}
-
-
-/// Number of values in array or object
-Value::UInt 
-Value::size() const
-{
-   switch ( type_ )
-   {
-   case nullValue:
-   case intValue:
-   case uintValue:
-   case realValue:
-   case booleanValue:
-   case stringValue:
-      return 0;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:  // size of the array is highest index + 1
-      if ( !value_.map_->empty() )
-      {
-         ObjectValues::const_iterator itLast = value_.map_->end();
-         --itLast;
-         return (*itLast).first.index()+1;
-      }
-      return 0;
-   case objectValue:
-      return Int( value_.map_->size() );
-#else
-   case arrayValue:
-      return Int( value_.array_->size() );
-   case objectValue:
-      return Int( value_.map_->size() );
-#endif
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return 0; // unreachable;
-}
-
-
-bool 
-Value::empty() const
-{
-   if ( isNull() || isArray() || isObject() )
-      return size() == 0u;
-   else
-      return false;
-}
-
-
-bool
-Value::operator!() const
-{
-   return isNull();
-}
-
-
-void 
-Value::clear()
-{
-   JSON_ASSERT( type_ == nullValue  ||  type_ == arrayValue  || type_ == objectValue );
-
-   switch ( type_ )
-   {
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-   case objectValue:
-      value_.map_->clear();
-      break;
-#else
-   case arrayValue:
-      value_.array_->clear();
-      break;
-   case objectValue:
-      value_.map_->clear();
-      break;
-#endif
-   default:
-      break;
-   }
-}
-
-void 
-Value::resize( UInt newSize )
-{
-   JSON_ASSERT( type_ == nullValue  ||  type_ == arrayValue );
-   if ( type_ == nullValue )
-      *this = Value( arrayValue );
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   UInt oldSize = size();
-   if ( newSize == 0 )
-      clear();
-   else if ( newSize > oldSize )
-      (*this)[ newSize - 1 ];
-   else
-   {
-      for ( UInt index = newSize; index < oldSize; ++index )
-         value_.map_->erase( index );
-      assert( size() == newSize );
-   }
-#else
-   value_.array_->resize( newSize );
-#endif
-}
-
-
-Value &
-Value::operator[]( UInt index )
-{
-   JSON_ASSERT( type_ == nullValue  ||  type_ == arrayValue );
-   if ( type_ == nullValue )
-      *this = Value( arrayValue );
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   CZString key( index );
-   ObjectValues::iterator it = value_.map_->lower_bound( key );
-   if ( it != value_.map_->end()  &&  (*it).first == key )
-      return (*it).second;
-
-   ObjectValues::value_type defaultValue( key, null );
-   it = value_.map_->insert( it, defaultValue );
-   return (*it).second;
-#else
-   return value_.array_->resolveReference( index );
-#endif
-}
-
-
-const Value &
-Value::operator[]( UInt index ) const
-{
-   JSON_ASSERT( type_ == nullValue  ||  type_ == arrayValue );
-   if ( type_ == nullValue )
-      return null;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   CZString key( index );
-   ObjectValues::const_iterator it = value_.map_->find( key );
-   if ( it == value_.map_->end() )
-      return null;
-   return (*it).second;
-#else
-   Value *value = value_.array_->find( index );
-   return value ? *value : null;
-#endif
-}
-
-
-Value &
-Value::operator[]( const char *key )
-{
-   return resolveReference( key, false );
-}
-
-
-Value &
-Value::resolveReference( const char *key, 
-                         bool isStatic )
-{
-   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
-   if ( type_ == nullValue )
-      *this = Value( objectValue );
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   CZString actualKey( key, isStatic ? CZString::noDuplication 
-                                     : CZString::duplicateOnCopy );
-   ObjectValues::iterator it = value_.map_->lower_bound( actualKey );
-   if ( it != value_.map_->end()  &&  (*it).first == actualKey )
-      return (*it).second;
-
-   ObjectValues::value_type defaultValue( actualKey, null );
-   it = value_.map_->insert( it, defaultValue );
-   Value &value = (*it).second;
-   return value;
-#else
-   return value_.map_->resolveReference( key, isStatic );
-#endif
-}
-
-
-Value 
-Value::get( UInt index, 
-            const Value &defaultValue ) const
-{
-   const Value *value = &((*this)[index]);
-   return value == &null ? defaultValue : *value;
-}
-
-
-bool 
-Value::isValidIndex( UInt index ) const
-{
-   return index < size();
-}
-
-
-
-const Value &
-Value::operator[]( const char *key ) const
-{
-   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
-   if ( type_ == nullValue )
-      return null;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   CZString actualKey( key, CZString::noDuplication );
-   ObjectValues::const_iterator it = value_.map_->find( actualKey );
-   if ( it == value_.map_->end() )
-      return null;
-   return (*it).second;
-#else
-   const Value *value = value_.map_->find( key );
-   return value ? *value : null;
-#endif
-}
-
-
-Value &
-Value::operator[]( const std::string &key )
-{
-   return (*this)[ key.c_str() ];
-}
-
-
-const Value &
-Value::operator[]( const std::string &key ) const
-{
-   return (*this)[ key.c_str() ];
-}
-
-Value &
-Value::operator[]( const StaticString &key )
-{
-   return resolveReference( key, true );
-}
-
-
-# ifdef JSON_USE_CPPTL
-Value &
-Value::operator[]( const CppTL::ConstString &key )
-{
-   return (*this)[ key.c_str() ];
-}
-
-
-const Value &
-Value::operator[]( const CppTL::ConstString &key ) const
-{
-   return (*this)[ key.c_str() ];
-}
-# endif
-
-
-Value &
-Value::append( const Value &value )
-{
-   return (*this)[size()] = value;
-}
-
-
-Value 
-Value::get( const char *key, 
-            const Value &defaultValue ) const
-{
-   const Value *value = &((*this)[key]);
-   return value == &null ? defaultValue : *value;
-}
-
-
-Value 
-Value::get( const std::string &key,
-            const Value &defaultValue ) const
-{
-   return get( key.c_str(), defaultValue );
-}
-
-Value
-Value::removeMember( const char* key )
-{
-   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
-   if ( type_ == nullValue )
-      return null;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   CZString actualKey( key, CZString::noDuplication );
-   ObjectValues::iterator it = value_.map_->find( actualKey );
-   if ( it == value_.map_->end() )
-      return null;
-   Value old(it->second);
-   value_.map_->erase(it);
-   return old;
-#else
-   Value *value = value_.map_->find( key );
-   if (value){
-      Value old(*value);
-      value_.map_.remove( key );
-      return old;
-   } else {
-      return null;
-   }
-#endif
-}
-
-Value
-Value::removeMember( const std::string &key )
-{
-   return removeMember( key.c_str() );
-}
-
-# ifdef JSON_USE_CPPTL
-Value 
-Value::get( const CppTL::ConstString &key,
-            const Value &defaultValue ) const
-{
-   return get( key.c_str(), defaultValue );
-}
-# endif
-
-bool 
-Value::isMember( const char *key ) const
-{
-   const Value *value = &((*this)[key]);
-   return value != &null;
-}
-
-
-bool 
-Value::isMember( const std::string &key ) const
-{
-   return isMember( key.c_str() );
-}
-
-
-# ifdef JSON_USE_CPPTL
-bool 
-Value::isMember( const CppTL::ConstString &key ) const
-{
-   return isMember( key.c_str() );
-}
-#endif
-
-Value::Members 
-Value::getMemberNames() const
-{
-   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
-   if ( type_ == nullValue )
-       return Value::Members();
-   Members members;
-   members.reserve( value_.map_->size() );
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   ObjectValues::const_iterator it = value_.map_->begin();
-   ObjectValues::const_iterator itEnd = value_.map_->end();
-   for ( ; it != itEnd; ++it )
-      members.push_back( std::string( (*it).first.c_str() ) );
-#else
-   ValueInternalMap::IteratorState it;
-   ValueInternalMap::IteratorState itEnd;
-   value_.map_->makeBeginIterator( it );
-   value_.map_->makeEndIterator( itEnd );
-   for ( ; !ValueInternalMap::equals( it, itEnd ); ValueInternalMap::increment(it) )
-      members.push_back( std::string( ValueInternalMap::key( it ) ) );
-#endif
-   return members;
-}
-//
-//# ifdef JSON_USE_CPPTL
-//EnumMemberNames
-//Value::enumMemberNames() const
-//{
-//   if ( type_ == objectValue )
-//   {
-//      return CppTL::Enum::any(  CppTL::Enum::transform(
-//         CppTL::Enum::keys( *(value_.map_), CppTL::Type<const CZString &>() ),
-//         MemberNamesTransform() ) );
-//   }
-//   return EnumMemberNames();
-//}
-//
-//
-//EnumValues 
-//Value::enumValues() const
-//{
-//   if ( type_ == objectValue  ||  type_ == arrayValue )
-//      return CppTL::Enum::anyValues( *(value_.map_), 
-//                                     CppTL::Type<const Value &>() );
-//   return EnumValues();
-//}
-//
-//# endif
-
-
-bool
-Value::isNull() const
-{
-   return type_ == nullValue;
-}
-
-
-bool 
-Value::isBool() const
-{
-   return type_ == booleanValue;
-}
-
-
-bool 
-Value::isInt() const
-{
-   return type_ == intValue;
-}
-
-
-bool 
-Value::isUInt() const
-{
-   return type_ == uintValue;
-}
-
-
-bool 
-Value::isIntegral() const
-{
-   return type_ == intValue  
-          ||  type_ == uintValue  
-          ||  type_ == booleanValue;
-}
-
-
-bool 
-Value::isDouble() const
-{
-   return type_ == realValue;
-}
-
-
-bool 
-Value::isNumeric() const
-{
-   return isIntegral() || isDouble();
-}
-
-
-bool 
-Value::isString() const
-{
-   return type_ == stringValue;
-}
-
-
-bool 
-Value::isArray() const
-{
-   return type_ == nullValue  ||  type_ == arrayValue;
-}
-
-
-bool 
-Value::isObject() const
-{
-   return type_ == nullValue  ||  type_ == objectValue;
-}
-
-
-void 
-Value::setComment( const char *comment,
-                   CommentPlacement placement )
-{
-   if ( !comments_ )
-      comments_ = new CommentInfo[numberOfCommentPlacement];
-   comments_[placement].setComment( comment );
-}
-
-
-void 
-Value::setComment( const std::string &comment,
-                   CommentPlacement placement )
-{
-   setComment( comment.c_str(), placement );
-}
-
-
-bool 
-Value::hasComment( CommentPlacement placement ) const
-{
-   return comments_ != 0  &&  comments_[placement].comment_ != 0;
-}
-
-std::string 
-Value::getComment( CommentPlacement placement ) const
-{
-   if ( hasComment(placement) )
-      return comments_[placement].comment_;
-   return "";
-}
-
-
-std::string 
-Value::toStyledString() const
-{
-   StyledWriter writer;
-   return writer.write( *this );
-}
-
-
-Value::const_iterator 
-Value::begin() const
-{
-   switch ( type_ )
-   {
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-      if ( value_.array_ )
-      {
-         ValueInternalArray::IteratorState it;
-         value_.array_->makeBeginIterator( it );
-         return const_iterator( it );
-      }
-      break;
-   case objectValue:
-      if ( value_.map_ )
-      {
-         ValueInternalMap::IteratorState it;
-         value_.map_->makeBeginIterator( it );
-         return const_iterator( it );
-      }
-      break;
-#else
-   case arrayValue:
-   case objectValue:
-      if ( value_.map_ )
-         return const_iterator( value_.map_->begin() );
-      break;
-#endif
-   default:
-      break;
-   }
-   return const_iterator();
-}
-
-Value::const_iterator 
-Value::end() const
-{
-   switch ( type_ )
-   {
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-      if ( value_.array_ )
-      {
-         ValueInternalArray::IteratorState it;
-         value_.array_->makeEndIterator( it );
-         return const_iterator( it );
-      }
-      break;
-   case objectValue:
-      if ( value_.map_ )
-      {
-         ValueInternalMap::IteratorState it;
-         value_.map_->makeEndIterator( it );
-         return const_iterator( it );
-      }
-      break;
-#else
-   case arrayValue:
-   case objectValue:
-      if ( value_.map_ )
-         return const_iterator( value_.map_->end() );
-      break;
-#endif
-   default:
-      break;
-   }
-   return const_iterator();
-}
-
-
-Value::iterator 
-Value::begin()
-{
-   switch ( type_ )
-   {
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-      if ( value_.array_ )
-      {
-         ValueInternalArray::IteratorState it;
-         value_.array_->makeBeginIterator( it );
-         return iterator( it );
-      }
-      break;
-   case objectValue:
-      if ( value_.map_ )
-      {
-         ValueInternalMap::IteratorState it;
-         value_.map_->makeBeginIterator( it );
-         return iterator( it );
-      }
-      break;
-#else
-   case arrayValue:
-   case objectValue:
-      if ( value_.map_ )
-         return iterator( value_.map_->begin() );
-      break;
-#endif
-   default:
-      break;
-   }
-   return iterator();
-}
-
-Value::iterator 
-Value::end()
-{
-   switch ( type_ )
-   {
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-      if ( value_.array_ )
-      {
-         ValueInternalArray::IteratorState it;
-         value_.array_->makeEndIterator( it );
-         return iterator( it );
-      }
-      break;
-   case objectValue:
-      if ( value_.map_ )
-      {
-         ValueInternalMap::IteratorState it;
-         value_.map_->makeEndIterator( it );
-         return iterator( it );
-      }
-      break;
-#else
-   case arrayValue:
-   case objectValue:
-      if ( value_.map_ )
-         return iterator( value_.map_->end() );
-      break;
-#endif
-   default:
-      break;
-   }
-   return iterator();
-}
-
-
-// class PathArgument
-// //////////////////////////////////////////////////////////////////
-
-PathArgument::PathArgument()
-   : kind_( kindNone )
-{
-}
-
-
-PathArgument::PathArgument( Value::UInt index )
-   : index_( index )
-   , kind_( kindIndex )
-{
-}
-
-
-PathArgument::PathArgument( const char *key )
-   : key_( key )
-   , kind_( kindKey )
-{
-}
-
-
-PathArgument::PathArgument( const std::string &key )
-   : key_( key.c_str() )
-   , kind_( kindKey )
-{
-}
-
-// class Path
-// //////////////////////////////////////////////////////////////////
-
-Path::Path( const std::string &path,
-            const PathArgument &a1,
-            const PathArgument &a2,
-            const PathArgument &a3,
-            const PathArgument &a4,
-            const PathArgument &a5 )
-{
-   InArgs in;
-   in.push_back( &a1 );
-   in.push_back( &a2 );
-   in.push_back( &a3 );
-   in.push_back( &a4 );
-   in.push_back( &a5 );
-   makePath( path, in );
-}
-
-
-void 
-Path::makePath( const std::string &path,
-                const InArgs &in )
-{
-   const char *current = path.c_str();
-   const char *end = current + path.length();
-   InArgs::const_iterator itInArg = in.begin();
-   while ( current != end )
-   {
-      if ( *current == '[' )
-      {
-         ++current;
-         if ( *current == '%' )
-            addPathInArg( path, in, itInArg, PathArgument::kindIndex );
-         else
-         {
-            Value::UInt index = 0;
-            for ( ; current != end && *current >= '0'  &&  *current <= '9'; ++current )
-               index = index * 10 + Value::UInt(*current - '0');
-            args_.push_back( index );
-         }
-         if ( current == end  ||  *current++ != ']' )
-            invalidPath( path, int(current - path.c_str()) );
-      }
-      else if ( *current == '%' )
-      {
-         addPathInArg( path, in, itInArg, PathArgument::kindKey );
-         ++current;
-      }
-      else if ( *current == '.' )
-      {
-         ++current;
-      }
-      else
-      {
-         const char *beginName = current;
-         while ( current != end  &&  !strchr( "[.", *current ) )
-            ++current;
-         args_.push_back( std::string( beginName, current ) );
-      }
-   }
-}
-
-
-void 
-Path::addPathInArg( const std::string &path, 
-                    const InArgs &in, 
-                    InArgs::const_iterator &itInArg, 
-                    PathArgument::Kind kind )
-{
-   if ( itInArg == in.end() )
-   {
-      // Error: missing argument %d
-   }
-   else if ( (*itInArg)->kind_ != kind )
-   {
-      // Error: bad argument type
-   }
-   else
-   {
-      args_.push_back( **itInArg );
-   }
-}
-
-
-void 
-Path::invalidPath( const std::string &path, 
-                   int location )
-{
-   // Error: invalid path.
-}
-
-
-const Value &
-Path::resolve( const Value &root ) const
-{
-   const Value *node = &root;
-   for ( Args::const_iterator it = args_.begin(); it != args_.end(); ++it )
-   {
-      const PathArgument &arg = *it;
-      if ( arg.kind_ == PathArgument::kindIndex )
-      {
-         if ( !node->isArray()  ||  node->isValidIndex( arg.index_ ) )
-         {
-            // Error: unable to resolve path (array value expected at position...
-         }
-         node = &((*node)[arg.index_]);
-      }
-      else if ( arg.kind_ == PathArgument::kindKey )
-      {
-         if ( !node->isObject() )
-         {
-            // Error: unable to resolve path (object value expected at position...)
-         }
-         node = &((*node)[arg.key_]);
-         if ( node == &Value::null )
-         {
-            // Error: unable to resolve path (object has no member named '' at position...)
-         }
-      }
-   }
-   return *node;
-}
-
-
-Value 
-Path::resolve( const Value &root, 
-               const Value &defaultValue ) const
-{
-   const Value *node = &root;
-   for ( Args::const_iterator it = args_.begin(); it != args_.end(); ++it )
-   {
-      const PathArgument &arg = *it;
-      if ( arg.kind_ == PathArgument::kindIndex )
-      {
-         if ( !node->isArray()  ||  node->isValidIndex( arg.index_ ) )
-            return defaultValue;
-         node = &((*node)[arg.index_]);
-      }
-      else if ( arg.kind_ == PathArgument::kindKey )
-      {
-         if ( !node->isObject() )
-            return defaultValue;
-         node = &((*node)[arg.key_]);
-         if ( node == &Value::null )
-            return defaultValue;
-      }
-   }
-   return *node;
-}
-
-
-Value &
-Path::make( Value &root ) const
-{
-   Value *node = &root;
-   for ( Args::const_iterator it = args_.begin(); it != args_.end(); ++it )
-   {
-      const PathArgument &arg = *it;
-      if ( arg.kind_ == PathArgument::kindIndex )
-      {
-         if ( !node->isArray() )
-         {
-            // Error: node is not an array at position ...
-         }
-         node = &((*node)[arg.index_]);
-      }
-      else if ( arg.kind_ == PathArgument::kindKey )
-      {
-         if ( !node->isObject() )
-         {
-            // Error: node is not an object at position...
-         }
-         node = &((*node)[arg.key_]);
-      }
-   }
-   return *node;
-}
-
-
-} // namespace Json

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/src/blackberry10/native/public/json_valueiterator.inl
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/src/blackberry10/native/public/json_valueiterator.inl b/spec/plugins/cordova.echo/src/blackberry10/native/public/json_valueiterator.inl
deleted file mode 100644
index 736e260..0000000
--- a/spec/plugins/cordova.echo/src/blackberry10/native/public/json_valueiterator.inl
+++ /dev/null
@@ -1,292 +0,0 @@
-// included by json_value.cpp
-// everything is within Json namespace
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class ValueIteratorBase
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-ValueIteratorBase::ValueIteratorBase()
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   : current_()
-   , isNull_( true )
-{
-}
-#else
-   : isArray_( true )
-   , isNull_( true )
-{
-   iterator_.array_ = ValueInternalArray::IteratorState();
-}
-#endif
-
-
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-ValueIteratorBase::ValueIteratorBase( const Value::ObjectValues::iterator &current )
-   : current_( current )
-   , isNull_( false )
-{
-}
-#else
-ValueIteratorBase::ValueIteratorBase( const ValueInternalArray::IteratorState &state )
-   : isArray_( true )
-{
-   iterator_.array_ = state;
-}
-
-
-ValueIteratorBase::ValueIteratorBase( const ValueInternalMap::IteratorState &state )
-   : isArray_( false )
-{
-   iterator_.map_ = state;
-}
-#endif
-
-Value &
-ValueIteratorBase::deref() const
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   return current_->second;
-#else
-   if ( isArray_ )
-      return ValueInternalArray::dereference( iterator_.array_ );
-   return ValueInternalMap::value( iterator_.map_ );
-#endif
-}
-
-
-void 
-ValueIteratorBase::increment()
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   ++current_;
-#else
-   if ( isArray_ )
-      ValueInternalArray::increment( iterator_.array_ );
-   ValueInternalMap::increment( iterator_.map_ );
-#endif
-}
-
-
-void 
-ValueIteratorBase::decrement()
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   --current_;
-#else
-   if ( isArray_ )
-      ValueInternalArray::decrement( iterator_.array_ );
-   ValueInternalMap::decrement( iterator_.map_ );
-#endif
-}
-
-
-ValueIteratorBase::difference_type 
-ValueIteratorBase::computeDistance( const SelfType &other ) const
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-# ifdef JSON_USE_CPPTL_SMALLMAP
-   return current_ - other.current_;
-# else
-   // Iterator for null value are initialized using the default
-   // constructor, which initialize current_ to the default
-   // std::map::iterator. As begin() and end() are two instance 
-   // of the default std::map::iterator, they can not be compared.
-   // To allow this, we handle this comparison specifically.
-   if ( isNull_  &&  other.isNull_ )
-   {
-      return 0;
-   }
-
-
-   // Usage of std::distance is not portable (does not compile with Sun Studio 12 RogueWave STL,
-   // which is the one used by default).
-   // Using a portable hand-made version for non random iterator instead:
-   //   return difference_type( std::distance( current_, other.current_ ) );
-   difference_type myDistance = 0;
-   for ( Value::ObjectValues::iterator it = current_; it != other.current_; ++it )
-   {
-      ++myDistance;
-   }
-   return myDistance;
-# endif
-#else
-   if ( isArray_ )
-      return ValueInternalArray::distance( iterator_.array_, other.iterator_.array_ );
-   return ValueInternalMap::distance( iterator_.map_, other.iterator_.map_ );
-#endif
-}
-
-
-bool 
-ValueIteratorBase::isEqual( const SelfType &other ) const
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   if ( isNull_ )
-   {
-      return other.isNull_;
-   }
-   return current_ == other.current_;
-#else
-   if ( isArray_ )
-      return ValueInternalArray::equals( iterator_.array_, other.iterator_.array_ );
-   return ValueInternalMap::equals( iterator_.map_, other.iterator_.map_ );
-#endif
-}
-
-
-void 
-ValueIteratorBase::copy( const SelfType &other )
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   current_ = other.current_;
-#else
-   if ( isArray_ )
-      iterator_.array_ = other.iterator_.array_;
-   iterator_.map_ = other.iterator_.map_;
-#endif
-}
-
-
-Value 
-ValueIteratorBase::key() const
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   const Value::CZString czstring = (*current_).first;
-   if ( czstring.c_str() )
-   {
-      if ( czstring.isStaticString() )
-         return Value( StaticString( czstring.c_str() ) );
-      return Value( czstring.c_str() );
-   }
-   return Value( czstring.index() );
-#else
-   if ( isArray_ )
-      return Value( ValueInternalArray::indexOf( iterator_.array_ ) );
-   bool isStatic;
-   const char *memberName = ValueInternalMap::key( iterator_.map_, isStatic );
-   if ( isStatic )
-      return Value( StaticString( memberName ) );
-   return Value( memberName );
-#endif
-}
-
-
-UInt 
-ValueIteratorBase::index() const
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   const Value::CZString czstring = (*current_).first;
-   if ( !czstring.c_str() )
-      return czstring.index();
-   return Value::UInt( -1 );
-#else
-   if ( isArray_ )
-      return Value::UInt( ValueInternalArray::indexOf( iterator_.array_ ) );
-   return Value::UInt( -1 );
-#endif
-}
-
-
-const char *
-ValueIteratorBase::memberName() const
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   const char *name = (*current_).first.c_str();
-   return name ? name : "";
-#else
-   if ( !isArray_ )
-      return ValueInternalMap::key( iterator_.map_ );
-   return "";
-#endif
-}
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class ValueConstIterator
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-ValueConstIterator::ValueConstIterator()
-{
-}
-
-
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-ValueConstIterator::ValueConstIterator( const Value::ObjectValues::iterator &current )
-   : ValueIteratorBase( current )
-{
-}
-#else
-ValueConstIterator::ValueConstIterator( const ValueInternalArray::IteratorState &state )
-   : ValueIteratorBase( state )
-{
-}
-
-ValueConstIterator::ValueConstIterator( const ValueInternalMap::IteratorState &state )
-   : ValueIteratorBase( state )
-{
-}
-#endif
-
-ValueConstIterator &
-ValueConstIterator::operator =( const ValueIteratorBase &other )
-{
-   copy( other );
-   return *this;
-}
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class ValueIterator
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-ValueIterator::ValueIterator()
-{
-}
-
-
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-ValueIterator::ValueIterator( const Value::ObjectValues::iterator &current )
-   : ValueIteratorBase( current )
-{
-}
-#else
-ValueIterator::ValueIterator( const ValueInternalArray::IteratorState &state )
-   : ValueIteratorBase( state )
-{
-}
-
-ValueIterator::ValueIterator( const ValueInternalMap::IteratorState &state )
-   : ValueIteratorBase( state )
-{
-}
-#endif
-
-ValueIterator::ValueIterator( const ValueConstIterator &other )
-   : ValueIteratorBase( other )
-{
-}
-
-ValueIterator::ValueIterator( const ValueIterator &other )
-   : ValueIteratorBase( other )
-{
-}
-
-ValueIterator &
-ValueIterator::operator =( const SelfType &other )
-{
-   copy( other );
-   return *this;
-}


[31/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/ios-config-xml/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/ios-config-xml/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/cordova-lib/spec-plugman/projects/ios-config-xml/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..5d0d461
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/ios-config-xml/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
@@ -0,0 +1,636 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		1F2BECC013F9785B00A93BF6 /* CDVBattery.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F2BECBE13F9785B00A93BF6 /* CDVBattery.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		1F2BECC113F9785B00A93BF6 /* CDVBattery.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F2BECBF13F9785B00A93BF6 /* CDVBattery.m */; };
+		1F3C04CE12BC247D004F9E10 /* CDVContact.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F3C04CC12BC247D004F9E10 /* CDVContact.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		1F3C04CF12BC247D004F9E10 /* CDVContact.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F3C04CD12BC247D004F9E10 /* CDVContact.m */; };
+		1F584B9B1385A28A00ED25E8 /* CDVCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F584B991385A28900ED25E8 /* CDVCapture.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		1F584B9C1385A28A00ED25E8 /* CDVCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F584B9A1385A28900ED25E8 /* CDVCapture.m */; };
+		1F92F4A01314023E0046367C /* CDVPluginResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F92F49E1314023E0046367C /* CDVPluginResult.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		1F92F4A11314023E0046367C /* CDVPluginResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F92F49F1314023E0046367C /* CDVPluginResult.m */; };
+		301F2F2A14F3C9CA003FE9FC /* CDV.h in Headers */ = {isa = PBXBuildFile; fileRef = 301F2F2914F3C9CA003FE9FC /* CDV.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		302965BC13A94E9D007046C5 /* CDVDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 302965BB13A94E9D007046C5 /* CDVDebug.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		3034979C1513D56A0090E688 /* CDVLocalStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 3034979A1513D56A0090E688 /* CDVLocalStorage.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		3034979E1513D56A0090E688 /* CDVLocalStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 3034979B1513D56A0090E688 /* CDVLocalStorage.m */; };
+		30392E4E14F4FCAB00B9E0B8 /* CDVAvailability.h in Headers */ = {isa = PBXBuildFile; fileRef = 30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		3062D120151D0EDB000D9128 /* UIDevice+Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		3062D122151D0EDB000D9128 /* UIDevice+Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */; };
+		307A8F9E1385A2EC00E43782 /* CDVConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 307A8F9C1385A2EC00E43782 /* CDVConnection.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		307A8F9F1385A2EC00E43782 /* CDVConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 307A8F9D1385A2EC00E43782 /* CDVConnection.m */; };
+		30A90B9114588697006178D3 /* JSONKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 30A90B8F14588697006178D3 /* JSONKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		30A90B9314588697006178D3 /* JSONKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 30A90B9014588697006178D3 /* JSONKit.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+		30B39EBE13D0268B0009682A /* CDVSplashScreen.h in Headers */ = {isa = PBXBuildFile; fileRef = 30B39EBC13D0268B0009682A /* CDVSplashScreen.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		30B39EBF13D0268B0009682A /* CDVSplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 30B39EBD13D0268B0009682A /* CDVSplashScreen.m */; };
+		30C5F1DF15AF9E950052A00D /* CDVDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C5F1DD15AF9E950052A00D /* CDVDevice.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		30C5F1E015AF9E950052A00D /* CDVDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C5F1DE15AF9E950052A00D /* CDVDevice.m */; };
+		30C684801406CB38004C1A8E /* CDVWhitelist.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C6847E1406CB38004C1A8E /* CDVWhitelist.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		30C684821406CB38004C1A8E /* CDVWhitelist.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C6847F1406CB38004C1A8E /* CDVWhitelist.m */; };
+		30C684941407044B004C1A8E /* CDVURLProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C684921407044A004C1A8E /* CDVURLProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		30C684961407044B004C1A8E /* CDVURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C684931407044A004C1A8E /* CDVURLProtocol.m */; };
+		30E33AF213A7E24B00594D64 /* CDVPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E33AF013A7E24B00594D64 /* CDVPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		30E33AF313A7E24B00594D64 /* CDVPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 30E33AF113A7E24B00594D64 /* CDVPlugin.m */; };
+		30E563CF13E217EC00C949AA /* NSMutableArray+QueueAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		30E563D013E217EC00C949AA /* NSMutableArray+QueueAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */; };
+		30F5EBAB14CA26E700987760 /* CDVCommandDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		3E76876D156A90EE00EB6FA3 /* CDVLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E76876B156A90EE00EB6FA3 /* CDVLogger.m */; };
+		3E76876F156A90EE00EB6FA3 /* CDVLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E76876C156A90EE00EB6FA3 /* CDVLogger.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8852C43A14B65FD800F0E735 /* CDVViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 8852C43614B65FD800F0E735 /* CDVViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8852C43C14B65FD800F0E735 /* CDVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8852C43714B65FD800F0E735 /* CDVViewController.m */; };
+		8852C43F14B65FD800F0E735 /* CDVCordovaView.h in Headers */ = {isa = PBXBuildFile; fileRef = 8852C43814B65FD800F0E735 /* CDVCordovaView.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8852C44114B65FD800F0E735 /* CDVCordovaView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8852C43914B65FD800F0E735 /* CDVCordovaView.m */; };
+		8887FD661090FBE7009987E8 /* CDVCamera.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD261090FBE7009987E8 /* CDVCamera.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD671090FBE7009987E8 /* CDVCamera.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD271090FBE7009987E8 /* CDVCamera.m */; };
+		8887FD681090FBE7009987E8 /* NSDictionary+Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD691090FBE7009987E8 /* NSDictionary+Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD291090FBE7009987E8 /* NSDictionary+Extensions.m */; };
+		8887FD6A1090FBE7009987E8 /* CDVContacts.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD2A1090FBE7009987E8 /* CDVContacts.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD6B1090FBE7009987E8 /* CDVContacts.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD2B1090FBE7009987E8 /* CDVContacts.m */; };
+		8887FD6C1090FBE7009987E8 /* CDVDebugConsole.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD2C1090FBE7009987E8 /* CDVDebugConsole.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD6D1090FBE7009987E8 /* CDVDebugConsole.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD2D1090FBE7009987E8 /* CDVDebugConsole.m */; };
+		8887FD701090FBE7009987E8 /* CDVFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD301090FBE7009987E8 /* CDVFile.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD711090FBE7009987E8 /* CDVFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD311090FBE7009987E8 /* CDVFile.m */; };
+		8887FD741090FBE7009987E8 /* CDVInvokedUrlCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD751090FBE7009987E8 /* CDVInvokedUrlCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */; };
+		8887FD851090FBE7009987E8 /* CDVLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD461090FBE7009987E8 /* CDVLocation.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD861090FBE7009987E8 /* CDVLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD471090FBE7009987E8 /* CDVLocation.m */; };
+		8887FD8D1090FBE7009987E8 /* CDVNotification.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD4E1090FBE7009987E8 /* CDVNotification.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD8E1090FBE7009987E8 /* CDVNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD4F1090FBE7009987E8 /* CDVNotification.m */; };
+		8887FD8F1090FBE7009987E8 /* NSData+Base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD501090FBE7009987E8 /* NSData+Base64.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD901090FBE7009987E8 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD511090FBE7009987E8 /* NSData+Base64.m */; };
+		8887FD9D1090FBE7009987E8 /* CDVReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD5E1090FBE7009987E8 /* CDVReachability.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD9E1090FBE7009987E8 /* CDVReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD5F1090FBE7009987E8 /* CDVReachability.m */; };
+		8887FD9F1090FBE7009987E8 /* CDVSound.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD601090FBE7009987E8 /* CDVSound.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FDA01090FBE7009987E8 /* CDVSound.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD611090FBE7009987E8 /* CDVSound.m */; };
+		88BA573D109BB46F00FB5E78 /* CDVAccelerometer.h in Headers */ = {isa = PBXBuildFile; fileRef = 88BA573B109BB46F00FB5E78 /* CDVAccelerometer.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		88BA573E109BB46F00FB5E78 /* CDVAccelerometer.m in Sources */ = {isa = PBXBuildFile; fileRef = 88BA573C109BB46F00FB5E78 /* CDVAccelerometer.m */; };
+		9D76CF3C1625A4C50008A0F6 /* CDVGlobalization.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D76CF3A1625A4C50008A0F6 /* CDVGlobalization.h */; };
+		9D76CF3D1625A4C50008A0F6 /* CDVGlobalization.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D76CF3B1625A4C50008A0F6 /* CDVGlobalization.m */; };
+		C937A4561337599E002C4C79 /* CDVFileTransfer.h in Headers */ = {isa = PBXBuildFile; fileRef = C937A4541337599E002C4C79 /* CDVFileTransfer.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		C937A4571337599E002C4C79 /* CDVFileTransfer.m in Sources */ = {isa = PBXBuildFile; fileRef = C937A4551337599E002C4C79 /* CDVFileTransfer.m */; };
+		EB3B3547161CB44D003DBE7D /* CDVCommandQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */; };
+		EB3B3548161CB44D003DBE7D /* CDVCommandQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */; };
+		EB3B357C161F2A45003DBE7D /* CDVCommandDelegateImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */; };
+		EB3B357D161F2A45003DBE7D /* CDVCommandDelegateImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */; };
+		EB80C2AC15DEA63D004D9E7B /* CDVEcho.h in Headers */ = {isa = PBXBuildFile; fileRef = EB80C2AA15DEA63D004D9E7B /* CDVEcho.h */; };
+		EB80C2AD15DEA63D004D9E7B /* CDVEcho.m in Sources */ = {isa = PBXBuildFile; fileRef = EB80C2AB15DEA63D004D9E7B /* CDVEcho.m */; };
+		EBA3557315ABD38C00F4DE24 /* NSArray+Comparisons.h in Headers */ = {isa = PBXBuildFile; fileRef = EBA3557115ABD38C00F4DE24 /* NSArray+Comparisons.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EBA3557515ABD38C00F4DE24 /* NSArray+Comparisons.m in Sources */ = {isa = PBXBuildFile; fileRef = EBA3557215ABD38C00F4DE24 /* NSArray+Comparisons.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		1F2BECBE13F9785B00A93BF6 /* CDVBattery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVBattery.h; path = Classes/CDVBattery.h; sourceTree = "<group>"; };
+		1F2BECBF13F9785B00A93BF6 /* CDVBattery.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVBattery.m; path = Classes/CDVBattery.m; sourceTree = "<group>"; };
+		1F3C04CC12BC247D004F9E10 /* CDVContact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVContact.h; path = Classes/CDVContact.h; sourceTree = "<group>"; };
+		1F3C04CD12BC247D004F9E10 /* CDVContact.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVContact.m; path = Classes/CDVContact.m; sourceTree = "<group>"; };
+		1F584B991385A28900ED25E8 /* CDVCapture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCapture.h; path = Classes/CDVCapture.h; sourceTree = "<group>"; };
+		1F584B9A1385A28900ED25E8 /* CDVCapture.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCapture.m; path = Classes/CDVCapture.m; sourceTree = "<group>"; };
+		1F92F49E1314023E0046367C /* CDVPluginResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVPluginResult.h; path = Classes/CDVPluginResult.h; sourceTree = "<group>"; };
+		1F92F49F1314023E0046367C /* CDVPluginResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVPluginResult.m; path = Classes/CDVPluginResult.m; sourceTree = "<group>"; };
+		301F2F2914F3C9CA003FE9FC /* CDV.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDV.h; path = Classes/CDV.h; sourceTree = "<group>"; };
+		302965BB13A94E9D007046C5 /* CDVDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDebug.h; path = Classes/CDVDebug.h; sourceTree = "<group>"; };
+		30325A0B136B343700982B63 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
+		3034979A1513D56A0090E688 /* CDVLocalStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLocalStorage.h; path = Classes/CDVLocalStorage.h; sourceTree = "<group>"; };
+		3034979B1513D56A0090E688 /* CDVLocalStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLocalStorage.m; path = Classes/CDVLocalStorage.m; sourceTree = "<group>"; };
+		30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVAvailability.h; path = Classes/CDVAvailability.h; sourceTree = "<group>"; };
+		3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIDevice+Extensions.h"; path = "Classes/UIDevice+Extensions.h"; sourceTree = "<group>"; };
+		3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIDevice+Extensions.m"; path = "Classes/UIDevice+Extensions.m"; sourceTree = "<group>"; };
+		307A8F9C1385A2EC00E43782 /* CDVConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVConnection.h; path = Classes/CDVConnection.h; sourceTree = "<group>"; };
+		307A8F9D1385A2EC00E43782 /* CDVConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVConnection.m; path = Classes/CDVConnection.m; sourceTree = "<group>"; };
+		30A90B8F14588697006178D3 /* JSONKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONKit.h; sourceTree = "<group>"; };
+		30A90B9014588697006178D3 /* JSONKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONKit.m; sourceTree = "<group>"; };
+		30B39EBC13D0268B0009682A /* CDVSplashScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVSplashScreen.h; path = Classes/CDVSplashScreen.h; sourceTree = "<group>"; };
+		30B39EBD13D0268B0009682A /* CDVSplashScreen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVSplashScreen.m; path = Classes/CDVSplashScreen.m; sourceTree = "<group>"; };
+		30C5F1DD15AF9E950052A00D /* CDVDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDevice.h; path = Classes/CDVDevice.h; sourceTree = "<group>"; };
+		30C5F1DE15AF9E950052A00D /* CDVDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVDevice.m; path = Classes/CDVDevice.m; sourceTree = "<group>"; };
+		30C6847E1406CB38004C1A8E /* CDVWhitelist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVWhitelist.h; path = Classes/CDVWhitelist.h; sourceTree = "<group>"; };
+		30C6847F1406CB38004C1A8E /* CDVWhitelist.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVWhitelist.m; path = Classes/CDVWhitelist.m; sourceTree = "<group>"; };
+		30C684921407044A004C1A8E /* CDVURLProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVURLProtocol.h; path = Classes/CDVURLProtocol.h; sourceTree = "<group>"; };
+		30C684931407044A004C1A8E /* CDVURLProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVURLProtocol.m; path = Classes/CDVURLProtocol.m; sourceTree = "<group>"; };
+		30E33AF013A7E24B00594D64 /* CDVPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVPlugin.h; path = Classes/CDVPlugin.h; sourceTree = "<group>"; };
+		30E33AF113A7E24B00594D64 /* CDVPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVPlugin.m; path = Classes/CDVPlugin.m; sourceTree = "<group>"; };
+		30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSMutableArray+QueueAdditions.h"; path = "Classes/NSMutableArray+QueueAdditions.h"; sourceTree = "<group>"; };
+		30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSMutableArray+QueueAdditions.m"; path = "Classes/NSMutableArray+QueueAdditions.m"; sourceTree = "<group>"; };
+		30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandDelegate.h; path = Classes/CDVCommandDelegate.h; sourceTree = "<group>"; };
+		3E76876B156A90EE00EB6FA3 /* CDVLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLogger.m; path = Classes/CDVLogger.m; sourceTree = "<group>"; };
+		3E76876C156A90EE00EB6FA3 /* CDVLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLogger.h; path = Classes/CDVLogger.h; sourceTree = "<group>"; };
+		686357AA141002F100DF4CF2 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+		686357AC141002F100DF4CF2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+		686357AE141002F100DF4CF2 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+		686357CC14100AAD00DF4CF2 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
+		686357CE14100ADA00DF4CF2 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
+		686357CF14100ADB00DF4CF2 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
+		686357D014100ADE00DF4CF2 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
+		686357D214100AE700DF4CF2 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
+		686357D414100AF200DF4CF2 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
+		686357DC14100B1600DF4CF2 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
+		68A32D7114102E1C006B237C /* libCordova.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCordova.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		68A32D7414103017006B237C /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
+		8852C43614B65FD800F0E735 /* CDVViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVViewController.h; path = Classes/CDVViewController.h; sourceTree = "<group>"; };
+		8852C43714B65FD800F0E735 /* CDVViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVViewController.m; path = Classes/CDVViewController.m; sourceTree = "<group>"; };
+		8852C43814B65FD800F0E735 /* CDVCordovaView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCordovaView.h; path = Classes/CDVCordovaView.h; sourceTree = "<group>"; };
+		8852C43914B65FD800F0E735 /* CDVCordovaView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCordovaView.m; path = Classes/CDVCordovaView.m; sourceTree = "<group>"; };
+		8887FD261090FBE7009987E8 /* CDVCamera.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCamera.h; path = Classes/CDVCamera.h; sourceTree = "<group>"; };
+		8887FD271090FBE7009987E8 /* CDVCamera.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCamera.m; path = Classes/CDVCamera.m; sourceTree = "<group>"; };
+		8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+Extensions.h"; path = "Classes/NSDictionary+Extensions.h"; sourceTree = "<group>"; };
+		8887FD291090FBE7009987E8 /* NSDictionary+Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+Extensions.m"; path = "Classes/NSDictionary+Extensions.m"; sourceTree = "<group>"; };
+		8887FD2A1090FBE7009987E8 /* CDVContacts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVContacts.h; path = Classes/CDVContacts.h; sourceTree = "<group>"; };
+		8887FD2B1090FBE7009987E8 /* CDVContacts.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVContacts.m; path = Classes/CDVContacts.m; sourceTree = "<group>"; };
+		8887FD2C1090FBE7009987E8 /* CDVDebugConsole.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDebugConsole.h; path = Classes/CDVDebugConsole.h; sourceTree = "<group>"; };
+		8887FD2D1090FBE7009987E8 /* CDVDebugConsole.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVDebugConsole.m; path = Classes/CDVDebugConsole.m; sourceTree = "<group>"; };
+		8887FD301090FBE7009987E8 /* CDVFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVFile.h; path = Classes/CDVFile.h; sourceTree = "<group>"; };
+		8887FD311090FBE7009987E8 /* CDVFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVFile.m; path = Classes/CDVFile.m; sourceTree = "<group>"; };
+		8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVInvokedUrlCommand.h; path = Classes/CDVInvokedUrlCommand.h; sourceTree = "<group>"; };
+		8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVInvokedUrlCommand.m; path = Classes/CDVInvokedUrlCommand.m; sourceTree = "<group>"; };
+		8887FD461090FBE7009987E8 /* CDVLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLocation.h; path = Classes/CDVLocation.h; sourceTree = "<group>"; };
+		8887FD471090FBE7009987E8 /* CDVLocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLocation.m; path = Classes/CDVLocation.m; sourceTree = "<group>"; };
+		8887FD4E1090FBE7009987E8 /* CDVNotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVNotification.h; path = Classes/CDVNotification.h; sourceTree = "<group>"; };
+		8887FD4F1090FBE7009987E8 /* CDVNotification.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVNotification.m; path = Classes/CDVNotification.m; sourceTree = "<group>"; };
+		8887FD501090FBE7009987E8 /* NSData+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSData+Base64.h"; path = "Classes/NSData+Base64.h"; sourceTree = "<group>"; };
+		8887FD511090FBE7009987E8 /* NSData+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSData+Base64.m"; path = "Classes/NSData+Base64.m"; sourceTree = "<group>"; };
+		8887FD5E1090FBE7009987E8 /* CDVReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVReachability.h; path = Classes/CDVReachability.h; sourceTree = "<group>"; };
+		8887FD5F1090FBE7009987E8 /* CDVReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVReachability.m; path = Classes/CDVReachability.m; sourceTree = "<group>"; };
+		8887FD601090FBE7009987E8 /* CDVSound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVSound.h; path = Classes/CDVSound.h; sourceTree = "<group>"; };
+		8887FD611090FBE7009987E8 /* CDVSound.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVSound.m; path = Classes/CDVSound.m; sourceTree = "<group>"; };
+		88BA573B109BB46F00FB5E78 /* CDVAccelerometer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVAccelerometer.h; path = Classes/CDVAccelerometer.h; sourceTree = "<group>"; };
+		88BA573C109BB46F00FB5E78 /* CDVAccelerometer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVAccelerometer.m; path = Classes/CDVAccelerometer.m; sourceTree = "<group>"; };
+		9D76CF3A1625A4C50008A0F6 /* CDVGlobalization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVGlobalization.h; path = Classes/CDVGlobalization.h; sourceTree = "<group>"; };
+		9D76CF3B1625A4C50008A0F6 /* CDVGlobalization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVGlobalization.m; path = Classes/CDVGlobalization.m; sourceTree = "<group>"; };
+		AA747D9E0F9514B9006C5449 /* CordovaLib_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CordovaLib_Prefix.pch; sourceTree = SOURCE_ROOT; };
+		C937A4541337599E002C4C79 /* CDVFileTransfer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVFileTransfer.h; path = Classes/CDVFileTransfer.h; sourceTree = "<group>"; };
+		C937A4551337599E002C4C79 /* CDVFileTransfer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVFileTransfer.m; path = Classes/CDVFileTransfer.m; sourceTree = "<group>"; };
+		EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandQueue.h; path = Classes/CDVCommandQueue.h; sourceTree = "<group>"; };
+		EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCommandQueue.m; path = Classes/CDVCommandQueue.m; sourceTree = "<group>"; };
+		EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandDelegateImpl.h; path = Classes/CDVCommandDelegateImpl.h; sourceTree = "<group>"; };
+		EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCommandDelegateImpl.m; path = Classes/CDVCommandDelegateImpl.m; sourceTree = "<group>"; };
+		EB80C2AA15DEA63D004D9E7B /* CDVEcho.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVEcho.h; path = Classes/CDVEcho.h; sourceTree = "<group>"; };
+		EB80C2AB15DEA63D004D9E7B /* CDVEcho.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVEcho.m; path = Classes/CDVEcho.m; sourceTree = "<group>"; };
+		EBA3557115ABD38C00F4DE24 /* NSArray+Comparisons.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSArray+Comparisons.h"; path = "Classes/NSArray+Comparisons.h"; sourceTree = "<group>"; };
+		EBA3557215ABD38C00F4DE24 /* NSArray+Comparisons.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSArray+Comparisons.m"; path = "Classes/NSArray+Comparisons.m"; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		D2AAC07C0554694100DB518D /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		034768DFFF38A50411DB9C8B /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				68A32D7114102E1C006B237C /* libCordova.a */,
+			);
+			name = Products;
+			sourceTree = CORDOVALIB;
+		};
+		0867D691FE84028FC02AAC07 /* CordovaLib */ = {
+			isa = PBXGroup;
+			children = (
+				8887FD101090FB43009987E8 /* Classes */,
+				32C88DFF0371C24200C91783 /* Other Sources */,
+				0867D69AFE84028FC02AAC07 /* Frameworks */,
+				034768DFFF38A50411DB9C8B /* Products */,
+				30325A0B136B343700982B63 /* VERSION */,
+			);
+			name = CordovaLib;
+			sourceTree = "<group>";
+		};
+		0867D69AFE84028FC02AAC07 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				68A32D7414103017006B237C /* AddressBook.framework */,
+				686357DC14100B1600DF4CF2 /* CoreMedia.framework */,
+				686357CE14100ADA00DF4CF2 /* AudioToolbox.framework */,
+				686357CF14100ADB00DF4CF2 /* AVFoundation.framework */,
+				686357D014100ADE00DF4CF2 /* CoreLocation.framework */,
+				686357D214100AE700DF4CF2 /* MobileCoreServices.framework */,
+				686357D414100AF200DF4CF2 /* SystemConfiguration.framework */,
+				686357CC14100AAD00DF4CF2 /* AddressBookUI.framework */,
+				686357AA141002F100DF4CF2 /* UIKit.framework */,
+				686357AC141002F100DF4CF2 /* Foundation.framework */,
+				686357AE141002F100DF4CF2 /* CoreGraphics.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		3054098714B77FF3009841CA /* Cleaver */ = {
+			isa = PBXGroup;
+			children = (
+				8852C43614B65FD800F0E735 /* CDVViewController.h */,
+				8852C43714B65FD800F0E735 /* CDVViewController.m */,
+				8852C43814B65FD800F0E735 /* CDVCordovaView.h */,
+				8852C43914B65FD800F0E735 /* CDVCordovaView.m */,
+				EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */,
+				EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */,
+			);
+			name = Cleaver;
+			sourceTree = "<group>";
+		};
+		32C88DFF0371C24200C91783 /* Other Sources */ = {
+			isa = PBXGroup;
+			children = (
+				AA747D9E0F9514B9006C5449 /* CordovaLib_Prefix.pch */,
+			);
+			name = "Other Sources";
+			sourceTree = "<group>";
+		};
+		888700D710922F56009987E8 /* Commands */ = {
+			isa = PBXGroup;
+			children = (
+				30C5F1DD15AF9E950052A00D /* CDVDevice.h */,
+				30C5F1DE15AF9E950052A00D /* CDVDevice.m */,
+				301F2F2914F3C9CA003FE9FC /* CDV.h */,
+				3034979A1513D56A0090E688 /* CDVLocalStorage.h */,
+				3034979B1513D56A0090E688 /* CDVLocalStorage.m */,
+				30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */,
+				30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */,
+				EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */,
+				EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */,
+				30C684921407044A004C1A8E /* CDVURLProtocol.h */,
+				30C684931407044A004C1A8E /* CDVURLProtocol.m */,
+				30C6847E1406CB38004C1A8E /* CDVWhitelist.h */,
+				30C6847F1406CB38004C1A8E /* CDVWhitelist.m */,
+				1F2BECBE13F9785B00A93BF6 /* CDVBattery.h */,
+				1F2BECBF13F9785B00A93BF6 /* CDVBattery.m */,
+				30B39EBC13D0268B0009682A /* CDVSplashScreen.h */,
+				30B39EBD13D0268B0009682A /* CDVSplashScreen.m */,
+				30E33AF013A7E24B00594D64 /* CDVPlugin.h */,
+				30E33AF113A7E24B00594D64 /* CDVPlugin.m */,
+				307A8F9C1385A2EC00E43782 /* CDVConnection.h */,
+				307A8F9D1385A2EC00E43782 /* CDVConnection.m */,
+				1F92F49E1314023E0046367C /* CDVPluginResult.h */,
+				1F92F49F1314023E0046367C /* CDVPluginResult.m */,
+				88BA573B109BB46F00FB5E78 /* CDVAccelerometer.h */,
+				88BA573C109BB46F00FB5E78 /* CDVAccelerometer.m */,
+				8887FD261090FBE7009987E8 /* CDVCamera.h */,
+				8887FD271090FBE7009987E8 /* CDVCamera.m */,
+				1F584B991385A28900ED25E8 /* CDVCapture.h */,
+				1F584B9A1385A28900ED25E8 /* CDVCapture.m */,
+				1F3C04CC12BC247D004F9E10 /* CDVContact.h */,
+				1F3C04CD12BC247D004F9E10 /* CDVContact.m */,
+				8887FD2A1090FBE7009987E8 /* CDVContacts.h */,
+				8887FD2B1090FBE7009987E8 /* CDVContacts.m */,
+				8887FD2C1090FBE7009987E8 /* CDVDebugConsole.h */,
+				8887FD2D1090FBE7009987E8 /* CDVDebugConsole.m */,
+				EB80C2AA15DEA63D004D9E7B /* CDVEcho.h */,
+				EB80C2AB15DEA63D004D9E7B /* CDVEcho.m */,
+				8887FD301090FBE7009987E8 /* CDVFile.h */,
+				8887FD311090FBE7009987E8 /* CDVFile.m */,
+				8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */,
+				8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */,
+				C937A4541337599E002C4C79 /* CDVFileTransfer.h */,
+				C937A4551337599E002C4C79 /* CDVFileTransfer.m */,
+				8887FD461090FBE7009987E8 /* CDVLocation.h */,
+				8887FD471090FBE7009987E8 /* CDVLocation.m */,
+				8887FD4E1090FBE7009987E8 /* CDVNotification.h */,
+				8887FD4F1090FBE7009987E8 /* CDVNotification.m */,
+				8887FD5E1090FBE7009987E8 /* CDVReachability.h */,
+				8887FD5F1090FBE7009987E8 /* CDVReachability.m */,
+				8887FD601090FBE7009987E8 /* CDVSound.h */,
+				8887FD611090FBE7009987E8 /* CDVSound.m */,
+				3E76876B156A90EE00EB6FA3 /* CDVLogger.m */,
+				3E76876C156A90EE00EB6FA3 /* CDVLogger.h */,
+				9D76CF3A1625A4C50008A0F6 /* CDVGlobalization.h */,
+				9D76CF3B1625A4C50008A0F6 /* CDVGlobalization.m */,
+			);
+			name = Commands;
+			sourceTree = "<group>";
+		};
+		888700D910923009009987E8 /* Util */ = {
+			isa = PBXGroup;
+			children = (
+				3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */,
+				3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */,
+				EBA3557115ABD38C00F4DE24 /* NSArray+Comparisons.h */,
+				EBA3557215ABD38C00F4DE24 /* NSArray+Comparisons.m */,
+				8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */,
+				8887FD291090FBE7009987E8 /* NSDictionary+Extensions.m */,
+				302965BB13A94E9D007046C5 /* CDVDebug.h */,
+				30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */,
+				30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */,
+				8887FD501090FBE7009987E8 /* NSData+Base64.h */,
+				8887FD511090FBE7009987E8 /* NSData+Base64.m */,
+			);
+			name = Util;
+			sourceTree = "<group>";
+		};
+		8887FD101090FB43009987E8 /* Classes */ = {
+			isa = PBXGroup;
+			children = (
+				3054098714B77FF3009841CA /* Cleaver */,
+				888700D710922F56009987E8 /* Commands */,
+				8887FD361090FBE7009987E8 /* JSON */,
+				888700D910923009009987E8 /* Util */,
+			);
+			name = Classes;
+			sourceTree = "<group>";
+		};
+		8887FD361090FBE7009987E8 /* JSON */ = {
+			isa = PBXGroup;
+			children = (
+				30A90B8F14588697006178D3 /* JSONKit.h */,
+				30A90B9014588697006178D3 /* JSONKit.m */,
+			);
+			name = JSON;
+			path = Classes/JSON;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+		D2AAC07A0554694100DB518D /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				8887FD661090FBE7009987E8 /* CDVCamera.h in Headers */,
+				8887FD681090FBE7009987E8 /* NSDictionary+Extensions.h in Headers */,
+				8887FD6A1090FBE7009987E8 /* CDVContacts.h in Headers */,
+				8887FD6C1090FBE7009987E8 /* CDVDebugConsole.h in Headers */,
+				8887FD701090FBE7009987E8 /* CDVFile.h in Headers */,
+				8887FD741090FBE7009987E8 /* CDVInvokedUrlCommand.h in Headers */,
+				8887FD851090FBE7009987E8 /* CDVLocation.h in Headers */,
+				8887FD8D1090FBE7009987E8 /* CDVNotification.h in Headers */,
+				8887FD8F1090FBE7009987E8 /* NSData+Base64.h in Headers */,
+				8887FD9D1090FBE7009987E8 /* CDVReachability.h in Headers */,
+				8887FD9F1090FBE7009987E8 /* CDVSound.h in Headers */,
+				88BA573D109BB46F00FB5E78 /* CDVAccelerometer.h in Headers */,
+				1F3C04CE12BC247D004F9E10 /* CDVContact.h in Headers */,
+				1F92F4A01314023E0046367C /* CDVPluginResult.h in Headers */,
+				C937A4561337599E002C4C79 /* CDVFileTransfer.h in Headers */,
+				307A8F9E1385A2EC00E43782 /* CDVConnection.h in Headers */,
+				1F584B9B1385A28A00ED25E8 /* CDVCapture.h in Headers */,
+				30E33AF213A7E24B00594D64 /* CDVPlugin.h in Headers */,
+				302965BC13A94E9D007046C5 /* CDVDebug.h in Headers */,
+				30B39EBE13D0268B0009682A /* CDVSplashScreen.h in Headers */,
+				30E563CF13E217EC00C949AA /* NSMutableArray+QueueAdditions.h in Headers */,
+				1F2BECC013F9785B00A93BF6 /* CDVBattery.h in Headers */,
+				30C684801406CB38004C1A8E /* CDVWhitelist.h in Headers */,
+				30C684941407044B004C1A8E /* CDVURLProtocol.h in Headers */,
+				30A90B9114588697006178D3 /* JSONKit.h in Headers */,
+				8852C43A14B65FD800F0E735 /* CDVViewController.h in Headers */,
+				8852C43F14B65FD800F0E735 /* CDVCordovaView.h in Headers */,
+				30F5EBAB14CA26E700987760 /* CDVCommandDelegate.h in Headers */,
+				301F2F2A14F3C9CA003FE9FC /* CDV.h in Headers */,
+				30392E4E14F4FCAB00B9E0B8 /* CDVAvailability.h in Headers */,
+				3034979C1513D56A0090E688 /* CDVLocalStorage.h in Headers */,
+				3062D120151D0EDB000D9128 /* UIDevice+Extensions.h in Headers */,
+				3E76876F156A90EE00EB6FA3 /* CDVLogger.h in Headers */,
+				EBA3557315ABD38C00F4DE24 /* NSArray+Comparisons.h in Headers */,
+				30C5F1DF15AF9E950052A00D /* CDVDevice.h in Headers */,
+				EB80C2AC15DEA63D004D9E7B /* CDVEcho.h in Headers */,
+				EB3B3547161CB44D003DBE7D /* CDVCommandQueue.h in Headers */,
+				EB3B357C161F2A45003DBE7D /* CDVCommandDelegateImpl.h in Headers */,
+				9D76CF3C1625A4C50008A0F6 /* CDVGlobalization.h in Headers */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+		D2AAC07D0554694100DB518D /* CordovaLib */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CordovaLib" */;
+			buildPhases = (
+				D2AAC07A0554694100DB518D /* Headers */,
+				D2AAC07B0554694100DB518D /* Sources */,
+				D2AAC07C0554694100DB518D /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = CordovaLib;
+			productName = CordovaLib;
+			productReference = 68A32D7114102E1C006B237C /* libCordova.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		0867D690FE84028FC02AAC07 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0430;
+			};
+			buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CordovaLib" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 1;
+			knownRegions = (
+				English,
+				Japanese,
+				French,
+				German,
+				en,
+			);
+			mainGroup = 0867D691FE84028FC02AAC07 /* CordovaLib */;
+			productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				D2AAC07D0554694100DB518D /* CordovaLib */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+		D2AAC07B0554694100DB518D /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				8887FD671090FBE7009987E8 /* CDVCamera.m in Sources */,
+				8887FD691090FBE7009987E8 /* NSDictionary+Extensions.m in Sources */,
+				8887FD6B1090FBE7009987E8 /* CDVContacts.m in Sources */,
+				8887FD6D1090FBE7009987E8 /* CDVDebugConsole.m in Sources */,
+				8887FD711090FBE7009987E8 /* CDVFile.m in Sources */,
+				8887FD751090FBE7009987E8 /* CDVInvokedUrlCommand.m in Sources */,
+				8887FD861090FBE7009987E8 /* CDVLocation.m in Sources */,
+				8887FD8E1090FBE7009987E8 /* CDVNotification.m in Sources */,
+				8887FD901090FBE7009987E8 /* NSData+Base64.m in Sources */,
+				8887FD9E1090FBE7009987E8 /* CDVReachability.m in Sources */,
+				8887FDA01090FBE7009987E8 /* CDVSound.m in Sources */,
+				88BA573E109BB46F00FB5E78 /* CDVAccelerometer.m in Sources */,
+				1F3C04CF12BC247D004F9E10 /* CDVContact.m in Sources */,
+				1F92F4A11314023E0046367C /* CDVPluginResult.m in Sources */,
+				C937A4571337599E002C4C79 /* CDVFileTransfer.m in Sources */,
+				307A8F9F1385A2EC00E43782 /* CDVConnection.m in Sources */,
+				1F584B9C1385A28A00ED25E8 /* CDVCapture.m in Sources */,
+				30E33AF313A7E24B00594D64 /* CDVPlugin.m in Sources */,
+				30B39EBF13D0268B0009682A /* CDVSplashScreen.m in Sources */,
+				30E563D013E217EC00C949AA /* NSMutableArray+QueueAdditions.m in Sources */,
+				1F2BECC113F9785B00A93BF6 /* CDVBattery.m in Sources */,
+				30C684821406CB38004C1A8E /* CDVWhitelist.m in Sources */,
+				30C684961407044B004C1A8E /* CDVURLProtocol.m in Sources */,
+				30A90B9314588697006178D3 /* JSONKit.m in Sources */,
+				8852C43C14B65FD800F0E735 /* CDVViewController.m in Sources */,
+				8852C44114B65FD800F0E735 /* CDVCordovaView.m in Sources */,
+				3034979E1513D56A0090E688 /* CDVLocalStorage.m in Sources */,
+				3062D122151D0EDB000D9128 /* UIDevice+Extensions.m in Sources */,
+				3E76876D156A90EE00EB6FA3 /* CDVLogger.m in Sources */,
+				EBA3557515ABD38C00F4DE24 /* NSArray+Comparisons.m in Sources */,
+				30C5F1E015AF9E950052A00D /* CDVDevice.m in Sources */,
+				EB80C2AD15DEA63D004D9E7B /* CDVEcho.m in Sources */,
+				EB3B3548161CB44D003DBE7D /* CDVCommandQueue.m in Sources */,
+				EB3B357D161F2A45003DBE7D /* CDVCommandDelegateImpl.m in Sources */,
+				9D76CF3D1625A4C50008A0F6 /* CDVGlobalization.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+		1DEB921F08733DC00010E9CD /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				"ARCHS[sdk=iphoneos*]" = (
+					armv6,
+					armv7,
+				);
+				"ARCHS[sdk=iphoneos6.*]" = (
+					armv7,
+					armv7s,
+				);
+				"ARCHS[sdk=iphonesimulator*]" = i386;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				COPY_PHASE_STRIP = NO;
+				DSTROOT = "/tmp/$(PROJECT_NAME).dst";
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = CordovaLib_Prefix.pch;
+				GCC_PREPROCESSOR_DEFINITIONS = "";
+				GCC_THUMB_SUPPORT = NO;
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				INSTALL_PATH = /usr/local/lib;
+				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
+				PRODUCT_NAME = Cordova;
+				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
+				SKIP_INSTALL = YES;
+			};
+			name = Debug;
+		};
+		1DEB922008733DC00010E9CD /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				"ARCHS[sdk=iphoneos*]" = (
+					armv6,
+					armv7,
+				);
+				"ARCHS[sdk=iphoneos6.*]" = (
+					armv7,
+					armv7s,
+				);
+				"ARCHS[sdk=iphonesimulator*]" = i386;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				DSTROOT = "/tmp/$(PROJECT_NAME).dst";
+				GCC_MODEL_TUNING = G5;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = CordovaLib_Prefix.pch;
+				GCC_PREPROCESSOR_DEFINITIONS = "";
+				GCC_THUMB_SUPPORT = NO;
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				INSTALL_PATH = /usr/local/lib;
+				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
+				PRODUCT_NAME = Cordova;
+				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
+				SKIP_INSTALL = YES;
+			};
+			name = Release;
+		};
+		1DEB922308733DC00010E9CD /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				"ARCHS[sdk=iphoneos*]" = (
+					armv6,
+					armv7,
+				);
+				"ARCHS[sdk=iphoneos6.*]" = (
+					armv7,
+					armv7s,
+				);
+				"ARCHS[sdk=iphonesimulator*]" = i386;
+				GCC_C_LANGUAGE_STANDARD = c99;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = "";
+				GCC_THUMB_SUPPORT = NO;
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
+				ONLY_ACTIVE_ARCH = NO;
+				OTHER_CFLAGS = "-DDEBUG";
+				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
+				SDKROOT = iphoneos;
+				SKIP_INSTALL = YES;
+				TARGETED_DEVICE_FAMILY = "1,2";
+				USER_HEADER_SEARCH_PATHS = "";
+				VALID_ARCHS = "i386 armv6 armv7 armv7s";
+			};
+			name = Debug;
+		};
+		1DEB922408733DC00010E9CD /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				"ARCHS[sdk=iphoneos*]" = (
+					armv6,
+					armv7,
+				);
+				"ARCHS[sdk=iphoneos6.*]" = (
+					armv7,
+					armv7s,
+				);
+				"ARCHS[sdk=iphonesimulator*]" = i386;
+				GCC_C_LANGUAGE_STANDARD = c99;
+				GCC_PREPROCESSOR_DEFINITIONS = "";
+				GCC_THUMB_SUPPORT = NO;
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
+				ONLY_ACTIVE_ARCH = NO;
+				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
+				SDKROOT = iphoneos;
+				SKIP_INSTALL = YES;
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VALID_ARCHS = "i386 armv6 armv7 armv7s";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CordovaLib" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				1DEB921F08733DC00010E9CD /* Debug */,
+				1DEB922008733DC00010E9CD /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CordovaLib" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				1DEB922308733DC00010E9CD /* Debug */,
+				1DEB922408733DC00010E9CD /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp.xcodeproj/project.orig.pbxproj
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp.xcodeproj/project.orig.pbxproj b/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp.xcodeproj/project.orig.pbxproj
new file mode 100644
index 0000000..a4d87f9
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp.xcodeproj/project.orig.pbxproj
@@ -0,0 +1,498 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A463F14DB0A1B007FEAC7 /* Foundation.framework */; };
+		571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464114DB0A1B007FEAC7 /* UIKit.framework */; };
+		571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */; };
+		571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464514DB0A1B007FEAC7 /* AddressBook.framework */; };
+		571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */; };
+		571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */; };
+		571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */; };
+		571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */; };
+		571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */; };
+		571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465114DB0A1B007FEAC7 /* QuartzCore.framework */; };
+		571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */; };
+		571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */; };
+		571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465714DB0A1B007FEAC7 /* CoreMedia.framework */; };
+		571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */; };
+		571A466014DB0A1B007FEAC7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A465F14DB0A1B007FEAC7 /* main.m */; };
+		571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A466214DB0A1B007FEAC7 /* PhoneGap.framework */; };
+		571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466614DB0A1B007FEAC7 /* Localizable.strings */; };
+		571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466A14DB0A1B007FEAC7 /* Localizable.strings */; };
+		571A466F14DB0A1B007FEAC7 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A466E14DB0A1B007FEAC7 /* icon.png */; };
+		571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467014DB0A1B007FEAC7 /* icon@2x.png */; };
+		571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467214DB0A1B007FEAC7 /* icon-72.png */; };
+		571A467614DB0A1B007FEAC7 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467514DB0A1B007FEAC7 /* Default.png */; };
+		571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467714DB0A1B007FEAC7 /* Default@2x.png */; };
+		571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 571A467914DB0A1B007FEAC7 /* Capture.bundle */; };
+		571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */ = {isa = PBXBuildFile; fileRef = 571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */; };
+		571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A467F14DB0A1B007FEAC7 /* AppDelegate.m */; };
+		571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A468214DB0A1B007FEAC7 /* MainViewController.m */; };
+		571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 571A468414DB0A1B007FEAC7 /* MainViewController.xib */; };
+		577FC36614DB0B620082BA7B /* www in Resources */ = {isa = PBXBuildFile; fileRef = 577FC36514DB0B620082BA7B /* www */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		571A463B14DB0A1B007FEAC7 /* ChildApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChildApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		571A463F14DB0A1B007FEAC7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+		571A464114DB0A1B007FEAC7 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+		571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+		571A464514DB0A1B007FEAC7 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
+		571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
+		571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
+		571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
+		571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
+		571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
+		571A465114DB0A1B007FEAC7 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
+		571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
+		571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
+		571A465714DB0A1B007FEAC7 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
+		571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ChildApp-Info.plist"; sourceTree = "<group>"; };
+		571A465D14DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		571A465F14DB0A1B007FEAC7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+		571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ChildApp-Prefix.pch"; sourceTree = "<group>"; };
+		571A466214DB0A1B007FEAC7 /* PhoneGap.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PhoneGap.framework; path = /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework; sourceTree = "<absolute>"; };
+		571A466714DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/Localizable.strings; sourceTree = "<group>"; };
+		571A466B14DB0A1B007FEAC7 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Resources/es.lproj/Localizable.strings; sourceTree = "<group>"; };
+		571A466E14DB0A1B007FEAC7 /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon.png; path = Resources/icons/icon.png; sourceTree = "<group>"; };
+		571A467014DB0A1B007FEAC7 /* icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon@2x.png"; path = "Resources/icons/icon@2x.png"; sourceTree = "<group>"; };
+		571A467214DB0A1B007FEAC7 /* icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon-72.png"; path = "Resources/icons/icon-72.png"; sourceTree = "<group>"; };
+		571A467514DB0A1B007FEAC7 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/splash/Default.png; sourceTree = "<group>"; };
+		571A467714DB0A1B007FEAC7 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "Resources/splash/Default@2x.png"; sourceTree = "<group>"; };
+		571A467914DB0A1B007FEAC7 /* Capture.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Capture.bundle; path = Resources/Capture.bundle; sourceTree = "<group>"; };
+		571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = PhoneGap.plist; sourceTree = "<group>"; };
+		571A467E14DB0A1B007FEAC7 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Classes/AppDelegate.h; sourceTree = "<group>"; };
+		571A467F14DB0A1B007FEAC7 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Classes/AppDelegate.m; sourceTree = "<group>"; };
+		571A468114DB0A1B007FEAC7 /* MainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainViewController.h; path = Classes/MainViewController.h; sourceTree = "<group>"; };
+		571A468214DB0A1B007FEAC7 /* MainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = Classes/MainViewController.m; sourceTree = "<group>"; };
+		571A468414DB0A1B007FEAC7 /* MainViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainViewController.xib; path = Classes/MainViewController.xib; sourceTree = "<group>"; };
+		571A468714DB0A1B007FEAC7 /* README */ = {isa = PBXFileReference; lastKnownFileType = text; name = README; path = Plugins/README; sourceTree = "<group>"; };
+		577FC36514DB0B620082BA7B /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		571A463514DB0A1B007FEAC7 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */,
+				571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */,
+				571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */,
+				571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */,
+				571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */,
+				571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */,
+				571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */,
+				571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */,
+				571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */,
+				571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */,
+				571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */,
+				571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */,
+				571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */,
+				571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		571A463814DB0A1B007FEAC7 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		571A462D14DB0A1A007FEAC7 = {
+			isa = PBXGroup;
+			children = (
+				577FC36514DB0B620082BA7B /* www */,
+				571A465914DB0A1B007FEAC7 /* ChildApp */,
+				571A463E14DB0A1B007FEAC7 /* Frameworks */,
+				571A463C14DB0A1B007FEAC7 /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		571A463C14DB0A1B007FEAC7 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				571A463B14DB0A1B007FEAC7 /* ChildApp.app */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		571A463E14DB0A1B007FEAC7 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				571A463F14DB0A1B007FEAC7 /* Foundation.framework */,
+				571A464114DB0A1B007FEAC7 /* UIKit.framework */,
+				571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */,
+				571A464514DB0A1B007FEAC7 /* AddressBook.framework */,
+				571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */,
+				571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */,
+				571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */,
+				571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */,
+				571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */,
+				571A465114DB0A1B007FEAC7 /* QuartzCore.framework */,
+				571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */,
+				571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */,
+				571A465714DB0A1B007FEAC7 /* CoreMedia.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		571A465914DB0A1B007FEAC7 /* ChildApp */ = {
+			isa = PBXGroup;
+			children = (
+				571A466214DB0A1B007FEAC7 /* PhoneGap.framework */,
+				571A466414DB0A1B007FEAC7 /* Resources */,
+				571A467D14DB0A1B007FEAC7 /* Classes */,
+				571A468614DB0A1B007FEAC7 /* Plugins */,
+				571A465A14DB0A1B007FEAC7 /* Supporting Files */,
+			);
+			path = ChildApp;
+			sourceTree = "<group>";
+		};
+		571A465A14DB0A1B007FEAC7 /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */,
+				571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */,
+				571A465F14DB0A1B007FEAC7 /* main.m */,
+				571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */,
+				571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */,
+				571A468414DB0A1B007FEAC7 /* MainViewController.xib */,
+			);
+			name = "Supporting Files";
+			sourceTree = "<group>";
+		};
+		571A466414DB0A1B007FEAC7 /* Resources */ = {
+			isa = PBXGroup;
+			children = (
+				571A467914DB0A1B007FEAC7 /* Capture.bundle */,
+				571A466514DB0A1B007FEAC7 /* en.lproj */,
+				571A466914DB0A1B007FEAC7 /* es.lproj */,
+				571A466D14DB0A1B007FEAC7 /* icons */,
+				571A467414DB0A1B007FEAC7 /* splash */,
+			);
+			name = Resources;
+			sourceTree = "<group>";
+		};
+		571A466514DB0A1B007FEAC7 /* en.lproj */ = {
+			isa = PBXGroup;
+			children = (
+				571A466614DB0A1B007FEAC7 /* Localizable.strings */,
+			);
+			name = en.lproj;
+			sourceTree = "<group>";
+		};
+		571A466914DB0A1B007FEAC7 /* es.lproj */ = {
+			isa = PBXGroup;
+			children = (
+				571A466A14DB0A1B007FEAC7 /* Localizable.strings */,
+			);
+			name = es.lproj;
+			sourceTree = "<group>";
+		};
+		571A466D14DB0A1B007FEAC7 /* icons */ = {
+			isa = PBXGroup;
+			children = (
+				571A466E14DB0A1B007FEAC7 /* icon.png */,
+				571A467014DB0A1B007FEAC7 /* icon@2x.png */,
+				571A467214DB0A1B007FEAC7 /* icon-72.png */,
+			);
+			name = icons;
+			sourceTree = "<group>";
+		};
+		571A467414DB0A1B007FEAC7 /* splash */ = {
+			isa = PBXGroup;
+			children = (
+				571A467514DB0A1B007FEAC7 /* Default.png */,
+				571A467714DB0A1B007FEAC7 /* Default@2x.png */,
+			);
+			name = splash;
+			sourceTree = "<group>";
+		};
+		571A467D14DB0A1B007FEAC7 /* Classes */ = {
+			isa = PBXGroup;
+			children = (
+				571A467E14DB0A1B007FEAC7 /* AppDelegate.h */,
+				571A467F14DB0A1B007FEAC7 /* AppDelegate.m */,
+				571A468114DB0A1B007FEAC7 /* MainViewController.h */,
+				571A468214DB0A1B007FEAC7 /* MainViewController.m */,
+			);
+			name = Classes;
+			sourceTree = "<group>";
+		};
+		571A468614DB0A1B007FEAC7 /* Plugins */ = {
+			isa = PBXGroup;
+			children = (
+				571A468714DB0A1B007FEAC7 /* README */,
+			);
+			name = Plugins;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		571A463A14DB0A1B007FEAC7 /* ChildApp */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */;
+			buildPhases = (
+				571A463414DB0A1B007FEAC7 /* Sources */,
+				571A463514DB0A1B007FEAC7 /* Frameworks */,
+				571A463614DB0A1B007FEAC7 /* Resources */,
+				571A463714DB0A1B007FEAC7 /* Sources */,
+				571A463814DB0A1B007FEAC7 /* Frameworks */,
+				571A463914DB0A1B007FEAC7 /* ShellScript */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = ChildApp;
+			productName = ChildApp;
+			productReference = 571A463B14DB0A1B007FEAC7 /* ChildApp.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		571A462F14DB0A1A007FEAC7 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0420;
+			};
+			buildConfigurationList = 571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				es,
+			);
+			mainGroup = 571A462D14DB0A1A007FEAC7;
+			productRefGroup = 571A463C14DB0A1B007FEAC7 /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				571A463A14DB0A1B007FEAC7 /* ChildApp */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		571A463614DB0A1B007FEAC7 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */,
+				571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */,
+				571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */,
+				571A466F14DB0A1B007FEAC7 /* icon.png in Resources */,
+				571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */,
+				571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */,
+				571A467614DB0A1B007FEAC7 /* Default.png in Resources */,
+				571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */,
+				571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */,
+				571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */,
+				571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */,
+				577FC36614DB0B620082BA7B /* www in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		571A463914DB0A1B007FEAC7 /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/bash;
+			shellScript = "\n\t\t\t\t\t\t\t\tif [ ! -d \"$PROJECT_DIR/www\" ] ; then\n\t\t\t\t\t\t\t\t\tcp -R /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework/www \"$PROJECT_DIR\"\n\t\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\t\t# detect www folder reference in project, if missing, print warning\n\t\t\t\t\t\t\t\tgrep \"{isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = \\\"<group>\\\"; };\" \"$PROJECT_DIR/$PROJECT_NAME.xcodeproj/project.pbxproj\"\n\t\t\t\t\t\t\t\trc=$? \n\t\t\t\t\t\t\t\tif [ $rc != 0 ] ; then\n\t\t\t\t\t\t\t\techo -e \"warning: Missing - Add $PROJECT_DIR/www as a folder reference in your project. Just drag and drop the folder into your project, into the Project Navigator of Xcode 4. Make sure you select the second radio-button: 'Create folder references for any added folders' (which will create a blue folder)\" 1>&2\n\t\t\t\t\t\t\t\tfi\t\t\t\t\t\t\t";
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		571A463414DB0A1B007FEAC7 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				571A466014DB0A1B007FEAC7 /* main.m in Sources */,
+				571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */,
+				571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		571A463714DB0A1B007FEAC7 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+		571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				571A465D14DB0A1B007FEAC7 /* en */,
+			);
+			name = InfoPlist.strings;
+			sourceTree = "<group>";
+		};
+		571A466614DB0A1B007FEAC7 /* Localizable.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				571A466714DB0A1B007FEAC7 /* en */,
+			);
+			name = Localizable.strings;
+			sourceTree = "<group>";
+		};
+		571A466A14DB0A1B007FEAC7 /* Localizable.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				571A466B14DB0A1B007FEAC7 /* es */,
+			);
+			name = Localizable.strings;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		571A468814DB0A1B007FEAC7 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+				CLANG_ENABLE_OBJC_ARC = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_VERSION = com.apple.compilers.llvmgcc42;
+				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
+				SDKROOT = iphoneos;
+			};
+			name = Debug;
+		};
+		571A468914DB0A1B007FEAC7 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+				CLANG_ENABLE_OBJC_ARC = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_VERSION = com.apple.compilers.llvmgcc42;
+				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
+				SDKROOT = iphoneos;
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		571A468B14DB0A1B007FEAC7 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = YES;
+				COPY_PHASE_STRIP = NO;
+				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
+				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
+				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
+				OTHER_LDFLAGS = (
+					"-weak_framework",
+					UIKit,
+					"-weak_framework",
+					AVFoundation,
+					"-weak_framework",
+					CoreMedia,
+					"-weak_library",
+					/usr/lib/libSystem.B.dylib,
+				);
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				TARGETED_DEVICE_FAMILY = "1,2";
+				WRAPPER_EXTENSION = app;
+			};
+			name = Debug;
+		};
+		571A468C14DB0A1B007FEAC7 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = YES;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
+				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
+				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
+				OTHER_LDFLAGS = (
+					"-weak_framework",
+					UIKit,
+					"-weak_framework",
+					AVFoundation,
+					"-weak_framework",
+					CoreMedia,
+					"-weak_library",
+					/usr/lib/libSystem.B.dylib,
+				);
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VALIDATE_PRODUCT = YES;
+				WRAPPER_EXTENSION = app;
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				571A468814DB0A1B007FEAC7 /* Debug */,
+				571A468914DB0A1B007FEAC7 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				571A468B14DB0A1B007FEAC7 /* Debug */,
+				571A468C14DB0A1B007FEAC7 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 571A462F14DB0A1A007FEAC7 /* Project object */;
+}


[54/70] Remove all cordova-lib files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/ios-config-xml/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/ios-config-xml/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/cordova-lib/spec-plugman/projects/ios-config-xml/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
deleted file mode 100644
index 5d0d461..0000000
--- a/cordova-lib/spec-plugman/projects/ios-config-xml/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,636 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		1F2BECC013F9785B00A93BF6 /* CDVBattery.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F2BECBE13F9785B00A93BF6 /* CDVBattery.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		1F2BECC113F9785B00A93BF6 /* CDVBattery.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F2BECBF13F9785B00A93BF6 /* CDVBattery.m */; };
-		1F3C04CE12BC247D004F9E10 /* CDVContact.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F3C04CC12BC247D004F9E10 /* CDVContact.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		1F3C04CF12BC247D004F9E10 /* CDVContact.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F3C04CD12BC247D004F9E10 /* CDVContact.m */; };
-		1F584B9B1385A28A00ED25E8 /* CDVCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F584B991385A28900ED25E8 /* CDVCapture.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		1F584B9C1385A28A00ED25E8 /* CDVCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F584B9A1385A28900ED25E8 /* CDVCapture.m */; };
-		1F92F4A01314023E0046367C /* CDVPluginResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F92F49E1314023E0046367C /* CDVPluginResult.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		1F92F4A11314023E0046367C /* CDVPluginResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F92F49F1314023E0046367C /* CDVPluginResult.m */; };
-		301F2F2A14F3C9CA003FE9FC /* CDV.h in Headers */ = {isa = PBXBuildFile; fileRef = 301F2F2914F3C9CA003FE9FC /* CDV.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		302965BC13A94E9D007046C5 /* CDVDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 302965BB13A94E9D007046C5 /* CDVDebug.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3034979C1513D56A0090E688 /* CDVLocalStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 3034979A1513D56A0090E688 /* CDVLocalStorage.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3034979E1513D56A0090E688 /* CDVLocalStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 3034979B1513D56A0090E688 /* CDVLocalStorage.m */; };
-		30392E4E14F4FCAB00B9E0B8 /* CDVAvailability.h in Headers */ = {isa = PBXBuildFile; fileRef = 30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3062D120151D0EDB000D9128 /* UIDevice+Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3062D122151D0EDB000D9128 /* UIDevice+Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */; };
-		307A8F9E1385A2EC00E43782 /* CDVConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 307A8F9C1385A2EC00E43782 /* CDVConnection.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		307A8F9F1385A2EC00E43782 /* CDVConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 307A8F9D1385A2EC00E43782 /* CDVConnection.m */; };
-		30A90B9114588697006178D3 /* JSONKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 30A90B8F14588697006178D3 /* JSONKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30A90B9314588697006178D3 /* JSONKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 30A90B9014588697006178D3 /* JSONKit.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
-		30B39EBE13D0268B0009682A /* CDVSplashScreen.h in Headers */ = {isa = PBXBuildFile; fileRef = 30B39EBC13D0268B0009682A /* CDVSplashScreen.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30B39EBF13D0268B0009682A /* CDVSplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 30B39EBD13D0268B0009682A /* CDVSplashScreen.m */; };
-		30C5F1DF15AF9E950052A00D /* CDVDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C5F1DD15AF9E950052A00D /* CDVDevice.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30C5F1E015AF9E950052A00D /* CDVDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C5F1DE15AF9E950052A00D /* CDVDevice.m */; };
-		30C684801406CB38004C1A8E /* CDVWhitelist.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C6847E1406CB38004C1A8E /* CDVWhitelist.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30C684821406CB38004C1A8E /* CDVWhitelist.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C6847F1406CB38004C1A8E /* CDVWhitelist.m */; };
-		30C684941407044B004C1A8E /* CDVURLProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C684921407044A004C1A8E /* CDVURLProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30C684961407044B004C1A8E /* CDVURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C684931407044A004C1A8E /* CDVURLProtocol.m */; };
-		30E33AF213A7E24B00594D64 /* CDVPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E33AF013A7E24B00594D64 /* CDVPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30E33AF313A7E24B00594D64 /* CDVPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 30E33AF113A7E24B00594D64 /* CDVPlugin.m */; };
-		30E563CF13E217EC00C949AA /* NSMutableArray+QueueAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30E563D013E217EC00C949AA /* NSMutableArray+QueueAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */; };
-		30F5EBAB14CA26E700987760 /* CDVCommandDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3E76876D156A90EE00EB6FA3 /* CDVLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E76876B156A90EE00EB6FA3 /* CDVLogger.m */; };
-		3E76876F156A90EE00EB6FA3 /* CDVLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E76876C156A90EE00EB6FA3 /* CDVLogger.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8852C43A14B65FD800F0E735 /* CDVViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 8852C43614B65FD800F0E735 /* CDVViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8852C43C14B65FD800F0E735 /* CDVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8852C43714B65FD800F0E735 /* CDVViewController.m */; };
-		8852C43F14B65FD800F0E735 /* CDVCordovaView.h in Headers */ = {isa = PBXBuildFile; fileRef = 8852C43814B65FD800F0E735 /* CDVCordovaView.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8852C44114B65FD800F0E735 /* CDVCordovaView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8852C43914B65FD800F0E735 /* CDVCordovaView.m */; };
-		8887FD661090FBE7009987E8 /* CDVCamera.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD261090FBE7009987E8 /* CDVCamera.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD671090FBE7009987E8 /* CDVCamera.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD271090FBE7009987E8 /* CDVCamera.m */; };
-		8887FD681090FBE7009987E8 /* NSDictionary+Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD691090FBE7009987E8 /* NSDictionary+Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD291090FBE7009987E8 /* NSDictionary+Extensions.m */; };
-		8887FD6A1090FBE7009987E8 /* CDVContacts.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD2A1090FBE7009987E8 /* CDVContacts.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD6B1090FBE7009987E8 /* CDVContacts.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD2B1090FBE7009987E8 /* CDVContacts.m */; };
-		8887FD6C1090FBE7009987E8 /* CDVDebugConsole.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD2C1090FBE7009987E8 /* CDVDebugConsole.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD6D1090FBE7009987E8 /* CDVDebugConsole.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD2D1090FBE7009987E8 /* CDVDebugConsole.m */; };
-		8887FD701090FBE7009987E8 /* CDVFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD301090FBE7009987E8 /* CDVFile.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD711090FBE7009987E8 /* CDVFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD311090FBE7009987E8 /* CDVFile.m */; };
-		8887FD741090FBE7009987E8 /* CDVInvokedUrlCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD751090FBE7009987E8 /* CDVInvokedUrlCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */; };
-		8887FD851090FBE7009987E8 /* CDVLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD461090FBE7009987E8 /* CDVLocation.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD861090FBE7009987E8 /* CDVLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD471090FBE7009987E8 /* CDVLocation.m */; };
-		8887FD8D1090FBE7009987E8 /* CDVNotification.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD4E1090FBE7009987E8 /* CDVNotification.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD8E1090FBE7009987E8 /* CDVNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD4F1090FBE7009987E8 /* CDVNotification.m */; };
-		8887FD8F1090FBE7009987E8 /* NSData+Base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD501090FBE7009987E8 /* NSData+Base64.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD901090FBE7009987E8 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD511090FBE7009987E8 /* NSData+Base64.m */; };
-		8887FD9D1090FBE7009987E8 /* CDVReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD5E1090FBE7009987E8 /* CDVReachability.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD9E1090FBE7009987E8 /* CDVReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD5F1090FBE7009987E8 /* CDVReachability.m */; };
-		8887FD9F1090FBE7009987E8 /* CDVSound.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD601090FBE7009987E8 /* CDVSound.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FDA01090FBE7009987E8 /* CDVSound.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD611090FBE7009987E8 /* CDVSound.m */; };
-		88BA573D109BB46F00FB5E78 /* CDVAccelerometer.h in Headers */ = {isa = PBXBuildFile; fileRef = 88BA573B109BB46F00FB5E78 /* CDVAccelerometer.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		88BA573E109BB46F00FB5E78 /* CDVAccelerometer.m in Sources */ = {isa = PBXBuildFile; fileRef = 88BA573C109BB46F00FB5E78 /* CDVAccelerometer.m */; };
-		9D76CF3C1625A4C50008A0F6 /* CDVGlobalization.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D76CF3A1625A4C50008A0F6 /* CDVGlobalization.h */; };
-		9D76CF3D1625A4C50008A0F6 /* CDVGlobalization.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D76CF3B1625A4C50008A0F6 /* CDVGlobalization.m */; };
-		C937A4561337599E002C4C79 /* CDVFileTransfer.h in Headers */ = {isa = PBXBuildFile; fileRef = C937A4541337599E002C4C79 /* CDVFileTransfer.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		C937A4571337599E002C4C79 /* CDVFileTransfer.m in Sources */ = {isa = PBXBuildFile; fileRef = C937A4551337599E002C4C79 /* CDVFileTransfer.m */; };
-		EB3B3547161CB44D003DBE7D /* CDVCommandQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */; };
-		EB3B3548161CB44D003DBE7D /* CDVCommandQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */; };
-		EB3B357C161F2A45003DBE7D /* CDVCommandDelegateImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */; };
-		EB3B357D161F2A45003DBE7D /* CDVCommandDelegateImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */; };
-		EB80C2AC15DEA63D004D9E7B /* CDVEcho.h in Headers */ = {isa = PBXBuildFile; fileRef = EB80C2AA15DEA63D004D9E7B /* CDVEcho.h */; };
-		EB80C2AD15DEA63D004D9E7B /* CDVEcho.m in Sources */ = {isa = PBXBuildFile; fileRef = EB80C2AB15DEA63D004D9E7B /* CDVEcho.m */; };
-		EBA3557315ABD38C00F4DE24 /* NSArray+Comparisons.h in Headers */ = {isa = PBXBuildFile; fileRef = EBA3557115ABD38C00F4DE24 /* NSArray+Comparisons.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		EBA3557515ABD38C00F4DE24 /* NSArray+Comparisons.m in Sources */ = {isa = PBXBuildFile; fileRef = EBA3557215ABD38C00F4DE24 /* NSArray+Comparisons.m */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
-		1F2BECBE13F9785B00A93BF6 /* CDVBattery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVBattery.h; path = Classes/CDVBattery.h; sourceTree = "<group>"; };
-		1F2BECBF13F9785B00A93BF6 /* CDVBattery.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVBattery.m; path = Classes/CDVBattery.m; sourceTree = "<group>"; };
-		1F3C04CC12BC247D004F9E10 /* CDVContact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVContact.h; path = Classes/CDVContact.h; sourceTree = "<group>"; };
-		1F3C04CD12BC247D004F9E10 /* CDVContact.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVContact.m; path = Classes/CDVContact.m; sourceTree = "<group>"; };
-		1F584B991385A28900ED25E8 /* CDVCapture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCapture.h; path = Classes/CDVCapture.h; sourceTree = "<group>"; };
-		1F584B9A1385A28900ED25E8 /* CDVCapture.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCapture.m; path = Classes/CDVCapture.m; sourceTree = "<group>"; };
-		1F92F49E1314023E0046367C /* CDVPluginResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVPluginResult.h; path = Classes/CDVPluginResult.h; sourceTree = "<group>"; };
-		1F92F49F1314023E0046367C /* CDVPluginResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVPluginResult.m; path = Classes/CDVPluginResult.m; sourceTree = "<group>"; };
-		301F2F2914F3C9CA003FE9FC /* CDV.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDV.h; path = Classes/CDV.h; sourceTree = "<group>"; };
-		302965BB13A94E9D007046C5 /* CDVDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDebug.h; path = Classes/CDVDebug.h; sourceTree = "<group>"; };
-		30325A0B136B343700982B63 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
-		3034979A1513D56A0090E688 /* CDVLocalStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLocalStorage.h; path = Classes/CDVLocalStorage.h; sourceTree = "<group>"; };
-		3034979B1513D56A0090E688 /* CDVLocalStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLocalStorage.m; path = Classes/CDVLocalStorage.m; sourceTree = "<group>"; };
-		30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVAvailability.h; path = Classes/CDVAvailability.h; sourceTree = "<group>"; };
-		3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIDevice+Extensions.h"; path = "Classes/UIDevice+Extensions.h"; sourceTree = "<group>"; };
-		3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIDevice+Extensions.m"; path = "Classes/UIDevice+Extensions.m"; sourceTree = "<group>"; };
-		307A8F9C1385A2EC00E43782 /* CDVConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVConnection.h; path = Classes/CDVConnection.h; sourceTree = "<group>"; };
-		307A8F9D1385A2EC00E43782 /* CDVConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVConnection.m; path = Classes/CDVConnection.m; sourceTree = "<group>"; };
-		30A90B8F14588697006178D3 /* JSONKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONKit.h; sourceTree = "<group>"; };
-		30A90B9014588697006178D3 /* JSONKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONKit.m; sourceTree = "<group>"; };
-		30B39EBC13D0268B0009682A /* CDVSplashScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVSplashScreen.h; path = Classes/CDVSplashScreen.h; sourceTree = "<group>"; };
-		30B39EBD13D0268B0009682A /* CDVSplashScreen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVSplashScreen.m; path = Classes/CDVSplashScreen.m; sourceTree = "<group>"; };
-		30C5F1DD15AF9E950052A00D /* CDVDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDevice.h; path = Classes/CDVDevice.h; sourceTree = "<group>"; };
-		30C5F1DE15AF9E950052A00D /* CDVDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVDevice.m; path = Classes/CDVDevice.m; sourceTree = "<group>"; };
-		30C6847E1406CB38004C1A8E /* CDVWhitelist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVWhitelist.h; path = Classes/CDVWhitelist.h; sourceTree = "<group>"; };
-		30C6847F1406CB38004C1A8E /* CDVWhitelist.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVWhitelist.m; path = Classes/CDVWhitelist.m; sourceTree = "<group>"; };
-		30C684921407044A004C1A8E /* CDVURLProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVURLProtocol.h; path = Classes/CDVURLProtocol.h; sourceTree = "<group>"; };
-		30C684931407044A004C1A8E /* CDVURLProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVURLProtocol.m; path = Classes/CDVURLProtocol.m; sourceTree = "<group>"; };
-		30E33AF013A7E24B00594D64 /* CDVPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVPlugin.h; path = Classes/CDVPlugin.h; sourceTree = "<group>"; };
-		30E33AF113A7E24B00594D64 /* CDVPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVPlugin.m; path = Classes/CDVPlugin.m; sourceTree = "<group>"; };
-		30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSMutableArray+QueueAdditions.h"; path = "Classes/NSMutableArray+QueueAdditions.h"; sourceTree = "<group>"; };
-		30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSMutableArray+QueueAdditions.m"; path = "Classes/NSMutableArray+QueueAdditions.m"; sourceTree = "<group>"; };
-		30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandDelegate.h; path = Classes/CDVCommandDelegate.h; sourceTree = "<group>"; };
-		3E76876B156A90EE00EB6FA3 /* CDVLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLogger.m; path = Classes/CDVLogger.m; sourceTree = "<group>"; };
-		3E76876C156A90EE00EB6FA3 /* CDVLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLogger.h; path = Classes/CDVLogger.h; sourceTree = "<group>"; };
-		686357AA141002F100DF4CF2 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
-		686357AC141002F100DF4CF2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-		686357AE141002F100DF4CF2 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
-		686357CC14100AAD00DF4CF2 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
-		686357CE14100ADA00DF4CF2 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
-		686357CF14100ADB00DF4CF2 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
-		686357D014100ADE00DF4CF2 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
-		686357D214100AE700DF4CF2 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
-		686357D414100AF200DF4CF2 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
-		686357DC14100B1600DF4CF2 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
-		68A32D7114102E1C006B237C /* libCordova.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCordova.a; sourceTree = BUILT_PRODUCTS_DIR; };
-		68A32D7414103017006B237C /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
-		8852C43614B65FD800F0E735 /* CDVViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVViewController.h; path = Classes/CDVViewController.h; sourceTree = "<group>"; };
-		8852C43714B65FD800F0E735 /* CDVViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVViewController.m; path = Classes/CDVViewController.m; sourceTree = "<group>"; };
-		8852C43814B65FD800F0E735 /* CDVCordovaView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCordovaView.h; path = Classes/CDVCordovaView.h; sourceTree = "<group>"; };
-		8852C43914B65FD800F0E735 /* CDVCordovaView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCordovaView.m; path = Classes/CDVCordovaView.m; sourceTree = "<group>"; };
-		8887FD261090FBE7009987E8 /* CDVCamera.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCamera.h; path = Classes/CDVCamera.h; sourceTree = "<group>"; };
-		8887FD271090FBE7009987E8 /* CDVCamera.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCamera.m; path = Classes/CDVCamera.m; sourceTree = "<group>"; };
-		8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+Extensions.h"; path = "Classes/NSDictionary+Extensions.h"; sourceTree = "<group>"; };
-		8887FD291090FBE7009987E8 /* NSDictionary+Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+Extensions.m"; path = "Classes/NSDictionary+Extensions.m"; sourceTree = "<group>"; };
-		8887FD2A1090FBE7009987E8 /* CDVContacts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVContacts.h; path = Classes/CDVContacts.h; sourceTree = "<group>"; };
-		8887FD2B1090FBE7009987E8 /* CDVContacts.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVContacts.m; path = Classes/CDVContacts.m; sourceTree = "<group>"; };
-		8887FD2C1090FBE7009987E8 /* CDVDebugConsole.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDebugConsole.h; path = Classes/CDVDebugConsole.h; sourceTree = "<group>"; };
-		8887FD2D1090FBE7009987E8 /* CDVDebugConsole.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVDebugConsole.m; path = Classes/CDVDebugConsole.m; sourceTree = "<group>"; };
-		8887FD301090FBE7009987E8 /* CDVFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVFile.h; path = Classes/CDVFile.h; sourceTree = "<group>"; };
-		8887FD311090FBE7009987E8 /* CDVFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVFile.m; path = Classes/CDVFile.m; sourceTree = "<group>"; };
-		8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVInvokedUrlCommand.h; path = Classes/CDVInvokedUrlCommand.h; sourceTree = "<group>"; };
-		8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVInvokedUrlCommand.m; path = Classes/CDVInvokedUrlCommand.m; sourceTree = "<group>"; };
-		8887FD461090FBE7009987E8 /* CDVLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLocation.h; path = Classes/CDVLocation.h; sourceTree = "<group>"; };
-		8887FD471090FBE7009987E8 /* CDVLocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLocation.m; path = Classes/CDVLocation.m; sourceTree = "<group>"; };
-		8887FD4E1090FBE7009987E8 /* CDVNotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVNotification.h; path = Classes/CDVNotification.h; sourceTree = "<group>"; };
-		8887FD4F1090FBE7009987E8 /* CDVNotification.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVNotification.m; path = Classes/CDVNotification.m; sourceTree = "<group>"; };
-		8887FD501090FBE7009987E8 /* NSData+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSData+Base64.h"; path = "Classes/NSData+Base64.h"; sourceTree = "<group>"; };
-		8887FD511090FBE7009987E8 /* NSData+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSData+Base64.m"; path = "Classes/NSData+Base64.m"; sourceTree = "<group>"; };
-		8887FD5E1090FBE7009987E8 /* CDVReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVReachability.h; path = Classes/CDVReachability.h; sourceTree = "<group>"; };
-		8887FD5F1090FBE7009987E8 /* CDVReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVReachability.m; path = Classes/CDVReachability.m; sourceTree = "<group>"; };
-		8887FD601090FBE7009987E8 /* CDVSound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVSound.h; path = Classes/CDVSound.h; sourceTree = "<group>"; };
-		8887FD611090FBE7009987E8 /* CDVSound.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVSound.m; path = Classes/CDVSound.m; sourceTree = "<group>"; };
-		88BA573B109BB46F00FB5E78 /* CDVAccelerometer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVAccelerometer.h; path = Classes/CDVAccelerometer.h; sourceTree = "<group>"; };
-		88BA573C109BB46F00FB5E78 /* CDVAccelerometer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVAccelerometer.m; path = Classes/CDVAccelerometer.m; sourceTree = "<group>"; };
-		9D76CF3A1625A4C50008A0F6 /* CDVGlobalization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVGlobalization.h; path = Classes/CDVGlobalization.h; sourceTree = "<group>"; };
-		9D76CF3B1625A4C50008A0F6 /* CDVGlobalization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVGlobalization.m; path = Classes/CDVGlobalization.m; sourceTree = "<group>"; };
-		AA747D9E0F9514B9006C5449 /* CordovaLib_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CordovaLib_Prefix.pch; sourceTree = SOURCE_ROOT; };
-		C937A4541337599E002C4C79 /* CDVFileTransfer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVFileTransfer.h; path = Classes/CDVFileTransfer.h; sourceTree = "<group>"; };
-		C937A4551337599E002C4C79 /* CDVFileTransfer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVFileTransfer.m; path = Classes/CDVFileTransfer.m; sourceTree = "<group>"; };
-		EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandQueue.h; path = Classes/CDVCommandQueue.h; sourceTree = "<group>"; };
-		EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCommandQueue.m; path = Classes/CDVCommandQueue.m; sourceTree = "<group>"; };
-		EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandDelegateImpl.h; path = Classes/CDVCommandDelegateImpl.h; sourceTree = "<group>"; };
-		EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCommandDelegateImpl.m; path = Classes/CDVCommandDelegateImpl.m; sourceTree = "<group>"; };
-		EB80C2AA15DEA63D004D9E7B /* CDVEcho.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVEcho.h; path = Classes/CDVEcho.h; sourceTree = "<group>"; };
-		EB80C2AB15DEA63D004D9E7B /* CDVEcho.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVEcho.m; path = Classes/CDVEcho.m; sourceTree = "<group>"; };
-		EBA3557115ABD38C00F4DE24 /* NSArray+Comparisons.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSArray+Comparisons.h"; path = "Classes/NSArray+Comparisons.h"; sourceTree = "<group>"; };
-		EBA3557215ABD38C00F4DE24 /* NSArray+Comparisons.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSArray+Comparisons.m"; path = "Classes/NSArray+Comparisons.m"; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		D2AAC07C0554694100DB518D /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		034768DFFF38A50411DB9C8B /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				68A32D7114102E1C006B237C /* libCordova.a */,
-			);
-			name = Products;
-			sourceTree = CORDOVALIB;
-		};
-		0867D691FE84028FC02AAC07 /* CordovaLib */ = {
-			isa = PBXGroup;
-			children = (
-				8887FD101090FB43009987E8 /* Classes */,
-				32C88DFF0371C24200C91783 /* Other Sources */,
-				0867D69AFE84028FC02AAC07 /* Frameworks */,
-				034768DFFF38A50411DB9C8B /* Products */,
-				30325A0B136B343700982B63 /* VERSION */,
-			);
-			name = CordovaLib;
-			sourceTree = "<group>";
-		};
-		0867D69AFE84028FC02AAC07 /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				68A32D7414103017006B237C /* AddressBook.framework */,
-				686357DC14100B1600DF4CF2 /* CoreMedia.framework */,
-				686357CE14100ADA00DF4CF2 /* AudioToolbox.framework */,
-				686357CF14100ADB00DF4CF2 /* AVFoundation.framework */,
-				686357D014100ADE00DF4CF2 /* CoreLocation.framework */,
-				686357D214100AE700DF4CF2 /* MobileCoreServices.framework */,
-				686357D414100AF200DF4CF2 /* SystemConfiguration.framework */,
-				686357CC14100AAD00DF4CF2 /* AddressBookUI.framework */,
-				686357AA141002F100DF4CF2 /* UIKit.framework */,
-				686357AC141002F100DF4CF2 /* Foundation.framework */,
-				686357AE141002F100DF4CF2 /* CoreGraphics.framework */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
-		3054098714B77FF3009841CA /* Cleaver */ = {
-			isa = PBXGroup;
-			children = (
-				8852C43614B65FD800F0E735 /* CDVViewController.h */,
-				8852C43714B65FD800F0E735 /* CDVViewController.m */,
-				8852C43814B65FD800F0E735 /* CDVCordovaView.h */,
-				8852C43914B65FD800F0E735 /* CDVCordovaView.m */,
-				EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */,
-				EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */,
-			);
-			name = Cleaver;
-			sourceTree = "<group>";
-		};
-		32C88DFF0371C24200C91783 /* Other Sources */ = {
-			isa = PBXGroup;
-			children = (
-				AA747D9E0F9514B9006C5449 /* CordovaLib_Prefix.pch */,
-			);
-			name = "Other Sources";
-			sourceTree = "<group>";
-		};
-		888700D710922F56009987E8 /* Commands */ = {
-			isa = PBXGroup;
-			children = (
-				30C5F1DD15AF9E950052A00D /* CDVDevice.h */,
-				30C5F1DE15AF9E950052A00D /* CDVDevice.m */,
-				301F2F2914F3C9CA003FE9FC /* CDV.h */,
-				3034979A1513D56A0090E688 /* CDVLocalStorage.h */,
-				3034979B1513D56A0090E688 /* CDVLocalStorage.m */,
-				30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */,
-				30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */,
-				EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */,
-				EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */,
-				30C684921407044A004C1A8E /* CDVURLProtocol.h */,
-				30C684931407044A004C1A8E /* CDVURLProtocol.m */,
-				30C6847E1406CB38004C1A8E /* CDVWhitelist.h */,
-				30C6847F1406CB38004C1A8E /* CDVWhitelist.m */,
-				1F2BECBE13F9785B00A93BF6 /* CDVBattery.h */,
-				1F2BECBF13F9785B00A93BF6 /* CDVBattery.m */,
-				30B39EBC13D0268B0009682A /* CDVSplashScreen.h */,
-				30B39EBD13D0268B0009682A /* CDVSplashScreen.m */,
-				30E33AF013A7E24B00594D64 /* CDVPlugin.h */,
-				30E33AF113A7E24B00594D64 /* CDVPlugin.m */,
-				307A8F9C1385A2EC00E43782 /* CDVConnection.h */,
-				307A8F9D1385A2EC00E43782 /* CDVConnection.m */,
-				1F92F49E1314023E0046367C /* CDVPluginResult.h */,
-				1F92F49F1314023E0046367C /* CDVPluginResult.m */,
-				88BA573B109BB46F00FB5E78 /* CDVAccelerometer.h */,
-				88BA573C109BB46F00FB5E78 /* CDVAccelerometer.m */,
-				8887FD261090FBE7009987E8 /* CDVCamera.h */,
-				8887FD271090FBE7009987E8 /* CDVCamera.m */,
-				1F584B991385A28900ED25E8 /* CDVCapture.h */,
-				1F584B9A1385A28900ED25E8 /* CDVCapture.m */,
-				1F3C04CC12BC247D004F9E10 /* CDVContact.h */,
-				1F3C04CD12BC247D004F9E10 /* CDVContact.m */,
-				8887FD2A1090FBE7009987E8 /* CDVContacts.h */,
-				8887FD2B1090FBE7009987E8 /* CDVContacts.m */,
-				8887FD2C1090FBE7009987E8 /* CDVDebugConsole.h */,
-				8887FD2D1090FBE7009987E8 /* CDVDebugConsole.m */,
-				EB80C2AA15DEA63D004D9E7B /* CDVEcho.h */,
-				EB80C2AB15DEA63D004D9E7B /* CDVEcho.m */,
-				8887FD301090FBE7009987E8 /* CDVFile.h */,
-				8887FD311090FBE7009987E8 /* CDVFile.m */,
-				8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */,
-				8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */,
-				C937A4541337599E002C4C79 /* CDVFileTransfer.h */,
-				C937A4551337599E002C4C79 /* CDVFileTransfer.m */,
-				8887FD461090FBE7009987E8 /* CDVLocation.h */,
-				8887FD471090FBE7009987E8 /* CDVLocation.m */,
-				8887FD4E1090FBE7009987E8 /* CDVNotification.h */,
-				8887FD4F1090FBE7009987E8 /* CDVNotification.m */,
-				8887FD5E1090FBE7009987E8 /* CDVReachability.h */,
-				8887FD5F1090FBE7009987E8 /* CDVReachability.m */,
-				8887FD601090FBE7009987E8 /* CDVSound.h */,
-				8887FD611090FBE7009987E8 /* CDVSound.m */,
-				3E76876B156A90EE00EB6FA3 /* CDVLogger.m */,
-				3E76876C156A90EE00EB6FA3 /* CDVLogger.h */,
-				9D76CF3A1625A4C50008A0F6 /* CDVGlobalization.h */,
-				9D76CF3B1625A4C50008A0F6 /* CDVGlobalization.m */,
-			);
-			name = Commands;
-			sourceTree = "<group>";
-		};
-		888700D910923009009987E8 /* Util */ = {
-			isa = PBXGroup;
-			children = (
-				3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */,
-				3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */,
-				EBA3557115ABD38C00F4DE24 /* NSArray+Comparisons.h */,
-				EBA3557215ABD38C00F4DE24 /* NSArray+Comparisons.m */,
-				8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */,
-				8887FD291090FBE7009987E8 /* NSDictionary+Extensions.m */,
-				302965BB13A94E9D007046C5 /* CDVDebug.h */,
-				30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */,
-				30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */,
-				8887FD501090FBE7009987E8 /* NSData+Base64.h */,
-				8887FD511090FBE7009987E8 /* NSData+Base64.m */,
-			);
-			name = Util;
-			sourceTree = "<group>";
-		};
-		8887FD101090FB43009987E8 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-				3054098714B77FF3009841CA /* Cleaver */,
-				888700D710922F56009987E8 /* Commands */,
-				8887FD361090FBE7009987E8 /* JSON */,
-				888700D910923009009987E8 /* Util */,
-			);
-			name = Classes;
-			sourceTree = "<group>";
-		};
-		8887FD361090FBE7009987E8 /* JSON */ = {
-			isa = PBXGroup;
-			children = (
-				30A90B8F14588697006178D3 /* JSONKit.h */,
-				30A90B9014588697006178D3 /* JSONKit.m */,
-			);
-			name = JSON;
-			path = Classes/JSON;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXHeadersBuildPhase section */
-		D2AAC07A0554694100DB518D /* Headers */ = {
-			isa = PBXHeadersBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				8887FD661090FBE7009987E8 /* CDVCamera.h in Headers */,
-				8887FD681090FBE7009987E8 /* NSDictionary+Extensions.h in Headers */,
-				8887FD6A1090FBE7009987E8 /* CDVContacts.h in Headers */,
-				8887FD6C1090FBE7009987E8 /* CDVDebugConsole.h in Headers */,
-				8887FD701090FBE7009987E8 /* CDVFile.h in Headers */,
-				8887FD741090FBE7009987E8 /* CDVInvokedUrlCommand.h in Headers */,
-				8887FD851090FBE7009987E8 /* CDVLocation.h in Headers */,
-				8887FD8D1090FBE7009987E8 /* CDVNotification.h in Headers */,
-				8887FD8F1090FBE7009987E8 /* NSData+Base64.h in Headers */,
-				8887FD9D1090FBE7009987E8 /* CDVReachability.h in Headers */,
-				8887FD9F1090FBE7009987E8 /* CDVSound.h in Headers */,
-				88BA573D109BB46F00FB5E78 /* CDVAccelerometer.h in Headers */,
-				1F3C04CE12BC247D004F9E10 /* CDVContact.h in Headers */,
-				1F92F4A01314023E0046367C /* CDVPluginResult.h in Headers */,
-				C937A4561337599E002C4C79 /* CDVFileTransfer.h in Headers */,
-				307A8F9E1385A2EC00E43782 /* CDVConnection.h in Headers */,
-				1F584B9B1385A28A00ED25E8 /* CDVCapture.h in Headers */,
-				30E33AF213A7E24B00594D64 /* CDVPlugin.h in Headers */,
-				302965BC13A94E9D007046C5 /* CDVDebug.h in Headers */,
-				30B39EBE13D0268B0009682A /* CDVSplashScreen.h in Headers */,
-				30E563CF13E217EC00C949AA /* NSMutableArray+QueueAdditions.h in Headers */,
-				1F2BECC013F9785B00A93BF6 /* CDVBattery.h in Headers */,
-				30C684801406CB38004C1A8E /* CDVWhitelist.h in Headers */,
-				30C684941407044B004C1A8E /* CDVURLProtocol.h in Headers */,
-				30A90B9114588697006178D3 /* JSONKit.h in Headers */,
-				8852C43A14B65FD800F0E735 /* CDVViewController.h in Headers */,
-				8852C43F14B65FD800F0E735 /* CDVCordovaView.h in Headers */,
-				30F5EBAB14CA26E700987760 /* CDVCommandDelegate.h in Headers */,
-				301F2F2A14F3C9CA003FE9FC /* CDV.h in Headers */,
-				30392E4E14F4FCAB00B9E0B8 /* CDVAvailability.h in Headers */,
-				3034979C1513D56A0090E688 /* CDVLocalStorage.h in Headers */,
-				3062D120151D0EDB000D9128 /* UIDevice+Extensions.h in Headers */,
-				3E76876F156A90EE00EB6FA3 /* CDVLogger.h in Headers */,
-				EBA3557315ABD38C00F4DE24 /* NSArray+Comparisons.h in Headers */,
-				30C5F1DF15AF9E950052A00D /* CDVDevice.h in Headers */,
-				EB80C2AC15DEA63D004D9E7B /* CDVEcho.h in Headers */,
-				EB3B3547161CB44D003DBE7D /* CDVCommandQueue.h in Headers */,
-				EB3B357C161F2A45003DBE7D /* CDVCommandDelegateImpl.h in Headers */,
-				9D76CF3C1625A4C50008A0F6 /* CDVGlobalization.h in Headers */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXHeadersBuildPhase section */
-
-/* Begin PBXNativeTarget section */
-		D2AAC07D0554694100DB518D /* CordovaLib */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CordovaLib" */;
-			buildPhases = (
-				D2AAC07A0554694100DB518D /* Headers */,
-				D2AAC07B0554694100DB518D /* Sources */,
-				D2AAC07C0554694100DB518D /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = CordovaLib;
-			productName = CordovaLib;
-			productReference = 68A32D7114102E1C006B237C /* libCordova.a */;
-			productType = "com.apple.product-type.library.static";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		0867D690FE84028FC02AAC07 /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastUpgradeCheck = 0430;
-			};
-			buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CordovaLib" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 1;
-			knownRegions = (
-				English,
-				Japanese,
-				French,
-				German,
-				en,
-			);
-			mainGroup = 0867D691FE84028FC02AAC07 /* CordovaLib */;
-			productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				D2AAC07D0554694100DB518D /* CordovaLib */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXSourcesBuildPhase section */
-		D2AAC07B0554694100DB518D /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				8887FD671090FBE7009987E8 /* CDVCamera.m in Sources */,
-				8887FD691090FBE7009987E8 /* NSDictionary+Extensions.m in Sources */,
-				8887FD6B1090FBE7009987E8 /* CDVContacts.m in Sources */,
-				8887FD6D1090FBE7009987E8 /* CDVDebugConsole.m in Sources */,
-				8887FD711090FBE7009987E8 /* CDVFile.m in Sources */,
-				8887FD751090FBE7009987E8 /* CDVInvokedUrlCommand.m in Sources */,
-				8887FD861090FBE7009987E8 /* CDVLocation.m in Sources */,
-				8887FD8E1090FBE7009987E8 /* CDVNotification.m in Sources */,
-				8887FD901090FBE7009987E8 /* NSData+Base64.m in Sources */,
-				8887FD9E1090FBE7009987E8 /* CDVReachability.m in Sources */,
-				8887FDA01090FBE7009987E8 /* CDVSound.m in Sources */,
-				88BA573E109BB46F00FB5E78 /* CDVAccelerometer.m in Sources */,
-				1F3C04CF12BC247D004F9E10 /* CDVContact.m in Sources */,
-				1F92F4A11314023E0046367C /* CDVPluginResult.m in Sources */,
-				C937A4571337599E002C4C79 /* CDVFileTransfer.m in Sources */,
-				307A8F9F1385A2EC00E43782 /* CDVConnection.m in Sources */,
-				1F584B9C1385A28A00ED25E8 /* CDVCapture.m in Sources */,
-				30E33AF313A7E24B00594D64 /* CDVPlugin.m in Sources */,
-				30B39EBF13D0268B0009682A /* CDVSplashScreen.m in Sources */,
-				30E563D013E217EC00C949AA /* NSMutableArray+QueueAdditions.m in Sources */,
-				1F2BECC113F9785B00A93BF6 /* CDVBattery.m in Sources */,
-				30C684821406CB38004C1A8E /* CDVWhitelist.m in Sources */,
-				30C684961407044B004C1A8E /* CDVURLProtocol.m in Sources */,
-				30A90B9314588697006178D3 /* JSONKit.m in Sources */,
-				8852C43C14B65FD800F0E735 /* CDVViewController.m in Sources */,
-				8852C44114B65FD800F0E735 /* CDVCordovaView.m in Sources */,
-				3034979E1513D56A0090E688 /* CDVLocalStorage.m in Sources */,
-				3062D122151D0EDB000D9128 /* UIDevice+Extensions.m in Sources */,
-				3E76876D156A90EE00EB6FA3 /* CDVLogger.m in Sources */,
-				EBA3557515ABD38C00F4DE24 /* NSArray+Comparisons.m in Sources */,
-				30C5F1E015AF9E950052A00D /* CDVDevice.m in Sources */,
-				EB80C2AD15DEA63D004D9E7B /* CDVEcho.m in Sources */,
-				EB3B3548161CB44D003DBE7D /* CDVCommandQueue.m in Sources */,
-				EB3B357D161F2A45003DBE7D /* CDVCommandDelegateImpl.m in Sources */,
-				9D76CF3D1625A4C50008A0F6 /* CDVGlobalization.m in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
-		1DEB921F08733DC00010E9CD /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				"ARCHS[sdk=iphoneos*]" = (
-					armv6,
-					armv7,
-				);
-				"ARCHS[sdk=iphoneos6.*]" = (
-					armv7,
-					armv7s,
-				);
-				"ARCHS[sdk=iphonesimulator*]" = i386;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				COPY_PHASE_STRIP = NO;
-				DSTROOT = "/tmp/$(PROJECT_NAME).dst";
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = CordovaLib_Prefix.pch;
-				GCC_PREPROCESSOR_DEFINITIONS = "";
-				GCC_THUMB_SUPPORT = NO;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				INSTALL_PATH = /usr/local/lib;
-				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
-				PRODUCT_NAME = Cordova;
-				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
-				SKIP_INSTALL = YES;
-			};
-			name = Debug;
-		};
-		1DEB922008733DC00010E9CD /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				"ARCHS[sdk=iphoneos*]" = (
-					armv6,
-					armv7,
-				);
-				"ARCHS[sdk=iphoneos6.*]" = (
-					armv7,
-					armv7s,
-				);
-				"ARCHS[sdk=iphonesimulator*]" = i386;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				DSTROOT = "/tmp/$(PROJECT_NAME).dst";
-				GCC_MODEL_TUNING = G5;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = CordovaLib_Prefix.pch;
-				GCC_PREPROCESSOR_DEFINITIONS = "";
-				GCC_THUMB_SUPPORT = NO;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				INSTALL_PATH = /usr/local/lib;
-				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
-				PRODUCT_NAME = Cordova;
-				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
-				SKIP_INSTALL = YES;
-			};
-			name = Release;
-		};
-		1DEB922308733DC00010E9CD /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				"ARCHS[sdk=iphoneos*]" = (
-					armv6,
-					armv7,
-				);
-				"ARCHS[sdk=iphoneos6.*]" = (
-					armv7,
-					armv7s,
-				);
-				"ARCHS[sdk=iphonesimulator*]" = i386;
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = "";
-				GCC_THUMB_SUPPORT = NO;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
-				ONLY_ACTIVE_ARCH = NO;
-				OTHER_CFLAGS = "-DDEBUG";
-				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
-				SDKROOT = iphoneos;
-				SKIP_INSTALL = YES;
-				TARGETED_DEVICE_FAMILY = "1,2";
-				USER_HEADER_SEARCH_PATHS = "";
-				VALID_ARCHS = "i386 armv6 armv7 armv7s";
-			};
-			name = Debug;
-		};
-		1DEB922408733DC00010E9CD /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				"ARCHS[sdk=iphoneos*]" = (
-					armv6,
-					armv7,
-				);
-				"ARCHS[sdk=iphoneos6.*]" = (
-					armv7,
-					armv7s,
-				);
-				"ARCHS[sdk=iphonesimulator*]" = i386;
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_PREPROCESSOR_DEFINITIONS = "";
-				GCC_THUMB_SUPPORT = NO;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
-				ONLY_ACTIVE_ARCH = NO;
-				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
-				SDKROOT = iphoneos;
-				SKIP_INSTALL = YES;
-				TARGETED_DEVICE_FAMILY = "1,2";
-				VALID_ARCHS = "i386 armv6 armv7 armv7s";
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CordovaLib" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				1DEB921F08733DC00010E9CD /* Debug */,
-				1DEB922008733DC00010E9CD /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CordovaLib" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				1DEB922308733DC00010E9CD /* Debug */,
-				1DEB922408733DC00010E9CD /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp.xcodeproj/project.orig.pbxproj
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp.xcodeproj/project.orig.pbxproj b/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp.xcodeproj/project.orig.pbxproj
deleted file mode 100644
index a4d87f9..0000000
--- a/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp.xcodeproj/project.orig.pbxproj
+++ /dev/null
@@ -1,498 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A463F14DB0A1B007FEAC7 /* Foundation.framework */; };
-		571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464114DB0A1B007FEAC7 /* UIKit.framework */; };
-		571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */; };
-		571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464514DB0A1B007FEAC7 /* AddressBook.framework */; };
-		571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */; };
-		571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */; };
-		571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */; };
-		571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */; };
-		571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */; };
-		571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465114DB0A1B007FEAC7 /* QuartzCore.framework */; };
-		571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */; };
-		571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */; };
-		571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465714DB0A1B007FEAC7 /* CoreMedia.framework */; };
-		571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */; };
-		571A466014DB0A1B007FEAC7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A465F14DB0A1B007FEAC7 /* main.m */; };
-		571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A466214DB0A1B007FEAC7 /* PhoneGap.framework */; };
-		571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466614DB0A1B007FEAC7 /* Localizable.strings */; };
-		571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466A14DB0A1B007FEAC7 /* Localizable.strings */; };
-		571A466F14DB0A1B007FEAC7 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A466E14DB0A1B007FEAC7 /* icon.png */; };
-		571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467014DB0A1B007FEAC7 /* icon@2x.png */; };
-		571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467214DB0A1B007FEAC7 /* icon-72.png */; };
-		571A467614DB0A1B007FEAC7 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467514DB0A1B007FEAC7 /* Default.png */; };
-		571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467714DB0A1B007FEAC7 /* Default@2x.png */; };
-		571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 571A467914DB0A1B007FEAC7 /* Capture.bundle */; };
-		571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */ = {isa = PBXBuildFile; fileRef = 571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */; };
-		571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A467F14DB0A1B007FEAC7 /* AppDelegate.m */; };
-		571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A468214DB0A1B007FEAC7 /* MainViewController.m */; };
-		571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 571A468414DB0A1B007FEAC7 /* MainViewController.xib */; };
-		577FC36614DB0B620082BA7B /* www in Resources */ = {isa = PBXBuildFile; fileRef = 577FC36514DB0B620082BA7B /* www */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
-		571A463B14DB0A1B007FEAC7 /* ChildApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChildApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		571A463F14DB0A1B007FEAC7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-		571A464114DB0A1B007FEAC7 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
-		571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
-		571A464514DB0A1B007FEAC7 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
-		571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
-		571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
-		571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
-		571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
-		571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
-		571A465114DB0A1B007FEAC7 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
-		571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
-		571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
-		571A465714DB0A1B007FEAC7 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
-		571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ChildApp-Info.plist"; sourceTree = "<group>"; };
-		571A465D14DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		571A465F14DB0A1B007FEAC7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
-		571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ChildApp-Prefix.pch"; sourceTree = "<group>"; };
-		571A466214DB0A1B007FEAC7 /* PhoneGap.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PhoneGap.framework; path = /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework; sourceTree = "<absolute>"; };
-		571A466714DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/Localizable.strings; sourceTree = "<group>"; };
-		571A466B14DB0A1B007FEAC7 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Resources/es.lproj/Localizable.strings; sourceTree = "<group>"; };
-		571A466E14DB0A1B007FEAC7 /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon.png; path = Resources/icons/icon.png; sourceTree = "<group>"; };
-		571A467014DB0A1B007FEAC7 /* icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon@2x.png"; path = "Resources/icons/icon@2x.png"; sourceTree = "<group>"; };
-		571A467214DB0A1B007FEAC7 /* icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon-72.png"; path = "Resources/icons/icon-72.png"; sourceTree = "<group>"; };
-		571A467514DB0A1B007FEAC7 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/splash/Default.png; sourceTree = "<group>"; };
-		571A467714DB0A1B007FEAC7 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "Resources/splash/Default@2x.png"; sourceTree = "<group>"; };
-		571A467914DB0A1B007FEAC7 /* Capture.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Capture.bundle; path = Resources/Capture.bundle; sourceTree = "<group>"; };
-		571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = PhoneGap.plist; sourceTree = "<group>"; };
-		571A467E14DB0A1B007FEAC7 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Classes/AppDelegate.h; sourceTree = "<group>"; };
-		571A467F14DB0A1B007FEAC7 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Classes/AppDelegate.m; sourceTree = "<group>"; };
-		571A468114DB0A1B007FEAC7 /* MainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainViewController.h; path = Classes/MainViewController.h; sourceTree = "<group>"; };
-		571A468214DB0A1B007FEAC7 /* MainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = Classes/MainViewController.m; sourceTree = "<group>"; };
-		571A468414DB0A1B007FEAC7 /* MainViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainViewController.xib; path = Classes/MainViewController.xib; sourceTree = "<group>"; };
-		571A468714DB0A1B007FEAC7 /* README */ = {isa = PBXFileReference; lastKnownFileType = text; name = README; path = Plugins/README; sourceTree = "<group>"; };
-		577FC36514DB0B620082BA7B /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		571A463514DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */,
-				571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */,
-				571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */,
-				571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */,
-				571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */,
-				571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */,
-				571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */,
-				571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */,
-				571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */,
-				571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */,
-				571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */,
-				571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */,
-				571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */,
-				571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		571A463814DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		571A462D14DB0A1A007FEAC7 = {
-			isa = PBXGroup;
-			children = (
-				577FC36514DB0B620082BA7B /* www */,
-				571A465914DB0A1B007FEAC7 /* ChildApp */,
-				571A463E14DB0A1B007FEAC7 /* Frameworks */,
-				571A463C14DB0A1B007FEAC7 /* Products */,
-			);
-			sourceTree = "<group>";
-		};
-		571A463C14DB0A1B007FEAC7 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				571A463B14DB0A1B007FEAC7 /* ChildApp.app */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		571A463E14DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				571A463F14DB0A1B007FEAC7 /* Foundation.framework */,
-				571A464114DB0A1B007FEAC7 /* UIKit.framework */,
-				571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */,
-				571A464514DB0A1B007FEAC7 /* AddressBook.framework */,
-				571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */,
-				571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */,
-				571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */,
-				571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */,
-				571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */,
-				571A465114DB0A1B007FEAC7 /* QuartzCore.framework */,
-				571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */,
-				571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */,
-				571A465714DB0A1B007FEAC7 /* CoreMedia.framework */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
-		571A465914DB0A1B007FEAC7 /* ChildApp */ = {
-			isa = PBXGroup;
-			children = (
-				571A466214DB0A1B007FEAC7 /* PhoneGap.framework */,
-				571A466414DB0A1B007FEAC7 /* Resources */,
-				571A467D14DB0A1B007FEAC7 /* Classes */,
-				571A468614DB0A1B007FEAC7 /* Plugins */,
-				571A465A14DB0A1B007FEAC7 /* Supporting Files */,
-			);
-			path = ChildApp;
-			sourceTree = "<group>";
-		};
-		571A465A14DB0A1B007FEAC7 /* Supporting Files */ = {
-			isa = PBXGroup;
-			children = (
-				571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */,
-				571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */,
-				571A465F14DB0A1B007FEAC7 /* main.m */,
-				571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */,
-				571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */,
-				571A468414DB0A1B007FEAC7 /* MainViewController.xib */,
-			);
-			name = "Supporting Files";
-			sourceTree = "<group>";
-		};
-		571A466414DB0A1B007FEAC7 /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				571A467914DB0A1B007FEAC7 /* Capture.bundle */,
-				571A466514DB0A1B007FEAC7 /* en.lproj */,
-				571A466914DB0A1B007FEAC7 /* es.lproj */,
-				571A466D14DB0A1B007FEAC7 /* icons */,
-				571A467414DB0A1B007FEAC7 /* splash */,
-			);
-			name = Resources;
-			sourceTree = "<group>";
-		};
-		571A466514DB0A1B007FEAC7 /* en.lproj */ = {
-			isa = PBXGroup;
-			children = (
-				571A466614DB0A1B007FEAC7 /* Localizable.strings */,
-			);
-			name = en.lproj;
-			sourceTree = "<group>";
-		};
-		571A466914DB0A1B007FEAC7 /* es.lproj */ = {
-			isa = PBXGroup;
-			children = (
-				571A466A14DB0A1B007FEAC7 /* Localizable.strings */,
-			);
-			name = es.lproj;
-			sourceTree = "<group>";
-		};
-		571A466D14DB0A1B007FEAC7 /* icons */ = {
-			isa = PBXGroup;
-			children = (
-				571A466E14DB0A1B007FEAC7 /* icon.png */,
-				571A467014DB0A1B007FEAC7 /* icon@2x.png */,
-				571A467214DB0A1B007FEAC7 /* icon-72.png */,
-			);
-			name = icons;
-			sourceTree = "<group>";
-		};
-		571A467414DB0A1B007FEAC7 /* splash */ = {
-			isa = PBXGroup;
-			children = (
-				571A467514DB0A1B007FEAC7 /* Default.png */,
-				571A467714DB0A1B007FEAC7 /* Default@2x.png */,
-			);
-			name = splash;
-			sourceTree = "<group>";
-		};
-		571A467D14DB0A1B007FEAC7 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-				571A467E14DB0A1B007FEAC7 /* AppDelegate.h */,
-				571A467F14DB0A1B007FEAC7 /* AppDelegate.m */,
-				571A468114DB0A1B007FEAC7 /* MainViewController.h */,
-				571A468214DB0A1B007FEAC7 /* MainViewController.m */,
-			);
-			name = Classes;
-			sourceTree = "<group>";
-		};
-		571A468614DB0A1B007FEAC7 /* Plugins */ = {
-			isa = PBXGroup;
-			children = (
-				571A468714DB0A1B007FEAC7 /* README */,
-			);
-			name = Plugins;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		571A463A14DB0A1B007FEAC7 /* ChildApp */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */;
-			buildPhases = (
-				571A463414DB0A1B007FEAC7 /* Sources */,
-				571A463514DB0A1B007FEAC7 /* Frameworks */,
-				571A463614DB0A1B007FEAC7 /* Resources */,
-				571A463714DB0A1B007FEAC7 /* Sources */,
-				571A463814DB0A1B007FEAC7 /* Frameworks */,
-				571A463914DB0A1B007FEAC7 /* ShellScript */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = ChildApp;
-			productName = ChildApp;
-			productReference = 571A463B14DB0A1B007FEAC7 /* ChildApp.app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		571A462F14DB0A1A007FEAC7 /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastUpgradeCheck = 0420;
-			};
-			buildConfigurationList = 571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 0;
-			knownRegions = (
-				en,
-				es,
-			);
-			mainGroup = 571A462D14DB0A1A007FEAC7;
-			productRefGroup = 571A463C14DB0A1B007FEAC7 /* Products */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				571A463A14DB0A1B007FEAC7 /* ChildApp */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		571A463614DB0A1B007FEAC7 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */,
-				571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */,
-				571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */,
-				571A466F14DB0A1B007FEAC7 /* icon.png in Resources */,
-				571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */,
-				571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */,
-				571A467614DB0A1B007FEAC7 /* Default.png in Resources */,
-				571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */,
-				571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */,
-				571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */,
-				571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */,
-				577FC36614DB0B620082BA7B /* www in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
-		571A463914DB0A1B007FEAC7 /* ShellScript */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/bash;
-			shellScript = "\n\t\t\t\t\t\t\t\tif [ ! -d \"$PROJECT_DIR/www\" ] ; then\n\t\t\t\t\t\t\t\t\tcp -R /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework/www \"$PROJECT_DIR\"\n\t\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\t\t# detect www folder reference in project, if missing, print warning\n\t\t\t\t\t\t\t\tgrep \"{isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = \\\"<group>\\\"; };\" \"$PROJECT_DIR/$PROJECT_NAME.xcodeproj/project.pbxproj\"\n\t\t\t\t\t\t\t\trc=$? \n\t\t\t\t\t\t\t\tif [ $rc != 0 ] ; then\n\t\t\t\t\t\t\t\techo -e \"warning: Missing - Add $PROJECT_DIR/www as a folder reference in your project. Just drag and drop the folder into your project, into the Project Navigator of Xcode 4. Make sure you select the second radio-button: 'Create folder references for any added folders' (which will create a blue folder)\" 1>&2\n\t\t\t\t\t\t\t\tfi\t\t\t\t\t\t\t";
-		};
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		571A463414DB0A1B007FEAC7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A466014DB0A1B007FEAC7 /* main.m in Sources */,
-				571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */,
-				571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		571A463714DB0A1B007FEAC7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A465D14DB0A1B007FEAC7 /* en */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "<group>";
-		};
-		571A466614DB0A1B007FEAC7 /* Localizable.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A466714DB0A1B007FEAC7 /* en */,
-			);
-			name = Localizable.strings;
-			sourceTree = "<group>";
-		};
-		571A466A14DB0A1B007FEAC7 /* Localizable.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A466B14DB0A1B007FEAC7 /* es */,
-			);
-			name = Localizable.strings;
-			sourceTree = "<group>";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		571A468814DB0A1B007FEAC7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
-				CLANG_ENABLE_OBJC_ARC = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = NO;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				GCC_VERSION = com.apple.compilers.llvmgcc42;
-				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
-				SDKROOT = iphoneos;
-			};
-			name = Debug;
-		};
-		571A468914DB0A1B007FEAC7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
-				CLANG_ENABLE_OBJC_ARC = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_VERSION = com.apple.compilers.llvmgcc42;
-				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
-				SDKROOT = iphoneos;
-				VALIDATE_PRODUCT = YES;
-			};
-			name = Release;
-		};
-		571A468B14DB0A1B007FEAC7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = YES;
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
-				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
-				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak_library",
-					/usr/lib/libSystem.B.dylib,
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				TARGETED_DEVICE_FAMILY = "1,2";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Debug;
-		};
-		571A468C14DB0A1B007FEAC7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = YES;
-				COPY_PHASE_STRIP = YES;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
-				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
-				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak_library",
-					/usr/lib/libSystem.B.dylib,
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				TARGETED_DEVICE_FAMILY = "1,2";
-				VALIDATE_PRODUCT = YES;
-				WRAPPER_EXTENSION = app;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				571A468814DB0A1B007FEAC7 /* Debug */,
-				571A468914DB0A1B007FEAC7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				571A468B14DB0A1B007FEAC7 /* Debug */,
-				571A468C14DB0A1B007FEAC7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 571A462F14DB0A1A007FEAC7 /* Project object */;
-}


[35/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_writer.cpp
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_writer.cpp b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_writer.cpp
new file mode 100644
index 0000000..a522ef6
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_writer.cpp
@@ -0,0 +1,829 @@
+#include <json/writer.h>
+#include <utility>
+#include <assert.h>
+#include <stdio.h>
+#include <string.h>
+#include <iostream>
+#include <sstream>
+#include <iomanip>
+
+#if _MSC_VER >= 1400 // VC++ 8.0
+#pragma warning( disable : 4996 )   // disable warning about strdup being deprecated.
+#endif
+
+namespace Json {
+
+static bool isControlCharacter(char ch)
+{
+   return ch > 0 && ch <= 0x1F;
+}
+
+static bool containsControlCharacter( const char* str )
+{
+   while ( *str ) 
+   {
+      if ( isControlCharacter( *(str++) ) )
+         return true;
+   }
+   return false;
+}
+static void uintToString( unsigned int value, 
+                          char *&current )
+{
+   *--current = 0;
+   do
+   {
+      *--current = (value % 10) + '0';
+      value /= 10;
+   }
+   while ( value != 0 );
+}
+
+std::string valueToString( Int value )
+{
+   char buffer[32];
+   char *current = buffer + sizeof(buffer);
+   bool isNegative = value < 0;
+   if ( isNegative )
+      value = -value;
+   uintToString( UInt(value), current );
+   if ( isNegative )
+      *--current = '-';
+   assert( current >= buffer );
+   return current;
+}
+
+
+std::string valueToString( UInt value )
+{
+   char buffer[32];
+   char *current = buffer + sizeof(buffer);
+   uintToString( value, current );
+   assert( current >= buffer );
+   return current;
+}
+
+std::string valueToString( double value )
+{
+   char buffer[32];
+#if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__) // Use secure version with visual studio 2005 to avoid warning. 
+   sprintf_s(buffer, sizeof(buffer), "%#.16g", value); 
+#else	
+   sprintf(buffer, "%#.16g", value); 
+#endif
+   char* ch = buffer + strlen(buffer) - 1;
+   if (*ch != '0') return buffer; // nothing to truncate, so save time
+   while(ch > buffer && *ch == '0'){
+     --ch;
+   }
+   char* last_nonzero = ch;
+   while(ch >= buffer){
+     switch(*ch){
+     case '0':
+     case '1':
+     case '2':
+     case '3':
+     case '4':
+     case '5':
+     case '6':
+     case '7':
+     case '8':
+     case '9':
+       --ch;
+       continue;
+     case '.':
+       // Truncate zeroes to save bytes in output, but keep one.
+       *(last_nonzero+2) = '\0';
+       return buffer;
+     default:
+       return buffer;
+     }
+   }
+   return buffer;
+}
+
+
+std::string valueToString( bool value )
+{
+   return value ? "true" : "false";
+}
+
+std::string valueToQuotedString( const char *value )
+{
+   // Not sure how to handle unicode...
+   if (strpbrk(value, "\"\\\b\f\n\r\t") == NULL && !containsControlCharacter( value ))
+      return std::string("\"") + value + "\"";
+   // We have to walk value and escape any special characters.
+   // Appending to std::string is not efficient, but this should be rare.
+   // (Note: forward slashes are *not* rare, but I am not escaping them.)
+   unsigned maxsize = strlen(value)*2 + 3; // allescaped+quotes+NULL
+   std::string result;
+   result.reserve(maxsize); // to avoid lots of mallocs
+   result += "\"";
+   for (const char* c=value; *c != 0; ++c)
+   {
+      switch(*c)
+      {
+         case '\"':
+            result += "\\\"";
+            break;
+         case '\\':
+            result += "\\\\";
+            break;
+         case '\b':
+            result += "\\b";
+            break;
+         case '\f':
+            result += "\\f";
+            break;
+         case '\n':
+            result += "\\n";
+            break;
+         case '\r':
+            result += "\\r";
+            break;
+         case '\t':
+            result += "\\t";
+            break;
+         //case '/':
+            // Even though \/ is considered a legal escape in JSON, a bare
+            // slash is also legal, so I see no reason to escape it.
+            // (I hope I am not misunderstanding something.
+            // blep notes: actually escaping \/ may be useful in javascript to avoid </ 
+            // sequence.
+            // Should add a flag to allow this compatibility mode and prevent this 
+            // sequence from occurring.
+         default:
+            if ( isControlCharacter( *c ) )
+            {
+               std::ostringstream oss;
+               oss << "\\u" << std::hex << std::uppercase << std::setfill('0') << std::setw(4) << static_cast<int>(*c);
+               result += oss.str();
+            }
+            else
+            {
+               result += *c;
+            }
+            break;
+      }
+   }
+   result += "\"";
+   return result;
+}
+
+// Class Writer
+// //////////////////////////////////////////////////////////////////
+Writer::~Writer()
+{
+}
+
+
+// Class FastWriter
+// //////////////////////////////////////////////////////////////////
+
+FastWriter::FastWriter()
+   : yamlCompatibilityEnabled_( false )
+{
+}
+
+
+void 
+FastWriter::enableYAMLCompatibility()
+{
+   yamlCompatibilityEnabled_ = true;
+}
+
+
+std::string 
+FastWriter::write( const Value &root )
+{
+   document_ = "";
+   writeValue( root );
+   document_ += "\n";
+   return document_;
+}
+
+
+void 
+FastWriter::writeValue( const Value &value )
+{
+   switch ( value.type() )
+   {
+   case nullValue:
+      document_ += "null";
+      break;
+   case intValue:
+      document_ += valueToString( value.asInt() );
+      break;
+   case uintValue:
+      document_ += valueToString( value.asUInt() );
+      break;
+   case realValue:
+      document_ += valueToString( value.asDouble() );
+      break;
+   case stringValue:
+      document_ += valueToQuotedString( value.asCString() );
+      break;
+   case booleanValue:
+      document_ += valueToString( value.asBool() );
+      break;
+   case arrayValue:
+      {
+         document_ += "[";
+         int size = value.size();
+         for ( int index =0; index < size; ++index )
+         {
+            if ( index > 0 )
+               document_ += ",";
+            writeValue( value[index] );
+         }
+         document_ += "]";
+      }
+      break;
+   case objectValue:
+      {
+         Value::Members members( value.getMemberNames() );
+         document_ += "{";
+         for ( Value::Members::iterator it = members.begin(); 
+               it != members.end(); 
+               ++it )
+         {
+            const std::string &name = *it;
+            if ( it != members.begin() )
+               document_ += ",";
+            document_ += valueToQuotedString( name.c_str() );
+            document_ += yamlCompatibilityEnabled_ ? ": " 
+                                                  : ":";
+            writeValue( value[name] );
+         }
+         document_ += "}";
+      }
+      break;
+   }
+}
+
+
+// Class StyledWriter
+// //////////////////////////////////////////////////////////////////
+
+StyledWriter::StyledWriter()
+   : rightMargin_( 74 )
+   , indentSize_( 3 )
+{
+}
+
+
+std::string 
+StyledWriter::write( const Value &root )
+{
+   document_ = "";
+   addChildValues_ = false;
+   indentString_ = "";
+   writeCommentBeforeValue( root );
+   writeValue( root );
+   writeCommentAfterValueOnSameLine( root );
+   document_ += "\n";
+   return document_;
+}
+
+
+void 
+StyledWriter::writeValue( const Value &value )
+{
+   switch ( value.type() )
+   {
+   case nullValue:
+      pushValue( "null" );
+      break;
+   case intValue:
+      pushValue( valueToString( value.asInt() ) );
+      break;
+   case uintValue:
+      pushValue( valueToString( value.asUInt() ) );
+      break;
+   case realValue:
+      pushValue( valueToString( value.asDouble() ) );
+      break;
+   case stringValue:
+      pushValue( valueToQuotedString( value.asCString() ) );
+      break;
+   case booleanValue:
+      pushValue( valueToString( value.asBool() ) );
+      break;
+   case arrayValue:
+      writeArrayValue( value);
+      break;
+   case objectValue:
+      {
+         Value::Members members( value.getMemberNames() );
+         if ( members.empty() )
+            pushValue( "{}" );
+         else
+         {
+            writeWithIndent( "{" );
+            indent();
+            Value::Members::iterator it = members.begin();
+            while ( true )
+            {
+               const std::string &name = *it;
+               const Value &childValue = value[name];
+               writeCommentBeforeValue( childValue );
+               writeWithIndent( valueToQuotedString( name.c_str() ) );
+               document_ += " : ";
+               writeValue( childValue );
+               if ( ++it == members.end() )
+               {
+                  writeCommentAfterValueOnSameLine( childValue );
+                  break;
+               }
+               document_ += ",";
+               writeCommentAfterValueOnSameLine( childValue );
+            }
+            unindent();
+            writeWithIndent( "}" );
+         }
+      }
+      break;
+   }
+}
+
+
+void 
+StyledWriter::writeArrayValue( const Value &value )
+{
+   unsigned size = value.size();
+   if ( size == 0 )
+      pushValue( "[]" );
+   else
+   {
+      bool isArrayMultiLine = isMultineArray( value );
+      if ( isArrayMultiLine )
+      {
+         writeWithIndent( "[" );
+         indent();
+         bool hasChildValue = !childValues_.empty();
+         unsigned index =0;
+         while ( true )
+         {
+            const Value &childValue = value[index];
+            writeCommentBeforeValue( childValue );
+            if ( hasChildValue )
+               writeWithIndent( childValues_[index] );
+            else
+            {
+               writeIndent();
+               writeValue( childValue );
+            }
+            if ( ++index == size )
+            {
+               writeCommentAfterValueOnSameLine( childValue );
+               break;
+            }
+            document_ += ",";
+            writeCommentAfterValueOnSameLine( childValue );
+         }
+         unindent();
+         writeWithIndent( "]" );
+      }
+      else // output on a single line
+      {
+         assert( childValues_.size() == size );
+         document_ += "[ ";
+         for ( unsigned index =0; index < size; ++index )
+         {
+            if ( index > 0 )
+               document_ += ", ";
+            document_ += childValues_[index];
+         }
+         document_ += " ]";
+      }
+   }
+}
+
+
+bool 
+StyledWriter::isMultineArray( const Value &value )
+{
+   int size = value.size();
+   bool isMultiLine = size*3 >= rightMargin_ ;
+   childValues_.clear();
+   for ( int index =0; index < size  &&  !isMultiLine; ++index )
+   {
+      const Value &childValue = value[index];
+      isMultiLine = isMultiLine  ||
+                     ( (childValue.isArray()  ||  childValue.isObject())  &&  
+                        childValue.size() > 0 );
+   }
+   if ( !isMultiLine ) // check if line length > max line length
+   {
+      childValues_.reserve( size );
+      addChildValues_ = true;
+      int lineLength = 4 + (size-1)*2; // '[ ' + ', '*n + ' ]'
+      for ( int index =0; index < size  &&  !isMultiLine; ++index )
+      {
+         writeValue( value[index] );
+         lineLength += int( childValues_[index].length() );
+         isMultiLine = isMultiLine  &&  hasCommentForValue( value[index] );
+      }
+      addChildValues_ = false;
+      isMultiLine = isMultiLine  ||  lineLength >= rightMargin_;
+   }
+   return isMultiLine;
+}
+
+
+void 
+StyledWriter::pushValue( const std::string &value )
+{
+   if ( addChildValues_ )
+      childValues_.push_back( value );
+   else
+      document_ += value;
+}
+
+
+void 
+StyledWriter::writeIndent()
+{
+   if ( !document_.empty() )
+   {
+      char last = document_[document_.length()-1];
+      if ( last == ' ' )     // already indented
+         return;
+      if ( last != '\n' )    // Comments may add new-line
+         document_ += '\n';
+   }
+   document_ += indentString_;
+}
+
+
+void 
+StyledWriter::writeWithIndent( const std::string &value )
+{
+   writeIndent();
+   document_ += value;
+}
+
+
+void 
+StyledWriter::indent()
+{
+   indentString_ += std::string( indentSize_, ' ' );
+}
+
+
+void 
+StyledWriter::unindent()
+{
+   assert( int(indentString_.size()) >= indentSize_ );
+   indentString_.resize( indentString_.size() - indentSize_ );
+}
+
+
+void 
+StyledWriter::writeCommentBeforeValue( const Value &root )
+{
+   if ( !root.hasComment( commentBefore ) )
+      return;
+   document_ += normalizeEOL( root.getComment( commentBefore ) );
+   document_ += "\n";
+}
+
+
+void 
+StyledWriter::writeCommentAfterValueOnSameLine( const Value &root )
+{
+   if ( root.hasComment( commentAfterOnSameLine ) )
+      document_ += " " + normalizeEOL( root.getComment( commentAfterOnSameLine ) );
+
+   if ( root.hasComment( commentAfter ) )
+   {
+      document_ += "\n";
+      document_ += normalizeEOL( root.getComment( commentAfter ) );
+      document_ += "\n";
+   }
+}
+
+
+bool 
+StyledWriter::hasCommentForValue( const Value &value )
+{
+   return value.hasComment( commentBefore )
+          ||  value.hasComment( commentAfterOnSameLine )
+          ||  value.hasComment( commentAfter );
+}
+
+
+std::string 
+StyledWriter::normalizeEOL( const std::string &text )
+{
+   std::string normalized;
+   normalized.reserve( text.length() );
+   const char *begin = text.c_str();
+   const char *end = begin + text.length();
+   const char *current = begin;
+   while ( current != end )
+   {
+      char c = *current++;
+      if ( c == '\r' ) // mac or dos EOL
+      {
+         if ( *current == '\n' ) // convert dos EOL
+            ++current;
+         normalized += '\n';
+      }
+      else // handle unix EOL & other char
+         normalized += c;
+   }
+   return normalized;
+}
+
+
+// Class StyledStreamWriter
+// //////////////////////////////////////////////////////////////////
+
+StyledStreamWriter::StyledStreamWriter( std::string indentation )
+   : document_(NULL)
+   , rightMargin_( 74 )
+   , indentation_( indentation )
+{
+}
+
+
+void
+StyledStreamWriter::write( std::ostream &out, const Value &root )
+{
+   document_ = &out;
+   addChildValues_ = false;
+   indentString_ = "";
+   writeCommentBeforeValue( root );
+   writeValue( root );
+   writeCommentAfterValueOnSameLine( root );
+   *document_ << "\n";
+   document_ = NULL; // Forget the stream, for safety.
+}
+
+
+void 
+StyledStreamWriter::writeValue( const Value &value )
+{
+   switch ( value.type() )
+   {
+   case nullValue:
+      pushValue( "null" );
+      break;
+   case intValue:
+      pushValue( valueToString( value.asInt() ) );
+      break;
+   case uintValue:
+      pushValue( valueToString( value.asUInt() ) );
+      break;
+   case realValue:
+      pushValue( valueToString( value.asDouble() ) );
+      break;
+   case stringValue:
+      pushValue( valueToQuotedString( value.asCString() ) );
+      break;
+   case booleanValue:
+      pushValue( valueToString( value.asBool() ) );
+      break;
+   case arrayValue:
+      writeArrayValue( value);
+      break;
+   case objectValue:
+      {
+         Value::Members members( value.getMemberNames() );
+         if ( members.empty() )
+            pushValue( "{}" );
+         else
+         {
+            writeWithIndent( "{" );
+            indent();
+            Value::Members::iterator it = members.begin();
+            while ( true )
+            {
+               const std::string &name = *it;
+               const Value &childValue = value[name];
+               writeCommentBeforeValue( childValue );
+               writeWithIndent( valueToQuotedString( name.c_str() ) );
+               *document_ << " : ";
+               writeValue( childValue );
+               if ( ++it == members.end() )
+               {
+                  writeCommentAfterValueOnSameLine( childValue );
+                  break;
+               }
+               *document_ << ",";
+               writeCommentAfterValueOnSameLine( childValue );
+            }
+            unindent();
+            writeWithIndent( "}" );
+         }
+      }
+      break;
+   }
+}
+
+
+void 
+StyledStreamWriter::writeArrayValue( const Value &value )
+{
+   unsigned size = value.size();
+   if ( size == 0 )
+      pushValue( "[]" );
+   else
+   {
+      bool isArrayMultiLine = isMultineArray( value );
+      if ( isArrayMultiLine )
+      {
+         writeWithIndent( "[" );
+         indent();
+         bool hasChildValue = !childValues_.empty();
+         unsigned index =0;
+         while ( true )
+         {
+            const Value &childValue = value[index];
+            writeCommentBeforeValue( childValue );
+            if ( hasChildValue )
+               writeWithIndent( childValues_[index] );
+            else
+            {
+	       writeIndent();
+               writeValue( childValue );
+            }
+            if ( ++index == size )
+            {
+               writeCommentAfterValueOnSameLine( childValue );
+               break;
+            }
+            *document_ << ",";
+            writeCommentAfterValueOnSameLine( childValue );
+         }
+         unindent();
+         writeWithIndent( "]" );
+      }
+      else // output on a single line
+      {
+         assert( childValues_.size() == size );
+         *document_ << "[ ";
+         for ( unsigned index =0; index < size; ++index )
+         {
+            if ( index > 0 )
+               *document_ << ", ";
+            *document_ << childValues_[index];
+         }
+         *document_ << " ]";
+      }
+   }
+}
+
+
+bool 
+StyledStreamWriter::isMultineArray( const Value &value )
+{
+   int size = value.size();
+   bool isMultiLine = size*3 >= rightMargin_ ;
+   childValues_.clear();
+   for ( int index =0; index < size  &&  !isMultiLine; ++index )
+   {
+      const Value &childValue = value[index];
+      isMultiLine = isMultiLine  ||
+                     ( (childValue.isArray()  ||  childValue.isObject())  &&  
+                        childValue.size() > 0 );
+   }
+   if ( !isMultiLine ) // check if line length > max line length
+   {
+      childValues_.reserve( size );
+      addChildValues_ = true;
+      int lineLength = 4 + (size-1)*2; // '[ ' + ', '*n + ' ]'
+      for ( int index =0; index < size  &&  !isMultiLine; ++index )
+      {
+         writeValue( value[index] );
+         lineLength += int( childValues_[index].length() );
+         isMultiLine = isMultiLine  &&  hasCommentForValue( value[index] );
+      }
+      addChildValues_ = false;
+      isMultiLine = isMultiLine  ||  lineLength >= rightMargin_;
+   }
+   return isMultiLine;
+}
+
+
+void 
+StyledStreamWriter::pushValue( const std::string &value )
+{
+   if ( addChildValues_ )
+      childValues_.push_back( value );
+   else
+      *document_ << value;
+}
+
+
+void 
+StyledStreamWriter::writeIndent()
+{
+  /*
+    Some comments in this method would have been nice. ;-)
+
+   if ( !document_.empty() )
+   {
+      char last = document_[document_.length()-1];
+      if ( last == ' ' )     // already indented
+         return;
+      if ( last != '\n' )    // Comments may add new-line
+         *document_ << '\n';
+   }
+  */
+   *document_ << '\n' << indentString_;
+}
+
+
+void 
+StyledStreamWriter::writeWithIndent( const std::string &value )
+{
+   writeIndent();
+   *document_ << value;
+}
+
+
+void 
+StyledStreamWriter::indent()
+{
+   indentString_ += indentation_;
+}
+
+
+void 
+StyledStreamWriter::unindent()
+{
+   assert( indentString_.size() >= indentation_.size() );
+   indentString_.resize( indentString_.size() - indentation_.size() );
+}
+
+
+void 
+StyledStreamWriter::writeCommentBeforeValue( const Value &root )
+{
+   if ( !root.hasComment( commentBefore ) )
+      return;
+   *document_ << normalizeEOL( root.getComment( commentBefore ) );
+   *document_ << "\n";
+}
+
+
+void 
+StyledStreamWriter::writeCommentAfterValueOnSameLine( const Value &root )
+{
+   if ( root.hasComment( commentAfterOnSameLine ) )
+      *document_ << " " + normalizeEOL( root.getComment( commentAfterOnSameLine ) );
+
+   if ( root.hasComment( commentAfter ) )
+   {
+      *document_ << "\n";
+      *document_ << normalizeEOL( root.getComment( commentAfter ) );
+      *document_ << "\n";
+   }
+}
+
+
+bool 
+StyledStreamWriter::hasCommentForValue( const Value &value )
+{
+   return value.hasComment( commentBefore )
+          ||  value.hasComment( commentAfterOnSameLine )
+          ||  value.hasComment( commentAfter );
+}
+
+
+std::string 
+StyledStreamWriter::normalizeEOL( const std::string &text )
+{
+   std::string normalized;
+   normalized.reserve( text.length() );
+   const char *begin = text.c_str();
+   const char *end = begin + text.length();
+   const char *current = begin;
+   while ( current != end )
+   {
+      char c = *current++;
+      if ( c == '\r' ) // mac or dos EOL
+      {
+         if ( *current == '\n' ) // convert dos EOL
+            ++current;
+         normalized += '\n';
+      }
+      else // handle unix EOL & other char
+         normalized += c;
+   }
+   return normalized;
+}
+
+
+std::ostream& operator<<( std::ostream &sout, const Value &root )
+{
+   Json::StyledStreamWriter writer;
+   writer.write(sout, root);
+   return sout;
+}
+
+
+} // namespace Json

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/plugin.cpp
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/plugin.cpp b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/plugin.cpp
new file mode 100644
index 0000000..387fcea
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/plugin.cpp
@@ -0,0 +1,320 @@
+#include "plugin.h"
+#include "tokenizer.h"
+
+#ifdef _WINDOWS
+#include <windows.h>
+BOOL APIENTRY DllMain( HANDLE hModule,
+                       DWORD ul_reason_for_call,
+                       LPVOID lpReserved )
+{
+    return TRUE;
+}
+#else
+#include <errno.h>
+#include <string.h>
+
+extern int errno;
+#endif
+
+SendPluginEv SendPluginEvent;
+
+string g_GetSysErrMsg( void )
+{
+    string strError = "Unknown";
+    // Problem loading
+#ifdef _WINDOWS
+    int nErrorCode = GetLastError();
+    LPTSTR s;
+    if ( ::FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+    NULL, nErrorCode, 0, ( LPTSTR ) &s, 0, NULL ) )
+    {
+        strError = s;
+    }
+    else
+    {
+        char szBuf[ 20 ];
+        _snprintf_s( szBuf, _countof(szBuf), 19, "%d", nErrorCode );
+        strError = szBuf;
+    }
+#else
+    char szError[80];
+    if ( strerror_r( errno, szError, sizeof(szError)  ) )
+    {
+        strError = "no description found";
+    }
+    else
+    {
+        strError = szError;
+    }
+#endif
+    return strError;
+}
+
+void g_sleep( unsigned int mseconds )
+{
+#ifdef _WINDOWS
+    Sleep( mseconds );
+#else
+    usleep( mseconds * 1000 );
+#endif
+}
+
+string& g_trim( string& str )
+{
+    // Whitespace characters
+    char whspc[] = " \t\r\n\v\f";
+
+    // Whack off first part
+    size_t pos = str.find_first_not_of( whspc );
+
+    if ( pos != string::npos )
+        str.replace( 0, pos, "" );
+
+    // Whack off trailing stuff
+    pos = str.find_last_not_of( whspc );
+
+    if ( pos != string::npos )
+        str.replace( pos + 1, str.length() - pos, "" );
+
+    return str;
+}
+
+void g_tokenize( const string& str, const string& delimiters, vector<string>& tokens )
+{
+    tokenize( str, tokens, delimiters );
+}
+
+char* SetEventFunc( SendPluginEv funcPtr )
+{
+    static char * szObjList = onGetObjList();
+    SendPluginEvent = funcPtr;
+    return szObjList;
+}
+
+
+const int nMAXSIZE = 512;
+char* g_pszRetVal = NULL;
+
+//-----------------------------------------------------------
+// Map from an object Id to an object instance
+//-----------------------------------------------------------
+typedef std::map<string, JSExt*> StringToJExt_T;
+
+//-----------------------------------------------------------
+// Map from a browser context to an id mapping
+//-----------------------------------------------------------
+typedef std::map<void*, StringToJExt_T*> VoidToMap_T;
+
+VoidToMap_T g_context2Map;
+
+class GlobalSharedModule
+{
+
+public:
+    GlobalSharedModule( void )
+    {
+        g_pszRetVal = new char[ nMAXSIZE ];
+    }
+
+    ~GlobalSharedModule()
+    {
+        delete [] g_pszRetVal;
+
+        VoidToMap_T::iterator posMaps;
+
+        for ( posMaps = g_context2Map.begin(); posMaps != g_context2Map.end(); ++posMaps )
+        {
+            StringToJExt_T& id2Obj = *posMaps->second;
+            StringToJExt_T::iterator posMap;
+
+            for ( posMap = id2Obj.begin(); posMap != id2Obj.end(); ++posMap )
+            {
+                JSExt* pJSExt = posMap->second;
+
+                if ( pJSExt->CanDelete() )
+                {
+                    delete pJSExt;
+                }
+            }
+
+            id2Obj.erase( id2Obj.begin(), id2Obj.end() );
+        }
+
+        g_context2Map.erase( g_context2Map.begin(), g_context2Map.end() );
+    }
+};
+
+GlobalSharedModule g_sharedModule;
+
+char* g_str2global( const string& strRetVal )
+{
+    int nLen = strRetVal.size();
+
+    if ( nLen >= nMAXSIZE )
+    {
+        delete [] g_pszRetVal;
+        g_pszRetVal = new char[ nLen + 1 ];
+    }
+
+    else
+    {
+        // To minimize the number of memory reallocations, the assumption
+        // is that in most times this will be the case
+        delete [] g_pszRetVal;
+        g_pszRetVal = new char[ nMAXSIZE ];
+    }
+
+    strcpy( g_pszRetVal, strRetVal.c_str() );
+    return g_pszRetVal;
+}
+
+bool g_unregisterObject( const string& strObjId, void* pContext )
+{
+    // Called by the plugin extension implementation
+    // if the extension handles the deletion of its object
+
+    StringToJExt_T * pID2Obj = NULL;
+
+    VoidToMap_T::iterator iter = g_context2Map.find( pContext );
+
+    if ( iter != g_context2Map.end() )
+    {
+        pID2Obj = iter->second;
+    }
+    else
+    {
+        return false;
+    }
+
+    StringToJExt_T& mapID2Obj = *pID2Obj;
+
+    StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
+
+    if ( r == mapID2Obj.end() )
+    {
+        return false;
+    }
+
+    mapID2Obj.erase( strObjId );
+    return true;
+}
+
+char* InvokeFunction( const char* szCommand, void* pContext )
+{
+    StringToJExt_T * pID2Obj = NULL;
+
+    VoidToMap_T::iterator iter = g_context2Map.find( pContext );
+
+    if ( iter != g_context2Map.end() )
+    {
+        pID2Obj = iter->second;
+    }
+    else
+    {
+        pID2Obj = new StringToJExt_T;
+        g_context2Map[ pContext ] = pID2Obj;
+    }
+
+    StringToJExt_T& mapID2Obj = *pID2Obj;
+
+    string strFullCommand = szCommand;
+    vector<string> arParams;
+    g_tokenize( strFullCommand, " ", arParams );
+    string strCommand = arParams[ 0 ];
+    string strRetVal = szERROR;
+
+    if ( strCommand == szCREATE )
+    {
+        string strClassName = arParams[ 1 ];
+        string strObjId = arParams[ 2 ];
+
+        StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
+
+        if ( r != mapID2Obj.end() )
+        {
+            strRetVal += strObjId;
+            strRetVal += " :Object already exists.";
+            return g_str2global( strRetVal );
+        }
+
+        JSExt* pJSExt = onCreateObject( strClassName, strObjId );
+
+        if ( pJSExt == NULL )
+        {
+            strRetVal += strObjId;
+            strRetVal += " :Unknown object type ";
+            strRetVal += strClassName;
+            return g_str2global( strRetVal );
+        }
+
+        pJSExt->m_pContext = pContext;
+        mapID2Obj[ strObjId ] = pJSExt;
+
+        strRetVal = szOK;
+        strRetVal += strObjId;
+        return g_str2global( strRetVal );
+    }
+    else
+    if ( strCommand == szINVOKE )
+    {
+        string strObjId = arParams[ 1 ];
+        string strMethod = arParams[ 2 ];
+
+        StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
+
+        if ( r == mapID2Obj.end() )
+        {
+            strRetVal += strObjId;
+            strRetVal += " :No object found for id.";
+            return g_str2global( strRetVal );
+        }
+
+        JSExt* pJSExt = r->second;
+
+        size_t nLoc = strFullCommand.find( strObjId );
+
+        if ( nLoc == string::npos )
+        {
+            strRetVal += strObjId;
+            strRetVal += " :Internal InvokeMethod error.";
+            return g_str2global( strRetVal );
+        }
+
+        if ( strMethod == szDISPOSE )
+        {
+            StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
+
+            if ( r == mapID2Obj.end() )
+            {
+                strRetVal = szERROR;
+                strRetVal += strObjId;
+                return g_str2global( strRetVal );
+            }
+
+            JSExt * pJSExt = mapID2Obj[ strObjId ];
+
+            if ( pJSExt->CanDelete() )
+            {
+                delete pJSExt;
+            }
+
+            mapID2Obj.erase( strObjId );
+            strRetVal = szOK;
+            strRetVal += strObjId;
+            return g_str2global( strRetVal );
+        }
+
+        size_t nSuffixLoc = nLoc + strObjId.size();
+        string strInvoke = strFullCommand.substr( nSuffixLoc );
+        strInvoke = g_trim( strInvoke );
+        strRetVal = pJSExt->InvokeMethod( strInvoke );
+        return g_str2global( strRetVal );
+    }
+
+    strRetVal += " :Unknown command ";
+    strRetVal += strCommand;
+    return g_str2global( strRetVal );
+}
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/plugin.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/plugin.h b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/plugin.h
new file mode 100644
index 0000000..4ef7116
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/plugin.h
@@ -0,0 +1,70 @@
+#ifndef _PLUGIN_H
+#define _PLUGIN_H
+
+#include <map>
+#include <string>
+#include <vector>
+#include <unistd.h>
+//#include "tokenizer.h"
+
+using namespace std;
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+//%% Functions exported by this DLL
+//%% Should always be only SetEventFunc and InvokeFunction
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+// g++ requires extern "C" otherwise the names of SetEventFunc and InvokeFunction
+// are mangled C++ style. MS Visual Studio doesn't seem to care though.
+extern "C"
+{
+    typedef void (*SendPluginEv)( const char* szEvent, void* pContext );
+    char* SetEventFunc(SendPluginEv funcPtr);
+    char* InvokeFunction( const char* szCommand, void* pContext );
+}
+
+// JNEXT Framework function of the form:
+// typedef void (*SendPluginEv)( const char* szEvent );
+// used to notify JavaScript of an asynchronous event
+extern SendPluginEv SendPluginEvent;
+
+/////////////////////////////////////////////////////////////////////////
+// Constants and methods common to all JNEXT extensions types
+/////////////////////////////////////////////////////////////////////////
+#define szERROR         "Error "
+#define szOK            "Ok "
+
+#define szDISPOSE       "Dispose"
+#define szINVOKE        "InvokeMethod"
+#define szCREATE        "CreateObj"
+
+/////////////////////////////////////////////////////////////////////////
+// Utility functions
+/////////////////////////////////////////////////////////////////////////
+string& g_trim( string& str );
+void g_tokenize(const string& str,const string& delimiters, vector<string>& tokens);
+char* g_str2static( const string& strRetVal );
+void g_sleep( unsigned int mseconds );
+bool g_unregisterObject( const string& strObjId, void* pContext );
+
+
+/////////////////////////////////////////////////////////////////////////
+// Abstract extension object
+/////////////////////////////////////////////////////////////////////////
+class JSExt
+{
+public:
+    virtual ~JSExt() {};
+    virtual string InvokeMethod( const string& strCommand ) = 0;
+    virtual bool CanDelete( void ) = 0;
+    virtual void TryDelete( void ) {}
+public:
+    void* m_pContext;
+};
+
+/////////////////////////////////////////////////////////////////////////
+// Callback functions to be implemented by the plugin implementation
+/////////////////////////////////////////////////////////////////////////
+extern char* onGetObjList( void );
+extern JSExt* onCreateObject( const string& strClassName, const string& strObjId );
+
+#endif

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/tokenizer.cpp
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/tokenizer.cpp b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/tokenizer.cpp
new file mode 100644
index 0000000..4a39573
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/tokenizer.cpp
@@ -0,0 +1,222 @@
+/************************************************************************
+The zlib/libpng License
+
+Copyright (c) 2006 Joerg Wiedenmann
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from
+the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented;
+you must not claim that you wrote the original software.
+If you use this software in a product, an acknowledgment
+in the product documentation would be appreciated but is
+not required.
+
+2. Altered source versions must be plainly marked as such,
+and must not be misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source distribution.
+
+***********************************************************************/
+
+/********************************************************************
+	created:	2006-01-28
+	filename: 	tokenizer.cpp
+	author:		J�rg Wiedenmann
+	
+	purpose:	A tokenizer function which provides a very
+				customizable way of breaking up strings.
+
+	history:	2006-01-28, Original version
+				2006-03-04, Fixed a small parsing bug, thanks Elias.
+*********************************************************************/
+
+#include "tokenizer.h"
+
+using namespace std;
+
+void tokenize ( const string& str, vector<string>& result,
+			   const string& delimiters, const string& delimiters_preserve,
+			   const string& quote, const string& esc )
+{
+	// clear the vector
+	if ( false == result.empty() )
+	{
+		result.clear();
+	}
+
+	string::size_type pos = 0; // the current position (char) in the string
+	char ch = 0; // buffer for the current character
+	char delimiter = 0;	// the buffer for the delimiter char which
+							// will be added to the tokens if the delimiter
+							// is preserved
+	char current_quote = 0; // the char of the current open quote
+	bool quoted = false; // indicator if there is an open quote
+	string token;  // string buffer for the token
+	bool token_complete = false; // indicates if the current token is
+								 // read to be added to the result vector
+	string::size_type len = str.length();  // length of the input-string
+
+	// for every char in the input-string
+	while ( len > pos )
+	{
+		// get the character of the string and reset the delimiter buffer
+		ch = str.at(pos);
+		delimiter = 0;
+
+		// assume ch isn't a delimiter
+		bool add_char = true;
+
+		// check ...
+
+		// ... if the delimiter is an escaped character
+		bool escaped = false; // indicates if the next char is protected
+		if ( false == esc.empty() ) // check if esc-chars are  provided
+		{
+			if ( string::npos != esc.find_first_of(ch) )
+			{
+				// get the escaped char
+				++pos;
+				if ( pos < len ) // if there are more chars left
+				{
+					// get the next one
+					ch = str.at(pos);
+
+					// add the escaped character to the token
+					add_char = true;
+				}
+				else // cannot get any more characters
+				{
+					// don't add the esc-char
+					add_char = false;
+				}
+
+				// ignore the remaining delimiter checks
+				escaped = true;
+			}
+		}
+
+		// ... if the delimiter is a quote
+		if ( false == quote.empty() && false == escaped )
+		{
+			// if quote chars are provided and the char isn't protected
+			if ( string::npos != quote.find_first_of(ch) )
+			{
+				// if not quoted, set state to open quote and set
+				// the quote character
+				if ( false == quoted )
+				{
+					quoted = true;
+					current_quote = ch;
+
+					// don't add the quote-char to the token
+					add_char = false;
+				}
+				else // if quote is open already
+				{
+					// check if it is the matching character to close it
+					if ( current_quote == ch )
+					{
+						// close quote and reset the quote character
+						quoted = false;
+						current_quote = 0;
+
+						// don't add the quote-char to the token
+						add_char = false;
+					}
+				} // else
+			}
+		}
+
+		// ... if the delimiter isn't preserved
+		if ( false == delimiters.empty() && false == escaped &&
+			 false == quoted )
+		{
+			// if a delimiter is provided and the char isn't protected by
+			// quote or escape char
+			if ( string::npos != delimiters.find_first_of(ch) )
+			{
+				// if ch is a delimiter and the token string isn't empty
+				// the token is complete
+				if ( false == token.empty() ) // BUGFIX: 2006-03-04
+				{
+					token_complete = true;
+				}
+
+				// don't add the delimiter to the token
+				add_char = false;
+			}
+		}
+
+		// ... if the delimiter is preserved - add it as a token
+		bool add_delimiter = false;
+		if ( false == delimiters_preserve.empty() && false == escaped &&
+			 false == quoted )
+		{
+			// if a delimiter which will be preserved is provided and the
+			// char isn't protected by quote or escape char
+			if ( string::npos != delimiters_preserve.find_first_of(ch) )
+			{
+				// if ch is a delimiter and the token string isn't empty
+				// the token is complete
+				if ( false == token.empty() ) // BUGFIX: 2006-03-04
+				{
+					token_complete = true;
+				}
+
+				// don't add the delimiter to the token
+				add_char = false;
+
+				// add the delimiter
+				delimiter = ch;
+				add_delimiter = true;
+			}
+		}
+
+
+		// add the character to the token
+		if ( true == add_char )
+		{
+			// add the current char
+			token.push_back( ch );
+		}
+
+		// add the token if it is complete
+		if ( true == token_complete && false == token.empty() )
+		{
+			// add the token string
+			result.push_back( token );
+
+			// clear the contents
+			token.clear();
+
+			// build the next token
+			token_complete = false;
+		}
+
+		// add the delimiter
+		if ( true == add_delimiter )
+		{
+			// the next token is the delimiter
+			string delim_token;
+			delim_token.push_back( delimiter );
+			result.push_back( delim_token );
+
+			// REMOVED: 2006-03-04, Bugfix
+		}
+
+		// repeat for the next character
+		++pos;
+	} // while
+
+	// add the final token
+	if ( false == token.empty() )
+	{
+		result.push_back( token );
+	}
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/tokenizer.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/tokenizer.h b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/tokenizer.h
new file mode 100644
index 0000000..75f567c
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/tokenizer.h
@@ -0,0 +1,55 @@
+/************************************************************************
+The zlib/libpng License
+
+Copyright (c) 2006 Joerg Wiedenmann
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from
+the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented;
+	you must not claim that you wrote the original software.
+	If you use this software in a product, an acknowledgment
+	in the product documentation would be appreciated but is
+	not required.
+
+2. Altered source versions must be plainly marked as such,
+	and must not be misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source distribution.
+
+***********************************************************************/
+
+/********************************************************************
+	created:	2006-01-28
+	filename: 	tokenizer.cpp
+	author:		J�rg Wiedenmann
+
+	purpose:	A tokenizer function which provides a very
+				customizable way of breaking up strings.
+*********************************************************************/
+
+#include <vector>
+#include <string>
+using namespace std;
+
+// Function to break up a string into tokens
+//
+// Parameters:
+//-----------
+// str = the input string that will be tokenized
+// result = the tokens for str
+// delimiters = the delimiter characters
+// delimiters preserve = same as above, but the delimiter characters
+//		will be put into the result as a token
+// quote = characters to protect the enclosed characters
+// esc = characters to protect a single character
+//
+
+void tokenize ( const string& str, vector<string>& result,
+			const string& delimiters, const string& delimiters_preserve = "",
+			const string& quote = "\"", const string& esc = "\\" );

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/simulator/echoJnext.so
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/simulator/echoJnext.so b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/simulator/echoJnext.so
new file mode 100644
index 0000000..2b3c5f5
Binary files /dev/null and b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/simulator/echoJnext.so differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/src/echo.cpp
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/src/echo.cpp b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/src/echo.cpp
new file mode 100644
index 0000000..0d5cc2f
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/src/echo.cpp
@@ -0,0 +1,121 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+
+#include <../public/json/reader.h>
+#include <string>
+#include <sstream>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "echo.hpp"
+
+using namespace std;
+
+/**
+ * Default constructor.
+ */
+Echo::Echo(const std::string& id) : m_id(id) {
+}
+
+/**
+ * Memory destructor.
+ */
+Echo::~Echo() {
+}
+
+/**
+ * This method returns the list of objects implemented by this native
+ * extension.
+ */
+char* onGetObjList() {
+    static char name[] = "Echo";
+    return name;
+}
+
+/**
+ * This method is used by JNext to instantiate the Memory object when
+ * an object is created on the JavaScript server side.
+ */
+JSExt* onCreateObject(const string& className, const string& id) {
+    if (className == "Echo") {
+        return new Echo(id);
+    }
+
+    return NULL;
+}
+
+/**
+ * Method used by JNext to determine if the object can be deleted.
+ */
+bool Echo::CanDelete() {
+    return true;
+}
+
+/**
+ * It will be called from JNext JavaScript side with passed string.
+ * This method implements the interface for the JavaScript to native binding
+ * for invoking native code. This method is triggered when JNext.invoke is
+ * called on the JavaScript side with this native objects id.
+ */
+string Echo::InvokeMethod(const string& command) {
+    int index = command.find_first_of(" ");
+    std::string method = command.substr(0, index);
+    
+    // read in arguments
+    Json::Value obj;
+    if (static_cast<int>(command.length()) > index && index != -1) {
+        std::string jsonObject = command.substr(index + 1, command.length());
+        Json::Reader reader;
+
+        bool parse = reader.parse(jsonObject, obj);
+        if (!parse) {
+            fprintf(stderr, "%s", "error parsing\n");
+            return "Cannot parse JSON object";
+        }
+    }    
+    
+    // Determine which function should be executed
+    if (method == "doEcho") {
+        std::string message = obj["message"].asString();
+        if(message.length() > 0) {
+            return doEcho(message);
+        }else{
+             return doEcho("Nothing to echo.");
+        }
+    }else{
+        return doEcho("Unsupported Method");
+    }
+}
+
+/**
+ * Method that sends off Event message
+ */
+string Echo::doEcho(const std::string& message) {
+    std::string eventString = m_id;
+    eventString.append(" ");
+    eventString.append("cordova.echo.callback");
+    eventString.append(" ");
+    eventString.append(message);
+    SendPluginEvent(eventString.c_str(), m_pContext);
+    return eventString;
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/src/echo.hpp
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/src/echo.hpp b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/src/echo.hpp
new file mode 100644
index 0000000..408be69
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/src/echo.hpp
@@ -0,0 +1,45 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+#ifndef ECHO_HPP_
+#define ECHO_HPP_
+
+#include <string>
+#include <pthread.h>
+#include "../public/plugin.h"
+
+class Echo: public JSExt {
+
+public:
+    explicit Echo(const std::string& id);
+    virtual ~Echo();
+
+// Interfaces of JSExt
+    virtual bool CanDelete();
+    virtual std::string InvokeMethod(const std::string& command);
+
+private:
+    std::string doEcho(const std::string& message);
+
+    std::string m_id;
+};
+
+#endif /* ECHO_HPP_ */

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/cordova.echo/www/client.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/www/client.js b/cordova-lib/spec-plugman/plugins/cordova.echo/www/client.js
new file mode 100644
index 0000000..4e7a1b3
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/cordova.echo/www/client.js
@@ -0,0 +1,53 @@
+/*
+ *
+ * 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 _self = {},
+    _ID = require("./manifest.json").namespace,
+    win = null,
+    fail = null;
+
+function handleCallback(result) {
+    if (result) {
+        if(win){
+            win(result);
+        }
+    } else {
+        if(fail){
+            fail(result);
+        }
+    }
+    win = null;
+    fail = null;
+}
+
+_self.doEcho = function (args, theWin, theFail) {
+    var data = { "message" : args.message || "" };
+    
+    win = theWin;
+    fail = theFail;
+    
+    window.webworks.event.add(_ID, "echoCallback", handleCallback);
+    
+    return window.webworks.execSync(_ID, "doEcho", data);
+};
+
+
+module.exports = _self;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/A/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/A/plugin.xml b/cordova-lib/spec-plugman/plugins/dependencies/A/plugin.xml
new file mode 100644
index 0000000..ec83e8c
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/dependencies/A/plugin.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="A"
+    version="0.6.0">
+
+    <name>Plugin A</name>
+
+    <dependency id="C" url="C" />
+    <dependency id="D" url="D" />
+
+    <asset src="www/plugin-a.js" target="plugin-a.js" />
+
+    <config-file target="config.xml" parent="/*">
+        <access origin="build.phonegap.com" />
+    </config-file>
+
+    <!-- android -->
+    <platform name="android">
+        <config-file target="res/xml/config.xml" parent="plugins">
+            <plugin name="A"
+                value="com.phonegap.A.A"/>
+        </config-file>
+
+        <source-file src="src/android/A.java"
+                target-dir="src/com/phonegap/A" />
+    </platform>
+
+        
+    <!-- ios -->
+    <platform name="ios">
+        <!-- CDV 2.5+ -->
+        <config-file target="config.xml" parent="plugins">
+            <plugin name="A"
+                value="APluginCommand"/>
+        </config-file>
+
+        <header-file src="src/ios/APluginCommand.h" />
+        <source-file src="src/ios/APluginCommand.m"/>
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/A/src/android/A.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/A/src/android/A.java b/cordova-lib/spec-plugman/plugins/dependencies/A/src/android/A.java
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/A/src/ios/APluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/A/src/ios/APluginCommand.h b/cordova-lib/spec-plugman/plugins/dependencies/A/src/ios/APluginCommand.h
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/A/src/ios/APluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/A/src/ios/APluginCommand.m b/cordova-lib/spec-plugman/plugins/dependencies/A/src/ios/APluginCommand.m
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/A/www/plugin-a.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/A/www/plugin-a.js b/cordova-lib/spec-plugman/plugins/dependencies/A/www/plugin-a.js
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/B/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/B/plugin.xml b/cordova-lib/spec-plugman/plugins/dependencies/B/plugin.xml
new file mode 100644
index 0000000..ee32e2d
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/dependencies/B/plugin.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="B"
+    version="0.6.0">
+
+    <name>Plugin B</name>
+
+    <dependency id="D" url="." subdir="D"/>
+    <dependency id="E" url="." subdir="subdir/E"/>
+
+    <asset src="www/plugin-b.js" target="plugin-b.js" />
+
+    <config-file target="config.xml" parent="/*">
+        <access origin="build.phonegap.com" />
+    </config-file>
+
+    <!-- android -->
+    <platform name="android">
+        <config-file target="res/xml/config.xml" parent="plugins">
+            <plugin name="B"
+                value="com.phonegap.B.B"/>
+        </config-file>
+
+        <source-file src="src/android/B.java"
+                target-dir="src/com/phonegap/B" />
+    </platform>
+
+
+    <!-- ios -->
+    <platform name="ios">
+        <!-- CDV 2.5+ -->
+        <config-file target="config.xml" parent="plugins">
+            <plugin name="B"
+                value="BPluginCommand"/>
+        </config-file>
+
+        <header-file src="src/ios/BPluginCommand.h" />
+        <source-file src="src/ios/BPluginCommand.m"/>
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/B/src/android/B.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/B/src/android/B.java b/cordova-lib/spec-plugman/plugins/dependencies/B/src/android/B.java
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/B/src/ios/BPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/B/src/ios/BPluginCommand.h b/cordova-lib/spec-plugman/plugins/dependencies/B/src/ios/BPluginCommand.h
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/B/src/ios/BPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/B/src/ios/BPluginCommand.m b/cordova-lib/spec-plugman/plugins/dependencies/B/src/ios/BPluginCommand.m
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/B/www/plugin-b.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/B/www/plugin-b.js b/cordova-lib/spec-plugman/plugins/dependencies/B/www/plugin-b.js
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/C/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/C/plugin.xml b/cordova-lib/spec-plugman/plugins/dependencies/C/plugin.xml
new file mode 100644
index 0000000..88c2d2c
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/dependencies/C/plugin.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="C"
+    version="0.6.0">
+
+    <name>Plugin C</name>
+
+    <asset src="www/plugin-c.js" target="plugin-c.js" />
+
+    <config-file target="config.xml" parent="/*">
+        <access origin="build.phonegap.com" />
+    </config-file>
+
+    <!-- android -->
+    <platform name="android">
+        <config-file target="res/xml/config.xml" parent="plugins">
+            <plugin name="C"
+                value="com.phonegap.C.C"/>
+        </config-file>
+
+        <source-file src="src/android/C.java"
+                target-dir="src/com/phonegap/C" />
+    </platform>
+
+        
+    <!-- ios -->
+    <platform name="ios">
+        <!-- CDV 2.5+ -->
+        <config-file target="config.xml" parent="plugins">
+            <plugin name="C"
+                value="CPluginCommand"/>
+        </config-file>
+
+        <header-file src="src/ios/CPluginCommand.h" />
+        <source-file src="src/ios/CPluginCommand.m"/>
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/C/src/android/C.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/C/src/android/C.java b/cordova-lib/spec-plugman/plugins/dependencies/C/src/android/C.java
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/C/src/ios/CPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/C/src/ios/CPluginCommand.h b/cordova-lib/spec-plugman/plugins/dependencies/C/src/ios/CPluginCommand.h
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/C/src/ios/CPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/C/src/ios/CPluginCommand.m b/cordova-lib/spec-plugman/plugins/dependencies/C/src/ios/CPluginCommand.m
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/C/www/plugin-c.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/C/www/plugin-c.js b/cordova-lib/spec-plugman/plugins/dependencies/C/www/plugin-c.js
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/D/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/D/plugin.xml b/cordova-lib/spec-plugman/plugins/dependencies/D/plugin.xml
new file mode 100644
index 0000000..f07b063
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/dependencies/D/plugin.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="D"
+    version="0.6.0">
+
+    <name>Plugin D</name>
+
+    <asset src="www/plugin-d.js" target="plugin-d.js" />
+
+    <config-file target="config.xml" parent="/*">
+        <access origin="build.phonegap.com" />
+    </config-file>
+
+    <!-- android -->
+    <platform name="android">
+        <config-file target="res/xml/config.xml" parent="plugins">
+            <plugin name="D"
+                value="com.phonegap.D.D"/>
+        </config-file>
+
+        <source-file src="src/android/D.java"
+                target-dir="src/com/phonegap/D" />
+    </platform>
+
+        
+    <!-- ios -->
+    <platform name="ios">
+        <!-- CDV 2.5+ -->
+        <config-file target="config.xml" parent="plugins">
+            <plugin name="D"
+                value="DPluginCommand"/>
+        </config-file>
+
+        <header-file src="src/ios/DPluginCommand.h" />
+        <source-file src="src/ios/DPluginCommand.m"/>
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/D/src/android/D.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/D/src/android/D.java b/cordova-lib/spec-plugman/plugins/dependencies/D/src/android/D.java
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/D/src/ios/DPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/D/src/ios/DPluginCommand.h b/cordova-lib/spec-plugman/plugins/dependencies/D/src/ios/DPluginCommand.h
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/D/src/ios/DPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/D/src/ios/DPluginCommand.m b/cordova-lib/spec-plugman/plugins/dependencies/D/src/ios/DPluginCommand.m
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/D/www/plugin-d.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/D/www/plugin-d.js b/cordova-lib/spec-plugman/plugins/dependencies/D/www/plugin-d.js
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/E/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/E/plugin.xml b/cordova-lib/spec-plugman/plugins/dependencies/E/plugin.xml
new file mode 100644
index 0000000..bb28fa1
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/dependencies/E/plugin.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="E"
+    version="0.6.0">
+
+    <name>Plugin E</name>
+
+    <asset src="www/plugin-e.js" target="plugin-e.js" />
+
+    <dependency id="D" />
+
+    <config-file target="config.xml" parent="/*">
+        <access origin="build.phonegap.com" />
+    </config-file>
+
+    <!-- android -->
+    <platform name="android">
+        <config-file target="res/xml/config.xml" parent="plugins">
+            <plugin name="E"
+                value="com.phonegap.E.E"/>
+        </config-file>
+
+        <source-file src="src/android/E.java"
+                target-dir="src/com/phonegap/E" />
+    </platform>
+
+        
+    <!-- ios -->
+    <platform name="ios">
+        <!-- CDV 2.5+ -->
+        <config-file target="config.xml" parent="plugins">
+            <plugin name="E"
+                value="EPluginCommand"/>
+        </config-file>
+
+        <header-file src="src/ios/EPluginCommand.h" />
+        <source-file src="src/ios/EPluginCommand.m"/>
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/E/src/android/E.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/E/src/android/E.java b/cordova-lib/spec-plugman/plugins/dependencies/E/src/android/E.java
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/E/src/ios/EPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/E/src/ios/EPluginCommand.h b/cordova-lib/spec-plugman/plugins/dependencies/E/src/ios/EPluginCommand.h
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/E/src/ios/EPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/E/src/ios/EPluginCommand.m b/cordova-lib/spec-plugman/plugins/dependencies/E/src/ios/EPluginCommand.m
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/E/www/plugin-d.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/E/www/plugin-d.js b/cordova-lib/spec-plugman/plugins/dependencies/E/www/plugin-d.js
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/F/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/F/plugin.xml b/cordova-lib/spec-plugman/plugins/dependencies/F/plugin.xml
new file mode 100644
index 0000000..86869ba
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/dependencies/F/plugin.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="F"
+    version="0.6.0">
+
+    <name>Plugin F</name>
+
+    <asset src="www/plugin-f.js" target="plugin-f.js" />
+
+    <dependency id="A" />
+    <dependency id="D" />
+
+    <config-file target="config.xml" parent="/*">
+        <access origin="build.phonegap.com" />
+    </config-file>
+
+    <!-- android -->
+    <platform name="android">
+        <config-file target="res/xml/config.xml" parent="plugins">
+            <plugin name="F"
+                value="com.phonegap.F.F"/>
+        </config-file>
+
+        <source-file src="src/android/F.java"
+                target-dir="src/com/phonegap/F" />
+    </platform>
+
+
+    <!-- ios -->
+    <platform name="ios">
+        <!-- CDV 2.5+ -->
+        <config-file target="config.xml" parent="plugins">
+            <plugin name="F"
+                value="FPluginCommand"/>
+        </config-file>
+
+        <header-file src="src/ios/FPluginCommand.h" />
+        <source-file src="src/ios/FPluginCommand.m"/>
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/F/src/android/F.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/F/src/android/F.java b/cordova-lib/spec-plugman/plugins/dependencies/F/src/android/F.java
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/F/src/ios/FPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/F/src/ios/FPluginCommand.h b/cordova-lib/spec-plugman/plugins/dependencies/F/src/ios/FPluginCommand.h
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/F/src/ios/FPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/F/src/ios/FPluginCommand.m b/cordova-lib/spec-plugman/plugins/dependencies/F/src/ios/FPluginCommand.m
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/F/www/plugin-f.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/F/www/plugin-f.js b/cordova-lib/spec-plugman/plugins/dependencies/F/www/plugin-f.js
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/G/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/G/plugin.xml b/cordova-lib/spec-plugman/plugins/dependencies/G/plugin.xml
new file mode 100644
index 0000000..0e365da
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/dependencies/G/plugin.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="G"
+    version="0.6.0">
+
+    <name>Plugin G</name>
+
+    <asset src="www/plugin-g.js" target="plugin-g.js" />
+
+    <dependency id="H" />
+
+    <config-file target="config.xml" parent="/*">
+        <access origin="build.phonegap.com" />
+    </config-file>
+
+    <!-- android -->
+    <platform name="android">
+        <config-file target="res/xml/config.xml" parent="plugins">
+            <plugin name="G"
+                value="com.phonegap.G.G"/>
+        </config-file>
+
+        <source-file src="src/android/G.java"
+                target-dir="src/com/phonegap/G" />
+    </platform>
+
+
+    <!-- ios -->
+    <platform name="ios">
+        <!-- CDV 2.5+ -->
+        <config-file target="config.xml" parent="plugins">
+            <plugin name="G"
+                value="GPluginCommand"/>
+        </config-file>
+
+        <header-file src="src/ios/GPluginCommand.h" />
+        <source-file src="src/ios/GPluginCommand.m"/>
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/G/src/android/G.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/G/src/android/G.java b/cordova-lib/spec-plugman/plugins/dependencies/G/src/android/G.java
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/G/src/ios/EPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/G/src/ios/EPluginCommand.m b/cordova-lib/spec-plugman/plugins/dependencies/G/src/ios/EPluginCommand.m
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/G/src/ios/GPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/G/src/ios/GPluginCommand.h b/cordova-lib/spec-plugman/plugins/dependencies/G/src/ios/GPluginCommand.h
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/G/www/plugin-g.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/G/www/plugin-g.js b/cordova-lib/spec-plugman/plugins/dependencies/G/www/plugin-g.js
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/H/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/H/plugin.xml b/cordova-lib/spec-plugman/plugins/dependencies/H/plugin.xml
new file mode 100644
index 0000000..e72a19a
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/dependencies/H/plugin.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="H"
+    version="0.6.0">
+
+    <name>Plugin H</name>
+
+    <asset src="www/plugin-h.js" target="plugin-h.js" />
+
+    <dependency id="G" />
+
+    <config-file target="config.xml" parent="/*">
+        <access origin="build.phonegap.com" />
+    </config-file>
+
+    <!-- android -->
+    <platform name="android">
+        <config-file target="res/xml/config.xml" parent="plugins">
+            <plugin name="H"
+                value="com.phonegap.H.H"/>
+        </config-file>
+
+        <source-file src="src/android/H.java"
+                target-dir="src/com/phonegap/H" />
+    </platform>
+
+
+    <!-- ios -->
+    <platform name="ios">
+        <!-- CDV 2.5+ -->
+        <config-file target="config.xml" parent="plugins">
+            <plugin name="H"
+                value="HPluginCommand"/>
+        </config-file>
+
+        <header-file src="src/ios/HPluginCommand.h" />
+        <source-file src="src/ios/HPluginCommand.m"/>
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/H/src/android/H.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/H/src/android/H.java b/cordova-lib/spec-plugman/plugins/dependencies/H/src/android/H.java
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/H/src/ios/HPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/H/src/ios/HPluginCommand.h b/cordova-lib/spec-plugman/plugins/dependencies/H/src/ios/HPluginCommand.h
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/H/src/ios/HPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/H/src/ios/HPluginCommand.m b/cordova-lib/spec-plugman/plugins/dependencies/H/src/ios/HPluginCommand.m
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/H/www/plugin-h.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/H/www/plugin-h.js b/cordova-lib/spec-plugman/plugins/dependencies/H/www/plugin-h.js
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/README.md
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/README.md b/cordova-lib/spec-plugman/plugins/dependencies/README.md
new file mode 100644
index 0000000..0955be5
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/dependencies/README.md
@@ -0,0 +1,10 @@
+Here's a general overview of how the plugins in this directory are dependent on each other:
+
+          F
+         / \
+        A   \      B
+       / \   \    / \
+      C   '---D--'   E
+
+
+   G <-> H

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/meta/D/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/meta/D/plugin.xml b/cordova-lib/spec-plugman/plugins/dependencies/meta/D/plugin.xml
new file mode 100644
index 0000000..941bd57
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/dependencies/meta/D/plugin.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="D"
+    version="0.6.0">
+
+    <name>Plugin D</name>
+
+    <asset src="www/plugin-d.js" target="plugin-d.js" />
+
+    <config-file target="config.xml" parent="/*">
+        <access origin="build.phonegap.com" />
+    </config-file>
+
+    <engines>
+        <engine name="cordova" version=">=1.0.0"/>
+    </engines>
+
+    <!-- android -->
+    <platform name="android">
+        <config-file target="res/xml/config.xml" parent="plugins">
+            <plugin name="D"
+                value="com.phonegap.D.D"/>
+        </config-file>
+
+        <source-file src="src/android/D.java"
+                target-dir="src/com/phonegap/D" />
+    </platform>
+
+        
+    <!-- ios -->
+    <platform name="ios">
+        <!-- CDV 2.5+ -->
+        <config-file target="config.xml" parent="plugins">
+            <plugin name="D"
+                value="DPluginCommand"/>
+        </config-file>
+
+        <header-file src="src/ios/DPluginCommand.h" />
+        <source-file src="src/ios/DPluginCommand.m"/>
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/meta/D/src/android/D.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/meta/D/src/android/D.java b/cordova-lib/spec-plugman/plugins/dependencies/meta/D/src/android/D.java
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/meta/D/src/ios/DPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/meta/D/src/ios/DPluginCommand.h b/cordova-lib/spec-plugman/plugins/dependencies/meta/D/src/ios/DPluginCommand.h
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/meta/D/src/ios/DPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/meta/D/src/ios/DPluginCommand.m b/cordova-lib/spec-plugman/plugins/dependencies/meta/D/src/ios/DPluginCommand.m
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/meta/D/www/plugin-d.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/meta/D/www/plugin-d.js b/cordova-lib/spec-plugman/plugins/dependencies/meta/D/www/plugin-d.js
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/plugin.xml b/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/plugin.xml
new file mode 100644
index 0000000..57d96d9
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/plugin.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="E"
+    version="0.6.0">
+
+    <name>Plugin E</name>
+
+    <asset src="www/plugin-e.js" target="plugin-e.js" />
+
+    <config-file target="config.xml" parent="/*">
+        <access origin="build.phonegap.com" />
+    </config-file>
+
+    <!-- android -->
+    <platform name="android">
+        <config-file target="res/xml/config.xml" parent="plugins">
+            <plugin name="E"
+                value="com.phonegap.E.E"/>
+        </config-file>
+
+        <source-file src="src/android/E.java"
+                target-dir="src/com/phonegap/E" />
+    </platform>
+
+        
+    <!-- ios -->
+    <platform name="ios">
+        <!-- CDV 2.5+ -->
+        <config-file target="config.xml" parent="plugins">
+            <plugin name="E"
+                value="EPluginCommand"/>
+        </config-file>
+
+        <header-file src="src/ios/EPluginCommand.h" />
+        <source-file src="src/ios/EPluginCommand.m"/>
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/src/android/E.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/src/android/E.java b/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/src/android/E.java
new file mode 100644
index 0000000..e69de29


[30/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp.xcodeproj/project.pbxproj b/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..60f478f
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp.xcodeproj/project.pbxproj
@@ -0,0 +1,496 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A463F14DB0A1B007FEAC7 /* Foundation.framework */; };
+		571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464114DB0A1B007FEAC7 /* UIKit.framework */; };
+		571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */; };
+		571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464514DB0A1B007FEAC7 /* AddressBook.framework */; };
+		571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */; };
+		571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */; };
+		571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */; };
+		571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */; };
+		571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */; };
+		571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465114DB0A1B007FEAC7 /* QuartzCore.framework */; };
+		571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */; };
+		571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */; };
+		571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465714DB0A1B007FEAC7 /* CoreMedia.framework */; };
+		571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */; };
+		571A466014DB0A1B007FEAC7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A465F14DB0A1B007FEAC7 /* main.m */; };
+		571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A466214DB0A1B007FEAC7 /* PhoneGap.framework */; };
+		571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466614DB0A1B007FEAC7 /* Localizable.strings */; };
+		571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466A14DB0A1B007FEAC7 /* Localizable.strings */; };
+		571A466F14DB0A1B007FEAC7 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A466E14DB0A1B007FEAC7 /* icon.png */; };
+		571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467014DB0A1B007FEAC7 /* icon@2x.png */; };
+		571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467214DB0A1B007FEAC7 /* icon-72.png */; };
+		571A467614DB0A1B007FEAC7 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467514DB0A1B007FEAC7 /* Default.png */; };
+		571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467714DB0A1B007FEAC7 /* Default@2x.png */; };
+		571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 571A467914DB0A1B007FEAC7 /* Capture.bundle */; };
+		571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */ = {isa = PBXBuildFile; fileRef = 571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */; };
+		571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A467F14DB0A1B007FEAC7 /* AppDelegate.m */; };
+		571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A468214DB0A1B007FEAC7 /* MainViewController.m */; };
+		571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 571A468414DB0A1B007FEAC7 /* MainViewController.xib */; };
+		577FC36614DB0B620082BA7B /* www in Resources */ = {isa = PBXBuildFile; fileRef = 577FC36514DB0B620082BA7B /* www */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		571A463B14DB0A1B007FEAC7 /* ChildApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChildApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		571A463F14DB0A1B007FEAC7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+		571A464114DB0A1B007FEAC7 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+		571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+		571A464514DB0A1B007FEAC7 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
+		571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
+		571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
+		571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
+		571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
+		571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
+		571A465114DB0A1B007FEAC7 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
+		571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
+		571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
+		571A465714DB0A1B007FEAC7 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
+		571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ChildApp-Info.plist"; sourceTree = "<group>"; };
+		571A465D14DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		571A465F14DB0A1B007FEAC7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+		571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ChildApp-Prefix.pch"; sourceTree = "<group>"; };
+		571A466214DB0A1B007FEAC7 /* PhoneGap.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PhoneGap.framework; path = /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework; sourceTree = "<absolute>"; };
+		571A466714DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/Localizable.strings; sourceTree = "<group>"; };
+		571A466B14DB0A1B007FEAC7 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Resources/es.lproj/Localizable.strings; sourceTree = "<group>"; };
+		571A466E14DB0A1B007FEAC7 /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon.png; path = Resources/icons/icon.png; sourceTree = "<group>"; };
+		571A467014DB0A1B007FEAC7 /* icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon@2x.png"; path = "Resources/icons/icon@2x.png"; sourceTree = "<group>"; };
+		571A467214DB0A1B007FEAC7 /* icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon-72.png"; path = "Resources/icons/icon-72.png"; sourceTree = "<group>"; };
+		571A467514DB0A1B007FEAC7 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/splash/Default.png; sourceTree = "<group>"; };
+		571A467714DB0A1B007FEAC7 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "Resources/splash/Default@2x.png"; sourceTree = "<group>"; };
+		571A467914DB0A1B007FEAC7 /* Capture.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Capture.bundle; path = Resources/Capture.bundle; sourceTree = "<group>"; };
+		571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = PhoneGap.plist; sourceTree = "<group>"; };
+		571A467E14DB0A1B007FEAC7 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Classes/AppDelegate.h; sourceTree = "<group>"; };
+		571A467F14DB0A1B007FEAC7 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Classes/AppDelegate.m; sourceTree = "<group>"; };
+		571A468114DB0A1B007FEAC7 /* MainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainViewController.h; path = Classes/MainViewController.h; sourceTree = "<group>"; };
+		571A468214DB0A1B007FEAC7 /* MainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = Classes/MainViewController.m; sourceTree = "<group>"; };
+		571A468414DB0A1B007FEAC7 /* MainViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainViewController.xib; path = Classes/MainViewController.xib; sourceTree = "<group>"; };
+		571A468714DB0A1B007FEAC7 /* README */ = {isa = PBXFileReference; lastKnownFileType = text; name = README; path = Plugins/README; sourceTree = "<group>"; };
+		577FC36514DB0B620082BA7B /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		571A463514DB0A1B007FEAC7 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */,
+				571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */,
+				571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */,
+				571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */,
+				571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */,
+				571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */,
+				571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */,
+				571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */,
+				571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */,
+				571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */,
+				571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */,
+				571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */,
+				571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */,
+				571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		571A463814DB0A1B007FEAC7 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		571A462D14DB0A1A007FEAC7 = {
+			isa = PBXGroup;
+			children = (
+				577FC36514DB0B620082BA7B /* www */,
+				571A465914DB0A1B007FEAC7 /* ChildApp */,
+				571A463E14DB0A1B007FEAC7 /* Frameworks */,
+				571A463C14DB0A1B007FEAC7 /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		571A463C14DB0A1B007FEAC7 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				571A463B14DB0A1B007FEAC7 /* ChildApp.app */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		571A463E14DB0A1B007FEAC7 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				571A463F14DB0A1B007FEAC7 /* Foundation.framework */,
+				571A464114DB0A1B007FEAC7 /* UIKit.framework */,
+				571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */,
+				571A464514DB0A1B007FEAC7 /* AddressBook.framework */,
+				571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */,
+				571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */,
+				571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */,
+				571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */,
+				571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */,
+				571A465114DB0A1B007FEAC7 /* QuartzCore.framework */,
+				571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */,
+				571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */,
+				571A465714DB0A1B007FEAC7 /* CoreMedia.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		571A465914DB0A1B007FEAC7 /* ChildApp */ = {
+			isa = PBXGroup;
+			children = (
+				571A466214DB0A1B007FEAC7 /* PhoneGap.framework */,
+				571A466414DB0A1B007FEAC7 /* Resources */,
+				571A467D14DB0A1B007FEAC7 /* Classes */,
+				571A468614DB0A1B007FEAC7 /* Plugins */,
+				571A465A14DB0A1B007FEAC7 /* Supporting Files */,
+			);
+			path = ChildApp;
+			sourceTree = "<group>";
+		};
+		571A465A14DB0A1B007FEAC7 /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */,
+				571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */,
+				571A465F14DB0A1B007FEAC7 /* main.m */,
+				571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */,
+				571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */,
+				571A468414DB0A1B007FEAC7 /* MainViewController.xib */,
+			);
+			name = "Supporting Files";
+			sourceTree = "<group>";
+		};
+		571A466414DB0A1B007FEAC7 /* Resources */ = {
+			isa = PBXGroup;
+			children = (
+				571A467914DB0A1B007FEAC7 /* Capture.bundle */,
+				571A466514DB0A1B007FEAC7 /* en.lproj */,
+				571A466914DB0A1B007FEAC7 /* es.lproj */,
+				571A466D14DB0A1B007FEAC7 /* icons */,
+				571A467414DB0A1B007FEAC7 /* splash */,
+			);
+			name = Resources;
+			sourceTree = "<group>";
+		};
+		571A466514DB0A1B007FEAC7 /* en.lproj */ = {
+			isa = PBXGroup;
+			children = (
+				571A466614DB0A1B007FEAC7 /* Localizable.strings */,
+			);
+			name = en.lproj;
+			sourceTree = "<group>";
+		};
+		571A466914DB0A1B007FEAC7 /* es.lproj */ = {
+			isa = PBXGroup;
+			children = (
+				571A466A14DB0A1B007FEAC7 /* Localizable.strings */,
+			);
+			name = es.lproj;
+			sourceTree = "<group>";
+		};
+		571A466D14DB0A1B007FEAC7 /* icons */ = {
+			isa = PBXGroup;
+			children = (
+				571A466E14DB0A1B007FEAC7 /* icon.png */,
+				571A467014DB0A1B007FEAC7 /* icon@2x.png */,
+				571A467214DB0A1B007FEAC7 /* icon-72.png */,
+			);
+			name = icons;
+			sourceTree = "<group>";
+		};
+		571A467414DB0A1B007FEAC7 /* splash */ = {
+			isa = PBXGroup;
+			children = (
+				571A467514DB0A1B007FEAC7 /* Default.png */,
+				571A467714DB0A1B007FEAC7 /* Default@2x.png */,
+			);
+			name = splash;
+			sourceTree = "<group>";
+		};
+		571A467D14DB0A1B007FEAC7 /* Classes */ = {
+			isa = PBXGroup;
+			children = (
+				571A467E14DB0A1B007FEAC7 /* AppDelegate.h */,
+				571A467F14DB0A1B007FEAC7 /* AppDelegate.m */,
+				571A468114DB0A1B007FEAC7 /* MainViewController.h */,
+				571A468214DB0A1B007FEAC7 /* MainViewController.m */,
+			);
+			name = Classes;
+			sourceTree = "<group>";
+		};
+		571A468614DB0A1B007FEAC7 /* Plugins */ = {
+			isa = PBXGroup;
+			children = (
+				571A468714DB0A1B007FEAC7 /* README */,
+			);
+			name = Plugins;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		571A463A14DB0A1B007FEAC7 /* ChildApp */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */;
+			buildPhases = (
+				571A463414DB0A1B007FEAC7 /* Sources */,
+				571A463514DB0A1B007FEAC7 /* Frameworks */,
+				571A463614DB0A1B007FEAC7 /* Resources */,
+				571A463714DB0A1B007FEAC7 /* Sources */,
+				571A463814DB0A1B007FEAC7 /* Frameworks */,
+				571A463914DB0A1B007FEAC7 /* ShellScript */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = ChildApp;
+			productName = ChildApp;
+			productReference = 571A463B14DB0A1B007FEAC7 /* ChildApp.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		571A462F14DB0A1A007FEAC7 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0420;
+			};
+			buildConfigurationList = 571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				es,
+			);
+			mainGroup = 571A462D14DB0A1A007FEAC7;
+			productRefGroup = 571A463C14DB0A1B007FEAC7 /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				571A463A14DB0A1B007FEAC7 /* ChildApp */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		571A463614DB0A1B007FEAC7 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */,
+				571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */,
+				571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */,
+				571A466F14DB0A1B007FEAC7 /* icon.png in Resources */,
+				571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */,
+				571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */,
+				571A467614DB0A1B007FEAC7 /* Default.png in Resources */,
+				571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */,
+				571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */,
+				571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */,
+				571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */,
+				577FC36614DB0B620082BA7B /* www in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		571A463914DB0A1B007FEAC7 /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/bash;
+			shellScript = "\n\t\t\t\t\t\t\t\tif [ ! -d \"$PROJECT_DIR/www\" ] ; then\n\t\t\t\t\t\t\t\t\tcp -R /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework/www \"$PROJECT_DIR\"\n\t\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\t\t# detect www folder reference in project, if missing, print warning\n\t\t\t\t\t\t\t\tgrep \"{isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = \\\"<group>\\\"; };\" \"$PROJECT_DIR/$PROJECT_NAME.xcodeproj/project.pbxproj\"\n\t\t\t\t\t\t\t\trc=$? \n\t\t\t\t\t\t\t\tif [ $rc != 0 ] ; then\n\t\t\t\t\t\t\t\techo -e \"warning: Missing - Add $PROJECT_DIR/www as a folder reference in your project. Just drag and drop the folder into your project, into the Project Navigator of Xcode 4. Make sure you select the second radio-button: 'Create folder references for any added folders' (which will create a blue folder)\" 1>&2\n\t\t\t\t\t\t\t\tfi\t\t\t\t\t\t\t";
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		571A463414DB0A1B007FEAC7 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				571A466014DB0A1B007FEAC7 /* main.m in Sources */,
+				571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */,
+				571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		571A463714DB0A1B007FEAC7 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+		571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				571A465D14DB0A1B007FEAC7 /* en */,
+			);
+			name = InfoPlist.strings;
+			sourceTree = "<group>";
+		};
+		571A466614DB0A1B007FEAC7 /* Localizable.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				571A466714DB0A1B007FEAC7 /* en */,
+			);
+			name = Localizable.strings;
+			sourceTree = "<group>";
+		};
+		571A466A14DB0A1B007FEAC7 /* Localizable.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				571A466B14DB0A1B007FEAC7 /* es */,
+			);
+			name = Localizable.strings;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		571A468814DB0A1B007FEAC7 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+				CLANG_ENABLE_OBJC_ARC = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_VERSION = com.apple.compilers.llvmgcc42;
+				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
+				SDKROOT = iphoneos;
+			};
+			name = Debug;
+		};
+		571A468914DB0A1B007FEAC7 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+				CLANG_ENABLE_OBJC_ARC = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_VERSION = com.apple.compilers.llvmgcc42;
+				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
+				SDKROOT = iphoneos;
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		571A468B14DB0A1B007FEAC7 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = YES;
+				COPY_PHASE_STRIP = NO;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
+				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
+				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
+				OTHER_LDFLAGS = (
+					"-weak_framework",
+					UIKit,
+					"-weak_framework",
+					AVFoundation,
+					"-weak_framework",
+					CoreMedia,
+					"-weak_library",
+					/usr/lib/libSystem.B.dylib,
+				);
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				TARGETED_DEVICE_FAMILY = "1,2";
+				WRAPPER_EXTENSION = app;
+			};
+			name = Debug;
+		};
+		571A468C14DB0A1B007FEAC7 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = YES;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
+				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
+				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
+				OTHER_LDFLAGS = (
+					"-weak_framework",
+					UIKit,
+					"-weak_framework",
+					AVFoundation,
+					"-weak_framework",
+					CoreMedia,
+					"-weak_library",
+					/usr/lib/libSystem.B.dylib,
+				);
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VALIDATE_PRODUCT = YES;
+				WRAPPER_EXTENSION = app;
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				571A468814DB0A1B007FEAC7 /* Debug */,
+				571A468914DB0A1B007FEAC7 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				571A468B14DB0A1B007FEAC7 /* Debug */,
+				571A468C14DB0A1B007FEAC7 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 571A462F14DB0A1A007FEAC7 /* Project object */;
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp/SampleApp-Info.plist
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp/SampleApp-Info.plist b/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp/SampleApp-Info.plist
new file mode 100644
index 0000000..6010b61
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp/SampleApp-Info.plist
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!--
+#
+# 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.
+#
+-->
+<plist version="1.0">
+<dict>
+	<key>CFBundleIcons</key>
+	<dict>
+		<key>CFBundlePrimaryIcon</key>
+		<dict>
+			<key>CFBundleIconFiles</key>
+			<array>
+                <string>icon.png</string>
+                <string>icon@2x.png</string>
+                <string>icon-72.png</string>
+                <string>icon-72@2x.png</string>
+			</array>
+			<key>UIPrerenderedIcon</key>
+			<false/>
+		</dict>
+	</dict>
+	<key>UISupportedInterfaceOrientations~ipad</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+	</array>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleDisplayName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundleExecutable</key>
+	<string>${EXECUTABLE_NAME}</string>
+	<key>CFBundleIconFile</key>
+	<string>icon.png</string>
+	<key>CFBundleIdentifier</key>
+	<string>com.example.friendstring</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1.0</string>
+	<key>LSRequiresIPhoneOS</key>
+	<true/>
+	<key>NSMainNibFile</key>
+	<string></string>
+	<key>NSMainNibFile~ipad</key>
+	<string></string>
+</dict>
+</plist>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp/config.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp/config.xml b/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp/config.xml
new file mode 100644
index 0000000..2858c28
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp/config.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+#
+# 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.
+#
+-->
+<widget>
+    <preference name="KeyboardDisplayRequiresUserAction" value="true" />
+    <preference name="SuppressesIncrementalRendering" value="false" />
+    <preference name="UIWebViewBounce" value="true" />
+    <preference name="TopActivityIndicator" value="gray" />
+    <preference name="EnableLocation" value="false" />
+    <preference name="EnableViewportScale" value="false" />
+    <preference name="AutoHideSplashScreen" value="true" />
+    <preference name="ShowSplashScreenSpinner" value="true" />
+    <preference name="MediaPlaybackRequiresUserAction" value="false" />
+    <preference name="AllowInlineMediaPlayback" value="false" />
+    <preference name="OpenAllWhitelistURLsInWebView" value="false" />
+    <preference name="BackupWebStorage" value="cloud" />
+
+    <plugins>
+        <plugin name="Device" value="CDVDevice" />
+        <plugin name="Logger" value="CDVLogger" />
+        <plugin name="Compass" value="CDVLocation" />
+        <plugin name="Accelerometer" value="CDVAccelerometer" />
+        <plugin name="Camera" value="CDVCamera" />
+        <plugin name="NetworkStatus" value="CDVConnection" />
+        <plugin name="Contacts" value="CDVContacts" />
+        <plugin name="Debug Console" value="CDVDebugConsole" />
+        <plugin name="Echo" value="CDVEcho" />
+        <plugin name="File" value="CDVFile" />
+        <plugin name="FileTransfer" value="CDVFileTransfer" />
+        <plugin name="Geolocation" value="CDVLocation" />
+        <plugin name="Notification" value="CDVNotification" />
+        <plugin name="Media" value="CDVSound" />
+        <plugin name="Capture" value="CDVCapture" />
+        <plugin name="SplashScreen" value="CDVSplashScreen" />
+        <plugin name="Battery" value="CDVBattery" />
+        <plugin name="Globalization" value="CDVGlobalization" />
+        <plugin name="InAppBrowser" value="CDVInAppBrowser" />
+    </plugins>
+
+    <access origin="*" />
+</widget>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/ios-config-xml/www/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/ios-config-xml/www/.gitkeep b/cordova-lib/spec-plugman/projects/ios-config-xml/www/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/ios-plist/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/ios-plist/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/cordova-lib/spec-plugman/projects/ios-plist/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..5d0d461
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/ios-plist/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
@@ -0,0 +1,636 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		1F2BECC013F9785B00A93BF6 /* CDVBattery.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F2BECBE13F9785B00A93BF6 /* CDVBattery.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		1F2BECC113F9785B00A93BF6 /* CDVBattery.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F2BECBF13F9785B00A93BF6 /* CDVBattery.m */; };
+		1F3C04CE12BC247D004F9E10 /* CDVContact.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F3C04CC12BC247D004F9E10 /* CDVContact.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		1F3C04CF12BC247D004F9E10 /* CDVContact.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F3C04CD12BC247D004F9E10 /* CDVContact.m */; };
+		1F584B9B1385A28A00ED25E8 /* CDVCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F584B991385A28900ED25E8 /* CDVCapture.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		1F584B9C1385A28A00ED25E8 /* CDVCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F584B9A1385A28900ED25E8 /* CDVCapture.m */; };
+		1F92F4A01314023E0046367C /* CDVPluginResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F92F49E1314023E0046367C /* CDVPluginResult.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		1F92F4A11314023E0046367C /* CDVPluginResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F92F49F1314023E0046367C /* CDVPluginResult.m */; };
+		301F2F2A14F3C9CA003FE9FC /* CDV.h in Headers */ = {isa = PBXBuildFile; fileRef = 301F2F2914F3C9CA003FE9FC /* CDV.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		302965BC13A94E9D007046C5 /* CDVDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 302965BB13A94E9D007046C5 /* CDVDebug.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		3034979C1513D56A0090E688 /* CDVLocalStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 3034979A1513D56A0090E688 /* CDVLocalStorage.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		3034979E1513D56A0090E688 /* CDVLocalStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 3034979B1513D56A0090E688 /* CDVLocalStorage.m */; };
+		30392E4E14F4FCAB00B9E0B8 /* CDVAvailability.h in Headers */ = {isa = PBXBuildFile; fileRef = 30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		3062D120151D0EDB000D9128 /* UIDevice+Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		3062D122151D0EDB000D9128 /* UIDevice+Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */; };
+		307A8F9E1385A2EC00E43782 /* CDVConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 307A8F9C1385A2EC00E43782 /* CDVConnection.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		307A8F9F1385A2EC00E43782 /* CDVConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 307A8F9D1385A2EC00E43782 /* CDVConnection.m */; };
+		30A90B9114588697006178D3 /* JSONKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 30A90B8F14588697006178D3 /* JSONKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		30A90B9314588697006178D3 /* JSONKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 30A90B9014588697006178D3 /* JSONKit.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+		30B39EBE13D0268B0009682A /* CDVSplashScreen.h in Headers */ = {isa = PBXBuildFile; fileRef = 30B39EBC13D0268B0009682A /* CDVSplashScreen.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		30B39EBF13D0268B0009682A /* CDVSplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 30B39EBD13D0268B0009682A /* CDVSplashScreen.m */; };
+		30C5F1DF15AF9E950052A00D /* CDVDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C5F1DD15AF9E950052A00D /* CDVDevice.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		30C5F1E015AF9E950052A00D /* CDVDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C5F1DE15AF9E950052A00D /* CDVDevice.m */; };
+		30C684801406CB38004C1A8E /* CDVWhitelist.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C6847E1406CB38004C1A8E /* CDVWhitelist.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		30C684821406CB38004C1A8E /* CDVWhitelist.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C6847F1406CB38004C1A8E /* CDVWhitelist.m */; };
+		30C684941407044B004C1A8E /* CDVURLProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C684921407044A004C1A8E /* CDVURLProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		30C684961407044B004C1A8E /* CDVURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C684931407044A004C1A8E /* CDVURLProtocol.m */; };
+		30E33AF213A7E24B00594D64 /* CDVPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E33AF013A7E24B00594D64 /* CDVPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		30E33AF313A7E24B00594D64 /* CDVPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 30E33AF113A7E24B00594D64 /* CDVPlugin.m */; };
+		30E563CF13E217EC00C949AA /* NSMutableArray+QueueAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		30E563D013E217EC00C949AA /* NSMutableArray+QueueAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */; };
+		30F5EBAB14CA26E700987760 /* CDVCommandDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		3E76876D156A90EE00EB6FA3 /* CDVLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E76876B156A90EE00EB6FA3 /* CDVLogger.m */; };
+		3E76876F156A90EE00EB6FA3 /* CDVLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E76876C156A90EE00EB6FA3 /* CDVLogger.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8852C43A14B65FD800F0E735 /* CDVViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 8852C43614B65FD800F0E735 /* CDVViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8852C43C14B65FD800F0E735 /* CDVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8852C43714B65FD800F0E735 /* CDVViewController.m */; };
+		8852C43F14B65FD800F0E735 /* CDVCordovaView.h in Headers */ = {isa = PBXBuildFile; fileRef = 8852C43814B65FD800F0E735 /* CDVCordovaView.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8852C44114B65FD800F0E735 /* CDVCordovaView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8852C43914B65FD800F0E735 /* CDVCordovaView.m */; };
+		8887FD661090FBE7009987E8 /* CDVCamera.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD261090FBE7009987E8 /* CDVCamera.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD671090FBE7009987E8 /* CDVCamera.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD271090FBE7009987E8 /* CDVCamera.m */; };
+		8887FD681090FBE7009987E8 /* NSDictionary+Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD691090FBE7009987E8 /* NSDictionary+Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD291090FBE7009987E8 /* NSDictionary+Extensions.m */; };
+		8887FD6A1090FBE7009987E8 /* CDVContacts.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD2A1090FBE7009987E8 /* CDVContacts.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD6B1090FBE7009987E8 /* CDVContacts.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD2B1090FBE7009987E8 /* CDVContacts.m */; };
+		8887FD6C1090FBE7009987E8 /* CDVDebugConsole.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD2C1090FBE7009987E8 /* CDVDebugConsole.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD6D1090FBE7009987E8 /* CDVDebugConsole.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD2D1090FBE7009987E8 /* CDVDebugConsole.m */; };
+		8887FD701090FBE7009987E8 /* CDVFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD301090FBE7009987E8 /* CDVFile.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD711090FBE7009987E8 /* CDVFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD311090FBE7009987E8 /* CDVFile.m */; };
+		8887FD741090FBE7009987E8 /* CDVInvokedUrlCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD751090FBE7009987E8 /* CDVInvokedUrlCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */; };
+		8887FD851090FBE7009987E8 /* CDVLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD461090FBE7009987E8 /* CDVLocation.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD861090FBE7009987E8 /* CDVLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD471090FBE7009987E8 /* CDVLocation.m */; };
+		8887FD8D1090FBE7009987E8 /* CDVNotification.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD4E1090FBE7009987E8 /* CDVNotification.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD8E1090FBE7009987E8 /* CDVNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD4F1090FBE7009987E8 /* CDVNotification.m */; };
+		8887FD8F1090FBE7009987E8 /* NSData+Base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD501090FBE7009987E8 /* NSData+Base64.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD901090FBE7009987E8 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD511090FBE7009987E8 /* NSData+Base64.m */; };
+		8887FD9D1090FBE7009987E8 /* CDVReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD5E1090FBE7009987E8 /* CDVReachability.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD9E1090FBE7009987E8 /* CDVReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD5F1090FBE7009987E8 /* CDVReachability.m */; };
+		8887FD9F1090FBE7009987E8 /* CDVSound.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD601090FBE7009987E8 /* CDVSound.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FDA01090FBE7009987E8 /* CDVSound.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD611090FBE7009987E8 /* CDVSound.m */; };
+		88BA573D109BB46F00FB5E78 /* CDVAccelerometer.h in Headers */ = {isa = PBXBuildFile; fileRef = 88BA573B109BB46F00FB5E78 /* CDVAccelerometer.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		88BA573E109BB46F00FB5E78 /* CDVAccelerometer.m in Sources */ = {isa = PBXBuildFile; fileRef = 88BA573C109BB46F00FB5E78 /* CDVAccelerometer.m */; };
+		9D76CF3C1625A4C50008A0F6 /* CDVGlobalization.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D76CF3A1625A4C50008A0F6 /* CDVGlobalization.h */; };
+		9D76CF3D1625A4C50008A0F6 /* CDVGlobalization.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D76CF3B1625A4C50008A0F6 /* CDVGlobalization.m */; };
+		C937A4561337599E002C4C79 /* CDVFileTransfer.h in Headers */ = {isa = PBXBuildFile; fileRef = C937A4541337599E002C4C79 /* CDVFileTransfer.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		C937A4571337599E002C4C79 /* CDVFileTransfer.m in Sources */ = {isa = PBXBuildFile; fileRef = C937A4551337599E002C4C79 /* CDVFileTransfer.m */; };
+		EB3B3547161CB44D003DBE7D /* CDVCommandQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */; };
+		EB3B3548161CB44D003DBE7D /* CDVCommandQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */; };
+		EB3B357C161F2A45003DBE7D /* CDVCommandDelegateImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */; };
+		EB3B357D161F2A45003DBE7D /* CDVCommandDelegateImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */; };
+		EB80C2AC15DEA63D004D9E7B /* CDVEcho.h in Headers */ = {isa = PBXBuildFile; fileRef = EB80C2AA15DEA63D004D9E7B /* CDVEcho.h */; };
+		EB80C2AD15DEA63D004D9E7B /* CDVEcho.m in Sources */ = {isa = PBXBuildFile; fileRef = EB80C2AB15DEA63D004D9E7B /* CDVEcho.m */; };
+		EBA3557315ABD38C00F4DE24 /* NSArray+Comparisons.h in Headers */ = {isa = PBXBuildFile; fileRef = EBA3557115ABD38C00F4DE24 /* NSArray+Comparisons.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EBA3557515ABD38C00F4DE24 /* NSArray+Comparisons.m in Sources */ = {isa = PBXBuildFile; fileRef = EBA3557215ABD38C00F4DE24 /* NSArray+Comparisons.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		1F2BECBE13F9785B00A93BF6 /* CDVBattery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVBattery.h; path = Classes/CDVBattery.h; sourceTree = "<group>"; };
+		1F2BECBF13F9785B00A93BF6 /* CDVBattery.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVBattery.m; path = Classes/CDVBattery.m; sourceTree = "<group>"; };
+		1F3C04CC12BC247D004F9E10 /* CDVContact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVContact.h; path = Classes/CDVContact.h; sourceTree = "<group>"; };
+		1F3C04CD12BC247D004F9E10 /* CDVContact.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVContact.m; path = Classes/CDVContact.m; sourceTree = "<group>"; };
+		1F584B991385A28900ED25E8 /* CDVCapture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCapture.h; path = Classes/CDVCapture.h; sourceTree = "<group>"; };
+		1F584B9A1385A28900ED25E8 /* CDVCapture.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCapture.m; path = Classes/CDVCapture.m; sourceTree = "<group>"; };
+		1F92F49E1314023E0046367C /* CDVPluginResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVPluginResult.h; path = Classes/CDVPluginResult.h; sourceTree = "<group>"; };
+		1F92F49F1314023E0046367C /* CDVPluginResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVPluginResult.m; path = Classes/CDVPluginResult.m; sourceTree = "<group>"; };
+		301F2F2914F3C9CA003FE9FC /* CDV.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDV.h; path = Classes/CDV.h; sourceTree = "<group>"; };
+		302965BB13A94E9D007046C5 /* CDVDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDebug.h; path = Classes/CDVDebug.h; sourceTree = "<group>"; };
+		30325A0B136B343700982B63 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
+		3034979A1513D56A0090E688 /* CDVLocalStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLocalStorage.h; path = Classes/CDVLocalStorage.h; sourceTree = "<group>"; };
+		3034979B1513D56A0090E688 /* CDVLocalStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLocalStorage.m; path = Classes/CDVLocalStorage.m; sourceTree = "<group>"; };
+		30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVAvailability.h; path = Classes/CDVAvailability.h; sourceTree = "<group>"; };
+		3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIDevice+Extensions.h"; path = "Classes/UIDevice+Extensions.h"; sourceTree = "<group>"; };
+		3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIDevice+Extensions.m"; path = "Classes/UIDevice+Extensions.m"; sourceTree = "<group>"; };
+		307A8F9C1385A2EC00E43782 /* CDVConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVConnection.h; path = Classes/CDVConnection.h; sourceTree = "<group>"; };
+		307A8F9D1385A2EC00E43782 /* CDVConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVConnection.m; path = Classes/CDVConnection.m; sourceTree = "<group>"; };
+		30A90B8F14588697006178D3 /* JSONKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONKit.h; sourceTree = "<group>"; };
+		30A90B9014588697006178D3 /* JSONKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONKit.m; sourceTree = "<group>"; };
+		30B39EBC13D0268B0009682A /* CDVSplashScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVSplashScreen.h; path = Classes/CDVSplashScreen.h; sourceTree = "<group>"; };
+		30B39EBD13D0268B0009682A /* CDVSplashScreen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVSplashScreen.m; path = Classes/CDVSplashScreen.m; sourceTree = "<group>"; };
+		30C5F1DD15AF9E950052A00D /* CDVDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDevice.h; path = Classes/CDVDevice.h; sourceTree = "<group>"; };
+		30C5F1DE15AF9E950052A00D /* CDVDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVDevice.m; path = Classes/CDVDevice.m; sourceTree = "<group>"; };
+		30C6847E1406CB38004C1A8E /* CDVWhitelist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVWhitelist.h; path = Classes/CDVWhitelist.h; sourceTree = "<group>"; };
+		30C6847F1406CB38004C1A8E /* CDVWhitelist.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVWhitelist.m; path = Classes/CDVWhitelist.m; sourceTree = "<group>"; };
+		30C684921407044A004C1A8E /* CDVURLProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVURLProtocol.h; path = Classes/CDVURLProtocol.h; sourceTree = "<group>"; };
+		30C684931407044A004C1A8E /* CDVURLProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVURLProtocol.m; path = Classes/CDVURLProtocol.m; sourceTree = "<group>"; };
+		30E33AF013A7E24B00594D64 /* CDVPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVPlugin.h; path = Classes/CDVPlugin.h; sourceTree = "<group>"; };
+		30E33AF113A7E24B00594D64 /* CDVPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVPlugin.m; path = Classes/CDVPlugin.m; sourceTree = "<group>"; };
+		30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSMutableArray+QueueAdditions.h"; path = "Classes/NSMutableArray+QueueAdditions.h"; sourceTree = "<group>"; };
+		30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSMutableArray+QueueAdditions.m"; path = "Classes/NSMutableArray+QueueAdditions.m"; sourceTree = "<group>"; };
+		30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandDelegate.h; path = Classes/CDVCommandDelegate.h; sourceTree = "<group>"; };
+		3E76876B156A90EE00EB6FA3 /* CDVLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLogger.m; path = Classes/CDVLogger.m; sourceTree = "<group>"; };
+		3E76876C156A90EE00EB6FA3 /* CDVLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLogger.h; path = Classes/CDVLogger.h; sourceTree = "<group>"; };
+		686357AA141002F100DF4CF2 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+		686357AC141002F100DF4CF2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+		686357AE141002F100DF4CF2 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+		686357CC14100AAD00DF4CF2 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
+		686357CE14100ADA00DF4CF2 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
+		686357CF14100ADB00DF4CF2 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
+		686357D014100ADE00DF4CF2 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
+		686357D214100AE700DF4CF2 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
+		686357D414100AF200DF4CF2 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
+		686357DC14100B1600DF4CF2 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
+		68A32D7114102E1C006B237C /* libCordova.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCordova.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		68A32D7414103017006B237C /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
+		8852C43614B65FD800F0E735 /* CDVViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVViewController.h; path = Classes/CDVViewController.h; sourceTree = "<group>"; };
+		8852C43714B65FD800F0E735 /* CDVViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVViewController.m; path = Classes/CDVViewController.m; sourceTree = "<group>"; };
+		8852C43814B65FD800F0E735 /* CDVCordovaView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCordovaView.h; path = Classes/CDVCordovaView.h; sourceTree = "<group>"; };
+		8852C43914B65FD800F0E735 /* CDVCordovaView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCordovaView.m; path = Classes/CDVCordovaView.m; sourceTree = "<group>"; };
+		8887FD261090FBE7009987E8 /* CDVCamera.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCamera.h; path = Classes/CDVCamera.h; sourceTree = "<group>"; };
+		8887FD271090FBE7009987E8 /* CDVCamera.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCamera.m; path = Classes/CDVCamera.m; sourceTree = "<group>"; };
+		8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+Extensions.h"; path = "Classes/NSDictionary+Extensions.h"; sourceTree = "<group>"; };
+		8887FD291090FBE7009987E8 /* NSDictionary+Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+Extensions.m"; path = "Classes/NSDictionary+Extensions.m"; sourceTree = "<group>"; };
+		8887FD2A1090FBE7009987E8 /* CDVContacts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVContacts.h; path = Classes/CDVContacts.h; sourceTree = "<group>"; };
+		8887FD2B1090FBE7009987E8 /* CDVContacts.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVContacts.m; path = Classes/CDVContacts.m; sourceTree = "<group>"; };
+		8887FD2C1090FBE7009987E8 /* CDVDebugConsole.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDebugConsole.h; path = Classes/CDVDebugConsole.h; sourceTree = "<group>"; };
+		8887FD2D1090FBE7009987E8 /* CDVDebugConsole.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVDebugConsole.m; path = Classes/CDVDebugConsole.m; sourceTree = "<group>"; };
+		8887FD301090FBE7009987E8 /* CDVFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVFile.h; path = Classes/CDVFile.h; sourceTree = "<group>"; };
+		8887FD311090FBE7009987E8 /* CDVFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVFile.m; path = Classes/CDVFile.m; sourceTree = "<group>"; };
+		8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVInvokedUrlCommand.h; path = Classes/CDVInvokedUrlCommand.h; sourceTree = "<group>"; };
+		8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVInvokedUrlCommand.m; path = Classes/CDVInvokedUrlCommand.m; sourceTree = "<group>"; };
+		8887FD461090FBE7009987E8 /* CDVLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLocation.h; path = Classes/CDVLocation.h; sourceTree = "<group>"; };
+		8887FD471090FBE7009987E8 /* CDVLocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLocation.m; path = Classes/CDVLocation.m; sourceTree = "<group>"; };
+		8887FD4E1090FBE7009987E8 /* CDVNotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVNotification.h; path = Classes/CDVNotification.h; sourceTree = "<group>"; };
+		8887FD4F1090FBE7009987E8 /* CDVNotification.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVNotification.m; path = Classes/CDVNotification.m; sourceTree = "<group>"; };
+		8887FD501090FBE7009987E8 /* NSData+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSData+Base64.h"; path = "Classes/NSData+Base64.h"; sourceTree = "<group>"; };
+		8887FD511090FBE7009987E8 /* NSData+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSData+Base64.m"; path = "Classes/NSData+Base64.m"; sourceTree = "<group>"; };
+		8887FD5E1090FBE7009987E8 /* CDVReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVReachability.h; path = Classes/CDVReachability.h; sourceTree = "<group>"; };
+		8887FD5F1090FBE7009987E8 /* CDVReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVReachability.m; path = Classes/CDVReachability.m; sourceTree = "<group>"; };
+		8887FD601090FBE7009987E8 /* CDVSound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVSound.h; path = Classes/CDVSound.h; sourceTree = "<group>"; };
+		8887FD611090FBE7009987E8 /* CDVSound.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVSound.m; path = Classes/CDVSound.m; sourceTree = "<group>"; };
+		88BA573B109BB46F00FB5E78 /* CDVAccelerometer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVAccelerometer.h; path = Classes/CDVAccelerometer.h; sourceTree = "<group>"; };
+		88BA573C109BB46F00FB5E78 /* CDVAccelerometer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVAccelerometer.m; path = Classes/CDVAccelerometer.m; sourceTree = "<group>"; };
+		9D76CF3A1625A4C50008A0F6 /* CDVGlobalization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVGlobalization.h; path = Classes/CDVGlobalization.h; sourceTree = "<group>"; };
+		9D76CF3B1625A4C50008A0F6 /* CDVGlobalization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVGlobalization.m; path = Classes/CDVGlobalization.m; sourceTree = "<group>"; };
+		AA747D9E0F9514B9006C5449 /* CordovaLib_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CordovaLib_Prefix.pch; sourceTree = SOURCE_ROOT; };
+		C937A4541337599E002C4C79 /* CDVFileTransfer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVFileTransfer.h; path = Classes/CDVFileTransfer.h; sourceTree = "<group>"; };
+		C937A4551337599E002C4C79 /* CDVFileTransfer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVFileTransfer.m; path = Classes/CDVFileTransfer.m; sourceTree = "<group>"; };
+		EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandQueue.h; path = Classes/CDVCommandQueue.h; sourceTree = "<group>"; };
+		EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCommandQueue.m; path = Classes/CDVCommandQueue.m; sourceTree = "<group>"; };
+		EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandDelegateImpl.h; path = Classes/CDVCommandDelegateImpl.h; sourceTree = "<group>"; };
+		EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCommandDelegateImpl.m; path = Classes/CDVCommandDelegateImpl.m; sourceTree = "<group>"; };
+		EB80C2AA15DEA63D004D9E7B /* CDVEcho.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVEcho.h; path = Classes/CDVEcho.h; sourceTree = "<group>"; };
+		EB80C2AB15DEA63D004D9E7B /* CDVEcho.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVEcho.m; path = Classes/CDVEcho.m; sourceTree = "<group>"; };
+		EBA3557115ABD38C00F4DE24 /* NSArray+Comparisons.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSArray+Comparisons.h"; path = "Classes/NSArray+Comparisons.h"; sourceTree = "<group>"; };
+		EBA3557215ABD38C00F4DE24 /* NSArray+Comparisons.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSArray+Comparisons.m"; path = "Classes/NSArray+Comparisons.m"; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		D2AAC07C0554694100DB518D /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		034768DFFF38A50411DB9C8B /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				68A32D7114102E1C006B237C /* libCordova.a */,
+			);
+			name = Products;
+			sourceTree = CORDOVALIB;
+		};
+		0867D691FE84028FC02AAC07 /* CordovaLib */ = {
+			isa = PBXGroup;
+			children = (
+				8887FD101090FB43009987E8 /* Classes */,
+				32C88DFF0371C24200C91783 /* Other Sources */,
+				0867D69AFE84028FC02AAC07 /* Frameworks */,
+				034768DFFF38A50411DB9C8B /* Products */,
+				30325A0B136B343700982B63 /* VERSION */,
+			);
+			name = CordovaLib;
+			sourceTree = "<group>";
+		};
+		0867D69AFE84028FC02AAC07 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				68A32D7414103017006B237C /* AddressBook.framework */,
+				686357DC14100B1600DF4CF2 /* CoreMedia.framework */,
+				686357CE14100ADA00DF4CF2 /* AudioToolbox.framework */,
+				686357CF14100ADB00DF4CF2 /* AVFoundation.framework */,
+				686357D014100ADE00DF4CF2 /* CoreLocation.framework */,
+				686357D214100AE700DF4CF2 /* MobileCoreServices.framework */,
+				686357D414100AF200DF4CF2 /* SystemConfiguration.framework */,
+				686357CC14100AAD00DF4CF2 /* AddressBookUI.framework */,
+				686357AA141002F100DF4CF2 /* UIKit.framework */,
+				686357AC141002F100DF4CF2 /* Foundation.framework */,
+				686357AE141002F100DF4CF2 /* CoreGraphics.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		3054098714B77FF3009841CA /* Cleaver */ = {
+			isa = PBXGroup;
+			children = (
+				8852C43614B65FD800F0E735 /* CDVViewController.h */,
+				8852C43714B65FD800F0E735 /* CDVViewController.m */,
+				8852C43814B65FD800F0E735 /* CDVCordovaView.h */,
+				8852C43914B65FD800F0E735 /* CDVCordovaView.m */,
+				EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */,
+				EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */,
+			);
+			name = Cleaver;
+			sourceTree = "<group>";
+		};
+		32C88DFF0371C24200C91783 /* Other Sources */ = {
+			isa = PBXGroup;
+			children = (
+				AA747D9E0F9514B9006C5449 /* CordovaLib_Prefix.pch */,
+			);
+			name = "Other Sources";
+			sourceTree = "<group>";
+		};
+		888700D710922F56009987E8 /* Commands */ = {
+			isa = PBXGroup;
+			children = (
+				30C5F1DD15AF9E950052A00D /* CDVDevice.h */,
+				30C5F1DE15AF9E950052A00D /* CDVDevice.m */,
+				301F2F2914F3C9CA003FE9FC /* CDV.h */,
+				3034979A1513D56A0090E688 /* CDVLocalStorage.h */,
+				3034979B1513D56A0090E688 /* CDVLocalStorage.m */,
+				30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */,
+				30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */,
+				EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */,
+				EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */,
+				30C684921407044A004C1A8E /* CDVURLProtocol.h */,
+				30C684931407044A004C1A8E /* CDVURLProtocol.m */,
+				30C6847E1406CB38004C1A8E /* CDVWhitelist.h */,
+				30C6847F1406CB38004C1A8E /* CDVWhitelist.m */,
+				1F2BECBE13F9785B00A93BF6 /* CDVBattery.h */,
+				1F2BECBF13F9785B00A93BF6 /* CDVBattery.m */,
+				30B39EBC13D0268B0009682A /* CDVSplashScreen.h */,
+				30B39EBD13D0268B0009682A /* CDVSplashScreen.m */,
+				30E33AF013A7E24B00594D64 /* CDVPlugin.h */,
+				30E33AF113A7E24B00594D64 /* CDVPlugin.m */,
+				307A8F9C1385A2EC00E43782 /* CDVConnection.h */,
+				307A8F9D1385A2EC00E43782 /* CDVConnection.m */,
+				1F92F49E1314023E0046367C /* CDVPluginResult.h */,
+				1F92F49F1314023E0046367C /* CDVPluginResult.m */,
+				88BA573B109BB46F00FB5E78 /* CDVAccelerometer.h */,
+				88BA573C109BB46F00FB5E78 /* CDVAccelerometer.m */,
+				8887FD261090FBE7009987E8 /* CDVCamera.h */,
+				8887FD271090FBE7009987E8 /* CDVCamera.m */,
+				1F584B991385A28900ED25E8 /* CDVCapture.h */,
+				1F584B9A1385A28900ED25E8 /* CDVCapture.m */,
+				1F3C04CC12BC247D004F9E10 /* CDVContact.h */,
+				1F3C04CD12BC247D004F9E10 /* CDVContact.m */,
+				8887FD2A1090FBE7009987E8 /* CDVContacts.h */,
+				8887FD2B1090FBE7009987E8 /* CDVContacts.m */,
+				8887FD2C1090FBE7009987E8 /* CDVDebugConsole.h */,
+				8887FD2D1090FBE7009987E8 /* CDVDebugConsole.m */,
+				EB80C2AA15DEA63D004D9E7B /* CDVEcho.h */,
+				EB80C2AB15DEA63D004D9E7B /* CDVEcho.m */,
+				8887FD301090FBE7009987E8 /* CDVFile.h */,
+				8887FD311090FBE7009987E8 /* CDVFile.m */,
+				8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */,
+				8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */,
+				C937A4541337599E002C4C79 /* CDVFileTransfer.h */,
+				C937A4551337599E002C4C79 /* CDVFileTransfer.m */,
+				8887FD461090FBE7009987E8 /* CDVLocation.h */,
+				8887FD471090FBE7009987E8 /* CDVLocation.m */,
+				8887FD4E1090FBE7009987E8 /* CDVNotification.h */,
+				8887FD4F1090FBE7009987E8 /* CDVNotification.m */,
+				8887FD5E1090FBE7009987E8 /* CDVReachability.h */,
+				8887FD5F1090FBE7009987E8 /* CDVReachability.m */,
+				8887FD601090FBE7009987E8 /* CDVSound.h */,
+				8887FD611090FBE7009987E8 /* CDVSound.m */,
+				3E76876B156A90EE00EB6FA3 /* CDVLogger.m */,
+				3E76876C156A90EE00EB6FA3 /* CDVLogger.h */,
+				9D76CF3A1625A4C50008A0F6 /* CDVGlobalization.h */,
+				9D76CF3B1625A4C50008A0F6 /* CDVGlobalization.m */,
+			);
+			name = Commands;
+			sourceTree = "<group>";
+		};
+		888700D910923009009987E8 /* Util */ = {
+			isa = PBXGroup;
+			children = (
+				3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */,
+				3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */,
+				EBA3557115ABD38C00F4DE24 /* NSArray+Comparisons.h */,
+				EBA3557215ABD38C00F4DE24 /* NSArray+Comparisons.m */,
+				8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */,
+				8887FD291090FBE7009987E8 /* NSDictionary+Extensions.m */,
+				302965BB13A94E9D007046C5 /* CDVDebug.h */,
+				30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */,
+				30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */,
+				8887FD501090FBE7009987E8 /* NSData+Base64.h */,
+				8887FD511090FBE7009987E8 /* NSData+Base64.m */,
+			);
+			name = Util;
+			sourceTree = "<group>";
+		};
+		8887FD101090FB43009987E8 /* Classes */ = {
+			isa = PBXGroup;
+			children = (
+				3054098714B77FF3009841CA /* Cleaver */,
+				888700D710922F56009987E8 /* Commands */,
+				8887FD361090FBE7009987E8 /* JSON */,
+				888700D910923009009987E8 /* Util */,
+			);
+			name = Classes;
+			sourceTree = "<group>";
+		};
+		8887FD361090FBE7009987E8 /* JSON */ = {
+			isa = PBXGroup;
+			children = (
+				30A90B8F14588697006178D3 /* JSONKit.h */,
+				30A90B9014588697006178D3 /* JSONKit.m */,
+			);
+			name = JSON;
+			path = Classes/JSON;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+		D2AAC07A0554694100DB518D /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				8887FD661090FBE7009987E8 /* CDVCamera.h in Headers */,
+				8887FD681090FBE7009987E8 /* NSDictionary+Extensions.h in Headers */,
+				8887FD6A1090FBE7009987E8 /* CDVContacts.h in Headers */,
+				8887FD6C1090FBE7009987E8 /* CDVDebugConsole.h in Headers */,
+				8887FD701090FBE7009987E8 /* CDVFile.h in Headers */,
+				8887FD741090FBE7009987E8 /* CDVInvokedUrlCommand.h in Headers */,
+				8887FD851090FBE7009987E8 /* CDVLocation.h in Headers */,
+				8887FD8D1090FBE7009987E8 /* CDVNotification.h in Headers */,
+				8887FD8F1090FBE7009987E8 /* NSData+Base64.h in Headers */,
+				8887FD9D1090FBE7009987E8 /* CDVReachability.h in Headers */,
+				8887FD9F1090FBE7009987E8 /* CDVSound.h in Headers */,
+				88BA573D109BB46F00FB5E78 /* CDVAccelerometer.h in Headers */,
+				1F3C04CE12BC247D004F9E10 /* CDVContact.h in Headers */,
+				1F92F4A01314023E0046367C /* CDVPluginResult.h in Headers */,
+				C937A4561337599E002C4C79 /* CDVFileTransfer.h in Headers */,
+				307A8F9E1385A2EC00E43782 /* CDVConnection.h in Headers */,
+				1F584B9B1385A28A00ED25E8 /* CDVCapture.h in Headers */,
+				30E33AF213A7E24B00594D64 /* CDVPlugin.h in Headers */,
+				302965BC13A94E9D007046C5 /* CDVDebug.h in Headers */,
+				30B39EBE13D0268B0009682A /* CDVSplashScreen.h in Headers */,
+				30E563CF13E217EC00C949AA /* NSMutableArray+QueueAdditions.h in Headers */,
+				1F2BECC013F9785B00A93BF6 /* CDVBattery.h in Headers */,
+				30C684801406CB38004C1A8E /* CDVWhitelist.h in Headers */,
+				30C684941407044B004C1A8E /* CDVURLProtocol.h in Headers */,
+				30A90B9114588697006178D3 /* JSONKit.h in Headers */,
+				8852C43A14B65FD800F0E735 /* CDVViewController.h in Headers */,
+				8852C43F14B65FD800F0E735 /* CDVCordovaView.h in Headers */,
+				30F5EBAB14CA26E700987760 /* CDVCommandDelegate.h in Headers */,
+				301F2F2A14F3C9CA003FE9FC /* CDV.h in Headers */,
+				30392E4E14F4FCAB00B9E0B8 /* CDVAvailability.h in Headers */,
+				3034979C1513D56A0090E688 /* CDVLocalStorage.h in Headers */,
+				3062D120151D0EDB000D9128 /* UIDevice+Extensions.h in Headers */,
+				3E76876F156A90EE00EB6FA3 /* CDVLogger.h in Headers */,
+				EBA3557315ABD38C00F4DE24 /* NSArray+Comparisons.h in Headers */,
+				30C5F1DF15AF9E950052A00D /* CDVDevice.h in Headers */,
+				EB80C2AC15DEA63D004D9E7B /* CDVEcho.h in Headers */,
+				EB3B3547161CB44D003DBE7D /* CDVCommandQueue.h in Headers */,
+				EB3B357C161F2A45003DBE7D /* CDVCommandDelegateImpl.h in Headers */,
+				9D76CF3C1625A4C50008A0F6 /* CDVGlobalization.h in Headers */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+		D2AAC07D0554694100DB518D /* CordovaLib */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CordovaLib" */;
+			buildPhases = (
+				D2AAC07A0554694100DB518D /* Headers */,
+				D2AAC07B0554694100DB518D /* Sources */,
+				D2AAC07C0554694100DB518D /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = CordovaLib;
+			productName = CordovaLib;
+			productReference = 68A32D7114102E1C006B237C /* libCordova.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		0867D690FE84028FC02AAC07 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0430;
+			};
+			buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CordovaLib" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 1;
+			knownRegions = (
+				English,
+				Japanese,
+				French,
+				German,
+				en,
+			);
+			mainGroup = 0867D691FE84028FC02AAC07 /* CordovaLib */;
+			productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				D2AAC07D0554694100DB518D /* CordovaLib */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+		D2AAC07B0554694100DB518D /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				8887FD671090FBE7009987E8 /* CDVCamera.m in Sources */,
+				8887FD691090FBE7009987E8 /* NSDictionary+Extensions.m in Sources */,
+				8887FD6B1090FBE7009987E8 /* CDVContacts.m in Sources */,
+				8887FD6D1090FBE7009987E8 /* CDVDebugConsole.m in Sources */,
+				8887FD711090FBE7009987E8 /* CDVFile.m in Sources */,
+				8887FD751090FBE7009987E8 /* CDVInvokedUrlCommand.m in Sources */,
+				8887FD861090FBE7009987E8 /* CDVLocation.m in Sources */,
+				8887FD8E1090FBE7009987E8 /* CDVNotification.m in Sources */,
+				8887FD901090FBE7009987E8 /* NSData+Base64.m in Sources */,
+				8887FD9E1090FBE7009987E8 /* CDVReachability.m in Sources */,
+				8887FDA01090FBE7009987E8 /* CDVSound.m in Sources */,
+				88BA573E109BB46F00FB5E78 /* CDVAccelerometer.m in Sources */,
+				1F3C04CF12BC247D004F9E10 /* CDVContact.m in Sources */,
+				1F92F4A11314023E0046367C /* CDVPluginResult.m in Sources */,
+				C937A4571337599E002C4C79 /* CDVFileTransfer.m in Sources */,
+				307A8F9F1385A2EC00E43782 /* CDVConnection.m in Sources */,
+				1F584B9C1385A28A00ED25E8 /* CDVCapture.m in Sources */,
+				30E33AF313A7E24B00594D64 /* CDVPlugin.m in Sources */,
+				30B39EBF13D0268B0009682A /* CDVSplashScreen.m in Sources */,
+				30E563D013E217EC00C949AA /* NSMutableArray+QueueAdditions.m in Sources */,
+				1F2BECC113F9785B00A93BF6 /* CDVBattery.m in Sources */,
+				30C684821406CB38004C1A8E /* CDVWhitelist.m in Sources */,
+				30C684961407044B004C1A8E /* CDVURLProtocol.m in Sources */,
+				30A90B9314588697006178D3 /* JSONKit.m in Sources */,
+				8852C43C14B65FD800F0E735 /* CDVViewController.m in Sources */,
+				8852C44114B65FD800F0E735 /* CDVCordovaView.m in Sources */,
+				3034979E1513D56A0090E688 /* CDVLocalStorage.m in Sources */,
+				3062D122151D0EDB000D9128 /* UIDevice+Extensions.m in Sources */,
+				3E76876D156A90EE00EB6FA3 /* CDVLogger.m in Sources */,
+				EBA3557515ABD38C00F4DE24 /* NSArray+Comparisons.m in Sources */,
+				30C5F1E015AF9E950052A00D /* CDVDevice.m in Sources */,
+				EB80C2AD15DEA63D004D9E7B /* CDVEcho.m in Sources */,
+				EB3B3548161CB44D003DBE7D /* CDVCommandQueue.m in Sources */,
+				EB3B357D161F2A45003DBE7D /* CDVCommandDelegateImpl.m in Sources */,
+				9D76CF3D1625A4C50008A0F6 /* CDVGlobalization.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+		1DEB921F08733DC00010E9CD /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				"ARCHS[sdk=iphoneos*]" = (
+					armv6,
+					armv7,
+				);
+				"ARCHS[sdk=iphoneos6.*]" = (
+					armv7,
+					armv7s,
+				);
+				"ARCHS[sdk=iphonesimulator*]" = i386;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				COPY_PHASE_STRIP = NO;
+				DSTROOT = "/tmp/$(PROJECT_NAME).dst";
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = CordovaLib_Prefix.pch;
+				GCC_PREPROCESSOR_DEFINITIONS = "";
+				GCC_THUMB_SUPPORT = NO;
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				INSTALL_PATH = /usr/local/lib;
+				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
+				PRODUCT_NAME = Cordova;
+				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
+				SKIP_INSTALL = YES;
+			};
+			name = Debug;
+		};
+		1DEB922008733DC00010E9CD /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				"ARCHS[sdk=iphoneos*]" = (
+					armv6,
+					armv7,
+				);
+				"ARCHS[sdk=iphoneos6.*]" = (
+					armv7,
+					armv7s,
+				);
+				"ARCHS[sdk=iphonesimulator*]" = i386;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				DSTROOT = "/tmp/$(PROJECT_NAME).dst";
+				GCC_MODEL_TUNING = G5;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = CordovaLib_Prefix.pch;
+				GCC_PREPROCESSOR_DEFINITIONS = "";
+				GCC_THUMB_SUPPORT = NO;
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				INSTALL_PATH = /usr/local/lib;
+				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
+				PRODUCT_NAME = Cordova;
+				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
+				SKIP_INSTALL = YES;
+			};
+			name = Release;
+		};
+		1DEB922308733DC00010E9CD /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				"ARCHS[sdk=iphoneos*]" = (
+					armv6,
+					armv7,
+				);
+				"ARCHS[sdk=iphoneos6.*]" = (
+					armv7,
+					armv7s,
+				);
+				"ARCHS[sdk=iphonesimulator*]" = i386;
+				GCC_C_LANGUAGE_STANDARD = c99;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = "";
+				GCC_THUMB_SUPPORT = NO;
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
+				ONLY_ACTIVE_ARCH = NO;
+				OTHER_CFLAGS = "-DDEBUG";
+				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
+				SDKROOT = iphoneos;
+				SKIP_INSTALL = YES;
+				TARGETED_DEVICE_FAMILY = "1,2";
+				USER_HEADER_SEARCH_PATHS = "";
+				VALID_ARCHS = "i386 armv6 armv7 armv7s";
+			};
+			name = Debug;
+		};
+		1DEB922408733DC00010E9CD /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				"ARCHS[sdk=iphoneos*]" = (
+					armv6,
+					armv7,
+				);
+				"ARCHS[sdk=iphoneos6.*]" = (
+					armv7,
+					armv7s,
+				);
+				"ARCHS[sdk=iphonesimulator*]" = i386;
+				GCC_C_LANGUAGE_STANDARD = c99;
+				GCC_PREPROCESSOR_DEFINITIONS = "";
+				GCC_THUMB_SUPPORT = NO;
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
+				ONLY_ACTIVE_ARCH = NO;
+				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
+				SDKROOT = iphoneos;
+				SKIP_INSTALL = YES;
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VALID_ARCHS = "i386 armv6 armv7 armv7s";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CordovaLib" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				1DEB921F08733DC00010E9CD /* Debug */,
+				1DEB922008733DC00010E9CD /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CordovaLib" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				1DEB922308733DC00010E9CD /* Debug */,
+				1DEB922408733DC00010E9CD /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
+}


[20/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/src/android/ContactAccessorSdk5.java
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/src/android/ContactAccessorSdk5.java b/spec/plugins/Contacts/src/android/ContactAccessorSdk5.java
deleted file mode 100644
index 46440ba..0000000
--- a/spec/plugins/Contacts/src/android/ContactAccessorSdk5.java
+++ /dev/null
@@ -1,2183 +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.
-*/
-
-package org.apache.cordova.core;
-
-import android.accounts.Account;
-import android.accounts.AccountManager;
-import android.content.ContentProviderOperation;
-import android.content.ContentProviderResult;
-import android.content.ContentUris;
-import android.content.ContentValues;
-import android.content.OperationApplicationException;
-import android.database.Cursor;
-import android.net.Uri;
-import android.os.RemoteException;
-import android.provider.ContactsContract;
-import android.util.Log;
-import android.webkit.WebView;
-
-import org.apache.cordova.CordovaInterface;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import java.io.ByteArrayOutputStream;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-//import android.app.Activity;
-//import android.content.Context;
-
-/**
- * An implementation of {@link ContactAccessor} that uses current Contacts API.
- * This class should be used on Eclair or beyond, but would not work on any earlier
- * release of Android.  As a matter of fact, it could not even be loaded.
- * <p>
- * This implementation has several advantages:
- * <ul>
- * <li>It sees contacts from multiple accounts.
- * <li>It works with aggregated contacts. So for example, if the contact is the result
- * of aggregation of two raw contacts from different accounts, it may return the name from
- * one and the phone number from the other.
- * <li>It is efficient because it uses the more efficient current API.
- * <li>Not obvious in this particular example, but it has access to new kinds
- * of data available exclusively through the new APIs. Exercise for the reader: add support
- * for nickname (see {@link android.provider.ContactsContract.CommonDataKinds.Nickname}) or
- * social status updates (see {@link android.provider.ContactsContract.StatusUpdates}).
- * </ul>
- */
-
-public class ContactAccessorSdk5 extends ContactAccessor {
-
-    /**
-     * Keep the photo size under the 1 MB blog limit.
-     */
-    private static final long MAX_PHOTO_SIZE = 1048576;
-
-    private static final String EMAIL_REGEXP = ".+@.+\\.+.+"; /* <anything>@<anything>.<anything>*/
-
-    /**
-     * A static map that converts the JavaScript property name to Android database column name.
-     */
-    private static final Map<String, String> dbMap = new HashMap<String, String>();
-    static {
-        dbMap.put("id", ContactsContract.Data.CONTACT_ID);
-        dbMap.put("displayName", ContactsContract.Contacts.DISPLAY_NAME);
-        dbMap.put("name", ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME);
-        dbMap.put("name.formatted", ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME);
-        dbMap.put("name.familyName", ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME);
-        dbMap.put("name.givenName", ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME);
-        dbMap.put("name.middleName", ContactsContract.CommonDataKinds.StructuredName.MIDDLE_NAME);
-        dbMap.put("name.honorificPrefix", ContactsContract.CommonDataKinds.StructuredName.PREFIX);
-        dbMap.put("name.honorificSuffix", ContactsContract.CommonDataKinds.StructuredName.SUFFIX);
-        dbMap.put("nickname", ContactsContract.CommonDataKinds.Nickname.NAME);
-        dbMap.put("phoneNumbers", ContactsContract.CommonDataKinds.Phone.NUMBER);
-        dbMap.put("phoneNumbers.value", ContactsContract.CommonDataKinds.Phone.NUMBER);
-        dbMap.put("emails", ContactsContract.CommonDataKinds.Email.DATA);
-        dbMap.put("emails.value", ContactsContract.CommonDataKinds.Email.DATA);
-        dbMap.put("addresses", ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS);
-        dbMap.put("addresses.formatted", ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS);
-        dbMap.put("addresses.streetAddress", ContactsContract.CommonDataKinds.StructuredPostal.STREET);
-        dbMap.put("addresses.locality", ContactsContract.CommonDataKinds.StructuredPostal.CITY);
-        dbMap.put("addresses.region", ContactsContract.CommonDataKinds.StructuredPostal.REGION);
-        dbMap.put("addresses.postalCode", ContactsContract.CommonDataKinds.StructuredPostal.POSTCODE);
-        dbMap.put("addresses.country", ContactsContract.CommonDataKinds.StructuredPostal.COUNTRY);
-        dbMap.put("ims", ContactsContract.CommonDataKinds.Im.DATA);
-        dbMap.put("ims.value", ContactsContract.CommonDataKinds.Im.DATA);
-        dbMap.put("organizations", ContactsContract.CommonDataKinds.Organization.COMPANY);
-        dbMap.put("organizations.name", ContactsContract.CommonDataKinds.Organization.COMPANY);
-        dbMap.put("organizations.department", ContactsContract.CommonDataKinds.Organization.DEPARTMENT);
-        dbMap.put("organizations.title", ContactsContract.CommonDataKinds.Organization.TITLE);
-        dbMap.put("birthday", ContactsContract.CommonDataKinds.Event.CONTENT_ITEM_TYPE);
-        dbMap.put("note", ContactsContract.CommonDataKinds.Note.NOTE);
-        dbMap.put("photos.value", ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE);
-        //dbMap.put("categories.value", null);
-        dbMap.put("urls", ContactsContract.CommonDataKinds.Website.URL);
-        dbMap.put("urls.value", ContactsContract.CommonDataKinds.Website.URL);
-    }
-
-    /**
-     * Create an contact accessor.
-     */
-    public ContactAccessorSdk5(WebView view, CordovaInterface context) {
-        mApp = context;
-        mView = view;
-    }
-
-    /**
-     * This method takes the fields required and search options in order to produce an
-     * array of contacts that matches the criteria provided.
-     * @param fields an array of items to be used as search criteria
-     * @param options that can be applied to contact searching
-     * @return an array of contacts
-     */
-    @Override
-    public JSONArray search(JSONArray fields, JSONObject options) {
-        // Get the find options
-        String searchTerm = "";
-        int limit = Integer.MAX_VALUE;
-        boolean multiple = true;
-
-        if (options != null) {
-            searchTerm = options.optString("filter");
-            if (searchTerm.length() == 0) {
-                searchTerm = "%";
-            }
-            else {
-                searchTerm = "%" + searchTerm + "%";
-            }
-            
-            try {
-                multiple = options.getBoolean("multiple");
-                if (!multiple) {
-                    limit = 1;
-                }
-            } catch (JSONException e) {
-                // Multiple was not specified so we assume the default is true.
-            }
-        }
-        else {
-            searchTerm = "%";
-        }
-        
-
-        //Log.d(LOG_TAG, "Search Term = " + searchTerm);
-        //Log.d(LOG_TAG, "Field Length = " + fields.length());
-        //Log.d(LOG_TAG, "Fields = " + fields.toString());
-
-        // Loop through the fields the user provided to see what data should be returned.
-        HashMap<String, Boolean> populate = buildPopulationSet(fields);
-
-        // Build the ugly where clause and where arguments for one big query.
-        WhereOptions whereOptions = buildWhereClause(fields, searchTerm);
-
-        // Get all the id's where the search term matches the fields passed in.
-        Cursor idCursor = mApp.getActivity().getContentResolver().query(ContactsContract.Data.CONTENT_URI,
-                new String[] { ContactsContract.Data.CONTACT_ID },
-                whereOptions.getWhere(),
-                whereOptions.getWhereArgs(),
-                ContactsContract.Data.CONTACT_ID + " ASC");
-
-        // Create a set of unique ids
-        Set<String> contactIds = new HashSet<String>();
-        int idColumn = -1;
-        while (idCursor.moveToNext()) {
-            if (idColumn < 0) {
-                idColumn = idCursor.getColumnIndex(ContactsContract.Data.CONTACT_ID);
-            }
-            contactIds.add(idCursor.getString(idColumn));
-        }
-        idCursor.close();
-
-        // Build a query that only looks at ids
-        WhereOptions idOptions = buildIdClause(contactIds, searchTerm);
-
-        // Determine which columns we should be fetching.
-        HashSet<String> columnsToFetch = new HashSet<String>();
-        columnsToFetch.add(ContactsContract.Data.CONTACT_ID);
-        columnsToFetch.add(ContactsContract.Data.RAW_CONTACT_ID);
-        columnsToFetch.add(ContactsContract.Data.MIMETYPE);
-        
-        if (isRequired("displayName", populate)) {
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME);            
-        }
-        if (isRequired("name", populate)) {
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredName.MIDDLE_NAME);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredName.PREFIX);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredName.SUFFIX);
-        }
-        if (isRequired("phoneNumbers", populate)) {
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Phone._ID);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Phone.NUMBER);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Phone.TYPE);
-        }
-        if (isRequired("emails", populate)) {
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Email._ID);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Email.DATA);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Email.TYPE);
-        }
-        if (isRequired("addresses", populate)) {
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredPostal._ID);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Organization.TYPE);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredPostal.STREET);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredPostal.CITY);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredPostal.REGION);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredPostal.POSTCODE);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.StructuredPostal.COUNTRY);
-        }
-        if (isRequired("organizations", populate)) {
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Organization._ID);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Organization.TYPE);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Organization.DEPARTMENT);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Organization.COMPANY);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Organization.TITLE);
-        }
-        if (isRequired("ims", populate)) {
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Im._ID);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Im.DATA);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Im.TYPE);
-        }
-        if (isRequired("note", populate)) {
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Note.NOTE);
-        }
-        if (isRequired("nickname", populate)) {
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Nickname.NAME);
-        }
-        if (isRequired("urls", populate)) {
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Website._ID);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Website.URL);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Website.TYPE);
-        }
-        if (isRequired("birthday", populate)) {
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Event.START_DATE);
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Event.TYPE);
-        }
-        if (isRequired("photos", populate)) {
-            columnsToFetch.add(ContactsContract.CommonDataKinds.Photo._ID);
-        }
-        
-        // Do the id query
-        Cursor c = mApp.getActivity().getContentResolver().query(ContactsContract.Data.CONTENT_URI,
-                columnsToFetch.toArray(new String[] {}),
-                idOptions.getWhere(),
-                idOptions.getWhereArgs(),
-                ContactsContract.Data.CONTACT_ID + " ASC");
-
-        JSONArray contacts = populateContactArray(limit, populate, c);
-        return contacts;
-    }
-
-    /**
-     * A special search that finds one contact by id
-     *
-     * @param id   contact to find by id
-     * @return     a JSONObject representing the contact
-     * @throws JSONException
-     */
-    public JSONObject getContactById(String id) throws JSONException {
-        // Do the id query
-        Cursor c = mApp.getActivity().getContentResolver().query(ContactsContract.Data.CONTENT_URI,
-                null,
-                ContactsContract.Data.CONTACT_ID + " = ? ",
-                new String[] { id },
-                ContactsContract.Data.CONTACT_ID + " ASC");
-
-        JSONArray fields = new JSONArray();
-        fields.put("*");
-
-        HashMap<String, Boolean> populate = buildPopulationSet(fields);
-
-        JSONArray contacts = populateContactArray(1, populate, c);
-
-        if (contacts.length() == 1) {
-            return contacts.getJSONObject(0);
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Creates an array of contacts from the cursor you pass in
-     *
-     * @param limit        max number of contacts for the array
-     * @param populate     whether or not you should populate a certain value
-     * @param c            the cursor
-     * @return             a JSONArray of contacts
-     */
-    private JSONArray populateContactArray(int limit,
-            HashMap<String, Boolean> populate, Cursor c) {
-
-        String contactId = "";
-        String rawId = "";
-        String oldContactId = "";
-        boolean newContact = true;
-        String mimetype = "";
-
-        JSONArray contacts = new JSONArray();
-        JSONObject contact = new JSONObject();
-        JSONArray organizations = new JSONArray();
-        JSONArray addresses = new JSONArray();
-        JSONArray phones = new JSONArray();
-        JSONArray emails = new JSONArray();
-        JSONArray ims = new JSONArray();
-        JSONArray websites = new JSONArray();
-        JSONArray photos = new JSONArray();
-
-        // Column indices
-        int colContactId = c.getColumnIndex(ContactsContract.Data.CONTACT_ID);
-        int colRawContactId = c.getColumnIndex(ContactsContract.Data.RAW_CONTACT_ID);
-        int colMimetype = c.getColumnIndex(ContactsContract.Data.MIMETYPE);
-        int colDisplayName = c.getColumnIndex(ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME);
-        int colNote = c.getColumnIndex(ContactsContract.CommonDataKinds.Note.NOTE);
-        int colNickname = c.getColumnIndex(ContactsContract.CommonDataKinds.Nickname.NAME);
-        int colBirthday = c.getColumnIndex(ContactsContract.CommonDataKinds.Event.START_DATE);
-        int colEventType = c.getColumnIndex(ContactsContract.CommonDataKinds.Event.TYPE);
-
-        if (c.getCount() > 0) {
-            while (c.moveToNext() && (contacts.length() <= (limit - 1))) {
-                try {
-                    contactId = c.getString(colContactId);
-                    rawId = c.getString(colRawContactId);
-
-                    // If we are in the first row set the oldContactId
-                    if (c.getPosition() == 0) {
-                        oldContactId = contactId;
-                    }
-
-                    // When the contact ID changes we need to push the Contact object
-                    // to the array of contacts and create new objects.
-                    if (!oldContactId.equals(contactId)) {
-                        // Populate the Contact object with it's arrays
-                        // and push the contact into the contacts array
-                        contacts.put(populateContact(contact, organizations, addresses, phones,
-                                emails, ims, websites, photos));
-
-                        // Clean up the objects
-                        contact = new JSONObject();
-                        organizations = new JSONArray();
-                        addresses = new JSONArray();
-                        phones = new JSONArray();
-                        emails = new JSONArray();
-                        ims = new JSONArray();
-                        websites = new JSONArray();
-                        photos = new JSONArray();
-
-                        // Set newContact to true as we are starting to populate a new contact
-                        newContact = true;
-                    }
-
-                    // When we detect a new contact set the ID and display name.
-                    // These fields are available in every row in the result set returned.
-                    if (newContact) {
-                        newContact = false;
-                        contact.put("id", contactId);
-                        contact.put("rawId", rawId);
-                    }
-
-                    // Grab the mimetype of the current row as it will be used in a lot of comparisons
-                    mimetype = c.getString(colMimetype);
-                    
-                    if (mimetype.equals(ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE)) {
-                        contact.put("displayName", c.getString(colDisplayName));
-                    }
-
-                    if (mimetype.equals(ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE)
-                            && isRequired("name", populate)) {
-                        contact.put("name", nameQuery(c));
-                    }
-                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE)
-                            && isRequired("phoneNumbers", populate)) {
-                        phones.put(phoneQuery(c));
-                    }
-                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE)
-                            && isRequired("emails", populate)) {
-                        emails.put(emailQuery(c));
-                    }
-                    else if (mimetype.equals(ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE)
-                            && isRequired("addresses", populate)) {
-                        addresses.put(addressQuery(c));
-                    }
-                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE)
-                            && isRequired("organizations", populate)) {
-                        organizations.put(organizationQuery(c));
-                    }
-                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE)
-                            && isRequired("ims", populate)) {
-                        ims.put(imQuery(c));
-                    }
-                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Note.CONTENT_ITEM_TYPE)
-                            && isRequired("note", populate)) {
-                        contact.put("note", c.getString(colNote));
-                    }
-                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Nickname.CONTENT_ITEM_TYPE)
-                            && isRequired("nickname", populate)) {
-                        contact.put("nickname", c.getString(colNickname));
-                    }
-                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Website.CONTENT_ITEM_TYPE)
-                            && isRequired("urls", populate)) {
-                        websites.put(websiteQuery(c));
-                    }
-                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Event.CONTENT_ITEM_TYPE)) {
-                        if (isRequired("birthday", populate) &&
-                                ContactsContract.CommonDataKinds.Event.TYPE_BIRTHDAY == c.getInt(colEventType)) {
-                            contact.put("birthday", c.getString(colBirthday));
-                        }
-                    }
-                    else if (mimetype.equals(ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE)
-                            && isRequired("photos", populate)) {
-                        photos.put(photoQuery(c, contactId));
-                    }
-                } catch (JSONException e) {
-                    Log.e(LOG_TAG, e.getMessage(), e);
-                }
-
-                // Set the old contact ID
-                oldContactId = contactId;
-
-            }
-            
-            // Push the last contact into the contacts array
-            if (contacts.length() < limit) {
-                contacts.put(populateContact(contact, organizations, addresses, phones,
-                        emails, ims, websites, photos));
-            }
-        }
-        c.close();
-        return contacts;
-    }
-
-    /**
-     * Builds a where clause all all the ids passed into the method
-     * @param contactIds a set of unique contact ids
-     * @param searchTerm what to search for
-     * @return an object containing the selection and selection args
-     */
-    private WhereOptions buildIdClause(Set<String> contactIds, String searchTerm) {
-        WhereOptions options = new WhereOptions();
-
-        // If the user is searching for every contact then short circuit the method
-        // and return a shorter where clause to be searched.
-        if (searchTerm.equals("%")) {
-            options.setWhere("(" + ContactsContract.Data.CONTACT_ID + " LIKE ? )");
-            options.setWhereArgs(new String[] { searchTerm });
-            return options;
-        }
-
-        // This clause means that there are specific ID's to be populated
-        Iterator<String> it = contactIds.iterator();
-        StringBuffer buffer = new StringBuffer("(");
-
-        while (it.hasNext()) {
-            buffer.append("'" + it.next() + "'");
-            if (it.hasNext()) {
-                buffer.append(",");
-            }
-        }
-        buffer.append(")");
-
-        options.setWhere(ContactsContract.Data.CONTACT_ID + " IN " + buffer.toString());
-        options.setWhereArgs(null);
-
-        return options;
-    }
-
-    /**
-     * Create a new contact using a JSONObject to hold all the data.
-     * @param contact
-     * @param organizations array of organizations
-     * @param addresses array of addresses
-     * @param phones array of phones
-     * @param emails array of emails
-     * @param ims array of instant messenger addresses
-     * @param websites array of websites
-     * @param photos
-     * @return
-     */
-    private JSONObject populateContact(JSONObject contact, JSONArray organizations,
-            JSONArray addresses, JSONArray phones, JSONArray emails,
-            JSONArray ims, JSONArray websites, JSONArray photos) {
-        try {
-            // Only return the array if it has at least one entry
-            if (organizations.length() > 0) {
-                contact.put("organizations", organizations);
-            }
-            if (addresses.length() > 0) {
-                contact.put("addresses", addresses);
-            }
-            if (phones.length() > 0) {
-                contact.put("phoneNumbers", phones);
-            }
-            if (emails.length() > 0) {
-                contact.put("emails", emails);
-            }
-            if (ims.length() > 0) {
-                contact.put("ims", ims);
-            }
-            if (websites.length() > 0) {
-                contact.put("urls", websites);
-            }
-            if (photos.length() > 0) {
-                contact.put("photos", photos);
-            }
-        } catch (JSONException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        }
-        return contact;
-    }
-
-  /**
-   * Take the search criteria passed into the method and create a SQL WHERE clause.
-   * @param fields the properties to search against
-   * @param searchTerm the string to search for
-   * @return an object containing the selection and selection args
-   */
-  private WhereOptions buildWhereClause(JSONArray fields, String searchTerm) {
-
-    ArrayList<String> where = new ArrayList<String>();
-    ArrayList<String> whereArgs = new ArrayList<String>();
-
-    WhereOptions options = new WhereOptions();
-
-        /*
-         * Special case where the user wants all fields returned
-         */
-        if (isWildCardSearch(fields)) {
-            // Get all contacts with all properties
-            if ("%".equals(searchTerm)) {
-                options.setWhere("(" + ContactsContract.Contacts.DISPLAY_NAME + " LIKE ? )");
-                options.setWhereArgs(new String[] { searchTerm });
-                return options;
-            } else {
-                // Get all contacts that match the filter but return all properties
-                where.add("(" + dbMap.get("displayName") + " LIKE ? )");
-                whereArgs.add(searchTerm);
-                where.add("(" + dbMap.get("name") + " LIKE ? AND "
-                        + ContactsContract.Data.MIMETYPE + " = ? )");
-                whereArgs.add(searchTerm);
-                whereArgs.add(ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE);
-                where.add("(" + dbMap.get("nickname") + " LIKE ? AND "
-                        + ContactsContract.Data.MIMETYPE + " = ? )");
-                whereArgs.add(searchTerm);
-                whereArgs.add(ContactsContract.CommonDataKinds.Nickname.CONTENT_ITEM_TYPE);
-                where.add("(" + dbMap.get("phoneNumbers") + " LIKE ? AND "
-                        + ContactsContract.Data.MIMETYPE + " = ? )");
-                whereArgs.add(searchTerm);
-                whereArgs.add(ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE);
-                where.add("(" + dbMap.get("emails") + " LIKE ? AND "
-                        + ContactsContract.Data.MIMETYPE + " = ? )");
-                whereArgs.add(searchTerm);
-                whereArgs.add(ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE);
-                where.add("(" + dbMap.get("addresses") + " LIKE ? AND "
-                        + ContactsContract.Data.MIMETYPE + " = ? )");
-                whereArgs.add(searchTerm);
-                whereArgs.add(ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE);
-                where.add("(" + dbMap.get("ims") + " LIKE ? AND "
-                        + ContactsContract.Data.MIMETYPE + " = ? )");
-                whereArgs.add(searchTerm);
-                whereArgs.add(ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE);
-                where.add("(" + dbMap.get("organizations") + " LIKE ? AND "
-                        + ContactsContract.Data.MIMETYPE + " = ? )");
-                whereArgs.add(searchTerm);
-                whereArgs.add(ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE);
-                where.add("(" + dbMap.get("note") + " LIKE ? AND "
-                        + ContactsContract.Data.MIMETYPE + " = ? )");
-                whereArgs.add(searchTerm);
-                whereArgs.add(ContactsContract.CommonDataKinds.Note.CONTENT_ITEM_TYPE);
-                where.add("(" + dbMap.get("urls") + " LIKE ? AND "
-                        + ContactsContract.Data.MIMETYPE + " = ? )");
-                whereArgs.add(searchTerm);
-                whereArgs.add(ContactsContract.CommonDataKinds.Website.CONTENT_ITEM_TYPE);
-            }
-        }
-
-        /*
-         * Special case for when the user wants all the contacts but
-         */
-        if ("%".equals(searchTerm)) {
-            options.setWhere("(" + ContactsContract.Contacts.DISPLAY_NAME + " LIKE ? )");
-            options.setWhereArgs(new String[] { searchTerm });
-            return options;
-        }
-
-        String key;
-        try {
-            //Log.d(LOG_TAG, "How many fields do we have = " + fields.length());
-            for (int i = 0; i < fields.length(); i++) {
-                key = fields.getString(i);
-
-                if (key.equals("id")) {
-                    where.add("(" + dbMap.get(key) + " = ? )");
-                    whereArgs.add(searchTerm.substring(1, searchTerm.length() - 1));
-                }
-                else if (key.startsWith("displayName")) {
-                    where.add("(" + dbMap.get(key) + " LIKE ? )");
-                    whereArgs.add(searchTerm);
-                }
-                else if (key.startsWith("name")) {
-                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
-                            + ContactsContract.Data.MIMETYPE + " = ? )");
-                    whereArgs.add(searchTerm);
-                    whereArgs.add(ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE);
-                }
-                else if (key.startsWith("nickname")) {
-                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
-                            + ContactsContract.Data.MIMETYPE + " = ? )");
-                    whereArgs.add(searchTerm);
-                    whereArgs.add(ContactsContract.CommonDataKinds.Nickname.CONTENT_ITEM_TYPE);
-                }
-                else if (key.startsWith("phoneNumbers")) {
-                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
-                            + ContactsContract.Data.MIMETYPE + " = ? )");
-                    whereArgs.add(searchTerm);
-                    whereArgs.add(ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE);
-                }
-                else if (key.startsWith("emails")) {
-                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
-                            + ContactsContract.Data.MIMETYPE + " = ? )");
-                    whereArgs.add(searchTerm);
-                    whereArgs.add(ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE);
-                }
-                else if (key.startsWith("addresses")) {
-                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
-                            + ContactsContract.Data.MIMETYPE + " = ? )");
-                    whereArgs.add(searchTerm);
-                    whereArgs.add(ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE);
-                }
-                else if (key.startsWith("ims")) {
-                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
-                            + ContactsContract.Data.MIMETYPE + " = ? )");
-                    whereArgs.add(searchTerm);
-                    whereArgs.add(ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE);
-                }
-                else if (key.startsWith("organizations")) {
-                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
-                            + ContactsContract.Data.MIMETYPE + " = ? )");
-                    whereArgs.add(searchTerm);
-                    whereArgs.add(ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE);
-                }
-                //        else if (key.startsWith("birthday")) {
-//          where.add("(" + dbMap.get(key) + " LIKE ? AND "
-//              + ContactsContract.Data.MIMETYPE + " = ? )");
-//        }
-                else if (key.startsWith("note")) {
-                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
-                            + ContactsContract.Data.MIMETYPE + " = ? )");
-                    whereArgs.add(searchTerm);
-                    whereArgs.add(ContactsContract.CommonDataKinds.Note.CONTENT_ITEM_TYPE);
-                }
-                else if (key.startsWith("urls")) {
-                    where.add("(" + dbMap.get(key) + " LIKE ? AND "
-                            + ContactsContract.Data.MIMETYPE + " = ? )");
-                    whereArgs.add(searchTerm);
-                    whereArgs.add(ContactsContract.CommonDataKinds.Website.CONTENT_ITEM_TYPE);
-                }
-            }
-        } catch (JSONException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        }
-
-        // Creating the where string
-        StringBuffer selection = new StringBuffer();
-        for (int i = 0; i < where.size(); i++) {
-            selection.append(where.get(i));
-            if (i != (where.size() - 1)) {
-                selection.append(" OR ");
-            }
-        }
-        options.setWhere(selection.toString());
-
-        // Creating the where args array
-        String[] selectionArgs = new String[whereArgs.size()];
-        for (int i = 0; i < whereArgs.size(); i++) {
-            selectionArgs[i] = whereArgs.get(i);
-        }
-        options.setWhereArgs(selectionArgs);
-
-        return options;
-    }
-
-    /**
-     * If the user passes in the '*' wildcard character for search then they want all fields for each contact
-     *
-     * @param fields
-     * @return true if wildcard search requested, false otherwise
-     */
-    private boolean isWildCardSearch(JSONArray fields) {
-        // Only do a wildcard search if we are passed ["*"]
-        if (fields.length() == 1) {
-            try {
-                if ("*".equals(fields.getString(0))) {
-                    return true;
-                }
-            } catch (JSONException e) {
-                return false;
-            }
-        }
-        return false;
-    }
-
-    /**
-    * Create a ContactOrganization JSONObject
-    * @param cursor the current database row
-    * @return a JSONObject representing a ContactOrganization
-    */
-    private JSONObject organizationQuery(Cursor cursor) {
-        JSONObject organization = new JSONObject();
-        try {
-            organization.put("id", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Organization._ID)));
-            organization.put("pref", false); // Android does not store pref attribute
-            organization.put("type", getOrgType(cursor.getInt(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Organization.TYPE))));
-            organization.put("department", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Organization.DEPARTMENT)));
-            organization.put("name", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Organization.COMPANY)));
-            organization.put("title", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Organization.TITLE)));
-        } catch (JSONException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        }
-        return organization;
-    }
-
-    /**
-     * Create a ContactAddress JSONObject
-     * @param cursor the current database row
-     * @return a JSONObject representing a ContactAddress
-     */
-    private JSONObject addressQuery(Cursor cursor) {
-        JSONObject address = new JSONObject();
-        try {
-            address.put("id", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal._ID)));
-            address.put("pref", false); // Android does not store pref attribute
-            address.put("type", getAddressType(cursor.getInt(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Organization.TYPE))));
-            address.put("formatted", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS)));
-            address.put("streetAddress", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal.STREET)));
-            address.put("locality", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal.CITY)));
-            address.put("region", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal.REGION)));
-            address.put("postalCode", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal.POSTCODE)));
-            address.put("country", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal.COUNTRY)));
-        } catch (JSONException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        }
-        return address;
-    }
-
-    /**
-     * Create a ContactName JSONObject
-     * @param cursor the current database row
-     * @return a JSONObject representing a ContactName
-     */
-    private JSONObject nameQuery(Cursor cursor) {
-        JSONObject contactName = new JSONObject();
-        try {
-            String familyName = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME));
-            String givenName = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME));
-            String middleName = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredName.MIDDLE_NAME));
-            String honorificPrefix = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredName.PREFIX));
-            String honorificSuffix = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredName.SUFFIX));
-
-            // Create the formatted name
-            StringBuffer formatted = new StringBuffer("");
-            if (honorificPrefix != null) {
-                formatted.append(honorificPrefix + " ");
-            }
-            if (givenName != null) {
-                formatted.append(givenName + " ");
-            }
-            if (middleName != null) {
-                formatted.append(middleName + " ");
-            }
-            if (familyName != null) {
-                formatted.append(familyName);
-            }
-            if (honorificSuffix != null) {
-                formatted.append(" " + honorificSuffix);
-            }
-
-            contactName.put("familyName", familyName);
-            contactName.put("givenName", givenName);
-            contactName.put("middleName", middleName);
-            contactName.put("honorificPrefix", honorificPrefix);
-            contactName.put("honorificSuffix", honorificSuffix);
-            contactName.put("formatted", formatted);
-        } catch (JSONException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        }
-        return contactName;
-    }
-
-    /**
-     * Create a ContactField JSONObject
-     * @param cursor the current database row
-     * @return a JSONObject representing a ContactField
-     */
-    private JSONObject phoneQuery(Cursor cursor) {
-        JSONObject phoneNumber = new JSONObject();
-        try {
-            phoneNumber.put("id", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone._ID)));
-            phoneNumber.put("pref", false); // Android does not store pref attribute
-            phoneNumber.put("value", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER)));
-            phoneNumber.put("type", getPhoneType(cursor.getInt(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.TYPE))));
-        } catch (JSONException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        } catch (Exception excp) {
-            Log.e(LOG_TAG, excp.getMessage(), excp);
-        }
-        return phoneNumber;
-    }
-
-    /**
-     * Create a ContactField JSONObject
-     * @param cursor the current database row
-     * @return a JSONObject representing a ContactField
-     */
-    private JSONObject emailQuery(Cursor cursor) {
-        JSONObject email = new JSONObject();
-        try {
-            email.put("id", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Email._ID)));
-            email.put("pref", false); // Android does not store pref attribute
-            email.put("value", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Email.DATA)));
-            email.put("type", getContactType(cursor.getInt(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Email.TYPE))));
-        } catch (JSONException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        }
-        return email;
-    }
-
-    /**
-     * Create a ContactField JSONObject
-     * @param cursor the current database row
-     * @return a JSONObject representing a ContactField
-     */
-    private JSONObject imQuery(Cursor cursor) {
-        JSONObject im = new JSONObject();
-        try {
-            im.put("id", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Im._ID)));
-            im.put("pref", false); // Android does not store pref attribute
-            im.put("value", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Im.DATA)));
-            im.put("type", getImType(cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Im.PROTOCOL))));
-        } catch (JSONException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        }
-        return im;
-    }
-
-    /**
-     * Create a ContactField JSONObject
-     * @param cursor the current database row
-     * @return a JSONObject representing a ContactField
-     */
-    private JSONObject websiteQuery(Cursor cursor) {
-        JSONObject website = new JSONObject();
-        try {
-            website.put("id", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Website._ID)));
-            website.put("pref", false); // Android does not store pref attribute
-            website.put("value", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Website.URL)));
-            website.put("type", getContactType(cursor.getInt(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Website.TYPE))));
-        } catch (JSONException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        }
-        return website;
-    }
-
-    /**
-     * Create a ContactField JSONObject
-     * @param contactId
-     * @return a JSONObject representing a ContactField
-     */
-    private JSONObject photoQuery(Cursor cursor, String contactId) {
-        JSONObject photo = new JSONObject();
-        try {
-            photo.put("id", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Photo._ID)));
-            photo.put("pref", false);
-            photo.put("type", "url");
-            Uri person = ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI, (new Long(contactId)));
-            Uri photoUri = Uri.withAppendedPath(person, ContactsContract.Contacts.Photo.CONTENT_DIRECTORY);
-            photo.put("value", photoUri.toString());
-        } catch (JSONException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        }
-        return photo;
-    }
-
-    @Override
-    /**
-     * This method will save a contact object into the devices contacts database.
-     *
-     * @param contact the contact to be saved.
-     * @returns the id if the contact is successfully saved, null otherwise.
-     */
-    public String save(JSONObject contact) {
-        AccountManager mgr = AccountManager.get(mApp.getActivity());
-        Account[] accounts = mgr.getAccounts();
-        String accountName = null;
-        String accountType = null;
-
-        if (accounts.length == 1) {
-            accountName = accounts[0].name;
-            accountType = accounts[0].type;
-        }
-        else if (accounts.length > 1) {
-            for (Account a : accounts) {
-                if (a.type.contains("eas") && a.name.matches(EMAIL_REGEXP)) /*Exchange ActiveSync*/{
-                    accountName = a.name;
-                    accountType = a.type;
-                    break;
-                }
-            }
-            if (accountName == null) {
-                for (Account a : accounts) {
-                    if (a.type.contains("com.google") && a.name.matches(EMAIL_REGEXP)) /*Google sync provider*/{
-                        accountName = a.name;
-                        accountType = a.type;
-                        break;
-                    }
-                }
-            }
-            if (accountName == null) {
-                for (Account a : accounts) {
-                    if (a.name.matches(EMAIL_REGEXP)) /*Last resort, just look for an email address...*/{
-                        accountName = a.name;
-                        accountType = a.type;
-                        break;
-                    }
-                }
-            }
-        }
-
-        String id = getJsonString(contact, "id");
-        if (id == null) {
-            // Create new contact
-            return createNewContact(contact, accountType, accountName);
-        } else {
-            // Modify existing contact
-            return modifyContact(id, contact, accountType, accountName);
-        }
-    }
-
-    /**
-     * Creates a new contact and stores it in the database
-     *
-     * @param id the raw contact id which is required for linking items to the contact
-     * @param contact the contact to be saved
-     * @param account the account to be saved under
-     */
-    private String modifyContact(String id, JSONObject contact, String accountType, String accountName) {
-        // Get the RAW_CONTACT_ID which is needed to insert new values in an already existing contact.
-        // But not needed to update existing values.
-        int rawId = (new Integer(getJsonString(contact, "rawId"))).intValue();
-
-        // Create a list of attributes to add to the contact database
-        ArrayList<ContentProviderOperation> ops = new ArrayList<ContentProviderOperation>();
-
-        //Add contact type
-        ops.add(ContentProviderOperation.newUpdate(ContactsContract.RawContacts.CONTENT_URI)
-                .withValue(ContactsContract.RawContacts.ACCOUNT_TYPE, accountType)
-                .withValue(ContactsContract.RawContacts.ACCOUNT_NAME, accountName)
-                .build());
-
-        // Modify name
-        JSONObject name;
-        try {
-            String displayName = getJsonString(contact, "displayName");
-            name = contact.getJSONObject("name");
-            if (displayName != null || name != null) {
-                ContentProviderOperation.Builder builder = ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
-                        .withSelection(ContactsContract.Data.CONTACT_ID + "=? AND " +
-                                ContactsContract.Data.MIMETYPE + "=?",
-                                new String[] { id, ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE });
-
-                if (displayName != null) {
-                    builder.withValue(ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME, displayName);
-                }
-
-                String familyName = getJsonString(name, "familyName");
-                if (familyName != null) {
-                    builder.withValue(ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME, familyName);
-                }
-                String middleName = getJsonString(name, "middleName");
-                if (middleName != null) {
-                    builder.withValue(ContactsContract.CommonDataKinds.StructuredName.MIDDLE_NAME, middleName);
-                }
-                String givenName = getJsonString(name, "givenName");
-                if (givenName != null) {
-                    builder.withValue(ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME, givenName);
-                }
-                String honorificPrefix = getJsonString(name, "honorificPrefix");
-                if (honorificPrefix != null) {
-                    builder.withValue(ContactsContract.CommonDataKinds.StructuredName.PREFIX, honorificPrefix);
-                }
-                String honorificSuffix = getJsonString(name, "honorificSuffix");
-                if (honorificSuffix != null) {
-                    builder.withValue(ContactsContract.CommonDataKinds.StructuredName.SUFFIX, honorificSuffix);
-                }
-
-                ops.add(builder.build());
-            }
-        } catch (JSONException e1) {
-            Log.d(LOG_TAG, "Could not get name");
-        }
-
-        // Modify phone numbers
-        JSONArray phones = null;
-        try {
-            phones = contact.getJSONArray("phoneNumbers");
-            if (phones != null) {
-                // Delete all the phones
-                if (phones.length() == 0) {
-                    ops.add(ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI)
-                            .withSelection(ContactsContract.Data.RAW_CONTACT_ID + "=? AND " +
-                                    ContactsContract.Data.MIMETYPE + "=?",
-                                    new String[] { "" + rawId, ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE })
-                            .build());
-                }
-                // Modify or add a phone
-                else {
-                    for (int i = 0; i < phones.length(); i++) {
-                        JSONObject phone = (JSONObject) phones.get(i);
-                        String phoneId = getJsonString(phone, "id");
-                        // This is a new phone so do a DB insert
-                        if (phoneId == null) {
-                            ContentValues contentValues = new ContentValues();
-                            contentValues.put(ContactsContract.Data.RAW_CONTACT_ID, rawId);
-                            contentValues.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE);
-                            contentValues.put(ContactsContract.CommonDataKinds.Phone.NUMBER, getJsonString(phone, "value"));
-                            contentValues.put(ContactsContract.CommonDataKinds.Phone.TYPE, getPhoneType(getJsonString(phone, "type")));
-
-                            ops.add(ContentProviderOperation.newInsert(
-                                    ContactsContract.Data.CONTENT_URI).withValues(contentValues).build());
-                        }
-                        // This is an existing phone so do a DB update
-                        else {
-                            ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
-                                    .withSelection(ContactsContract.CommonDataKinds.Phone._ID + "=? AND " +
-                                            ContactsContract.Data.MIMETYPE + "=?",
-                                            new String[] { phoneId, ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE })
-                                    .withValue(ContactsContract.CommonDataKinds.Phone.NUMBER, getJsonString(phone, "value"))
-                                    .withValue(ContactsContract.CommonDataKinds.Phone.TYPE, getPhoneType(getJsonString(phone, "type")))
-                                    .build());
-                        }
-                    }
-                }
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get phone numbers");
-        }
-
-        // Modify emails
-        JSONArray emails = null;
-        try {
-            emails = contact.getJSONArray("emails");
-            if (emails != null) {
-                // Delete all the emails
-                if (emails.length() == 0) {
-                    ops.add(ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI)
-                            .withSelection(ContactsContract.Data.RAW_CONTACT_ID + "=? AND " +
-                                    ContactsContract.Data.MIMETYPE + "=?",
-                                    new String[] { "" + rawId, ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE })
-                            .build());
-                }
-                // Modify or add a email
-                else {
-                    for (int i = 0; i < emails.length(); i++) {
-                        JSONObject email = (JSONObject) emails.get(i);
-                        String emailId = getJsonString(email, "id");
-                        // This is a new email so do a DB insert
-                        if (emailId == null) {
-                            ContentValues contentValues = new ContentValues();
-                            contentValues.put(ContactsContract.Data.RAW_CONTACT_ID, rawId);
-                            contentValues.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE);
-                            contentValues.put(ContactsContract.CommonDataKinds.Email.DATA, getJsonString(email, "value"));
-                            contentValues.put(ContactsContract.CommonDataKinds.Email.TYPE, getContactType(getJsonString(email, "type")));
-
-                            ops.add(ContentProviderOperation.newInsert(
-                                    ContactsContract.Data.CONTENT_URI).withValues(contentValues).build());
-                        }
-                        // This is an existing email so do a DB update
-                        else {
-                        	String emailValue=getJsonString(email, "value");
-                        	if(!emailValue.isEmpty()) {
-                                ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
-                                    .withSelection(ContactsContract.CommonDataKinds.Email._ID + "=? AND " +
-                                            ContactsContract.Data.MIMETYPE + "=?",
-                                            new String[] { emailId, ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE })
-                                    .withValue(ContactsContract.CommonDataKinds.Email.DATA, getJsonString(email, "value"))
-                                    .withValue(ContactsContract.CommonDataKinds.Email.TYPE, getContactType(getJsonString(email, "type")))
-                                    .build());
-                        	} else {
-                                ops.add(ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI)
-                                        .withSelection(ContactsContract.CommonDataKinds.Email._ID + "=? AND " +
-                                                ContactsContract.Data.MIMETYPE + "=?",
-                                                new String[] { emailId, ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE })
-                                        .build());
-                        	}
-                        }
-                    }
-                }
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get emails");
-        }
-
-        // Modify addresses
-        JSONArray addresses = null;
-        try {
-            addresses = contact.getJSONArray("addresses");
-            if (addresses != null) {
-                // Delete all the addresses
-                if (addresses.length() == 0) {
-                    ops.add(ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI)
-                            .withSelection(ContactsContract.Data.RAW_CONTACT_ID + "=? AND " +
-                                    ContactsContract.Data.MIMETYPE + "=?",
-                                    new String[] { "" + rawId, ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE })
-                            .build());
-                }
-                // Modify or add a address
-                else {
-                    for (int i = 0; i < addresses.length(); i++) {
-                        JSONObject address = (JSONObject) addresses.get(i);
-                        String addressId = getJsonString(address, "id");
-                        // This is a new address so do a DB insert
-                        if (addressId == null) {
-                            ContentValues contentValues = new ContentValues();
-                            contentValues.put(ContactsContract.Data.RAW_CONTACT_ID, rawId);
-                            contentValues.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE);
-                            contentValues.put(ContactsContract.CommonDataKinds.StructuredPostal.TYPE, getAddressType(getJsonString(address, "type")));
-                            contentValues.put(ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS, getJsonString(address, "formatted"));
-                            contentValues.put(ContactsContract.CommonDataKinds.StructuredPostal.STREET, getJsonString(address, "streetAddress"));
-                            contentValues.put(ContactsContract.CommonDataKinds.StructuredPostal.CITY, getJsonString(address, "locality"));
-                            contentValues.put(ContactsContract.CommonDataKinds.StructuredPostal.REGION, getJsonString(address, "region"));
-                            contentValues.put(ContactsContract.CommonDataKinds.StructuredPostal.POSTCODE, getJsonString(address, "postalCode"));
-                            contentValues.put(ContactsContract.CommonDataKinds.StructuredPostal.COUNTRY, getJsonString(address, "country"));
-
-                            ops.add(ContentProviderOperation.newInsert(
-                                    ContactsContract.Data.CONTENT_URI).withValues(contentValues).build());
-                        }
-                        // This is an existing address so do a DB update
-                        else {
-                            ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
-                                    .withSelection(ContactsContract.CommonDataKinds.StructuredPostal._ID + "=? AND " +
-                                            ContactsContract.Data.MIMETYPE + "=?",
-                                            new String[] { addressId, ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE })
-                                    .withValue(ContactsContract.CommonDataKinds.StructuredPostal.TYPE, getAddressType(getJsonString(address, "type")))
-                                    .withValue(ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS, getJsonString(address, "formatted"))
-                                    .withValue(ContactsContract.CommonDataKinds.StructuredPostal.STREET, getJsonString(address, "streetAddress"))
-                                    .withValue(ContactsContract.CommonDataKinds.StructuredPostal.CITY, getJsonString(address, "locality"))
-                                    .withValue(ContactsContract.CommonDataKinds.StructuredPostal.REGION, getJsonString(address, "region"))
-                                    .withValue(ContactsContract.CommonDataKinds.StructuredPostal.POSTCODE, getJsonString(address, "postalCode"))
-                                    .withValue(ContactsContract.CommonDataKinds.StructuredPostal.COUNTRY, getJsonString(address, "country"))
-                                    .build());
-                        }
-                    }
-                }
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get addresses");
-        }
-
-        // Modify organizations
-        JSONArray organizations = null;
-        try {
-            organizations = contact.getJSONArray("organizations");
-            if (organizations != null) {
-                // Delete all the organizations
-                if (organizations.length() == 0) {
-                    ops.add(ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI)
-                            .withSelection(ContactsContract.Data.RAW_CONTACT_ID + "=? AND " +
-                                    ContactsContract.Data.MIMETYPE + "=?",
-                                    new String[] { "" + rawId, ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE })
-                            .build());
-                }
-                // Modify or add a organization
-                else {
-                    for (int i = 0; i < organizations.length(); i++) {
-                        JSONObject org = (JSONObject) organizations.get(i);
-                        String orgId = getJsonString(org, "id");
-                        // This is a new organization so do a DB insert
-                        if (orgId == null) {
-                            ContentValues contentValues = new ContentValues();
-                            contentValues.put(ContactsContract.Data.RAW_CONTACT_ID, rawId);
-                            contentValues.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE);
-                            contentValues.put(ContactsContract.CommonDataKinds.Organization.TYPE, getOrgType(getJsonString(org, "type")));
-                            contentValues.put(ContactsContract.CommonDataKinds.Organization.DEPARTMENT, getJsonString(org, "department"));
-                            contentValues.put(ContactsContract.CommonDataKinds.Organization.COMPANY, getJsonString(org, "name"));
-                            contentValues.put(ContactsContract.CommonDataKinds.Organization.TITLE, getJsonString(org, "title"));
-
-                            ops.add(ContentProviderOperation.newInsert(
-                                    ContactsContract.Data.CONTENT_URI).withValues(contentValues).build());
-                        }
-                        // This is an existing organization so do a DB update
-                        else {
-                            ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
-                                    .withSelection(ContactsContract.CommonDataKinds.Organization._ID + "=? AND " +
-                                            ContactsContract.Data.MIMETYPE + "=?",
-                                            new String[] { orgId, ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE })
-                                    .withValue(ContactsContract.CommonDataKinds.Organization.TYPE, getOrgType(getJsonString(org, "type")))
-                                    .withValue(ContactsContract.CommonDataKinds.Organization.DEPARTMENT, getJsonString(org, "department"))
-                                    .withValue(ContactsContract.CommonDataKinds.Organization.COMPANY, getJsonString(org, "name"))
-                                    .withValue(ContactsContract.CommonDataKinds.Organization.TITLE, getJsonString(org, "title"))
-                                    .build());
-                        }
-                    }
-                }
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get organizations");
-        }
-
-        // Modify IMs
-        JSONArray ims = null;
-        try {
-            ims = contact.getJSONArray("ims");
-            if (ims != null) {
-                // Delete all the ims
-                if (ims.length() == 0) {
-                    ops.add(ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI)
-                            .withSelection(ContactsContract.Data.RAW_CONTACT_ID + "=? AND " +
-                                    ContactsContract.Data.MIMETYPE + "=?",
-                                    new String[] { "" + rawId, ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE })
-                            .build());
-                }
-                // Modify or add a im
-                else {
-                    for (int i = 0; i < ims.length(); i++) {
-                        JSONObject im = (JSONObject) ims.get(i);
-                        String imId = getJsonString(im, "id");
-                        // This is a new IM so do a DB insert
-                        if (imId == null) {
-                            ContentValues contentValues = new ContentValues();
-                            contentValues.put(ContactsContract.Data.RAW_CONTACT_ID, rawId);
-                            contentValues.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE);
-                            contentValues.put(ContactsContract.CommonDataKinds.Im.DATA, getJsonString(im, "value"));
-                            contentValues.put(ContactsContract.CommonDataKinds.Im.TYPE, getImType(getJsonString(im, "type")));
-
-                            ops.add(ContentProviderOperation.newInsert(
-                                    ContactsContract.Data.CONTENT_URI).withValues(contentValues).build());
-                        }
-                        // This is an existing IM so do a DB update
-                        else {
-                            ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
-                                    .withSelection(ContactsContract.CommonDataKinds.Im._ID + "=? AND " +
-                                            ContactsContract.Data.MIMETYPE + "=?",
-                                            new String[] { imId, ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE })
-                                    .withValue(ContactsContract.CommonDataKinds.Im.DATA, getJsonString(im, "value"))
-                                    .withValue(ContactsContract.CommonDataKinds.Im.TYPE, getContactType(getJsonString(im, "type")))
-                                    .build());
-                        }
-                    }
-                }
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get emails");
-        }
-
-        // Modify note
-        String note = getJsonString(contact, "note");
-        ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
-                .withSelection(ContactsContract.Data.CONTACT_ID + "=? AND " +
-                        ContactsContract.Data.MIMETYPE + "=?",
-                        new String[] { id, ContactsContract.CommonDataKinds.Note.CONTENT_ITEM_TYPE })
-                .withValue(ContactsContract.CommonDataKinds.Note.NOTE, note)
-                .build());
-
-        // Modify nickname
-        String nickname = getJsonString(contact, "nickname");
-        if (nickname != null) {
-            ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
-                    .withSelection(ContactsContract.Data.CONTACT_ID + "=? AND " +
-                            ContactsContract.Data.MIMETYPE + "=?",
-                            new String[] { id, ContactsContract.CommonDataKinds.Nickname.CONTENT_ITEM_TYPE })
-                    .withValue(ContactsContract.CommonDataKinds.Nickname.NAME, nickname)
-                    .build());
-        }
-
-        // Modify urls
-        JSONArray websites = null;
-        try {
-            websites = contact.getJSONArray("urls");
-            if (websites != null) {
-                // Delete all the websites
-                if (websites.length() == 0) {
-                    Log.d(LOG_TAG, "This means we should be deleting all the phone numbers.");
-                    ops.add(ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI)
-                            .withSelection(ContactsContract.Data.RAW_CONTACT_ID + "=? AND " +
-                                    ContactsContract.Data.MIMETYPE + "=?",
-                                    new String[] { "" + rawId, ContactsContract.CommonDataKinds.Website.CONTENT_ITEM_TYPE })
-                            .build());
-                }
-                // Modify or add a website
-                else {
-                    for (int i = 0; i < websites.length(); i++) {
-                        JSONObject website = (JSONObject) websites.get(i);
-                        String websiteId = getJsonString(website, "id");
-                        // This is a new website so do a DB insert
-                        if (websiteId == null) {
-                            ContentValues contentValues = new ContentValues();
-                            contentValues.put(ContactsContract.Data.RAW_CONTACT_ID, rawId);
-                            contentValues.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Website.CONTENT_ITEM_TYPE);
-                            contentValues.put(ContactsContract.CommonDataKinds.Website.DATA, getJsonString(website, "value"));
-                            contentValues.put(ContactsContract.CommonDataKinds.Website.TYPE, getContactType(getJsonString(website, "type")));
-
-                            ops.add(ContentProviderOperation.newInsert(
-                                    ContactsContract.Data.CONTENT_URI).withValues(contentValues).build());
-                        }
-                        // This is an existing website so do a DB update
-                        else {
-                            ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
-                                    .withSelection(ContactsContract.CommonDataKinds.Website._ID + "=? AND " +
-                                            ContactsContract.Data.MIMETYPE + "=?",
-                                            new String[] { websiteId, ContactsContract.CommonDataKinds.Website.CONTENT_ITEM_TYPE })
-                                    .withValue(ContactsContract.CommonDataKinds.Website.DATA, getJsonString(website, "value"))
-                                    .withValue(ContactsContract.CommonDataKinds.Website.TYPE, getContactType(getJsonString(website, "type")))
-                                    .build());
-                        }
-                    }
-                }
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get websites");
-        }
-
-        // Modify birthday
-        String birthday = getJsonString(contact, "birthday");
-        if (birthday != null) {
-            ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
-                    .withSelection(ContactsContract.Data.CONTACT_ID + "=? AND " +
-                            ContactsContract.Data.MIMETYPE + "=? AND " +
-                            ContactsContract.CommonDataKinds.Event.TYPE + "=?",
-                            new String[] { id, ContactsContract.CommonDataKinds.Event.CONTENT_ITEM_TYPE, new String("" + ContactsContract.CommonDataKinds.Event.TYPE_BIRTHDAY) })
-                    .withValue(ContactsContract.CommonDataKinds.Event.TYPE, ContactsContract.CommonDataKinds.Event.TYPE_BIRTHDAY)
-                    .withValue(ContactsContract.CommonDataKinds.Event.START_DATE, birthday)
-                    .build());
-        }
-
-        // Modify photos
-        JSONArray photos = null;
-        try {
-            photos = contact.getJSONArray("photos");
-            if (photos != null) {
-                // Delete all the photos
-                if (photos.length() == 0) {
-                    ops.add(ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI)
-                            .withSelection(ContactsContract.Data.RAW_CONTACT_ID + "=? AND " +
-                                    ContactsContract.Data.MIMETYPE + "=?",
-                                    new String[] { "" + rawId, ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE })
-                            .build());
-                }
-                // Modify or add a photo
-                else {
-                    for (int i = 0; i < photos.length(); i++) {
-                        JSONObject photo = (JSONObject) photos.get(i);
-                        String photoId = getJsonString(photo, "id");
-                        byte[] bytes = getPhotoBytes(getJsonString(photo, "value"));
-                        // This is a new photo so do a DB insert
-                        if (photoId == null) {
-                            ContentValues contentValues = new ContentValues();
-                            contentValues.put(ContactsContract.Data.RAW_CONTACT_ID, rawId);
-                            contentValues.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE);
-                            contentValues.put(ContactsContract.Data.IS_SUPER_PRIMARY, 1);
-                            contentValues.put(ContactsContract.CommonDataKinds.Photo.PHOTO, bytes);
-
-                            ops.add(ContentProviderOperation.newInsert(
-                                    ContactsContract.Data.CONTENT_URI).withValues(contentValues).build());
-                        }
-                        // This is an existing photo so do a DB update
-                        else {
-                            ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
-                                    .withSelection(ContactsContract.CommonDataKinds.Photo._ID + "=? AND " +
-                                            ContactsContract.Data.MIMETYPE + "=?",
-                                            new String[] { photoId, ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE })
-                                    .withValue(ContactsContract.Data.IS_SUPER_PRIMARY, 1)
-                                    .withValue(ContactsContract.CommonDataKinds.Photo.PHOTO, bytes)
-                                    .build());
-                        }
-                    }
-                }
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get photos");
-        }
-
-        boolean retVal = true;
-
-        //Modify contact
-        try {
-            mApp.getActivity().getContentResolver().applyBatch(ContactsContract.AUTHORITY, ops);
-        } catch (RemoteException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-            Log.e(LOG_TAG, Log.getStackTraceString(e), e);
-            retVal = false;
-        } catch (OperationApplicationException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-            Log.e(LOG_TAG, Log.getStackTraceString(e), e);
-            retVal = false;
-        }
-
-        // if the save was a success return the contact ID
-        if (retVal) {
-            return id;
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Add a website to a list of database actions to be performed
-     *
-     * @param ops the list of database actions
-     * @param website the item to be inserted
-     */
-    private void insertWebsite(ArrayList<ContentProviderOperation> ops,
-            JSONObject website) {
-        ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
-                .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
-                .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Website.CONTENT_ITEM_TYPE)
-                .withValue(ContactsContract.CommonDataKinds.Website.DATA, getJsonString(website, "value"))
-                .withValue(ContactsContract.CommonDataKinds.Website.TYPE, getContactType(getJsonString(website, "type")))
-                .build());
-    }
-
-    /**
-     * Add an im to a list of database actions to be performed
-     *
-     * @param ops the list of database actions
-     * @param im the item to be inserted
-     */
-    private void insertIm(ArrayList<ContentProviderOperation> ops, JSONObject im) {
-        ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
-                .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
-                .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE)
-                .withValue(ContactsContract.CommonDataKinds.Im.DATA, getJsonString(im, "value"))
-                .withValue(ContactsContract.CommonDataKinds.Im.TYPE, getImType(getJsonString(im, "type")))
-                .build());
-    }
-
-    /**
-     * Add an organization to a list of database actions to be performed
-     *
-     * @param ops the list of database actions
-     * @param org the item to be inserted
-     */
-    private void insertOrganization(ArrayList<ContentProviderOperation> ops,
-            JSONObject org) {
-        ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
-                .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
-                .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE)
-                .withValue(ContactsContract.CommonDataKinds.Organization.TYPE, getOrgType(getJsonString(org, "type")))
-                .withValue(ContactsContract.CommonDataKinds.Organization.DEPARTMENT, getJsonString(org, "department"))
-                .withValue(ContactsContract.CommonDataKinds.Organization.COMPANY, getJsonString(org, "name"))
-                .withValue(ContactsContract.CommonDataKinds.Organization.TITLE, getJsonString(org, "title"))
-                .build());
-    }
-
-    /**
-     * Add an address to a list of database actions to be performed
-     *
-     * @param ops the list of database actions
-     * @param address the item to be inserted
-     */
-    private void insertAddress(ArrayList<ContentProviderOperation> ops,
-            JSONObject address) {
-        ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
-                .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
-                .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE)
-                .withValue(ContactsContract.CommonDataKinds.StructuredPostal.TYPE, getAddressType(getJsonString(address, "type")))
-                .withValue(ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS, getJsonString(address, "formatted"))
-                .withValue(ContactsContract.CommonDataKinds.StructuredPostal.STREET, getJsonString(address, "streetAddress"))
-                .withValue(ContactsContract.CommonDataKinds.StructuredPostal.CITY, getJsonString(address, "locality"))
-                .withValue(ContactsContract.CommonDataKinds.StructuredPostal.REGION, getJsonString(address, "region"))
-                .withValue(ContactsContract.CommonDataKinds.StructuredPostal.POSTCODE, getJsonString(address, "postalCode"))
-                .withValue(ContactsContract.CommonDataKinds.StructuredPostal.COUNTRY, getJsonString(address, "country"))
-                .build());
-    }
-
-    /**
-     * Add an email to a list of database actions to be performed
-     *
-     * @param ops the list of database actions
-     * @param email the item to be inserted
-     */
-    private void insertEmail(ArrayList<ContentProviderOperation> ops,
-            JSONObject email) {
-        ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
-                .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
-                .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE)
-                .withValue(ContactsContract.CommonDataKinds.Email.DATA, getJsonString(email, "value"))
-                .withValue(ContactsContract.CommonDataKinds.Email.TYPE, getContactType(getJsonString(email, "type")))
-                .build());
-    }
-
-    /**
-     * Add a phone to a list of database actions to be performed
-     *
-     * @param ops the list of database actions
-     * @param phone the item to be inserted
-     */
-    private void insertPhone(ArrayList<ContentProviderOperation> ops,
-            JSONObject phone) {
-        ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
-                .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
-                .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE)
-                .withValue(ContactsContract.CommonDataKinds.Phone.NUMBER, getJsonString(phone, "value"))
-                .withValue(ContactsContract.CommonDataKinds.Phone.TYPE, getPhoneType(getJsonString(phone, "type")))
-                .build());
-    }
-
-    /**
-     * Add a phone to a list of database actions to be performed
-     *
-     * @param ops the list of database actions
-     * @param phone the item to be inserted
-     */
-    private void insertPhoto(ArrayList<ContentProviderOperation> ops,
-            JSONObject photo) {
-        byte[] bytes = getPhotoBytes(getJsonString(photo, "value"));
-        ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
-                .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
-                .withValue(ContactsContract.Data.IS_SUPER_PRIMARY, 1)
-                .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE)
-                .withValue(ContactsContract.CommonDataKinds.Photo.PHOTO, bytes)
-                .build());
-    }
-
-    /**
-     * Gets the raw bytes from the supplied filename
-     *
-     * @param filename the file to read the bytes from
-     * @return a byte array
-     * @throws IOException
-     */
-    private byte[] getPhotoBytes(String filename) {
-        ByteArrayOutputStream buffer = new ByteArrayOutputStream();
-        try {
-            int bytesRead = 0;
-            long totalBytesRead = 0;
-            byte[] data = new byte[8192];
-            InputStream in = getPathFromUri(filename);
-
-            while ((bytesRead = in.read(data, 0, data.length)) != -1 && totalBytesRead <= MAX_PHOTO_SIZE) {
-                buffer.write(data, 0, bytesRead);
-                totalBytesRead += bytesRead;
-            }
-
-            in.close();
-            buffer.flush();
-        } catch (FileNotFoundException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        } catch (IOException e) {
-            Log.e(LOG_TAG, e.getMessage(), e);
-        }
-        return buffer.toByteArray();
-    }
-
-    /**
-       * Get an input stream based on file path or uri content://, http://, file://
-       *
-       * @param path
-       * @return an input stream
-     * @throws IOException
-       */
-    private InputStream getPathFromUri(String path) throws IOException {
-        if (path.startsWith("content:")) {
-            Uri uri = Uri.parse(path);
-            return mApp.getActivity().getContentResolver().openInputStream(uri);
-        }
-        if (path.startsWith("http:") || path.startsWith("https:") || path.startsWith("file:")) {
-            URL url = new URL(path);
-            return url.openStream();
-        }
-        else {
-            return new FileInputStream(path);
-        }
-    }
-
-    /**
-     * Creates a new contact and stores it in the database
-     *
-     * @param contact the contact to be saved
-     * @param account the account to be saved under
-     */
-    private String createNewContact(JSONObject contact, String accountType, String accountName) {
-        // Create a list of attributes to add to the contact database
-        ArrayList<ContentProviderOperation> ops = new ArrayList<ContentProviderOperation>();
-
-        //Add contact type
-        ops.add(ContentProviderOperation.newInsert(ContactsContract.RawContacts.CONTENT_URI)
-                .withValue(ContactsContract.RawContacts.ACCOUNT_TYPE, accountType)
-                .withValue(ContactsContract.RawContacts.ACCOUNT_NAME, accountName)
-                .build());
-
-        // Add name
-        try {
-            JSONObject name = contact.optJSONObject("name");
-            String displayName = contact.getString("displayName");
-            if (displayName != null || name != null) {
-                ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
-                        .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
-                        .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE)
-                        .withValue(ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME, displayName)
-                        .withValue(ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME, getJsonString(name, "familyName"))
-                        .withValue(ContactsContract.CommonDataKinds.StructuredName.MIDDLE_NAME, getJsonString(name, "middleName"))
-                        .withValue(ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME, getJsonString(name, "givenName"))
-                        .withValue(ContactsContract.CommonDataKinds.StructuredName.PREFIX, getJsonString(name, "honorificPrefix"))
-                        .withValue(ContactsContract.CommonDataKinds.StructuredName.SUFFIX, getJsonString(name, "honorificSuffix"))
-                        .build());
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get name object");
-        }
-
-        //Add phone numbers
-        JSONArray phones = null;
-        try {
-            phones = contact.getJSONArray("phoneNumbers");
-            if (phones != null) {
-                for (int i = 0; i < phones.length(); i++) {
-                    JSONObject phone = (JSONObject) phones.get(i);
-                    insertPhone(ops, phone);
-                }
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get phone numbers");
-        }
-
-        // Add emails
-        JSONArray emails = null;
-        try {
-            emails = contact.getJSONArray("emails");
-            if (emails != null) {
-                for (int i = 0; i < emails.length(); i++) {
-                    JSONObject email = (JSONObject) emails.get(i);
-                    insertEmail(ops, email);
-                }
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get emails");
-        }
-
-        // Add addresses
-        JSONArray addresses = null;
-        try {
-            addresses = contact.getJSONArray("addresses");
-            if (addresses != null) {
-                for (int i = 0; i < addresses.length(); i++) {
-                    JSONObject address = (JSONObject) addresses.get(i);
-                    insertAddress(ops, address);
-                }
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get addresses");
-        }
-
-        // Add organizations
-        JSONArray organizations = null;
-        try {
-            organizations = contact.getJSONArray("organizations");
-            if (organizations != null) {
-                for (int i = 0; i < organizations.length(); i++) {
-                    JSONObject org = (JSONObject) organizations.get(i);
-                    insertOrganization(ops, org);
-                }
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get organizations");
-        }
-
-        // Add IMs
-        JSONArray ims = null;
-        try {
-            ims = contact.getJSONArray("ims");
-            if (ims != null) {
-                for (int i = 0; i < ims.length(); i++) {
-                    JSONObject im = (JSONObject) ims.get(i);
-                    insertIm(ops, im);
-                }
-            }
-        } catch (JSONException e) {
-            Log.d(LOG_TAG, "Could not get emails");
-        }

<TRUNCATED>

[24/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/util/config-changes.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/config-changes.js b/cordova-lib/src/plugman/util/config-changes.js
new file mode 100644
index 0000000..67adfb6
--- /dev/null
+++ b/cordova-lib/src/plugman/util/config-changes.js
@@ -0,0 +1,812 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed 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 module deals with shared configuration / dependency "stuff". That is:
+ * - XML configuration files such as config.xml, AndroidManifest.xml or WMAppManifest.xml.
+ * - plist files in iOS
+ * - pbxproj files in iOS
+ * Essentially, any type of shared resources that we need to handle with awareness
+ * of how potentially multiple plugins depend on a single shared resource, should be
+ * handled in this module.
+ *
+ * The implementation uses an object as a hash table, with "leaves" of the table tracking
+ * reference counts.
+ */
+
+/* jshint node:true, sub:true, unused:true, indent:4  */
+
+var fs   = require('fs'),
+    path = require('path'),
+    glob = require('glob'),
+    plist = require('plist-with-patches'),
+    bplist = require('bplist-parser'),
+    xcode = require('xcode'),
+    et   = require('elementtree'),
+    _ = require('underscore'),
+    xml_helpers = require('./../util/xml-helpers'),
+    platforms = require('./../platforms'),
+    events = require('./../events'),
+    plist_helpers = require('./../util/plist-helpers');
+
+
+// These frameworks are required by cordova-ios by default. We should never add/remove them.
+var keep_these_frameworks = [
+    'MobileCoreServices.framework',
+    'CoreGraphics.framework',
+    'CoreLocation.framework',
+    'AssetsLibrary.framework'
+];
+
+
+exports.PlatformMunger = PlatformMunger;
+
+/******************************************************************************
+Adapters to keep the current refactoring effort to within this file
+******************************************************************************/
+exports.add_plugin_changes = function(platform, project_dir, plugins_dir, plugin_id, plugin_vars, is_top_level, should_increment, cache) {
+    var munger = new PlatformMunger(platform, project_dir, plugins_dir);
+    munger.add_plugin_changes(plugin_id, plugin_vars, is_top_level, should_increment, cache);
+    munger.save_all();
+};
+
+exports.remove_plugin_changes = function(platform, project_dir, plugins_dir, plugin_name, plugin_id, is_top_level, should_decrement) {
+    // TODO: should_decrement parameter is never used, remove it here and wherever called
+    var munger = new PlatformMunger(platform, project_dir, plugins_dir);
+    munger.remove_plugin_changes(plugin_name, plugin_id, is_top_level);
+    munger.save_all();
+};
+
+exports.process = function(plugins_dir, project_dir, platform) {
+    var munger = new PlatformMunger(platform, project_dir, plugins_dir);
+    munger.process();
+    munger.save_all();
+};
+
+exports.get_munge_change = function(munge, keys) {
+    return deep_find.apply(null, arguments);
+}
+
+/******************************************************************************/
+
+
+exports.add_installed_plugin_to_prepare_queue = add_installed_plugin_to_prepare_queue;
+function add_installed_plugin_to_prepare_queue(plugins_dir, plugin, platform, vars, is_top_level) {
+    checkPlatform(platform);
+    var config = exports.get_platform_json(plugins_dir, platform);
+    config.prepare_queue.installed.push({'plugin':plugin, 'vars':vars, 'topLevel':is_top_level});
+    exports.save_platform_json(config, plugins_dir, platform);
+}
+
+exports.add_uninstalled_plugin_to_prepare_queue = add_uninstalled_plugin_to_prepare_queue;
+function add_uninstalled_plugin_to_prepare_queue(plugins_dir, plugin, platform, is_top_level) {
+    checkPlatform(platform);
+
+    var plugin_xml = xml_helpers.parseElementtreeSync(path.join(plugins_dir, plugin, 'plugin.xml'));
+    var config = exports.get_platform_json(plugins_dir, platform);
+    config.prepare_queue.uninstalled.push({'plugin':plugin, 'id':plugin_xml.getroot().attrib['id'], 'topLevel':is_top_level});
+    exports.save_platform_json(config, plugins_dir, platform);
+}
+
+
+/******************************************************************************
+* PlatformMunger class
+*
+* Can deal with config file of a single project.
+* Parsed config files are cached in a ConfigKeeper object.
+******************************************************************************/
+function PlatformMunger(platform, project_dir, plugins_dir) {
+    checkPlatform(platform);
+    this.platform = platform;
+    this.project_dir = project_dir;
+    this.plugins_dir = plugins_dir;
+    this.platform_handler = platforms[platform];
+    this.config_keeper = new ConfigKeeper();
+}
+
+// Write out all unsaved files.
+PlatformMunger.prototype.save_all = PlatformMunger_save_all;
+function PlatformMunger_save_all() {
+    this.config_keeper.save_all();
+}
+
+// Apply a munge object to a single config file.
+// The remove parameter tells whether to add the change or remove it.
+PlatformMunger.prototype.apply_file_munge = PlatformMunger_apply_file_munge;
+function PlatformMunger_apply_file_munge(file, munge, remove) {
+    var self = this;
+    var xml_child;
+
+    if ( file === 'framework' && self.platform === 'ios' ) {
+        // ios pbxproj file
+        var pbxproj = self.config_keeper.get(self.project_dir, self.platform, 'framework');
+        for (var src in munge.parents) {
+            for (xml_child in munge.parents[src]) {
+                var xml = munge.parents[src][xml_child].xml;
+                // Only add the framework if it's not a cordova-ios core framework
+                if (keep_these_frameworks.indexOf(src) == -1) {
+                    // xml_child in this case is whether the framework should use weak or not
+                    if (remove) {
+                        pbxproj.data.removeFramework(src);
+                    } else {
+                        pbxproj.data.addFramework(src, {weak: (xml === 'true')});
+                    }
+                    pbxproj.is_changed = true;
+                }
+            }
+        }
+    } else {
+        // all other types of files
+        for (var selector in munge.parents) {
+            for (xml_child in munge.parents[selector]) {
+                // this xml child is new, graft it (only if config file exists)
+                var config_file = self.config_keeper.get(self.project_dir, self.platform, file);
+                if (config_file.exists) {
+                    if (remove) config_file.prune_child(selector, munge.parents[selector][xml_child]);
+                    else config_file.graft_child(selector, munge.parents[selector][xml_child]);
+                }
+            }
+        }
+    }
+}
+
+
+PlatformMunger.prototype.remove_plugin_changes = remove_plugin_changes;
+function remove_plugin_changes(plugin_name, plugin_id, is_top_level) {
+    var self = this;
+    var platform_config = exports.get_platform_json(self.plugins_dir, self.platform);
+    var plugin_dir = path.join(self.plugins_dir, plugin_name);
+    var plugin_vars = (is_top_level ? platform_config.installed_plugins[plugin_id] : platform_config.dependent_plugins[plugin_id]);
+
+    // get config munge, aka how did this plugin change various config files
+    var config_munge = self.generate_plugin_config_munge(plugin_dir, plugin_vars);
+    // global munge looks at all plugins' changes to config files
+    var global_munge = platform_config.config_munge;
+    var munge = decrement_munge(global_munge, config_munge);
+
+    for (var file in munge.files) {
+        if (file == 'plugins-plist' && self.platform == 'ios') {
+            // TODO: remove this check and <plugins-plist> sections in spec/plugins/../plugin.xml files.
+            events.emit(
+                'warn',
+                'WARNING: Plugin "' + plugin_id + '" uses <plugins-plist> element(s), ' +
+                'which are no longer supported. Support has been removed as of Cordova 3.4.'
+            );
+            continue;
+        }
+        self.apply_file_munge(file, munge.files[file], /* remove = */ true);
+    }
+
+    // Remove from installed_plugins
+    if (is_top_level) {
+        delete platform_config.installed_plugins[plugin_id];
+    } else {
+        delete platform_config.dependent_plugins[plugin_id];
+    }
+
+    // save
+    exports.save_platform_json(platform_config, self.plugins_dir, self.platform);
+}
+
+
+PlatformMunger.prototype.add_plugin_changes = add_plugin_changes;
+function add_plugin_changes(plugin_id, plugin_vars, is_top_level, should_increment) {
+    var self = this;
+    var platform_config = exports.get_platform_json(self.plugins_dir, self.platform);
+    var plugin_dir = path.join(self.plugins_dir, plugin_id);
+
+    var plugin_config = self.config_keeper.get(plugin_dir, '', 'plugin.xml');
+    plugin_id = plugin_config.data.getroot().attrib.id;
+
+    // get config munge, aka how should this plugin change various config files
+    var config_munge = self.generate_plugin_config_munge(plugin_dir, plugin_vars);
+    // global munge looks at all plugins' changes to config files
+
+    // TODO: The should_increment param is only used by cordova-cli and is going away soon.
+    // If should_increment is set to false, avoid modifying the global_munge (use clone)
+    // and apply the entire config_munge because it's already a proper subset of the global_munge.
+    var munge, global_munge;
+    if (should_increment) {
+        global_munge = platform_config.config_munge;
+        munge = increment_munge(global_munge, config_munge);
+    } else {
+        global_munge = clone_munge(platform_config.config_munge);
+        munge = config_munge;
+    }
+
+    for (var file in munge.files) {
+        // TODO: remove this warning some time after 3.4 is out.
+        if (file == 'plugins-plist' && self.platform == 'ios') {
+            events.emit(
+                'warn',
+                'WARNING: Plugin "' + plugin_id + '" uses <plugins-plist> element(s), ' +
+                'which are no longer supported. Support has been removed as of Cordova 3.4.'
+            );
+            continue;
+        }
+        self.apply_file_munge(file, munge.files[file]);
+    }
+
+    // Move to installed_plugins if it is a top-level plugin
+    if (is_top_level) {
+        platform_config.installed_plugins[plugin_id] = plugin_vars || {};
+    } else {
+        platform_config.dependent_plugins[plugin_id] = plugin_vars || {};
+    }
+
+    // save
+    exports.save_platform_json(platform_config, self.plugins_dir, self.platform);
+}
+
+
+// Load the global munge from platform json and apply all of it.
+// Used by cordova prepare to re-generate some config file from platform
+// defaults and the global munge.
+PlatformMunger.prototype.reapply_global_munge = reapply_global_munge ;
+function reapply_global_munge () {
+    var self = this;
+
+    var platform_config = exports.get_platform_json(self.plugins_dir, self.platform);
+    var global_munge = platform_config.config_munge;
+    for (var file in global_munge.files) {
+        // TODO: remove this warning some time after 3.4 is out.
+        if (file == 'plugins-plist' && self.platform == 'ios') {
+            events.emit(
+                'warn',
+                'WARNING: One of your plugins uses <plugins-plist> element(s), ' +
+                'which are no longer supported. Support has been removed as of Cordova 3.4.'
+            );
+            continue;
+        }
+
+        self.apply_file_munge(file, global_munge.files[file]);
+    }
+}
+
+
+// generate_plugin_config_munge
+// Generate the munge object from plugin.xml + vars
+PlatformMunger.prototype.generate_plugin_config_munge = generate_plugin_config_munge;
+function generate_plugin_config_munge(plugin_dir, vars) {
+    var self = this;
+
+    vars = vars || {};
+    // Add PACKAGE_NAME variable into vars
+    if (!vars['PACKAGE_NAME']) {
+        vars['PACKAGE_NAME'] = self.platform_handler.package_name(self.project_dir);
+    }
+
+    var munge = { files: {} };
+    var plugin_config = self.config_keeper.get(plugin_dir, '', 'plugin.xml');
+    var plugin_xml = plugin_config.data;
+
+    var platformTag = plugin_xml.find('platform[@name="' + self.platform + '"]');
+    var changes = [];
+    // add platform-agnostic config changes
+    changes = changes.concat(plugin_xml.findall('config-file'));
+    if (platformTag) {
+        // add platform-specific config changes if they exist
+        changes = changes.concat(platformTag.findall('config-file'));
+
+        // note down pbxproj framework munges in special section of munge obj
+        // CB-5238 this is only for systems frameworks
+        var frameworks = platformTag.findall('framework');
+        frameworks.forEach(function(f) {
+            var custom = f.attrib['custom'];
+            if(!custom) {
+                var file = f.attrib['src'];
+                var weak = ('true' == f.attrib['weak']).toString();
+
+                deep_add(munge, 'framework', file, { xml: weak, count: 1 });
+            }
+        });
+    }
+
+    changes.forEach(function(change) {
+        var target = change.attrib['target'];
+        var parent = change.attrib['parent'];
+        var after = change.attrib['after'];
+        var xmls = change.getchildren();
+		xmls.forEach(function(xml) {
+            // 1. stringify each xml
+            var stringified = (new et.ElementTree(xml)).write({xml_declaration:false});
+            // interp vars
+            if (vars) {
+                Object.keys(vars).forEach(function(key) {
+                    var regExp = new RegExp("\\$" + key, "g");
+                    stringified = stringified.replace(regExp, vars[key]);
+                });
+            }
+            // 2. add into munge
+            deep_add(munge, target, parent, { xml: stringified, count: 1, after: after });
+        });
+    });
+    return munge;
+}
+
+// Go over the prepare queue an apply the config munges for each plugin
+// that has been (un)installed.
+PlatformMunger.prototype.process = PlatformMunger_process;
+function PlatformMunger_process() {
+    var self = this;
+
+    var platform_config = exports.get_platform_json(self.plugins_dir, self.platform);
+
+    // Uninstallation first
+    platform_config.prepare_queue.uninstalled.forEach(function(u) {
+        self.remove_plugin_changes(u.plugin, u.id, u.topLevel);
+    });
+
+    // Now handle installation
+    platform_config.prepare_queue.installed.forEach(function(u) {
+        self.add_plugin_changes(u.plugin, u.vars, u.topLevel, true);
+    });
+
+    platform_config = exports.get_platform_json(self.plugins_dir, self.platform);
+
+    // Empty out installed/ uninstalled queues.
+    platform_config.prepare_queue.uninstalled = [];
+    platform_config.prepare_queue.installed = [];
+    // save platform json
+    exports.save_platform_json(platform_config, self.plugins_dir, self.platform);
+}
+/**** END of PlatformMunger ****/
+
+
+/******************************************************************************
+* ConfigKeeper class
+*
+* Used to load and store config files to avoid re-parsing and writing them out
+* multiple times.
+*
+* The config files are referred to by a fake path constructed as
+* project_dir/platform/file
+* where file is the name used for the file in config munges.
+******************************************************************************/
+function ConfigKeeper() {
+    this._cached = {};
+}
+
+ConfigKeeper.prototype.get = ConfigKeeper_get;
+function ConfigKeeper_get(project_dir, platform, file) {
+    var self = this;
+
+    //This fixes a bug with older plugins - when specifying config xml instead of res/xml/config.xml
+    //https://issues.apache.org/jira/browse/CB-6414
+    if(file == 'config.xml' && platform == 'android'){
+        file = 'res/xml/config.xml';
+    }
+    var fake_path = path.join(project_dir, platform, file);
+
+    if (self._cached[fake_path]) {
+        return self._cached[fake_path];
+    }
+    // File was not cached, need to load.
+    var config_file = new ConfigFile(project_dir, platform, file);
+    self._cached[fake_path] = config_file;
+    return config_file;
+}
+
+
+ConfigKeeper.prototype.save_all = ConfigKeeper_save_all;
+function ConfigKeeper_save_all() {
+    var self = this;
+    Object.keys(self._cached).forEach(function (fake_path) {
+        var config_file = self._cached[fake_path];
+        if (config_file.is_changed) config_file.save();
+    });
+}
+/**** END of ConfigKeeper ****/
+
+// TODO: move save/get_platform_json to be part of ConfigKeeper or ConfigFile
+// For now they are used in many places in plugman and cordova-cli and can
+// save the file bypassing the ConfigKeeper's cache.
+exports.get_platform_json = get_platform_json;
+function get_platform_json(plugins_dir, platform) {
+    checkPlatform(platform);
+
+    var filepath = path.join(plugins_dir, platform + '.json');
+    if (fs.existsSync(filepath)) {
+        return fix_munge(JSON.parse(fs.readFileSync(filepath, 'utf-8')));
+    } else {
+        var config = {
+            prepare_queue:{installed:[], uninstalled:[]},
+            config_munge:{},
+            installed_plugins:{},
+            dependent_plugins:{}
+        };
+        return config;
+    }
+}
+
+exports.save_platform_json = save_platform_json;
+function save_platform_json(config, plugins_dir, platform) {
+    checkPlatform(platform);
+    var filepath = path.join(plugins_dir, platform + '.json');
+    fs.writeFileSync(filepath, JSON.stringify(config, null, 4), 'utf-8');
+}
+
+
+// convert a munge from the old format ([file][parent][xml] = count) to the current one
+function fix_munge(platform_config) {
+    var munge = platform_config.config_munge;
+    if (!munge.files) {
+        var new_munge = { files: {} };
+        for (var file in munge) {
+            for (var selector in munge[file]) {
+                for (var xml_child in munge[file][selector]) {
+                    var val = parseInt(munge[file][selector][xml_child]);
+                    for (var i = 0; i < val; i++) {
+                        deep_add(new_munge, [file, selector, { xml: xml_child, count: val }]);
+                    }
+                }
+            }
+        }
+        platform_config.config_munge = new_munge;
+    }
+
+    return platform_config;
+}
+
+/**** END of ConfigKeeper ****/
+
+
+/******************************************************************************
+* ConfigFile class
+*
+* Can load and keep various types of config files. Provides some functionality
+* specific to some file types such as grafting XML children. In most cases it
+* should be instantiated by ConfigKeeper.
+*
+* For plugin.xml files use as:
+* plugin_config = self.config_keeper.get(plugin_dir, '', 'plugin.xml');
+*
+* TODO: Consider moving it out to a separate file and maybe partially with
+* overrides in platform handlers.
+******************************************************************************/
+function ConfigFile(project_dir, platform, file_tag) {
+    this.project_dir = project_dir;
+    this.platform = platform;
+    this.file_tag = file_tag;
+    this.is_changed = false;
+
+    this.load();
+}
+
+// ConfigFile.load()
+ConfigFile.prototype.load = ConfigFile_load;
+function ConfigFile_load() {
+    var self = this;
+
+    // config file may be in a place not exactly specified in the target
+    var filepath = self.filepath = resolveConfigFilePath(self.project_dir, self.platform, self.file_tag);
+
+    if ( !filepath || !fs.existsSync(filepath) ) {
+        self.exists = false;
+        return;
+    }
+    self.exists = true;
+    var ext = path.extname(filepath);
+    // Windows8 uses an appxmanifest, and wp8 will likely use
+    // the same in a future release
+    if (ext == '.xml' || ext == '.appxmanifest') {
+        self.type = 'xml';
+        self.data = xml_helpers.parseElementtreeSync(filepath);
+    } else if (ext == '.pbxproj') {
+        self.type = 'pbxproj';
+        self.data = xcode.project(filepath);
+        self.data.parseSync();
+    } else {
+        // plist file
+        self.type = 'plist';
+        // TODO: isBinaryPlist() reads the file and then parse re-reads it again.
+        //       We always write out text plist, not binary.
+        //       Do we still need to support binary plist?
+        //       If yes, use plist.parseStringSync() and read the file once.
+        self.plist_module = (isBinaryPlist(filepath) ? bplist : plist);
+        self.data = self.plist_module.parseFileSync(filepath);
+    }
+}
+
+// ConfigFile.save()
+ConfigFile.prototype.save = ConfigFile_save;
+function ConfigFile_save() {
+    var self = this;
+    if (self.type === 'xml') {
+        fs.writeFileSync(self.filepath, self.data.write({indent: 4}), 'utf-8');
+    } else if (self.type === 'pbxproj') {
+        fs.writeFileSync(self.filepath, self.data.writeSync());
+    } else {
+        // plist
+        var regExp = new RegExp("<string>[ \t\r\n]+?</string>", "g");
+        fs.writeFileSync(self.filepath, plist.build(self.data).replace(regExp, "<string></string>"));
+    }
+    self.is_changed = false;
+}
+
+// ConfigFile.graft_child()
+ConfigFile.prototype.graft_child = ConfigFile_graft_child;
+function ConfigFile_graft_child(selector, xml_child) {
+    var self = this;
+    var filepath = self.filepath;
+    var result;
+    if (self.type === 'xml') {
+        var xml_to_graft = [et.XML(xml_child.xml)];
+        result = xml_helpers.graftXML(self.data, xml_to_graft, selector, xml_child.after);
+        if ( !result) {
+            throw new Error('grafting xml at selector "' + selector + '" from "' + filepath + '" during config install went bad :(');
+        }
+    } else {
+        // plist file
+        result = plist_helpers.graftPLIST(self.data, xml_child.xml, selector);
+        if ( !result ) {
+            throw new Error('grafting to plist "' + filepath + '" during config install went bad :(');
+        }
+    }
+    self.is_changed = true;
+}
+
+// ConfigFile.prune_child()
+ConfigFile.prototype.prune_child = ConfigFile_prune_child;
+function ConfigFile_prune_child(selector, xml_child) {
+    var self = this;
+    var filepath = self.filepath;
+    var result;
+    if (self.type === 'xml') {
+        var xml_to_graft = [et.XML(xml_child.xml)];
+        result = xml_helpers.pruneXML(self.data, xml_to_graft, selector);
+    } else {
+        // plist file
+        result = plist_helpers.prunePLIST(self.data, xml_child.xml, selector);
+    }
+    if ( !result) {
+        var err_msg = 'Pruning at selector "' + selector + '" from "' + filepath + '" went bad.';
+        throw new Error(err_msg);
+    }
+    self.is_changed = true;
+}
+/**** END of ConfigFile ****/
+
+
+/******************************************************************************
+* Utility functions
+******************************************************************************/
+
+// Check if we know such platform
+function checkPlatform(platform) {
+    if (!(platform in platforms)) throw new Error('platform "' + platform + '" not recognized.');
+}
+
+// determine if a plist file is binary
+function isBinaryPlist(filename) {
+    // I wish there was a synchronous way to read only the first 6 bytes of a
+    // file. This is wasteful :/
+    var buf = '' + fs.readFileSync(filename, 'utf8');
+    // binary plists start with a magic header, "bplist"
+    return buf.substring(0, 6) === 'bplist';
+}
+
+// Find out the real name of an iOS project
+// TODO: glob is slow, need a better way or caching, or avoid using more than once.
+function getIOSProjectname(project_dir) {
+    var matches = glob.sync(path.join(project_dir, '*.xcodeproj'));
+    var iospath;
+    if (matches.length === 1) {
+        iospath = path.basename(matches[0],'.xcodeproj');
+    } else {
+        var msg;
+        if (matches.length === 0) {
+            msg = 'Does not appear to be an xcode project, no xcode project file in ' + project_dir;
+        }
+        else {
+            msg = 'There are multiple *.xcodeproj dirs in ' + project_dir;
+        }
+        throw new Error(msg);
+    }
+    return iospath;
+}
+
+// Some config-file target attributes are not qualified with a full leading directory, or contain wildcards.
+// Resolve to a real path in this function.
+// TODO: getIOSProjectname is slow because of glob, try to avoid calling it several times per project.
+function resolveConfigFilePath(project_dir, platform, file) {
+    var filepath = path.join(project_dir, file);
+    var matches;
+
+    // .pbxproj file
+    if (file === 'framework') {
+        var proj_name = getIOSProjectname(project_dir);
+        filepath = path.join(project_dir, proj_name + '.xcodeproj', 'project.pbxproj');
+        return filepath;
+    }
+
+    if (file.indexOf('*') > -1) {
+        // handle wildcards in targets using glob.
+        matches = glob.sync(path.join(project_dir, '**', file));
+        if (matches.length) filepath = matches[0];
+        return filepath;
+    }
+
+    // special-case config.xml target that is just "config.xml". This should be resolved to the real location of the file.
+    // TODO: move the logic that contains the locations of config.xml from cordova CLI into plugman.
+    if (file == 'config.xml') {
+        if (platform == 'ubuntu') {
+            filepath = path.join(project_dir, 'config.xml');
+        } else if (platform == 'ios') {
+            var iospath = getIOSProjectname(project_dir);
+            filepath = path.join(project_dir,iospath, 'config.xml');
+        } else if (platform == 'android') {
+            filepath = path.join(project_dir, 'res', 'xml', 'config.xml');
+        } else {
+            matches = glob.sync(path.join(project_dir, '**', 'config.xml'));
+            if (matches.length) filepath = matches[0];
+        }
+        return filepath;
+    }
+
+    // None of the special cases matched, returning project_dir/file.
+    return filepath;
+}
+
+
+/******************************************************************************
+* Munge object manipulations functions
+******************************************************************************/
+
+// add the count of [key1][key2]...[keyN] to obj
+// return true if it didn't exist before
+function deep_add(obj, keys /* or key1, key2 .... */ ) {
+    if ( !Array.isArray(keys) ) {
+        keys = Array.prototype.slice.call(arguments, 1);
+    }
+
+    return process_munge(obj, true/*createParents*/, function (parentArray, k) {
+        var found = _.find(parentArray, function(element) {
+            return element.xml == k.xml;
+        });
+        if (found) {
+            found.after = found.after || k.after;
+            found.count += k.count;
+        } else {
+            parentArray.push(k);
+        }
+        return !found;
+    }, keys);
+}
+
+// decrement the count of [key1][key2]...[keyN] from obj and remove if it reaches 0
+// return true if it was removed or not found
+function deep_remove(obj, keys /* or key1, key2 .... */ ) {
+    if ( !Array.isArray(keys) ) {
+        keys = Array.prototype.slice.call(arguments, 1);
+    }
+
+    var result = process_munge(obj, false/*createParents*/, function (parentArray, k) {
+        var index = -1;
+        var found = _.find(parentArray, function (element) {
+            index++;
+            return element.xml == k.xml;
+        });
+        if (found) {
+            found.count -= k.count;
+            if (found.count > 0) {
+                return false;
+            }
+            else {
+                parentArray.splice(index, 1);
+            }
+        }
+        return undefined;
+    }, keys);
+
+    return typeof result === "undefined" ? true : result;
+}
+
+// search for [key1][key2]...[keyN]
+// return the object or undefined if not found
+function deep_find(obj, keys /* or key1, key2 .... */ ) {
+    if ( !Array.isArray(keys) ) {
+        keys = Array.prototype.slice.call(arguments, 1);
+    }
+
+    return process_munge(obj, false/*createParents?*/, function (parentArray, k) {
+        return _.find(parentArray, function (element) {
+            return element.xml == (k.xml || k);
+        });
+    }, keys);
+}
+
+// Execute func passing it the parent array and the xmlChild key.
+// When createParents is true, add the file and parent items  they are missing
+// When createParents is false, stop and return undefined if the file and/or parent items are missing
+
+function process_munge(obj, createParents, func, keys /* or key1, key2 .... */ ) {
+    if ( !Array.isArray(keys) ) {
+        keys = Array.prototype.slice.call(arguments, 1);
+    }
+    var k = keys[0];
+    if (keys.length == 1) {
+        return func(obj, k);
+    } else if (keys.length == 2) {
+        if (!obj.parents[k] && !createParents) {
+            return undefined;
+        }
+        obj.parents[k] = obj.parents[k] || [];
+        return process_munge(obj.parents[k], createParents, func, keys.slice(1));
+    } else if (keys.length == 3){
+        if (!obj.files[k] && !createParents) {
+            return undefined;
+        }
+        obj.files[k] = obj.files[k] || { parents: {} };
+        return process_munge(obj.files[k], createParents, func, keys.slice(1));
+    } else {
+        throw new Error("Invalid key format. Must contain at most 3 elements (file, parent, xmlChild).");
+    }
+}
+
+// All values from munge are added to base as
+// base[file][selector][child] += base[file][selector][child]
+// Returns a munge object containing values that exist in munge
+// but not in base.
+function increment_munge(base, munge) {
+    var diff = { files: {} };
+
+    for (var file in munge.files) {
+        for (var selector in munge.files[file].parents) {
+            for (var xml_child in munge.files[file].parents[selector]) {
+                var val = munge.files[file].parents[selector][xml_child];
+                // if node not in base, add it to diff and base
+                // else increment it's value in base without adding to diff
+                var newlyAdded = deep_add(base, [file, selector, val]);
+                if (newlyAdded) {
+                    deep_add(diff, file, selector, val);
+                }
+            }
+        }
+    }
+    return diff;
+}
+
+// Update the base munge object as
+// base[file][selector][child] -= base[file][selector][child]
+// nodes that reached zero value are removed from base and added to the returned munge
+// object.
+function decrement_munge(base, munge) {
+    var zeroed = { files: {} };
+
+    for (var file in munge.files) {
+        for (var selector in munge.files[file].parents) {
+            for (var xml_child in munge.files[file].parents[selector]) {
+                var val = munge.files[file].parents[selector][xml_child];
+                // if node not in base, add it to diff and base
+                // else increment it's value in base without adding to diff
+                var removed = deep_remove(base, [file, selector, val]);
+                if (removed) {
+                    deep_add(zeroed, file, selector, val);
+                }
+            }
+        }
+    }
+    return zeroed;
+}
+
+// For better readability where used
+function clone_munge(munge) {
+    return increment_munge({}, munge);
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/util/csproj.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/csproj.js b/cordova-lib/src/plugman/util/csproj.js
new file mode 100644
index 0000000..1024878
--- /dev/null
+++ b/cordova-lib/src/plugman/util/csproj.js
@@ -0,0 +1,124 @@
+var xml_helpers = require('./xml-helpers'),
+    et = require('elementtree'),
+    fs = require('fs'),
+    path = require('path');
+
+function csproj(location) {
+    this.location = location;
+    this.xml = xml_helpers.parseElementtreeSync(location);
+    return this;
+}
+
+csproj.prototype = {
+    write:function() {
+        fs.writeFileSync(this.location, this.xml.write({indent:4}), 'utf-8');
+    },
+
+    addReference:function(relPath) {
+        var item = new et.Element('ItemGroup');
+        var extName = path.extname(relPath);
+
+        var elem = new et.Element('Reference');
+        // add dll file name
+        elem.attrib.Include = path.basename(relPath, extName);
+        // add hint path with full path
+        var hint_path = new et.Element('HintPath');
+        hint_path.text = relPath;
+        elem.append(hint_path);
+
+        if(extName == ".winmd") {
+            var mdFileTag = new et.Element("IsWinMDFile");
+                mdFileTag.text = "true";
+            elem.append(mdFileTag);
+        }
+
+        item.append(elem);
+
+        this.xml.getroot().append(item);
+    },
+
+    removeReference:function(relPath) {
+        var item = new et.Element('ItemGroup');
+        var extName = path.extname(relPath);
+        var includeText = path.basename(relPath,extName);
+        // <ItemGroup>
+        //   <Reference Include="WindowsRuntimeComponent1">
+        var item_groups = this.xml.findall('ItemGroup/Reference[@Include="' + includeText + '"]/..');
+
+        if(item_groups.length > 0 ) {
+            this.xml.getroot().remove(0, item_groups[0]);
+        }
+    },
+
+    addSourceFile:function(relative_path) {
+        relative_path = relative_path.split('/').join('\\');
+        // make ItemGroup to hold file.
+        var item = new et.Element('ItemGroup');
+
+        var extName = path.extname(relative_path);
+        // check if it's a .xaml page
+        if(extName == ".xaml") {
+            var page = new et.Element('Page');
+            var sub_type = new et.Element('SubType');
+
+            sub_type.text = "Designer";
+            page.append(sub_type);
+            page.attrib.Include = relative_path;
+
+            var gen = new et.Element('Generator');
+            gen.text = "MSBuild:Compile";
+            page.append(gen);
+
+            var item_groups = this.xml.findall('ItemGroup');
+            if(item_groups.length == 0) {
+                item.append(page);
+            } else {
+                item_groups[0].append(page);
+            }
+        }
+        else if (extName == ".cs") {
+            var compile = new et.Element('Compile');
+            compile.attrib.Include = relative_path;
+            // check if it's a .xaml.cs page that would depend on a .xaml of the same name
+            if (relative_path.indexOf('.xaml.cs', relative_path.length - 8) > -1) {
+                var dep = new et.Element('DependentUpon');
+                var parts = relative_path.split('\\');
+                var xaml_file = parts[parts.length - 1].substr(0, parts[parts.length - 1].length - 3); // Benn, really !?
+                dep.text = xaml_file;
+                compile.append(dep);
+            }
+            item.append(compile);
+        }
+        else { // otherwise add it normally
+            var compile = new et.Element('Content');
+            compile.attrib.Include = relative_path;
+            item.append(compile);
+        }
+        this.xml.getroot().append(item);
+    },
+
+    removeSourceFile:function(relative_path) {
+        relative_path = relative_path.split('/').join('\\');
+        var item_groups = this.xml.findall('ItemGroup');
+        for (var i = 0, l = item_groups.length; i < l; i++) {
+            var group = item_groups[i];
+            var files = group.findall('Compile').concat(group.findall('Page')).concat(group.findall('Content'));
+            for (var j = 0, k = files.length; j < k; j++) {
+                var file = files[j];
+                if (file.attrib.Include == relative_path) {
+                    // remove file reference
+                    group.remove(0, file);
+                    // remove ItemGroup if empty
+                    var new_group = group.findall('Compile').concat(group.findall('Page')).concat(group.findall('Content'));
+                    if(new_group.length < 1) {
+                        this.xml.getroot().remove(0, group);
+                    }
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+};
+
+module.exports = csproj;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/util/default-engines.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/default-engines.js b/cordova-lib/src/plugman/util/default-engines.js
new file mode 100644
index 0000000..5e4f151
--- /dev/null
+++ b/cordova-lib/src/plugman/util/default-engines.js
@@ -0,0 +1,36 @@
+var path = require('path');
+
+module.exports = function(project_dir){
+    return {
+        'cordova':
+            { 'platform':'*', 'scriptSrc': path.join(project_dir,'cordova','version') },
+        'cordova-plugman':
+            { 'platform':'*', 'currentVersion': require('../../package.json').version },
+        'cordova-android':
+            { 'platform':'android', 'scriptSrc': path.join(project_dir,'cordova','version') },
+        'cordova-ios':
+            { 'platform':'ios', 'scriptSrc': path.join(project_dir,'cordova','version') },
+        'cordova-blackberry10':
+            { 'platform':'blackberry10', 'scriptSrc': path.join(project_dir,'cordova','version') },
+        'cordova-wp7':
+            { 'platform':'wp7', 'scriptSrc': path.join(project_dir,'cordova','version') },
+        'cordova-wp8':
+            { 'platform':'wp8', 'scriptSrc': path.join(project_dir,'cordova','version') },
+        'cordova-windows8':
+            { 'platform':'windows8', 'scriptSrc': path.join(project_dir,'cordova','version') },
+        'apple-xcode' :
+            { 'platform':'ios', 'scriptSrc':  path.join(project_dir,'cordova','apple_xcode_version') },
+        'apple-ios' :
+            { 'platform':'ios', 'scriptSrc': path.join(project_dir,'cordova','apple_ios_version') },
+        'apple-osx' :
+            { 'platform':'ios', 'scriptSrc': path.join(project_dir,'cordova','apple_osx_version') },
+        'blackberry-ndk' :
+            { 'platform':'blackberry10', 'scriptSrc': path.join(project_dir,'cordova','bb10-ndk-version') },
+        'android-sdk' :
+            { 'platform':'android', 'scriptSrc': path.join(project_dir,'cordova','android_sdk_version') },
+        'windows-os' :
+            { 'platform':'wp7|wp8|windows8', 'scriptSrc': path.join(project_dir,'cordova','win_os_version') },
+        'windows-sdk' :
+            { 'platform':'wp7|wp8|windows8', 'scriptSrc': path.join(project_dir,'cordova','win_sdk_version') }
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/util/dependencies.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/dependencies.js b/cordova-lib/src/plugman/util/dependencies.js
new file mode 100644
index 0000000..a297372
--- /dev/null
+++ b/cordova-lib/src/plugman/util/dependencies.js
@@ -0,0 +1,96 @@
+var dep_graph = require('dep-graph'),
+    path = require('path'),
+    fs = require('fs'),
+    plugman = require('../../plugman'),
+    config_changes = require('./config-changes'),
+    underscore = require('underscore'),
+    xml_helpers = require('./xml-helpers'),
+    package;
+
+module.exports = package = {
+
+    resolvePath: function(plugin_id, plugins_dir)
+    {
+        return path.join(plugins_dir, plugin_id);
+    },
+
+    resolveConfig: function(plugin_id, plugins_dir)
+    {
+        return path.join(plugins_dir, plugin_id, 'plugin.xml');
+    },
+
+    generate_dependency_info:function(plugins_dir, platform) {
+        var json = config_changes.get_platform_json(plugins_dir, platform);
+
+        // TODO: store whole dependency tree in plugins/[platform].json
+        // in case plugins are forcefully removed...
+        var tlps = [];
+        var graph = new dep_graph();
+        Object.keys(json.installed_plugins).forEach(function(plugin_id) {
+            tlps.push(plugin_id);
+
+            var xml = xml_helpers.parseElementtreeSync( package.resolveConfig(plugin_id, plugins_dir) );
+            var deps = xml.findall('dependency');
+
+            deps && deps.forEach(function(dep) {
+                graph.add(plugin_id, dep.attrib.id);
+            });
+        });
+        Object.keys(json.dependent_plugins).forEach(function(plugin_id) {
+            var xml = xml_helpers.parseElementtreeSync( package.resolveConfig(plugin_id, plugins_dir) );
+            var deps = xml.findall('dependency');
+            deps && deps.forEach(function(dep) {
+                graph.add(plugin_id, dep.attrib.id);
+            });
+        });
+
+        return {
+            graph:graph,
+            top_level_plugins:tlps
+        };
+    },
+
+    // Returns a list of top-level plugins which are (transitively) dependent on the given plugin.
+    dependents: function(plugin_id, plugins_dir, platform) {
+        if(typeof plugins_dir == 'object')
+            var depsInfo = plugins_dir;
+        else
+            var depsInfo = package.generate_dependency_info(plugins_dir, platform);
+
+        var graph = depsInfo.graph;
+        var tlps = depsInfo.top_level_plugins;
+        var dependents = tlps.filter(function(tlp) {
+            return tlp != plugin_id && graph.getChain(tlp).indexOf(plugin_id) >= 0;
+        });
+
+        return dependents;
+    },
+
+    // Returns a list of plugins which the given plugin depends on, for which it is the only dependent.
+    // In other words, if the given plugin were deleted, these dangling dependencies should be deleted too.
+    danglers: function(plugin_id, plugins_dir, platform) {
+        if(typeof plugins_dir == 'object')
+            var depsInfo = plugins_dir;
+        else
+            var depsInfo = package.generate_dependency_info(plugins_dir, platform);
+
+        var graph = depsInfo.graph;
+        var dependencies = graph.getChain(plugin_id);
+
+        var tlps = depsInfo.top_level_plugins;
+        var diff_arr = [];
+        tlps.forEach(function(tlp) {
+            if (tlp != plugin_id) {
+                diff_arr.push(graph.getChain(tlp));
+            }
+        });
+
+        // if this plugin has dependencies, do a set difference to determine which dependencies are not required by other existing plugins
+        diff_arr.unshift(dependencies);
+        var danglers = underscore.difference.apply(null, diff_arr);
+
+        // Ensure no top-level plugins are tagged as danglers.
+        danglers = danglers && danglers.filter(function(x) { return tlps.indexOf(x) < 0; });
+        return danglers;
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/util/metadata.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/metadata.js b/cordova-lib/src/plugman/util/metadata.js
new file mode 100644
index 0000000..cfbb643
--- /dev/null
+++ b/cordova-lib/src/plugman/util/metadata.js
@@ -0,0 +1,19 @@
+var fs = require('fs'),
+    path = require('path');
+
+var filename = '.fetch.json';
+
+exports.get_fetch_metadata = function(plugin_dir) {
+    var filepath = path.join(plugin_dir, filename);
+    if (fs.existsSync(filepath)) {
+        return JSON.parse(fs.readFileSync(filepath, 'utf-8'));
+    } else {
+        return {};
+    }
+};
+
+exports.save_fetch_metadata = function(plugin_dir, data) {
+    var filepath = path.join(plugin_dir, '.fetch.json');
+    fs.writeFileSync(filepath, JSON.stringify(data), 'utf-8');
+};
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/util/plist-helpers.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/plist-helpers.js b/cordova-lib/src/plugman/util/plist-helpers.js
new file mode 100644
index 0000000..e1dfbd9
--- /dev/null
+++ b/cordova-lib/src/plugman/util/plist-helpers.js
@@ -0,0 +1,88 @@
+/*
+ *
+ * Copyright 2013 Brett Rudd
+ *
+ * Licensed 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.
+ *
+*/
+
+// contains PLIST utility functions
+
+var et = require('elementtree'),
+    plist = require('plist-with-patches');
+
+// adds node to doc at selector
+module.exports = {
+    graftPLIST:function (doc, xml, selector) {
+        var obj = plist.parseStringSync("<plist>"+xml+"</plist>");
+
+        var node = doc[selector];
+        if (node && Array.isArray(node) && Array.isArray(obj))
+            doc[selector] = node.concat(obj);
+        else
+            doc[selector] = obj;
+
+        return true;
+    },
+    // removes node from doc at selector
+    prunePLIST:function(doc, xml, selector) {
+        var obj = plist.parseStringSync("<plist>"+xml+"</plist>");
+
+        pruneOBJECT(doc, selector, obj);
+
+        return true;
+    }
+}
+
+function pruneOBJECT(doc, selector, fragment) {
+    if (Array.isArray(fragment) && Array.isArray(doc[selector])) {
+        var empty = true;
+        for (i in fragment) {
+            for (j in doc[selector]) {
+                empty = pruneOBJECT(doc[selector], j, fragment[i]) && empty;
+            }
+        }
+        if (empty)
+        {
+            delete doc[selector];
+            return true;
+        }
+    }
+    else if (nodeEqual(doc[selector], fragment)) {
+        delete doc[selector];
+        return true;
+    }
+
+    return false;
+}
+
+function nodeEqual(node1, node2) {
+    if (typeof node1 != typeof node2)
+        return false;
+    else if (typeof node1 == 'string') {
+        node2 = escapeRE(node2).replace(new RegExp("\\$[a-zA-Z0-9-_]+","gm"),"(.*?)");
+        return new RegExp('^' + node2 + '$').test(node1);
+    }
+    else {
+        for (var key in node2) {
+            if (!nodeEqual(node1[key], node2[key])) return false;
+        }
+        return true;
+    }
+}
+
+// escape string for use in regex
+function escapeRE(str) {
+     return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\$&");
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/util/plugins.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/plugins.js b/cordova-lib/src/plugman/util/plugins.js
new file mode 100644
index 0000000..5a5d14a
--- /dev/null
+++ b/cordova-lib/src/plugman/util/plugins.js
@@ -0,0 +1,100 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed 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 http = require('http'),
+    os = require('os'),
+    path = require('path'),
+    fs = require('fs'),
+    util = require('util'),
+    shell = require('shelljs'),
+    child_process = require('child_process'),
+    Q = require('q'),
+    xml_helpers = require('./xml-helpers'),
+    events = require('../events'),
+    tmp_dir;
+
+module.exports = {
+    searchAndReplace:require('./search-and-replace'),
+
+    clonePluginGit:function(plugin_git_url, plugins_dir, options) {
+        return module.exports.clonePluginGitRepo(plugin_git_url, plugins_dir, options.subdir, options.git_ref).then(
+            function(dst){
+                // Keep location where we checked out git repo
+                options.plugin_src_dir = tmp_dir;
+                return dst;
+            }
+        );
+    },
+
+    // Fetches plugin information from remote server.
+    // Returns a promise.
+    clonePluginGitRepo:function(plugin_git_url, plugins_dir, subdir, git_ref) {
+
+        if(!shell.which('git')) {
+            return Q.reject(new Error('"git" command line tool is not installed: make sure it is accessible on your PATH.'));
+        }
+        tmp_dir = path.join(os.tmpdir(), 'plugman', 'git', String((new Date).valueOf()));
+
+        shell.rm('-rf', tmp_dir);
+
+        var cmd = util.format('git clone "%s" "%s"', plugin_git_url, tmp_dir);
+        events.emit('verbose', 'Fetching plugin via git-clone command: ' + cmd);
+        var d = Q.defer();
+
+        child_process.exec(cmd, function(err, stdout, stderr) {
+            if (err) {
+                d.reject(err);
+            } else {
+                d.resolve();
+            }
+        });
+        return d.promise.then(function() {
+            events.emit('verbose', 'Plugin "' + plugin_git_url + '" fetched.');
+            // Check out the specified revision, if provided.
+            if (git_ref) {
+                var cmd = util.format('git checkout "%s"', git_ref);
+                var d2 = Q.defer();
+                child_process.exec(cmd, { cwd: tmp_dir }, function(err, stdout, stderr) {
+                    if (err) d2.reject(err);
+                    else d2.resolve();
+                });
+                return d2.promise.then(function() {
+                    events.emit('log', 'Plugin "' + plugin_git_url + '" checked out to git ref "' + git_ref + '".');
+                });
+            }
+        }).then(function() {
+            // Read the plugin.xml file and extract the plugin's ID.
+            tmp_dir = path.join(tmp_dir, subdir);
+            // TODO: what if plugin.xml does not exist?
+            var xml_file = path.join(tmp_dir, 'plugin.xml');
+            var xml = xml_helpers.parseElementtreeSync(xml_file);
+            var plugin_id = xml.getroot().attrib.id;
+
+            // TODO: what if a plugin depended on different subdirectories of the same plugin? this would fail.
+            // should probably copy over entire plugin git repo contents into plugins_dir and handle subdir separately during install.
+            var plugin_dir = path.join(plugins_dir, plugin_id);
+            events.emit('verbose', 'Copying fetched plugin over "' + plugin_dir + '"...');
+            shell.cp('-R', path.join(tmp_dir, '*'), plugin_dir);
+
+            events.emit('verbose', 'Plugin "' + plugin_id + '" fetched.');
+            return plugin_dir;
+        });
+    }
+};
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/util/search-and-replace.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/search-and-replace.js b/cordova-lib/src/plugman/util/search-and-replace.js
new file mode 100644
index 0000000..39bd9c3
--- /dev/null
+++ b/cordova-lib/src/plugman/util/search-and-replace.js
@@ -0,0 +1,37 @@
+#!/usr/bin/env node
+/*
+ *
+ * Copyright 2013 Brett Rudd
+ *
+ * Licensed 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 glob = require('glob'),
+    fs = require('fs');
+
+module.exports = function searchAndReplace(srcGlob, variables) {
+    var files = glob.sync(srcGlob);
+    for (var i in files) {
+        var file = files[i];
+        if (fs.lstatSync(file).isFile()) {
+            var contents = fs.readFileSync(file, "utf-8");
+            for (var key in variables) {
+                var regExp = new RegExp("\\$" + key, "g");
+                contents = contents.replace(regExp, variables[key]);
+            }
+            fs.writeFileSync(file, contents);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/util/w8jsproj.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/w8jsproj.js b/cordova-lib/src/plugman/util/w8jsproj.js
new file mode 100644
index 0000000..903a214
--- /dev/null
+++ b/cordova-lib/src/plugman/util/w8jsproj.js
@@ -0,0 +1,239 @@
+/*
+  Helper for dealing with Windows Store JS app .jsproj files
+*/
+
+
+var xml_helpers = require('./xml-helpers'),
+    et = require('elementtree'),
+    fs = require('fs'),
+    shell = require('shelljs'),
+    events = require('../events'),
+    path = require('path');
+
+var WindowsStoreProjectTypeGUID = "{BC8A1FFA-BEE3-4634-8014-F334798102B3}";  // any of the below, subtype
+var WinCSharpProjectTypeGUID = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}";    // .csproj
+var WinVBnetProjectTypeGUID = "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}";     // who the ef cares?
+var WinCplusplusProjectTypeGUID = "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}"; // .vcxproj
+
+
+function jsproj(location) {
+    events.emit('verbose','creating jsproj from project at : ' + location);
+    this.location = location;
+    this.xml = xml_helpers.parseElementtreeSync(location);
+    return this;
+}
+
+jsproj.prototype = {
+    location:null,
+    xml:null,
+    plugins_dir:"Plugins",
+    write:function() {
+        fs.writeFileSync(this.location, this.xml.write({indent:4}), 'utf-8');
+    },
+    // add/remove the item group for SDKReference
+    // example :
+    // <ItemGroup><SDKReference Include="Microsoft.VCLibs, version=12.0" /></ItemGroup>
+    addSDKRef:function(incText) {
+        var item_group = new et.Element('ItemGroup');
+        var elem = new et.Element('SDKReference');
+        elem.attrib.Include = incText;
+
+        item_group.append(elem);
+        this.xml.getroot().append(item_group);
+    },
+
+    removeSDKRef:function(incText) {
+        var item_group = this.xml.find('ItemGroup/SDKReference[@Include="' + incText + '"]/..');
+        if(item_group) { // TODO: error handling
+            this.xml.getroot().remove(0, item_group);
+        }
+    },
+
+    addReference:function(relPath,src) {
+
+        events.emit('verbose','addReference::' + relPath);
+
+        var item = new et.Element('ItemGroup');
+        var extName = path.extname(relPath);
+
+        var elem = new et.Element('Reference');
+        // add file name
+        elem.attrib.Include = path.basename(relPath, extName);
+
+        // add hint path with full path
+        var hint_path = new et.Element('HintPath');
+            hint_path.text = relPath;
+
+        elem.append(hint_path);
+
+        if(extName == ".winmd") {
+            var mdFileTag = new et.Element("IsWinMDFile");
+                mdFileTag.text = "true";
+            elem.append(mdFileTag);
+        }
+
+        item.append(elem);
+        this.xml.getroot().append(item);
+    },
+
+    removeReference:function(relPath) {
+        events.emit('verbose','removeReference::' + relPath);
+
+        var extName = path.extname(relPath);
+        var includeText = path.basename(relPath,extName);
+        // <ItemGroup>
+        //   <Reference Include="WindowsRuntimeComponent1">
+        var item_group = this.xml.find('ItemGroup/Reference[@Include="' + includeText + '"]/..');
+
+        if(item_group) { // TODO: erro handling
+            this.xml.getroot().remove(0, item_group);
+        }
+    },
+
+    addSourceFile:function(relative_path) {
+
+        relative_path = relative_path.split('/').join('\\');
+        // make ItemGroup to hold file.
+        var item = new et.Element('ItemGroup');
+
+        var content = new et.Element('Content');
+            content.attrib.Include = relative_path;
+        item.append(content);
+
+        this.xml.getroot().append(item);
+    },
+
+    removeSourceFile:function(relative_path) {
+
+        // path.normalize(relative_path);// ??
+        relative_path = relative_path.split('/').join('\\');
+        // var oneStep = this.xml.findall('ItemGroup/Content[@Include="' + relative_path + '""]/..');
+
+        var item_groups = this.xml.findall('ItemGroup');
+        for (var i = 0, l = item_groups.length; i < l; i++) {
+            var group = item_groups[i];
+            var files = group.findall('Content');
+            for (var j = 0, k = files.length; j < k; j++) {
+                var file = files[j];
+                if (file.attrib.Include == relative_path) {
+                    // remove file reference
+                    group.remove(0, file);
+                    // remove ItemGroup if empty
+                    var new_group = group.findall('Content');
+                    if(new_group.length < 1) {
+                        this.xml.getroot().remove(0, group);
+                    }
+                    return true;
+                }
+            }
+        }
+        return false;
+    },
+    // relative path must include the project file, so we can determine .csproj, .jsproj, .vcxproj...
+    addProjectReference:function(relative_path) {
+        events.emit('verbose','adding project reference to ' + relative_path);
+
+        relative_path = relative_path.split('/').join('\\');
+        // read the solution path from the base directory
+        var solutionPath = shell.ls(path.join(path.dirname(this.location),"*.sln"))[0];// TODO:error handling
+        // note we may not have a solution, in which case just add a project reference, I guess ..
+        // get the project extension to figure out project type
+        var projectExt = path.extname(relative_path);
+
+        var pluginProjectXML = xml_helpers.parseElementtreeSync(relative_path);
+        // find the guid + name of the referenced project
+        var projectGuid = pluginProjectXML.find("PropertyGroup/ProjectGuid").text;
+        var projName = pluginProjectXML.find("PropertyGroup/ProjectName").text;
+
+        var preInsertText = "ProjectSection(ProjectDependencies) = postProject\n\r" +
+                             projectGuid + "=" + projectGuid + "\n\r" +
+                            "EndProjectSection\n\r";
+
+        // read in the solution file
+        var solText = fs.readFileSync(solutionPath,{encoding:"utf8"});
+        var splitText = solText.split("EndProject");
+        if(splitText.length != 2) {
+            throw new Error("too many projects in solution.");
+        }
+
+        var projectTypeGuid = null;
+        if(projectExt == ".vcxproj") {
+            projectTypeGuid = WinCplusplusProjectTypeGUID;
+        }
+        else if(projectExt == ".csproj") {
+            projectTypeGuid = WinCSharpProjectTypeGUID;
+        }
+
+        if(!projectTypeGuid) {
+            throw new Error("unrecognized project type");
+        }
+
+        var postInsertText = 'Project("' + projectTypeGuid + '") = "' +
+                         projName + '", "' + relative_path + '",' +
+                        '"' + projectGuid + '"\n\r EndProject\n\r';
+
+        solText = splitText[0] + preInsertText + "EndProject\n\r" + postInsertText + splitText[1];
+        fs.writeFileSync(solutionPath,solText,{encoding:"utf8"});
+
+
+        // Add the ItemGroup/ProjectReference to the cordova project :
+        // <ItemGroup><ProjectReference Include="blahblah.csproj"/></ItemGroup>
+        var item = new et.Element('ItemGroup');
+
+        var projRef = new et.Element('ProjectReference');
+            projRef.attrib.Include = relative_path;
+            item.append(projRef);
+        this.xml.getroot().append(item);
+
+    },
+    removeProjectReference:function(relative_path) {
+        events.emit('verbose','removing project reference to ' + relative_path);
+
+        // find the guid + name of the referenced project
+        var pluginProjectXML = xml_helpers.parseElementtreeSync(relative_path);
+        var projectGuid = pluginProjectXML.find("PropertyGroup/ProjectGuid").text;
+        var projName = pluginProjectXML.find("PropertyGroup/ProjectName").text;
+
+        // get the project extension to figure out project type
+        var projectExt = path.extname(relative_path);
+        // get the project type
+        var projectTypeGuid = null;
+        if(projectExt == ".vcxproj") {
+            projectTypeGuid = WinCplusplusProjectTypeGUID;
+        }
+        else if(projectExt == ".csproj") {
+            projectTypeGuid = WinCSharpProjectTypeGUID;
+        }
+
+        if(!projectTypeGuid) {
+            throw new Error("unrecognized project type");
+        }
+
+        var preInsertText = "ProjectSection(ProjectDependencies) = postProject\n\r" +
+                             projectGuid + "=" + projectGuid + "\n\r" +
+                            "EndProjectSection\n\r";
+
+        var postInsertText = 'Project("' + projectTypeGuid + '") = "' +
+                              projName + '", "' + relative_path + '",' +
+                              '"' + projectGuid + '"\n\r EndProject\n\r';
+
+        // find and read in the solution file
+        var solutionPath = shell.ls(path.join(path.dirname(this.location),"*.sln"))[0];  // TODO:error handling
+        var solText = fs.readFileSync(solutionPath,{encoding:"utf8"});
+        var splitText = solText.split(preInsertText);
+
+        solText = splitText.join("").split(postInsertText);
+        solText = solText.join("");
+
+        fs.writeFileSync(solutionPath,solText,{encoding:"utf8"});
+
+        // select first ItemsGroups with a ChildNode ProjectReference
+        // ideally select all, and look for @attrib 'Include'= projectFullPath
+        var projectRefNodesPar = this.xml.find("ItemGroup/ProjectReference[@Include='" + relative_path + "']/..");
+        if(projectRefNodesPar) {
+            this.xml.getroot().remove(0, projectRefNodesPar);
+        }
+    }
+};
+
+module.exports = jsproj;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/src/plugman/util/xml-helpers.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/xml-helpers.js b/cordova-lib/src/plugman/util/xml-helpers.js
new file mode 100644
index 0000000..601ed4d
--- /dev/null
+++ b/cordova-lib/src/plugman/util/xml-helpers.js
@@ -0,0 +1,196 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed 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.
+ *
+*/
+
+/**
+ * contains XML utility functions, some of which are specific to elementtree
+ */
+
+var fs = require('fs')
+  , path = require('path')
+  , _ = require('underscore')
+  , et = require('elementtree');
+
+module.exports = {
+    moveProjFile: function(origFile, projPath, callback) {
+        var src = path.resolve(projPath, origFile)
+          , dest = src.replace('.orig', '');
+
+        fs.createReadStream(src)
+            .pipe(fs.createWriteStream(dest))
+            .on('close', callback);
+    },
+
+    // compare two et.XML nodes, see if they match
+    // compares tagName, text, attributes and children (recursively)
+    equalNodes: function(one, two) {
+        if (one.tag != two.tag) {
+            return false;
+        } else if (one.text.trim() != two.text.trim()) {
+            return false;
+        } else if (one._children.length != two._children.length) {
+            return false;
+        }
+
+        var oneAttribKeys = Object.keys(one.attrib),
+            twoAttribKeys = Object.keys(two.attrib),
+            i = 0, attribName;
+
+        if (oneAttribKeys.length != twoAttribKeys.length) {
+            return false;
+        }
+
+        for (i; i < oneAttribKeys.length; i++) {
+            attribName = oneAttribKeys[i];
+
+            if (one.attrib[attribName] != two.attrib[attribName]) {
+                return false;
+            }
+        }
+
+        for (i; i < one._children.length; i++) {
+            if (!module.exports.equalNodes(one._children[i], two._children[i])) {
+                return false;
+            }
+        }
+
+        return true;
+    },
+
+    // adds node to doc at selector, creating parent if it doesn't exist
+    graftXML: function(doc, nodes, selector, after) {
+        var parent = resolveParent(doc, selector);
+        if (!parent) {
+            //Try to create the parent recursively if necessary
+            try {
+                var parentToCreate = et.XML("<" + path.basename(selector) + ">"),
+                    parentSelector = path.dirname(selector);
+
+                this.graftXML(doc, [parentToCreate], parentSelector);
+            } catch (e) {
+                return false;
+            }
+            parent = resolveParent(doc, selector);
+            if (!parent) return false;
+        }
+
+        nodes.forEach(function (node) {
+            // check if child is unique first
+            if (uniqueChild(node, parent)) {
+                var children = parent.getchildren();
+                var insertIdx = after ? findInsertIdx(children, after) : children.length;
+
+                //TODO: replace with parent.insert after the bug in ElementTree is fixed
+                parent.getchildren().splice(insertIdx, 0, node);
+            }
+        });
+
+        return true;
+    },
+
+    // removes node from doc at selector
+    pruneXML: function(doc, nodes, selector) {
+        var parent = resolveParent(doc, selector);
+        if (!parent) return false;
+
+        nodes.forEach(function (node) {
+            var matchingKid = null;
+            if ((matchingKid = findChild(node, parent)) != null) {
+                // stupid elementtree takes an index argument it doesn't use
+                // and does not conform to the python lib
+                parent.remove(0, matchingKid);
+            }
+        });
+
+        return true;
+    },
+
+    parseElementtreeSync: function (filename) {
+        var contents = fs.readFileSync(filename, 'utf-8').replace("\ufeff", "");;
+        return new et.ElementTree(et.XML(contents));
+    }
+};
+
+function findChild(node, parent) {
+    var matchingKids = parent.findall(node.tag)
+      , i, j;
+
+    for (i = 0, j = matchingKids.length ; i < j ; i++) {
+        if (module.exports.equalNodes(node, matchingKids[i])) {
+            return matchingKids[i];
+        }
+    }
+    return null;
+}
+
+function uniqueChild(node, parent) {
+    var matchingKids = parent.findall(node.tag)
+      , i = 0;
+
+    if (matchingKids.length == 0) {
+        return true;
+    } else  {
+        for (i; i < matchingKids.length; i++) {
+            if (module.exports.equalNodes(node, matchingKids[i])) {
+                return false;
+            }
+        }
+        return true;
+    }
+}
+
+var ROOT = /^\/([^\/]*)/,
+    ABSOLUTE = /^\/([^\/]*)\/(.*)/;
+function resolveParent(doc, selector) {
+    var parent, tagName, subSelector;
+
+    // handle absolute selector (which elementtree doesn't like)
+    if (ROOT.test(selector)) {
+        tagName = selector.match(ROOT)[1];
+        // test for wildcard "any-tag" root selector
+        if (tagName == '*' || tagName === doc._root.tag) {
+            parent = doc._root;
+
+            // could be an absolute path, but not selecting the root
+            if (ABSOLUTE.test(selector)) {
+                subSelector = selector.match(ABSOLUTE)[2];
+                parent = parent.find(subSelector)
+            }
+        } else {
+            return false;
+        }
+    } else {
+        parent = doc.find(selector)
+    }
+    return parent;
+}
+
+// Find the index at which to insert an entry. After is a ;-separated priority list
+// of tags after which the insertion should be made. E.g. If we need to
+// insert an element C, and the rule is that the order of children has to be
+// As, Bs, Cs. After will be equal to "C;B;A".
+
+function findInsertIdx(children, after) {
+    var childrenTags = children.map(function(child) { return child.tag; });
+    var afters = after.split(";");
+    var afterIndexes = afters.map(function(current) { return childrenTags.lastIndexOf(current); });
+    var foundIndex = _.find(afterIndexes, function(index) { return index != -1; });
+
+    //add to the beginning if no matching nodes are found
+    return typeof foundIndex === 'undefined' ? 0 : foundIndex+1;
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/templates/base.js
----------------------------------------------------------------------
diff --git a/cordova-lib/templates/base.js b/cordova-lib/templates/base.js
new file mode 100644
index 0000000..20af664
--- /dev/null
+++ b/cordova-lib/templates/base.js
@@ -0,0 +1,5 @@
+var exec = require('cordova/exec');
+
+exports.coolMethod = function(arg0, success, error) {
+    exec(success, error, "%pluginName%", "coolMethod", [arg0]);
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/templates/platforms/android/android.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/templates/platforms/android/android.xml b/cordova-lib/templates/platforms/android/android.xml
new file mode 100644
index 0000000..c3dc1b7
--- /dev/null
+++ b/cordova-lib/templates/platforms/android/android.xml
@@ -0,0 +1,12 @@
+<platform name="android">
+    <config-file target="res/xml/config.xml" parent="/*">
+        <feature name="%pluginName%">
+            <param name="android-package" value="%pluginID%.%pluginName%"/>
+        </feature>
+    </config-file>
+    <config-file target="AndroidManifest.xml" parent="/*">
+        <!--add permissions -->
+    </config-file>
+
+    <source-file src="src/android/%pluginName%.java" target-dir="src/%packageName%/%pluginName%" />
+</platform>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/templates/platforms/android/base.java
----------------------------------------------------------------------
diff --git a/cordova-lib/templates/platforms/android/base.java b/cordova-lib/templates/platforms/android/base.java
new file mode 100644
index 0000000..3136c1c
--- /dev/null
+++ b/cordova-lib/templates/platforms/android/base.java
@@ -0,0 +1,32 @@
+package %pluginID%;
+
+import org.apache.cordova.CordovaPlugin;
+import org.apache.cordova.CallbackContext;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+/**
+ * This class echoes a string called from JavaScript.
+ */
+public class CDV%pluginName% extends CordovaPlugin {
+
+    @Override
+    public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
+        if (action.equals("coolMethod")) {
+            String message = args.getString(0);
+            this.coolMethod(message, callbackContext);
+            return true;
+        }
+        return false;
+    }
+
+    private void coolMethod(String message, CallbackContext callbackContext) {
+        if (message != null && message.length() > 0) {
+            callbackContext.success(message);
+        } else {
+            callbackContext.error("Expected one non-empty string argument.");
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/templates/platforms/ios/base.m
----------------------------------------------------------------------
diff --git a/cordova-lib/templates/platforms/ios/base.m b/cordova-lib/templates/platforms/ios/base.m
new file mode 100644
index 0000000..cb25117
--- /dev/null
+++ b/cordova-lib/templates/platforms/ios/base.m
@@ -0,0 +1,28 @@
+/********* CDV%pluginName%.m Cordova Plugin Implementation *******/
+
+#import <Cordova/CDV.h>
+
+@interface CDV%pluginName% : CDVPlugin {
+  // Member variables go here.
+}
+
+- (void)coolMethod:(CDVInvokedUrlCommand*)command;
+@end
+
+@implementation CDV%pluginName%
+
+- (void)coolMethod:(CDVInvokedUrlCommand*)command
+{
+    CDVPluginResult* pluginResult = nil;
+    NSString* echo = [command.arguments objectAtIndex:0];
+
+    if (echo != nil && [echo length] > 0) {
+        pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:echo];
+    } else {
+        pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR];
+    }
+
+    [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/templates/platforms/ios/ios.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/templates/platforms/ios/ios.xml b/cordova-lib/templates/platforms/ios/ios.xml
new file mode 100644
index 0000000..6600567
--- /dev/null
+++ b/cordova-lib/templates/platforms/ios/ios.xml
@@ -0,0 +1,9 @@
+<platform name="ios">
+    <config-file target="config.xml" parent="/*">
+        <feature name="%pluginName%">
+            <param name="ios-package" value="%pluginName%" />
+        </feature>
+    </config-file>
+
+    <source-file src="src/ios/CDV%pluginName%.m" />
+</platform>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/doc/base.js
----------------------------------------------------------------------
diff --git a/doc/base.js b/doc/base.js
deleted file mode 100644
index 20af664..0000000
--- a/doc/base.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var exec = require('cordova/exec');
-
-exports.coolMethod = function(arg0, success, error) {
-    exec(success, error, "%pluginName%", "coolMethod", [arg0]);
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/doc/platforms/android/android.xml
----------------------------------------------------------------------
diff --git a/doc/platforms/android/android.xml b/doc/platforms/android/android.xml
deleted file mode 100644
index c3dc1b7..0000000
--- a/doc/platforms/android/android.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<platform name="android">
-    <config-file target="res/xml/config.xml" parent="/*">
-        <feature name="%pluginName%">
-            <param name="android-package" value="%pluginID%.%pluginName%"/>
-        </feature>
-    </config-file>
-    <config-file target="AndroidManifest.xml" parent="/*">
-        <!--add permissions -->
-    </config-file>
-
-    <source-file src="src/android/%pluginName%.java" target-dir="src/%packageName%/%pluginName%" />
-</platform>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/doc/platforms/android/base.java
----------------------------------------------------------------------
diff --git a/doc/platforms/android/base.java b/doc/platforms/android/base.java
deleted file mode 100644
index 3136c1c..0000000
--- a/doc/platforms/android/base.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package %pluginID%;
-
-import org.apache.cordova.CordovaPlugin;
-import org.apache.cordova.CallbackContext;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-/**
- * This class echoes a string called from JavaScript.
- */
-public class CDV%pluginName% extends CordovaPlugin {
-
-    @Override
-    public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
-        if (action.equals("coolMethod")) {
-            String message = args.getString(0);
-            this.coolMethod(message, callbackContext);
-            return true;
-        }
-        return false;
-    }
-
-    private void coolMethod(String message, CallbackContext callbackContext) {
-        if (message != null && message.length() > 0) {
-            callbackContext.success(message);
-        } else {
-            callbackContext.error("Expected one non-empty string argument.");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/doc/platforms/ios/base.m
----------------------------------------------------------------------
diff --git a/doc/platforms/ios/base.m b/doc/platforms/ios/base.m
deleted file mode 100644
index cb25117..0000000
--- a/doc/platforms/ios/base.m
+++ /dev/null
@@ -1,28 +0,0 @@
-/********* CDV%pluginName%.m Cordova Plugin Implementation *******/
-
-#import <Cordova/CDV.h>
-
-@interface CDV%pluginName% : CDVPlugin {
-  // Member variables go here.
-}
-
-- (void)coolMethod:(CDVInvokedUrlCommand*)command;
-@end
-
-@implementation CDV%pluginName%
-
-- (void)coolMethod:(CDVInvokedUrlCommand*)command
-{
-    CDVPluginResult* pluginResult = nil;
-    NSString* echo = [command.arguments objectAtIndex:0];
-
-    if (echo != nil && [echo length] > 0) {
-        pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:echo];
-    } else {
-        pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR];
-    }
-
-    [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/doc/platforms/ios/ios.xml
----------------------------------------------------------------------
diff --git a/doc/platforms/ios/ios.xml b/doc/platforms/ios/ios.xml
deleted file mode 100644
index 6600567..0000000
--- a/doc/platforms/ios/ios.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<platform name="ios">
-    <config-file target="config.xml" parent="/*">
-        <feature name="%pluginName%">
-            <param name="ios-package" value="%pluginName%" />
-        </feature>
-    </config-file>
-
-    <source-file src="src/ios/CDV%pluginName%.m" />
-</platform>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/plugman.js
----------------------------------------------------------------------
diff --git a/plugman.js b/plugman.js
deleted file mode 100644
index 4aa1843..0000000
--- a/plugman.js
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-
-// copyright (c) 2013 Andrew Lunny, Adobe Systems
-
-var events = require('./src/events');
-var Q = require('q');
-
-function addProperty(o, symbol, modulePath, doWrap) {
-    var val = null;
-
-    if (doWrap) {
-        o[symbol] = function() {
-            val = val || require(modulePath);
-            if (arguments.length && typeof arguments[arguments.length - 1] === 'function') {
-                // If args exist and the last one is a function, it's the callback.
-                var args = Array.prototype.slice.call(arguments);
-                var cb = args.pop();
-                val.apply(o, args).done(function(result) {cb(undefined, result)}, cb);
-            } else {
-                val.apply(o, arguments).done(null, function(err){ throw err; });
-            }
-        };
-    } else {
-        // The top-level plugman.foo
-        Object.defineProperty(o, symbol, {
-            get : function() { return val = val || require(modulePath); },
-            set : function(v) { val = v; }
-        });
-    }
-
-    // The plugman.raw.foo
-    Object.defineProperty(o.raw, symbol, {
-        get : function() { return val = val || require(modulePath); },
-        set : function(v) { val = v; }
-    });
-}
-
-plugman = {
-    on:                 events.on.bind(events),
-    off:                events.removeListener.bind(events),
-    removeAllListeners: events.removeAllListeners.bind(events),
-    emit:               events.emit.bind(events),
-    raw:                {}
-};
-
-addProperty(plugman, 'help', './src/help');
-addProperty(plugman, 'install', './src/install', true);
-addProperty(plugman, 'uninstall', './src/uninstall', true);
-addProperty(plugman, 'fetch', './src/fetch', true);
-addProperty(plugman, 'prepare', './src/prepare');
-addProperty(plugman, 'config', './src/config', true);
-addProperty(plugman, 'owner', './src/owner', true);
-addProperty(plugman, 'adduser', './src/adduser', true);
-addProperty(plugman, 'publish', './src/publish', true);
-addProperty(plugman, 'unpublish', './src/unpublish', true);
-addProperty(plugman, 'search', './src/search', true);
-addProperty(plugman, 'info', './src/info', true);
-addProperty(plugman, 'create', './src/create', true);
-addProperty(plugman, 'platform', './src/platform_operation', true);
-addProperty(plugman, 'config_changes', './src/util/config-changes');
-
-plugman.commands =  {
-    'config'   : function(cli_opts) {
-        plugman.config(cli_opts.argv.remain, function(err) {
-            if (err) throw err;
-            else console.log('done');
-        });
-    },
-    'owner'   : function(cli_opts) {
-        plugman.owner(cli_opts.argv.remain);
-    },
-    'install'  : function(cli_opts) {
-        if(!cli_opts.platform || !cli_opts.project || !cli_opts.plugin) {
-            return console.log(plugman.help());
-        }
-        var cli_variables = {}
-        if (cli_opts.variable) {
-            cli_opts.variable.forEach(function (variable) {
-                    var tokens = variable.split('=');
-                    var key = tokens.shift().toUpperCase();
-                    if (/^[\w-_]+$/.test(key)) cli_variables[key] = tokens.join('=');
-                    });
-        }
-        var opts = {
-            subdir: '.',
-            cli_variables: cli_variables,
-            www_dir: cli_opts.www,
-            searchpath: cli_opts.searchpath
-        };
-
-        var p = Q();
-        cli_opts.plugin.forEach(function (pluginSrc) {
-            p = p.then(function () {
-                return plugman.raw.install(cli_opts.platform, cli_opts.project, pluginSrc, cli_opts.plugins_dir, opts);
-            })
-        });
-        
-        return p;
-    },
-    'uninstall': function(cli_opts) {
-        if(!cli_opts.platform || !cli_opts.project || !cli_opts.plugin) {
-            return console.log(plugman.help());
-        }
-
-        var p = Q();
-        cli_opts.plugin.forEach(function (pluginSrc) {
-            p = p.then(function () {
-                return plugman.raw.uninstall(cli_opts.platform, cli_opts.project, pluginSrc, cli_opts.plugins_dir, { www_dir: cli_opts.www });
-            });
-        });
-
-        return p;
-    },
-    'adduser'  : function(cli_opts) {
-        plugman.adduser(function(err) {
-            if (err) throw err;
-            else console.log('user added');
-        });
-    },
-
-    'search'   : function(cli_opts) {
-        plugman.search(cli_opts.argv.remain, function(err, plugins) {
-            if (err) throw err;
-            else {
-                for(var plugin in plugins) {
-                    console.log(plugins[plugin].name, '-', plugins[plugin].description || 'no description provided');
-                }
-            }
-        });
-    },
-    'info'     : function(cli_opts) {
-        plugman.info(cli_opts.argv.remain, function(err, plugin_info) {
-            if (err) throw err;
-            else {
-                console.log('name:', plugin_info.name);
-                console.log('version:', plugin_info.version);
-                if (plugin_info.engines) {
-                    for(var i = 0, j = plugin_info.engines.length ; i < j ; i++) {
-                        console.log(plugin_info.engines[i].name, 'version:', plugin_info.engines[i].version);
-                    }
-                }
-            }
-        });
-    },
-
-    'publish'  : function(cli_opts) {
-        var plugin_path = cli_opts.argv.remain;
-        if(!plugin_path) {
-            return console.log(plugman.help());
-        }
-        plugman.publish(plugin_path, function(err) {
-            if (err) throw err;
-            else console.log('Plugin published');
-        });
-    },
-
-    'unpublish': function(cli_opts) {
-        var plugin = cli_opts.argv.remain;
-        if(!plugin) {
-            return console.log(plugman.help());
-        }
-        plugman.unpublish(plugin, function(err) {
-            if (err) throw err;
-            else console.log('Plugin unpublished');
-        });
-    },
-    'create': function(cli_opts) {
-        if( !cli_opts.name || !cli_opts.plugin_id || !cli_opts.plugin_version) {
-            return console.log( plugman.help() );
-        }
-        var cli_variables = {};
-        if (cli_opts.variable) {
-            cli_opts.variable.forEach(function (variable) {
-                    var tokens = variable.split('=');
-                    var key = tokens.shift().toUpperCase();
-                    if (/^[\w-_]+$/.test(key)) cli_variables[key] = tokens.join('=');
-                    });
-        }
-        plugman.create( cli_opts.name, cli_opts.plugin_id, cli_opts.plugin_version, cli_opts.path || ".", cli_variables );
-    },
-    'platform': function(cli_opts) {
-        var operation = cli_opts.argv.remain[ 0 ] || "";
-        if( ( operation !== 'add' && operation !== 'remove' ) ||  !cli_opts.platform_name ) {
-            return console.log( plugman.help() );
-        }
-        plugman.platform( { operation: operation, platform_name: cli_opts.platform_name } );
-    }
-};
-
-module.exports = plugman;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/add_platform.spec.js
----------------------------------------------------------------------
diff --git a/spec/add_platform.spec.js b/spec/add_platform.spec.js
deleted file mode 100644
index 18bad02..0000000
--- a/spec/add_platform.spec.js
+++ /dev/null
@@ -1,64 +0,0 @@
-var platform = require('../src/platform'),
-    Q = require('q'),
-    fs = require('fs'),
-    shell = require('shelljs'),
-    plugman = require('../plugman');
-
-describe( 'platform add/remove', function() {
-    it( 'should call platform add', function() {
-        var sPlatformA = spyOn( platform, 'add' ).andReturn(Q()),
-            sPlatformR = spyOn( platform, 'remove' ).andReturn(Q());
-        platform.add();
-        expect(sPlatformA).toHaveBeenCalled();
-        platform.remove();
-        expect(sPlatformR).toHaveBeenCalled();
-    });
-});
-
-
-describe( 'platform add', function() {
-    var done = false,
-        existsSync,
-        mkdir,
-        writeFileSync;
-    function platformPromise( f ) {
-        f.then( function() { done = true; }, function(err) { done = err; } );
-    }
-    beforeEach( function() {
-        existsSync = spyOn( fs, 'existsSync' ).andReturn( false );
-        done = false;
-    });
-    it( 'should error on non existing plugin.xml', function() {
-        runs(function() {
-            platformPromise( platform.add() );
-        });
-        waitsFor(function() { return done; }, 'platform promise never resolved', 500);
-        runs(function() {
-            expect(''+ done ).toContain( "can't find a plugin.xml.  Are you in the plugin?"  );
-        });
-    });
-});
-
-
-describe( 'platform remove', function() {
-    var done = false,
-        existsSync,
-        mkdir,
-        writeFileSync;
-    function platformPromise( f ) {
-        f.then( function() { done = true; }, function(err) { done = err; } );
-    }
-    beforeEach( function() {
-        existsSync = spyOn( fs, 'existsSync' ).andReturn( false );
-        done = false;
-    });
-    it( 'should error on non existing plugin.xml', function() {
-        runs(function() {
-            platformPromise( platform.remove() );
-        });
-        waitsFor(function() { return done; }, 'platform promise never resolved', 500);
-        runs(function() {
-            expect(''+ done ).toContain( "can't find a plugin.xml.  Are you in the plugin?"  );
-        });
-    });
-});


[14/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/src/blackberry10/native/public/json/value.h
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/src/blackberry10/native/public/json/value.h b/spec/plugins/cordova.echo/src/blackberry10/native/public/json/value.h
deleted file mode 100644
index 912b830..0000000
--- a/spec/plugins/cordova.echo/src/blackberry10/native/public/json/value.h
+++ /dev/null
@@ -1,1069 +0,0 @@
-#ifndef CPPTL_JSON_H_INCLUDED
-# define CPPTL_JSON_H_INCLUDED
-
-# include "forwards.h"
-# include <string>
-# include <vector>
-
-# ifndef JSON_USE_CPPTL_SMALLMAP
-#  include <map>
-# else
-#  include <cpptl/smallmap.h>
-# endif
-# ifdef JSON_USE_CPPTL
-#  include <cpptl/forwards.h>
-# endif
-
-/** \brief JSON (JavaScript Object Notation).
- */
-namespace Json {
-
-   /** \brief Type of the value held by a Value object.
-    */
-   enum ValueType
-   {
-      nullValue = 0, ///< 'null' value
-      intValue,      ///< signed integer value
-      uintValue,     ///< unsigned integer value
-      realValue,     ///< double value
-      stringValue,   ///< UTF-8 string value
-      booleanValue,  ///< bool value
-      arrayValue,    ///< array value (ordered list)
-      objectValue    ///< object value (collection of name/value pairs).
-   };
-
-   enum CommentPlacement
-   {
-      commentBefore = 0,        ///< a comment placed on the line before a value
-      commentAfterOnSameLine,   ///< a comment just after a value on the same line
-      commentAfter,             ///< a comment on the line after a value (only make sense for root value)
-      numberOfCommentPlacement
-   };
-
-//# ifdef JSON_USE_CPPTL
-//   typedef CppTL::AnyEnumerator<const char *> EnumMemberNames;
-//   typedef CppTL::AnyEnumerator<const Value &> EnumValues;
-//# endif
-
-   /** \brief Lightweight wrapper to tag static string.
-    *
-    * Value constructor and objectValue member assignment takes advantage of the
-    * StaticString and avoid the cost of string duplication when storing the
-    * string or the member name.
-    *
-    * Example of usage:
-    * \code
-    * Json::Value aValue( StaticString("some text") );
-    * Json::Value object;
-    * static const StaticString code("code");
-    * object[code] = 1234;
-    * \endcode
-    */
-   class JSON_API StaticString
-   {
-   public:
-      explicit StaticString( const char *czstring )
-         : str_( czstring )
-      {
-      }
-
-      operator const char *() const
-      {
-         return str_;
-      }
-
-      const char *c_str() const
-      {
-         return str_;
-      }
-
-   private:
-      const char *str_;
-   };
-
-   /** \brief Represents a <a HREF="http://www.json.org">JSON</a> value.
-    *
-    * This class is a discriminated union wrapper that can represents a:
-    * - signed integer [range: Value::minInt - Value::maxInt]
-    * - unsigned integer (range: 0 - Value::maxUInt)
-    * - double
-    * - UTF-8 string
-    * - boolean
-    * - 'null'
-    * - an ordered list of Value
-    * - collection of name/value pairs (javascript object)
-    *
-    * The type of the held value is represented by a #ValueType and 
-    * can be obtained using type().
-    *
-    * values of an #objectValue or #arrayValue can be accessed using operator[]() methods. 
-    * Non const methods will automatically create the a #nullValue element 
-    * if it does not exist. 
-    * The sequence of an #arrayValue will be automatically resize and initialized 
-    * with #nullValue. resize() can be used to enlarge or truncate an #arrayValue.
-    *
-    * The get() methods can be used to obtains default value in the case the required element
-    * does not exist.
-    *
-    * It is possible to iterate over the list of a #objectValue values using 
-    * the getMemberNames() method.
-    */
-   class JSON_API Value 
-   {
-      friend class ValueIteratorBase;
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-      friend class ValueInternalLink;
-      friend class ValueInternalMap;
-# endif
-   public:
-      typedef std::vector<std::string> Members;
-      typedef ValueIterator iterator;
-      typedef ValueConstIterator const_iterator;
-      typedef Json::UInt UInt;
-      typedef Json::Int Int;
-      typedef UInt ArrayIndex;
-
-      static const Value null;
-      static const Int minInt;
-      static const Int maxInt;
-      static const UInt maxUInt;
-
-   private:
-#ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-# ifndef JSON_VALUE_USE_INTERNAL_MAP
-      class CZString 
-      {
-      public:
-         enum DuplicationPolicy 
-         {
-            noDuplication = 0,
-            duplicate,
-            duplicateOnCopy
-         };
-         CZString( int index );
-         CZString( const char *cstr, DuplicationPolicy allocate );
-         CZString( const CZString &other );
-         ~CZString();
-         CZString &operator =( const CZString &other );
-         bool operator<( const CZString &other ) const;
-         bool operator==( const CZString &other ) const;
-         int index() const;
-         const char *c_str() const;
-         bool isStaticString() const;
-      private:
-         void swap( CZString &other );
-         const char *cstr_;
-         int index_;
-      };
-
-   public:
-#  ifndef JSON_USE_CPPTL_SMALLMAP
-      typedef std::map<CZString, Value> ObjectValues;
-#  else
-      typedef CppTL::SmallMap<CZString, Value> ObjectValues;
-#  endif // ifndef JSON_USE_CPPTL_SMALLMAP
-# endif // ifndef JSON_VALUE_USE_INTERNAL_MAP
-#endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-
-   public:
-      /** \brief Create a default Value of the given type.
-
-        This is a very useful constructor.
-        To create an empty array, pass arrayValue.
-        To create an empty object, pass objectValue.
-        Another Value can then be set to this one by assignment.
-	This is useful since clear() and resize() will not alter types.
-
-        Examples:
-	\code
-	Json::Value null_value; // null
-	Json::Value arr_value(Json::arrayValue); // []
-	Json::Value obj_value(Json::objectValue); // {}
-	\endcode
-      */
-      Value( ValueType type = nullValue );
-      Value( Int value );
-      Value( UInt value );
-      Value( double value );
-      Value( const char *value );
-      Value( const char *beginValue, const char *endValue );
-      /** \brief Constructs a value from a static string.
-
-       * Like other value string constructor but do not duplicate the string for
-       * internal storage. The given string must remain alive after the call to this
-       * constructor.
-       * Example of usage:
-       * \code
-       * Json::Value aValue( StaticString("some text") );
-       * \endcode
-       */
-      Value( const StaticString &value );
-      Value( const std::string &value );
-# ifdef JSON_USE_CPPTL
-      Value( const CppTL::ConstString &value );
-# endif
-      Value( bool value );
-      Value( const Value &other );
-      ~Value();
-
-      Value &operator=( const Value &other );
-      /// Swap values.
-      /// \note Currently, comments are intentionally not swapped, for
-      /// both logic and efficiency.
-      void swap( Value &other );
-
-      ValueType type() const;
-
-      bool operator <( const Value &other ) const;
-      bool operator <=( const Value &other ) const;
-      bool operator >=( const Value &other ) const;
-      bool operator >( const Value &other ) const;
-
-      bool operator ==( const Value &other ) const;
-      bool operator !=( const Value &other ) const;
-
-      int compare( const Value &other );
-
-      const char *asCString() const;
-      std::string asString() const;
-# ifdef JSON_USE_CPPTL
-      CppTL::ConstString asConstString() const;
-# endif
-      Int asInt() const;
-      UInt asUInt() const;
-      double asDouble() const;
-      bool asBool() const;
-
-      bool isNull() const;
-      bool isBool() const;
-      bool isInt() const;
-      bool isUInt() const;
-      bool isIntegral() const;
-      bool isDouble() const;
-      bool isNumeric() const;
-      bool isString() const;
-      bool isArray() const;
-      bool isObject() const;
-
-      bool isConvertibleTo( ValueType other ) const;
-
-      /// Number of values in array or object
-      UInt size() const;
-
-      /// \brief Return true if empty array, empty object, or null;
-      /// otherwise, false.
-      bool empty() const;
-
-      /// Return isNull()
-      bool operator!() const;
-
-      /// Remove all object members and array elements.
-      /// \pre type() is arrayValue, objectValue, or nullValue
-      /// \post type() is unchanged
-      void clear();
-
-      /// Resize the array to size elements. 
-      /// New elements are initialized to null.
-      /// May only be called on nullValue or arrayValue.
-      /// \pre type() is arrayValue or nullValue
-      /// \post type() is arrayValue
-      void resize( UInt size );
-
-      /// Access an array element (zero based index ).
-      /// If the array contains less than index element, then null value are inserted
-      /// in the array so that its size is index+1.
-      /// (You may need to say 'value[0u]' to get your compiler to distinguish
-      ///  this from the operator[] which takes a string.)
-      Value &operator[]( UInt index );
-      /// Access an array element (zero based index )
-      /// (You may need to say 'value[0u]' to get your compiler to distinguish
-      ///  this from the operator[] which takes a string.)
-      const Value &operator[]( UInt index ) const;
-      /// If the array contains at least index+1 elements, returns the element value, 
-      /// otherwise returns defaultValue.
-      Value get( UInt index, 
-                 const Value &defaultValue ) const;
-      /// Return true if index < size().
-      bool isValidIndex( UInt index ) const;
-      /// \brief Append value to array at the end.
-      ///
-      /// Equivalent to jsonvalue[jsonvalue.size()] = value;
-      Value &append( const Value &value );
-
-      /// Access an object value by name, create a null member if it does not exist.
-      Value &operator[]( const char *key );
-      /// Access an object value by name, returns null if there is no member with that name.
-      const Value &operator[]( const char *key ) const;
-      /// Access an object value by name, create a null member if it does not exist.
-      Value &operator[]( const std::string &key );
-      /// Access an object value by name, returns null if there is no member with that name.
-      const Value &operator[]( const std::string &key ) const;
-      /** \brief Access an object value by name, create a null member if it does not exist.
-
-       * If the object as no entry for that name, then the member name used to store
-       * the new entry is not duplicated.
-       * Example of use:
-       * \code
-       * Json::Value object;
-       * static const StaticString code("code");
-       * object[code] = 1234;
-       * \endcode
-       */
-      Value &operator[]( const StaticString &key );
-# ifdef JSON_USE_CPPTL
-      /// Access an object value by name, create a null member if it does not exist.
-      Value &operator[]( const CppTL::ConstString &key );
-      /// Access an object value by name, returns null if there is no member with that name.
-      const Value &operator[]( const CppTL::ConstString &key ) const;
-# endif
-      /// Return the member named key if it exist, defaultValue otherwise.
-      Value get( const char *key, 
-                 const Value &defaultValue ) const;
-      /// Return the member named key if it exist, defaultValue otherwise.
-      Value get( const std::string &key,
-                 const Value &defaultValue ) const;
-# ifdef JSON_USE_CPPTL
-      /// Return the member named key if it exist, defaultValue otherwise.
-      Value get( const CppTL::ConstString &key,
-                 const Value &defaultValue ) const;
-# endif
-      /// \brief Remove and return the named member.  
-      ///
-      /// Do nothing if it did not exist.
-      /// \return the removed Value, or null.
-      /// \pre type() is objectValue or nullValue
-      /// \post type() is unchanged
-      Value removeMember( const char* key );
-      /// Same as removeMember(const char*)
-      Value removeMember( const std::string &key );
-
-      /// Return true if the object has a member named key.
-      bool isMember( const char *key ) const;
-      /// Return true if the object has a member named key.
-      bool isMember( const std::string &key ) const;
-# ifdef JSON_USE_CPPTL
-      /// Return true if the object has a member named key.
-      bool isMember( const CppTL::ConstString &key ) const;
-# endif
-
-      /// \brief Return a list of the member names.
-      ///
-      /// If null, return an empty list.
-      /// \pre type() is objectValue or nullValue
-      /// \post if type() was nullValue, it remains nullValue
-      Members getMemberNames() const;
-
-//# ifdef JSON_USE_CPPTL
-//      EnumMemberNames enumMemberNames() const;
-//      EnumValues enumValues() const;
-//# endif
-
-      /// Comments must be //... or /* ... */
-      void setComment( const char *comment,
-                       CommentPlacement placement );
-      /// Comments must be //... or /* ... */
-      void setComment( const std::string &comment,
-                       CommentPlacement placement );
-      bool hasComment( CommentPlacement placement ) const;
-      /// Include delimiters and embedded newlines.
-      std::string getComment( CommentPlacement placement ) const;
-
-      std::string toStyledString() const;
-
-      const_iterator begin() const;
-      const_iterator end() const;
-
-      iterator begin();
-      iterator end();
-
-   private:
-      Value &resolveReference( const char *key, 
-                               bool isStatic );
-
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-      inline bool isItemAvailable() const
-      {
-         return itemIsUsed_ == 0;
-      }
-
-      inline void setItemUsed( bool isUsed = true )
-      {
-         itemIsUsed_ = isUsed ? 1 : 0;
-      }
-
-      inline bool isMemberNameStatic() const
-      {
-         return memberNameIsStatic_ == 0;
-      }
-
-      inline void setMemberNameIsStatic( bool isStatic )
-      {
-         memberNameIsStatic_ = isStatic ? 1 : 0;
-      }
-# endif // # ifdef JSON_VALUE_USE_INTERNAL_MAP
-
-   private:
-      struct CommentInfo
-      {
-         CommentInfo();
-         ~CommentInfo();
-
-         void setComment( const char *text );
-
-         char *comment_;
-      };
-
-      //struct MemberNamesTransform
-      //{
-      //   typedef const char *result_type;
-      //   const char *operator()( const CZString &name ) const
-      //   {
-      //      return name.c_str();
-      //   }
-      //};
-
-      union ValueHolder
-      {
-         Int int_;
-         UInt uint_;
-         double real_;
-         bool bool_;
-         char *string_;
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-         ValueInternalArray *array_;
-         ValueInternalMap *map_;
-#else
-         ObjectValues *map_;
-# endif
-      } value_;
-      ValueType type_ : 8;
-      int allocated_ : 1;     // Notes: if declared as bool, bitfield is useless.
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-      unsigned int itemIsUsed_ : 1;      // used by the ValueInternalMap container.
-      int memberNameIsStatic_ : 1;       // used by the ValueInternalMap container.
-# endif
-      CommentInfo *comments_;
-   };
-
-
-   /** \brief Experimental and untested: represents an element of the "path" to access a node.
-    */
-   class PathArgument
-   {
-   public:
-      friend class Path;
-
-      PathArgument();
-      PathArgument( UInt index );
-      PathArgument( const char *key );
-      PathArgument( const std::string &key );
-
-   private:
-      enum Kind
-      {
-         kindNone = 0,
-         kindIndex,
-         kindKey
-      };
-      std::string key_;
-      UInt index_;
-      Kind kind_;
-   };
-
-   /** \brief Experimental and untested: represents a "path" to access a node.
-    *
-    * Syntax:
-    * - "." => root node
-    * - ".[n]" => elements at index 'n' of root node (an array value)
-    * - ".name" => member named 'name' of root node (an object value)
-    * - ".name1.name2.name3"
-    * - ".[0][1][2].name1[3]"
-    * - ".%" => member name is provided as parameter
-    * - ".[%]" => index is provided as parameter
-    */
-   class Path
-   {
-   public:
-      Path( const std::string &path,
-            const PathArgument &a1 = PathArgument(),
-            const PathArgument &a2 = PathArgument(),
-            const PathArgument &a3 = PathArgument(),
-            const PathArgument &a4 = PathArgument(),
-            const PathArgument &a5 = PathArgument() );
-
-      const Value &resolve( const Value &root ) const;
-      Value resolve( const Value &root, 
-                     const Value &defaultValue ) const;
-      /// Creates the "path" to access the specified node and returns a reference on the node.
-      Value &make( Value &root ) const;
-
-   private:
-      typedef std::vector<const PathArgument *> InArgs;
-      typedef std::vector<PathArgument> Args;
-
-      void makePath( const std::string &path,
-                     const InArgs &in );
-      void addPathInArg( const std::string &path, 
-                         const InArgs &in, 
-                         InArgs::const_iterator &itInArg, 
-                         PathArgument::Kind kind );
-      void invalidPath( const std::string &path, 
-                        int location );
-
-      Args args_;
-   };
-
-   /** \brief Experimental do not use: Allocator to customize member name and string value memory management done by Value.
-    *
-    * - makeMemberName() and releaseMemberName() are called to respectively duplicate and
-    *   free an Json::objectValue member name.
-    * - duplicateStringValue() and releaseStringValue() are called similarly to
-    *   duplicate and free a Json::stringValue value.
-    */
-   class ValueAllocator
-   {
-   public:
-      enum { unknown = (unsigned)-1 };
-
-      virtual ~ValueAllocator();
-
-      virtual char *makeMemberName( const char *memberName ) = 0;
-      virtual void releaseMemberName( char *memberName ) = 0;
-      virtual char *duplicateStringValue( const char *value, 
-                                          unsigned int length = unknown ) = 0;
-      virtual void releaseStringValue( char *value ) = 0;
-   };
-
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
-   /** \brief Allocator to customize Value internal map.
-    * Below is an example of a simple implementation (default implementation actually
-    * use memory pool for speed).
-    * \code
-      class DefaultValueMapAllocator : public ValueMapAllocator
-      {
-      public: // overridden from ValueMapAllocator
-         virtual ValueInternalMap *newMap()
-         {
-            return new ValueInternalMap();
-         }
-
-         virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other )
-         {
-            return new ValueInternalMap( other );
-         }
-
-         virtual void destructMap( ValueInternalMap *map )
-         {
-            delete map;
-         }
-
-         virtual ValueInternalLink *allocateMapBuckets( unsigned int size )
-         {
-            return new ValueInternalLink[size];
-         }
-
-         virtual void releaseMapBuckets( ValueInternalLink *links )
-         {
-            delete [] links;
-         }
-
-         virtual ValueInternalLink *allocateMapLink()
-         {
-            return new ValueInternalLink();
-         }
-
-         virtual void releaseMapLink( ValueInternalLink *link )
-         {
-            delete link;
-         }
-      };
-    * \endcode
-    */ 
-   class JSON_API ValueMapAllocator
-   {
-   public:
-      virtual ~ValueMapAllocator();
-      virtual ValueInternalMap *newMap() = 0;
-      virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other ) = 0;
-      virtual void destructMap( ValueInternalMap *map ) = 0;
-      virtual ValueInternalLink *allocateMapBuckets( unsigned int size ) = 0;
-      virtual void releaseMapBuckets( ValueInternalLink *links ) = 0;
-      virtual ValueInternalLink *allocateMapLink() = 0;
-      virtual void releaseMapLink( ValueInternalLink *link ) = 0;
-   };
-
-   /** \brief ValueInternalMap hash-map bucket chain link (for internal use only).
-    * \internal previous_ & next_ allows for bidirectional traversal.
-    */
-   class JSON_API ValueInternalLink
-   {
-   public:
-      enum { itemPerLink = 6 };  // sizeof(ValueInternalLink) = 128 on 32 bits architecture.
-      enum InternalFlags { 
-         flagAvailable = 0,
-         flagUsed = 1
-      };
-
-      ValueInternalLink();
-
-      ~ValueInternalLink();
-
-      Value items_[itemPerLink];
-      char *keys_[itemPerLink];
-      ValueInternalLink *previous_;
-      ValueInternalLink *next_;
-   };
-
-
-   /** \brief A linked page based hash-table implementation used internally by Value.
-    * \internal ValueInternalMap is a traditional bucket based hash-table, with a linked
-    * list in each bucket to handle collision. There is an addional twist in that
-    * each node of the collision linked list is a page containing a fixed amount of
-    * value. This provides a better compromise between memory usage and speed.
-    * 
-    * Each bucket is made up of a chained list of ValueInternalLink. The last
-    * link of a given bucket can be found in the 'previous_' field of the following bucket.
-    * The last link of the last bucket is stored in tailLink_ as it has no following bucket.
-    * Only the last link of a bucket may contains 'available' item. The last link always
-    * contains at least one element unless is it the bucket one very first link.
-    */
-   class JSON_API ValueInternalMap
-   {
-      friend class ValueIteratorBase;
-      friend class Value;
-   public:
-      typedef unsigned int HashKey;
-      typedef unsigned int BucketIndex;
-
-# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-      struct IteratorState
-      {
-         IteratorState() 
-            : map_(0)
-            , link_(0)
-            , itemIndex_(0)
-            , bucketIndex_(0) 
-         {
-         }
-         ValueInternalMap *map_;
-         ValueInternalLink *link_;
-         BucketIndex itemIndex_;
-         BucketIndex bucketIndex_;
-      };
-# endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-
-      ValueInternalMap();
-      ValueInternalMap( const ValueInternalMap &other );
-      ValueInternalMap &operator =( const ValueInternalMap &other );
-      ~ValueInternalMap();
-
-      void swap( ValueInternalMap &other );
-
-      BucketIndex size() const;
-
-      void clear();
-
-      bool reserveDelta( BucketIndex growth );
-
-      bool reserve( BucketIndex newItemCount );
-
-      const Value *find( const char *key ) const;
-
-      Value *find( const char *key );
-
-      Value &resolveReference( const char *key, 
-                               bool isStatic );
-
-      void remove( const char *key );
-
-      void doActualRemove( ValueInternalLink *link, 
-                           BucketIndex index,
-                           BucketIndex bucketIndex );
-
-      ValueInternalLink *&getLastLinkInBucket( BucketIndex bucketIndex );
-
-      Value &setNewItem( const char *key, 
-                         bool isStatic, 
-                         ValueInternalLink *link, 
-                         BucketIndex index );
-
-      Value &unsafeAdd( const char *key, 
-                        bool isStatic, 
-                        HashKey hashedKey );
-
-      HashKey hash( const char *key ) const;
-
-      int compare( const ValueInternalMap &other ) const;
-
-   private:
-      void makeBeginIterator( IteratorState &it ) const;
-      void makeEndIterator( IteratorState &it ) const;
-      static bool equals( const IteratorState &x, const IteratorState &other );
-      static void increment( IteratorState &iterator );
-      static void incrementBucket( IteratorState &iterator );
-      static void decrement( IteratorState &iterator );
-      static const char *key( const IteratorState &iterator );
-      static const char *key( const IteratorState &iterator, bool &isStatic );
-      static Value &value( const IteratorState &iterator );
-      static int distance( const IteratorState &x, const IteratorState &y );
-
-   private:
-      ValueInternalLink *buckets_;
-      ValueInternalLink *tailLink_;
-      BucketIndex bucketsSize_;
-      BucketIndex itemCount_;
-   };
-
-   /** \brief A simplified deque implementation used internally by Value.
-   * \internal
-   * It is based on a list of fixed "page", each page contains a fixed number of items.
-   * Instead of using a linked-list, a array of pointer is used for fast item look-up.
-   * Look-up for an element is as follow:
-   * - compute page index: pageIndex = itemIndex / itemsPerPage
-   * - look-up item in page: pages_[pageIndex][itemIndex % itemsPerPage]
-   *
-   * Insertion is amortized constant time (only the array containing the index of pointers
-   * need to be reallocated when items are appended).
-   */
-   class JSON_API ValueInternalArray
-   {
-      friend class Value;
-      friend class ValueIteratorBase;
-   public:
-      enum { itemsPerPage = 8 };    // should be a power of 2 for fast divide and modulo.
-      typedef Value::ArrayIndex ArrayIndex;
-      typedef unsigned int PageIndex;
-
-# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-      struct IteratorState // Must be a POD
-      {
-         IteratorState() 
-            : array_(0)
-            , currentPageIndex_(0)
-            , currentItemIndex_(0) 
-         {
-         }
-         ValueInternalArray *array_;
-         Value **currentPageIndex_;
-         unsigned int currentItemIndex_;
-      };
-# endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-
-      ValueInternalArray();
-      ValueInternalArray( const ValueInternalArray &other );
-      ValueInternalArray &operator =( const ValueInternalArray &other );
-      ~ValueInternalArray();
-      void swap( ValueInternalArray &other );
-
-      void clear();
-      void resize( ArrayIndex newSize );
-
-      Value &resolveReference( ArrayIndex index );
-
-      Value *find( ArrayIndex index ) const;
-
-      ArrayIndex size() const;
-
-      int compare( const ValueInternalArray &other ) const;
-
-   private:
-      static bool equals( const IteratorState &x, const IteratorState &other );
-      static void increment( IteratorState &iterator );
-      static void decrement( IteratorState &iterator );
-      static Value &dereference( const IteratorState &iterator );
-      static Value &unsafeDereference( const IteratorState &iterator );
-      static int distance( const IteratorState &x, const IteratorState &y );
-      static ArrayIndex indexOf( const IteratorState &iterator );
-      void makeBeginIterator( IteratorState &it ) const;
-      void makeEndIterator( IteratorState &it ) const;
-      void makeIterator( IteratorState &it, ArrayIndex index ) const;
-
-      void makeIndexValid( ArrayIndex index );
-
-      Value **pages_;
-      ArrayIndex size_;
-      PageIndex pageCount_;
-   };
-
-   /** \brief Experimental: do not use. Allocator to customize Value internal array.
-    * Below is an example of a simple implementation (actual implementation use
-    * memory pool).
-      \code
-class DefaultValueArrayAllocator : public ValueArrayAllocator
-{
-public: // overridden from ValueArrayAllocator
-   virtual ~DefaultValueArrayAllocator()
-   {
-   }
-
-   virtual ValueInternalArray *newArray()
-   {
-      return new ValueInternalArray();
-   }
-
-   virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other )
-   {
-      return new ValueInternalArray( other );
-   }
-
-   virtual void destruct( ValueInternalArray *array )
-   {
-      delete array;
-   }
-
-   virtual void reallocateArrayPageIndex( Value **&indexes, 
-                                          ValueInternalArray::PageIndex &indexCount,
-                                          ValueInternalArray::PageIndex minNewIndexCount )
-   {
-      ValueInternalArray::PageIndex newIndexCount = (indexCount*3)/2 + 1;
-      if ( minNewIndexCount > newIndexCount )
-         newIndexCount = minNewIndexCount;
-      void *newIndexes = realloc( indexes, sizeof(Value*) * newIndexCount );
-      if ( !newIndexes )
-         throw std::bad_alloc();
-      indexCount = newIndexCount;
-      indexes = static_cast<Value **>( newIndexes );
-   }
-   virtual void releaseArrayPageIndex( Value **indexes, 
-                                       ValueInternalArray::PageIndex indexCount )
-   {
-      if ( indexes )
-         free( indexes );
-   }
-
-   virtual Value *allocateArrayPage()
-   {
-      return static_cast<Value *>( malloc( sizeof(Value) * ValueInternalArray::itemsPerPage ) );
-   }
-
-   virtual void releaseArrayPage( Value *value )
-   {
-      if ( value )
-         free( value );
-   }
-};
-      \endcode
-    */ 
-   class JSON_API ValueArrayAllocator
-   {
-   public:
-      virtual ~ValueArrayAllocator();
-      virtual ValueInternalArray *newArray() = 0;
-      virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other ) = 0;
-      virtual void destructArray( ValueInternalArray *array ) = 0;
-      /** \brief Reallocate array page index.
-       * Reallocates an array of pointer on each page.
-       * \param indexes [input] pointer on the current index. May be \c NULL.
-       *                [output] pointer on the new index of at least 
-       *                         \a minNewIndexCount pages. 
-       * \param indexCount [input] current number of pages in the index.
-       *                   [output] number of page the reallocated index can handle.
-       *                            \b MUST be >= \a minNewIndexCount.
-       * \param minNewIndexCount Minimum number of page the new index must be able to
-       *                         handle.
-       */
-      virtual void reallocateArrayPageIndex( Value **&indexes, 
-                                             ValueInternalArray::PageIndex &indexCount,
-                                             ValueInternalArray::PageIndex minNewIndexCount ) = 0;
-      virtual void releaseArrayPageIndex( Value **indexes, 
-                                          ValueInternalArray::PageIndex indexCount ) = 0;
-      virtual Value *allocateArrayPage() = 0;
-      virtual void releaseArrayPage( Value *value ) = 0;
-   };
-#endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
-
-
-   /** \brief base class for Value iterators.
-    *
-    */
-   class ValueIteratorBase
-   {
-   public:
-      typedef unsigned int size_t;
-      typedef int difference_type;
-      typedef ValueIteratorBase SelfType;
-
-      ValueIteratorBase();
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-      explicit ValueIteratorBase( const Value::ObjectValues::iterator &current );
-#else
-      ValueIteratorBase( const ValueInternalArray::IteratorState &state );
-      ValueIteratorBase( const ValueInternalMap::IteratorState &state );
-#endif
-
-      bool operator ==( const SelfType &other ) const
-      {
-         return isEqual( other );
-      }
-
-      bool operator !=( const SelfType &other ) const
-      {
-         return !isEqual( other );
-      }
-
-      difference_type operator -( const SelfType &other ) const
-      {
-         return computeDistance( other );
-      }
-
-      /// Return either the index or the member name of the referenced value as a Value.
-      Value key() const;
-
-      /// Return the index of the referenced Value. -1 if it is not an arrayValue.
-      UInt index() const;
-
-      /// Return the member name of the referenced Value. "" if it is not an objectValue.
-      const char *memberName() const;
-
-   protected:
-      Value &deref() const;
-
-      void increment();
-
-      void decrement();
-
-      difference_type computeDistance( const SelfType &other ) const;
-
-      bool isEqual( const SelfType &other ) const;
-
-      void copy( const SelfType &other );
-
-   private:
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-      Value::ObjectValues::iterator current_;
-      // Indicates that iterator is for a null value.
-      bool isNull_;
-#else
-      union
-      {
-         ValueInternalArray::IteratorState array_;
-         ValueInternalMap::IteratorState map_;
-      } iterator_;
-      bool isArray_;
-#endif
-   };
-
-   /** \brief const iterator for object and array value.
-    *
-    */
-   class ValueConstIterator : public ValueIteratorBase
-   {
-      friend class Value;
-   public:
-      typedef unsigned int size_t;
-      typedef int difference_type;
-      typedef const Value &reference;
-      typedef const Value *pointer;
-      typedef ValueConstIterator SelfType;
-
-      ValueConstIterator();
-   private:
-      /*! \internal Use by Value to create an iterator.
-       */
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-      explicit ValueConstIterator( const Value::ObjectValues::iterator &current );
-#else
-      ValueConstIterator( const ValueInternalArray::IteratorState &state );
-      ValueConstIterator( const ValueInternalMap::IteratorState &state );
-#endif
-   public:
-      SelfType &operator =( const ValueIteratorBase &other );
-
-      SelfType operator++( int )
-      {
-         SelfType temp( *this );
-         ++*this;
-         return temp;
-      }
-
-      SelfType operator--( int )
-      {
-         SelfType temp( *this );
-         --*this;
-         return temp;
-      }
-
-      SelfType &operator--()
-      {
-         decrement();
-         return *this;
-      }
-
-      SelfType &operator++()
-      {
-         increment();
-         return *this;
-      }
-
-      reference operator *() const
-      {
-         return deref();
-      }
-   };
-
-
-   /** \brief Iterator for object and array value.
-    */
-   class ValueIterator : public ValueIteratorBase
-   {
-      friend class Value;
-   public:
-      typedef unsigned int size_t;
-      typedef int difference_type;
-      typedef Value &reference;
-      typedef Value *pointer;
-      typedef ValueIterator SelfType;
-
-      ValueIterator();
-      ValueIterator( const ValueConstIterator &other );
-      ValueIterator( const ValueIterator &other );
-   private:
-      /*! \internal Use by Value to create an iterator.
-       */
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-      explicit ValueIterator( const Value::ObjectValues::iterator &current );
-#else
-      ValueIterator( const ValueInternalArray::IteratorState &state );
-      ValueIterator( const ValueInternalMap::IteratorState &state );
-#endif
-   public:
-
-      SelfType &operator =( const SelfType &other );
-
-      SelfType operator++( int )
-      {
-         SelfType temp( *this );
-         ++*this;
-         return temp;
-      }
-
-      SelfType operator--( int )
-      {
-         SelfType temp( *this );
-         --*this;
-         return temp;
-      }
-
-      SelfType &operator--()
-      {
-         decrement();
-         return *this;
-      }
-
-      SelfType &operator++()
-      {
-         increment();
-         return *this;
-      }
-
-      reference operator *() const
-      {
-         return deref();
-      }
-   };
-
-
-} // namespace Json
-
-
-#endif // CPPTL_JSON_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/src/blackberry10/native/public/json/writer.h
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/src/blackberry10/native/public/json/writer.h b/spec/plugins/cordova.echo/src/blackberry10/native/public/json/writer.h
deleted file mode 100644
index 16cf022..0000000
--- a/spec/plugins/cordova.echo/src/blackberry10/native/public/json/writer.h
+++ /dev/null
@@ -1,174 +0,0 @@
-#ifndef JSON_WRITER_H_INCLUDED
-# define JSON_WRITER_H_INCLUDED
-
-# include "value.h"
-# include <vector>
-# include <string>
-# include <iostream>
-
-namespace Json {
-
-   class Value;
-
-   /** \brief Abstract class for writers.
-    */
-   class JSON_API Writer
-   {
-   public:
-      virtual ~Writer();
-
-      virtual std::string write( const Value &root ) = 0;
-   };
-
-   /** \brief Outputs a Value in <a HREF="http://www.json.org">JSON</a> format without formatting (not human friendly).
-    *
-    * The JSON document is written in a single line. It is not intended for 'human' consumption,
-    * but may be useful to support feature such as RPC where bandwidth is limited.
-    * \sa Reader, Value
-    */
-   class JSON_API FastWriter : public Writer
-   {
-   public:
-      FastWriter();
-      virtual ~FastWriter(){}
-
-      void enableYAMLCompatibility();
-
-   public: // overridden from Writer
-      virtual std::string write( const Value &root );
-
-   private:
-      void writeValue( const Value &value );
-
-      std::string document_;
-      bool yamlCompatibilityEnabled_;
-   };
-
-   /** \brief Writes a Value in <a HREF="http://www.json.org">JSON</a> format in a human friendly way.
-    *
-    * The rules for line break and indent are as follow:
-    * - Object value:
-    *     - if empty then print {} without indent and line break
-    *     - if not empty the print '{', line break & indent, print one value per line
-    *       and then unindent and line break and print '}'.
-    * - Array value:
-    *     - if empty then print [] without indent and line break
-    *     - if the array contains no object value, empty array or some other value types,
-    *       and all the values fit on one lines, then print the array on a single line.
-    *     - otherwise, it the values do not fit on one line, or the array contains
-    *       object or non empty array, then print one value per line.
-    *
-    * If the Value have comments then they are outputed according to their #CommentPlacement.
-    *
-    * \sa Reader, Value, Value::setComment()
-    */
-   class JSON_API StyledWriter: public Writer
-   {
-   public:
-      StyledWriter();
-      virtual ~StyledWriter(){}
-
-   public: // overridden from Writer
-      /** \brief Serialize a Value in <a HREF="http://www.json.org">JSON</a> format.
-       * \param root Value to serialize.
-       * \return String containing the JSON document that represents the root value.
-       */
-      virtual std::string write( const Value &root );
-
-   private:
-      void writeValue( const Value &value );
-      void writeArrayValue( const Value &value );
-      bool isMultineArray( const Value &value );
-      void pushValue( const std::string &value );
-      void writeIndent();
-      void writeWithIndent( const std::string &value );
-      void indent();
-      void unindent();
-      void writeCommentBeforeValue( const Value &root );
-      void writeCommentAfterValueOnSameLine( const Value &root );
-      bool hasCommentForValue( const Value &value );
-      static std::string normalizeEOL( const std::string &text );
-
-      typedef std::vector<std::string> ChildValues;
-
-      ChildValues childValues_;
-      std::string document_;
-      std::string indentString_;
-      int rightMargin_;
-      int indentSize_;
-      bool addChildValues_;
-   };
-
-   /** \brief Writes a Value in <a HREF="http://www.json.org">JSON</a> format in a human friendly way,
-        to a stream rather than to a string.
-    *
-    * The rules for line break and indent are as follow:
-    * - Object value:
-    *     - if empty then print {} without indent and line break
-    *     - if not empty the print '{', line break & indent, print one value per line
-    *       and then unindent and line break and print '}'.
-    * - Array value:
-    *     - if empty then print [] without indent and line break
-    *     - if the array contains no object value, empty array or some other value types,
-    *       and all the values fit on one lines, then print the array on a single line.
-    *     - otherwise, it the values do not fit on one line, or the array contains
-    *       object or non empty array, then print one value per line.
-    *
-    * If the Value have comments then they are outputed according to their #CommentPlacement.
-    *
-    * \param indentation Each level will be indented by this amount extra.
-    * \sa Reader, Value, Value::setComment()
-    */
-   class JSON_API StyledStreamWriter
-   {
-   public:
-      StyledStreamWriter( std::string indentation="\t" );
-      ~StyledStreamWriter(){}
-
-   public:
-      /** \brief Serialize a Value in <a HREF="http://www.json.org">JSON</a> format.
-       * \param out Stream to write to. (Can be ostringstream, e.g.)
-       * \param root Value to serialize.
-       * \note There is no point in deriving from Writer, since write() should not return a value.
-       */
-      void write( std::ostream &out, const Value &root );
-
-   private:
-      void writeValue( const Value &value );
-      void writeArrayValue( const Value &value );
-      bool isMultineArray( const Value &value );
-      void pushValue( const std::string &value );
-      void writeIndent();
-      void writeWithIndent( const std::string &value );
-      void indent();
-      void unindent();
-      void writeCommentBeforeValue( const Value &root );
-      void writeCommentAfterValueOnSameLine( const Value &root );
-      bool hasCommentForValue( const Value &value );
-      static std::string normalizeEOL( const std::string &text );
-
-      typedef std::vector<std::string> ChildValues;
-
-      ChildValues childValues_;
-      std::ostream* document_;
-      std::string indentString_;
-      int rightMargin_;
-      std::string indentation_;
-      bool addChildValues_;
-   };
-
-   std::string JSON_API valueToString( Int value );
-   std::string JSON_API valueToString( UInt value );
-   std::string JSON_API valueToString( double value );
-   std::string JSON_API valueToString( bool value );
-   std::string JSON_API valueToQuotedString( const char *value );
-
-   /// \brief Output using the StyledStreamWriter.
-   /// \see Json::operator>>()
-   std::ostream& operator<<( std::ostream&, const Value &root );
-
-} // namespace Json
-
-
-
-#endif // JSON_WRITER_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/src/blackberry10/native/public/json_batchallocator.h
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/src/blackberry10/native/public/json_batchallocator.h b/spec/plugins/cordova.echo/src/blackberry10/native/public/json_batchallocator.h
deleted file mode 100644
index 141ca77..0000000
--- a/spec/plugins/cordova.echo/src/blackberry10/native/public/json_batchallocator.h
+++ /dev/null
@@ -1,125 +0,0 @@
-#ifndef JSONCPP_BATCHALLOCATOR_H_INCLUDED
-# define JSONCPP_BATCHALLOCATOR_H_INCLUDED
-
-# include <stdlib.h>
-# include <assert.h>
-
-# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-
-namespace Json {
-
-/* Fast memory allocator.
- *
- * This memory allocator allocates memory for a batch of object (specified by
- * the page size, the number of object in each page).
- *
- * It does not allow the destruction of a single object. All the allocated objects
- * can be destroyed at once. The memory can be either released or reused for future
- * allocation.
- * 
- * The in-place new operator must be used to construct the object using the pointer
- * returned by allocate.
- */
-template<typename AllocatedType
-        ,const unsigned int objectPerAllocation>
-class BatchAllocator
-{
-public:
-   typedef AllocatedType Type;
-
-   BatchAllocator( unsigned int objectsPerPage = 255 )
-      : freeHead_( 0 )
-      , objectsPerPage_( objectsPerPage )
-   {
-//      printf( "Size: %d => %s\n", sizeof(AllocatedType), typeid(AllocatedType).name() );
-      assert( sizeof(AllocatedType) * objectPerAllocation >= sizeof(AllocatedType *) ); // We must be able to store a slist in the object free space.
-      assert( objectsPerPage >= 16 );
-      batches_ = allocateBatch( 0 );   // allocated a dummy page
-      currentBatch_ = batches_;
-   }
-
-   ~BatchAllocator()
-   {
-      for ( BatchInfo *batch = batches_; batch;  )
-      {
-         BatchInfo *nextBatch = batch->next_;
-         free( batch );
-         batch = nextBatch;
-      }
-   }
-
-   /// allocate space for an array of objectPerAllocation object.
-   /// @warning it is the responsibility of the caller to call objects constructors.
-   AllocatedType *allocate()
-   {
-      if ( freeHead_ ) // returns node from free list.
-      {
-         AllocatedType *object = freeHead_;
-         freeHead_ = *(AllocatedType **)object;
-         return object;
-      }
-      if ( currentBatch_->used_ == currentBatch_->end_ )
-      {
-         currentBatch_ = currentBatch_->next_;
-         while ( currentBatch_  &&  currentBatch_->used_ == currentBatch_->end_ )
-            currentBatch_ = currentBatch_->next_;
-
-         if ( !currentBatch_  ) // no free batch found, allocate a new one
-         { 
-            currentBatch_ = allocateBatch( objectsPerPage_ );
-            currentBatch_->next_ = batches_; // insert at the head of the list
-            batches_ = currentBatch_;
-         }
-      }
-      AllocatedType *allocated = currentBatch_->used_;
-      currentBatch_->used_ += objectPerAllocation;
-      return allocated;
-   }
-
-   /// Release the object.
-   /// @warning it is the responsibility of the caller to actually destruct the object.
-   void release( AllocatedType *object )
-   {
-      assert( object != 0 );
-      *(AllocatedType **)object = freeHead_;
-      freeHead_ = object;
-   }
-
-private:
-   struct BatchInfo
-   {
-      BatchInfo *next_;
-      AllocatedType *used_;
-      AllocatedType *end_;
-      AllocatedType buffer_[objectPerAllocation];
-   };
-
-   // disabled copy constructor and assignment operator.
-   BatchAllocator( const BatchAllocator & );
-   void operator =( const BatchAllocator &);
-
-   static BatchInfo *allocateBatch( unsigned int objectsPerPage )
-   {
-      const unsigned int mallocSize = sizeof(BatchInfo) - sizeof(AllocatedType)* objectPerAllocation
-                                + sizeof(AllocatedType) * objectPerAllocation * objectsPerPage;
-      BatchInfo *batch = static_cast<BatchInfo*>( malloc( mallocSize ) );
-      batch->next_ = 0;
-      batch->used_ = batch->buffer_;
-      batch->end_ = batch->buffer_ + objectsPerPage;
-      return batch;
-   }
-
-   BatchInfo *batches_;
-   BatchInfo *currentBatch_;
-   /// Head of a single linked list within the allocated space of freed object
-   AllocatedType *freeHead_;
-   unsigned int objectsPerPage_;
-};
-
-
-} // namespace Json
-
-# endif // ifndef JSONCPP_DOC_INCLUDE_IMPLEMENTATION
-
-#endif // JSONCPP_BATCHALLOCATOR_H_INCLUDED
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/src/blackberry10/native/public/json_internalarray.inl
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/src/blackberry10/native/public/json_internalarray.inl b/spec/plugins/cordova.echo/src/blackberry10/native/public/json_internalarray.inl
deleted file mode 100644
index 9b985d2..0000000
--- a/spec/plugins/cordova.echo/src/blackberry10/native/public/json_internalarray.inl
+++ /dev/null
@@ -1,448 +0,0 @@
-// included by json_value.cpp
-// everything is within Json namespace
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class ValueInternalArray
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-ValueArrayAllocator::~ValueArrayAllocator()
-{
-}
-
-// //////////////////////////////////////////////////////////////////
-// class DefaultValueArrayAllocator
-// //////////////////////////////////////////////////////////////////
-#ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
-class DefaultValueArrayAllocator : public ValueArrayAllocator
-{
-public: // overridden from ValueArrayAllocator
-   virtual ~DefaultValueArrayAllocator()
-   {
-   }
-
-   virtual ValueInternalArray *newArray()
-   {
-      return new ValueInternalArray();
-   }
-
-   virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other )
-   {
-      return new ValueInternalArray( other );
-   }
-
-   virtual void destructArray( ValueInternalArray *array )
-   {
-      delete array;
-   }
-
-   virtual void reallocateArrayPageIndex( Value **&indexes, 
-                                          ValueInternalArray::PageIndex &indexCount,
-                                          ValueInternalArray::PageIndex minNewIndexCount )
-   {
-      ValueInternalArray::PageIndex newIndexCount = (indexCount*3)/2 + 1;
-      if ( minNewIndexCount > newIndexCount )
-         newIndexCount = minNewIndexCount;
-      void *newIndexes = realloc( indexes, sizeof(Value*) * newIndexCount );
-      if ( !newIndexes )
-         throw std::bad_alloc();
-      indexCount = newIndexCount;
-      indexes = static_cast<Value **>( newIndexes );
-   }
-   virtual void releaseArrayPageIndex( Value **indexes, 
-                                       ValueInternalArray::PageIndex indexCount )
-   {
-      if ( indexes )
-         free( indexes );
-   }
-
-   virtual Value *allocateArrayPage()
-   {
-      return static_cast<Value *>( malloc( sizeof(Value) * ValueInternalArray::itemsPerPage ) );
-   }
-
-   virtual void releaseArrayPage( Value *value )
-   {
-      if ( value )
-         free( value );
-   }
-};
-
-#else // #ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
-/// @todo make this thread-safe (lock when accessign batch allocator)
-class DefaultValueArrayAllocator : public ValueArrayAllocator
-{
-public: // overridden from ValueArrayAllocator
-   virtual ~DefaultValueArrayAllocator()
-   {
-   }
-
-   virtual ValueInternalArray *newArray()
-   {
-      ValueInternalArray *array = arraysAllocator_.allocate();
-      new (array) ValueInternalArray(); // placement new
-      return array;
-   }
-
-   virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other )
-   {
-      ValueInternalArray *array = arraysAllocator_.allocate();
-      new (array) ValueInternalArray( other ); // placement new
-      return array;
-   }
-
-   virtual void destructArray( ValueInternalArray *array )
-   {
-      if ( array )
-      {
-         array->~ValueInternalArray();
-         arraysAllocator_.release( array );
-      }
-   }
-
-   virtual void reallocateArrayPageIndex( Value **&indexes, 
-                                          ValueInternalArray::PageIndex &indexCount,
-                                          ValueInternalArray::PageIndex minNewIndexCount )
-   {
-      ValueInternalArray::PageIndex newIndexCount = (indexCount*3)/2 + 1;
-      if ( minNewIndexCount > newIndexCount )
-         newIndexCount = minNewIndexCount;
-      void *newIndexes = realloc( indexes, sizeof(Value*) * newIndexCount );
-      if ( !newIndexes )
-         throw std::bad_alloc();
-      indexCount = newIndexCount;
-      indexes = static_cast<Value **>( newIndexes );
-   }
-   virtual void releaseArrayPageIndex( Value **indexes, 
-                                       ValueInternalArray::PageIndex indexCount )
-   {
-      if ( indexes )
-         free( indexes );
-   }
-
-   virtual Value *allocateArrayPage()
-   {
-      return static_cast<Value *>( pagesAllocator_.allocate() );
-   }
-
-   virtual void releaseArrayPage( Value *value )
-   {
-      if ( value )
-         pagesAllocator_.release( value );
-   }
-private:
-   BatchAllocator<ValueInternalArray,1> arraysAllocator_;
-   BatchAllocator<Value,ValueInternalArray::itemsPerPage> pagesAllocator_;
-};
-#endif // #ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
-
-static ValueArrayAllocator *&arrayAllocator()
-{
-   static DefaultValueArrayAllocator defaultAllocator;
-   static ValueArrayAllocator *arrayAllocator = &defaultAllocator;
-   return arrayAllocator;
-}
-
-static struct DummyArrayAllocatorInitializer {
-   DummyArrayAllocatorInitializer() 
-   {
-      arrayAllocator();      // ensure arrayAllocator() statics are initialized before main().
-   }
-} dummyArrayAllocatorInitializer;
-
-// //////////////////////////////////////////////////////////////////
-// class ValueInternalArray
-// //////////////////////////////////////////////////////////////////
-bool 
-ValueInternalArray::equals( const IteratorState &x, 
-                            const IteratorState &other )
-{
-   return x.array_ == other.array_  
-          &&  x.currentItemIndex_ == other.currentItemIndex_  
-          &&  x.currentPageIndex_ == other.currentPageIndex_;
-}
-
-
-void 
-ValueInternalArray::increment( IteratorState &it )
-{
-   JSON_ASSERT_MESSAGE( it.array_  &&
-      (it.currentPageIndex_ - it.array_->pages_)*itemsPerPage + it.currentItemIndex_
-      != it.array_->size_,
-      "ValueInternalArray::increment(): moving iterator beyond end" );
-   ++(it.currentItemIndex_);
-   if ( it.currentItemIndex_ == itemsPerPage )
-   {
-      it.currentItemIndex_ = 0;
-      ++(it.currentPageIndex_);
-   }
-}
-
-
-void 
-ValueInternalArray::decrement( IteratorState &it )
-{
-   JSON_ASSERT_MESSAGE( it.array_  &&  it.currentPageIndex_ == it.array_->pages_ 
-                        &&  it.currentItemIndex_ == 0,
-      "ValueInternalArray::decrement(): moving iterator beyond end" );
-   if ( it.currentItemIndex_ == 0 )
-   {
-      it.currentItemIndex_ = itemsPerPage-1;
-      --(it.currentPageIndex_);
-   }
-   else
-   {
-      --(it.currentItemIndex_);
-   }
-}
-
-
-Value &
-ValueInternalArray::unsafeDereference( const IteratorState &it )
-{
-   return (*(it.currentPageIndex_))[it.currentItemIndex_];
-}
-
-
-Value &
-ValueInternalArray::dereference( const IteratorState &it )
-{
-   JSON_ASSERT_MESSAGE( it.array_  &&
-      (it.currentPageIndex_ - it.array_->pages_)*itemsPerPage + it.currentItemIndex_
-      < it.array_->size_,
-      "ValueInternalArray::dereference(): dereferencing invalid iterator" );
-   return unsafeDereference( it );
-}
-
-void 
-ValueInternalArray::makeBeginIterator( IteratorState &it ) const
-{
-   it.array_ = const_cast<ValueInternalArray *>( this );
-   it.currentItemIndex_ = 0;
-   it.currentPageIndex_ = pages_;
-}
-
-
-void 
-ValueInternalArray::makeIterator( IteratorState &it, ArrayIndex index ) const
-{
-   it.array_ = const_cast<ValueInternalArray *>( this );
-   it.currentItemIndex_ = index % itemsPerPage;
-   it.currentPageIndex_ = pages_ + index / itemsPerPage;
-}
-
-
-void 
-ValueInternalArray::makeEndIterator( IteratorState &it ) const
-{
-   makeIterator( it, size_ );
-}
-
-
-ValueInternalArray::ValueInternalArray()
-   : pages_( 0 )
-   , size_( 0 )
-   , pageCount_( 0 )
-{
-}
-
-
-ValueInternalArray::ValueInternalArray( const ValueInternalArray &other )
-   : pages_( 0 )
-   , pageCount_( 0 )
-   , size_( other.size_ )
-{
-   PageIndex minNewPages = other.size_ / itemsPerPage;
-   arrayAllocator()->reallocateArrayPageIndex( pages_, pageCount_, minNewPages );
-   JSON_ASSERT_MESSAGE( pageCount_ >= minNewPages, 
-                        "ValueInternalArray::reserve(): bad reallocation" );
-   IteratorState itOther;
-   other.makeBeginIterator( itOther );
-   Value *value;
-   for ( ArrayIndex index = 0; index < size_; ++index, increment(itOther) )
-   {
-      if ( index % itemsPerPage == 0 )
-      {
-         PageIndex pageIndex = index / itemsPerPage;
-         value = arrayAllocator()->allocateArrayPage();
-         pages_[pageIndex] = value;
-      }
-      new (value) Value( dereference( itOther ) );
-   }
-}
-
-
-ValueInternalArray &
-ValueInternalArray::operator =( const ValueInternalArray &other )
-{
-   ValueInternalArray temp( other );
-   swap( temp );
-   return *this;
-}
-
-
-ValueInternalArray::~ValueInternalArray()
-{
-   // destroy all constructed items
-   IteratorState it;
-   IteratorState itEnd;
-   makeBeginIterator( it);
-   makeEndIterator( itEnd );
-   for ( ; !equals(it,itEnd); increment(it) )
-   {
-      Value *value = &dereference(it);
-      value->~Value();
-   }
-   // release all pages
-   PageIndex lastPageIndex = size_ / itemsPerPage;
-   for ( PageIndex pageIndex = 0; pageIndex < lastPageIndex; ++pageIndex )
-      arrayAllocator()->releaseArrayPage( pages_[pageIndex] );
-   // release pages index
-   arrayAllocator()->releaseArrayPageIndex( pages_, pageCount_ );
-}
-
-
-void 
-ValueInternalArray::swap( ValueInternalArray &other )
-{
-   Value **tempPages = pages_;
-   pages_ = other.pages_;
-   other.pages_ = tempPages;
-   ArrayIndex tempSize = size_;
-   size_ = other.size_;
-   other.size_ = tempSize;
-   PageIndex tempPageCount = pageCount_;
-   pageCount_ = other.pageCount_;
-   other.pageCount_ = tempPageCount;
-}
-
-void 
-ValueInternalArray::clear()
-{
-   ValueInternalArray dummy;
-   swap( dummy );
-}
-
-
-void 
-ValueInternalArray::resize( ArrayIndex newSize )
-{
-   if ( newSize == 0 )
-      clear();
-   else if ( newSize < size_ )
-   {
-      IteratorState it;
-      IteratorState itEnd;
-      makeIterator( it, newSize );
-      makeIterator( itEnd, size_ );
-      for ( ; !equals(it,itEnd); increment(it) )
-      {
-         Value *value = &dereference(it);
-         value->~Value();
-      }
-      PageIndex pageIndex = (newSize + itemsPerPage - 1) / itemsPerPage;
-      PageIndex lastPageIndex = size_ / itemsPerPage;
-      for ( ; pageIndex < lastPageIndex; ++pageIndex )
-         arrayAllocator()->releaseArrayPage( pages_[pageIndex] );
-      size_ = newSize;
-   }
-   else if ( newSize > size_ )
-      resolveReference( newSize );
-}
-
-
-void 
-ValueInternalArray::makeIndexValid( ArrayIndex index )
-{
-   // Need to enlarge page index ?
-   if ( index >= pageCount_ * itemsPerPage )
-   {
-      PageIndex minNewPages = (index + 1) / itemsPerPage;
-      arrayAllocator()->reallocateArrayPageIndex( pages_, pageCount_, minNewPages );
-      JSON_ASSERT_MESSAGE( pageCount_ >= minNewPages, "ValueInternalArray::reserve(): bad reallocation" );
-   }
-
-   // Need to allocate new pages ?
-   ArrayIndex nextPageIndex = 
-      (size_ % itemsPerPage) != 0 ? size_ - (size_%itemsPerPage) + itemsPerPage
-                                  : size_;
-   if ( nextPageIndex <= index )
-   {
-      PageIndex pageIndex = nextPageIndex / itemsPerPage;
-      PageIndex pageToAllocate = (index - nextPageIndex) / itemsPerPage + 1;
-      for ( ; pageToAllocate-- > 0; ++pageIndex )
-         pages_[pageIndex] = arrayAllocator()->allocateArrayPage();
-   }
-
-   // Initialize all new entries
-   IteratorState it;
-   IteratorState itEnd;
-   makeIterator( it, size_ );
-   size_ = index + 1;
-   makeIterator( itEnd, size_ );
-   for ( ; !equals(it,itEnd); increment(it) )
-   {
-      Value *value = &dereference(it);
-      new (value) Value(); // Construct a default value using placement new
-   }
-}
-
-Value &
-ValueInternalArray::resolveReference( ArrayIndex index )
-{
-   if ( index >= size_ )
-      makeIndexValid( index );
-   return pages_[index/itemsPerPage][index%itemsPerPage];
-}
-
-Value *
-ValueInternalArray::find( ArrayIndex index ) const
-{
-   if ( index >= size_ )
-      return 0;
-   return &(pages_[index/itemsPerPage][index%itemsPerPage]);
-}
-
-ValueInternalArray::ArrayIndex 
-ValueInternalArray::size() const
-{
-   return size_;
-}
-
-int 
-ValueInternalArray::distance( const IteratorState &x, const IteratorState &y )
-{
-   return indexOf(y) - indexOf(x);
-}
-
-
-ValueInternalArray::ArrayIndex 
-ValueInternalArray::indexOf( const IteratorState &iterator )
-{
-   if ( !iterator.array_ )
-      return ArrayIndex(-1);
-   return ArrayIndex(
-      (iterator.currentPageIndex_ - iterator.array_->pages_) * itemsPerPage 
-      + iterator.currentItemIndex_ );
-}
-
-
-int 
-ValueInternalArray::compare( const ValueInternalArray &other ) const
-{
-   int sizeDiff( size_ - other.size_ );
-   if ( sizeDiff != 0 )
-      return sizeDiff;
-   
-   for ( ArrayIndex index =0; index < size_; ++index )
-   {
-      int diff = pages_[index/itemsPerPage][index%itemsPerPage].compare( 
-         other.pages_[index/itemsPerPage][index%itemsPerPage] );
-      if ( diff != 0 )
-         return diff;
-   }
-   return 0;
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/src/blackberry10/native/public/json_internalmap.inl
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/src/blackberry10/native/public/json_internalmap.inl b/spec/plugins/cordova.echo/src/blackberry10/native/public/json_internalmap.inl
deleted file mode 100644
index ef37991..0000000
--- a/spec/plugins/cordova.echo/src/blackberry10/native/public/json_internalmap.inl
+++ /dev/null
@@ -1,607 +0,0 @@
-// included by json_value.cpp
-// everything is within Json namespace
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class ValueInternalMap
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-/** \internal MUST be safely initialized using memset( this, 0, sizeof(ValueInternalLink) );
-   * This optimization is used by the fast allocator.
-   */
-ValueInternalLink::ValueInternalLink()
-   : previous_( 0 )
-   , next_( 0 )
-{
-}
-
-ValueInternalLink::~ValueInternalLink()
-{ 
-   for ( int index =0; index < itemPerLink; ++index )
-   {
-      if ( !items_[index].isItemAvailable() )
-      {
-         if ( !items_[index].isMemberNameStatic() )
-            free( keys_[index] );
-      }
-      else
-         break;
-   }
-}
-
-
-
-ValueMapAllocator::~ValueMapAllocator()
-{
-}
-
-#ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
-class DefaultValueMapAllocator : public ValueMapAllocator
-{
-public: // overridden from ValueMapAllocator
-   virtual ValueInternalMap *newMap()
-   {
-      return new ValueInternalMap();
-   }
-
-   virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other )
-   {
-      return new ValueInternalMap( other );
-   }
-
-   virtual void destructMap( ValueInternalMap *map )
-   {
-      delete map;
-   }
-
-   virtual ValueInternalLink *allocateMapBuckets( unsigned int size )
-   {
-      return new ValueInternalLink[size];
-   }
-
-   virtual void releaseMapBuckets( ValueInternalLink *links )
-   {
-      delete [] links;
-   }
-
-   virtual ValueInternalLink *allocateMapLink()
-   {
-      return new ValueInternalLink();
-   }
-
-   virtual void releaseMapLink( ValueInternalLink *link )
-   {
-      delete link;
-   }
-};
-#else
-/// @todo make this thread-safe (lock when accessign batch allocator)
-class DefaultValueMapAllocator : public ValueMapAllocator
-{
-public: // overridden from ValueMapAllocator
-   virtual ValueInternalMap *newMap()
-   {
-      ValueInternalMap *map = mapsAllocator_.allocate();
-      new (map) ValueInternalMap(); // placement new
-      return map;
-   }
-
-   virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other )
-   {
-      ValueInternalMap *map = mapsAllocator_.allocate();
-      new (map) ValueInternalMap( other ); // placement new
-      return map;
-   }
-
-   virtual void destructMap( ValueInternalMap *map )
-   {
-      if ( map )
-      {
-         map->~ValueInternalMap();
-         mapsAllocator_.release( map );
-      }
-   }
-
-   virtual ValueInternalLink *allocateMapBuckets( unsigned int size )
-   {
-      return new ValueInternalLink[size];
-   }
-
-   virtual void releaseMapBuckets( ValueInternalLink *links )
-   {
-      delete [] links;
-   }
-
-   virtual ValueInternalLink *allocateMapLink()
-   {
-      ValueInternalLink *link = linksAllocator_.allocate();
-      memset( link, 0, sizeof(ValueInternalLink) );
-      return link;
-   }
-
-   virtual void releaseMapLink( ValueInternalLink *link )
-   {
-      link->~ValueInternalLink();
-      linksAllocator_.release( link );
-   }
-private:
-   BatchAllocator<ValueInternalMap,1> mapsAllocator_;
-   BatchAllocator<ValueInternalLink,1> linksAllocator_;
-};
-#endif
-
-static ValueMapAllocator *&mapAllocator()
-{
-   static DefaultValueMapAllocator defaultAllocator;
-   static ValueMapAllocator *mapAllocator = &defaultAllocator;
-   return mapAllocator;
-}
-
-static struct DummyMapAllocatorInitializer {
-   DummyMapAllocatorInitializer() 
-   {
-      mapAllocator();      // ensure mapAllocator() statics are initialized before main().
-   }
-} dummyMapAllocatorInitializer;
-
-
-
-// h(K) = value * K >> w ; with w = 32 & K prime w.r.t. 2^32.
-
-/*
-use linked list hash map. 
-buckets array is a container.
-linked list element contains 6 key/values. (memory = (16+4) * 6 + 4 = 124)
-value have extra state: valid, available, deleted
-*/
-
-
-ValueInternalMap::ValueInternalMap()
-   : buckets_( 0 )
-   , tailLink_( 0 )
-   , bucketsSize_( 0 )
-   , itemCount_( 0 )
-{
-}
-
-
-ValueInternalMap::ValueInternalMap( const ValueInternalMap &other )
-   : buckets_( 0 )
-   , tailLink_( 0 )
-   , bucketsSize_( 0 )
-   , itemCount_( 0 )
-{
-   reserve( other.itemCount_ );
-   IteratorState it;
-   IteratorState itEnd;
-   other.makeBeginIterator( it );
-   other.makeEndIterator( itEnd );
-   for ( ; !equals(it,itEnd); increment(it) )
-   {
-      bool isStatic;
-      const char *memberName = key( it, isStatic );
-      const Value &aValue = value( it );
-      resolveReference(memberName, isStatic) = aValue;
-   }
-}
-
-
-ValueInternalMap &
-ValueInternalMap::operator =( const ValueInternalMap &other )
-{
-   ValueInternalMap dummy( other );
-   swap( dummy );
-   return *this;
-}
-
-
-ValueInternalMap::~ValueInternalMap()
-{
-   if ( buckets_ )
-   {
-      for ( BucketIndex bucketIndex =0; bucketIndex < bucketsSize_; ++bucketIndex )
-      {
-         ValueInternalLink *link = buckets_[bucketIndex].next_;
-         while ( link )
-         {
-            ValueInternalLink *linkToRelease = link;
-            link = link->next_;
-            mapAllocator()->releaseMapLink( linkToRelease );
-         }
-      }
-      mapAllocator()->releaseMapBuckets( buckets_ );
-   }
-}
-
-
-void 
-ValueInternalMap::swap( ValueInternalMap &other )
-{
-   ValueInternalLink *tempBuckets = buckets_;
-   buckets_ = other.buckets_;
-   other.buckets_ = tempBuckets;
-   ValueInternalLink *tempTailLink = tailLink_;
-   tailLink_ = other.tailLink_;
-   other.tailLink_ = tempTailLink;
-   BucketIndex tempBucketsSize = bucketsSize_;
-   bucketsSize_ = other.bucketsSize_;
-   other.bucketsSize_ = tempBucketsSize;
-   BucketIndex tempItemCount = itemCount_;
-   itemCount_ = other.itemCount_;
-   other.itemCount_ = tempItemCount;
-}
-
-
-void 
-ValueInternalMap::clear()
-{
-   ValueInternalMap dummy;
-   swap( dummy );
-}
-
-
-ValueInternalMap::BucketIndex 
-ValueInternalMap::size() const
-{
-   return itemCount_;
-}
-
-bool 
-ValueInternalMap::reserveDelta( BucketIndex growth )
-{
-   return reserve( itemCount_ + growth );
-}
-
-bool 
-ValueInternalMap::reserve( BucketIndex newItemCount )
-{
-   if ( !buckets_  &&  newItemCount > 0 )
-   {
-      buckets_ = mapAllocator()->allocateMapBuckets( 1 );
-      bucketsSize_ = 1;
-      tailLink_ = &buckets_[0];
-   }
-//   BucketIndex idealBucketCount = (newItemCount + ValueInternalLink::itemPerLink) / ValueInternalLink::itemPerLink;
-   return true;
-}
-
-
-const Value *
-ValueInternalMap::find( const char *key ) const
-{
-   if ( !bucketsSize_ )
-      return 0;
-   HashKey hashedKey = hash( key );
-   BucketIndex bucketIndex = hashedKey % bucketsSize_;
-   for ( const ValueInternalLink *current = &buckets_[bucketIndex]; 
-         current != 0; 
-         current = current->next_ )
-   {
-      for ( BucketIndex index=0; index < ValueInternalLink::itemPerLink; ++index )
-      {
-         if ( current->items_[index].isItemAvailable() )
-            return 0;
-         if ( strcmp( key, current->keys_[index] ) == 0 )
-            return &current->items_[index];
-      }
-   }
-   return 0;
-}
-
-
-Value *
-ValueInternalMap::find( const char *key )
-{
-   const ValueInternalMap *constThis = this;
-   return const_cast<Value *>( constThis->find( key ) );
-}
-
-
-Value &
-ValueInternalMap::resolveReference( const char *key,
-                                    bool isStatic )
-{
-   HashKey hashedKey = hash( key );
-   if ( bucketsSize_ )
-   {
-      BucketIndex bucketIndex = hashedKey % bucketsSize_;
-      ValueInternalLink **previous = 0;
-      BucketIndex index;
-      for ( ValueInternalLink *current = &buckets_[bucketIndex]; 
-            current != 0; 
-            previous = &current->next_, current = current->next_ )
-      {
-         for ( index=0; index < ValueInternalLink::itemPerLink; ++index )
-         {
-            if ( current->items_[index].isItemAvailable() )
-               return setNewItem( key, isStatic, current, index );
-            if ( strcmp( key, current->keys_[index] ) == 0 )
-               return current->items_[index];
-         }
-      }
-   }
-
-   reserveDelta( 1 );
-   return unsafeAdd( key, isStatic, hashedKey );
-}
-
-
-void 
-ValueInternalMap::remove( const char *key )
-{
-   HashKey hashedKey = hash( key );
-   if ( !bucketsSize_ )
-      return;
-   BucketIndex bucketIndex = hashedKey % bucketsSize_;
-   for ( ValueInternalLink *link = &buckets_[bucketIndex]; 
-         link != 0; 
-         link = link->next_ )
-   {
-      BucketIndex index;
-      for ( index =0; index < ValueInternalLink::itemPerLink; ++index )
-      {
-         if ( link->items_[index].isItemAvailable() )
-            return;
-         if ( strcmp( key, link->keys_[index] ) == 0 )
-         {
-            doActualRemove( link, index, bucketIndex );
-            return;
-         }
-      }
-   }
-}
-
-void 
-ValueInternalMap::doActualRemove( ValueInternalLink *link, 
-                                  BucketIndex index,
-                                  BucketIndex bucketIndex )
-{
-   // find last item of the bucket and swap it with the 'removed' one.
-   // set removed items flags to 'available'.
-   // if last page only contains 'available' items, then deallocate it (it's empty)
-   ValueInternalLink *&lastLink = getLastLinkInBucket( index );
-   BucketIndex lastItemIndex = 1; // a link can never be empty, so start at 1
-   for ( ;   
-         lastItemIndex < ValueInternalLink::itemPerLink; 
-         ++lastItemIndex ) // may be optimized with dicotomic search
-   {
-      if ( lastLink->items_[lastItemIndex].isItemAvailable() )
-         break;
-   }
-   
-   BucketIndex lastUsedIndex = lastItemIndex - 1;
-   Value *valueToDelete = &link->items_[index];
-   Value *valueToPreserve = &lastLink->items_[lastUsedIndex];
-   if ( valueToDelete != valueToPreserve )
-      valueToDelete->swap( *valueToPreserve );
-   if ( lastUsedIndex == 0 )  // page is now empty
-   {  // remove it from bucket linked list and delete it.
-      ValueInternalLink *linkPreviousToLast = lastLink->previous_;
-      if ( linkPreviousToLast != 0 )   // can not deleted bucket link.
-      {
-         mapAllocator()->releaseMapLink( lastLink );
-         linkPreviousToLast->next_ = 0;
-         lastLink = linkPreviousToLast;
-      }
-   }
-   else
-   {
-      Value dummy;
-      valueToPreserve->swap( dummy ); // restore deleted to default Value.
-      valueToPreserve->setItemUsed( false );
-   }
-   --itemCount_;
-}
-
-
-ValueInternalLink *&
-ValueInternalMap::getLastLinkInBucket( BucketIndex bucketIndex )
-{
-   if ( bucketIndex == bucketsSize_ - 1 )
-      return tailLink_;
-   ValueInternalLink *&previous = buckets_[bucketIndex+1].previous_;
-   if ( !previous )
-      previous = &buckets_[bucketIndex];
-   return previous;
-}
-
-
-Value &
-ValueInternalMap::setNewItem( const char *key, 
-                              bool isStatic,
-                              ValueInternalLink *link, 
-                              BucketIndex index )
-{
-   char *duplicatedKey = valueAllocator()->makeMemberName( key );
-   ++itemCount_;
-   link->keys_[index] = duplicatedKey;
-   link->items_[index].setItemUsed();
-   link->items_[index].setMemberNameIsStatic( isStatic );
-   return link->items_[index]; // items already default constructed.
-}
-
-
-Value &
-ValueInternalMap::unsafeAdd( const char *key, 
-                             bool isStatic, 
-                             HashKey hashedKey )
-{
-   JSON_ASSERT_MESSAGE( bucketsSize_ > 0, "ValueInternalMap::unsafeAdd(): internal logic error." );
-   BucketIndex bucketIndex = hashedKey % bucketsSize_;
-   ValueInternalLink *&previousLink = getLastLinkInBucket( bucketIndex );
-   ValueInternalLink *link = previousLink;
-   BucketIndex index;
-   for ( index =0; index < ValueInternalLink::itemPerLink; ++index )
-   {
-      if ( link->items_[index].isItemAvailable() )
-         break;
-   }
-   if ( index == ValueInternalLink::itemPerLink ) // need to add a new page
-   {
-      ValueInternalLink *newLink = mapAllocator()->allocateMapLink();
-      index = 0;
-      link->next_ = newLink;
-      previousLink = newLink;
-      link = newLink;
-   }
-   return setNewItem( key, isStatic, link, index );
-}
-
-
-ValueInternalMap::HashKey 
-ValueInternalMap::hash( const char *key ) const
-{
-   HashKey hash = 0;
-   while ( *key )
-      hash += *key++ * 37;
-   return hash;
-}
-
-
-int 
-ValueInternalMap::compare( const ValueInternalMap &other ) const
-{
-   int sizeDiff( itemCount_ - other.itemCount_ );
-   if ( sizeDiff != 0 )
-      return sizeDiff;
-   // Strict order guaranty is required. Compare all keys FIRST, then compare values.
-   IteratorState it;
-   IteratorState itEnd;
-   makeBeginIterator( it );
-   makeEndIterator( itEnd );
-   for ( ; !equals(it,itEnd); increment(it) )
-   {
-      if ( !other.find( key( it ) ) )
-         return 1;
-   }
-
-   // All keys are equals, let's compare values
-   makeBeginIterator( it );
-   for ( ; !equals(it,itEnd); increment(it) )
-   {
-      const Value *otherValue = other.find( key( it ) );
-      int valueDiff = value(it).compare( *otherValue );
-      if ( valueDiff != 0 )
-         return valueDiff;
-   }
-   return 0;
-}
-
-
-void 
-ValueInternalMap::makeBeginIterator( IteratorState &it ) const
-{
-   it.map_ = const_cast<ValueInternalMap *>( this );
-   it.bucketIndex_ = 0;
-   it.itemIndex_ = 0;
-   it.link_ = buckets_;
-}
-
-
-void 
-ValueInternalMap::makeEndIterator( IteratorState &it ) const
-{
-   it.map_ = const_cast<ValueInternalMap *>( this );
-   it.bucketIndex_ = bucketsSize_;
-   it.itemIndex_ = 0;
-   it.link_ = 0;
-}
-
-
-bool 
-ValueInternalMap::equals( const IteratorState &x, const IteratorState &other )
-{
-   return x.map_ == other.map_  
-          &&  x.bucketIndex_ == other.bucketIndex_  
-          &&  x.link_ == other.link_
-          &&  x.itemIndex_ == other.itemIndex_;
-}
-
-
-void 
-ValueInternalMap::incrementBucket( IteratorState &iterator )
-{
-   ++iterator.bucketIndex_;
-   JSON_ASSERT_MESSAGE( iterator.bucketIndex_ <= iterator.map_->bucketsSize_,
-      "ValueInternalMap::increment(): attempting to iterate beyond end." );
-   if ( iterator.bucketIndex_ == iterator.map_->bucketsSize_ )
-      iterator.link_ = 0;
-   else
-      iterator.link_ = &(iterator.map_->buckets_[iterator.bucketIndex_]);
-   iterator.itemIndex_ = 0;
-}
-
-
-void 
-ValueInternalMap::increment( IteratorState &iterator )
-{
-   JSON_ASSERT_MESSAGE( iterator.map_, "Attempting to iterator using invalid iterator." );
-   ++iterator.itemIndex_;
-   if ( iterator.itemIndex_ == ValueInternalLink::itemPerLink )
-   {
-      JSON_ASSERT_MESSAGE( iterator.link_ != 0,
-         "ValueInternalMap::increment(): attempting to iterate beyond end." );
-      iterator.link_ = iterator.link_->next_;
-      if ( iterator.link_ == 0 )
-         incrementBucket( iterator );
-   }
-   else if ( iterator.link_->items_[iterator.itemIndex_].isItemAvailable() )
-   {
-      incrementBucket( iterator );
-   }
-}
-
-
-void 
-ValueInternalMap::decrement( IteratorState &iterator )
-{
-   if ( iterator.itemIndex_ == 0 )
-   {
-      JSON_ASSERT_MESSAGE( iterator.map_, "Attempting to iterate using invalid iterator." );
-      if ( iterator.link_ == &iterator.map_->buckets_[iterator.bucketIndex_] )
-      {
-         JSON_ASSERT_MESSAGE( iterator.bucketIndex_ > 0, "Attempting to iterate beyond beginning." );
-         --(iterator.bucketIndex_);
-      }
-      iterator.link_ = iterator.link_->previous_;
-      iterator.itemIndex_ = ValueInternalLink::itemPerLink - 1;
-   }
-}
-
-
-const char *
-ValueInternalMap::key( const IteratorState &iterator )
-{
-   JSON_ASSERT_MESSAGE( iterator.link_, "Attempting to iterate using invalid iterator." );
-   return iterator.link_->keys_[iterator.itemIndex_];
-}
-
-const char *
-ValueInternalMap::key( const IteratorState &iterator, bool &isStatic )
-{
-   JSON_ASSERT_MESSAGE( iterator.link_, "Attempting to iterate using invalid iterator." );
-   isStatic = iterator.link_->items_[iterator.itemIndex_].isMemberNameStatic();
-   return iterator.link_->keys_[iterator.itemIndex_];
-}
-
-
-Value &
-ValueInternalMap::value( const IteratorState &iterator )
-{
-   JSON_ASSERT_MESSAGE( iterator.link_, "Attempting to iterate using invalid iterator." );
-   return iterator.link_->items_[iterator.itemIndex_];
-}
-
-
-int 
-ValueInternalMap::distance( const IteratorState &x, const IteratorState &y )
-{
-   int offset = 0;
-   IteratorState it = x;
-   while ( !equals( it, y ) )
-      increment( it );
-   return offset;
-}


[39/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/DummyPlugin/src/android/DummyPlugin.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/android/DummyPlugin.java b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/android/DummyPlugin.java
new file mode 100644
index 0000000..5263b0c
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/android/DummyPlugin.java
@@ -0,0 +1,19 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed 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.
+ *
+*/
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/DummyPlugin/src/android/TestLib.jar
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/android/TestLib.jar b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/android/TestLib.jar
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/DummyPlugin/src/blackberry10/index.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/blackberry10/index.js b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/blackberry10/index.js
new file mode 100644
index 0000000..5263b0c
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/blackberry10/index.js
@@ -0,0 +1,19 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed 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.
+ *
+*/
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/Custom.framework/someFheader.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/Custom.framework/someFheader.h b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/Custom.framework/someFheader.h
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/Custom.framework/somebinlib
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/Custom.framework/somebinlib b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/Custom.framework/somebinlib
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/DummyPlugin.bundle
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/DummyPlugin.bundle b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/DummyPlugin.bundle
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/DummyPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/DummyPluginCommand.h b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/DummyPluginCommand.h
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/DummyPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/DummyPluginCommand.m b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/DummyPluginCommand.m
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/SourceWithFramework.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/SourceWithFramework.m b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/SourceWithFramework.m
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/TargetDirTest.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/TargetDirTest.h b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/TargetDirTest.h
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/TargetDirTest.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/TargetDirTest.m b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/TargetDirTest.m
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/libsqlite3.dylib
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/libsqlite3.dylib b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/ios/libsqlite3.dylib
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/DummyPlugin/src/tizen/dummer.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/tizen/dummer.js b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/tizen/dummer.js
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/DummyPlugin/src/windows8/dummer.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/windows8/dummer.js b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/windows8/dummer.js
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/DummyPlugin/src/wp7/DummyPlugin.cs
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/wp7/DummyPlugin.cs b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/wp7/DummyPlugin.cs
new file mode 100644
index 0000000..273dc3b
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/wp7/DummyPlugin.cs
@@ -0,0 +1,19 @@
+/*
+ *
+ * Copyright 2013 Benn Mapes
+ *
+ * Licensed 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.
+ *
+*/
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/DummyPlugin/src/wp8/DummyPlugin.cs
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/src/wp8/DummyPlugin.cs b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/wp8/DummyPlugin.cs
new file mode 100644
index 0000000..273dc3b
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/DummyPlugin/src/wp8/DummyPlugin.cs
@@ -0,0 +1,19 @@
+/*
+ *
+ * Copyright 2013 Benn Mapes
+ *
+ * Licensed 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.
+ *
+*/
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/DummyPlugin/www/dummyplugin.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/www/dummyplugin.js b/cordova-lib/spec-plugman/plugins/DummyPlugin/www/dummyplugin.js
new file mode 100644
index 0000000..5263b0c
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/DummyPlugin/www/dummyplugin.js
@@ -0,0 +1,19 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed 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.
+ *
+*/
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/DummyPlugin/www/dummyplugin/image.jpg
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/www/dummyplugin/image.jpg b/cordova-lib/spec-plugman/plugins/DummyPlugin/www/dummyplugin/image.jpg
new file mode 100644
index 0000000..257cc56
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/DummyPlugin/www/dummyplugin/image.jpg
@@ -0,0 +1 @@
+foo

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/EnginePlugin/megaBoringVersion
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/EnginePlugin/megaBoringVersion b/cordova-lib/spec-plugman/plugins/EnginePlugin/megaBoringVersion
new file mode 100755
index 0000000..cbf7911
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/EnginePlugin/megaBoringVersion
@@ -0,0 +1,23 @@
+#! /bin/sh
+
+#
+# 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.
+#
+
+echo 4.0.0
+exit 0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/EnginePlugin/megaFunVersion
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/EnginePlugin/megaFunVersion b/cordova-lib/spec-plugman/plugins/EnginePlugin/megaFunVersion
new file mode 100755
index 0000000..1e4c706
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/EnginePlugin/megaFunVersion
@@ -0,0 +1,23 @@
+#! /bin/sh
+
+#
+# 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.
+#
+
+echo 1.0.0
+exit 0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/EnginePlugin/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/EnginePlugin/plugin.xml b/cordova-lib/spec-plugman/plugins/EnginePlugin/plugin.xml
new file mode 100644
index 0000000..a58f19e
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/EnginePlugin/plugin.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
+    xmlns="http://www.phonegap.com/ns/plugins/1.0"
+    id="com.cordova.engine"
+    version="1.0.0">
+
+    <name>Engine Choo Choo</name>
+
+    <engines>
+        <engine name="cordova" version=">=2.3.0"/>
+        <engine name="cordova-plugman" version=">=0.10.0" />
+        <engine name="mega-fun-plugin" version=">=1.0.0" scriptSrc="megaFunVersion" platform="*" />
+        <engine name="mega-boring-plugin" version=">=3.0.0" scriptSrc="megaBoringVersion" platform="ios|android" />
+    </engines>
+    
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/EnginePluginAndroid/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/EnginePluginAndroid/plugin.xml b/cordova-lib/spec-plugman/plugins/EnginePluginAndroid/plugin.xml
new file mode 100644
index 0000000..fe2bce2
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/EnginePluginAndroid/plugin.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
+    xmlns="http://www.phonegap.com/ns/plugins/1.0"
+    id="com.cordova.engine"
+    version="1.0.0">
+
+    <name>Engine Choo Choo</name>
+
+    <engines>
+        <engine name="cordova" version=">=3.0.0"/>
+        <engine name="cordova-android" version=">=3.1.0"/>
+        <engine name="android-sdk" version=">=18"/>
+    </engines>
+    
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/EnginePluginiOS/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/EnginePluginiOS/plugin.xml b/cordova-lib/spec-plugman/plugins/EnginePluginiOS/plugin.xml
new file mode 100644
index 0000000..d7a9a8e
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/EnginePluginiOS/plugin.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
+    xmlns="http://www.phonegap.com/ns/plugins/1.0"
+    id="com.cordova.engine"
+    version="1.0.0">
+
+    <name>Engine Choo Choo</name>
+
+    <engines>
+        <engine name="cordova" version=">=3.0.0"/>
+        <engine name="cordova-android" version=">=3.1.0"/>
+        <engine name="apple-ios" version="6.1"/>
+        <engine name="apple-osx" version=">10.0"/>
+        <engine name="apple-xcode" version=">=4.6.3"/>
+    </engines>
+    
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/FaultyPlugin/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/FaultyPlugin/plugin.xml b/cordova-lib/spec-plugman/plugins/FaultyPlugin/plugin.xml
new file mode 100644
index 0000000..22564e7
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/FaultyPlugin/plugin.xml
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="com.phonegap.plugins.faultyplugin"
+    version="0.6.0">
+
+    <name>Faulty Plugin</name>
+
+    <access origin="build.phonegap.com" />
+    <access origin="s3.amazonaws.com" />
+    <!-- file doesn't exist -->
+
+    <config-file target="config.xml" parent="/widget">
+        <asset src="www/main.js" target="faultyplugin/main.js" />
+        <asset src="www/index.js" target="faultyplugin/index.js" />
+    </config-file>
+
+    <!-- android -->
+    <platform name="android">
+        <config-file target="AndroidManifest.xml" parent="/manifest/application">
+            <activity android:name="com.phonegap.plugins.faultyplugin.FaultyPlugin"
+                      android:label="@string/app_name">
+                <intent-filter>
+                </intent-filter>
+            </activity>
+        </config-file>
+
+        <!-- CDV < 2.0 -->
+        <config-file target="res/xml/plugins.xml" parent="/plugins">
+            <plugin name="FaultyPlugin"
+                value="com.phonegap.plugins.faultyplugin.FaultyPlugin"/>
+        </config-file>
+
+        <!-- CDV 2.0+ (for now) -->
+        <config-file target="res/xml/config.xml" parent="/cordova/plugins">
+            <plugin name="FaultyPlugin"
+                value="com.phonegap.plugins.faultyplugin.FaultyPlugin"/>
+        </config-file>
+
+        <!-- this file doesn't exist -->
+        <source-file src="src/android/NotHere.java"
+                target-dir="src/com/phonegap/plugins/faultyplugin" />
+    </platform>
+    
+    <!-- android -->
+    <platform name="amazon-fireos">
+        <config-file target="AndroidManifest.xml" parent="/manifest/application">
+            <activity android:name="com.phonegap.plugins.faultyplugin.FaultyPlugin"
+                      android:label="@string/app_name">
+                <intent-filter>
+                </intent-filter>
+            </activity>
+        </config-file>
+
+        <!-- CDV < 2.0 -->
+        <config-file target="res/xml/plugins.xml" parent="/plugins">
+            <plugin name="FaultyPlugin"
+                value="com.phonegap.plugins.faultyplugin.FaultyPlugin"/>
+        </config-file>
+
+        <!-- CDV 2.0+ (for now) -->
+        <config-file target="res/xml/config.xml" parent="/cordova/plugins">
+            <plugin name="FaultyPlugin"
+                value="com.phonegap.plugins.faultyplugin.FaultyPlugin"/>
+        </config-file>
+
+        <!-- this file doesn't exist -->
+        <source-file src="src/android/NotHere.java"
+                target-dir="src/com/phonegap/plugins/faultyplugin" />
+    </platform>
+
+    <!-- ios -->
+    <platform name="ios">
+        <!-- /cordova/plugins no longer exists, it is now /widget/plugins -->
+        <!-- this should fail to install on ios -->
+        <config-file target="config.xml" parent="/cordova/plugins">
+            <plugin name="FaultyPlugin"
+                value="FaultyPlugin"/>
+        </config-file>
+
+        <header-file src="src/ios/FaultyPlugin.h" />
+        <source-file src="src/ios/FaultyPlugin.m" />
+        <!-- these files don't exist -->
+        <header-file src="src/ios/FaultyPluginCommand.h" />
+        <source-file src="src/ios/FaultyPluginCommand.m" />
+        <resource-file src="src/ios/IDontExist.bundle" />
+        <framework src="src/ios/Nopers.lib" />
+        <framework src="src/ios/NonExistantCustomFramework.framework" custom="true" />
+    </platform>
+    <platform name="blackberry10">
+        <config-file target="config.xml" parent="/widget">
+            <feature id="cordova.echo" required="true" version="1.0.0.0"/>
+        </config-file>
+
+        <source-file src="src/blackberry10/index.js" target-dir="ext-qnx/cordova.echo" />
+        <!-- these dont exist -->
+        <lib-file src="src/blackberry10/device/echoJnext.so" target-dir="ext-qnx/cordova.echo/device" />
+        <lib-file src="src/blackberry10/simulator/echoJnext.so" target-dir="ext-qnx/cordova.echo/simulator" />
+    </platform>
+
+    <!-- wp7 -->
+    <platform name="wp7">
+        <config-file target="config.xml" parent="/*">
+            <feature name="FaultyPlugin">
+                <param name="wp-package" value="FaultyPlugin"/>
+            </feature>
+        </config-file>
+
+        <source-file src="src/wp7/FaultyPlugin.cs" />
+
+        <!-- this doesn't exist -->
+        <source-file src="src/wp7/NotHere.cs" />
+    </platform>
+
+    <!-- wp8 -->
+    <platform name="wp8">
+        <config-file target="config.xml" parent="/*">
+            <feature name="FaultyPlugin">
+                <param name="wp-package" value="FaultyPlugin"/>
+            </feature>
+        </config-file>
+
+        <source-file src="src/wp8/FaultyPlugin.cs" />
+
+        <!-- this doesn't exist -->
+        <source-file src="src/wp8/NotHere.cs" />
+    </platform>
+
+    <!-- wp8 -->
+    <platform name="windows8">
+        <config-file target="config.xml" parent="/*">
+            <feature name="FaultyPlugin">
+                <param name="windows8-package" value="FaultyPlugin"/>
+            </feature>
+        </config-file>
+
+        <source-file src="src/windows8/faultyPlugin.js" />
+
+        <!-- does not exist -->
+        <source-file src="src/windows8/NotHere.js" />
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/android/FaultyPlugin.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/android/FaultyPlugin.java b/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/android/FaultyPlugin.java
new file mode 100644
index 0000000..5263b0c
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/android/FaultyPlugin.java
@@ -0,0 +1,19 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed 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.
+ *
+*/
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/blackberry10/client.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/blackberry10/client.js b/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/blackberry10/client.js
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/ios/FaultyPlugin.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/ios/FaultyPlugin.h b/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/ios/FaultyPlugin.h
new file mode 100644
index 0000000..6a23ab6
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/ios/FaultyPlugin.h
@@ -0,0 +1,49 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed 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.
+ *
+*/
+
+//
+//  PhoneGap ! ChildBrowserCommand
+//
+//
+//  Created by Jesse MacFadyen on 10-05-29.
+//  Copyright 2010 Nitobi. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#ifdef PHONEGAP_FRAMEWORK
+	#import <PhoneGap/PGPlugin.h>
+#else
+	#import "PGPlugin.h"
+#endif
+#import "ChildBrowserViewController.h"
+
+
+
+@interface ChildBrowserCommand : PGPlugin <ChildBrowserDelegate>  {
+
+	ChildBrowserViewController* childBrowser;
+}
+
+@property (nonatomic, retain) ChildBrowserViewController *childBrowser;
+
+
+- (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
+-(void) onChildLocationChange:(NSString*)newLoc;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/ios/FaultyPlugin.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/ios/FaultyPlugin.m b/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/ios/FaultyPlugin.m
new file mode 100644
index 0000000..38aaf64
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/ios/FaultyPlugin.m
@@ -0,0 +1,86 @@
+//
+
+// 
+//
+//  Created by Jesse MacFadyen on 10-05-29.
+//  Copyright 2010 Nitobi. All rights reserved.
+//  Copyright (c) 2011, IBM Corporation
+//  Copyright 2011, Randy McMillan
+//
+
+#import "ChildBrowserCommand.h"
+
+#ifdef PHONEGAP_FRAMEWORK
+	#import <PhoneGap/PhoneGapViewController.h>
+#else
+	#import "PhoneGapViewController.h"
+#endif
+
+
+@implementation ChildBrowserCommand
+
+@synthesize childBrowser;
+
+- (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options // args: url
+{	
+	
+    if(childBrowser == NULL)
+	{
+		childBrowser = [[ ChildBrowserViewController alloc ] initWithScale:FALSE ];
+		childBrowser.delegate = self;
+	}
+	
+/* // TODO: Work in progress
+	NSString* strOrientations = [ options objectForKey:@"supportedOrientations"];
+	NSArray* supportedOrientations = [strOrientations componentsSeparatedByString:@","];
+*/
+    PhoneGapViewController* cont = (PhoneGapViewController*)[ super appViewController ];
+    childBrowser.supportedOrientations = cont.supportedOrientations;
+    
+    if ([cont respondsToSelector:@selector(presentViewController)]) {
+        //Reference UIViewController.h Line:179 for update to iOS 5 difference - @RandyMcMillan
+        [cont presentViewController:childBrowser animated:YES completion:nil];        
+    } else {
+        [ cont presentModalViewController:childBrowser animated:YES ];
+    }                 
+        
+    NSString *url = (NSString*) [arguments objectAtIndex:0];
+        
+    [childBrowser loadURL:url  ];
+        
+}
+
+-(void) close:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options // args: url
+{
+    [ childBrowser closeBrowser];
+	
+}
+
+-(void) onClose
+{
+	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onClose();",@""];
+	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
+}
+
+-(void) onOpenInSafari
+{
+	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onOpenExternal();",@""];
+	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
+}
+
+
+-(void) onChildLocationChange:(NSString*)newLoc
+{
+	
+	NSString* tempLoc = [NSString stringWithFormat:@"%@",newLoc];
+	NSString* encUrl = [tempLoc stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
+	 
+	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onLocationChange('%@');",encUrl];
+	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
+
+}
+
+
+
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/windows8/faultyPlugin.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/windows8/faultyPlugin.js b/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/windows8/faultyPlugin.js
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/wp7/FaultyPlugin.cs
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/wp7/FaultyPlugin.cs b/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/wp7/FaultyPlugin.cs
new file mode 100644
index 0000000..5263b0c
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/wp7/FaultyPlugin.cs
@@ -0,0 +1,19 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed 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.
+ *
+*/
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/wp8/FaultyPlugin.cs
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/wp8/FaultyPlugin.cs b/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/wp8/FaultyPlugin.cs
new file mode 100644
index 0000000..5263b0c
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/FaultyPlugin/src/wp8/FaultyPlugin.cs
@@ -0,0 +1,19 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed 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.
+ *
+*/
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/PluginsPlistOnly/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/PluginsPlistOnly/plugin.xml b/cordova-lib/spec-plugman/plugins/PluginsPlistOnly/plugin.xml
new file mode 100644
index 0000000..0e00504
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/PluginsPlistOnly/plugin.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    id="com.phonegap.plugins.oldskewl"
+    version="0.0.1">
+
+    <name>Old Skewl Plugin using Plists</name>
+
+    <!-- ios -->
+    <platform name="ios">
+        <plugins-plist key="OldSkewl" string="OldSkewlCommand" />
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/VariablePlugin/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/VariablePlugin/plugin.xml b/cordova-lib/spec-plugman/plugins/VariablePlugin/plugin.xml
new file mode 100644
index 0000000..9eff729
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/VariablePlugin/plugin.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="com.adobe.vars"
+    version="3.0.0">
+
+    <name>Use Variables</name>
+
+    <preference name="API_KEY" />
+
+    <info>Remember that your api key is $API_KEY!</info>
+    <!-- android -->
+    <platform name="android">
+		<config-file target="AndroidManifest.xml" parent="/manifest">
+            <poop name="GoogleMapsApiKey" value="$API_KEY" />
+            <package>$PACKAGE_NAME</package>
+		</config-file>
+		
+    </platform>
+    
+    <!-- amazon fireos -->
+    <platform name="amazon-fireos">
+		<config-file target="AndroidManifest.xml" parent="/manifest">
+            <poop name="GoogleMapsApiKey" value="$API_KEY" />
+            <package>$PACKAGE_NAME</package>
+		</config-file>
+		
+    </platform>
+
+    <!-- ios -->
+    <platform name="ios">
+        <config-file target="config.xml" parent="/widget">
+            <awesome value="$API_KEY" />
+            <cfbundleid>$PACKAGE_NAME</cfbundleid>
+        </config-file>
+        <config-file target="*-Info.plist" parent="APluginNode">
+            <string></string>
+        </config-file>
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/WebNotifications/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WebNotifications/plugin.xml b/cordova-lib/spec-plugman/plugins/WebNotifications/plugin.xml
new file mode 100644
index 0000000..b9026f1
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/WebNotifications/plugin.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="com.phonegap.plugins.webnotifications"
+    version="0.0.1">
+
+    <name>Web Notifications</name>
+
+    <asset src="www/webnotifications.js" target="webnotifications.js" />
+
+    <config-file target="config.xml" parent="/*">
+        <access origin="build.phonegap.com" />
+        <access origin="s3.amazonaws.com" />
+    </config-file>
+	
+    <!-- ios -->
+    <platform name="ios">
+        <config-file target="config.xml" parent="/*/plugins">
+            <plugin name="WebNotifications"
+                value="WebNotifications"/>
+        </config-file>
+
+        <header-file src="src/ios/WebNotifications.h" />
+
+        <source-file src="src/ios/WebNotifications.m" />
+
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/WebNotifications/src/ios/AppDelegate.m.diff
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WebNotifications/src/ios/AppDelegate.m.diff b/cordova-lib/spec-plugman/plugins/WebNotifications/src/ios/AppDelegate.m.diff
new file mode 100644
index 0000000..754d079
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/WebNotifications/src/ios/AppDelegate.m.diff
@@ -0,0 +1,18 @@
+- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
+{
+    // Note: if app wasn't running, you can still get a LN and then it doesn't call this function,
+    // I think it calls app start but notifies you that LN caused the app start or something like that.
+    
+    //UIApplicationState state = [application applicationState];
+    //BOOL wasForeground = (state == UIApplicationStateActive);
+    
+    //NSString *title = [notification.userInfo objectForKey:@"title"];
+    //NSString *body = [notification.userInfo objectForKey:@"body"];
+    NSString *tag = [notification.userInfo objectForKey:@"tag"];
+    
+    [(WebNotifications*)[self.viewController getCommandInstance:@"WebNotifications"] clickNotification:tag];
+    
+    application.applicationIconBadgeNumber = 0;
+    application.scheduledLocalNotifications = [NSArray arrayWithArray:application.scheduledLocalNotifications]; // "hack" to clear seen notifications
+}
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/WebNotifications/src/ios/WebNotifications.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WebNotifications/src/ios/WebNotifications.h b/cordova-lib/spec-plugman/plugins/WebNotifications/src/ios/WebNotifications.h
new file mode 100644
index 0000000..1702f40
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/WebNotifications/src/ios/WebNotifications.h
@@ -0,0 +1,35 @@
+/*
+ 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.
+ */
+
+#import <Foundation/Foundation.h>
+#import <Cordova/CDVPlugin.h>
+
+@interface WebNotifications : CDVPlugin {
+}
+
+@property (nonatomic, strong) NSMutableArray* activeNotifications;
+
+- (CDVPlugin*)initWithWebView:(UIWebView*)theWebView;
+
+- (void)createNotification:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
+- (void)closeNotification:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
+
+- (void)clickNotification:(NSString*)tag;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/WebNotifications/src/ios/WebNotifications.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WebNotifications/src/ios/WebNotifications.m b/cordova-lib/spec-plugman/plugins/WebNotifications/src/ios/WebNotifications.m
new file mode 100644
index 0000000..6f0c11f
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/WebNotifications/src/ios/WebNotifications.m
@@ -0,0 +1,124 @@
+/*
+ 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.
+ */
+
+#define Log(fmt, ...) NSLog((@"%d: %s " fmt), __LINE__, __PRETTY_FUNCTION__, ##__VA_ARGS__);
+
+#import "WebNotifications.h"
+#import "MainViewController.h"
+
+@implementation WebNotifications
+
+@synthesize activeNotifications;
+
+- (CDVPlugin*)initWithWebView:(UIWebView*)theWebView
+{
+    self = [super init];
+    if (self) {
+        self.activeNotifications = [NSMutableArray array];
+    }
+    return self;
+}
+
+- (void)createNotification:(CDVInvokedUrlCommand*)command
+{
+    NSDictionary* options = [command.arguments objectAtIndex:0];
+
+    // w3c options:
+	NSString *title = [options objectForKey:@"title"];
+	NSString *body = [options objectForKey:@"body"];
+	NSString *tag = [options objectForKey:@"tag"];
+    //NSString *iconUrl = [options objectForKey:@"iconUrl"]; // Not supported
+    
+    // cordova option extensions:
+    NSUInteger delay = [[options objectForKey:@"delay"] unsignedIntegerValue];
+    NSString *soundUrl = [options objectForKey:@"soundUrl"];
+    NSInteger badgeNumber = [[options objectForKey:@"badgeNumber"] intValue];
+    
+    Log(@"addNotification title: %@  body: %@  tag: %@  delay: %u  badge: %u", title, body, tag, delay, badgeNumber);
+    
+    //NSString *action = [options objectForKey:@"action"];
+    //bool hasAction = ([[options objectForKey:@"hasAction"] intValue] == 1) ? YES : NO;
+    //alertAction
+    
+	UILocalNotification *notif = [[UILocalNotification alloc] init];
+	notif.alertBody = [NSString stringWithFormat:@"[%@] %@: %@", tag, title, body];
+    notif.timeZone = [NSTimeZone defaultTimeZone];
+    
+    notif.soundName = soundUrl;
+    notif.applicationIconBadgeNumber = badgeNumber;
+	
+	NSDictionary *userDict = [NSDictionary dictionaryWithObjectsAndKeys:title,@"title",body,@"body",tag,@"tag",nil];
+    notif.userInfo = userDict;
+	
+    if (delay != 0) {
+        notif.fireDate = [[NSDate date] addTimeInterval:delay];
+        //notif.repeatInterval = [[repeatDict objectForKey: repeat] intValue];
+        
+        [[UIApplication sharedApplication] scheduleLocalNotification:notif];
+    } else {
+        [[UIApplication sharedApplication] presentLocalNotificationNow:notif];
+    }
+    
+    [self.activeNotifications addObject:notif];
+}
+
+- (void)closeNotification:(CDVInvokedUrlCommand*)command
+{
+//    command.callbackId;
+    NSDictionary* options = [command.arguments objectAtIndex:0];
+    NSString *tag = [options objectForKey:@"tag"];
+
+    NSArray *notifications = [[UIApplication sharedApplication] scheduledLocalNotifications];
+    for (UILocalNotification *notification in notifications) {
+        if ([[notification.userInfo objectForKey:@"tag"] isEqualToString:tag]) {
+            Log(@"Cancelling notification with tag: %@", tag);
+            [[UIApplication sharedApplication] cancelLocalNotification:notification];
+            [self.activeNotifications removeObject:notification];
+            [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:0] callbackId:command.callbackId];
+        }
+    }
+    [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:0] callbackId:command.callbackId];
+}
+
+- (void)clickNotification:(NSString*)tag {
+    NSString *jsCallBack;
+    
+    jsCallBack = [NSString stringWithFormat:@"window.Notification.callOnclickByTag('%@')", tag];
+    [((CDVViewController*)self.viewController).webView stringByEvaluatingJavaScriptFromString:jsCallBack];
+    
+    NSArray *scheduledNotifications = [[UIApplication sharedApplication] scheduledLocalNotifications];
+    NSMutableArray *toDiscard = [NSMutableArray array];
+    for (UILocalNotification *notification in self.activeNotifications) {
+        if (![scheduledNotifications containsObject:notification]) {
+            // This notification is active, but no longer scheduled, so it must be displayed
+            jsCallBack = [NSString stringWithFormat:@"window.Notification.callOncloseByTag('%@')", [notification.userInfo objectForKey:@"tag"]];
+            [((CDVViewController*)self.viewController).webView stringByEvaluatingJavaScriptFromString:jsCallBack];
+            [toDiscard addObject:notification];
+        }
+    }
+    [self.activeNotifications removeObjectsInArray:toDiscard];
+}
+
+/*
+- (void)cancelAllNotifications:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options {
+	[[UIApplication sharedApplication] cancelAllLocalNotifications];
+}
+*/
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/WebNotifications/www/webnotifications.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WebNotifications/www/webnotifications.js b/cordova-lib/spec-plugman/plugins/WebNotifications/www/webnotifications.js
new file mode 100644
index 0000000..6597337
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/WebNotifications/www/webnotifications.js
@@ -0,0 +1,123 @@
+/*
+ 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.
+ */
+
+/*
+ * The W3C window.Notification API: http://www.w3.org/TR/notifications/
+ */
+if (typeof window.Notification == 'undefined') {
+
+    /**
+     * Creates and shows a new notification.
+     * @param title
+     * @param options
+     */
+    window.Notification = function(title, options) {
+        options = options || {};
+
+        this.title = title || 'defaultTitle';
+
+        // w3c options:
+        this.body = options.body || '';
+        this.tag = options.tag || 'defaultTag';
+        this.iconUrl = options.iconUrl || '';
+        // titleDir, bodyDir are not supported
+
+        // cordova option extensions:
+        this.delay = options.delay || 0;
+        this.soundUrl = options.soundUrl || '';
+        this.badgeNumber = options.badgeNumber || 0;
+
+        // there must be one unique notification per tag, so close any existing outstanding notifications
+        if (window.Notification.active[this.tag])
+            window.Notification.active[this.tag].close();
+        window.Notification.active[this.tag] = this;
+
+        // Spec claims these must be defined
+        this.onclick = options.onclick;
+        this.onerror = options.onerror;
+        this.onclose = options.onclose;
+        this.onshow = options.onshow;
+        if (this.onshow) {
+            console.log("Warning, WebNotifications plugin will never call onshow"); // this may change on other platforms
+        }
+
+        var self = this;
+        cordova.exec(null, function(error) {
+            if (self.onerror) {
+                self.onerror(error);
+            }
+        }, 'WebNotifications', 'createNotification', [{
+            tag: this.tag,
+            title: this.title,
+            body: this.body,
+            delay: this.delay,
+        }]);
+    };
+
+    // TODO: change name to something internal looking?
+    window.Notification.permission = 'granted';
+
+    window.Notification.requestPermission = function(callback) {
+        setTimeout(function() {
+            callback(window.Notification.permission);
+        }, 0);
+    };
+
+    // Not part of the W3C API. Used by the native side to call onclick handlers.
+    // TODO: change name to something internal looking?
+    window.Notification.callOnclickByTag = function(tag) {
+        var notification = window.Notification.active[tag];
+        if (notification && notification.onclick && typeof notification.onclick == 'function') {
+            notification.onclick(tag);
+        }
+        delete window.Notification.active[tag];
+    };
+
+    window.Notification.callOncloseByTag = function(tag) {
+        var notification = window.Notification.active[tag];
+        if (notification && notification.onclose && typeof notification.onclose == 'function') {
+            notification.onclose(tag);
+        }
+        delete window.Notification.active[tag];
+    };
+
+    // A global map of notifications by tag, so their onclick callbacks can be called.
+    // TODO: change name to something internal looking?
+    window.Notification.active = {};
+
+    /**
+     * Dismiss a notification.
+     */
+    window.Notification.prototype.close = function() {
+        var self = this;
+        cordova.exec(function() {
+            if (self.onclose) {
+                self.onclose();
+            }
+            delete window.Notification[self.tag];
+        }, function(error) {
+            if (self.onerror) {
+                self.onerror(error);
+            }
+            delete window.Notification[self.tag];
+        }, 'WebNotifications', 'closeNotification', [{
+            tag: this.tag,
+        }]);
+    };
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/WeblessPlugin/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/plugin.xml b/cordova-lib/spec-plugman/plugins/WeblessPlugin/plugin.xml
new file mode 100644
index 0000000..5522d22
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/WeblessPlugin/plugin.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="com.phonegap.plugins.weblessplugin"
+    version="0.6.0">
+
+    <name>Webless Plugin</name>
+
+    <config-file target="config.xml" parent="/*">
+        <access origin="build.phonegap.com" />
+        <access origin="s3.amazonaws.com" />
+    </config-file>
+	
+    <!-- android -->
+    <platform name="android">
+        <config-file target="AndroidManifest.xml" parent="/manifest/application">
+            <activity android:name="com.phonegap.plugins.weblessplugin.WeblessPlugin"
+                      android:label="@string/app_name">
+                <intent-filter>
+                </intent-filter>
+            </activity>
+        </config-file>
+
+        <!-- CDV < 2.0 -->
+        <config-file target="res/xml/plugins.xml" parent="/plugins">
+            <plugin name="WeblessPlugin"
+                value="com.phonegap.plugins.weblessplugin.WeblessPlugin"/>
+        </config-file>
+
+        <!-- CDV 2.0+ (for now) -->
+        <config-file target="res/xml/config.xml" parent="/cordova/plugins">
+            <plugin name="WeblessPlugin"
+                value="com.phonegap.plugins.weblessplugin.WeblessPlugin"/>
+        </config-file>
+
+        <source-file src="src/android/WeblessPlugin.java"
+                target-dir="src/com/phonegap/plugins/weblessplugin" />
+    </platform>
+
+    <!-- ios -->
+    <platform name="ios">
+        <!-- CDV < 2.4 -->
+        <plugins-plist key="com.phonegap.plugins.weblessplugin"
+            string="WeblessPluginCommand" />
+        <!-- CDV 2.4 had a /cordova/plugins instead of /widget/plugins so ignored! -->
+        <!-- CDV 2.5+ -->
+        <config-file target="config.xml" parent="/widget/plugins">
+            <plugin name="WeblessPlugin"
+                value="WeblessPluginCommand"/>
+        </config-file>
+
+        <resource-file src="src/ios/WeblessPlugin.bundle" />
+        <resource-file src="src/ios/WeblessPluginViewController.xib" />
+
+        <header-file src="src/ios/WeblessPluginCommand.h" />
+        <header-file src="src/ios/WeblessPluginViewController.h" />
+
+        <source-file src="src/ios/WeblessPluginCommand.m" />
+        <source-file src="src/ios/WeblessPluginViewController.m" />
+
+        <!-- framework for testing (not actual dependency of WeblessPlugin -->
+        <framework src="libsqlite3.dylib" />
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/android/WeblessPlugin.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/android/WeblessPlugin.java b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/android/WeblessPlugin.java
new file mode 100644
index 0000000..5263b0c
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/android/WeblessPlugin.java
@@ -0,0 +1,19 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed 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.
+ *
+*/
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_left.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_left.png b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_left.png
new file mode 100644
index 0000000..530e12b
Binary files /dev/null and b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_left.png differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_left@2x.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_left@2x.png b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_left@2x.png
new file mode 100644
index 0000000..530e12b
Binary files /dev/null and b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_left@2x.png differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_right.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_right.png b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_right.png
new file mode 100644
index 0000000..8b3d855
Binary files /dev/null and b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_right.png differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_right@2x.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_right@2x.png b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_right@2x.png
new file mode 100644
index 0000000..8b3d855
Binary files /dev/null and b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/arrow_right@2x.png differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/but_refresh.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/but_refresh.png b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/but_refresh.png
new file mode 100644
index 0000000..309b6bd
Binary files /dev/null and b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/but_refresh.png differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/but_refresh@2x.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/but_refresh@2x.png b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/but_refresh@2x.png
new file mode 100644
index 0000000..309b6bd
Binary files /dev/null and b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/but_refresh@2x.png differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/compass.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/compass.png b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/compass.png
new file mode 100644
index 0000000..46a8901
Binary files /dev/null and b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/compass.png differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/compass@2x.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/compass@2x.png b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/compass@2x.png
new file mode 100644
index 0000000..46a8901
Binary files /dev/null and b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPlugin.bundle/compass@2x.png differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginCommand.h b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginCommand.h
new file mode 100644
index 0000000..6a23ab6
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginCommand.h
@@ -0,0 +1,49 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed 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.
+ *
+*/
+
+//
+//  PhoneGap ! ChildBrowserCommand
+//
+//
+//  Created by Jesse MacFadyen on 10-05-29.
+//  Copyright 2010 Nitobi. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#ifdef PHONEGAP_FRAMEWORK
+	#import <PhoneGap/PGPlugin.h>
+#else
+	#import "PGPlugin.h"
+#endif
+#import "ChildBrowserViewController.h"
+
+
+
+@interface ChildBrowserCommand : PGPlugin <ChildBrowserDelegate>  {
+
+	ChildBrowserViewController* childBrowser;
+}
+
+@property (nonatomic, retain) ChildBrowserViewController *childBrowser;
+
+
+- (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
+-(void) onChildLocationChange:(NSString*)newLoc;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginCommand.m b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginCommand.m
new file mode 100644
index 0000000..38aaf64
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginCommand.m
@@ -0,0 +1,86 @@
+//
+
+// 
+//
+//  Created by Jesse MacFadyen on 10-05-29.
+//  Copyright 2010 Nitobi. All rights reserved.
+//  Copyright (c) 2011, IBM Corporation
+//  Copyright 2011, Randy McMillan
+//
+
+#import "ChildBrowserCommand.h"
+
+#ifdef PHONEGAP_FRAMEWORK
+	#import <PhoneGap/PhoneGapViewController.h>
+#else
+	#import "PhoneGapViewController.h"
+#endif
+
+
+@implementation ChildBrowserCommand
+
+@synthesize childBrowser;
+
+- (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options // args: url
+{	
+	
+    if(childBrowser == NULL)
+	{
+		childBrowser = [[ ChildBrowserViewController alloc ] initWithScale:FALSE ];
+		childBrowser.delegate = self;
+	}
+	
+/* // TODO: Work in progress
+	NSString* strOrientations = [ options objectForKey:@"supportedOrientations"];
+	NSArray* supportedOrientations = [strOrientations componentsSeparatedByString:@","];
+*/
+    PhoneGapViewController* cont = (PhoneGapViewController*)[ super appViewController ];
+    childBrowser.supportedOrientations = cont.supportedOrientations;
+    
+    if ([cont respondsToSelector:@selector(presentViewController)]) {
+        //Reference UIViewController.h Line:179 for update to iOS 5 difference - @RandyMcMillan
+        [cont presentViewController:childBrowser animated:YES completion:nil];        
+    } else {
+        [ cont presentModalViewController:childBrowser animated:YES ];
+    }                 
+        
+    NSString *url = (NSString*) [arguments objectAtIndex:0];
+        
+    [childBrowser loadURL:url  ];
+        
+}
+
+-(void) close:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options // args: url
+{
+    [ childBrowser closeBrowser];
+	
+}
+
+-(void) onClose
+{
+	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onClose();",@""];
+	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
+}
+
+-(void) onOpenInSafari
+{
+	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onOpenExternal();",@""];
+	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
+}
+
+
+-(void) onChildLocationChange:(NSString*)newLoc
+{
+	
+	NSString* tempLoc = [NSString stringWithFormat:@"%@",newLoc];
+	NSString* encUrl = [tempLoc stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
+	 
+	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onLocationChange('%@');",encUrl];
+	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
+
+}
+
+
+
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.h b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.h
new file mode 100644
index 0000000..d6fc139
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.h
@@ -0,0 +1,73 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed 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.
+ *
+*/
+
+//
+//  ChildBrowserViewController.h
+//
+//  Created by Jesse MacFadyen on 21/07/09.
+//  Copyright 2009 Nitobi. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@protocol ChildBrowserDelegate<NSObject>
+
+
+
+/*
+ *  onChildLocationChanging:newLoc
+ *  
+ *  Discussion:
+ *    Invoked when a new page has loaded
+ */
+-(void) onChildLocationChange:(NSString*)newLoc;
+-(void) onOpenInSafari;
+-(void) onClose;
+@end
+
+
+@interface ChildBrowserViewController : UIViewController < UIWebViewDelegate > {
+	IBOutlet UIWebView* webView;
+	IBOutlet UIBarButtonItem* closeBtn;
+	IBOutlet UIBarButtonItem* refreshBtn;
+	IBOutlet UILabel* addressLabel;
+	IBOutlet UIBarButtonItem* backBtn;
+	IBOutlet UIBarButtonItem* fwdBtn;
+	IBOutlet UIBarButtonItem* safariBtn;
+	IBOutlet UIActivityIndicatorView* spinner;
+	BOOL scaleEnabled;
+	BOOL isImage;
+	NSString* imageURL;
+	NSArray* supportedOrientations;
+	id <ChildBrowserDelegate> delegate;
+}
+
+@property (nonatomic, retain)id <ChildBrowserDelegate> delegate;
+@property (nonatomic, retain) 	NSArray* supportedOrientations;
+@property(retain) NSString* imageURL;
+@property(assign) BOOL isImage;
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation; 
+- (ChildBrowserViewController*)initWithScale:(BOOL)enabled;
+- (IBAction)onDoneButtonPress:(id)sender;
+- (IBAction)onSafariButtonPress:(id)sender;
+- (void)loadURL:(NSString*)url;
+-(void)closeBrowser;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.m b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.m
new file mode 100644
index 0000000..167ef98
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.m
@@ -0,0 +1,239 @@
+//
+//  ChildBrowserViewController.m
+//
+//  Created by Jesse MacFadyen on 21/07/09.
+//  Copyright 2009 Nitobi. All rights reserved.
+//  Copyright (c) 2011, IBM Corporation
+//  Copyright 2011, Randy McMillan
+//
+
+#import "ChildBrowserViewController.h"
+
+
+@implementation ChildBrowserViewController
+
+@synthesize imageURL;
+@synthesize supportedOrientations;
+@synthesize isImage;
+@synthesize delegate;
+
+/*
+ // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
+- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
+    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
+        // Custom initialization
+    }
+    return self;
+}
+*/
+
++ (NSString*) resolveImageResource:(NSString*)resource
+{
+	NSString* systemVersion = [[UIDevice currentDevice] systemVersion];
+	BOOL isLessThaniOS4 = ([systemVersion compare:@"4.0" options:NSNumericSearch] == NSOrderedAscending);
+	
+	// the iPad image (nor retina) differentiation code was not in 3.x, and we have to explicitly set the path
+	if (isLessThaniOS4)
+	{
+        return [NSString stringWithFormat:@"%@.png", resource];
+	}
+	
+	return resource;
+}
+
+
+- (ChildBrowserViewController*)initWithScale:(BOOL)enabled
+{
+    self = [super init];
+	
+	
+	scaleEnabled = enabled;
+	
+	return self;	
+}
+
+// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    
+	refreshBtn.image = [UIImage imageNamed:[[self class] resolveImageResource:@"ChildBrowser.bundle/but_refresh"]];
+	backBtn.image = [UIImage imageNamed:[[self class] resolveImageResource:@"ChildBrowser.bundle/arrow_left"]];
+	fwdBtn.image = [UIImage imageNamed:[[self class] resolveImageResource:@"ChildBrowser.bundle/arrow_right"]];
+	safariBtn.image = [UIImage imageNamed:[[self class] resolveImageResource:@"ChildBrowser.bundle/compass"]];
+
+	webView.delegate = self;
+	webView.scalesPageToFit = TRUE;
+	webView.backgroundColor = [UIColor whiteColor];
+	NSLog(@"View did load");
+}
+
+
+
+
+
+- (void)didReceiveMemoryWarning {
+	// Releases the view if it doesn't have a superview.
+    [super didReceiveMemoryWarning];
+	
+	// Release any cached data, images, etc that aren't in use.
+}
+
+- (void)viewDidUnload {
+	// Release any retained subviews of the main view.
+	// e.g. self.myOutlet = nil;
+	NSLog(@"View did UN-load");
+}
+
+
+- (void)dealloc {
+
+	webView.delegate = nil;
+	
+	[webView release];
+	[closeBtn release];
+	[refreshBtn release];
+	[addressLabel release];
+	[backBtn release];
+	[fwdBtn release];
+	[safariBtn release];
+	[spinner release];
+	[ supportedOrientations release];
+	[super dealloc];
+}
+
+-(void)closeBrowser
+{
+	
+	if(delegate != NULL)
+	{
+		[delegate onClose];		
+	}
+    if ([self respondsToSelector:@selector(presentingViewController)]) { 
+        //Reference UIViewController.h Line:179 for update to iOS 5 difference - @RandyMcMillan
+        [[self presentingViewController] dismissViewControllerAnimated:YES completion:nil];
+    } else {
+        [[self parentViewController] dismissModalViewControllerAnimated:YES];
+    }
+}
+
+-(IBAction) onDoneButtonPress:(id)sender
+{
+	[ self closeBrowser];
+
+    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]];
+    [webView loadRequest:request];
+}
+
+
+-(IBAction) onSafariButtonPress:(id)sender
+{
+	
+	if(delegate != NULL)
+	{
+		[delegate onOpenInSafari];		
+	}
+	
+	if(isImage)
+	{
+		NSURL* pURL = [[ [NSURL alloc] initWithString:imageURL ] autorelease];
+		[ [ UIApplication sharedApplication ] openURL:pURL  ];
+	}
+	else
+	{
+		NSURLRequest *request = webView.request;
+		[[UIApplication sharedApplication] openURL:request.URL];
+	}
+
+	 
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation 
+{
+	BOOL autoRotate = [self.supportedOrientations count] > 1; // autorotate if only more than 1 orientation supported
+	if (autoRotate)
+	{
+		if ([self.supportedOrientations containsObject:
+			 [NSNumber numberWithInt:interfaceOrientation]]) {
+			return YES;
+		}
+    }
+	
+	return NO;
+}
+
+
+
+
+- (void)loadURL:(NSString*)url
+{
+	NSLog(@"Opening Url : %@",url);
+	 
+	if( [url hasSuffix:@".png" ]  || 
+	    [url hasSuffix:@".jpg" ]  || 
+		[url hasSuffix:@".jpeg" ] || 
+		[url hasSuffix:@".bmp" ]  || 
+		[url hasSuffix:@".gif" ]  )
+	{
+		[ imageURL release ];
+		imageURL = [url copy];
+		isImage = YES;
+		NSString* htmlText = @"<html><body style='background-color:#333;margin:0px;padding:0px;'><img style='min-height:200px;margin:0px;padding:0px;width:100%;height:auto;' alt='' src='IMGSRC'/></body></html>";
+		htmlText = [ htmlText stringByReplacingOccurrencesOfString:@"IMGSRC" withString:url ];
+
+		[webView loadHTMLString:htmlText baseURL:[NSURL URLWithString:@""]];
+		
+	}
+	else
+	{
+		imageURL = @"";
+		isImage = NO;
+		NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:url]];
+		[webView loadRequest:request];
+	}
+	webView.hidden = NO;
+}
+
+
+- (void)webViewDidStartLoad:(UIWebView *)sender {
+	addressLabel.text = @"Loading...";
+	backBtn.enabled = webView.canGoBack;
+	fwdBtn.enabled = webView.canGoForward;
+	
+	[ spinner startAnimating ];
+	
+}
+
+- (void)webViewDidFinishLoad:(UIWebView *)sender 
+{
+	NSURLRequest *request = webView.request;
+	NSLog(@"New Address is : %@",request.URL.absoluteString);
+	addressLabel.text = request.URL.absoluteString;
+	backBtn.enabled = webView.canGoBack;
+	fwdBtn.enabled = webView.canGoForward;
+	[ spinner stopAnimating ];
+	
+	if(delegate != NULL)
+	{
+		[delegate onChildLocationChange:request.URL.absoluteString];		
+	}
+
+}
+
+- (void)webView:(UIWebView *)wv didFailLoadWithError:(NSError *)error {
+    NSLog (@"webView:didFailLoadWithError");
+    [spinner stopAnimating];
+    addressLabel.text = @"Failed";
+    if (error != NULL) {
+        UIAlertView *errorAlert = [[UIAlertView alloc]
+                                   initWithTitle: [error localizedDescription]
+                                   message: [error localizedFailureReason]
+                                   delegate:nil
+                                   cancelButtonTitle:@"OK"
+                                   otherButtonTitles:nil];
+        [errorAlert show];
+        [errorAlert release];
+    }
+}
+
+
+@end


[34/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/src/ios/EPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/src/ios/EPluginCommand.h b/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/src/ios/EPluginCommand.h
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/src/ios/EPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/src/ios/EPluginCommand.m b/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/src/ios/EPluginCommand.m
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/www/plugin-e.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/www/plugin-e.js b/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/www/plugin-e.js
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/plugin.xml b/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/plugin.xml
new file mode 100644
index 0000000..57d96d9
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/plugin.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="E"
+    version="0.6.0">
+
+    <name>Plugin E</name>
+
+    <asset src="www/plugin-e.js" target="plugin-e.js" />
+
+    <config-file target="config.xml" parent="/*">
+        <access origin="build.phonegap.com" />
+    </config-file>
+
+    <!-- android -->
+    <platform name="android">
+        <config-file target="res/xml/config.xml" parent="plugins">
+            <plugin name="E"
+                value="com.phonegap.E.E"/>
+        </config-file>
+
+        <source-file src="src/android/E.java"
+                target-dir="src/com/phonegap/E" />
+    </platform>
+
+        
+    <!-- ios -->
+    <platform name="ios">
+        <!-- CDV 2.5+ -->
+        <config-file target="config.xml" parent="plugins">
+            <plugin name="E"
+                value="EPluginCommand"/>
+        </config-file>
+
+        <header-file src="src/ios/EPluginCommand.h" />
+        <source-file src="src/ios/EPluginCommand.m"/>
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/android/E.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/android/E.java b/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/android/E.java
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/ios/EPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/ios/EPluginCommand.h b/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/ios/EPluginCommand.h
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/ios/EPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/ios/EPluginCommand.m b/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/ios/EPluginCommand.m
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/www/plugin-e.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/www/plugin-e.js b/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/www/plugin-e.js
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/multiple-children/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/multiple-children/plugin.xml b/cordova-lib/spec-plugman/plugins/multiple-children/plugin.xml
new file mode 100644
index 0000000..fd10a04
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/multiple-children/plugin.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="com.pushwoosh.plugins.pushwoosh"
+    version="3.0.0">
+
+    <name>Pushwoosh</name>
+
+    <!-- android -->
+    <platform name="android">
+		<config-file target="AndroidManifest.xml" parent="/manifest">
+			<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
+			
+			<!--library-->
+			<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
+			
+			<!-- GCM connects to Google Services. -->
+			<uses-permission android:name="android.permission.INTERNET"/>
+			
+			<!-- GCM requires a Google account. -->
+			<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
+			
+			<!-- Keeps the processor from sleeping when a message is received. -->
+			<uses-permission android:name="android.permission.WAKE_LOCK"/>
+			
+			<!--
+			 Creates a custom permission so only this app can receive its messages.
+			 
+			 NOTE: the permission *must* be called PACKAGE.permission.C2D_MESSAGE,
+			 where PACKAGE is the application's package name.
+			 -->
+			<permission
+			android:name="$PACKAGE_NAME.permission.C2D_MESSAGE"
+			android:protectionLevel="signature"/>
+			<uses-permission
+			android:name="$PACKAGE_NAME.permission.C2D_MESSAGE"/>
+			
+			<!-- This app has permission to register and receive data message. -->
+			<uses-permission
+			android:name="com.google.android.c2dm.permission.RECEIVE"/>
+		</config-file>
+		
+		<config-file target="AndroidManifest.xml" parent="/manifest/application/activity">
+			<intent-filter>
+				<action android:name="$PACKAGE_NAME.MESSAGE"/>
+				<category android:name="android.intent.category.DEFAULT"/>
+			</intent-filter>
+		</config-file>
+
+		<config-file target="AndroidManifest.xml" parent="/manifest/application">
+			<activity android:name="com.arellomobile.android.push.PushWebview"/>
+			
+			<activity android:name="com.arellomobile.android.push.MessageActivity"/>
+			
+			<activity android:name="com.arellomobile.android.push.PushHandlerActivity"/>
+			
+			<!--
+			 BroadcastReceiver that will receive intents from GCM
+			 services and handle them to the custom IntentService.
+			 
+			 The com.google.android.c2dm.permission.SEND permission is necessary
+			 so only GCM services can send data messages for the app.
+			 -->
+			<receiver
+				android:name="com.google.android.gcm.GCMBroadcastReceiver"
+				android:permission="com.google.android.c2dm.permission.SEND">
+				<intent-filter>
+					<!-- Receives the actual messages. -->
+					<action android:name="com.google.android.c2dm.intent.RECEIVE"/>
+					<!-- Receives the registration id. -->
+					<action android:name="com.google.android.c2dm.intent.REGISTRATION"/>
+					<category android:name="$PACKAGE_NAME"/>
+				</intent-filter>
+			</receiver>
+			
+			<!--
+			 Application-specific subclass of PushGCMIntentService that will
+			 handle received messages.
+			 -->
+			<service android:name="com.arellomobile.android.push.PushGCMIntentService"/>        					
+			
+		</config-file>
+		
+		<config-file target="res/xml/plugins.xml" parent="/plugins">
+            <plugin name="PushNotification"
+			value="com.pushwoosh.test.plugin.pushnotifications.PushNotifications" onload="true"/>
+        </config-file>
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/shared-deps-multi-child/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/shared-deps-multi-child/plugin.xml b/cordova-lib/spec-plugman/plugins/shared-deps-multi-child/plugin.xml
new file mode 100644
index 0000000..6c17476
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/shared-deps-multi-child/plugin.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="ca.filmaj.shareddeps"
+    version="1.0.0">
+
+    <name>Sharing Dependencies with the Multi-Child Plugin, woo</name>
+
+    <!-- android -->
+    <platform name="android">
+		<config-file target="AndroidManifest.xml" parent="/manifest">
+			<uses-permission android:name="android.permission.INTERNET"/>
+		</config-file>
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/prepare.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/prepare.spec.js b/cordova-lib/spec-plugman/prepare.spec.js
new file mode 100644
index 0000000..6adaf9a
--- /dev/null
+++ b/cordova-lib/spec-plugman/prepare.spec.js
@@ -0,0 +1,59 @@
+var platforms = require('../src/platforms'),
+    prepare = require('../src/prepare'),
+    common  = require('../src/platforms/common');
+    fs      = require('fs'),
+    os      = require('osenv'),
+    path    = require('path'),
+    shell   = require('shelljs'),
+    config_changes = require('../src/util/config-changes'),
+    temp    = __dirname,
+    plugins_dir = path.join(temp, 'plugins');
+
+var json = path.join(temp, 'assets', 'www', 'cordova_plugins.json');
+var js = path.join(temp, 'assets', 'www', 'cordova_plugins.js');
+
+describe('prepare', function() {
+    var proc, platform_json, write, mkdir, rm;
+    beforeEach(function() {
+        rm = spyOn(shell, 'rm');
+        mkdir = spyOn(shell, 'mkdir');
+        proc = spyOn(config_changes, 'process');
+        platform_json = spyOn(config_changes, 'get_platform_json').andReturn({installed_plugins:{},dependent_plugins:{},prepare_queue:{uninstalled:[]}});
+        write = spyOn(fs, 'writeFileSync');
+    });
+    it('should create cordova_plugins.js file in a custom www directory', function() {
+        var custom_www = path.join(temp, 'assets', 'custom_www'),
+            js = path.join(temp, 'assets', 'custom_www', 'cordova_plugins.js');
+        prepare(temp, 'android', plugins_dir, custom_www);
+        expect(write).toHaveBeenCalledWith(js, jasmine.any(String), 'utf-8');
+    });
+    describe('handling of js-modules', function() {
+        var copySpy;
+        beforeEach(function() {
+            copySpy = spyOn(common, 'copyFile');
+            platform_json.andReturn({
+                installed_plugins: {plugin_one: '', plugin_two: ''},
+                dependent_plugins: {}, prepare_queue: {uninstalled:[]}
+            });
+        });
+        describe('uninstallation/removal', function() {
+            var existsSync;
+            beforeEach(function() {
+                existsSync = spyOn(fs, 'existsSync').andReturn(true);
+                platform_json.andReturn({installed_plugins:{},dependent_plugins:{},prepare_queue:{uninstalled:[{
+                    plugin:'nickelback',
+                    id:'nickelback',
+                    topLevel:true
+                }]}});
+            });
+            it('should remove any www/plugins directories related to plugins being queued for removal', function() {
+                prepare(temp, 'android', plugins_dir);
+                expect(rm).toHaveBeenCalledWith('-rf', path.join(temp, 'assets', 'www', 'plugins', 'nickelback'));
+            });
+        });
+    });
+    it('should call into config-changes\' process method to do config processing', function() {
+        prepare(temp, 'android', plugins_dir);
+        expect(proc).toHaveBeenCalledWith(plugins_dir, temp, 'android');
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/.gitkeep b/cordova-lib/spec-plugman/projects/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_install/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_install/AndroidManifest.xml b/cordova-lib/spec-plugman/projects/android_install/AndroidManifest.xml
new file mode 100644
index 0000000..b5fea9d
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_install/AndroidManifest.xml
@@ -0,0 +1,20 @@
+<?xml version='1.0' encoding='utf-8'?>
+<manifest android:versionCode="5" android:versionName="1.1" android:windowSoftInputMode="adjustPan" package="cordova.test.uninstall" xmlns:android="http://schemas.android.com/apk/res/android">
+    <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
+    <application android:debuggable="true" android:icon="@drawable/icon" android:label="@string/app_name">
+        <activity android:configChanges="orientation|keyboardHidden" android:label="@string/app_name" android:name="ChildApp">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:configChanges="orientation|keyboardHidden" android:label="@string/app_name" android:name="com.phonegap.DroidGap">
+            <intent-filter>
+            </intent-filter>
+        </activity>
+        <activity android:label="@string/app_name" android:name="com.phonegap.plugins.dummyplugin.DummyPlugin">
+            <intent-filter />
+        </activity>
+    </application>
+    <uses-sdk android:minSdkVersion="5" />
+</manifest>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_install/cordova/android_sdk_version
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_install/cordova/android_sdk_version b/cordova-lib/spec-plugman/projects/android_install/cordova/android_sdk_version
new file mode 100644
index 0000000..0ab155c
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_install/cordova/android_sdk_version
@@ -0,0 +1 @@
+echo 18.0.9
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_install/cordova/version
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_install/cordova/version b/cordova-lib/spec-plugman/projects/android_install/cordova/version
new file mode 100644
index 0000000..01f68fd
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_install/cordova/version
@@ -0,0 +1 @@
+echo 9.0.0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_install/cordova/version.bat
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_install/cordova/version.bat b/cordova-lib/spec-plugman/projects/android_install/cordova/version.bat
new file mode 100644
index 0000000..c637d7c
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_install/cordova/version.bat
@@ -0,0 +1,2 @@
+@ECHO OFF
+echo 9.0.0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_one/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/AndroidManifest.xml b/cordova-lib/spec-plugman/projects/android_one/AndroidManifest.xml
new file mode 100644
index 0000000..0979b02
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_one/AndroidManifest.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
+      package="com.alunny.childapp" android:versionName="1.1" android:versionCode="5">
+    <supports-screens
+    	android:largeScreens="true"
+    	android:normalScreens="true"
+    	android:smallScreens="true"
+    	android:xlargeScreens="true"
+    	android:resizeable="true"
+    	android:anyDensity="true"
+    	/>
+
+    <uses-permission android:name="android.permission.CAMERA" />
+    <uses-permission android:name="android.permission.VIBRATE" />
+    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
+    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
+    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.RECEIVE_SMS" />
+    <uses-permission android:name="android.permission.RECORD_AUDIO" />
+    <uses-permission android:name="android.permission.RECORD_VIDEO"/>
+    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
+    <uses-permission android:name="android.permission.READ_CONTACTS" />
+    <uses-permission android:name="android.permission.WRITE_CONTACTS" />   
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />   
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
+    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
+
+    <uses-feature android:name="android.hardware.camera" />
+    <uses-feature android:name="android.hardware.camera.autofocus" />
+    
+    <appid value="$APP_ID" />
+
+    <application android:icon="@drawable/icon" android:label="@string/app_name"
+    	android:debuggable="true">
+		<activity android:name="ChildApp" android:label="@string/app_name" 
+				  android:configChanges="orientation|keyboardHidden">
+			<intent-filter>
+				<action android:name="android.intent.action.MAIN" />
+				<category android:name="android.intent.category.LAUNCHER" />
+			</intent-filter>
+        </activity>
+        <activity android:name="com.phonegap.DroidGap" android:label="@string/app_name" 
+            	  android:configChanges="orientation|keyboardHidden">
+        	<intent-filter>
+        	</intent-filter>
+        </activity>
+    </application>
+
+	<uses-sdk android:minSdkVersion="5" />
+</manifest> 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_one/assets/www/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/assets/www/.gitkeep b/cordova-lib/spec-plugman/projects/android_one/assets/www/.gitkeep
new file mode 100644
index 0000000..e69de29


[17/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/src/ios/CDVContacts.m
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/src/ios/CDVContacts.m b/spec/plugins/Contacts/src/ios/CDVContacts.m
deleted file mode 100644
index 3ca3e81..0000000
--- a/spec/plugins/Contacts/src/ios/CDVContacts.m
+++ /dev/null
@@ -1,593 +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.
- */
-
-#import "CDVContacts.h"
-#import <UIKit/UIKit.h>
-#import <Cordova/NSArray+Comparisons.h>
-#import <Cordova/NSDictionary+Extensions.h>
-//#import "CDVNotification.h"
-
-@implementation CDVContactsPicker
-
-@synthesize allowsEditing;
-@synthesize callbackId;
-@synthesize options;
-@synthesize pickedContactDictionary;
-
-@end
-@implementation CDVNewContactsController
-
-@synthesize callbackId;
-
-@end
-
-@implementation CDVContacts
-
-// no longer used since code gets AddressBook for each operation.
-// If address book changes during save or remove operation, may get error but not much we can do about it
-// If address book changes during UI creation, display or edit, we don't control any saves so no need for callback
-
-/*void addressBookChanged(ABAddressBookRef addressBook, CFDictionaryRef info, void* context)
-{
-    // note that this function is only called when another AddressBook instance modifies
-    // the address book, not the current one. For example, through an OTA MobileMe sync
-    Contacts* contacts = (Contacts*)context;
-    [contacts addressBookDirty];
-    }*/
-
-- (CDVPlugin*)initWithWebView:(UIWebView*)theWebView
-{
-    self = (CDVContacts*)[super initWithWebView:(UIWebView*)theWebView];
-
-    /*if (self) {
-        addressBook = ABAddressBookCreate();
-        ABAddressBookRegisterExternalChangeCallback(addressBook, addressBookChanged, self);
-    }*/
-
-    return self;
-}
-
-// overridden to clean up Contact statics
-- (void)onAppTerminate
-{
-    // NSLog(@"Contacts::onAppTerminate");
-}
-
-// iPhone only method to create a new contact through the GUI
-- (void)newContact:(CDVInvokedUrlCommand*)command
-{
-    NSString* callbackId = command.callbackId;
-
-    CDVAddressBookHelper* abHelper = [[CDVAddressBookHelper alloc] init];
-    CDVContacts* __weak weakSelf = self;  // play it safe to avoid retain cycles
-
-    [abHelper createAddressBook: ^(ABAddressBookRef addrBook, CDVAddressBookAccessError* errCode) {
-        if (addrBook == NULL) {
-            // permission was denied or other error just return (no error callback)
-            return;
-        }
-        CDVNewContactsController* npController = [[CDVNewContactsController alloc] init];
-        npController.addressBook = addrBook;     // a CF retaining assign
-        CFRelease(addrBook);
-
-        npController.newPersonViewDelegate = self;
-        npController.callbackId = callbackId;
-
-        UINavigationController* navController = [[UINavigationController alloc] initWithRootViewController:npController];
-
-        if ([weakSelf.viewController respondsToSelector:@selector(presentViewController:::)]) {
-            [weakSelf.viewController presentViewController:navController animated:YES completion:nil];
-        } else {
-            [weakSelf.viewController presentModalViewController:navController animated:YES];
-        }
-    }];
-}
-
-- (void)newPersonViewController:(ABNewPersonViewController*)newPersonViewController didCompleteWithNewPerson:(ABRecordRef)person
-{
-    ABRecordID recordId = kABRecordInvalidID;
-    CDVNewContactsController* newCP = (CDVNewContactsController*)newPersonViewController;
-    NSString* callbackId = newCP.callbackId;
-
-    if (person != NULL) {
-        // return the contact id
-        recordId = ABRecordGetRecordID(person);
-    }
-
-    if ([newPersonViewController respondsToSelector:@selector(presentingViewController)]) {
-        [[newPersonViewController presentingViewController] dismissViewControllerAnimated:YES completion:nil];
-    } else {
-        [[newPersonViewController parentViewController] dismissModalViewControllerAnimated:YES];
-    }
-
-    CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:recordId];
-    [self.commandDelegate sendPluginResult:result callbackId:callbackId];
-}
-
-- (void)displayContact:(CDVInvokedUrlCommand*)command
-{
-    NSString* callbackId = command.callbackId;
-    ABRecordID recordID = [[command.arguments objectAtIndex:0] intValue];
-    NSDictionary* options = [command.arguments objectAtIndex:1 withDefault:[NSNull null]];
-    bool bEdit = [options isKindOfClass:[NSNull class]] ? false : [options existsValue:@"true" forKey:@"allowsEditing"];
-
-    CDVAddressBookHelper* abHelper = [[CDVAddressBookHelper alloc] init];
-    CDVContacts* __weak weakSelf = self;  // play it safe to avoid retain cycles
-
-    [abHelper createAddressBook: ^(ABAddressBookRef addrBook, CDVAddressBookAccessError* errCode) {
-        if (addrBook == NULL) {
-            // permission was denied or other error - return error
-            CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageToErrorObject:errCode ? errCode.errorCode:UNKNOWN_ERROR];
-            [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId];
-            return;
-        }
-        ABRecordRef rec = ABAddressBookGetPersonWithRecordID(addrBook, recordID);
-
-        if (rec) {
-            CDVDisplayContactViewController* personController = [[CDVDisplayContactViewController alloc] init];
-            personController.displayedPerson = rec;
-            personController.personViewDelegate = self;
-            personController.allowsEditing = NO;
-
-            // create this so DisplayContactViewController will have a "back" button.
-            UIViewController* parentController = [[UIViewController alloc] init];
-            UINavigationController* navController = [[UINavigationController alloc] initWithRootViewController:parentController];
-
-            [navController pushViewController:personController animated:YES];
-
-            if ([self.viewController respondsToSelector:@selector(presentViewController:::)]) {
-                [self.viewController presentViewController:navController animated:YES completion:nil];
-            } else {
-                [self.viewController presentModalViewController:navController animated:YES];
-            }
-
-            if (bEdit) {
-                // create the editing controller and push it onto the stack
-                ABPersonViewController* editPersonController = [[ABPersonViewController alloc] init];
-                editPersonController.displayedPerson = rec;
-                editPersonController.personViewDelegate = self;
-                editPersonController.allowsEditing = YES;
-                [navController pushViewController:editPersonController animated:YES];
-            }
-        } else {
-            // no record, return error
-            CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:UNKNOWN_ERROR];
-            [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId];
-        }
-        CFRelease(addrBook);
-    }];
-}
-
-- (BOOL)personViewController:(ABPersonViewController*)personViewController shouldPerformDefaultActionForPerson:(ABRecordRef)person
-                    property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifierForValue
-{
-    return YES;
-}
-
-- (void)chooseContact:(CDVInvokedUrlCommand*)command
-{
-    NSString* callbackId = command.callbackId;
-    NSDictionary* options = [command.arguments objectAtIndex:0 withDefault:[NSNull null]];
-
-    CDVContactsPicker* pickerController = [[CDVContactsPicker alloc] init];
-
-    pickerController.peoplePickerDelegate = self;
-    pickerController.callbackId = callbackId;
-    pickerController.options = options;
-    pickerController.pickedContactDictionary = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:kABRecordInvalidID], kW3ContactId, nil];
-    pickerController.allowsEditing = (BOOL)[options existsValue : @"true" forKey : @"allowsEditing"];
-
-    if ([self.viewController respondsToSelector:@selector(presentViewController:::)]) {
-        [self.viewController presentViewController:pickerController animated:YES completion:nil];
-    } else {
-        [self.viewController presentModalViewController:pickerController animated:YES];
-    }
-}
-
-- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController*)peoplePicker
-      shouldContinueAfterSelectingPerson:(ABRecordRef)person
-{
-    CDVContactsPicker* picker = (CDVContactsPicker*)peoplePicker;
-    NSNumber* pickedId = [NSNumber numberWithInt:ABRecordGetRecordID(person)];
-
-    if (picker.allowsEditing) {
-        ABPersonViewController* personController = [[ABPersonViewController alloc] init];
-        personController.displayedPerson = person;
-        personController.personViewDelegate = self;
-        personController.allowsEditing = picker.allowsEditing;
-        // store id so can get info in peoplePickerNavigationControllerDidCancel
-        picker.pickedContactDictionary = [NSDictionary dictionaryWithObjectsAndKeys:pickedId, kW3ContactId, nil];
-
-        [peoplePicker pushViewController:personController animated:YES];
-    } else {
-        // Retrieve and return pickedContact information
-        CDVContact* pickedContact = [[CDVContact alloc] initFromABRecord:(ABRecordRef)person];
-        NSArray* fields = [picker.options objectForKey:@"fields"];
-        NSDictionary* returnFields = [[CDVContact class] calcReturnFields:fields];
-        picker.pickedContactDictionary = [pickedContact toDictionary:returnFields];
-
-        CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:picker.pickedContactDictionary];
-        [self.commandDelegate sendPluginResult:result callbackId:picker.callbackId];
-
-        if ([picker respondsToSelector:@selector(presentingViewController)]) {
-            [[picker presentingViewController] dismissViewControllerAnimated:YES completion:nil];
-        } else {
-            [[picker parentViewController] dismissModalViewControllerAnimated:YES];
-        }
-    }
-    return NO;
-}
-
-- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController*)peoplePicker
-      shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier
-{
-    return YES;
-}
-
-- (void)peoplePickerNavigationControllerDidCancel:(ABPeoplePickerNavigationController*)peoplePicker
-{
-    // return contactId or invalid if none picked
-    CDVContactsPicker* picker = (CDVContactsPicker*)peoplePicker;
-
-    if (picker.allowsEditing) {
-        // get the info after possible edit
-        // if we got this far, user has already approved/ disapproved addressBook access
-        ABAddressBookRef addrBook = nil;
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000
-            if (&ABAddressBookCreateWithOptions != NULL) {
-                addrBook = ABAddressBookCreateWithOptions(NULL, NULL);
-            } else
-#endif
-        {
-            // iOS 4 & 5
-            addrBook = ABAddressBookCreate();
-        }
-        ABRecordRef person = ABAddressBookGetPersonWithRecordID(addrBook, [[picker.pickedContactDictionary objectForKey:kW3ContactId] integerValue]);
-        if (person) {
-            CDVContact* pickedContact = [[CDVContact alloc] initFromABRecord:(ABRecordRef)person];
-            NSArray* fields = [picker.options objectForKey:@"fields"];
-            NSDictionary* returnFields = [[CDVContact class] calcReturnFields:fields];
-            picker.pickedContactDictionary = [pickedContact toDictionary:returnFields];
-        }
-        CFRelease(addrBook);
-    }
-    CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:picker.pickedContactDictionary];
-    [self.commandDelegate sendPluginResult:result callbackId:picker.callbackId];
-
-    if ([peoplePicker respondsToSelector:@selector(presentingViewController)]) {
-        [[peoplePicker presentingViewController] dismissViewControllerAnimated:YES completion:nil];
-    } else {
-        [[peoplePicker parentViewController] dismissModalViewControllerAnimated:YES];
-    }
-}
-
-- (void)search:(CDVInvokedUrlCommand*)command
-{
-    NSString* callbackId = command.callbackId;
-    NSArray* fields = [command.arguments objectAtIndex:0];
-    NSDictionary* findOptions = [command.arguments objectAtIndex:1 withDefault:[NSNull null]];
-
-    [self.commandDelegate runInBackground:^{
-        // from Apple:  Important You must ensure that an instance of ABAddressBookRef is used by only one thread.
-        // which is why address book is created within the dispatch queue.
-        // more details here: http: //blog.byadrian.net/2012/05/05/ios-addressbook-framework-and-gcd/
-        CDVAddressBookHelper* abHelper = [[CDVAddressBookHelper alloc] init];
-        CDVContacts* __weak weakSelf = self;     // play it safe to avoid retain cycles
-        // it gets uglier, block within block.....
-        [abHelper createAddressBook: ^(ABAddressBookRef addrBook, CDVAddressBookAccessError* errCode) {
-            if (addrBook == NULL) {
-                // permission was denied or other error - return error
-                CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageToErrorObject:errCode ? errCode.errorCode:UNKNOWN_ERROR];
-                [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId];
-                return;
-            }
-
-            NSArray* foundRecords = nil;
-            // get the findOptions values
-            BOOL multiple = NO;         // default is false
-            NSString* filter = nil;
-            if (![findOptions isKindOfClass:[NSNull class]]) {
-                id value = nil;
-                filter = (NSString*)[findOptions objectForKey:@"filter"];
-                value = [findOptions objectForKey:@"multiple"];
-                if ([value isKindOfClass:[NSNumber class]]) {
-                    // multiple is a boolean that will come through as an NSNumber
-                    multiple = [(NSNumber*)value boolValue];
-                    // NSLog(@"multiple is: %d", multiple);
-                }
-            }
-
-            NSDictionary* returnFields = [[CDVContact class] calcReturnFields:fields];
-
-            NSMutableArray* matches = nil;
-            if (!filter || [filter isEqualToString:@""]) {
-                // get all records
-                foundRecords = (__bridge_transfer NSArray*)ABAddressBookCopyArrayOfAllPeople(addrBook);
-                if (foundRecords && ([foundRecords count] > 0)) {
-                    // create Contacts and put into matches array
-                    // doesn't make sense to ask for all records when multiple == NO but better check
-                    int xferCount = multiple == YES ? [foundRecords count] : 1;
-                    matches = [NSMutableArray arrayWithCapacity:xferCount];
-
-                    for (int k = 0; k < xferCount; k++) {
-                        CDVContact* xferContact = [[CDVContact alloc] initFromABRecord:(__bridge ABRecordRef)[foundRecords objectAtIndex:k]];
-                        [matches addObject:xferContact];
-                        xferContact = nil;
-                    }
-                }
-            } else {
-                foundRecords = (__bridge_transfer NSArray*)ABAddressBookCopyArrayOfAllPeople(addrBook);
-                matches = [NSMutableArray arrayWithCapacity:1];
-                BOOL bFound = NO;
-                int testCount = [foundRecords count];
-
-                for (int j = 0; j < testCount; j++) {
-                    CDVContact* testContact = [[CDVContact alloc] initFromABRecord:(__bridge ABRecordRef)[foundRecords objectAtIndex:j]];
-                    if (testContact) {
-                        bFound = [testContact foundValue:filter inFields:returnFields];
-                        if (bFound) {
-                            [matches addObject:testContact];
-                        }
-                        testContact = nil;
-                    }
-                }
-            }
-            NSMutableArray* returnContacts = [NSMutableArray arrayWithCapacity:1];
-
-            if ((matches != nil) && ([matches count] > 0)) {
-                // convert to JS Contacts format and return in callback
-                // - returnFields  determines what properties to return
-                @autoreleasepool {
-                    int count = multiple == YES ? [matches count] : 1;
-
-                    for (int i = 0; i < count; i++) {
-                        CDVContact* newContact = [matches objectAtIndex:i];
-                        NSDictionary* aContact = [newContact toDictionary:returnFields];
-                        [returnContacts addObject:aContact];
-                    }
-                }
-            }
-            // return found contacts (array is empty if no contacts found)
-            CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:returnContacts];
-            [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId];
-            // NSLog(@"findCallback string: %@", jsString);
-
-            if (addrBook) {
-                CFRelease(addrBook);
-            }
-        }];
-    }];     // end of workQueue block
-
-    return;
-}
-
-- (void)save:(CDVInvokedUrlCommand*)command
-{
-    NSString* callbackId = command.callbackId;
-    NSDictionary* contactDict = [command.arguments objectAtIndex:0];
-
-    [self.commandDelegate runInBackground:^{
-        CDVAddressBookHelper* abHelper = [[CDVAddressBookHelper alloc] init];
-        CDVContacts* __weak weakSelf = self;     // play it safe to avoid retain cycles
-
-        [abHelper createAddressBook: ^(ABAddressBookRef addrBook, CDVAddressBookAccessError* errorCode) {
-            CDVPluginResult* result = nil;
-            if (addrBook == NULL) {
-                // permission was denied or other error - return error
-                result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:errorCode ? errorCode.errorCode:UNKNOWN_ERROR];
-                [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId];
-                return;
-            }
-
-            bool bIsError = FALSE, bSuccess = FALSE;
-            BOOL bUpdate = NO;
-            CDVContactError errCode = UNKNOWN_ERROR;
-            CFErrorRef error;
-            NSNumber* cId = [contactDict valueForKey:kW3ContactId];
-            CDVContact* aContact = nil;
-            ABRecordRef rec = nil;
-            if (cId && ![cId isKindOfClass:[NSNull class]]) {
-                rec = ABAddressBookGetPersonWithRecordID(addrBook, [cId intValue]);
-                if (rec) {
-                    aContact = [[CDVContact alloc] initFromABRecord:rec];
-                    bUpdate = YES;
-                }
-            }
-            if (!aContact) {
-                aContact = [[CDVContact alloc] init];
-            }
-
-            bSuccess = [aContact setFromContactDict:contactDict asUpdate:bUpdate];
-            if (bSuccess) {
-                if (!bUpdate) {
-                    bSuccess = ABAddressBookAddRecord(addrBook, [aContact record], &error);
-                }
-                if (bSuccess) {
-                    bSuccess = ABAddressBookSave(addrBook, &error);
-                }
-                if (!bSuccess) {         // need to provide error codes
-                    bIsError = TRUE;
-                    errCode = IO_ERROR;
-                } else {
-                    // give original dictionary back?  If generate dictionary from saved contact, have no returnFields specified
-                    // so would give back all fields (which W3C spec. indicates is not desired)
-                    // for now (while testing) give back saved, full contact
-                    NSDictionary* newContact = [aContact toDictionary:[CDVContact defaultFields]];
-                    // NSString* contactStr = [newContact JSONRepresentation];
-                    result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:newContact];
-                }
-            } else {
-                bIsError = TRUE;
-                errCode = IO_ERROR;
-            }
-            CFRelease(addrBook);
-
-            if (bIsError) {
-                result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:errCode];
-            }
-
-            if (result) {
-                [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId];
-            }
-        }];
-    }];     // end of  queue
-}
-
-- (void)remove:(CDVInvokedUrlCommand*)command
-{
-    NSString* callbackId = command.callbackId;
-    NSNumber* cId = [command.arguments objectAtIndex:0];
-
-    CDVAddressBookHelper* abHelper = [[CDVAddressBookHelper alloc] init];
-    CDVContacts* __weak weakSelf = self;  // play it safe to avoid retain cycles
-
-    [abHelper createAddressBook: ^(ABAddressBookRef addrBook, CDVAddressBookAccessError* errorCode) {
-        CDVPluginResult* result = nil;
-        if (addrBook == NULL) {
-            // permission was denied or other error - return error
-            result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:errorCode ? errorCode.errorCode:UNKNOWN_ERROR];
-            [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId];
-            return;
-        }
-
-        bool bIsError = FALSE, bSuccess = FALSE;
-        CDVContactError errCode = UNKNOWN_ERROR;
-        CFErrorRef error;
-        ABRecordRef rec = nil;
-        if (cId && ![cId isKindOfClass:[NSNull class]] && ([cId intValue] != kABRecordInvalidID)) {
-            rec = ABAddressBookGetPersonWithRecordID(addrBook, [cId intValue]);
-            if (rec) {
-                bSuccess = ABAddressBookRemoveRecord(addrBook, rec, &error);
-                if (!bSuccess) {
-                    bIsError = TRUE;
-                    errCode = IO_ERROR;
-                } else {
-                    bSuccess = ABAddressBookSave(addrBook, &error);
-                    if (!bSuccess) {
-                        bIsError = TRUE;
-                        errCode = IO_ERROR;
-                    } else {
-                        // set id to null
-                        // [contactDict setObject:[NSNull null] forKey:kW3ContactId];
-                        // result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary: contactDict];
-                        result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
-                        // NSString* contactStr = [contactDict JSONRepresentation];
-                    }
-                }
-            } else {
-                // no record found return error
-                bIsError = TRUE;
-                errCode = UNKNOWN_ERROR;
-            }
-        } else {
-            // invalid contact id provided
-            bIsError = TRUE;
-            errCode = INVALID_ARGUMENT_ERROR;
-        }
-
-        if (addrBook) {
-            CFRelease(addrBook);
-        }
-        if (bIsError) {
-            result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:errCode];
-        }
-        if (result) {
-            [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId];
-        }
-    }];
-    return;
-}
-
-@end
-
-/* ABPersonViewController does not have any UI to dismiss.  Adding navigationItems to it does not work properly
- * The navigationItems are lost when the app goes into the background.  The solution was to create an empty
- * NavController in front of the ABPersonViewController. This will cause the ABPersonViewController to have a back button. By subclassing the ABPersonViewController, we can override viewDidDisappear and take down the entire NavigationController.
- */
-@implementation CDVDisplayContactViewController
-@synthesize contactsPlugin;
-
-- (void)viewWillDisappear:(BOOL)animated
-{
-    [super viewWillDisappear:animated];
-
-    if ([self respondsToSelector:@selector(presentingViewController)]) {
-        [[self presentingViewController] dismissViewControllerAnimated:YES completion:nil];
-    } else {
-        [[self parentViewController] dismissModalViewControllerAnimated:YES];
-    }
-}
-
-@end
-@implementation CDVAddressBookAccessError
-
-@synthesize errorCode;
-
-- (CDVAddressBookAccessError*)initWithCode:(CDVContactError)code
-{
-    self = [super init];
-    if (self) {
-        self.errorCode = code;
-    }
-    return self;
-}
-
-@end
-
-@implementation CDVAddressBookHelper
-
-/**
- * NOTE: workerBlock is responsible for releasing the addressBook that is passed to it
- */
-- (void)createAddressBook:(CDVAddressBookWorkerBlock)workerBlock
-{
-    // TODO: this probably should be reworked - seems like the workerBlock can just create and release its own AddressBook,
-    // and also this important warning from (http://developer.apple.com/library/ios/#documentation/ContactData/Conceptual/AddressBookProgrammingGuideforiPhone/Chapters/BasicObjects.html):
-    // "Important: Instances of ABAddressBookRef cannot be used by multiple threads. Each thread must make its own instance."
-    ABAddressBookRef addressBook;
-
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000
-        if (&ABAddressBookCreateWithOptions != NULL) {
-            CFErrorRef error = nil;
-            // CFIndex status = ABAddressBookGetAuthorizationStatus();
-            addressBook = ABAddressBookCreateWithOptions(NULL, &error);
-            // NSLog(@"addressBook access: %lu", status);
-            ABAddressBookRequestAccessWithCompletion(addressBook, ^(bool granted, CFErrorRef error) {
-                    // callback can occur in background, address book must be accessed on thread it was created on
-                    dispatch_sync(dispatch_get_main_queue(), ^{
-                        if (error) {
-                            workerBlock(NULL, [[CDVAddressBookAccessError alloc] initWithCode:UNKNOWN_ERROR]);
-                        } else if (!granted) {
-                            workerBlock(NULL, [[CDVAddressBookAccessError alloc] initWithCode:PERMISSION_DENIED_ERROR]);
-                        } else {
-                            // access granted
-                            workerBlock(addressBook, [[CDVAddressBookAccessError alloc] initWithCode:UNKNOWN_ERROR]);
-                        }
-                    });
-                });
-        } else
-#endif
-    {
-        // iOS 4 or 5 no checks needed
-        addressBook = ABAddressBookCreate();
-        workerBlock(addressBook, NULL);
-    }
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/src/wp/Contacts.cs
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/src/wp/Contacts.cs b/spec/plugins/Contacts/src/wp/Contacts.cs
deleted file mode 100644
index 6789bb8..0000000
--- a/spec/plugins/Contacts/src/wp/Contacts.cs
+++ /dev/null
@@ -1,664 +0,0 @@
-/*  
-	Licensed 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.
-*/
-
-using Microsoft.Phone.Tasks;
-using Microsoft.Phone.UserData;
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Runtime.Serialization;
-using System.Windows;
-using DeviceContacts = Microsoft.Phone.UserData.Contacts;
-
-
-namespace WPCordovaClassLib.Cordova.Commands
-{
-    [DataContract]
-    public class SearchOptions
-    {
-        [DataMember]
-        public string filter { get; set; }
-        [DataMember]
-        public bool multiple { get; set; }
-    }
-
-    [DataContract]
-    public class ContactSearchParams
-    {
-        [DataMember]
-        public string[] fields { get; set; }
-        [DataMember]
-        public SearchOptions options { get; set; }
-    }
-
-    [DataContract]
-    public class JSONContactAddress
-    {
-        [DataMember]
-        public string formatted { get; set; }
-        [DataMember]
-        public string type { get; set; }
-        [DataMember]
-        public string streetAddress { get; set; }
-        [DataMember]
-        public string locality { get; set; }
-        [DataMember]
-        public string region { get; set; }
-        [DataMember]
-        public string postalCode { get; set; }
-        [DataMember]
-        public string country { get; set; }
-        [DataMember]
-        public bool pref { get; set; }
-    }
-
-    [DataContract]
-    public class JSONContactName
-    {
-        [DataMember]
-        public string formatted { get; set; }
-        [DataMember]
-        public string familyName { get; set; }
-        [DataMember]
-        public string givenName { get; set; }
-        [DataMember]
-        public string middleName { get; set; }
-        [DataMember]
-        public string honorificPrefix { get; set; }
-        [DataMember]
-        public string honorificSuffix { get; set; }
-    }
-
-    [DataContract]
-    public class JSONContactField
-    {
-        [DataMember]
-        public string type { get; set; }
-        [DataMember]
-        public string value { get; set; }
-        [DataMember]
-        public bool pref { get; set; }
-    }
-
-    [DataContract]
-    public class JSONContactOrganization
-    {
-        [DataMember]
-        public string type { get; set; }
-        [DataMember]
-        public string name { get; set; }
-        [DataMember]
-        public bool pref { get; set; }
-        [DataMember]
-        public string department { get; set; }
-        [DataMember]
-        public string title { get; set; }
-    }
-
-    [DataContract]
-    public class JSONContact
-    {
-        [DataMember]
-        public string id { get; set; }
-        [DataMember]
-        public string rawId { get; set; }
-        [DataMember]
-        public string displayName { get; set; }
-        [DataMember]
-        public string nickname { get; set; }
-        [DataMember]
-        public string note { get; set; }
-
-        [DataMember]
-        public JSONContactName name { get; set; }
-
-        [DataMember]
-        public JSONContactField[] emails { get; set; }
-
-        [DataMember]
-        public JSONContactField[] phoneNumbers { get; set; }
-
-        [DataMember]
-        public JSONContactField[] ims { get; set; }
-
-        [DataMember]
-        public JSONContactField[] photos { get; set; }
-
-        [DataMember]
-        public JSONContactField[] categories { get; set; }
-
-        [DataMember]
-        public JSONContactField[] urls { get; set; }
-
-        [DataMember]
-        public JSONContactOrganization[] organizations { get; set; }
-
-        [DataMember]
-        public JSONContactAddress[] addresses { get; set; }
-    }
-
-
-    public class Contacts : BaseCommand
-    {
-
-        public const int UNKNOWN_ERROR = 0;
-        public const int INVALID_ARGUMENT_ERROR = 1;
-        public const int TIMEOUT_ERROR = 2;
-        public const int PENDING_OPERATION_ERROR = 3;
-        public const int IO_ERROR = 4;
-        public const int NOT_SUPPORTED_ERROR = 5;
-        public const int PERMISSION_DENIED_ERROR = 20;
-        public const int SYNTAX_ERR = 8;
-
-        public Contacts()
-        {
-
-        }
-
-        // refer here for contact properties we can access: http://msdn.microsoft.com/en-us/library/microsoft.phone.tasks.savecontacttask_members%28v=VS.92%29.aspx
-        public void save(string jsonContact)
-        {
-
-            // jsonContact is actually an array of 1 {contact}
-            string[] args = JSON.JsonHelper.Deserialize<string[]>(jsonContact);
-
-
-            JSONContact contact = JSON.JsonHelper.Deserialize<JSONContact>(args[0]);
-
-            SaveContactTask contactTask = new SaveContactTask();
-
-            if (contact.nickname != null)
-            {
-                contactTask.Nickname = contact.nickname;
-            }
-            if (contact.urls != null && contact.urls.Length > 0)
-            {
-                contactTask.Website = contact.urls[0].value;
-            }
-            if (contact.note != null)
-            {
-                contactTask.Notes = contact.note;
-            }
-
-            #region contact.name
-            if (contact.name != null)
-            {
-                if (contact.name.givenName != null)
-                    contactTask.FirstName = contact.name.givenName;
-                if (contact.name.familyName != null)
-                    contactTask.LastName = contact.name.familyName;
-                if (contact.name.middleName != null)
-                    contactTask.MiddleName = contact.name.middleName;
-                if (contact.name.honorificSuffix != null)
-                    contactTask.Suffix = contact.name.honorificSuffix;
-                if (contact.name.honorificPrefix != null)
-                    contactTask.Title = contact.name.honorificPrefix;
-            }
-            #endregion
-
-            #region contact.org
-            if (contact.organizations != null && contact.organizations.Count() > 0)
-            {
-                contactTask.Company = contact.organizations[0].name;
-                contactTask.JobTitle = contact.organizations[0].title;
-            }
-            #endregion
-
-            #region contact.phoneNumbers
-            if (contact.phoneNumbers != null && contact.phoneNumbers.Length > 0)
-            {
-                foreach (JSONContactField field in contact.phoneNumbers)
-                {
-                    string fieldType = field.type.ToLower();
-                    if (fieldType == "work")
-                    {
-                        contactTask.WorkPhone = field.value;
-                    }
-                    else if (fieldType == "home")
-                    {
-                        contactTask.HomePhone = field.value;
-                    }
-                    else if (fieldType == "mobile")
-                    {
-                        contactTask.MobilePhone = field.value;
-                    }
-                }
-            }
-            #endregion
-
-            #region contact.emails
-
-            if (contact.emails != null && contact.emails.Length > 0)
-            {
-
-                // set up different email types if they are not explicitly defined
-                foreach (string type in new string[] { "personal", "work", "other" })
-                {
-                    foreach (JSONContactField field in contact.emails)
-                    {
-                        if (field != null && String.IsNullOrEmpty(field.type))
-                        {
-                            field.type = type;
-                            break;
-                        }
-                    }
-                }
-
-                foreach (JSONContactField field in contact.emails)
-                {
-                    if (field != null)
-                    {
-                        if (field.type != null && field.type != "other")
-                        {
-                            string fieldType = field.type.ToLower();
-                            if (fieldType == "work")
-                            {
-                                contactTask.WorkEmail = field.value;
-                            }
-                            else if (fieldType == "home" || fieldType == "personal")
-                            {
-                                contactTask.PersonalEmail = field.value;
-                            }
-                        }
-                        else
-                        {
-                            contactTask.OtherEmail = field.value;
-                        }
-                    }
-
-                }
-            }
-            #endregion
-
-            if (contact.note != null && contact.note.Length > 0)
-            {
-                contactTask.Notes = contact.note;
-            }
-
-            #region contact.addresses
-            if (contact.addresses != null && contact.addresses.Length > 0)
-            {
-                foreach (JSONContactAddress address in contact.addresses)
-                {
-                    if (address.type == null)
-                    {
-                        address.type = "home"; // set a default
-                    }
-                    string fieldType = address.type.ToLower();
-                    if (fieldType == "work")
-                    {
-                        contactTask.WorkAddressCity = address.locality;
-                        contactTask.WorkAddressCountry = address.country;
-                        contactTask.WorkAddressState = address.region;
-                        contactTask.WorkAddressStreet = address.streetAddress;
-                        contactTask.WorkAddressZipCode = address.postalCode;
-                    }
-                    else if (fieldType == "home" || fieldType == "personal")
-                    {
-                        contactTask.HomeAddressCity = address.locality;
-                        contactTask.HomeAddressCountry = address.country;
-                        contactTask.HomeAddressState = address.region;
-                        contactTask.HomeAddressStreet = address.streetAddress;
-                        contactTask.HomeAddressZipCode = address.postalCode;
-                    }
-                    else
-                    {
-                        // no other address fields available ...
-                        Debug.WriteLine("Creating contact with unsupported address type :: " + address.type);
-                    }
-                }
-            }
-            #endregion
-
-
-            contactTask.Completed += new EventHandler<SaveContactResult>(ContactSaveTaskCompleted);
-            contactTask.Show();
-        }
-
-        void ContactSaveTaskCompleted(object sender, SaveContactResult e)
-        {
-            SaveContactTask task = sender as SaveContactTask;
-
-            if (e.TaskResult == TaskResult.OK)
-            {
-
-                Deployment.Current.Dispatcher.BeginInvoke(() =>
-                {
-                    DeviceContacts deviceContacts = new DeviceContacts();
-                    deviceContacts.SearchCompleted += new EventHandler<ContactsSearchEventArgs>(postAdd_SearchCompleted);
-
-                    string displayName = String.Format("{0}{2}{1}", task.FirstName, task.LastName, String.IsNullOrEmpty(task.FirstName) ? "" : " ");
-
-                    deviceContacts.SearchAsync(displayName, FilterKind.DisplayName, task);
-                });
-
-
-            }
-            else if (e.TaskResult == TaskResult.Cancel)
-            {
-                DispatchCommandResult(new PluginResult(PluginResult.Status.ERROR, "Operation cancelled."));
-            }
-        }
-
-        void postAdd_SearchCompleted(object sender, ContactsSearchEventArgs e)
-        {
-            if (e.Results.Count() > 0)
-            {
-                List<Contact> foundContacts = new List<Contact>();
-
-                int n = (from Contact contact in e.Results select contact.GetHashCode()).Max();
-                Contact newContact = (from Contact contact in e.Results
-                                      where contact.GetHashCode() == n
-                                      select contact).First();
-
-                DispatchCommandResult(new PluginResult(PluginResult.Status.OK, FormatJSONContact(newContact, null)));
-            }
-            else
-            {
-                DispatchCommandResult(new PluginResult(PluginResult.Status.NO_RESULT));
-            }
-        }
-
-
-
-        public void remove(string id)
-        {
-            // note id is wrapped in [] and always has exactly one string ...
-            DispatchCommandResult(new PluginResult(PluginResult.Status.ERROR, "{\"code\":" + NOT_SUPPORTED_ERROR + "}"));
-        }
-
-        public void search(string searchCriteria)
-        {
-            string[] args = JSON.JsonHelper.Deserialize<string[]>(searchCriteria);
-
-            ContactSearchParams searchParams = new ContactSearchParams();
-            try
-            {
-                searchParams.fields = JSON.JsonHelper.Deserialize<string[]>(args[0]);
-                searchParams.options = JSON.JsonHelper.Deserialize<SearchOptions>(args[1]);
-            }
-            catch (Exception)
-            {
-                DispatchCommandResult(new PluginResult(PluginResult.Status.ERROR, INVALID_ARGUMENT_ERROR));
-                return;
-            }
-
-            if (searchParams.options == null)
-            {
-                searchParams.options = new SearchOptions();
-                searchParams.options.filter = "";
-                searchParams.options.multiple = true;
-            }
-
-            DeviceContacts deviceContacts = new DeviceContacts();
-            deviceContacts.SearchCompleted += new EventHandler<ContactsSearchEventArgs>(contacts_SearchCompleted);
-
-            // default is to search all fields
-            FilterKind filterKind = FilterKind.None;
-            // if only one field is specified, we will try the 3 available DeviceContact search filters
-            if (searchParams.fields.Count() == 1)
-            {
-                if (searchParams.fields.Contains("name"))
-                {
-                    filterKind = FilterKind.DisplayName;
-                }
-                else if (searchParams.fields.Contains("emails"))
-                {
-                    filterKind = FilterKind.EmailAddress;
-                }
-                else if (searchParams.fields.Contains("phoneNumbers"))
-                {
-                    filterKind = FilterKind.PhoneNumber;
-                }
-            }
-
-            try
-            {
-
-                deviceContacts.SearchAsync(searchParams.options.filter, filterKind, searchParams);
-            }
-            catch (Exception ex)
-            {
-                Debug.WriteLine("search contacts exception :: " + ex.Message);
-            }
-        }
-
-        private void contacts_SearchCompleted(object sender, ContactsSearchEventArgs e)
-        {
-            ContactSearchParams searchParams = (ContactSearchParams)e.State;
-
-            List<Contact> foundContacts = null;
-
-            // if we have multiple search fields
-            if (searchParams.options.filter.Length > 0 && searchParams.fields.Count() > 1)
-            {
-                foundContacts = new List<Contact>();
-                if (searchParams.fields.Contains("emails"))
-                {
-                    foundContacts.AddRange(from Contact con in e.Results
-                                           from ContactEmailAddress a in con.EmailAddresses
-                                           where a.EmailAddress.Contains(searchParams.options.filter)
-                                           select con);
-                }
-                if (searchParams.fields.Contains("displayName"))
-                {
-                    foundContacts.AddRange(from Contact con in e.Results
-                                           where con.DisplayName.Contains(searchParams.options.filter)
-                                           select con);
-                }
-                if (searchParams.fields.Contains("name"))
-                {
-                    foundContacts.AddRange(from Contact con in e.Results
-                                           where con.CompleteName != null && con.CompleteName.ToString().Contains(searchParams.options.filter)
-                                           select con);
-                }
-                if (searchParams.fields.Contains("phoneNumbers"))
-                {
-                    foundContacts.AddRange(from Contact con in e.Results
-                                           from ContactPhoneNumber a in con.PhoneNumbers
-                                           where a.PhoneNumber.Contains(searchParams.options.filter)
-                                           select con);
-                }
-                if (searchParams.fields.Contains("urls"))
-                {
-                    foundContacts.AddRange(from Contact con in e.Results
-                                           from string a in con.Websites
-                                           where a.Contains(searchParams.options.filter)
-                                           select con);
-                }
-            }
-            else
-            {
-                foundContacts = new List<Contact>(e.Results);
-            }
-
-            //List<string> contactList = new List<string>();
-
-            string strResult = "";
-
-            IEnumerable<Contact> distinctContacts = foundContacts.Distinct();
-
-            foreach (Contact contact in distinctContacts)
-            {
-                strResult += FormatJSONContact(contact, null) + ",";
-                //contactList.Add(FormatJSONContact(contact, null));
-                if (!searchParams.options.multiple)
-                {
-                    break; // just return the first item
-                }
-            }
-            PluginResult result = new PluginResult(PluginResult.Status.OK);
-            result.Message = "[" + strResult.TrimEnd(',') + "]";
-            DispatchCommandResult(result);
-
-        }
-
-        private string FormatJSONPhoneNumbers(Contact con)
-        {
-            string retVal = "";
-            string contactFieldFormat = "\"type\":\"{0}\",\"value\":\"{1}\",\"pref\":\"false\"";
-            foreach (ContactPhoneNumber number in con.PhoneNumbers)
-            {
-
-                string contactField = string.Format(contactFieldFormat,
-                                                    number.Kind.ToString(),
-                                                    number.PhoneNumber);
-
-                retVal += "{" + contactField + "},";
-            }
-            return retVal.TrimEnd(',');
-        }
-
-        private string FormatJSONEmails(Contact con)
-        {
-            string retVal = "";
-            string contactFieldFormat = "\"type\":\"{0}\",\"value\":\"{1}\",\"pref\":\"false\"";
-            foreach (ContactEmailAddress address in con.EmailAddresses)
-            {
-                string contactField = string.Format(contactFieldFormat,
-                                                    address.Kind.ToString(),
-                                                    address.EmailAddress);
-
-                retVal += "{" + contactField + "},";
-            }
-            return retVal.TrimEnd(',');
-        }
-
-        private string getFormattedJSONAddress(ContactAddress address, bool isPreferred)
-        {
-
-            string addressFormatString = "\"pref\":{0}," + // bool
-                          "\"type\":\"{1}\"," +
-                          "\"formatted\":\"{2}\"," +
-                          "\"streetAddress\":\"{3}\"," +
-                          "\"locality\":\"{4}\"," +
-                          "\"region\":\"{5}\"," +
-                          "\"postalCode\":\"{6}\"," +
-                          "\"country\":\"{7}\"";
-
-            string formattedAddress = address.PhysicalAddress.AddressLine1 + " "
-                                    + address.PhysicalAddress.AddressLine2 + " "
-                                    + address.PhysicalAddress.City + " "
-                                    + address.PhysicalAddress.StateProvince + " "
-                                    + address.PhysicalAddress.CountryRegion + " "
-                                    + address.PhysicalAddress.PostalCode;
-
-            string jsonAddress = string.Format(addressFormatString,
-                                               isPreferred ? "\"true\"" : "\"false\"",
-                                               address.Kind.ToString(),
-                                               formattedAddress,
-                                               address.PhysicalAddress.AddressLine1 + " " + address.PhysicalAddress.AddressLine2,
-                                               address.PhysicalAddress.City,
-                                               address.PhysicalAddress.StateProvince,
-                                               address.PhysicalAddress.PostalCode,
-                                               address.PhysicalAddress.CountryRegion);
-
-            //Debug.WriteLine("getFormattedJSONAddress returning :: " + jsonAddress);
-
-            return "{" + jsonAddress + "}";
-        }
-
-        private string FormatJSONAddresses(Contact con)
-        {
-            string retVal = "";
-            foreach (ContactAddress address in con.Addresses)
-            {
-                retVal += this.getFormattedJSONAddress(address, false) + ",";
-            }
-
-            //Debug.WriteLine("FormatJSONAddresses returning :: " + retVal);
-            return retVal.TrimEnd(',');
-        }
-
-        private string FormatJSONWebsites(Contact con)
-        {
-            string retVal = "";
-            foreach (string website in con.Websites)
-            {
-                retVal += "\"" + website + "\",";
-            }
-            return retVal.TrimEnd(',');
-        }
-
-        /*
-         *  formatted: The complete name of the contact. (DOMString)
-            familyName: The contacts family name. (DOMString)
-            givenName: The contacts given name. (DOMString)
-            middleName: The contacts middle name. (DOMString)
-            honorificPrefix: The contacts prefix (example Mr. or Dr.) (DOMString)
-            honorificSuffix: The contacts suffix (example Esq.). (DOMString)
-         */
-        private string FormatJSONName(Contact con)
-        {
-            string retVal = "";
-            string formatStr = "\"formatted\":\"{0}\"," +
-                                "\"familyName\":\"{1}\"," +
-                                "\"givenName\":\"{2}\"," +
-                                "\"middleName\":\"{3}\"," +
-                                "\"honorificPrefix\":\"{4}\"," +
-                                "\"honorificSuffix\":\"{5}\"";
-
-            if (con.CompleteName != null)
-            {
-                retVal = string.Format(formatStr,
-                                   con.CompleteName.FirstName + " " + con.CompleteName.LastName, // TODO: does this need suffix? middlename?
-                                   con.CompleteName.LastName,
-                                   con.CompleteName.FirstName,
-                                   con.CompleteName.MiddleName,
-                                   con.CompleteName.Title,
-                                   con.CompleteName.Suffix);
-            }
-            else
-            {
-                retVal = string.Format(formatStr,"","","","","","");
-            }
-
-            return "{" + retVal + "}";
-        }
-
-        private string FormatJSONContact(Contact con, string[] fields)
-        {
-
-            string contactFormatStr = "\"id\":\"{0}\"," +
-                                      "\"displayName\":\"{1}\"," +
-                                      "\"nickname\":\"{2}\"," +
-                                      "\"phoneNumbers\":[{3}]," +
-                                      "\"emails\":[{4}]," +
-                                      "\"addresses\":[{5}]," +
-                                      "\"urls\":[{6}]," +
-                                      "\"name\":{7}," +
-                                      "\"note\":\"{8}\"," +
-                                      "\"birthday\":\"{9}\"";
-
-
-            string jsonContact = String.Format(contactFormatStr,
-                                               con.GetHashCode(),
-                                               con.DisplayName,
-                                               con.CompleteName != null ? con.CompleteName.Nickname : "",
-                                               FormatJSONPhoneNumbers(con),
-                                               FormatJSONEmails(con),
-                                               FormatJSONAddresses(con),
-                                               FormatJSONWebsites(con),
-                                               FormatJSONName(con),
-                                               con.Notes.FirstOrDefault(),
-                                               con.Birthdays.FirstOrDefault());
-
-            //Debug.WriteLine("jsonContact = " + jsonContact);
-            // JSON requires new line characters be escaped
-            return "{" + jsonContact.Replace("\n", "\\n") + "}";
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/www/Contact.js
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/www/Contact.js b/spec/plugins/Contacts/www/Contact.js
deleted file mode 100644
index 9c46a0c..0000000
--- a/spec/plugins/Contacts/www/Contact.js
+++ /dev/null
@@ -1,177 +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'),
-    ContactError = require('./ContactError'),
-    utils = require('cordova/utils');
-
-/**
-* Converts primitives into Complex Object
-* Currently only used for Date fields
-*/
-function convertIn(contact) {
-    var value = contact.birthday;
-    try {
-      contact.birthday = new Date(parseFloat(value));
-    } catch (exception){
-      console.log("Cordova Contact convertIn error: exception creating date.");
-    }
-    return contact;
-}
-
-/**
-* Converts Complex objects into primitives
-* Only conversion at present is for Dates.
-**/
-
-function convertOut(contact) {
-    var value = contact.birthday;
-    if (value !== null) {
-        // try to make it a Date object if it is not already
-        if (!utils.isDate(value)){
-            try {
-                value = new Date(value);
-            } catch(exception){
-                value = null;
-            }
-        }
-        if (utils.isDate(value)){
-            value = value.valueOf(); // convert to milliseconds
-        }
-        contact.birthday = value;
-    }
-    return contact;
-}
-
-/**
-* Contains information about a single contact.
-* @constructor
-* @param {DOMString} id unique identifier
-* @param {DOMString} displayName
-* @param {ContactName} name
-* @param {DOMString} nickname
-* @param {Array.<ContactField>} phoneNumbers array of phone numbers
-* @param {Array.<ContactField>} emails array of email addresses
-* @param {Array.<ContactAddress>} addresses array of addresses
-* @param {Array.<ContactField>} ims instant messaging user ids
-* @param {Array.<ContactOrganization>} organizations
-* @param {DOMString} birthday contact's birthday
-* @param {DOMString} note user notes about contact
-* @param {Array.<ContactField>} photos
-* @param {Array.<ContactField>} categories
-* @param {Array.<ContactField>} urls contact's web sites
-*/
-var Contact = function (id, displayName, name, nickname, phoneNumbers, emails, addresses,
-    ims, organizations, birthday, note, photos, categories, urls) {
-    this.id = id || null;
-    this.rawId = null;
-    this.displayName = displayName || null;
-    this.name = name || null; // ContactName
-    this.nickname = nickname || null;
-    this.phoneNumbers = phoneNumbers || null; // ContactField[]
-    this.emails = emails || null; // ContactField[]
-    this.addresses = addresses || null; // ContactAddress[]
-    this.ims = ims || null; // ContactField[]
-    this.organizations = organizations || null; // ContactOrganization[]
-    this.birthday = birthday || null;
-    this.note = note || null;
-    this.photos = photos || null; // ContactField[]
-    this.categories = categories || null; // ContactField[]
-    this.urls = urls || null; // ContactField[]
-};
-
-/**
-* Removes contact from device storage.
-* @param successCB success callback
-* @param errorCB error callback
-*/
-Contact.prototype.remove = function(successCB, errorCB) {
-    argscheck.checkArgs('FF', 'Contact.remove', arguments);
-    var fail = errorCB && function(code) {
-        errorCB(new ContactError(code));
-    };
-    if (this.id === null) {
-        fail(ContactError.UNKNOWN_ERROR);
-    }
-    else {
-        exec(successCB, fail, "Contacts", "remove", [this.id]);
-    }
-};
-
-/**
-* Creates a deep copy of this Contact.
-* With the contact ID set to null.
-* @return copy of this Contact
-*/
-Contact.prototype.clone = function() {
-    var clonedContact = utils.clone(this);
-    clonedContact.id = null;
-    clonedContact.rawId = null;
-
-    function nullIds(arr) {
-        if (arr) {
-            for (var i = 0; i < arr.length; ++i) {
-                arr[i].id = null;
-            }
-        }
-    }
-
-    // Loop through and clear out any id's in phones, emails, etc.
-    nullIds(clonedContact.phoneNumbers);
-    nullIds(clonedContact.emails);
-    nullIds(clonedContact.addresses);
-    nullIds(clonedContact.ims);
-    nullIds(clonedContact.organizations);
-    nullIds(clonedContact.categories);
-    nullIds(clonedContact.photos);
-    nullIds(clonedContact.urls);
-    return clonedContact;
-};
-
-/**
-* Persists contact to device storage.
-* @param successCB success callback
-* @param errorCB error callback
-*/
-Contact.prototype.save = function(successCB, errorCB) {
-    argscheck.checkArgs('FFO', 'Contact.save', arguments);
-    var fail = errorCB && function(code) {
-        errorCB(new ContactError(code));
-    };
-    var success = function(result) {
-        if (result) {
-            if (successCB) {
-                var fullContact = require('./contacts').create(result);
-                successCB(convertIn(fullContact));
-            }
-        }
-        else {
-            // no Entry object returned
-            fail(ContactError.UNKNOWN_ERROR);
-        }
-    };
-    var dupContact = convertOut(utils.clone(this));
-    exec(success, fail, "Contacts", "save", [dupContact]);
-};
-
-
-module.exports = Contact;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/www/ContactAddress.js
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/www/ContactAddress.js b/spec/plugins/Contacts/www/ContactAddress.js
deleted file mode 100644
index 3d39086..0000000
--- a/spec/plugins/Contacts/www/ContactAddress.js
+++ /dev/null
@@ -1,46 +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.
- *
-*/
-
-/**
-* Contact address.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code
-* @param formatted // NOTE: not a W3C standard
-* @param streetAddress
-* @param locality
-* @param region
-* @param postalCode
-* @param country
-*/
-
-var ContactAddress = function(pref, type, formatted, streetAddress, locality, region, postalCode, country) {
-    this.id = null;
-    this.pref = (typeof pref != 'undefined' ? pref : false);
-    this.type = type || null;
-    this.formatted = formatted || null;
-    this.streetAddress = streetAddress || null;
-    this.locality = locality || null;
-    this.region = region || null;
-    this.postalCode = postalCode || null;
-    this.country = country || null;
-};
-
-module.exports = ContactAddress;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/www/ContactError.js
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/www/ContactError.js b/spec/plugins/Contacts/www/ContactError.js
deleted file mode 100644
index 01b229a..0000000
--- a/spec/plugins/Contacts/www/ContactError.js
+++ /dev/null
@@ -1,42 +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.
- *
-*/
-
-/**
- *  ContactError.
- *  An error code assigned by an implementation when an error has occurred
- * @constructor
- */
-var ContactError = function(err) {
-    this.code = (typeof err != 'undefined' ? err : null);
-};
-
-/**
- * Error codes
- */
-ContactError.UNKNOWN_ERROR = 0;
-ContactError.INVALID_ARGUMENT_ERROR = 1;
-ContactError.TIMEOUT_ERROR = 2;
-ContactError.PENDING_OPERATION_ERROR = 3;
-ContactError.IO_ERROR = 4;
-ContactError.NOT_SUPPORTED_ERROR = 5;
-ContactError.PERMISSION_DENIED_ERROR = 20;
-
-module.exports = ContactError;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/www/ContactField.js
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/www/ContactField.js b/spec/plugins/Contacts/www/ContactField.js
deleted file mode 100644
index e84107a..0000000
--- a/spec/plugins/Contacts/www/ContactField.js
+++ /dev/null
@@ -1,37 +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.
- *
-*/
-
-/**
-* Generic contact field.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
-* @param type
-* @param value
-* @param pref
-*/
-var ContactField = function(type, value, pref) {
-    this.id = null;
-    this.type = (type && type.toString()) || null;
-    this.value = (value && value.toString()) || null;
-    this.pref = (typeof pref != 'undefined' ? pref : false);
-};
-
-module.exports = ContactField;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/www/ContactFindOptions.js
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/www/ContactFindOptions.js b/spec/plugins/Contacts/www/ContactFindOptions.js
deleted file mode 100644
index bd8bf35..0000000
--- a/spec/plugins/Contacts/www/ContactFindOptions.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.
- *
-*/
-
-/**
- * ContactFindOptions.
- * @constructor
- * @param filter used to match contacts against
- * @param multiple boolean used to determine if more than one contact should be returned
- */
-
-var ContactFindOptions = function(filter, multiple) {
-    this.filter = filter || '';
-    this.multiple = (typeof multiple != 'undefined' ? multiple : false);
-};
-
-module.exports = ContactFindOptions;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/www/ContactName.js
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/www/ContactName.js b/spec/plugins/Contacts/www/ContactName.js
deleted file mode 100644
index 15cf60b..0000000
--- a/spec/plugins/Contacts/www/ContactName.js
+++ /dev/null
@@ -1,41 +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.
- *
-*/
-
-/**
-* Contact name.
-* @constructor
-* @param formatted // NOTE: not part of W3C standard
-* @param familyName
-* @param givenName
-* @param middle
-* @param prefix
-* @param suffix
-*/
-var ContactName = function(formatted, familyName, givenName, middle, prefix, suffix) {
-    this.formatted = formatted || null;
-    this.familyName = familyName || null;
-    this.givenName = givenName || null;
-    this.middleName = middle || null;
-    this.honorificPrefix = prefix || null;
-    this.honorificSuffix = suffix || null;
-};
-
-module.exports = ContactName;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/www/ContactOrganization.js
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/www/ContactOrganization.js b/spec/plugins/Contacts/www/ContactOrganization.js
deleted file mode 100644
index 5dd242b..0000000
--- a/spec/plugins/Contacts/www/ContactOrganization.js
+++ /dev/null
@@ -1,44 +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.
- *
-*/
-
-/**
-* Contact organization.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
-* @param name
-* @param dept
-* @param title
-* @param startDate
-* @param endDate
-* @param location
-* @param desc
-*/
-
-var ContactOrganization = function(pref, type, name, dept, title) {
-    this.id = null;
-    this.pref = (typeof pref != 'undefined' ? pref : false);
-    this.type = type || null;
-    this.name = name || null;
-    this.department = dept || null;
-    this.title = title || null;
-};
-
-module.exports = ContactOrganization;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/www/contacts.js
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/www/contacts.js b/spec/plugins/Contacts/www/contacts.js
deleted file mode 100644
index 5e6b4db..0000000
--- a/spec/plugins/Contacts/www/contacts.js
+++ /dev/null
@@ -1,76 +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'),
-    ContactError = require('./ContactError'),
-    utils = require('cordova/utils'),
-    Contact = require('./Contact');
-
-/**
-* Represents a group of Contacts.
-* @constructor
-*/
-var contacts = {
-    /**
-     * Returns an array of Contacts matching the search criteria.
-     * @param fields that should be searched
-     * @param successCB success callback
-     * @param errorCB error callback
-     * @param {ContactFindOptions} options that can be applied to contact searching
-     * @return array of Contacts matching search criteria
-     */
-    find:function(fields, successCB, errorCB, options) {
-        argscheck.checkArgs('afFO', 'contacts.find', arguments);
-        if (!fields.length) {
-            errorCB && errorCB(new ContactError(ContactError.INVALID_ARGUMENT_ERROR));
-        } else {
-            var win = function(result) {
-                var cs = [];
-                for (var i = 0, l = result.length; i < l; i++) {
-                    cs.push(contacts.create(result[i]));
-                }
-                successCB(cs);
-            };
-            exec(win, errorCB, "Contacts", "search", [fields, options]);
-        }
-    },
-
-    /**
-     * This function creates a new contact, but it does not persist the contact
-     * to device storage. To persist the contact to device storage, invoke
-     * contact.save().
-     * @param properties an object whose properties will be examined to create a new Contact
-     * @returns new Contact object
-     */
-    create:function(properties) {
-        argscheck.checkArgs('O', 'contacts.create', arguments);
-        var contact = new Contact();
-        for (var i in properties) {
-            if (typeof contact[i] !== 'undefined' && properties.hasOwnProperty(i)) {
-                contact[i] = properties[i];
-            }
-        }
-        return contact;
-    }
-};
-
-module.exports = contacts;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/www/ios/Contact.js
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/www/ios/Contact.js b/spec/plugins/Contacts/www/ios/Contact.js
deleted file mode 100644
index b40c41a..0000000
--- a/spec/plugins/Contacts/www/ios/Contact.js
+++ /dev/null
@@ -1,51 +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'),
-    ContactError = require('./ContactError');
-
-/**
- * Provides iOS Contact.display API.
- */
-module.exports = {
-    display : function(errorCB, options) {
-        /*
-         *    Display a contact using the iOS Contact Picker UI
-         *    NOT part of W3C spec so no official documentation
-         *
-         *    @param errorCB error callback
-         *    @param options object
-         *    allowsEditing: boolean AS STRING
-         *        "true" to allow editing the contact
-         *        "false" (default) display contact
-         */
-
-        if (this.id === null) {
-            if (typeof errorCB === "function") {
-                var errorObj = new ContactError(ContactError.UNKNOWN_ERROR);
-                errorCB(errorObj);
-            }
-        }
-        else {
-            exec(null, errorCB, "Contacts","displayContact", [this.id, options]);
-        }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/Contacts/www/ios/contacts.js
----------------------------------------------------------------------
diff --git a/spec/plugins/Contacts/www/ios/contacts.js b/spec/plugins/Contacts/www/ios/contacts.js
deleted file mode 100644
index 67cf421..0000000
--- a/spec/plugins/Contacts/www/ios/contacts.js
+++ /dev/null
@@ -1,62 +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 iOS enhanced contacts API.
- */
-module.exports = {
-    newContactUI : function(successCallback) {
-        /*
-         *    Create a contact using the iOS Contact Picker UI
-         *    NOT part of W3C spec so no official documentation
-         *
-         * returns:  the id of the created contact as param to successCallback
-         */
-        exec(successCallback, null, "Contacts","newContact", []);
-    },
-    chooseContact : function(successCallback, options) {
-        /*
-         *    Select a contact using the iOS Contact Picker UI
-         *    NOT part of W3C spec so no official documentation
-         *
-         *    @param errorCB error callback
-         *    @param options object
-         *    allowsEditing: boolean AS STRING
-         *        "true" to allow editing the contact
-         *        "false" (default) display contact
-         *      fields: array of fields to return in contact object (see ContactOptions.fields)
-         *
-         *    @returns
-         *        id of contact selected
-         *        ContactObject
-         *            if no fields provided contact contains just id information
-         *            if fields provided contact object contains information for the specified fields
-         *
-         */
-         var win = function(result) {
-             var fullContact = require('./contacts').create(result);
-            successCallback(fullContact.id, fullContact);
-       };
-        exec(win, null, "Contacts","chooseContact", [options]);
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/DummyPlugin/android-resource.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/DummyPlugin/android-resource.xml b/spec/plugins/DummyPlugin/android-resource.xml
deleted file mode 100644
index 421376d..0000000
--- a/spec/plugins/DummyPlugin/android-resource.xml
+++ /dev/null
@@ -1 +0,0 @@
-dummy

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/DummyPlugin/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/DummyPlugin/plugin.xml b/spec/plugins/DummyPlugin/plugin.xml
deleted file mode 100644
index 4733afb..0000000
--- a/spec/plugins/DummyPlugin/plugin.xml
+++ /dev/null
@@ -1,203 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="com.phonegap.plugins.dummyplugin"
-    version="0.6.0">
-
-    <!-- new requirement: NO SPACES -->
-    <name>dummyplugin</name>
-    <!-- These are going to be required by plugman-registry -->
-    <description>my description</description>
-    <author>Jackson Badman</author> 
-    <keywords>dummy,plugin</keywords>
-    <license>BSD</license>
-    <!-- end plugman-registry requirements -->
-
-    <asset src="www/dummyplugin.js" target="dummyplugin.js" />
-    <asset src="www/dummyplugin" target="dummyplugin" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-        <access origin="s3.amazonaws.com" />
-    </config-file>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="AndroidManifest.xml" parent="/manifest/application">
-            <activity android:name="com.phonegap.plugins.dummyplugin.DummyPlugin"
-                      android:label="@string/app_name">
-                <intent-filter>
-                </intent-filter>
-            </activity>
-        </config-file>
-
-        <resource-file src="android-resource.xml" target="res/xml/dummy.xml" />
-
-        <!-- CDV < 2.0 -->
-        <config-file target="res/xml/plugins.xml" parent="/plugins">
-            <plugin name="DummyPlugin"
-                value="com.phonegap.plugins.dummyplugin.DummyPlugin"/>
-        </config-file>
-
-        <!-- CDV 2.0+ (for now) -->
-        <config-file target="res/xml/config.xml" parent="/cordova/plugins">
-            <plugin name="DummyPlugin"
-                value="com.phonegap.plugins.dummyplugin.DummyPlugin"/>
-        </config-file>
-
-        <source-file src="src/android/DummyPlugin.java"
-                target-dir="src/com/phonegap/plugins/dummyplugin" />
-        <lib-file src="src/android/TestLib.jar" />
-    </platform>
-    
-    <!-- amazon fireos -->
-    <platform name="amazon-fireos">
-        <config-file target="AndroidManifest.xml" parent="/manifest/application">
-            <activity android:name="com.phonegap.plugins.dummyplugin.DummyPlugin"
-                      android:label="@string/app_name">
-                <intent-filter>
-                </intent-filter>
-            </activity>
-        </config-file>
-
-        <!-- CDV < 2.0 -->
-        <config-file target="res/xml/plugins.xml" parent="/plugins">
-            <plugin name="DummyPlugin"
-                value="com.phonegap.plugins.dummyplugin.DummyPlugin"/>
-        </config-file>
-
-        <!-- CDV 2.0+ (for now) -->
-        <config-file target="res/xml/config.xml" parent="/cordova/plugins">
-            <plugin name="DummyPlugin"
-                value="com.phonegap.plugins.dummyplugin.DummyPlugin"/>
-        </config-file>
-
-        <source-file src="src/android/DummyPlugin.java"
-                target-dir="src/com/phonegap/plugins/dummyplugin" />
-        <lib-file src="src/android/TestLib.jar" />
-    </platform>
-
-    <!-- blackberry10 -->
-    <platform name="blackberry10">
-        <config-file target="www/config.xml" parent="/widget">
-            <feature id="dummyPlugin" required="true" version="1.0.0.0"/>
-        </config-file>
-
-        <source-file src="src/blackberry10/index.js"/>
-        <js-module src="www/dummyplugin.js" name="Dummy">
-            <clobbers target="dummy" />
-        </js-module>
-    </platform>
-
-        
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV < 2.4 -->
-        <plugins-plist key="com.phonegap.plugins.dummyplugin"
-            string="DummyPluginCommand" />
-        
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="/widget/plugins">
-            <plugin name="DummyPlugin"
-                value="DummyPluginCommand"/>
-        </config-file>
-
-        <resource-file src="src/ios/DummyPlugin.bundle" />
-
-        <header-file src="src/ios/DummyPluginCommand.h" />
-        <source-file src="src/ios/DummyPluginCommand.m"/>
-
-        <source-file src="src/ios/SourceWithFramework.m" framework="true" />
-
-        <header-file src="src/ios/TargetDirTest.h" target-dir="targetDir" />
-        <source-file src="src/ios/TargetDirTest.m" target-dir="targetDir" />
-
-        <!-- framework for testing (not actual dependency of DummyPlugin -->
-        <framework src="src/ios/libsqlite3.dylib" />
-        <framework src="src/ios/libsqlite3.dylib" weak="true" />
-        <framework src="src/ios/Custom.framework" custom="true" />
-    </platform>
-
-    <!-- wp7 -->
-    <platform name="wp7">
-        <config-file target="config.xml" parent="/*">
-            <feature id="dummyPlugin" required="true" version="1.0.0.0"/>
-        </config-file>
-
-        <source-file src="src/wp7/DummyPlugin.cs"/>
-        <js-module src="www/dummyplugin.js" name="Dummy">
-            <clobbers target="dummy" />
-        </js-module>
-    </platform>
-
-    <!-- wp8 -->
-    <platform name="wp8">
-        <config-file target="config.xml" parent="/*">
-            <feature id="dummyPlugin" required="true" version="1.0.0.0"/>
-        </config-file>
-
-        <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App" after="Tokens">
-            <Extensions />
-        </config-file>
-
-        <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Extensions" after="Extension">
-            <Extension ExtensionName="DummyExtension1" ConsumerID="{5B04B775-356B-4AA0-AAF8-6491FFEA5661}" TaskID="_default" ExtraFile="Extensions\\Extras.xml" />
-            <Extension ExtensionName="DummyExtension2" ConsumerID="{5B04B775-356B-4AA0-AAF8-6491FFEA5661}" TaskID="_default" ExtraFile="Extensions\\Extras.xml" />
-        </config-file>
-
-        <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Extensions" after="FileTypeAssociation;Extension">
-            <FileTypeAssociation TaskID="_default" Name="DummyFileType1" NavUriFragment="fileToken=%s">
-                <SupportedFileTypes>
-                    <FileType ContentType="application/dummy1">.dummy1</FileType>
-                </SupportedFileTypes>
-            </FileTypeAssociation>
-            <FileTypeAssociation TaskID="_default" Name="DummyFileType2" NavUriFragment="fileToken=%s">
-                <SupportedFileTypes>
-                    <FileType ContentType="application/dummy2">.dummy2</FileType>
-                </SupportedFileTypes>
-            </FileTypeAssociation>
-        </config-file>
-
-        <source-file src="src/wp8/DummyPlugin.cs"/>
-        <js-module src="www/dummyplugin.js" name="Dummy">
-            <clobbers target="dummy" />
-        </js-module>
-    </platform>
-
-		<!-- tizen -->
-		<platform name="tizen">
-			<source-file src="src/tizen/dummer.js"/>
-		</platform>
-
-    <!-- windows8 -->
-    <platform name="windows8">
-        <config-file target="config.xml" parent="/*">
-            <feature id="dummyPlugin" required="true" version="1.0.0.0"/>
-        </config-file>
-
-        <source-file src="src/windows8/dummer.js"/>
-        <js-module src="www/dummyplugin.js" name="Dummy">
-            <clobbers target="dummy" />
-        </js-module>
-    </platform>
-
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/DummyPlugin/src/android/DummyPlugin.java
----------------------------------------------------------------------
diff --git a/spec/plugins/DummyPlugin/src/android/DummyPlugin.java b/spec/plugins/DummyPlugin/src/android/DummyPlugin.java
deleted file mode 100644
index 5263b0c..0000000
--- a/spec/plugins/DummyPlugin/src/android/DummyPlugin.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/DummyPlugin/src/android/TestLib.jar
----------------------------------------------------------------------
diff --git a/spec/plugins/DummyPlugin/src/android/TestLib.jar b/spec/plugins/DummyPlugin/src/android/TestLib.jar
deleted file mode 100644
index e69de29..0000000


[07/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/ios-config-xml/SampleApp.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/spec/projects/ios-config-xml/SampleApp.xcodeproj/project.pbxproj b/spec/projects/ios-config-xml/SampleApp.xcodeproj/project.pbxproj
deleted file mode 100644
index 60f478f..0000000
--- a/spec/projects/ios-config-xml/SampleApp.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,496 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A463F14DB0A1B007FEAC7 /* Foundation.framework */; };
-		571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464114DB0A1B007FEAC7 /* UIKit.framework */; };
-		571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */; };
-		571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464514DB0A1B007FEAC7 /* AddressBook.framework */; };
-		571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */; };
-		571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */; };
-		571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */; };
-		571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */; };
-		571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */; };
-		571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465114DB0A1B007FEAC7 /* QuartzCore.framework */; };
-		571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */; };
-		571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */; };
-		571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465714DB0A1B007FEAC7 /* CoreMedia.framework */; };
-		571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */; };
-		571A466014DB0A1B007FEAC7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A465F14DB0A1B007FEAC7 /* main.m */; };
-		571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A466214DB0A1B007FEAC7 /* PhoneGap.framework */; };
-		571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466614DB0A1B007FEAC7 /* Localizable.strings */; };
-		571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466A14DB0A1B007FEAC7 /* Localizable.strings */; };
-		571A466F14DB0A1B007FEAC7 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A466E14DB0A1B007FEAC7 /* icon.png */; };
-		571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467014DB0A1B007FEAC7 /* icon@2x.png */; };
-		571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467214DB0A1B007FEAC7 /* icon-72.png */; };
-		571A467614DB0A1B007FEAC7 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467514DB0A1B007FEAC7 /* Default.png */; };
-		571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467714DB0A1B007FEAC7 /* Default@2x.png */; };
-		571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 571A467914DB0A1B007FEAC7 /* Capture.bundle */; };
-		571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */ = {isa = PBXBuildFile; fileRef = 571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */; };
-		571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A467F14DB0A1B007FEAC7 /* AppDelegate.m */; };
-		571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A468214DB0A1B007FEAC7 /* MainViewController.m */; };
-		571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 571A468414DB0A1B007FEAC7 /* MainViewController.xib */; };
-		577FC36614DB0B620082BA7B /* www in Resources */ = {isa = PBXBuildFile; fileRef = 577FC36514DB0B620082BA7B /* www */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
-		571A463B14DB0A1B007FEAC7 /* ChildApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChildApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		571A463F14DB0A1B007FEAC7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-		571A464114DB0A1B007FEAC7 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
-		571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
-		571A464514DB0A1B007FEAC7 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
-		571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
-		571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
-		571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
-		571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
-		571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
-		571A465114DB0A1B007FEAC7 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
-		571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
-		571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
-		571A465714DB0A1B007FEAC7 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
-		571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ChildApp-Info.plist"; sourceTree = "<group>"; };
-		571A465D14DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		571A465F14DB0A1B007FEAC7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
-		571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ChildApp-Prefix.pch"; sourceTree = "<group>"; };
-		571A466214DB0A1B007FEAC7 /* PhoneGap.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PhoneGap.framework; path = /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework; sourceTree = "<absolute>"; };
-		571A466714DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/Localizable.strings; sourceTree = "<group>"; };
-		571A466B14DB0A1B007FEAC7 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Resources/es.lproj/Localizable.strings; sourceTree = "<group>"; };
-		571A466E14DB0A1B007FEAC7 /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon.png; path = Resources/icons/icon.png; sourceTree = "<group>"; };
-		571A467014DB0A1B007FEAC7 /* icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon@2x.png"; path = "Resources/icons/icon@2x.png"; sourceTree = "<group>"; };
-		571A467214DB0A1B007FEAC7 /* icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon-72.png"; path = "Resources/icons/icon-72.png"; sourceTree = "<group>"; };
-		571A467514DB0A1B007FEAC7 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/splash/Default.png; sourceTree = "<group>"; };
-		571A467714DB0A1B007FEAC7 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "Resources/splash/Default@2x.png"; sourceTree = "<group>"; };
-		571A467914DB0A1B007FEAC7 /* Capture.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Capture.bundle; path = Resources/Capture.bundle; sourceTree = "<group>"; };
-		571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = PhoneGap.plist; sourceTree = "<group>"; };
-		571A467E14DB0A1B007FEAC7 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Classes/AppDelegate.h; sourceTree = "<group>"; };
-		571A467F14DB0A1B007FEAC7 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Classes/AppDelegate.m; sourceTree = "<group>"; };
-		571A468114DB0A1B007FEAC7 /* MainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainViewController.h; path = Classes/MainViewController.h; sourceTree = "<group>"; };
-		571A468214DB0A1B007FEAC7 /* MainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = Classes/MainViewController.m; sourceTree = "<group>"; };
-		571A468414DB0A1B007FEAC7 /* MainViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainViewController.xib; path = Classes/MainViewController.xib; sourceTree = "<group>"; };
-		571A468714DB0A1B007FEAC7 /* README */ = {isa = PBXFileReference; lastKnownFileType = text; name = README; path = Plugins/README; sourceTree = "<group>"; };
-		577FC36514DB0B620082BA7B /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		571A463514DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */,
-				571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */,
-				571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */,
-				571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */,
-				571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */,
-				571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */,
-				571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */,
-				571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */,
-				571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */,
-				571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */,
-				571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */,
-				571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */,
-				571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */,
-				571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		571A463814DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		571A462D14DB0A1A007FEAC7 = {
-			isa = PBXGroup;
-			children = (
-				577FC36514DB0B620082BA7B /* www */,
-				571A465914DB0A1B007FEAC7 /* ChildApp */,
-				571A463E14DB0A1B007FEAC7 /* Frameworks */,
-				571A463C14DB0A1B007FEAC7 /* Products */,
-			);
-			sourceTree = "<group>";
-		};
-		571A463C14DB0A1B007FEAC7 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				571A463B14DB0A1B007FEAC7 /* ChildApp.app */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		571A463E14DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				571A463F14DB0A1B007FEAC7 /* Foundation.framework */,
-				571A464114DB0A1B007FEAC7 /* UIKit.framework */,
-				571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */,
-				571A464514DB0A1B007FEAC7 /* AddressBook.framework */,
-				571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */,
-				571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */,
-				571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */,
-				571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */,
-				571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */,
-				571A465114DB0A1B007FEAC7 /* QuartzCore.framework */,
-				571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */,
-				571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */,
-				571A465714DB0A1B007FEAC7 /* CoreMedia.framework */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
-		571A465914DB0A1B007FEAC7 /* ChildApp */ = {
-			isa = PBXGroup;
-			children = (
-				571A466214DB0A1B007FEAC7 /* PhoneGap.framework */,
-				571A466414DB0A1B007FEAC7 /* Resources */,
-				571A467D14DB0A1B007FEAC7 /* Classes */,
-				571A468614DB0A1B007FEAC7 /* Plugins */,
-				571A465A14DB0A1B007FEAC7 /* Supporting Files */,
-			);
-			path = ChildApp;
-			sourceTree = "<group>";
-		};
-		571A465A14DB0A1B007FEAC7 /* Supporting Files */ = {
-			isa = PBXGroup;
-			children = (
-				571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */,
-				571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */,
-				571A465F14DB0A1B007FEAC7 /* main.m */,
-				571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */,
-				571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */,
-				571A468414DB0A1B007FEAC7 /* MainViewController.xib */,
-			);
-			name = "Supporting Files";
-			sourceTree = "<group>";
-		};
-		571A466414DB0A1B007FEAC7 /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				571A467914DB0A1B007FEAC7 /* Capture.bundle */,
-				571A466514DB0A1B007FEAC7 /* en.lproj */,
-				571A466914DB0A1B007FEAC7 /* es.lproj */,
-				571A466D14DB0A1B007FEAC7 /* icons */,
-				571A467414DB0A1B007FEAC7 /* splash */,
-			);
-			name = Resources;
-			sourceTree = "<group>";
-		};
-		571A466514DB0A1B007FEAC7 /* en.lproj */ = {
-			isa = PBXGroup;
-			children = (
-				571A466614DB0A1B007FEAC7 /* Localizable.strings */,
-			);
-			name = en.lproj;
-			sourceTree = "<group>";
-		};
-		571A466914DB0A1B007FEAC7 /* es.lproj */ = {
-			isa = PBXGroup;
-			children = (
-				571A466A14DB0A1B007FEAC7 /* Localizable.strings */,
-			);
-			name = es.lproj;
-			sourceTree = "<group>";
-		};
-		571A466D14DB0A1B007FEAC7 /* icons */ = {
-			isa = PBXGroup;
-			children = (
-				571A466E14DB0A1B007FEAC7 /* icon.png */,
-				571A467014DB0A1B007FEAC7 /* icon@2x.png */,
-				571A467214DB0A1B007FEAC7 /* icon-72.png */,
-			);
-			name = icons;
-			sourceTree = "<group>";
-		};
-		571A467414DB0A1B007FEAC7 /* splash */ = {
-			isa = PBXGroup;
-			children = (
-				571A467514DB0A1B007FEAC7 /* Default.png */,
-				571A467714DB0A1B007FEAC7 /* Default@2x.png */,
-			);
-			name = splash;
-			sourceTree = "<group>";
-		};
-		571A467D14DB0A1B007FEAC7 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-				571A467E14DB0A1B007FEAC7 /* AppDelegate.h */,
-				571A467F14DB0A1B007FEAC7 /* AppDelegate.m */,
-				571A468114DB0A1B007FEAC7 /* MainViewController.h */,
-				571A468214DB0A1B007FEAC7 /* MainViewController.m */,
-			);
-			name = Classes;
-			sourceTree = "<group>";
-		};
-		571A468614DB0A1B007FEAC7 /* Plugins */ = {
-			isa = PBXGroup;
-			children = (
-				571A468714DB0A1B007FEAC7 /* README */,
-			);
-			name = Plugins;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		571A463A14DB0A1B007FEAC7 /* ChildApp */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */;
-			buildPhases = (
-				571A463414DB0A1B007FEAC7 /* Sources */,
-				571A463514DB0A1B007FEAC7 /* Frameworks */,
-				571A463614DB0A1B007FEAC7 /* Resources */,
-				571A463714DB0A1B007FEAC7 /* Sources */,
-				571A463814DB0A1B007FEAC7 /* Frameworks */,
-				571A463914DB0A1B007FEAC7 /* ShellScript */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = ChildApp;
-			productName = ChildApp;
-			productReference = 571A463B14DB0A1B007FEAC7 /* ChildApp.app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		571A462F14DB0A1A007FEAC7 /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastUpgradeCheck = 0420;
-			};
-			buildConfigurationList = 571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 0;
-			knownRegions = (
-				en,
-				es,
-			);
-			mainGroup = 571A462D14DB0A1A007FEAC7;
-			productRefGroup = 571A463C14DB0A1B007FEAC7 /* Products */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				571A463A14DB0A1B007FEAC7 /* ChildApp */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		571A463614DB0A1B007FEAC7 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */,
-				571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */,
-				571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */,
-				571A466F14DB0A1B007FEAC7 /* icon.png in Resources */,
-				571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */,
-				571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */,
-				571A467614DB0A1B007FEAC7 /* Default.png in Resources */,
-				571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */,
-				571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */,
-				571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */,
-				571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */,
-				577FC36614DB0B620082BA7B /* www in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
-		571A463914DB0A1B007FEAC7 /* ShellScript */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/bash;
-			shellScript = "\n\t\t\t\t\t\t\t\tif [ ! -d \"$PROJECT_DIR/www\" ] ; then\n\t\t\t\t\t\t\t\t\tcp -R /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework/www \"$PROJECT_DIR\"\n\t\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\t\t# detect www folder reference in project, if missing, print warning\n\t\t\t\t\t\t\t\tgrep \"{isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = \\\"<group>\\\"; };\" \"$PROJECT_DIR/$PROJECT_NAME.xcodeproj/project.pbxproj\"\n\t\t\t\t\t\t\t\trc=$? \n\t\t\t\t\t\t\t\tif [ $rc != 0 ] ; then\n\t\t\t\t\t\t\t\techo -e \"warning: Missing - Add $PROJECT_DIR/www as a folder reference in your project. Just drag and drop the folder into your project, into the Project Navigator of Xcode 4. Make sure you select the second radio-button: 'Create folder references for any added folders' (which will create a blue folder)\" 1>&2\n\t\t\t\t\t\t\t\tfi\t\t\t\t\t\t\t";
-		};
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		571A463414DB0A1B007FEAC7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A466014DB0A1B007FEAC7 /* main.m in Sources */,
-				571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */,
-				571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		571A463714DB0A1B007FEAC7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A465D14DB0A1B007FEAC7 /* en */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "<group>";
-		};
-		571A466614DB0A1B007FEAC7 /* Localizable.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A466714DB0A1B007FEAC7 /* en */,
-			);
-			name = Localizable.strings;
-			sourceTree = "<group>";
-		};
-		571A466A14DB0A1B007FEAC7 /* Localizable.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A466B14DB0A1B007FEAC7 /* es */,
-			);
-			name = Localizable.strings;
-			sourceTree = "<group>";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		571A468814DB0A1B007FEAC7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
-				CLANG_ENABLE_OBJC_ARC = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = NO;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				GCC_VERSION = com.apple.compilers.llvmgcc42;
-				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
-				SDKROOT = iphoneos;
-			};
-			name = Debug;
-		};
-		571A468914DB0A1B007FEAC7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
-				CLANG_ENABLE_OBJC_ARC = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_VERSION = com.apple.compilers.llvmgcc42;
-				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
-				SDKROOT = iphoneos;
-				VALIDATE_PRODUCT = YES;
-			};
-			name = Release;
-		};
-		571A468B14DB0A1B007FEAC7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = YES;
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
-				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
-				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak_library",
-					/usr/lib/libSystem.B.dylib,
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				TARGETED_DEVICE_FAMILY = "1,2";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Debug;
-		};
-		571A468C14DB0A1B007FEAC7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = YES;
-				COPY_PHASE_STRIP = YES;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
-				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
-				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak_library",
-					/usr/lib/libSystem.B.dylib,
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				TARGETED_DEVICE_FAMILY = "1,2";
-				VALIDATE_PRODUCT = YES;
-				WRAPPER_EXTENSION = app;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				571A468814DB0A1B007FEAC7 /* Debug */,
-				571A468914DB0A1B007FEAC7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				571A468B14DB0A1B007FEAC7 /* Debug */,
-				571A468C14DB0A1B007FEAC7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 571A462F14DB0A1A007FEAC7 /* Project object */;
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/ios-config-xml/SampleApp/SampleApp-Info.plist
----------------------------------------------------------------------
diff --git a/spec/projects/ios-config-xml/SampleApp/SampleApp-Info.plist b/spec/projects/ios-config-xml/SampleApp/SampleApp-Info.plist
deleted file mode 100644
index 6010b61..0000000
--- a/spec/projects/ios-config-xml/SampleApp/SampleApp-Info.plist
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<!--
-#
-# 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.
-#
--->
-<plist version="1.0">
-<dict>
-	<key>CFBundleIcons</key>
-	<dict>
-		<key>CFBundlePrimaryIcon</key>
-		<dict>
-			<key>CFBundleIconFiles</key>
-			<array>
-                <string>icon.png</string>
-                <string>icon@2x.png</string>
-                <string>icon-72.png</string>
-                <string>icon-72@2x.png</string>
-			</array>
-			<key>UIPrerenderedIcon</key>
-			<false/>
-		</dict>
-	</dict>
-	<key>UISupportedInterfaceOrientations~ipad</key>
-	<array>
-		<string>UIInterfaceOrientationPortrait</string>
-		<string>UIInterfaceOrientationLandscapeLeft</string>
-		<string>UIInterfaceOrientationPortraitUpsideDown</string>
-		<string>UIInterfaceOrientationLandscapeRight</string>
-	</array>
-	<key>UISupportedInterfaceOrientations</key>
-	<array>
-		<string>UIInterfaceOrientationPortrait</string>
-	</array>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleDisplayName</key>
-	<string>${PRODUCT_NAME}</string>
-	<key>CFBundleExecutable</key>
-	<string>${EXECUTABLE_NAME}</string>
-	<key>CFBundleIconFile</key>
-	<string>icon.png</string>
-	<key>CFBundleIdentifier</key>
-	<string>com.example.friendstring</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>${PRODUCT_NAME}</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1.0</string>
-	<key>LSRequiresIPhoneOS</key>
-	<true/>
-	<key>NSMainNibFile</key>
-	<string></string>
-	<key>NSMainNibFile~ipad</key>
-	<string></string>
-</dict>
-</plist>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/ios-config-xml/SampleApp/config.xml
----------------------------------------------------------------------
diff --git a/spec/projects/ios-config-xml/SampleApp/config.xml b/spec/projects/ios-config-xml/SampleApp/config.xml
deleted file mode 100644
index 2858c28..0000000
--- a/spec/projects/ios-config-xml/SampleApp/config.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-#
-# 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.
-#
--->
-<widget>
-    <preference name="KeyboardDisplayRequiresUserAction" value="true" />
-    <preference name="SuppressesIncrementalRendering" value="false" />
-    <preference name="UIWebViewBounce" value="true" />
-    <preference name="TopActivityIndicator" value="gray" />
-    <preference name="EnableLocation" value="false" />
-    <preference name="EnableViewportScale" value="false" />
-    <preference name="AutoHideSplashScreen" value="true" />
-    <preference name="ShowSplashScreenSpinner" value="true" />
-    <preference name="MediaPlaybackRequiresUserAction" value="false" />
-    <preference name="AllowInlineMediaPlayback" value="false" />
-    <preference name="OpenAllWhitelistURLsInWebView" value="false" />
-    <preference name="BackupWebStorage" value="cloud" />
-
-    <plugins>
-        <plugin name="Device" value="CDVDevice" />
-        <plugin name="Logger" value="CDVLogger" />
-        <plugin name="Compass" value="CDVLocation" />
-        <plugin name="Accelerometer" value="CDVAccelerometer" />
-        <plugin name="Camera" value="CDVCamera" />
-        <plugin name="NetworkStatus" value="CDVConnection" />
-        <plugin name="Contacts" value="CDVContacts" />
-        <plugin name="Debug Console" value="CDVDebugConsole" />
-        <plugin name="Echo" value="CDVEcho" />
-        <plugin name="File" value="CDVFile" />
-        <plugin name="FileTransfer" value="CDVFileTransfer" />
-        <plugin name="Geolocation" value="CDVLocation" />
-        <plugin name="Notification" value="CDVNotification" />
-        <plugin name="Media" value="CDVSound" />
-        <plugin name="Capture" value="CDVCapture" />
-        <plugin name="SplashScreen" value="CDVSplashScreen" />
-        <plugin name="Battery" value="CDVBattery" />
-        <plugin name="Globalization" value="CDVGlobalization" />
-        <plugin name="InAppBrowser" value="CDVInAppBrowser" />
-    </plugins>
-
-    <access origin="*" />
-</widget>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/ios-config-xml/www/.gitkeep
----------------------------------------------------------------------
diff --git a/spec/projects/ios-config-xml/www/.gitkeep b/spec/projects/ios-config-xml/www/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/ios-plist/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/spec/projects/ios-plist/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/spec/projects/ios-plist/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
deleted file mode 100644
index 5d0d461..0000000
--- a/spec/projects/ios-plist/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,636 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		1F2BECC013F9785B00A93BF6 /* CDVBattery.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F2BECBE13F9785B00A93BF6 /* CDVBattery.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		1F2BECC113F9785B00A93BF6 /* CDVBattery.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F2BECBF13F9785B00A93BF6 /* CDVBattery.m */; };
-		1F3C04CE12BC247D004F9E10 /* CDVContact.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F3C04CC12BC247D004F9E10 /* CDVContact.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		1F3C04CF12BC247D004F9E10 /* CDVContact.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F3C04CD12BC247D004F9E10 /* CDVContact.m */; };
-		1F584B9B1385A28A00ED25E8 /* CDVCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F584B991385A28900ED25E8 /* CDVCapture.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		1F584B9C1385A28A00ED25E8 /* CDVCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F584B9A1385A28900ED25E8 /* CDVCapture.m */; };
-		1F92F4A01314023E0046367C /* CDVPluginResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F92F49E1314023E0046367C /* CDVPluginResult.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		1F92F4A11314023E0046367C /* CDVPluginResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F92F49F1314023E0046367C /* CDVPluginResult.m */; };
-		301F2F2A14F3C9CA003FE9FC /* CDV.h in Headers */ = {isa = PBXBuildFile; fileRef = 301F2F2914F3C9CA003FE9FC /* CDV.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		302965BC13A94E9D007046C5 /* CDVDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 302965BB13A94E9D007046C5 /* CDVDebug.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3034979C1513D56A0090E688 /* CDVLocalStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 3034979A1513D56A0090E688 /* CDVLocalStorage.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3034979E1513D56A0090E688 /* CDVLocalStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 3034979B1513D56A0090E688 /* CDVLocalStorage.m */; };
-		30392E4E14F4FCAB00B9E0B8 /* CDVAvailability.h in Headers */ = {isa = PBXBuildFile; fileRef = 30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3062D120151D0EDB000D9128 /* UIDevice+Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3062D122151D0EDB000D9128 /* UIDevice+Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */; };
-		307A8F9E1385A2EC00E43782 /* CDVConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 307A8F9C1385A2EC00E43782 /* CDVConnection.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		307A8F9F1385A2EC00E43782 /* CDVConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 307A8F9D1385A2EC00E43782 /* CDVConnection.m */; };
-		30A90B9114588697006178D3 /* JSONKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 30A90B8F14588697006178D3 /* JSONKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30A90B9314588697006178D3 /* JSONKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 30A90B9014588697006178D3 /* JSONKit.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
-		30B39EBE13D0268B0009682A /* CDVSplashScreen.h in Headers */ = {isa = PBXBuildFile; fileRef = 30B39EBC13D0268B0009682A /* CDVSplashScreen.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30B39EBF13D0268B0009682A /* CDVSplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 30B39EBD13D0268B0009682A /* CDVSplashScreen.m */; };
-		30C5F1DF15AF9E950052A00D /* CDVDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C5F1DD15AF9E950052A00D /* CDVDevice.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30C5F1E015AF9E950052A00D /* CDVDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C5F1DE15AF9E950052A00D /* CDVDevice.m */; };
-		30C684801406CB38004C1A8E /* CDVWhitelist.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C6847E1406CB38004C1A8E /* CDVWhitelist.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30C684821406CB38004C1A8E /* CDVWhitelist.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C6847F1406CB38004C1A8E /* CDVWhitelist.m */; };
-		30C684941407044B004C1A8E /* CDVURLProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C684921407044A004C1A8E /* CDVURLProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30C684961407044B004C1A8E /* CDVURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C684931407044A004C1A8E /* CDVURLProtocol.m */; };
-		30E33AF213A7E24B00594D64 /* CDVPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E33AF013A7E24B00594D64 /* CDVPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30E33AF313A7E24B00594D64 /* CDVPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 30E33AF113A7E24B00594D64 /* CDVPlugin.m */; };
-		30E563CF13E217EC00C949AA /* NSMutableArray+QueueAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30E563D013E217EC00C949AA /* NSMutableArray+QueueAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */; };
-		30F5EBAB14CA26E700987760 /* CDVCommandDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3E76876D156A90EE00EB6FA3 /* CDVLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E76876B156A90EE00EB6FA3 /* CDVLogger.m */; };
-		3E76876F156A90EE00EB6FA3 /* CDVLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E76876C156A90EE00EB6FA3 /* CDVLogger.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8852C43A14B65FD800F0E735 /* CDVViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 8852C43614B65FD800F0E735 /* CDVViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8852C43C14B65FD800F0E735 /* CDVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8852C43714B65FD800F0E735 /* CDVViewController.m */; };
-		8852C43F14B65FD800F0E735 /* CDVCordovaView.h in Headers */ = {isa = PBXBuildFile; fileRef = 8852C43814B65FD800F0E735 /* CDVCordovaView.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8852C44114B65FD800F0E735 /* CDVCordovaView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8852C43914B65FD800F0E735 /* CDVCordovaView.m */; };
-		8887FD661090FBE7009987E8 /* CDVCamera.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD261090FBE7009987E8 /* CDVCamera.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD671090FBE7009987E8 /* CDVCamera.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD271090FBE7009987E8 /* CDVCamera.m */; };
-		8887FD681090FBE7009987E8 /* NSDictionary+Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD691090FBE7009987E8 /* NSDictionary+Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD291090FBE7009987E8 /* NSDictionary+Extensions.m */; };
-		8887FD6A1090FBE7009987E8 /* CDVContacts.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD2A1090FBE7009987E8 /* CDVContacts.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD6B1090FBE7009987E8 /* CDVContacts.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD2B1090FBE7009987E8 /* CDVContacts.m */; };
-		8887FD6C1090FBE7009987E8 /* CDVDebugConsole.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD2C1090FBE7009987E8 /* CDVDebugConsole.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD6D1090FBE7009987E8 /* CDVDebugConsole.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD2D1090FBE7009987E8 /* CDVDebugConsole.m */; };
-		8887FD701090FBE7009987E8 /* CDVFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD301090FBE7009987E8 /* CDVFile.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD711090FBE7009987E8 /* CDVFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD311090FBE7009987E8 /* CDVFile.m */; };
-		8887FD741090FBE7009987E8 /* CDVInvokedUrlCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD751090FBE7009987E8 /* CDVInvokedUrlCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */; };
-		8887FD851090FBE7009987E8 /* CDVLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD461090FBE7009987E8 /* CDVLocation.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD861090FBE7009987E8 /* CDVLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD471090FBE7009987E8 /* CDVLocation.m */; };
-		8887FD8D1090FBE7009987E8 /* CDVNotification.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD4E1090FBE7009987E8 /* CDVNotification.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD8E1090FBE7009987E8 /* CDVNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD4F1090FBE7009987E8 /* CDVNotification.m */; };
-		8887FD8F1090FBE7009987E8 /* NSData+Base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD501090FBE7009987E8 /* NSData+Base64.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD901090FBE7009987E8 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD511090FBE7009987E8 /* NSData+Base64.m */; };
-		8887FD9D1090FBE7009987E8 /* CDVReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD5E1090FBE7009987E8 /* CDVReachability.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD9E1090FBE7009987E8 /* CDVReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD5F1090FBE7009987E8 /* CDVReachability.m */; };
-		8887FD9F1090FBE7009987E8 /* CDVSound.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD601090FBE7009987E8 /* CDVSound.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FDA01090FBE7009987E8 /* CDVSound.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD611090FBE7009987E8 /* CDVSound.m */; };
-		88BA573D109BB46F00FB5E78 /* CDVAccelerometer.h in Headers */ = {isa = PBXBuildFile; fileRef = 88BA573B109BB46F00FB5E78 /* CDVAccelerometer.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		88BA573E109BB46F00FB5E78 /* CDVAccelerometer.m in Sources */ = {isa = PBXBuildFile; fileRef = 88BA573C109BB46F00FB5E78 /* CDVAccelerometer.m */; };
-		9D76CF3C1625A4C50008A0F6 /* CDVGlobalization.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D76CF3A1625A4C50008A0F6 /* CDVGlobalization.h */; };
-		9D76CF3D1625A4C50008A0F6 /* CDVGlobalization.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D76CF3B1625A4C50008A0F6 /* CDVGlobalization.m */; };
-		C937A4561337599E002C4C79 /* CDVFileTransfer.h in Headers */ = {isa = PBXBuildFile; fileRef = C937A4541337599E002C4C79 /* CDVFileTransfer.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		C937A4571337599E002C4C79 /* CDVFileTransfer.m in Sources */ = {isa = PBXBuildFile; fileRef = C937A4551337599E002C4C79 /* CDVFileTransfer.m */; };
-		EB3B3547161CB44D003DBE7D /* CDVCommandQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */; };
-		EB3B3548161CB44D003DBE7D /* CDVCommandQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */; };
-		EB3B357C161F2A45003DBE7D /* CDVCommandDelegateImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */; };
-		EB3B357D161F2A45003DBE7D /* CDVCommandDelegateImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */; };
-		EB80C2AC15DEA63D004D9E7B /* CDVEcho.h in Headers */ = {isa = PBXBuildFile; fileRef = EB80C2AA15DEA63D004D9E7B /* CDVEcho.h */; };
-		EB80C2AD15DEA63D004D9E7B /* CDVEcho.m in Sources */ = {isa = PBXBuildFile; fileRef = EB80C2AB15DEA63D004D9E7B /* CDVEcho.m */; };
-		EBA3557315ABD38C00F4DE24 /* NSArray+Comparisons.h in Headers */ = {isa = PBXBuildFile; fileRef = EBA3557115ABD38C00F4DE24 /* NSArray+Comparisons.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		EBA3557515ABD38C00F4DE24 /* NSArray+Comparisons.m in Sources */ = {isa = PBXBuildFile; fileRef = EBA3557215ABD38C00F4DE24 /* NSArray+Comparisons.m */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
-		1F2BECBE13F9785B00A93BF6 /* CDVBattery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVBattery.h; path = Classes/CDVBattery.h; sourceTree = "<group>"; };
-		1F2BECBF13F9785B00A93BF6 /* CDVBattery.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVBattery.m; path = Classes/CDVBattery.m; sourceTree = "<group>"; };
-		1F3C04CC12BC247D004F9E10 /* CDVContact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVContact.h; path = Classes/CDVContact.h; sourceTree = "<group>"; };
-		1F3C04CD12BC247D004F9E10 /* CDVContact.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVContact.m; path = Classes/CDVContact.m; sourceTree = "<group>"; };
-		1F584B991385A28900ED25E8 /* CDVCapture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCapture.h; path = Classes/CDVCapture.h; sourceTree = "<group>"; };
-		1F584B9A1385A28900ED25E8 /* CDVCapture.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCapture.m; path = Classes/CDVCapture.m; sourceTree = "<group>"; };
-		1F92F49E1314023E0046367C /* CDVPluginResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVPluginResult.h; path = Classes/CDVPluginResult.h; sourceTree = "<group>"; };
-		1F92F49F1314023E0046367C /* CDVPluginResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVPluginResult.m; path = Classes/CDVPluginResult.m; sourceTree = "<group>"; };
-		301F2F2914F3C9CA003FE9FC /* CDV.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDV.h; path = Classes/CDV.h; sourceTree = "<group>"; };
-		302965BB13A94E9D007046C5 /* CDVDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDebug.h; path = Classes/CDVDebug.h; sourceTree = "<group>"; };
-		30325A0B136B343700982B63 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
-		3034979A1513D56A0090E688 /* CDVLocalStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLocalStorage.h; path = Classes/CDVLocalStorage.h; sourceTree = "<group>"; };
-		3034979B1513D56A0090E688 /* CDVLocalStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLocalStorage.m; path = Classes/CDVLocalStorage.m; sourceTree = "<group>"; };
-		30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVAvailability.h; path = Classes/CDVAvailability.h; sourceTree = "<group>"; };
-		3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIDevice+Extensions.h"; path = "Classes/UIDevice+Extensions.h"; sourceTree = "<group>"; };
-		3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIDevice+Extensions.m"; path = "Classes/UIDevice+Extensions.m"; sourceTree = "<group>"; };
-		307A8F9C1385A2EC00E43782 /* CDVConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVConnection.h; path = Classes/CDVConnection.h; sourceTree = "<group>"; };
-		307A8F9D1385A2EC00E43782 /* CDVConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVConnection.m; path = Classes/CDVConnection.m; sourceTree = "<group>"; };
-		30A90B8F14588697006178D3 /* JSONKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONKit.h; sourceTree = "<group>"; };
-		30A90B9014588697006178D3 /* JSONKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONKit.m; sourceTree = "<group>"; };
-		30B39EBC13D0268B0009682A /* CDVSplashScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVSplashScreen.h; path = Classes/CDVSplashScreen.h; sourceTree = "<group>"; };
-		30B39EBD13D0268B0009682A /* CDVSplashScreen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVSplashScreen.m; path = Classes/CDVSplashScreen.m; sourceTree = "<group>"; };
-		30C5F1DD15AF9E950052A00D /* CDVDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDevice.h; path = Classes/CDVDevice.h; sourceTree = "<group>"; };
-		30C5F1DE15AF9E950052A00D /* CDVDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVDevice.m; path = Classes/CDVDevice.m; sourceTree = "<group>"; };
-		30C6847E1406CB38004C1A8E /* CDVWhitelist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVWhitelist.h; path = Classes/CDVWhitelist.h; sourceTree = "<group>"; };
-		30C6847F1406CB38004C1A8E /* CDVWhitelist.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVWhitelist.m; path = Classes/CDVWhitelist.m; sourceTree = "<group>"; };
-		30C684921407044A004C1A8E /* CDVURLProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVURLProtocol.h; path = Classes/CDVURLProtocol.h; sourceTree = "<group>"; };
-		30C684931407044A004C1A8E /* CDVURLProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVURLProtocol.m; path = Classes/CDVURLProtocol.m; sourceTree = "<group>"; };
-		30E33AF013A7E24B00594D64 /* CDVPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVPlugin.h; path = Classes/CDVPlugin.h; sourceTree = "<group>"; };
-		30E33AF113A7E24B00594D64 /* CDVPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVPlugin.m; path = Classes/CDVPlugin.m; sourceTree = "<group>"; };
-		30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSMutableArray+QueueAdditions.h"; path = "Classes/NSMutableArray+QueueAdditions.h"; sourceTree = "<group>"; };
-		30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSMutableArray+QueueAdditions.m"; path = "Classes/NSMutableArray+QueueAdditions.m"; sourceTree = "<group>"; };
-		30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandDelegate.h; path = Classes/CDVCommandDelegate.h; sourceTree = "<group>"; };
-		3E76876B156A90EE00EB6FA3 /* CDVLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLogger.m; path = Classes/CDVLogger.m; sourceTree = "<group>"; };
-		3E76876C156A90EE00EB6FA3 /* CDVLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLogger.h; path = Classes/CDVLogger.h; sourceTree = "<group>"; };
-		686357AA141002F100DF4CF2 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
-		686357AC141002F100DF4CF2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-		686357AE141002F100DF4CF2 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
-		686357CC14100AAD00DF4CF2 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
-		686357CE14100ADA00DF4CF2 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
-		686357CF14100ADB00DF4CF2 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
-		686357D014100ADE00DF4CF2 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
-		686357D214100AE700DF4CF2 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
-		686357D414100AF200DF4CF2 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
-		686357DC14100B1600DF4CF2 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
-		68A32D7114102E1C006B237C /* libCordova.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCordova.a; sourceTree = BUILT_PRODUCTS_DIR; };
-		68A32D7414103017006B237C /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
-		8852C43614B65FD800F0E735 /* CDVViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVViewController.h; path = Classes/CDVViewController.h; sourceTree = "<group>"; };
-		8852C43714B65FD800F0E735 /* CDVViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVViewController.m; path = Classes/CDVViewController.m; sourceTree = "<group>"; };
-		8852C43814B65FD800F0E735 /* CDVCordovaView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCordovaView.h; path = Classes/CDVCordovaView.h; sourceTree = "<group>"; };
-		8852C43914B65FD800F0E735 /* CDVCordovaView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCordovaView.m; path = Classes/CDVCordovaView.m; sourceTree = "<group>"; };
-		8887FD261090FBE7009987E8 /* CDVCamera.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCamera.h; path = Classes/CDVCamera.h; sourceTree = "<group>"; };
-		8887FD271090FBE7009987E8 /* CDVCamera.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCamera.m; path = Classes/CDVCamera.m; sourceTree = "<group>"; };
-		8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+Extensions.h"; path = "Classes/NSDictionary+Extensions.h"; sourceTree = "<group>"; };
-		8887FD291090FBE7009987E8 /* NSDictionary+Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+Extensions.m"; path = "Classes/NSDictionary+Extensions.m"; sourceTree = "<group>"; };
-		8887FD2A1090FBE7009987E8 /* CDVContacts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVContacts.h; path = Classes/CDVContacts.h; sourceTree = "<group>"; };
-		8887FD2B1090FBE7009987E8 /* CDVContacts.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVContacts.m; path = Classes/CDVContacts.m; sourceTree = "<group>"; };
-		8887FD2C1090FBE7009987E8 /* CDVDebugConsole.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDebugConsole.h; path = Classes/CDVDebugConsole.h; sourceTree = "<group>"; };
-		8887FD2D1090FBE7009987E8 /* CDVDebugConsole.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVDebugConsole.m; path = Classes/CDVDebugConsole.m; sourceTree = "<group>"; };
-		8887FD301090FBE7009987E8 /* CDVFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVFile.h; path = Classes/CDVFile.h; sourceTree = "<group>"; };
-		8887FD311090FBE7009987E8 /* CDVFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVFile.m; path = Classes/CDVFile.m; sourceTree = "<group>"; };
-		8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVInvokedUrlCommand.h; path = Classes/CDVInvokedUrlCommand.h; sourceTree = "<group>"; };
-		8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVInvokedUrlCommand.m; path = Classes/CDVInvokedUrlCommand.m; sourceTree = "<group>"; };
-		8887FD461090FBE7009987E8 /* CDVLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLocation.h; path = Classes/CDVLocation.h; sourceTree = "<group>"; };
-		8887FD471090FBE7009987E8 /* CDVLocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLocation.m; path = Classes/CDVLocation.m; sourceTree = "<group>"; };
-		8887FD4E1090FBE7009987E8 /* CDVNotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVNotification.h; path = Classes/CDVNotification.h; sourceTree = "<group>"; };
-		8887FD4F1090FBE7009987E8 /* CDVNotification.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVNotification.m; path = Classes/CDVNotification.m; sourceTree = "<group>"; };
-		8887FD501090FBE7009987E8 /* NSData+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSData+Base64.h"; path = "Classes/NSData+Base64.h"; sourceTree = "<group>"; };
-		8887FD511090FBE7009987E8 /* NSData+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSData+Base64.m"; path = "Classes/NSData+Base64.m"; sourceTree = "<group>"; };
-		8887FD5E1090FBE7009987E8 /* CDVReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVReachability.h; path = Classes/CDVReachability.h; sourceTree = "<group>"; };
-		8887FD5F1090FBE7009987E8 /* CDVReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVReachability.m; path = Classes/CDVReachability.m; sourceTree = "<group>"; };
-		8887FD601090FBE7009987E8 /* CDVSound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVSound.h; path = Classes/CDVSound.h; sourceTree = "<group>"; };
-		8887FD611090FBE7009987E8 /* CDVSound.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVSound.m; path = Classes/CDVSound.m; sourceTree = "<group>"; };
-		88BA573B109BB46F00FB5E78 /* CDVAccelerometer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVAccelerometer.h; path = Classes/CDVAccelerometer.h; sourceTree = "<group>"; };
-		88BA573C109BB46F00FB5E78 /* CDVAccelerometer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVAccelerometer.m; path = Classes/CDVAccelerometer.m; sourceTree = "<group>"; };
-		9D76CF3A1625A4C50008A0F6 /* CDVGlobalization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVGlobalization.h; path = Classes/CDVGlobalization.h; sourceTree = "<group>"; };
-		9D76CF3B1625A4C50008A0F6 /* CDVGlobalization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVGlobalization.m; path = Classes/CDVGlobalization.m; sourceTree = "<group>"; };
-		AA747D9E0F9514B9006C5449 /* CordovaLib_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CordovaLib_Prefix.pch; sourceTree = SOURCE_ROOT; };
-		C937A4541337599E002C4C79 /* CDVFileTransfer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVFileTransfer.h; path = Classes/CDVFileTransfer.h; sourceTree = "<group>"; };
-		C937A4551337599E002C4C79 /* CDVFileTransfer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVFileTransfer.m; path = Classes/CDVFileTransfer.m; sourceTree = "<group>"; };
-		EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandQueue.h; path = Classes/CDVCommandQueue.h; sourceTree = "<group>"; };
-		EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCommandQueue.m; path = Classes/CDVCommandQueue.m; sourceTree = "<group>"; };
-		EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandDelegateImpl.h; path = Classes/CDVCommandDelegateImpl.h; sourceTree = "<group>"; };
-		EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCommandDelegateImpl.m; path = Classes/CDVCommandDelegateImpl.m; sourceTree = "<group>"; };
-		EB80C2AA15DEA63D004D9E7B /* CDVEcho.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVEcho.h; path = Classes/CDVEcho.h; sourceTree = "<group>"; };
-		EB80C2AB15DEA63D004D9E7B /* CDVEcho.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVEcho.m; path = Classes/CDVEcho.m; sourceTree = "<group>"; };
-		EBA3557115ABD38C00F4DE24 /* NSArray+Comparisons.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSArray+Comparisons.h"; path = "Classes/NSArray+Comparisons.h"; sourceTree = "<group>"; };
-		EBA3557215ABD38C00F4DE24 /* NSArray+Comparisons.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSArray+Comparisons.m"; path = "Classes/NSArray+Comparisons.m"; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		D2AAC07C0554694100DB518D /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		034768DFFF38A50411DB9C8B /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				68A32D7114102E1C006B237C /* libCordova.a */,
-			);
-			name = Products;
-			sourceTree = CORDOVALIB;
-		};
-		0867D691FE84028FC02AAC07 /* CordovaLib */ = {
-			isa = PBXGroup;
-			children = (
-				8887FD101090FB43009987E8 /* Classes */,
-				32C88DFF0371C24200C91783 /* Other Sources */,
-				0867D69AFE84028FC02AAC07 /* Frameworks */,
-				034768DFFF38A50411DB9C8B /* Products */,
-				30325A0B136B343700982B63 /* VERSION */,
-			);
-			name = CordovaLib;
-			sourceTree = "<group>";
-		};
-		0867D69AFE84028FC02AAC07 /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				68A32D7414103017006B237C /* AddressBook.framework */,
-				686357DC14100B1600DF4CF2 /* CoreMedia.framework */,
-				686357CE14100ADA00DF4CF2 /* AudioToolbox.framework */,
-				686357CF14100ADB00DF4CF2 /* AVFoundation.framework */,
-				686357D014100ADE00DF4CF2 /* CoreLocation.framework */,
-				686357D214100AE700DF4CF2 /* MobileCoreServices.framework */,
-				686357D414100AF200DF4CF2 /* SystemConfiguration.framework */,
-				686357CC14100AAD00DF4CF2 /* AddressBookUI.framework */,
-				686357AA141002F100DF4CF2 /* UIKit.framework */,
-				686357AC141002F100DF4CF2 /* Foundation.framework */,
-				686357AE141002F100DF4CF2 /* CoreGraphics.framework */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
-		3054098714B77FF3009841CA /* Cleaver */ = {
-			isa = PBXGroup;
-			children = (
-				8852C43614B65FD800F0E735 /* CDVViewController.h */,
-				8852C43714B65FD800F0E735 /* CDVViewController.m */,
-				8852C43814B65FD800F0E735 /* CDVCordovaView.h */,
-				8852C43914B65FD800F0E735 /* CDVCordovaView.m */,
-				EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */,
-				EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */,
-			);
-			name = Cleaver;
-			sourceTree = "<group>";
-		};
-		32C88DFF0371C24200C91783 /* Other Sources */ = {
-			isa = PBXGroup;
-			children = (
-				AA747D9E0F9514B9006C5449 /* CordovaLib_Prefix.pch */,
-			);
-			name = "Other Sources";
-			sourceTree = "<group>";
-		};
-		888700D710922F56009987E8 /* Commands */ = {
-			isa = PBXGroup;
-			children = (
-				30C5F1DD15AF9E950052A00D /* CDVDevice.h */,
-				30C5F1DE15AF9E950052A00D /* CDVDevice.m */,
-				301F2F2914F3C9CA003FE9FC /* CDV.h */,
-				3034979A1513D56A0090E688 /* CDVLocalStorage.h */,
-				3034979B1513D56A0090E688 /* CDVLocalStorage.m */,
-				30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */,
-				30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */,
-				EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */,
-				EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */,
-				30C684921407044A004C1A8E /* CDVURLProtocol.h */,
-				30C684931407044A004C1A8E /* CDVURLProtocol.m */,
-				30C6847E1406CB38004C1A8E /* CDVWhitelist.h */,
-				30C6847F1406CB38004C1A8E /* CDVWhitelist.m */,
-				1F2BECBE13F9785B00A93BF6 /* CDVBattery.h */,
-				1F2BECBF13F9785B00A93BF6 /* CDVBattery.m */,
-				30B39EBC13D0268B0009682A /* CDVSplashScreen.h */,
-				30B39EBD13D0268B0009682A /* CDVSplashScreen.m */,
-				30E33AF013A7E24B00594D64 /* CDVPlugin.h */,
-				30E33AF113A7E24B00594D64 /* CDVPlugin.m */,
-				307A8F9C1385A2EC00E43782 /* CDVConnection.h */,
-				307A8F9D1385A2EC00E43782 /* CDVConnection.m */,
-				1F92F49E1314023E0046367C /* CDVPluginResult.h */,
-				1F92F49F1314023E0046367C /* CDVPluginResult.m */,
-				88BA573B109BB46F00FB5E78 /* CDVAccelerometer.h */,
-				88BA573C109BB46F00FB5E78 /* CDVAccelerometer.m */,
-				8887FD261090FBE7009987E8 /* CDVCamera.h */,
-				8887FD271090FBE7009987E8 /* CDVCamera.m */,
-				1F584B991385A28900ED25E8 /* CDVCapture.h */,
-				1F584B9A1385A28900ED25E8 /* CDVCapture.m */,
-				1F3C04CC12BC247D004F9E10 /* CDVContact.h */,
-				1F3C04CD12BC247D004F9E10 /* CDVContact.m */,
-				8887FD2A1090FBE7009987E8 /* CDVContacts.h */,
-				8887FD2B1090FBE7009987E8 /* CDVContacts.m */,
-				8887FD2C1090FBE7009987E8 /* CDVDebugConsole.h */,
-				8887FD2D1090FBE7009987E8 /* CDVDebugConsole.m */,
-				EB80C2AA15DEA63D004D9E7B /* CDVEcho.h */,
-				EB80C2AB15DEA63D004D9E7B /* CDVEcho.m */,
-				8887FD301090FBE7009987E8 /* CDVFile.h */,
-				8887FD311090FBE7009987E8 /* CDVFile.m */,
-				8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */,
-				8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */,
-				C937A4541337599E002C4C79 /* CDVFileTransfer.h */,
-				C937A4551337599E002C4C79 /* CDVFileTransfer.m */,
-				8887FD461090FBE7009987E8 /* CDVLocation.h */,
-				8887FD471090FBE7009987E8 /* CDVLocation.m */,
-				8887FD4E1090FBE7009987E8 /* CDVNotification.h */,
-				8887FD4F1090FBE7009987E8 /* CDVNotification.m */,
-				8887FD5E1090FBE7009987E8 /* CDVReachability.h */,
-				8887FD5F1090FBE7009987E8 /* CDVReachability.m */,
-				8887FD601090FBE7009987E8 /* CDVSound.h */,
-				8887FD611090FBE7009987E8 /* CDVSound.m */,
-				3E76876B156A90EE00EB6FA3 /* CDVLogger.m */,
-				3E76876C156A90EE00EB6FA3 /* CDVLogger.h */,
-				9D76CF3A1625A4C50008A0F6 /* CDVGlobalization.h */,
-				9D76CF3B1625A4C50008A0F6 /* CDVGlobalization.m */,
-			);
-			name = Commands;
-			sourceTree = "<group>";
-		};
-		888700D910923009009987E8 /* Util */ = {
-			isa = PBXGroup;
-			children = (
-				3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */,
-				3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */,
-				EBA3557115ABD38C00F4DE24 /* NSArray+Comparisons.h */,
-				EBA3557215ABD38C00F4DE24 /* NSArray+Comparisons.m */,
-				8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */,
-				8887FD291090FBE7009987E8 /* NSDictionary+Extensions.m */,
-				302965BB13A94E9D007046C5 /* CDVDebug.h */,
-				30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */,
-				30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */,
-				8887FD501090FBE7009987E8 /* NSData+Base64.h */,
-				8887FD511090FBE7009987E8 /* NSData+Base64.m */,
-			);
-			name = Util;
-			sourceTree = "<group>";
-		};
-		8887FD101090FB43009987E8 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-				3054098714B77FF3009841CA /* Cleaver */,
-				888700D710922F56009987E8 /* Commands */,
-				8887FD361090FBE7009987E8 /* JSON */,
-				888700D910923009009987E8 /* Util */,
-			);
-			name = Classes;
-			sourceTree = "<group>";
-		};
-		8887FD361090FBE7009987E8 /* JSON */ = {
-			isa = PBXGroup;
-			children = (
-				30A90B8F14588697006178D3 /* JSONKit.h */,
-				30A90B9014588697006178D3 /* JSONKit.m */,
-			);
-			name = JSON;
-			path = Classes/JSON;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXHeadersBuildPhase section */
-		D2AAC07A0554694100DB518D /* Headers */ = {
-			isa = PBXHeadersBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				8887FD661090FBE7009987E8 /* CDVCamera.h in Headers */,
-				8887FD681090FBE7009987E8 /* NSDictionary+Extensions.h in Headers */,
-				8887FD6A1090FBE7009987E8 /* CDVContacts.h in Headers */,
-				8887FD6C1090FBE7009987E8 /* CDVDebugConsole.h in Headers */,
-				8887FD701090FBE7009987E8 /* CDVFile.h in Headers */,
-				8887FD741090FBE7009987E8 /* CDVInvokedUrlCommand.h in Headers */,
-				8887FD851090FBE7009987E8 /* CDVLocation.h in Headers */,
-				8887FD8D1090FBE7009987E8 /* CDVNotification.h in Headers */,
-				8887FD8F1090FBE7009987E8 /* NSData+Base64.h in Headers */,
-				8887FD9D1090FBE7009987E8 /* CDVReachability.h in Headers */,
-				8887FD9F1090FBE7009987E8 /* CDVSound.h in Headers */,
-				88BA573D109BB46F00FB5E78 /* CDVAccelerometer.h in Headers */,
-				1F3C04CE12BC247D004F9E10 /* CDVContact.h in Headers */,
-				1F92F4A01314023E0046367C /* CDVPluginResult.h in Headers */,
-				C937A4561337599E002C4C79 /* CDVFileTransfer.h in Headers */,
-				307A8F9E1385A2EC00E43782 /* CDVConnection.h in Headers */,
-				1F584B9B1385A28A00ED25E8 /* CDVCapture.h in Headers */,
-				30E33AF213A7E24B00594D64 /* CDVPlugin.h in Headers */,
-				302965BC13A94E9D007046C5 /* CDVDebug.h in Headers */,
-				30B39EBE13D0268B0009682A /* CDVSplashScreen.h in Headers */,
-				30E563CF13E217EC00C949AA /* NSMutableArray+QueueAdditions.h in Headers */,
-				1F2BECC013F9785B00A93BF6 /* CDVBattery.h in Headers */,
-				30C684801406CB38004C1A8E /* CDVWhitelist.h in Headers */,
-				30C684941407044B004C1A8E /* CDVURLProtocol.h in Headers */,
-				30A90B9114588697006178D3 /* JSONKit.h in Headers */,
-				8852C43A14B65FD800F0E735 /* CDVViewController.h in Headers */,
-				8852C43F14B65FD800F0E735 /* CDVCordovaView.h in Headers */,
-				30F5EBAB14CA26E700987760 /* CDVCommandDelegate.h in Headers */,
-				301F2F2A14F3C9CA003FE9FC /* CDV.h in Headers */,
-				30392E4E14F4FCAB00B9E0B8 /* CDVAvailability.h in Headers */,
-				3034979C1513D56A0090E688 /* CDVLocalStorage.h in Headers */,
-				3062D120151D0EDB000D9128 /* UIDevice+Extensions.h in Headers */,
-				3E76876F156A90EE00EB6FA3 /* CDVLogger.h in Headers */,
-				EBA3557315ABD38C00F4DE24 /* NSArray+Comparisons.h in Headers */,
-				30C5F1DF15AF9E950052A00D /* CDVDevice.h in Headers */,
-				EB80C2AC15DEA63D004D9E7B /* CDVEcho.h in Headers */,
-				EB3B3547161CB44D003DBE7D /* CDVCommandQueue.h in Headers */,
-				EB3B357C161F2A45003DBE7D /* CDVCommandDelegateImpl.h in Headers */,
-				9D76CF3C1625A4C50008A0F6 /* CDVGlobalization.h in Headers */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXHeadersBuildPhase section */
-
-/* Begin PBXNativeTarget section */
-		D2AAC07D0554694100DB518D /* CordovaLib */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CordovaLib" */;
-			buildPhases = (
-				D2AAC07A0554694100DB518D /* Headers */,
-				D2AAC07B0554694100DB518D /* Sources */,
-				D2AAC07C0554694100DB518D /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = CordovaLib;
-			productName = CordovaLib;
-			productReference = 68A32D7114102E1C006B237C /* libCordova.a */;
-			productType = "com.apple.product-type.library.static";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		0867D690FE84028FC02AAC07 /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastUpgradeCheck = 0430;
-			};
-			buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CordovaLib" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 1;
-			knownRegions = (
-				English,
-				Japanese,
-				French,
-				German,
-				en,
-			);
-			mainGroup = 0867D691FE84028FC02AAC07 /* CordovaLib */;
-			productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				D2AAC07D0554694100DB518D /* CordovaLib */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXSourcesBuildPhase section */
-		D2AAC07B0554694100DB518D /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				8887FD671090FBE7009987E8 /* CDVCamera.m in Sources */,
-				8887FD691090FBE7009987E8 /* NSDictionary+Extensions.m in Sources */,
-				8887FD6B1090FBE7009987E8 /* CDVContacts.m in Sources */,
-				8887FD6D1090FBE7009987E8 /* CDVDebugConsole.m in Sources */,
-				8887FD711090FBE7009987E8 /* CDVFile.m in Sources */,
-				8887FD751090FBE7009987E8 /* CDVInvokedUrlCommand.m in Sources */,
-				8887FD861090FBE7009987E8 /* CDVLocation.m in Sources */,
-				8887FD8E1090FBE7009987E8 /* CDVNotification.m in Sources */,
-				8887FD901090FBE7009987E8 /* NSData+Base64.m in Sources */,
-				8887FD9E1090FBE7009987E8 /* CDVReachability.m in Sources */,
-				8887FDA01090FBE7009987E8 /* CDVSound.m in Sources */,
-				88BA573E109BB46F00FB5E78 /* CDVAccelerometer.m in Sources */,
-				1F3C04CF12BC247D004F9E10 /* CDVContact.m in Sources */,
-				1F92F4A11314023E0046367C /* CDVPluginResult.m in Sources */,
-				C937A4571337599E002C4C79 /* CDVFileTransfer.m in Sources */,
-				307A8F9F1385A2EC00E43782 /* CDVConnection.m in Sources */,
-				1F584B9C1385A28A00ED25E8 /* CDVCapture.m in Sources */,
-				30E33AF313A7E24B00594D64 /* CDVPlugin.m in Sources */,
-				30B39EBF13D0268B0009682A /* CDVSplashScreen.m in Sources */,
-				30E563D013E217EC00C949AA /* NSMutableArray+QueueAdditions.m in Sources */,
-				1F2BECC113F9785B00A93BF6 /* CDVBattery.m in Sources */,
-				30C684821406CB38004C1A8E /* CDVWhitelist.m in Sources */,
-				30C684961407044B004C1A8E /* CDVURLProtocol.m in Sources */,
-				30A90B9314588697006178D3 /* JSONKit.m in Sources */,
-				8852C43C14B65FD800F0E735 /* CDVViewController.m in Sources */,
-				8852C44114B65FD800F0E735 /* CDVCordovaView.m in Sources */,
-				3034979E1513D56A0090E688 /* CDVLocalStorage.m in Sources */,
-				3062D122151D0EDB000D9128 /* UIDevice+Extensions.m in Sources */,
-				3E76876D156A90EE00EB6FA3 /* CDVLogger.m in Sources */,
-				EBA3557515ABD38C00F4DE24 /* NSArray+Comparisons.m in Sources */,
-				30C5F1E015AF9E950052A00D /* CDVDevice.m in Sources */,
-				EB80C2AD15DEA63D004D9E7B /* CDVEcho.m in Sources */,
-				EB3B3548161CB44D003DBE7D /* CDVCommandQueue.m in Sources */,
-				EB3B357D161F2A45003DBE7D /* CDVCommandDelegateImpl.m in Sources */,
-				9D76CF3D1625A4C50008A0F6 /* CDVGlobalization.m in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
-		1DEB921F08733DC00010E9CD /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				"ARCHS[sdk=iphoneos*]" = (
-					armv6,
-					armv7,
-				);
-				"ARCHS[sdk=iphoneos6.*]" = (
-					armv7,
-					armv7s,
-				);
-				"ARCHS[sdk=iphonesimulator*]" = i386;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				COPY_PHASE_STRIP = NO;
-				DSTROOT = "/tmp/$(PROJECT_NAME).dst";
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = CordovaLib_Prefix.pch;
-				GCC_PREPROCESSOR_DEFINITIONS = "";
-				GCC_THUMB_SUPPORT = NO;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				INSTALL_PATH = /usr/local/lib;
-				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
-				PRODUCT_NAME = Cordova;
-				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
-				SKIP_INSTALL = YES;
-			};
-			name = Debug;
-		};
-		1DEB922008733DC00010E9CD /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				"ARCHS[sdk=iphoneos*]" = (
-					armv6,
-					armv7,
-				);
-				"ARCHS[sdk=iphoneos6.*]" = (
-					armv7,
-					armv7s,
-				);
-				"ARCHS[sdk=iphonesimulator*]" = i386;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				DSTROOT = "/tmp/$(PROJECT_NAME).dst";
-				GCC_MODEL_TUNING = G5;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = CordovaLib_Prefix.pch;
-				GCC_PREPROCESSOR_DEFINITIONS = "";
-				GCC_THUMB_SUPPORT = NO;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				INSTALL_PATH = /usr/local/lib;
-				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
-				PRODUCT_NAME = Cordova;
-				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
-				SKIP_INSTALL = YES;
-			};
-			name = Release;
-		};
-		1DEB922308733DC00010E9CD /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				"ARCHS[sdk=iphoneos*]" = (
-					armv6,
-					armv7,
-				);
-				"ARCHS[sdk=iphoneos6.*]" = (
-					armv7,
-					armv7s,
-				);
-				"ARCHS[sdk=iphonesimulator*]" = i386;
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = "";
-				GCC_THUMB_SUPPORT = NO;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
-				ONLY_ACTIVE_ARCH = NO;
-				OTHER_CFLAGS = "-DDEBUG";
-				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
-				SDKROOT = iphoneos;
-				SKIP_INSTALL = YES;
-				TARGETED_DEVICE_FAMILY = "1,2";
-				USER_HEADER_SEARCH_PATHS = "";
-				VALID_ARCHS = "i386 armv6 armv7 armv7s";
-			};
-			name = Debug;
-		};
-		1DEB922408733DC00010E9CD /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				"ARCHS[sdk=iphoneos*]" = (
-					armv6,
-					armv7,
-				);
-				"ARCHS[sdk=iphoneos6.*]" = (
-					armv7,
-					armv7s,
-				);
-				"ARCHS[sdk=iphonesimulator*]" = i386;
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_PREPROCESSOR_DEFINITIONS = "";
-				GCC_THUMB_SUPPORT = NO;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
-				ONLY_ACTIVE_ARCH = NO;
-				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
-				SDKROOT = iphoneos;
-				SKIP_INSTALL = YES;
-				TARGETED_DEVICE_FAMILY = "1,2";
-				VALID_ARCHS = "i386 armv6 armv7 armv7s";
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CordovaLib" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				1DEB921F08733DC00010E9CD /* Debug */,
-				1DEB922008733DC00010E9CD /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CordovaLib" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				1DEB922308733DC00010E9CD /* Debug */,
-				1DEB922408733DC00010E9CD /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
-}


[05/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/windows8/www/cordova-2.6.0.js
----------------------------------------------------------------------
diff --git a/spec/projects/windows8/www/cordova-2.6.0.js b/spec/projects/windows8/www/cordova-2.6.0.js
deleted file mode 100644
index 2fedaa6..0000000
--- a/spec/projects/windows8/www/cordova-2.6.0.js
+++ /dev/null
@@ -1,8075 +0,0 @@
-// Platform: windows8
-
-// commit 125dca530923a44a8f44f68f5e1970cbdd4e7faf
-
-// File generated at :: Wed Apr 03 2013 13:20:16 GMT-0700 (Pacific Daylight Time)
-
-/*
- 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.
-*/
-
-;(function() {
-
-// file: lib\scripts\require.js
-
-var require,
-    define;
-
-(function () {
-    var modules = {};
-    // Stack of moduleIds currently being built.
-    var requireStack = [];
-    // Map of module ID -> index into requireStack of modules currently being built.
-    var inProgressModules = {};
-
-    function build(module) {
-        var factory = module.factory;
-        module.exports = {};
-        delete module.factory;
-        factory(require, module.exports, module);
-        return module.exports;
-    }
-
-    require = function (id) {
-        if (!modules[id]) {
-            throw "module " + id + " not found";
-        } else if (id in inProgressModules) {
-            var cycle = requireStack.slice(inProgressModules[id]).join('->') + '->' + id;
-            throw "Cycle in require graph: " + cycle;
-        }
-        if (modules[id].factory) {
-            try {
-                inProgressModules[id] = requireStack.length;
-                requireStack.push(id);
-                return build(modules[id]);
-            } finally {
-                delete inProgressModules[id];
-                requireStack.pop();
-            }
-        }
-        return modules[id].exports;
-    };
-
-    define = function (id, factory) {
-        if (modules[id]) {
-            throw "module " + id + " already defined";
-        }
-
-        modules[id] = {
-            id: id,
-            factory: factory
-        };
-    };
-
-    define.remove = function (id) {
-        delete modules[id];
-    };
-
-    define.moduleMap = modules;
-})();
-
-//Export for use in node
-if (typeof module === "object" && typeof require === "function") {
-    module.exports.require = require;
-    module.exports.define = define;
-}
-
-// file: lib/cordova.js
-define("cordova", function(require, exports, module) {
-
-
-var channel = require('cordova/channel');
-
-/**
- * Listen for DOMContentLoaded and notify our channel subscribers.
- */
-document.addEventListener('DOMContentLoaded', function() {
-    channel.onDOMContentLoaded.fire();
-}, false);
-if (document.readyState == 'complete' || document.readyState == 'interactive') {
-    channel.onDOMContentLoaded.fire();
-}
-
-/**
- * Intercept calls to addEventListener + removeEventListener and handle deviceready,
- * resume, and pause events.
- */
-var m_document_addEventListener = document.addEventListener;
-var m_document_removeEventListener = document.removeEventListener;
-var m_window_addEventListener = window.addEventListener;
-var m_window_removeEventListener = window.removeEventListener;
-
-/**
- * Houses custom event handlers to intercept on document + window event listeners.
- */
-var documentEventHandlers = {},
-    windowEventHandlers = {};
-
-document.addEventListener = function(evt, handler, capture) {
-    var e = evt.toLowerCase();
-    if (typeof documentEventHandlers[e] != 'undefined') {
-        documentEventHandlers[e].subscribe(handler);
-    } else {
-        m_document_addEventListener.call(document, evt, handler, capture);
-    }
-};
-
-window.addEventListener = function(evt, handler, capture) {
-    var e = evt.toLowerCase();
-    if (typeof windowEventHandlers[e] != 'undefined') {
-        windowEventHandlers[e].subscribe(handler);
-    } else {
-        m_window_addEventListener.call(window, evt, handler, capture);
-    }
-};
-
-document.removeEventListener = function(evt, handler, capture) {
-    var e = evt.toLowerCase();
-    // If unsubscribing from an event that is handled by a plugin
-    if (typeof documentEventHandlers[e] != "undefined") {
-        documentEventHandlers[e].unsubscribe(handler);
-    } else {
-        m_document_removeEventListener.call(document, evt, handler, capture);
-    }
-};
-
-window.removeEventListener = function(evt, handler, capture) {
-    var e = evt.toLowerCase();
-    // If unsubscribing from an event that is handled by a plugin
-    if (typeof windowEventHandlers[e] != "undefined") {
-        windowEventHandlers[e].unsubscribe(handler);
-    } else {
-        m_window_removeEventListener.call(window, evt, handler, capture);
-    }
-};
-
-function createEvent(type, data) {
-    var event = document.createEvent('Events');
-    event.initEvent(type, false, false);
-    if (data) {
-        for (var i in data) {
-            if (data.hasOwnProperty(i)) {
-                event[i] = data[i];
-            }
-        }
-    }
-    return event;
-}
-
-if(typeof window.console === "undefined") {
-    window.console = {
-        log:function(){}
-    };
-}
-
-var cordova = {
-    define:define,
-    require:require,
-    /**
-     * Methods to add/remove your own addEventListener hijacking on document + window.
-     */
-    addWindowEventHandler:function(event) {
-        return (windowEventHandlers[event] = channel.create(event));
-    },
-    addStickyDocumentEventHandler:function(event) {
-        return (documentEventHandlers[event] = channel.createSticky(event));
-    },
-    addDocumentEventHandler:function(event) {
-        return (documentEventHandlers[event] = channel.create(event));
-    },
-    removeWindowEventHandler:function(event) {
-        delete windowEventHandlers[event];
-    },
-    removeDocumentEventHandler:function(event) {
-        delete documentEventHandlers[event];
-    },
-    /**
-     * Retrieve original event handlers that were replaced by Cordova
-     *
-     * @return object
-     */
-    getOriginalHandlers: function() {
-        return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener},
-        'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}};
-    },
-    /**
-     * Method to fire event from native code
-     * bNoDetach is required for events which cause an exception which needs to be caught in native code
-     */
-    fireDocumentEvent: function(type, data, bNoDetach) {
-        var evt = createEvent(type, data);
-        if (typeof documentEventHandlers[type] != 'undefined') {
-            if( bNoDetach ) {
-              documentEventHandlers[type].fire(evt);
-            }
-            else {
-              setTimeout(function() {
-                  documentEventHandlers[type].fire(evt);
-              }, 0);
-            }
-        } else {
-            document.dispatchEvent(evt);
-        }
-    },
-    fireWindowEvent: function(type, data) {
-        var evt = createEvent(type,data);
-        if (typeof windowEventHandlers[type] != 'undefined') {
-            setTimeout(function() {
-                windowEventHandlers[type].fire(evt);
-            }, 0);
-        } else {
-            window.dispatchEvent(evt);
-        }
-    },
-
-    /**
-     * Plugin callback mechanism.
-     */
-    // Randomize the starting callbackId to avoid collisions after refreshing or navigating.
-    // This way, it's very unlikely that any new callback would get the same callbackId as an old callback.
-    callbackId: Math.floor(Math.random() * 2000000000),
-    callbacks:  {},
-    callbackStatus: {
-        NO_RESULT: 0,
-        OK: 1,
-        CLASS_NOT_FOUND_EXCEPTION: 2,
-        ILLEGAL_ACCESS_EXCEPTION: 3,
-        INSTANTIATION_EXCEPTION: 4,
-        MALFORMED_URL_EXCEPTION: 5,
-        IO_EXCEPTION: 6,
-        INVALID_ACTION: 7,
-        JSON_EXCEPTION: 8,
-        ERROR: 9
-    },
-
-    /**
-     * Called by native code when returning successful result from an action.
-     */
-    callbackSuccess: function(callbackId, args) {
-        try {
-            cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback);
-        } catch (e) {
-            console.log("Error in error callback: " + callbackId + " = "+e);
-        }
-    },
-
-    /**
-     * Called by native code when returning error result from an action.
-     */
-    callbackError: function(callbackId, args) {
-        // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative.
-        // Derive success from status.
-        try {
-            cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback);
-        } catch (e) {
-            console.log("Error in error callback: " + callbackId + " = "+e);
-        }
-    },
-
-    /**
-     * Called by native code when returning the result from an action.
-     */
-    callbackFromNative: function(callbackId, success, status, args, keepCallback) {
-        var callback = cordova.callbacks[callbackId];
-        if (callback) {
-            if (success && status == cordova.callbackStatus.OK) {
-                callback.success && callback.success.apply(null, args);
-            } else if (!success) {
-                callback.fail && callback.fail.apply(null, args);
-            }
-
-            // Clear callback if not expecting any more results
-            if (!keepCallback) {
-                delete cordova.callbacks[callbackId];
-            }
-        }
-    },
-    addConstructor: function(func) {
-        channel.onCordovaReady.subscribe(function() {
-            try {
-                func();
-            } catch(e) {
-                console.log("Failed to run constructor: " + e);
-            }
-        });
-    }
-};
-
-// Register pause, resume and deviceready channels as events on document.
-channel.onPause = cordova.addDocumentEventHandler('pause');
-channel.onResume = cordova.addDocumentEventHandler('resume');
-channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');
-
-module.exports = cordova;
-
-});
-
-// file: lib\common\argscheck.js
-define("cordova/argscheck", function(require, exports, module) {
-
-var exec = require('cordova/exec');
-var utils = require('cordova/utils');
-
-var moduleExports = module.exports;
-
-var typeMap = {
-    'A': 'Array',
-    'D': 'Date',
-    'N': 'Number',
-    'S': 'String',
-    'F': 'Function',
-    'O': 'Object'
-};
-
-function extractParamName(callee, argIndex) {
-  return (/.*?\((.*?)\)/).exec(callee)[1].split(', ')[argIndex];
-}
-
-function checkArgs(spec, functionName, args, opt_callee) {
-    if (!moduleExports.enableChecks) {
-        return;
-    }
-    var errMsg = null;
-    var typeName;
-    for (var i = 0; i < spec.length; ++i) {
-        var c = spec.charAt(i),
-            cUpper = c.toUpperCase(),
-            arg = args[i];
-        // Asterix means allow anything.
-        if (c == '*') {
-            continue;
-        }
-        typeName = utils.typeName(arg);
-        if ((arg === null || arg === undefined) && c == cUpper) {
-            continue;
-        }
-        if (typeName != typeMap[cUpper]) {
-            errMsg = 'Expected ' + typeMap[cUpper];
-            break;
-        }
-    }
-    if (errMsg) {
-        errMsg += ', but got ' + typeName + '.';
-        errMsg = 'Wrong type for parameter "' + extractParamName(opt_callee || args.callee, i) + '" of ' + functionName + ': ' + errMsg;
-        // Don't log when running jake test.
-        if (typeof jasmine == 'undefined') {
-            console.error(errMsg);
-        }
-        throw TypeError(errMsg);
-    }
-}
-
-function getValue(value, defaultValue) {
-    return value === undefined ? defaultValue : value;
-}
-
-moduleExports.checkArgs = checkArgs;
-moduleExports.getValue = getValue;
-moduleExports.enableChecks = true;
-
-
-});
-
-// file: lib\common\builder.js
-define("cordova/builder", function(require, exports, module) {
-
-var utils = require('cordova/utils');
-
-function each(objects, func, context) {
-    for (var prop in objects) {
-        if (objects.hasOwnProperty(prop)) {
-            func.apply(context, [objects[prop], prop]);
-        }
-    }
-}
-
-function clobber(obj, key, value) {
-    exports.replaceHookForTesting(obj, key);
-    obj[key] = value;
-    // Getters can only be overridden by getters.
-    if (obj[key] !== value) {
-        utils.defineGetter(obj, key, function() {
-            return value;
-        });
-    }
-}
-
-function assignOrWrapInDeprecateGetter(obj, key, value, message) {
-    if (message) {
-        utils.defineGetter(obj, key, function() {
-            console.log(message);
-            delete obj[key];
-            clobber(obj, key, value);
-            return value;
-        });
-    } else {
-        clobber(obj, key, value);
-    }
-}
-
-function include(parent, objects, clobber, merge) {
-    each(objects, function (obj, key) {
-        try {
-          var result = obj.path ? require(obj.path) : {};
-
-          if (clobber) {
-              // Clobber if it doesn't exist.
-              if (typeof parent[key] === 'undefined') {
-                  assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
-              } else if (typeof obj.path !== 'undefined') {
-                  // If merging, merge properties onto parent, otherwise, clobber.
-                  if (merge) {
-                      recursiveMerge(parent[key], result);
-                  } else {
-                      assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
-                  }
-              }
-              result = parent[key];
-          } else {
-            // Overwrite if not currently defined.
-            if (typeof parent[key] == 'undefined') {
-              assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
-            } else {
-              // Set result to what already exists, so we can build children into it if they exist.
-              result = parent[key];
-            }
-          }
-
-          if (obj.children) {
-            include(result, obj.children, clobber, merge);
-          }
-        } catch(e) {
-          utils.alert('Exception building cordova JS globals: ' + e + ' for key "' + key + '"');
-        }
-    });
-}
-
-/**
- * Merge properties from one object onto another recursively.  Properties from
- * the src object will overwrite existing target property.
- *
- * @param target Object to merge properties into.
- * @param src Object to merge properties from.
- */
-function recursiveMerge(target, src) {
-    for (var prop in src) {
-        if (src.hasOwnProperty(prop)) {
-            if (target.prototype && target.prototype.constructor === target) {
-                // If the target object is a constructor override off prototype.
-                clobber(target.prototype, prop, src[prop]);
-            } else {
-                if (typeof src[prop] === 'object' && typeof target[prop] === 'object') {
-                    recursiveMerge(target[prop], src[prop]);
-                } else {
-                    clobber(target, prop, src[prop]);
-                }
-            }
-        }
-    }
-}
-
-exports.buildIntoButDoNotClobber = function(objects, target) {
-    include(target, objects, false, false);
-};
-exports.buildIntoAndClobber = function(objects, target) {
-    include(target, objects, true, false);
-};
-exports.buildIntoAndMerge = function(objects, target) {
-    include(target, objects, true, true);
-};
-exports.recursiveMerge = recursiveMerge;
-exports.assignOrWrapInDeprecateGetter = assignOrWrapInDeprecateGetter;
-exports.replaceHookForTesting = function() {};
-
-});
-
-// file: lib\common\channel.js
-define("cordova/channel", function(require, exports, module) {
-
-var utils = require('cordova/utils'),
-    nextGuid = 1;
-
-/**
- * Custom pub-sub "channel" that can have functions subscribed to it
- * This object is used to define and control firing of events for
- * cordova initialization, as well as for custom events thereafter.
- *
- * The order of events during page load and Cordova startup is as follows:
- *
- * onDOMContentLoaded*         Internal event that is received when the web page is loaded and parsed.
- * onNativeReady*              Internal event that indicates the Cordova native side is ready.
- * onCordovaReady*             Internal event fired when all Cordova JavaScript objects have been created.
- * onCordovaInfoReady*         Internal event fired when device properties are available.
- * onCordovaConnectionReady*   Internal event fired when the connection property has been set.
- * onDeviceReady*              User event fired to indicate that Cordova is ready
- * onResume                    User event fired to indicate a start/resume lifecycle event
- * onPause                     User event fired to indicate a pause lifecycle event
- * onDestroy*                  Internal event fired when app is being destroyed (User should use window.onunload event, not this one).
- *
- * The events marked with an * are sticky. Once they have fired, they will stay in the fired state.
- * All listeners that subscribe after the event is fired will be executed right away.
- *
- * The only Cordova events that user code should register for are:
- *      deviceready           Cordova native code is initialized and Cordova APIs can be called from JavaScript
- *      pause                 App has moved to background
- *      resume                App has returned to foreground
- *
- * Listeners can be registered as:
- *      document.addEventListener("deviceready", myDeviceReadyListener, false);
- *      document.addEventListener("resume", myResumeListener, false);
- *      document.addEventListener("pause", myPauseListener, false);
- *
- * The DOM lifecycle events should be used for saving and restoring state
- *      window.onload
- *      window.onunload
- *
- */
-
-/**
- * Channel
- * @constructor
- * @param type  String the channel name
- */
-var Channel = function(type, sticky) {
-    this.type = type;
-    // Map of guid -> function.
-    this.handlers = {};
-    // 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired.
-    this.state = sticky ? 1 : 0;
-    // Used in sticky mode to remember args passed to fire().
-    this.fireArgs = null;
-    // Used by onHasSubscribersChange to know if there are any listeners.
-    this.numHandlers = 0;
-    // Function that is called when the first listener is subscribed, or when
-    // the last listener is unsubscribed.
-    this.onHasSubscribersChange = null;
-},
-    channel = {
-        /**
-         * Calls the provided function only after all of the channels specified
-         * have been fired. All channels must be sticky channels.
-         */
-        join: function(h, c) {
-            var len = c.length,
-                i = len,
-                f = function() {
-                    if (!(--i)) h();
-                };
-            for (var j=0; j<len; j++) {
-                if (c[j].state === 0) {
-                    throw Error('Can only use join with sticky channels.');
-                }
-                c[j].subscribe(f);
-            }
-            if (!len) h();
-        },
-        create: function(type) {
-            return channel[type] = new Channel(type, false);
-        },
-        createSticky: function(type) {
-            return channel[type] = new Channel(type, true);
-        },
-
-        /**
-         * cordova Channels that must fire before "deviceready" is fired.
-         */
-        deviceReadyChannelsArray: [],
-        deviceReadyChannelsMap: {},
-
-        /**
-         * Indicate that a feature needs to be initialized before it is ready to be used.
-         * This holds up Cordova's "deviceready" event until the feature has been initialized
-         * and Cordova.initComplete(feature) is called.
-         *
-         * @param feature {String}     The unique feature name
-         */
-        waitForInitialization: function(feature) {
-            if (feature) {
-                var c = channel[feature] || this.createSticky(feature);
-                this.deviceReadyChannelsMap[feature] = c;
-                this.deviceReadyChannelsArray.push(c);
-            }
-        },
-
-        /**
-         * Indicate that initialization code has completed and the feature is ready to be used.
-         *
-         * @param feature {String}     The unique feature name
-         */
-        initializationComplete: function(feature) {
-            var c = this.deviceReadyChannelsMap[feature];
-            if (c) {
-                c.fire();
-            }
-        }
-    };
-
-function forceFunction(f) {
-    if (typeof f != 'function') throw "Function required as first argument!";
-}
-
-/**
- * Subscribes the given function to the channel. Any time that
- * Channel.fire is called so too will the function.
- * Optionally specify an execution context for the function
- * and a guid that can be used to stop subscribing to the channel.
- * Returns the guid.
- */
-Channel.prototype.subscribe = function(f, c) {
-    // need a function to call
-    forceFunction(f);
-    if (this.state == 2) {
-        f.apply(c || this, this.fireArgs);
-        return;
-    }
-
-    var func = f,
-        guid = f.observer_guid;
-    if (typeof c == "object") { func = utils.close(c, f); }
-
-    if (!guid) {
-        // first time any channel has seen this subscriber
-        guid = '' + nextGuid++;
-    }
-    func.observer_guid = guid;
-    f.observer_guid = guid;
-
-    // Don't add the same handler more than once.
-    if (!this.handlers[guid]) {
-        this.handlers[guid] = func;
-        this.numHandlers++;
-        if (this.numHandlers == 1) {
-            this.onHasSubscribersChange && this.onHasSubscribersChange();
-        }
-    }
-};
-
-/**
- * Unsubscribes the function with the given guid from the channel.
- */
-Channel.prototype.unsubscribe = function(f) {
-    // need a function to unsubscribe
-    forceFunction(f);
-
-    var guid = f.observer_guid,
-        handler = this.handlers[guid];
-    if (handler) {
-        delete this.handlers[guid];
-        this.numHandlers--;
-        if (this.numHandlers === 0) {
-            this.onHasSubscribersChange && this.onHasSubscribersChange();
-        }
-    }
-};
-
-/**
- * Calls all functions subscribed to this channel.
- */
-Channel.prototype.fire = function(e) {
-    var fail = false,
-        fireArgs = Array.prototype.slice.call(arguments);
-    // Apply stickiness.
-    if (this.state == 1) {
-        this.state = 2;
-        this.fireArgs = fireArgs;
-    }
-    if (this.numHandlers) {
-        // Copy the values first so that it is safe to modify it from within
-        // callbacks.
-        var toCall = [];
-        for (var item in this.handlers) {
-            toCall.push(this.handlers[item]);
-        }
-        for (var i = 0; i < toCall.length; ++i) {
-            toCall[i].apply(this, fireArgs);
-        }
-        if (this.state == 2 && this.numHandlers) {
-            this.numHandlers = 0;
-            this.handlers = {};
-            this.onHasSubscribersChange && this.onHasSubscribersChange();
-        }
-    }
-};
-
-
-// defining them here so they are ready super fast!
-// DOM event that is received when the web page is loaded and parsed.
-channel.createSticky('onDOMContentLoaded');
-
-// Event to indicate the Cordova native side is ready.
-channel.createSticky('onNativeReady');
-
-// Event to indicate that all Cordova JavaScript objects have been created
-// and it's time to run plugin constructors.
-channel.createSticky('onCordovaReady');
-
-// Event to indicate that device properties are available
-channel.createSticky('onCordovaInfoReady');
-
-// Event to indicate that the connection property has been set.
-channel.createSticky('onCordovaConnectionReady');
-
-// Event to indicate that all automatically loaded JS plugins are loaded and ready.
-channel.createSticky('onPluginsReady');
-
-// Event to indicate that Cordova is ready
-channel.createSticky('onDeviceReady');
-
-// Event to indicate a resume lifecycle event
-channel.create('onResume');
-
-// Event to indicate a pause lifecycle event
-channel.create('onPause');
-
-// Event to indicate a destroy lifecycle event
-channel.createSticky('onDestroy');
-
-// Channels that must fire before "deviceready" is fired.
-channel.waitForInitialization('onCordovaReady');
-channel.waitForInitialization('onCordovaConnectionReady');
-
-module.exports = channel;
-
-});
-
-// file: lib\common\commandProxy.js
-define("cordova/commandProxy", function(require, exports, module) {
-
-
-// internal map of proxy function
-var CommandProxyMap = {};
-
-module.exports = {
-
-    // example: cordova.commandProxy.add("Accelerometer",{getCurrentAcceleration: function(successCallback, errorCallback, options) {...},...);
-    add:function(id,proxyObj) {
-        console.log("adding proxy for " + id);
-        CommandProxyMap[id] = proxyObj;
-        return proxyObj;
-    },
-
-    // cordova.commandProxy.remove("Accelerometer");
-    remove:function(id) {
-        var proxy = CommandProxyMap[id];
-        delete CommandProxyMap[id];
-        CommandProxyMap[id] = null;
-        return proxy;
-    },
-
-    get:function(service,action) {
-        return ( CommandProxyMap[service] ? CommandProxyMap[service][action] : null );
-    }
-};
-});
-
-// file: lib\windows8\exec.js
-define("cordova/exec", function(require, exports, module) {
-
-var cordova = require('cordova');
-var commandProxy = require('cordova/commandProxy');
-
-/**
- * Execute a cordova command.  It is up to the native side whether this action
- * is synchronous or asynchronous.  The native side can return:
- *      Synchronous: PluginResult object as a JSON string
- *      Asynchronous: Empty string ""
- * If async, the native side will cordova.callbackSuccess or cordova.callbackError,
- * depending upon the result of the action.
- *
- * @param {Function} success    The success callback
- * @param {Function} fail       The fail callback
- * @param {String} service      The name of the service to use
- * @param {String} action       Action to be run in cordova
- * @param {String[]} [args]     Zero or more arguments to pass to the method
- */
-module.exports = function(success, fail, service, action, args) {
-
-    var proxy = commandProxy.get(service,action);
-    if(proxy) {
-        var callbackId = service + cordova.callbackId++;
-        // console.log("EXEC:" + service + " : " + action);
-        if (typeof success == "function" || typeof fail == "function") {
-            cordova.callbacks[callbackId] = {success:success, fail:fail};
-        }
-        try {
-            proxy(success, fail, args);
-        }
-        catch(e) {
-            console.log("Exception calling native with command :: " + service + " :: " + action  + " ::exception=" + e);
-        }
-    }
-    else {
-        fail && fail("Missing Command Error");
-    }
-};
-
-});
-
-// file: lib\common\modulemapper.js
-define("cordova/modulemapper", function(require, exports, module) {
-
-var builder = require('cordova/builder'),
-    moduleMap = define.moduleMap,
-    symbolList,
-    deprecationMap;
-
-exports.reset = function() {
-    symbolList = [];
-    deprecationMap = {};
-};
-
-function addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) {
-    if (!(moduleName in moduleMap)) {
-        throw new Error('Module ' + moduleName + ' does not exist.');
-    }
-    symbolList.push(strategy, moduleName, symbolPath);
-    if (opt_deprecationMessage) {
-        deprecationMap[symbolPath] = opt_deprecationMessage;
-    }
-}
-
-// Note: Android 2.3 does have Function.bind().
-exports.clobbers = function(moduleName, symbolPath, opt_deprecationMessage) {
-    addEntry('c', moduleName, symbolPath, opt_deprecationMessage);
-};
-
-exports.merges = function(moduleName, symbolPath, opt_deprecationMessage) {
-    addEntry('m', moduleName, symbolPath, opt_deprecationMessage);
-};
-
-exports.defaults = function(moduleName, symbolPath, opt_deprecationMessage) {
-    addEntry('d', moduleName, symbolPath, opt_deprecationMessage);
-};
-
-function prepareNamespace(symbolPath, context) {
-    if (!symbolPath) {
-        return context;
-    }
-    var parts = symbolPath.split('.');
-    var cur = context;
-    for (var i = 0, part; part = parts[i]; ++i) {
-        cur = cur[part] = cur[part] || {};
-    }
-    return cur;
-}
-
-exports.mapModules = function(context) {
-    var origSymbols = {};
-    context.CDV_origSymbols = origSymbols;
-    for (var i = 0, len = symbolList.length; i < len; i += 3) {
-        var strategy = symbolList[i];
-        var moduleName = symbolList[i + 1];
-        var symbolPath = symbolList[i + 2];
-        var lastDot = symbolPath.lastIndexOf('.');
-        var namespace = symbolPath.substr(0, lastDot);
-        var lastName = symbolPath.substr(lastDot + 1);
-
-        var module = require(moduleName);
-        var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null;
-        var parentObj = prepareNamespace(namespace, context);
-        var target = parentObj[lastName];
-
-        if (strategy == 'm' && target) {
-            builder.recursiveMerge(target, module);
-        } else if ((strategy == 'd' && !target) || (strategy != 'd')) {
-            if (!(symbolPath in origSymbols)) {
-                origSymbols[symbolPath] = target;
-            }
-            builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg);
-        }
-    }
-};
-
-exports.getOriginalSymbol = function(context, symbolPath) {
-    var origSymbols = context.CDV_origSymbols;
-    if (origSymbols && (symbolPath in origSymbols)) {
-        return origSymbols[symbolPath];
-    }
-    var parts = symbolPath.split('.');
-    var obj = context;
-    for (var i = 0; i < parts.length; ++i) {
-        obj = obj && obj[parts[i]];
-    }
-    return obj;
-};
-
-exports.loadMatchingModules = function(matchingRegExp) {
-    for (var k in moduleMap) {
-        if (matchingRegExp.exec(k)) {
-            require(k);
-        }
-    }
-};
-
-exports.reset();
-
-
-});
-
-// file: lib\windows8\platform.js
-define("cordova/platform", function(require, exports, module) {
-
-var cordova = require('cordova'),
-    exec = require('cordova/exec'),
-    channel = cordova.require("cordova/channel");
-
-/*
- * Define native implementations ( there is no native layer, so need to make sure the proxies are there )
-*/
-
-require('cordova/plugin/windows8/DeviceProxy');
-require('cordova/plugin/windows8/NetworkStatusProxy');
-require('cordova/plugin/windows8/AccelerometerProxy');
-require('cordova/plugin/windows8/CameraProxy');
-require('cordova/plugin/windows8/CaptureProxy');
-require('cordova/plugin/windows8/CompassProxy');
-require('cordova/plugin/windows8/ContactsProxy');
-require('cordova/plugin/windows8/FileProxy');
-
-require('cordova/plugin/windows8/FileTransferProxy');
-require('cordova/plugin/windows8/MediaProxy');
-require('cordova/plugin/windows8/NotificationProxy');
-
-
-
-module.exports = {
-    id: "windows8",
-    initialize:function() {
-        var modulemapper = require('cordova/modulemapper');
-
-        modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
-        modulemapper.mapModules(window);
-
-        window.alert = window.alert || require("cordova/plugin/notification").alert;
-        window.confirm = window.confirm || require("cordova/plugin/notification").confirm;
-
-        var onWinJSReady = function () {
-            var app = WinJS.Application;
-            var checkpointHandler = function checkpointHandler() {
-                cordova.fireDocumentEvent('pause');
-            };
-
-            var resumingHandler = function resumingHandler() {
-                cordova.fireDocumentEvent('resume');
-            };
-
-            app.addEventListener("checkpoint", checkpointHandler);
-            Windows.UI.WebUI.WebUIApplication.addEventListener("resuming", resumingHandler, false);
-            app.start();
-
-        };
-
-        if (!window.WinJS) {
-            // <script src="//Microsoft.WinJS.1.0/js/base.js"></script>
-            var scriptElem = document.createElement("script");
-            scriptElem.src = "//Microsoft.WinJS.1.0/js/base.js";
-            scriptElem.addEventListener("load", onWinJSReady);
-            document.head.appendChild(scriptElem);
-
-            console.log("added WinJS ... ");
-        }
-        else {
-            onWinJSReady();
-        }
-    },
-    clobbers: {
-        cordova: {
-            path: 'cordova',
-            children: {
-                commandProxy: {
-                    path: 'cordova/commandProxy'
-                }
-            }
-        },
-        navigator: {
-            children: {
-                console: {
-                    path: "cordova/plugin/windows8/console"
-                }
-            }
-        }
-    }
-};
-
-});
-
-// file: lib\common\plugin\Acceleration.js
-define("cordova/plugin/Acceleration", function(require, exports, module) {
-
-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;
-
-});
-
-// file: lib\common\plugin\Camera.js
-define("cordova/plugin/Camera", function(require, exports, module) {
-
-var argscheck = require('cordova/argscheck'),
-    exec = require('cordova/exec'),
-    Camera = require('cordova/plugin/CameraConstants'),
-    CameraPopoverHandle = require('cordova/plugin/CameraPopoverHandle');
-
-var cameraExport = {};
-
-// Tack on the Camera Constants to the base camera plugin.
-for (var key in Camera) {
-    cameraExport[key] = Camera[key];
-}
-
-/**
- * Gets a picture from source defined by "options.sourceType", and returns the
- * image as defined by the "options.destinationType" option.
-
- * The defaults are sourceType=CAMERA and destinationType=FILE_URI.
- *
- * @param {Function} successCallback
- * @param {Function} errorCallback
- * @param {Object} options
- */
-cameraExport.getPicture = function(successCallback, errorCallback, options) {
-    argscheck.checkArgs('fFO', 'Camera.getPicture', arguments);
-    options = options || {};
-    var getValue = argscheck.getValue;
-
-    var quality = getValue(options.quality, 50);
-    var destinationType = getValue(options.destinationType, Camera.DestinationType.FILE_URI);
-    var sourceType = getValue(options.sourceType, Camera.PictureSourceType.CAMERA);
-    var targetWidth = getValue(options.targetWidth, -1);
-    var targetHeight = getValue(options.targetHeight, -1);
-    var encodingType = getValue(options.encodingType, Camera.EncodingType.JPEG);
-    var mediaType = getValue(options.mediaType, Camera.MediaType.PICTURE);
-    var allowEdit = !!options.allowEdit;
-    var correctOrientation = !!options.correctOrientation;
-    var saveToPhotoAlbum = !!options.saveToPhotoAlbum;
-    var popoverOptions = getValue(options.popoverOptions, null);
-    var cameraDirection = getValue(options.cameraDirection, Camera.Direction.BACK);
-
-    var args = [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType,
-                mediaType, allowEdit, correctOrientation, saveToPhotoAlbum, popoverOptions, cameraDirection];
-
-    exec(successCallback, errorCallback, "Camera", "takePicture", args);
-    return new CameraPopoverHandle();
-};
-
-cameraExport.cleanup = function(successCallback, errorCallback) {
-    exec(successCallback, errorCallback, "Camera", "cleanup", []);
-};
-
-module.exports = cameraExport;
-
-});
-
-// file: lib\common\plugin\CameraConstants.js
-define("cordova/plugin/CameraConstants", function(require, exports, module) {
-
-module.exports = {
-  DestinationType:{
-    DATA_URL: 0,         // Return base64 encoded string
-    FILE_URI: 1,         // Return file uri (content://media/external/images/media/2 for Android)
-    NATIVE_URI: 2        // Return native uri (eg. asset-library://... for iOS)
-  },
-  EncodingType:{
-    JPEG: 0,             // Return JPEG encoded image
-    PNG: 1               // Return PNG encoded image
-  },
-  MediaType:{
-    PICTURE: 0,          // allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType
-    VIDEO: 1,            // allow selection of video only, ONLY RETURNS URL
-    ALLMEDIA : 2         // allow selection from all media types
-  },
-  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)
-  },
-  PopoverArrowDirection:{
-      ARROW_UP : 1,        // matches iOS UIPopoverArrowDirection constants to specify arrow location on popover
-      ARROW_DOWN : 2,
-      ARROW_LEFT : 4,
-      ARROW_RIGHT : 8,
-      ARROW_ANY : 15
-  },
-  Direction:{
-      BACK: 0,
-      FRONT: 1
-  }
-};
-
-});
-
-// file: lib\common\plugin\CameraPopoverHandle.js
-define("cordova/plugin/CameraPopoverHandle", function(require, exports, module) {
-
-var exec = require('cordova/exec');
-
-/**
- * A handle to an image picker popover.
- */
-var CameraPopoverHandle = function() {
-    this.setPosition = function(popoverOptions) {
-        console.log('CameraPopoverHandle.setPosition is only supported on iOS.');
-    };
-};
-
-module.exports = CameraPopoverHandle;
-
-});
-
-// file: lib\common\plugin\CameraPopoverOptions.js
-define("cordova/plugin/CameraPopoverOptions", function(require, exports, module) {
-
-var Camera = require('cordova/plugin/CameraConstants');
-
-/**
- * Encapsulates options for iOS Popover image picker
- */
-var CameraPopoverOptions = function(x,y,width,height,arrowDir){
-    // information of rectangle that popover should be anchored to
-    this.x = x || 0;
-    this.y = y || 32;
-    this.width = width || 320;
-    this.height = height || 480;
-    // The direction of the popover arrow
-    this.arrowDir = arrowDir || Camera.PopoverArrowDirection.ARROW_ANY;
-};
-
-module.exports = CameraPopoverOptions;
-
-});
-
-// file: lib\common\plugin\CaptureAudioOptions.js
-define("cordova/plugin/CaptureAudioOptions", function(require, exports, module) {
-
-/**
- * Encapsulates all audio capture operation configuration options.
- */
-var CaptureAudioOptions = function(){
-    // Upper limit of sound clips user can record. Value must be equal or greater than 1.
-    this.limit = 1;
-    // Maximum duration of a single sound clip in seconds.
-    this.duration = 0;
-    // The selected audio mode. Must match with one of the elements in supportedAudioModes array.
-    this.mode = null;
-};
-
-module.exports = CaptureAudioOptions;
-
-});
-
-// file: lib\common\plugin\CaptureError.js
-define("cordova/plugin/CaptureError", function(require, exports, module) {
-
-/**
- * The CaptureError interface encapsulates all errors in the Capture API.
- */
-var CaptureError = function(c) {
-   this.code = c || null;
-};
-
-// Camera or microphone failed to capture image or sound.
-CaptureError.CAPTURE_INTERNAL_ERR = 0;
-// Camera application or audio capture application is currently serving other capture request.
-CaptureError.CAPTURE_APPLICATION_BUSY = 1;
-// Invalid use of the API (e.g. limit parameter has value less than one).
-CaptureError.CAPTURE_INVALID_ARGUMENT = 2;
-// User exited camera application or audio capture application before capturing anything.
-CaptureError.CAPTURE_NO_MEDIA_FILES = 3;
-// The requested capture operation is not supported.
-CaptureError.CAPTURE_NOT_SUPPORTED = 20;
-
-module.exports = CaptureError;
-
-});
-
-// file: lib\common\plugin\CaptureImageOptions.js
-define("cordova/plugin/CaptureImageOptions", function(require, exports, module) {
-
-/**
- * Encapsulates all image capture operation configuration options.
- */
-var CaptureImageOptions = function(){
-    // Upper limit of images user can take. Value must be equal or greater than 1.
-    this.limit = 1;
-    // The selected image mode. Must match with one of the elements in supportedImageModes array.
-    this.mode = null;
-};
-
-module.exports = CaptureImageOptions;
-
-});
-
-// file: lib\common\plugin\CaptureVideoOptions.js
-define("cordova/plugin/CaptureVideoOptions", function(require, exports, module) {
-
-/**
- * Encapsulates all video capture operation configuration options.
- */
-var CaptureVideoOptions = function(){
-    // Upper limit of videos user can record. Value must be equal or greater than 1.
-    this.limit = 1;
-    // Maximum duration of a single video clip in seconds.
-    this.duration = 0;
-    // The selected video mode. Must match with one of the elements in supportedVideoModes array.
-    this.mode = null;
-};
-
-module.exports = CaptureVideoOptions;
-
-});
-
-// file: lib\common\plugin\CompassError.js
-define("cordova/plugin/CompassError", function(require, exports, module) {
-
-/**
- *  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;
-
-});
-
-// file: lib\common\plugin\CompassHeading.js
-define("cordova/plugin/CompassHeading", function(require, exports, module) {
-
-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;
-
-});
-
-// file: lib\common\plugin\ConfigurationData.js
-define("cordova/plugin/ConfigurationData", function(require, exports, module) {
-
-/**
- * Encapsulates a set of parameters that the capture device supports.
- */
-function ConfigurationData() {
-    // The ASCII-encoded string in lower case representing the media type.
-    this.type = null;
-    // The height attribute represents height of the image or video in pixels.
-    // In the case of a sound clip this attribute has value 0.
-    this.height = 0;
-    // The width attribute represents width of the image or video in pixels.
-    // In the case of a sound clip this attribute has value 0
-    this.width = 0;
-}
-
-module.exports = ConfigurationData;
-
-});
-
-// file: lib\common\plugin\Connection.js
-define("cordova/plugin/Connection", function(require, exports, module) {
-
-/**
- * Network status
- */
-module.exports = {
-        UNKNOWN: "unknown",
-        ETHERNET: "ethernet",
-        WIFI: "wifi",
-        CELL_2G: "2g",
-        CELL_3G: "3g",
-        CELL_4G: "4g",
-        CELL:"cellular",
-        NONE: "none"
-};
-
-});
-
-// file: lib\common\plugin\Contact.js
-define("cordova/plugin/Contact", function(require, exports, module) {
-
-var argscheck = require('cordova/argscheck'),
-    exec = require('cordova/exec'),
-    ContactError = require('cordova/plugin/ContactError'),
-    utils = require('cordova/utils');
-
-/**
-* Converts primitives into Complex Object
-* Currently only used for Date fields
-*/
-function convertIn(contact) {
-    var value = contact.birthday;
-    try {
-      contact.birthday = new Date(parseFloat(value));
-    } catch (exception){
-      console.log("Cordova Contact convertIn error: exception creating date.");
-    }
-    return contact;
-}
-
-/**
-* Converts Complex objects into primitives
-* Only conversion at present is for Dates.
-**/
-
-function convertOut(contact) {
-    var value = contact.birthday;
-    if (value !== null) {
-        // try to make it a Date object if it is not already
-        if (!utils.isDate(value)){
-            try {
-                value = new Date(value);
-            } catch(exception){
-                value = null;
-            }
-        }
-        if (utils.isDate(value)){
-            value = value.valueOf(); // convert to milliseconds
-        }
-        contact.birthday = value;
-    }
-    return contact;
-}
-
-/**
-* Contains information about a single contact.
-* @constructor
-* @param {DOMString} id unique identifier
-* @param {DOMString} displayName
-* @param {ContactName} name
-* @param {DOMString} nickname
-* @param {Array.<ContactField>} phoneNumbers array of phone numbers
-* @param {Array.<ContactField>} emails array of email addresses
-* @param {Array.<ContactAddress>} addresses array of addresses
-* @param {Array.<ContactField>} ims instant messaging user ids
-* @param {Array.<ContactOrganization>} organizations
-* @param {DOMString} birthday contact's birthday
-* @param {DOMString} note user notes about contact
-* @param {Array.<ContactField>} photos
-* @param {Array.<ContactField>} categories
-* @param {Array.<ContactField>} urls contact's web sites
-*/
-var Contact = function (id, displayName, name, nickname, phoneNumbers, emails, addresses,
-    ims, organizations, birthday, note, photos, categories, urls) {
-    this.id = id || null;
-    this.rawId = null;
-    this.displayName = displayName || null;
-    this.name = name || null; // ContactName
-    this.nickname = nickname || null;
-    this.phoneNumbers = phoneNumbers || null; // ContactField[]
-    this.emails = emails || null; // ContactField[]
-    this.addresses = addresses || null; // ContactAddress[]
-    this.ims = ims || null; // ContactField[]
-    this.organizations = organizations || null; // ContactOrganization[]
-    this.birthday = birthday || null;
-    this.note = note || null;
-    this.photos = photos || null; // ContactField[]
-    this.categories = categories || null; // ContactField[]
-    this.urls = urls || null; // ContactField[]
-};
-
-/**
-* Removes contact from device storage.
-* @param successCB success callback
-* @param errorCB error callback
-*/
-Contact.prototype.remove = function(successCB, errorCB) {
-    argscheck.checkArgs('FF', 'Contact.remove', arguments);
-    var fail = errorCB && function(code) {
-        errorCB(new ContactError(code));
-    };
-    if (this.id === null) {
-        fail(ContactError.UNKNOWN_ERROR);
-    }
-    else {
-        exec(successCB, fail, "Contacts", "remove", [this.id]);
-    }
-};
-
-/**
-* Creates a deep copy of this Contact.
-* With the contact ID set to null.
-* @return copy of this Contact
-*/
-Contact.prototype.clone = function() {
-    var clonedContact = utils.clone(this);
-    clonedContact.id = null;
-    clonedContact.rawId = null;
-
-    function nullIds(arr) {
-        if (arr) {
-            for (var i = 0; i < arr.length; ++i) {
-                arr[i].id = null;
-            }
-        }
-    }
-
-    // Loop through and clear out any id's in phones, emails, etc.
-    nullIds(clonedContact.phoneNumbers);
-    nullIds(clonedContact.emails);
-    nullIds(clonedContact.addresses);
-    nullIds(clonedContact.ims);
-    nullIds(clonedContact.organizations);
-    nullIds(clonedContact.categories);
-    nullIds(clonedContact.photos);
-    nullIds(clonedContact.urls);
-    return clonedContact;
-};
-
-/**
-* Persists contact to device storage.
-* @param successCB success callback
-* @param errorCB error callback
-*/
-Contact.prototype.save = function(successCB, errorCB) {
-    argscheck.checkArgs('FFO', 'Contact.save', arguments);
-    var fail = errorCB && function(code) {
-        errorCB(new ContactError(code));
-    };
-    var success = function(result) {
-        if (result) {
-            if (successCB) {
-                var fullContact = require('cordova/plugin/contacts').create(result);
-                successCB(convertIn(fullContact));
-            }
-        }
-        else {
-            // no Entry object returned
-            fail(ContactError.UNKNOWN_ERROR);
-        }
-    };
-    var dupContact = convertOut(utils.clone(this));
-    exec(success, fail, "Contacts", "save", [dupContact]);
-};
-
-
-module.exports = Contact;
-
-});
-
-// file: lib\common\plugin\ContactAddress.js
-define("cordova/plugin/ContactAddress", function(require, exports, module) {
-
-/**
-* Contact address.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code
-* @param formatted // NOTE: not a W3C standard
-* @param streetAddress
-* @param locality
-* @param region
-* @param postalCode
-* @param country
-*/
-
-var ContactAddress = function(pref, type, formatted, streetAddress, locality, region, postalCode, country) {
-    this.id = null;
-    this.pref = (typeof pref != 'undefined' ? pref : false);
-    this.type = type || null;
-    this.formatted = formatted || null;
-    this.streetAddress = streetAddress || null;
-    this.locality = locality || null;
-    this.region = region || null;
-    this.postalCode = postalCode || null;
-    this.country = country || null;
-};
-
-module.exports = ContactAddress;
-
-});
-
-// file: lib\common\plugin\ContactError.js
-define("cordova/plugin/ContactError", function(require, exports, module) {
-
-/**
- *  ContactError.
- *  An error code assigned by an implementation when an error has occurred
- * @constructor
- */
-var ContactError = function(err) {
-    this.code = (typeof err != 'undefined' ? err : null);
-};
-
-/**
- * Error codes
- */
-ContactError.UNKNOWN_ERROR = 0;
-ContactError.INVALID_ARGUMENT_ERROR = 1;
-ContactError.TIMEOUT_ERROR = 2;
-ContactError.PENDING_OPERATION_ERROR = 3;
-ContactError.IO_ERROR = 4;
-ContactError.NOT_SUPPORTED_ERROR = 5;
-ContactError.PERMISSION_DENIED_ERROR = 20;
-
-module.exports = ContactError;
-
-});
-
-// file: lib\common\plugin\ContactField.js
-define("cordova/plugin/ContactField", function(require, exports, module) {
-
-/**
-* Generic contact field.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
-* @param type
-* @param value
-* @param pref
-*/
-var ContactField = function(type, value, pref) {
-    this.id = null;
-    this.type = (type && type.toString()) || null;
-    this.value = (value && value.toString()) || null;
-    this.pref = (typeof pref != 'undefined' ? pref : false);
-};
-
-module.exports = ContactField;
-
-});
-
-// file: lib\common\plugin\ContactFindOptions.js
-define("cordova/plugin/ContactFindOptions", function(require, exports, module) {
-
-/**
- * ContactFindOptions.
- * @constructor
- * @param filter used to match contacts against
- * @param multiple boolean used to determine if more than one contact should be returned
- */
-
-var ContactFindOptions = function(filter, multiple) {
-    this.filter = filter || '';
-    this.multiple = (typeof multiple != 'undefined' ? multiple : false);
-};
-
-module.exports = ContactFindOptions;
-
-});
-
-// file: lib\common\plugin\ContactName.js
-define("cordova/plugin/ContactName", function(require, exports, module) {
-
-/**
-* Contact name.
-* @constructor
-* @param formatted // NOTE: not part of W3C standard
-* @param familyName
-* @param givenName
-* @param middle
-* @param prefix
-* @param suffix
-*/
-var ContactName = function(formatted, familyName, givenName, middle, prefix, suffix) {
-    this.formatted = formatted || null;
-    this.familyName = familyName || null;
-    this.givenName = givenName || null;
-    this.middleName = middle || null;
-    this.honorificPrefix = prefix || null;
-    this.honorificSuffix = suffix || null;
-};
-
-module.exports = ContactName;
-
-});
-
-// file: lib\common\plugin\ContactOrganization.js
-define("cordova/plugin/ContactOrganization", function(require, exports, module) {
-
-/**
-* Contact organization.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
-* @param name
-* @param dept
-* @param title
-* @param startDate
-* @param endDate
-* @param location
-* @param desc
-*/
-
-var ContactOrganization = function(pref, type, name, dept, title) {
-    this.id = null;
-    this.pref = (typeof pref != 'undefined' ? pref : false);
-    this.type = type || null;
-    this.name = name || null;
-    this.department = dept || null;
-    this.title = title || null;
-};
-
-module.exports = ContactOrganization;
-
-});
-
-// file: lib\common\plugin\Coordinates.js
-define("cordova/plugin/Coordinates", function(require, exports, module) {
-
-/**
- * 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;
-
-});
-
-// file: lib\common\plugin\DirectoryEntry.js
-define("cordova/plugin/DirectoryEntry", function(require, exports, module) {
-
-var argscheck = require('cordova/argscheck'),
-    utils = require('cordova/utils'),
-    exec = require('cordova/exec'),
-    Entry = require('cordova/plugin/Entry'),
-    FileError = require('cordova/plugin/FileError'),
-    DirectoryReader = require('cordova/plugin/DirectoryReader');
-
-/**
- * An interface representing a directory on the file system.
- *
- * {boolean} isFile always false (readonly)
- * {boolean} isDirectory always true (readonly)
- * {DOMString} name of the directory, excluding the path leading to it (readonly)
- * {DOMString} fullPath the absolute full path to the directory (readonly)
- * TODO: implement this!!! {FileSystem} filesystem on which the directory resides (readonly)
- */
-var DirectoryEntry = function(name, fullPath) {
-     DirectoryEntry.__super__.constructor.call(this, false, true, name, fullPath);
-};
-
-utils.extend(DirectoryEntry, Entry);
-
-/**
- * Creates a new DirectoryReader to read entries from this directory
- */
-DirectoryEntry.prototype.createReader = function() {
-    return new DirectoryReader(this.fullPath);
-};
-
-/**
- * Creates or looks up a directory
- *
- * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a directory
- * @param {Flags} options to create or exclusively create the directory
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.getDirectory = function(path, options, successCallback, errorCallback) {
-    argscheck.checkArgs('sOFF', 'DirectoryEntry.getDirectory', arguments);
-    var win = successCallback && function(result) {
-        var entry = new DirectoryEntry(result.name, result.fullPath);
-        successCallback(entry);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "getDirectory", [this.fullPath, path, options]);
-};
-
-/**
- * Deletes a directory and all of it's contents
- *
- * @param {Function} successCallback is called with no parameters
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.removeRecursively = function(successCallback, errorCallback) {
-    argscheck.checkArgs('FF', 'DirectoryEntry.removeRecursively', arguments);
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(successCallback, fail, "File", "removeRecursively", [this.fullPath]);
-};
-
-/**
- * Creates or looks up a file
- *
- * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a file
- * @param {Flags} options to create or exclusively create the file
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.getFile = function(path, options, successCallback, errorCallback) {
-    argscheck.checkArgs('sOFF', 'DirectoryEntry.getFile', arguments);
-    var win = successCallback && function(result) {
-        var FileEntry = require('cordova/plugin/FileEntry');
-        var entry = new FileEntry(result.name, result.fullPath);
-        successCallback(entry);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "getFile", [this.fullPath, path, options]);
-};
-
-module.exports = DirectoryEntry;
-
-});
-
-// file: lib\common\plugin\DirectoryReader.js
-define("cordova/plugin/DirectoryReader", function(require, exports, module) {
-
-var exec = require('cordova/exec'),
-    FileError = require('cordova/plugin/FileError') ;
-
-/**
- * An interface that lists the files and directories in a directory.
- */
-function DirectoryReader(path) {
-    this.path = path || null;
-}
-
-/**
- * Returns a list of entries from a directory.
- *
- * @param {Function} successCallback is called with a list of entries
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryReader.prototype.readEntries = function(successCallback, errorCallback) {
-    var win = typeof successCallback !== 'function' ? null : function(result) {
-        var retVal = [];
-        for (var i=0; i<result.length; i++) {
-            var entry = null;
-            if (result[i].isDirectory) {
-                entry = new (require('cordova/plugin/DirectoryEntry'))();
-            }
-            else if (result[i].isFile) {
-                entry = new (require('cordova/plugin/FileEntry'))();
-            }
-            entry.isDirectory = result[i].isDirectory;
-            entry.isFile = result[i].isFile;
-            entry.name = result[i].name;
-            entry.fullPath = result[i].fullPath;
-            retVal.push(entry);
-        }
-        successCallback(retVal);
-    };
-    var fail = typeof errorCallback !== 'function' ? null : function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "readEntries", [this.path]);
-};
-
-module.exports = DirectoryReader;
-
-});
-
-// file: lib\common\plugin\Entry.js
-define("cordova/plugin/Entry", function(require, exports, module) {
-
-var argscheck = require('cordova/argscheck'),
-    exec = require('cordova/exec'),
-    FileError = require('cordova/plugin/FileError'),
-    Metadata = require('cordova/plugin/Metadata');
-
-/**
- * Represents a file or directory on the local file system.
- *
- * @param isFile
- *            {boolean} true if Entry is a file (readonly)
- * @param isDirectory
- *            {boolean} true if Entry is a directory (readonly)
- * @param name
- *            {DOMString} name of the file or directory, excluding the path
- *            leading to it (readonly)
- * @param fullPath
- *            {DOMString} the absolute full path to the file or directory
- *            (readonly)
- */
-function Entry(isFile, isDirectory, name, fullPath, fileSystem) {
-    this.isFile = !!isFile;
-    this.isDirectory = !!isDirectory;
-    this.name = name || '';
-    this.fullPath = fullPath || '';
-    this.filesystem = fileSystem || null;
-}
-
-/**
- * Look up the metadata of the entry.
- *
- * @param successCallback
- *            {Function} is called with a Metadata object
- * @param errorCallback
- *            {Function} is called with a FileError
- */
-Entry.prototype.getMetadata = function(successCallback, errorCallback) {
-    argscheck.checkArgs('FF', 'Entry.getMetadata', arguments);
-    var success = successCallback && function(lastModified) {
-        var metadata = new Metadata(lastModified);
-        successCallback(metadata);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-
-    exec(success, fail, "File", "getMetadata", [this.fullPath]);
-};
-
-/**
- * Set the metadata of the entry.
- *
- * @param successCallback
- *            {Function} is called with a Metadata object
- * @param errorCallback
- *            {Function} is called with a FileError
- * @param metadataObject
- *            {Object} keys and values to set
- */
-Entry.prototype.setMetadata = function(successCallback, errorCallback, metadataObject) {
-    argscheck.checkArgs('FFO', 'Entry.setMetadata', arguments);
-    exec(successCallback, errorCallback, "File", "setMetadata", [this.fullPath, metadataObject]);
-};
-
-/**
- * Move a file or directory to a new location.
- *
- * @param parent
- *            {DirectoryEntry} the directory to which to move this entry
- * @param newName
- *            {DOMString} new name of the entry, defaults to the current name
- * @param successCallback
- *            {Function} called with the new DirectoryEntry object
- * @param errorCallback
- *            {Function} called with a FileError
- */
-Entry.prototype.moveTo = function(parent, newName, successCallback, errorCallback) {
-    argscheck.checkArgs('oSFF', 'Entry.moveTo', arguments);
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    // source path
-    var srcPath = this.fullPath,
-        // entry name
-        name = newName || this.name,
-        success = function(entry) {
-            if (entry) {
-                if (successCallback) {
-                    // create appropriate Entry object
-                    var result = (entry.isDirectory) ? new (require('cordova/plugin/DirectoryEntry'))(entry.name, entry.fullPath) : new (require('cordova/plugin/FileEntry'))(entry.name, entry.fullPath);
-                    successCallback(result);
-                }
-            }
-            else {
-                // no Entry object returned
-                fail && fail(FileError.NOT_FOUND_ERR);
-            }
-        };
-
-    // copy
-    exec(success, fail, "File", "moveTo", [srcPath, parent.fullPath, name]);
-};
-
-/**
- * Copy a directory to a different location.
- *
- * @param parent
- *            {DirectoryEntry} the directory to which to copy the entry
- * @param newName
- *            {DOMString} new name of the entry, defaults to the current name
- * @param successCallback
- *            {Function} called with the new Entry object
- * @param errorCallback
- *            {Function} called with a FileError
- */
-Entry.prototype.copyTo = function(parent, newName, successCallback, errorCallback) {
-    argscheck.checkArgs('oSFF', 'Entry.copyTo', arguments);
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-
-        // source path
-    var srcPath = this.fullPath,
-        // entry name
-        name = newName || this.name,
-        // success callback
-        success = function(entry) {
-            if (entry) {
-                if (successCallback) {
-                    // create appropriate Entry object
-                    var result = (entry.isDirectory) ? new (require('cordova/plugin/DirectoryEntry'))(entry.name, entry.fullPath) : new (require('cordova/plugin/FileEntry'))(entry.name, entry.fullPath);
-                    successCallback(result);
-                }
-            }
-            else {
-                // no Entry object returned
-                fail && fail(FileError.NOT_FOUND_ERR);
-            }
-        };
-
-    // copy
-    exec(success, fail, "File", "copyTo", [srcPath, parent.fullPath, name]);
-};
-
-/**
- * Return a URL that can be used to identify this entry.
- */
-Entry.prototype.toURL = function() {
-    // fullPath attribute contains the full URL
-    return this.fullPath;
-};
-
-/**
- * Returns a URI that can be used to identify this entry.
- *
- * @param {DOMString} mimeType for a FileEntry, the mime type to be used to interpret the file, when loaded through this URI.
- * @return uri
- */
-Entry.prototype.toURI = function(mimeType) {
-    console.log("DEPRECATED: Update your code to use 'toURL'");
-    // fullPath attribute contains the full URI
-    return this.toURL();
-};
-
-/**
- * Remove a file or directory. It is an error to attempt to delete a
- * directory that is not empty. It is an error to attempt to delete a
- * root directory of a file system.
- *
- * @param successCallback {Function} called with no parameters
- * @param errorCallback {Function} called with a FileError
- */
-Entry.prototype.remove = function(successCallback, errorCallback) {
-    argscheck.checkArgs('FF', 'Entry.remove', arguments);
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(successCallback, fail, "File", "remove", [this.fullPath]);
-};
-
-/**
- * Look up the parent DirectoryEntry of this entry.
- *
- * @param successCallback {Function} called with the parent DirectoryEntry object
- * @param errorCallback {Function} called with a FileError
- */
-Entry.prototype.getParent = function(successCallback, errorCallback) {
-    argscheck.checkArgs('FF', 'Entry.getParent', arguments);
-    var win = successCallback && function(result) {
-        var DirectoryEntry = require('cordova/plugin/DirectoryEntry');
-        var entry = new DirectoryEntry(result.name, result.fullPath);
-        successCallback(entry);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "getParent", [this.fullPath]);
-};
-
-module.exports = Entry;
-
-});
-
-// file: lib\common\plugin\File.js
-define("cordova/plugin/File", function(require, exports, module) {
-
-/**
- * Constructor.
- * name {DOMString} name of the file, without path information
- * fullPath {DOMString} the full path of the file, including the name
- * type {DOMString} mime type
- * lastModifiedDate {Date} last modified date
- * size {Number} size of the file in bytes
- */
-
-var File = function(name, fullPath, type, lastModifiedDate, size){
-    this.name = name || '';
-    this.fullPath = fullPath || null;
-    this.type = type || null;
-    this.lastModifiedDate = lastModifiedDate || null;
-    this.size = size || 0;
-
-    // These store the absolute start and end for slicing the file.
-    this.start = 0;
-    this.end = this.size;
-};
-
-/**
- * Returns a "slice" of the file. Since Cordova Files don't contain the actual
- * content, this really returns a File with adjusted start and end.
- * Slices of slices are supported.
- * start {Number} The index at which to start the slice (inclusive).
- * end {Number} The index at which to end the slice (exclusive).
- */
-File.prototype.slice = function(start, end) {
-    var size = this.end - this.start;
-    var newStart = 0;
-    var newEnd = size;
-    if (arguments.length) {
-        if (start < 0) {
-            newStart = Math.max(size + start, 0);
-        } else {
-            newStart = Math.min(size, start);
-        }
-    }
-
-    if (arguments.length >= 2) {
-        if (end < 0) {
-            newEnd = Math.max(size + end, 0);
-        } else {
-            newEnd = Math.min(end, size);
-        }
-    }
-
-    var newFile = new File(this.name, this.fullPath, this.type, this.lastModifiedData, this.size);
-    newFile.start = this.start + newStart;
-    newFile.end = this.start + newEnd;
-    return newFile;
-};
-
-
-module.exports = File;
-
-});
-
-// file: lib\common\plugin\FileEntry.js
-define("cordova/plugin/FileEntry", function(require, exports, module) {
-
-var utils = require('cordova/utils'),
-    exec = require('cordova/exec'),
-    Entry = require('cordova/plugin/Entry'),
-    FileWriter = require('cordova/plugin/FileWriter'),
-    File = require('cordova/plugin/File'),
-    FileError = require('cordova/plugin/FileError');
-
-/**
- * An interface representing a file on the file system.
- *
- * {boolean} isFile always true (readonly)
- * {boolean} isDirectory always false (readonly)
- * {DOMString} name of the file, excluding the path leading to it (readonly)
- * {DOMString} fullPath the absolute full path to the file (readonly)
- * {FileSystem} filesystem on which the file resides (readonly)
- */
-var FileEntry = function(name, fullPath) {
-     FileEntry.__super__.constructor.apply(this, [true, false, name, fullPath]);
-};
-
-utils.extend(FileEntry, Entry);
-
-/**
- * Creates a new FileWriter associated with the file that this FileEntry represents.
- *
- * @param {Function} successCallback is called with the new FileWriter
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.createWriter = function(successCallback, errorCallback) {
-    this.file(function(filePointer) {
-        var writer = new FileWriter(filePointer);
-
-        if (writer.fileName === null || writer.fileName === "") {
-            errorCallback && errorCallback(new FileError(FileError.INVALID_STATE_ERR));
-        } else {
-            successCallback && successCallback(writer);
-        }
-    }, errorCallback);
-};
-
-/**
- * Returns a File that represents the current state of the file that this FileEntry represents.
- *
- * @param {Function} successCallback is called with the new File object
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.file = function(successCallback, errorCallback) {
-    var win = successCallback && function(f) {
-        var file = new File(f.name, f.fullPath, f.type, f.lastModifiedDate, f.size);
-        successCallback(file);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "getFileMetadata", [this.fullPath]);
-};
-
-
-module.exports = FileEntry;
-
-});
-
-// file: lib\common\plugin\FileError.js
-define("cordova/plugin/FileError", function(require, exports, module) {
-
-/**
- * FileError
- */
-function FileError(error) {
-  this.code = error || null;
-}
-
-// File error codes
-// Found in DOMException
-FileError.NOT_FOUND_ERR = 1;
-FileError.SECURITY_ERR = 2;
-FileError.ABORT_ERR = 3;
-
-// Added by File API specification
-FileError.NOT_READABLE_ERR = 4;
-FileError.ENCODING_ERR = 5;
-FileError.NO_MODIFICATION_ALLOWED_ERR = 6;
-FileError.INVALID_STATE_ERR = 7;
-FileError.SYNTAX_ERR = 8;
-FileError.INVALID_MODIFICATION_ERR = 9;
-FileError.QUOTA_EXCEEDED_ERR = 10;
-FileError.TYPE_MISMATCH_ERR = 11;
-FileError.PATH_EXISTS_ERR = 12;
-
-module.exports = FileError;
-
-});
-
-// file: lib\common\plugin\FileReader.js
-define("cordova/plugin/FileReader", function(require, exports, module) {
-
-var exec = require('cordova/exec'),
-    modulemapper = require('cordova/modulemapper'),
-    utils = require('cordova/utils'),
-    File = require('cordova/plugin/File'),
-    FileError = require('cordova/plugin/FileError'),
-    ProgressEvent = require('cordova/plugin/ProgressEvent'),
-    origFileReader = modulemapper.getOriginalSymbol(this, 'FileReader');
-
-/**
- * This class reads the mobile device file system.
- *
- * For Android:
- *      The root directory is the root of the file system.
- *      To read from the SD card, the file name is "sdcard/my_file.txt"
- * @constructor
- */
-var FileReader = function() {
-    this._readyState = 0;
-    this._error = null;
-    this._result = null;
-    this._fileName = '';
-    this._realReader = origFileReader ? new origFileReader() : {};
-};
-
-// States
-FileReader.EMPTY = 0;
-FileReader.LOADING = 1;
-FileReader.DONE = 2;
-
-utils.defineGetter(FileReader.prototype, 'readyState', function() {
-    return this._fileName ? this._readyState : this._realReader.readyState;
-});
-
-utils.defineGetter(FileReader.prototype, 'error', function() {
-    return this._fileName ? this._error: this._realReader.error;
-});
-
-utils.defineGetter(FileReader.prototype, 'result', function() {
-    return this._fileName ? this._result: this._realReader.result;
-});
-
-function defineEvent(eventName) {
-    utils.defineGetterSetter(FileReader.prototype, eventName, function() {
-        return this._realReader[eventName] || null;
-    }, function(value) {
-        this._realReader[eventName] = value;
-    });
-}
-defineEvent('onloadstart');    // When the read starts.
-defineEvent('onprogress');     // While reading (and decoding) file or fileBlob data, and reporting partial file data (progress.loaded/progress.total)
-defineEvent('onload');         // When the read has successfully completed.
-defineEvent('onerror');        // When the read has failed (see errors).
-defineEvent('onloadend');      // When the request has completed (either in success or failure).
-defineEvent('onabort');        // When the read has been aborted. For instance, by invoking the abort() method.
-
-function initRead(reader, file) {
-    // Already loading something
-    if (reader.readyState == FileReader.LOADING) {
-      throw new FileError(FileError.INVALID_STATE_ERR);
-    }
-
-    reader._result = null;
-    reader._error = null;
-    reader._readyState = FileReader.LOADING;
-
-    if (typeof file == 'string') {
-        // Deprecated in Cordova 2.4.
-        console.warning('Using a string argument with FileReader.readAs functions is deprecated.');
-        reader._fileName = file;
-    } else if (typeof file.fullPath == 'string') {
-        reader._fileName = file.fullPath;
-    } else {
-        reader._fileName = '';
-        return true;
-    }
-
-    reader.onloadstart && reader.onloadstart(new ProgressEvent("loadstart", {target:reader}));
-}
-
-/**
- * Abort reading file.
- */
-FileReader.prototype.abort = function() {
-    if (origFileReader && !this._fileName) {
-        return this._realReader.abort();
-    }
-    this._result = null;
-
-    if (this._readyState == FileReader.DONE || this._readyState == FileReader.EMPTY) {
-      return;
-    }
-
-    this._readyState = FileReader.DONE;
-
-    // If abort callback
-    if (typeof this.onabort === 'function') {
-        this.onabort(new ProgressEvent('abort', {target:this}));
-    }
-    // If load end callback
-    if (typeof this.onloadend === 'function') {
-        this.onloadend(new ProgressEvent('loadend', {target:this}));
-    }
-};
-
-/**
- * Read text file.
- *
- * @param file          {File} File object containing file properties
- * @param encoding      [Optional] (see http://www.iana.org/assignments/character-sets)
- */
-FileReader.prototype.readAsText = function(file, encoding) {
-    if (initRead(this, file)) {
-        return this._realReader.readAsText(file, encoding);
-    }
-
-    // Default encoding is UTF-8
-    var enc = encoding ? encoding : "UTF-8";
-    var me = this;
-    var execArgs = [this._fileName, enc, file.start, file.end];
-
-    // Read file
-    exec(
-        // Success callback
-        function(r) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // Save result
-            me._result = r;
-
-            // If onload callback
-            if (typeof me.onload === "function") {
-                me.onload(new ProgressEvent("load", {target:me}));
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        },
-        // Error callback
-        function(e) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            // null result
-            me._result = null;
-
-            // Save error
-            me._error = new FileError(e);
-
-            // If onerror callback
-            if (typeof me.onerror === "function") {
-                me.onerror(new ProgressEvent("error", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        }, "File", "readAsText", execArgs);
-};
-
-
-/**
- * Read file and return data as a base64 encoded data url.
- * A data url is of the form:
- *      data:[<mediatype>][;base64],<data>
- *
- * @param file          {File} File object containing file properties
- */
-FileReader.prototype.readAsDataURL = function(file) {
-    if (initRead(this, file)) {
-        return this._realReader.readAsDataURL(file);
-    }
-
-    var me = this;
-    var execArgs = [this._fileName, file.start, file.end];
-
-    // Read file
-    exec(
-        // Success callback
-        function(r) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            // Save result
-            me._result = r;
-
-            // If onload callback
-            if (typeof me.onload === "function") {
-                me.onload(new ProgressEvent("load", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        },
-        // Error callback
-        function(e) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            me._result = null;
-
-            // Save error
-            me._error = new FileError(e);
-
-            // If onerror callback
-            if (typeof me.onerror === "function") {
-                me.onerror(new ProgressEvent("error", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        }, "File", "readAsDataURL", execArgs);
-};
-
-/**
- * Read file and return data as a binary data.
- *
- * @param file          {File} File object containing file properties
- */
-FileReader.prototype.readAsBinaryString = function(file) {
-    if (initRead(this, file)) {
-        return this._realReader.readAsBinaryString(file);
-    }
-
-    var me = this;
-    var execArgs = [this._fileName, file.start, file.end];
-
-    // Read file
-    exec(
-        // Success callback
-        function(r) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            me._result = r;
-
-            // If onload callback
-            if (typeof me.onload === "function") {
-                me.onload(new ProgressEvent("load", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        },
-        // Error callback
-        function(e) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            me._result = null;
-
-            // Save error
-            me._error = new FileError(e);
-
-            // If onerror callback
-            if (typeof me.onerror === "function") {
-                me.onerror(new ProgressEvent("error", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        }, "File", "readAsBinaryString", execArgs);
-};
-
-/**
- * Read file and return data as a binary data.
- *
- * @param file          {File} File object containing file properties
- */
-FileReader.prototype.readAsArrayBuffer = function(file) {
-    if (initRead(this, file)) {
-        return this._realReader.readAsArrayBuffer(file);
-    }
-
-    var me = this;
-    var execArgs = [this._fileName, file.start, file.end];
-
-    // Read file
-    exec(
-        // Success callback
-        function(r) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            me._result = r;
-
-            // If onload callback
-            if (typeof me.onload === "function") {
-                me.onload(new ProgressEvent("load", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        },
-        // Error callback
-        function(e) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            me._result = null;
-
-            // Save error
-            me._error = new FileError(e);
-
-            // If onerror callback
-            if (typeof me.onerror === "function") {
-                me.onerror(new ProgressEvent("error", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        }, "File", "readAsArrayBuffer", execArgs);
-};
-
-module.exports = FileReader;
-
-});
-
-// file: lib\common\plugin\FileSystem.js
-define("cordova/plugin/FileSystem", function(require, exports, module) {
-
-var DirectoryEntry = require('cordova/plugin/DirectoryEntry');
-
-/**
- * An interface representing a file system
- *
- * @constructor
- * {DOMString} name the unique name of the file system (readonly)
- * {DirectoryEntry} root directory of the file system (readonly)
- */
-var FileSystem = function(name, root) {
-    this.name = name || null;
-    if (root) {
-        this.root = new DirectoryEntry(root.name, root.fullPath);
-    }
-};
-
-module.exports = FileSystem;
-
-});
-
-// file: lib\common\plugin\FileTransfer.js
-define("cordova/plugin/FileTransfer", function(require, exports, module) {
-
-var argscheck = require('cordova/argscheck'),
-    exec = require('cordova/exec'),
-    FileTransferError = require('cordova/plugin/FileTransferError'),
-    ProgressEvent = require('cordova/plugin/ProgressEvent');
-
-function newProgressEvent(result) {
-    var pe = new ProgressEvent();
-    pe.lengthComputable = result.lengthComputable;
-    pe.loaded = result.loaded;
-    pe.total = result.total;
-    return pe;
-}
-
-function getBasicAuthHeader(urlString) {
-    var header =  null;
-
-    if (window.btoa) {
-        // parse the url using the Location object
-        var url = document.createElement('a');
-        url.href = urlString;
-
-        var credentials = null;
-        var protocol = url.protocol + "//";
-        var origin = protocol + url.host;
-
-        // check whether there are the username:password credentials in the url
-        if (url.href.indexOf(origin) != 0) { // credentials found
-            var atIndex = url.href.indexOf("@");
-            credentials = url.href.substring(protocol.length, atIndex);
-        }
-
-        if (credentials) {
-            var authHeader = "Authorization";
-            var authHeaderValue = "Basic " + window.btoa(credentials);
-
-            header = {
-                name : authHeader,
-                value : authHeaderValue
-            };
-        }
-    }
-
-    return header;
-}
-
-var idCounter = 0;
-
-/**
- * FileTransfer uploads a file to a remote server.
- * @constructor
- */
-var FileTransfer = function() {
-    this._id = ++idCounter;
-    this.onprogress = null; // optional callback
-};
-
-/**
-* Given an absolute file path, uploads a file on the device to a remote server
-* using a multipart HTTP request.
-* @param filePath {String}           Full path of the file on the device
-* @param server {String}             URL of the server to receive the file
-* @param successCallback (Function}  Callback to be invoked when upload has completed
-* @param errorCallback {Function}    Callback to be invoked upon error
-* @param options {FileUploadOptions} Optional parameters such as file name and mimetype
-* @param trustAllHosts {Boolean} Optional trust all hosts (e.g. for self-signed certs), defaults to false
-*/
-FileTransfer.prototype.upload = function(filePath, server, successCallback, errorCallback, options, trustAllHosts) {
-    argscheck.checkArgs('ssFFO*', 'FileTransfer.upload', arguments);
-    // check for options
-    var fileKey = null;
-    var fileName = null;
-    var mimeType = null;
-    var params = null;
-    var chunkedMode = true;
-    var headers = null;
-
-    var basicAuthHeader = getBasicAuthHeader(server);
-    if (basicAuthHeader) {
-        if (!options) {
-            options = new FileUploadOptions();
-        }
-        if (!options.headers) {
-            options.headers = {};
-        }
-        options.headers[basicAuthHeader.name] = basicAuthHeader.value;
-    }
-
-    if (options) {
-        fileKey = options.fileKey;
-        fileName = options.fileName;
-        mimeType = options.mimeType;
-        headers = options.headers;
-        if (options.chunkedMode !== null || typeof options.chunkedMode != "undefined") {
-            chunkedMode = options.chunkedMode;
-        }
-        if (options.params) {
-            params = options.params;
-        }
-        else {
-            params = {};
-        }
-    }
-
-    var fail = errorCallback && function(e) {
-        var error = new FileTransferError(e.code, e.source, e.target, e.http_status, e.body);
-        errorCallback(error);
-    };
-
-    var self = this;
-    var win = function(result) {
-        if (typeof result.lengthComputable != "undefined") {
-            if (self.onprogress) {
-                self.onprogress(newProgressEvent(result));
-            }
-        } else {
-            successCallback && successCallback(result);
-        }
-    };
-    exec(win, fail, 'FileTransfer', 'upload', [filePath, server, fileKey, fileName, mimeType, params, trustAllHosts, chunkedMode, headers, this._id]);
-};
-
-/**
- * Downloads a file form a given URL and saves it to the specified directory.
- * @param source {String}          URL of the server to receive the file
- * @param target {String}         Full path of the file on the device
- * @param successCallback (Function}  Callback to be invoked when upload has completed
- * @param errorCallback {Function}    Callback to be invoked upon error
- * @param trustAllHosts {Boolean} Optional trust all hosts (e.g. for self-signed certs), defaults to false
- * @param options {FileDownloadOptions} Optional parameters such as headers
- */
-FileTransfer.prototype.download = function(source, target, successCallback, errorCallback, trustAllHosts, options) {
-    argscheck.checkArgs('ssFF*', 'FileTransfer.download', arguments);
-    var self = this;
-
-    var basicAuthHeader = getBasicAuthHeader(source);
-    if (basicAuthHeader) {
-        if (!options) {
-            options = {};
-        }
-        if (!options.headers) {
-            options.headers = {};
-        }
-        options.headers[basicAuthHeader.name] = basicAuthHeader.value;
-    }
-
-    var headers = null;
-    if (opt

<TRUNCATED>

[04/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/windows8/www/css/index.css
----------------------------------------------------------------------
diff --git a/spec/projects/windows8/www/css/index.css b/spec/projects/windows8/www/css/index.css
deleted file mode 100644
index 51daa79..0000000
--- a/spec/projects/windows8/www/css/index.css
+++ /dev/null
@@ -1,115 +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.
- */
-* {
-    -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
-}
-
-body {
-    -webkit-touch-callout: none;                /* prevent callout to copy image, etc when tap to hold */
-    -webkit-text-size-adjust: none;             /* prevent webkit from resizing text to fit */
-    -webkit-user-select: none;                  /* prevent copy paste, to allow, change 'none' to 'text' */
-    background-color:#E4E4E4;
-    background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
-    background-image:-webkit-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
-    background-image:-ms-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
-    background-image:-webkit-gradient(
-        linear,
-        left top,
-        left bottom,
-        color-stop(0, #A7A7A7),
-        color-stop(0.51, #E4E4E4)
-    );
-    background-attachment:fixed;
-    font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif;
-    font-size:12px;
-    height:100%;
-    margin:0px;
-    padding:0px;
-    text-transform:uppercase;
-    width:100%;
-}
-
-/* Portrait layout (default) */
-.app {
-    background:url(../img/logo.png) no-repeat center top; /* 170px x 200px */
-    position:absolute;             /* position in the center of the screen */
-    left:50%;
-    top:50%;
-    height:50px;                   /* text area height */
-    width:225px;                   /* text area width */
-    text-align:center;
-    padding:180px 0px 0px 0px;     /* image height is 200px (bottom 20px are overlapped with text) */
-    margin:-115px 0px 0px -112px;  /* offset vertical: half of image height and text area height */
-                                   /* offset horizontal: half of text area width */
-}
-
-/* Landscape layout (with min-width) */
-@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) {
-    .app {
-        background-position:left center;
-        padding:75px 0px 75px 170px;  /* padding-top + padding-bottom + text area = image height */
-        margin:-90px 0px 0px -198px;  /* offset vertical: half of image height */
-                                      /* offset horizontal: half of image width and text area width */
-    }
-}
-
-h1 {
-    font-size:24px;
-    font-weight:normal;
-    margin:0px;
-    overflow:visible;
-    padding:0px;
-    text-align:center;
-}
-
-.event {
-    border-radius:4px;
-    -webkit-border-radius:4px;
-    color:#FFFFFF;
-    font-size:12px;
-    margin:0px 30px;
-    padding:2px 0px;
-}
-
-.event.listening {
-    background-color:#333333;
-    display:block;
-}
-
-.event.received {
-    background-color:#4B946A;
-    display:none;
-}
-
-@keyframes fade {
-    from { opacity: 1.0; }
-    50% { opacity: 0.4; }
-    to { opacity: 1.0; }
-}
- 
-@-webkit-keyframes fade {
-    from { opacity: 1.0; }
-    50% { opacity: 0.4; }
-    to { opacity: 1.0; }
-}
- 
-.blink {
-    animation:fade 3000ms infinite;
-    -webkit-animation:fade 3000ms infinite;
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/windows8/www/img/logo.png
----------------------------------------------------------------------
diff --git a/spec/projects/windows8/www/img/logo.png b/spec/projects/windows8/www/img/logo.png
deleted file mode 100644
index 86a48a8..0000000
Binary files a/spec/projects/windows8/www/img/logo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/windows8/www/img/smalllogo.png
----------------------------------------------------------------------
diff --git a/spec/projects/windows8/www/img/smalllogo.png b/spec/projects/windows8/www/img/smalllogo.png
deleted file mode 100644
index 0e648ef..0000000
Binary files a/spec/projects/windows8/www/img/smalllogo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/windows8/www/img/splashscreen.png
----------------------------------------------------------------------
diff --git a/spec/projects/windows8/www/img/splashscreen.png b/spec/projects/windows8/www/img/splashscreen.png
deleted file mode 100644
index d1e6c98..0000000
Binary files a/spec/projects/windows8/www/img/splashscreen.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/windows8/www/img/storelogo.png
----------------------------------------------------------------------
diff --git a/spec/projects/windows8/www/img/storelogo.png b/spec/projects/windows8/www/img/storelogo.png
deleted file mode 100644
index dd00478..0000000
Binary files a/spec/projects/windows8/www/img/storelogo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/windows8/www/index.html
----------------------------------------------------------------------
diff --git a/spec/projects/windows8/www/index.html b/spec/projects/windows8/www/index.html
deleted file mode 100644
index ca8ab84..0000000
--- a/spec/projects/windows8/www/index.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE html>
-<!--
-    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.
--->
-<html>
-    <head>
-        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-        <meta name="format-detection" content="telephone=no" />
-        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
-        <link rel="stylesheet" type="text/css" href="css/index.css" />
-        <title>Hello World</title>
-    </head>
-    <body>
-        <div class="app">
-            <h1>Apache Cordova</h1>
-            <div id="deviceready" class="blink">
-                <p class="event listening">Connecting to Device</p>
-                <p class="event received">Device is Ready</p>
-            </div>
-        </div>
-        <script type="text/javascript" src="cordova-2.6.0.js"></script>
-        <script type="text/javascript" src="js/index.js"></script>
-        <script type="text/javascript">
-            app.initialize();
-        </script>
-    </body>
-</html>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/windows8/www/js/index.js
----------------------------------------------------------------------
diff --git a/spec/projects/windows8/www/js/index.js b/spec/projects/windows8/www/js/index.js
deleted file mode 100644
index 87b5660..0000000
--- a/spec/projects/windows8/www/js/index.js
+++ /dev/null
@@ -1,49 +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 app = {
-    // Application Constructor
-    initialize: function() {
-        this.bindEvents();
-    },
-    // Bind Event Listeners
-    //
-    // Bind any events that are required on startup. Common events are:
-    // 'load', 'deviceready', 'offline', and 'online'.
-    bindEvents: function() {
-        document.addEventListener('deviceready', this.onDeviceReady, false);
-    },
-    // deviceready Event Handler
-    //
-    // The scope of 'this' is the event. In order to call the 'receivedEvent'
-    // function, we must explicitly call 'app.receivedEvent(...);'
-    onDeviceReady: function() {
-        app.receivedEvent('deviceready');
-    },
-    // Update DOM on a Received Event
-    receivedEvent: function(id) {
-        var parentElement = document.getElementById(id);
-        var listeningElement = parentElement.querySelector('.listening');
-        var receivedElement = parentElement.querySelector('.received');
-
-        listeningElement.setAttribute('style', 'display:none;');
-        receivedElement.setAttribute('style', 'display:block;');
-
-        console.log('Received Event: ' + id);
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/wp7/CordovaAppProj.csproj
----------------------------------------------------------------------
diff --git a/spec/projects/wp7/CordovaAppProj.csproj b/spec/projects/wp7/CordovaAppProj.csproj
deleted file mode 100644
index 4b122a2..0000000
--- a/spec/projects/wp7/CordovaAppProj.csproj
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-    <PropertyGroup>
-        <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-        <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-        <ProductVersion>10.0.20506</ProductVersion>
-        <SchemaVersion>2.0</SchemaVersion>
-        <ProjectGuid>{3677C1B7-D68B-4CF9-BF8A-E869D437A6DF}</ProjectGuid>
-        <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
-        <OutputType>Library</OutputType>
-        <AppDesignerFolder>Properties</AppDesignerFolder>
-        <RootNamespace>$safeprojectname$</RootNamespace>
-        <AssemblyName>$safeprojectname$</AssemblyName>
-        <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
-        <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
-        <TargetFrameworkProfile>WindowsPhone71</TargetFrameworkProfile>
-        <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
-        <SilverlightApplication>true</SilverlightApplication>
-        <SupportedCultures>
-        </SupportedCultures>
-        <XapOutputs>true</XapOutputs>
-        <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
-        <XapFilename>$safeprojectname$.xap</XapFilename>
-        <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
-        <SilverlightAppEntry>$safeprojectname$.App</SilverlightAppEntry>
-        <ValidateXaml>true</ValidateXaml>
-        <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
-    </PropertyGroup>
-    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-        <DebugSymbols>true</DebugSymbols>
-        <DebugType>full</DebugType>
-        <Optimize>false</Optimize>
-        <OutputPath>Bin\Debug</OutputPath>
-        <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
-        <NoStdLib>true</NoStdLib>
-        <NoConfig>true</NoConfig>
-        <ErrorReport>prompt</ErrorReport>
-        <WarningLevel>4</WarningLevel>
-    </PropertyGroup>
-    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-        <DebugType>pdbonly</DebugType>
-        <Optimize>true</Optimize>
-        <OutputPath>Bin\Release</OutputPath>
-        <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
-        <NoStdLib>true</NoStdLib>
-        <NoConfig>true</NoConfig>
-        <ErrorReport>prompt</ErrorReport>
-        <WarningLevel>4</WarningLevel>
-    </PropertyGroup>
-    <ItemGroup>
-        <Reference Include="Microsoft.Devices.Sensors" />
-        <Reference Include="Microsoft.Phone" />
-        <Reference Include="Microsoft.Phone.Interop" />
-        <Reference Include="Microsoft.Xna.Framework" />
-        <Reference Include="System.Device" />
-        <Reference Include="System.Runtime.Serialization" />
-        <Reference Include="System.Servicemodel.Web" />
-        <Reference Include="System.Windows" />
-        <Reference Include="system" />
-        <Reference Include="System.Core" />
-        <Reference Include="System.Net" />
-        <Reference Include="System.Xml" />
-        <Reference Include="System.Xml.Linq" />
-    </ItemGroup>
-    <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" />
-    <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.CSharp.targets" />
-    <ProjectExtensions />
-    <PropertyGroup>
-        <PreBuildEvent>CScript "$(ProjectDir)/BuildManifestProcessor.js" "$(ProjectPath)"</PreBuildEvent>
-    </PropertyGroup>
-    <PropertyGroup>
-        <PostBuildEvent>
-        </PostBuildEvent>
-    </PropertyGroup>
-    <ItemGroup />
-</Project>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/wp7/Properties/WMAppManifest.xml
----------------------------------------------------------------------
diff --git a/spec/projects/wp7/Properties/WMAppManifest.xml b/spec/projects/wp7/Properties/WMAppManifest.xml
deleted file mode 100644
index b218fcb..0000000
--- a/spec/projects/wp7/Properties/WMAppManifest.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2009/deployment" AppPlatformVersion="7.1">
-  <App xmlns="" ProductID="{5FC10D78-8779-4EDB-9B61-1D04F0A755D4}" Title="An App" 
-       RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal"  
-       Author="An App author" 
-       BitsPerPixel="32" 
-       Description="Apache Cordova for Windows Phone 7"
-       Publisher="An App">
-    
-    <IconPath IsRelative="true" IsResource="false">ApplicationIcon.png</IconPath>
-    <Capabilities>
-      <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />   
-    </Capabilities>
-    
-    <Tasks>
-      <DefaultTask Name="_default" NavigationPage="MainPage.xaml" />
-    </Tasks>
-    <Tokens>
-      <PrimaryToken TokenID="An AppToken" TaskName="_default">
-        <TemplateType5>
-          <BackgroundImageURI IsRelative="true" IsResource="false">Background.png</BackgroundImageURI>
-          <Count>0</Count>
-          <Title>An App</Title>
-        </TemplateType5>
-      </PrimaryToken>
-    </Tokens>
-  </App>
-</Deployment>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/wp8/CordovaAppProj.csproj
----------------------------------------------------------------------
diff --git a/spec/projects/wp8/CordovaAppProj.csproj b/spec/projects/wp8/CordovaAppProj.csproj
deleted file mode 100644
index bc229e5..0000000
--- a/spec/projects/wp8/CordovaAppProj.csproj
+++ /dev/null
@@ -1,136 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-    <PropertyGroup>
-        <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-        <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-        <ProductVersion>10.0.20506</ProductVersion>
-        <SchemaVersion>2.0</SchemaVersion>
-        <ProjectGuid>{3677C1B7-D68B-4CF9-BF8A-E869D437A6DF}</ProjectGuid>
-        <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
-        <OutputType>Library</OutputType>
-        <AppDesignerFolder>Properties</AppDesignerFolder>
-        <RootNamespace>my.test.project</RootNamespace>
-        <AssemblyName>my.test.project</AssemblyName>
-        <TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
-        <SilverlightVersion>
-        </SilverlightVersion>
-        <TargetFrameworkProfile>
-        </TargetFrameworkProfile>
-        <TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>
-        <SilverlightApplication>true</SilverlightApplication>
-        <SupportedCultures>en-US</SupportedCultures>
-        <XapOutputs>true</XapOutputs>
-        <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
-        <XapFilename>CordovaAppProj_$(Configuration)_$(Platform).xap</XapFilename>
-        <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
-        <SilverlightAppEntry>my.test.project.App</SilverlightAppEntry>
-        <ValidateXaml>true</ValidateXaml>
-        <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
-        <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
-        <BackgroundAgentType />
-    </PropertyGroup>
-    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-        <DebugSymbols>true</DebugSymbols>
-        <DebugType>full</DebugType>
-        <Optimize>false</Optimize>
-        <OutputPath>Bin\Debug</OutputPath>
-        <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;WP8</DefineConstants>
-        <NoStdLib>true</NoStdLib>
-        <NoConfig>true</NoConfig>
-        <ErrorReport>prompt</ErrorReport>
-        <WarningLevel>4</WarningLevel>
-        <Prefer32Bit>false</Prefer32Bit>
-    </PropertyGroup>
-    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-        <DebugType>pdbonly</DebugType>
-        <Optimize>true</Optimize>
-        <OutputPath>Bin\Release</OutputPath>
-        <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;WP8</DefineConstants>
-        <NoStdLib>true</NoStdLib>
-        <NoConfig>true</NoConfig>
-        <ErrorReport>prompt</ErrorReport>
-        <WarningLevel>4</WarningLevel>
-        <Prefer32Bit>false</Prefer32Bit>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
-        <DebugSymbols>true</DebugSymbols>
-        <OutputPath>Bin\x86\Debug</OutputPath>
-        <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
-        <NoStdLib>true</NoStdLib>
-        <DebugType>full</DebugType>
-        <PlatformTarget>
-        </PlatformTarget>
-        <ErrorReport>prompt</ErrorReport>
-        <CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
-        <Optimize>false</Optimize>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
-        <OutputPath>Bin\x86\Release</OutputPath>
-        <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
-        <Optimize>true</Optimize>
-        <NoStdLib>true</NoStdLib>
-        <DebugType>pdbonly</DebugType>
-        <PlatformTarget>
-        </PlatformTarget>
-        <ErrorReport>prompt</ErrorReport>
-        <CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
-        <Prefer32Bit>false</Prefer32Bit>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
-        <DebugSymbols>true</DebugSymbols>
-        <OutputPath>Bin\ARM\Debug</OutputPath>
-        <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
-        <NoStdLib>true</NoStdLib>
-        <DebugType>full</DebugType>
-        <PlatformTarget>
-        </PlatformTarget>
-        <ErrorReport>prompt</ErrorReport>
-        <CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
-        <Prefer32Bit>false</Prefer32Bit>
-        <Optimize>false</Optimize>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
-        <OutputPath>Bin\ARM\Release</OutputPath>
-        <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
-        <Optimize>true</Optimize>
-        <NoStdLib>true</NoStdLib>
-        <DebugType>pdbonly</DebugType>
-        <PlatformTarget>
-        </PlatformTarget>
-        <ErrorReport>prompt</ErrorReport>
-        <CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
-        <Prefer32Bit>false</Prefer32Bit>
-    </PropertyGroup>
-    <ItemGroup>
-        <Compile Include="App.xaml.cs">
-            <DependentUpon>App.xaml</DependentUpon>
-        </Compile>
-        <Compile Include="MainPage.xaml.cs">
-            <DependentUpon>MainPage.xaml</DependentUpon>
-        </Compile>
-        <Compile Include="Properties\AssemblyInfo.cs" />
-        <Page Include="src\UI\PageTest.xaml">
-            <SubType>Designer</SubType>
-            <Generator>MSBuild:Compile</Generator>
-        </Page>
-    </ItemGroup>
-    <ItemGroup>
-        <Compile Include="Plugins\org.apache.cordova.core.InAppBrowser\InAppBrowser.cs" />
-    </ItemGroup>
-        <ItemGroup>
-        <Compile Include="src\UI\PageTest.xaml.cs">
-            <DependentUpon>PageTest.xaml</DependentUpon>
-        </Compile>
-    </ItemGroup>
-    <ItemGroup>
-        <Reference Include="LibraryTest">
-            <HintPath>lib\LibraryTest.dll</HintPath>
-        </Reference>
-    </ItemGroup>
-    <ItemGroup>
-        <Compile Include="src\FileTest.cs" />
-    </ItemGroup>
-    <ItemGroup>
-        <Content Include="src\Content.img" />
-    </ItemGroup>
-</Project>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/wp8/Properties/WMAppManifest.xml
----------------------------------------------------------------------
diff --git a/spec/projects/wp8/Properties/WMAppManifest.xml b/spec/projects/wp8/Properties/WMAppManifest.xml
deleted file mode 100644
index 5b37a95..0000000
--- a/spec/projects/wp8/Properties/WMAppManifest.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2012/deployment" AppPlatformVersion="8.0">
-  <DefaultLanguage xmlns="" code="en-US" />
-  <Languages xmlns="">
-    <Language code="en-US" />
-  </Languages>
-  <App xmlns="" ProductID="{F3A8197B-6B16-456D-B5F4-DD4F04AC0BEC}" Title="An App" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal" Author="An App author" BitsPerPixel="32" Description="Apache Cordova for Windows Phone" Publisher="An App" PublisherID="{db093ed5-53b1-45f7-af72-751e8f36ab80}">
-    <IconPath IsRelative="true" IsResource="false">ApplicationIcon.png</IconPath>
-    <Capabilities>
-      <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
-    </Capabilities>
-    <Tasks>
-      <DefaultTask Name="_default" NavigationPage="MainPage.xaml" />
-    </Tasks>
-    <Tokens>
-      <PrimaryToken TokenID="An AppToken" TaskName="_default">
-        <TemplateFlip>
-          <SmallImageURI IsResource="false" IsRelative="true">Background.png</SmallImageURI>
-          <Count>0</Count>
-          <BackgroundImageURI IsResource="false" IsRelative="true">Background.png</BackgroundImageURI>
-          <Title>An App</Title>
-          <BackContent></BackContent>
-          <BackBackgroundImageURI></BackBackgroundImageURI>
-          <BackTitle></BackTitle>
-          <LargeBackgroundImageURI></LargeBackgroundImageURI>
-          <LargeBackContent></LargeBackContent>
-          <LargeBackBackgroundImageURI></LargeBackBackgroundImageURI>
-          <DeviceLockImageURI></DeviceLockImageURI>
-          <HasLarge>false</HasLarge>
-        </TemplateFlip>
-      </PrimaryToken>
-    </Tokens>
-    <ScreenResolutions>
-      <ScreenResolution Name="ID_RESOLUTION_WVGA" />
-      <ScreenResolution Name="ID_RESOLUTION_WXGA" />
-      <ScreenResolution Name="ID_RESOLUTION_HD720P" />
-    </ScreenResolutions>
-  </App>
-</Deployment>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/www-only/.gitkeep
----------------------------------------------------------------------
diff --git a/spec/projects/www-only/.gitkeep b/spec/projects/www-only/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/publish.spec.js
----------------------------------------------------------------------
diff --git a/spec/publish.spec.js b/spec/publish.spec.js
deleted file mode 100644
index 3498bd6..0000000
--- a/spec/publish.spec.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var publish = require('../src/publish'),
-    Q = require('q'),
-    registry = require('../src/registry/registry');
-
-describe('publish', function() {
-    it('should publish a plugin', function() {
-        var sPublish = spyOn(registry, 'publish').andReturn(Q(['/path/to/my/plugin']));
-        publish(new Array('/path/to/myplugin'));
-        expect(sPublish).toHaveBeenCalledWith(['/path/to/myplugin']);
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/registry/registry.spec.js
----------------------------------------------------------------------
diff --git a/spec/registry/registry.spec.js b/spec/registry/registry.spec.js
deleted file mode 100644
index 7615ee6..0000000
--- a/spec/registry/registry.spec.js
+++ /dev/null
@@ -1,134 +0,0 @@
-var registry = require('../../src/registry/registry'),
-    manifest = require('../../src/registry/manifest'),
-    fs = require('fs'),
-    path = require('path'),
-    Q = require('q'),
-    shell   = require('shelljs'),
-    os = require('os'),
-    npm = require('npm');
-
-describe('registry', function() {
-    var done;
-    beforeEach(function() {
-        done = false;
-    });
-    function registryPromise(shouldSucceed, f) {
-        waitsFor(function() { return done; }, 'promise never resolved', 500);
-        return f.then(function() {
-          done = true;
-          expect(shouldSucceed).toBe(true);
-        }, function(err) {
-          done = err;
-          expect(shouldSucceed).toBe(false);
-        });
-    }
-
-    describe('manifest', function() {
-        var pluginDir, packageJson, tmp_plugin, tmp_plugin_xml, tmp_package_json;
-        beforeEach(function() {
-            pluginDir = __dirname + '/../plugins/EnginePlugin';
-            tmp_plugin = path.join(os.tmpdir(), 'plugin');
-            tmp_plugin_xml = path.join(tmp_plugin, 'plugin.xml');
-            tmp_package_json = path.join(tmp_plugin, 'package.json');
-            shell.cp('-R', pluginDir+"/*", tmp_plugin);
-        });
-        afterEach(function() {
-            shell.rm('-rf', tmp_plugin);
-        });
-        it('should generate a package.json from a plugin.xml', function() {
-            registryPromise(true, manifest.generatePackageJsonFromPluginXml(tmp_plugin).then(function() {
-                expect(fs.existsSync(tmp_package_json));
-                var packageJson = JSON.parse(fs.readFileSync(tmp_package_json));
-                expect(packageJson.name).toEqual('com.cordova.engine');
-                expect(packageJson.version).toEqual('1.0.0');
-                expect(packageJson.engines).toEqual(
-                    [ { name : 'cordova', version : '>=2.3.0' }, { name : 'cordova-plugman', version : '>=0.10.0' }, { name : 'mega-fun-plugin', version : '>=1.0.0' }, { name : 'mega-boring-plugin', version : '>=3.0.0' } ]);
-            }));
-        });
-        it('should raise an error if name does not follow com.domain.* format', function() {
-            var xmlData = fs.readFileSync(tmp_plugin_xml).toString().replace('id="com.cordova.engine"', 'id="engine"');
-            fs.writeFileSync(tmp_plugin_xml, xmlData);
-            registryPromise(false, manifest.generatePackageJsonFromPluginXml(tmp_plugin));
-        });
-        it('should generate a package.json if name uses org.apache.cordova.* for a whitelisted plugin', function() {
-            var xmlData = fs.readFileSync(tmp_plugin_xml).toString().replace('id="com.cordova.engine"', 'id="org.apache.cordova.camera"');
-            fs.writeFileSync(tmp_plugin_xml, xmlData);
-            registryPromise(true, manifest.generatePackageJsonFromPluginXml(tmp_plugin).then(function() {
-                expect(!fs.existsSync(tmp_package_json));
-            }));
-        });
-        it('should raise an error if name uses org.apache.cordova.* for a non-whitelisted plugin', function() {
-            var xmlData = fs.readFileSync(tmp_plugin_xml).toString().replace('id="com.cordova.engine"', 'id="org.apache.cordova.myinvalidplugin"');
-            fs.writeFileSync(tmp_plugin_xml, xmlData);
-            registryPromise(false, manifest.generatePackageJsonFromPluginXml(tmp_plugin));
-        });
-    });
-    describe('actions', function() {
-        var fakeLoad, fakeNPMCommands;
-
-        beforeEach(function() {
-            done = false;
-            var fakeSettings = {
-                cache: '/some/cache/dir',
-                logstream: 'somelogstream@2313213',
-                userconfig: '/some/config/dir'
-            };
-
-            var fakeNPM = function() {
-                if (arguments.length > 0) {
-                    var cb = arguments[arguments.length-1];
-                    if (cb && typeof cb === 'function') cb(null, true);
-                }
-            };
-
-            registry.settings = fakeSettings;
-            fakeLoad = spyOn(npm, 'load').andCallFake(function(settings, cb) { cb(null, true); });
-
-            fakeNPMCommands = {};
-            ['config', 'adduser', 'cache', 'publish', 'unpublish', 'search'].forEach(function(cmd) {
-                fakeNPMCommands[cmd] = jasmine.createSpy(cmd).andCallFake(fakeNPM);
-            });
-
-            npm.commands = fakeNPMCommands;
-        });
-        it('should run config', function() {
-            var params = ['set', 'registry', 'http://registry.cordova.io'];
-            registryPromise(true, registry.config(params).then(function() {
-                expect(fakeLoad).toHaveBeenCalledWith(registry.settings, jasmine.any(Function));
-                expect(fakeNPMCommands.config).toHaveBeenCalledWith(params, jasmine.any(Function));
-            }));
-        });
-        it('should run adduser', function() {
-            registryPromise(true, registry.adduser(null).then(function() {
-                expect(fakeLoad).toHaveBeenCalledWith(registry.settings, jasmine.any(Function));
-                expect(fakeNPMCommands.adduser).toHaveBeenCalledWith(null, jasmine.any(Function));
-            }));
-        });
-        it('should run publish', function() {
-            var params = [__dirname + '/../plugins/DummyPlugin'];
-            var spyGenerate = spyOn(manifest, 'generatePackageJsonFromPluginXml').andReturn(Q());
-            var spyUnlink = spyOn(fs, 'unlink');
-            registryPromise(true, registry.publish(params).then(function() {
-                expect(fakeLoad).toHaveBeenCalledWith(registry.settings, jasmine.any(Function));
-                expect(spyGenerate).toHaveBeenCalledWith(params[0]);
-                expect(fakeNPMCommands.publish).toHaveBeenCalledWith(params, jasmine.any(Function));
-                expect(spyUnlink).toHaveBeenCalledWith(path.resolve(params[0], 'package.json'));
-            }));
-        });
-        it('should run unpublish', function() {
-            var params = ['dummyplugin@0.6.0'];
-            registryPromise(true, registry.unpublish(params).then(function() {
-                expect(fakeLoad).toHaveBeenCalledWith(registry.settings, jasmine.any(Function));
-                expect(fakeNPMCommands.unpublish).toHaveBeenCalledWith(params, jasmine.any(Function));
-                expect(fakeNPMCommands.cache).toHaveBeenCalledWith(['clean'], jasmine.any(Function));
-            }));
-        });
-        it('should run search', function() {
-            var params = ['dummyplugin', 'plugin'];
-            registryPromise(true, registry.search(params).then(function() {
-                expect(fakeLoad).toHaveBeenCalledWith(registry.settings, jasmine.any(Function));
-                expect(fakeNPMCommands.search).toHaveBeenCalledWith(params, true, jasmine.any(Function));
-            }));
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/search.spec.js
----------------------------------------------------------------------
diff --git a/spec/search.spec.js b/spec/search.spec.js
deleted file mode 100644
index 4955d2d..0000000
--- a/spec/search.spec.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var search = require('../src/search'),
-    Q = require('q'),
-    registry = require('../src/registry/registry');
-
-describe('search', function() {
-    it('should search a plugin', function() {
-        var sSearch = spyOn(registry, 'search').andReturn(Q());
-        search(new Array('myplugin', 'keyword'));
-        expect(sSearch).toHaveBeenCalledWith(['myplugin', 'keyword']);
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/uninstall.spec.js
----------------------------------------------------------------------
diff --git a/spec/uninstall.spec.js b/spec/uninstall.spec.js
deleted file mode 100644
index a8c2b97..0000000
--- a/spec/uninstall.spec.js
+++ /dev/null
@@ -1,289 +0,0 @@
-var uninstall = require('../src/uninstall'),
-    install = require('../src/install'),
-    actions = require('../src/util/action-stack'),
-    config_changes = require('../src/util/config-changes'),
-    events  = require('../src/events'),
-    plugman = require('../plugman'),
-    common  = require('./common'),
-    fs      = require('fs'),
-    path    = require('path'),
-    shell   = require('shelljs'),
-    Q       = require('q'),
-    spec    = __dirname,
-    done    = false,
-    srcProject = path.join(spec, 'projects', 'android_uninstall'),
-    project = path.join(spec, 'projects', 'android_uninstall.test'),
-    project2 = path.join(spec, 'projects', 'android_uninstall.test2'),
-
-    plugins_dir = path.join(spec, 'plugins'),
-    plugins_install_dir = path.join(project, 'cordova', 'plugins'),
-    plugins_install_dir2 = path.join(project2, 'cordova', 'plugins'),
-
-    plugins = {
-        'DummyPlugin' : path.join(plugins_dir, 'DummyPlugin'),
-        'A' : path.join(plugins_dir, 'dependencies', 'A'),
-        'C' : path.join(plugins_dir, 'dependencies', 'C')
-    },
-    promise,
-    dummy_id = 'com.phonegap.plugins.dummyplugin';
-
-function uninstallPromise(f) {
-    return f.then(function() { done = true; }, function(err) { done = err; });
-}
-
-describe('start', function() {
-
-    it('start', function() {
-        shell.rm('-rf', project);
-        shell.rm('-rf', project2);
-        shell.cp('-R', path.join(srcProject, '*'), project);
-        shell.cp('-R', path.join(srcProject, '*'), project2);
-
-        done = false;
-        promise = Q()
-        .then(
-            function(){ return install('android', project, plugins['DummyPlugin']) }
-        ).then(
-            function(){ return install('android', project, plugins['A']) }
-        ).then(
-            function(){ return install('android', project2, plugins['C']) }
-        ).then(
-            function(){ return install('android', project2, plugins['A']) }
-        ).then(
-            function(){ done = true; }
-        );
-        waitsFor(function() { return done; }, 'promise never resolved', 500);
-    });
-});
-
-describe('uninstallPlatform', function() {
-    var proc, prepare, actions_push, add_to_queue, c_a, rm;
-    var fsWrite;
-
-    var plat_common = require('../src/platforms/common');
-
-    beforeEach(function() {
-        proc = spyOn(actions.prototype, 'process').andReturn(Q());
-        actions_push = spyOn(actions.prototype, 'push');
-        c_a = spyOn(actions.prototype, 'createAction');
-        prepare = spyOn(plugman, 'prepare');
-        fsWrite = spyOn(fs, 'writeFileSync').andReturn(true);
-        rm = spyOn(shell, 'rm').andReturn(true);
-        spyOn(shell, 'cp').andReturn(true);
-        add_to_queue = spyOn(config_changes, 'add_uninstalled_plugin_to_prepare_queue');
-        done = false;
-    });
-    describe('success', function() {
-        it('should call prepare after a successful uninstall', function() {
-            runs(function() {
-                uninstallPromise(uninstall.uninstallPlatform('android', project, dummy_id));
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 200);
-            runs(function() {
-                expect(prepare).toHaveBeenCalled();
-            });
-        });
-        it('should call the config-changes module\'s add_uninstalled_plugin_to_prepare_queue method after processing an install', function() {
-            runs(function() {
-                uninstallPromise(uninstall.uninstallPlatform('android', project, dummy_id));
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 200);
-            runs(function() {
-                expect(add_to_queue).toHaveBeenCalledWith(plugins_install_dir, dummy_id, 'android', true);
-            });
-        });
-        it('should queue up actions as appropriate for that plugin and call process on the action stack', function() {
-            runs(function() {
-                uninstallPromise(uninstall.uninstallPlatform('android', project, dummy_id));
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 200);
-            runs(function() {
-                expect(actions_push.calls.length).toEqual(5);
-                expect(proc).toHaveBeenCalled();
-            });
-        });
-
-        describe('with dependencies', function() {
-            var emit;
-            beforeEach(function() {
-                emit = spyOn(events, 'emit');
-            });
-            it('should uninstall "dangling" dependencies', function() {
-                runs(function() {
-                    uninstallPromise(uninstall.uninstallPlatform('android', project, 'A'));
-                });
-                waitsFor(function() { return done; }, 'promise never resolved', 200);
-                runs(function() {
-                    expect(emit).toHaveBeenCalledWith('log', 'Uninstalling 2 dependent plugins.');
-                });
-            });
-        });
-    });
-
-    describe('failure', function() {
-        it('should throw if platform is unrecognized', function() {
-            runs(function() {
-                uninstallPromise( uninstall.uninstallPlatform('atari', project, 'SomePlugin') );
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 200);
-            runs(function() {
-                expect(''+done).toContain('atari not supported.');
-            });
-        });
-        it('should throw if plugin is missing', function() {
-            runs(function() {
-                uninstallPromise( uninstall.uninstallPlatform('android', project, 'SomePluginThatDoesntExist') );
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 200);
-            runs(function() {
-                expect(''+done).toContain('Plugin "SomePluginThatDoesntExist" not found. Already uninstalled?');
-            });
-        });
-    });
-});
-
-describe('uninstallPlugin', function() {
-    var rm, fsWrite, rmstack = [], emit;
-
-    beforeEach(function() {
-        fsWrite = spyOn(fs, 'writeFileSync').andReturn(true);
-        rm = spyOn(shell, 'rm').andCallFake(function(f,p) { rmstack.push(p); return true});
-        rmstack = [];
-        emit = spyOn(events, 'emit');
-        done = false;
-    });
-    describe('with dependencies', function() {
-
-        it('should delete all dependent plugins', function() {
-            runs(function() {
-                uninstallPromise( uninstall.uninstallPlugin('A', plugins_install_dir) );
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 200);
-            runs(function() {
-                var del = common.spy.getDeleted(emit);
-
-                expect(del).toEqual([
-                    'Deleted "C"',
-                    'Deleted "D"',
-                    'Deleted "A"'
-                ]);
-            });
-        });
-
-        it("should fail if plugin is a required dependency", function() {
-            runs(function() {
-                uninstallPromise( uninstall.uninstallPlugin('C', plugins_install_dir) );
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 200);
-            runs(function() {
-                expect(done.message).toBe('"C" is required by (A) and cannot be removed (hint: use -f or --force)');
-            });
-        });
-
-        it("allow forcefully removing a plugin", function() {
-            runs(function() {
-                uninstallPromise( uninstall.uninstallPlugin('C', plugins_install_dir, {force: true}) );
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 200);
-            runs(function() {
-                expect(done).toBe(true);
-                var del = common.spy.getDeleted(emit);
-                expect(del).toEqual(['Deleted "C"']);
-            });
-        });
-
-        it("never remove top level plugins if they are a dependency", function() {
-            runs(function() {
-                uninstallPromise( uninstall.uninstallPlugin('A', plugins_install_dir2) );
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 200);
-            runs(function() {
-                var del = common.spy.getDeleted(emit);
-
-                expect(del).toEqual([
-                    'Deleted "D"',
-                    'Deleted "A"'
-                ]);
-            });
-        });
-    });
-});
-
-describe('uninstall', function() {
-    var fsWrite, rm, add_to_queue;
-
-    beforeEach(function() {
-        fsWrite = spyOn(fs, 'writeFileSync').andReturn(true);
-        rm = spyOn(shell, 'rm').andReturn(true);
-        add_to_queue = spyOn(config_changes, 'add_uninstalled_plugin_to_prepare_queue');
-        done = false;
-    });
-    describe('success', function() {
-        it('should call the config-changes module\'s add_uninstalled_plugin_to_prepare_queue method after processing an install', function() {
-            runs(function() {
-                uninstallPromise( uninstall('android', project, plugins['DummyPlugin']) );
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 200);
-            runs(function() {
-                expect(add_to_queue).toHaveBeenCalledWith(plugins_install_dir, dummy_id, 'android', true);
-            });
-        });
-    });
-
-    describe('failure', function() {
-        it('should throw if platform is unrecognized', function() {
-            runs(function() {
-                uninstallPromise(uninstall('atari', project, 'SomePlugin'));
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 200);
-            runs(function() {
-                expect(''+done).toContain('atari not supported.');
-            });
-        });
-        it('should throw if plugin is missing', function() {
-            runs(function() {
-                uninstallPromise(uninstall('android', project, 'SomePluginThatDoesntExist'));
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 200);
-            runs(function() {
-                expect(''+done).toContain('Plugin "SomePluginThatDoesntExist" not found. Already uninstalled?');
-            });
-        });
-    });
-});
-
-describe('end', function() {
-
-    it('end', function() {
-        done = false;
-
-        promise.then(
-            function(){
-                return uninstall('android', project, plugins['DummyPlugin'])
-            }
-        ).then(
-            function(){
-                // Fails... A depends on
-                return uninstall('android', project, plugins['C'])
-            }
-        ).fail(
-            function(err) {
-                expect(err.message).toBe("The plugin 'C' is required by (A), skipping uninstallation.");
-            }
-        ).then(
-            function(){
-                // dependencies on C,D ... should this only work with --recursive? prompt user..?
-                return uninstall('android', project, plugins['A'])
-            }
-        ).fin(function(err){
-            if(err)
-                plugman.emit('error', err);
-
-            shell.rm('-rf', project);
-            shell.rm('-rf', project2);
-            done = true;
-        });
-
-        waitsFor(function() { return done; }, 'promise never resolved', 500);
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/unpublish.spec.js
----------------------------------------------------------------------
diff --git a/spec/unpublish.spec.js b/spec/unpublish.spec.js
deleted file mode 100644
index 944f640..0000000
--- a/spec/unpublish.spec.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var unpublish = require('../src/unpublish'),
-    Q = require('q'),
-    registry = require('../src/registry/registry');
-
-describe('unpublish', function() {
-    it('should unpublish a plugin', function() {
-        var sUnpublish = spyOn(registry, 'unpublish').andReturn(Q());
-        unpublish(new Array('myplugin@0.0.1'));
-        expect(sUnpublish).toHaveBeenCalledWith(['myplugin@0.0.1']);
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/util/action-stack.spec.js
----------------------------------------------------------------------
diff --git a/spec/util/action-stack.spec.js b/spec/util/action-stack.spec.js
deleted file mode 100644
index 3aa732f..0000000
--- a/spec/util/action-stack.spec.js
+++ /dev/null
@@ -1,58 +0,0 @@
-var action_stack = require('../../src/util/action-stack'),
-    ios = require('../../src/platforms/ios');
-
-describe('action-stack', function() {
-    var stack;
-    beforeEach(function() {
-        stack = new action_stack();
-    });
-    describe('processing of actions', function() {
-        it('should process actions one at a time until all are done', function() {
-            var first_spy = jasmine.createSpy();
-            var first_args = [1];
-            var second_spy = jasmine.createSpy();
-            var second_args = [2];
-            var third_spy = jasmine.createSpy();
-            var third_args = [3];
-            stack.push(stack.createAction(first_spy, first_args, function(){}, []));
-            stack.push(stack.createAction(second_spy, second_args, function(){}, []));
-            stack.push(stack.createAction(third_spy, third_args, function(){}, []));
-            stack.process('android', 'blah');
-            expect(first_spy).toHaveBeenCalledWith(first_args[0]);
-            expect(second_spy).toHaveBeenCalledWith(second_args[0]);
-            expect(third_spy).toHaveBeenCalledWith(third_args[0]);
-        });
-        it('should revert processed actions if an exception occurs', function() {
-            spyOn(console, 'log');
-            var first_spy = jasmine.createSpy();
-            var first_args = [1];
-            var first_reverter = jasmine.createSpy();
-            var first_reverter_args = [true];
-            var process_err = new Error('process_err');
-            var second_spy = jasmine.createSpy().andCallFake(function() {
-                throw process_err;
-            });
-            var second_args = [2];
-            var third_spy = jasmine.createSpy();
-            var third_args = [3];
-            stack.push(stack.createAction(first_spy, first_args, first_reverter, first_reverter_args));
-            stack.push(stack.createAction(second_spy, second_args, function(){}, []));
-            stack.push(stack.createAction(third_spy, third_args, function(){}, []));
-            // process should throw
-            var error;
-            runs(function() {
-                stack.process('android', 'blah').fail(function(err) { error = err; });
-            });
-            waitsFor(function(){ return error; }, 'process promise never resolved', 500);
-            runs(function() {
-                expect(error).toEqual(process_err);
-                // first two actions should have been called, but not the third
-                expect(first_spy).toHaveBeenCalledWith(first_args[0]);
-                expect(second_spy).toHaveBeenCalledWith(second_args[0]);
-                expect(third_spy).not.toHaveBeenCalledWith(third_args[0]);
-                // first reverter should have been called after second action exploded
-                expect(first_reverter).toHaveBeenCalledWith(first_reverter_args[0]);
-            });
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/util/config-changes.spec.js
----------------------------------------------------------------------
diff --git a/spec/util/config-changes.spec.js b/spec/util/config-changes.spec.js
deleted file mode 100644
index 9d93d72..0000000
--- a/spec/util/config-changes.spec.js
+++ /dev/null
@@ -1,449 +0,0 @@
-/* jshint node:true, sub:true, indent:4  */
-/* global jasmine, describe, beforeEach, afterEach, it, spyOn, expect */
-
-var configChanges = require('../../src/util/config-changes'),
-    xml_helpers = require('../../src/util/xml-helpers'),
-    ios_parser = require('../../src/platforms/ios'),
-    fs      = require('fs'),
-    os      = require('osenv'),
-    plugman = require('../../plugman'),
-    events  = require('../../src/events'),
-    et      = require('elementtree'),
-    path    = require('path'),
-    plist = require('plist-with-patches'),
-    shell   = require('shelljs'),
-    xcode = require('xcode'),
-    temp    = path.join(os.tmpdir(), 'plugman'),
-    dummyplugin = path.join(__dirname, '..', 'plugins', 'DummyPlugin'),
-    cbplugin = path.join(__dirname, '..', 'plugins', 'ChildBrowser'),
-    childrenplugin = path.join(__dirname, '..', 'plugins', 'multiple-children'),
-    shareddepsplugin = path.join(__dirname, '..', 'plugins', 'shared-deps-multi-child'),
-    configplugin = path.join(__dirname, '..', 'plugins', 'ConfigTestPlugin'),
-    varplugin = path.join(__dirname, '..', 'plugins', 'VariablePlugin'),
-    android_two_project = path.join(__dirname, '..', 'projects', 'android_two', '*'),
-    android_two_no_perms_project = path.join(__dirname, '..', 'projects', 'android_two_no_perms', '*'),
-    ios_plist_project = path.join(__dirname, '..', 'projects', 'ios-plist', '*'),
-    ios_config_xml = path.join(__dirname, '..', 'projects', 'ios-config-xml', '*'),
-    plugins_dir = path.join(temp, 'cordova', 'plugins');
-
-// TODO: dont do fs so much
-
-var dummy_xml = new et.ElementTree(et.XML(fs.readFileSync(path.join(dummyplugin, 'plugin.xml'), 'utf-8')));
-
-function innerXML(xmltext) {
-    return xmltext.replace(/^<[\w\s\-=\/"\.]+>/, '').replace(/<\/[\w\s\-=\/"\.]+>$/,'');
-}
-
-describe('config-changes module', function() {
-    beforeEach(function() {
-        shell.mkdir('-p', temp);
-        shell.mkdir('-p', plugins_dir);
-    });
-    afterEach(function() {
-        shell.rm('-rf', temp);
-        ios_parser.purgeProjectFileCache(temp);
-    });
-
-    describe('queue methods', function() {
-        describe('add_installed_plugin_to_prepare_queue', function() {
-            it('should call get_platform_json method', function() {
-                var spy = spyOn(configChanges, 'get_platform_json').andReturn({
-                    prepare_queue:{
-                        installed:[],
-                        uninstalled:[]
-                    }
-                });
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'PooPlugin', 'android', {});
-                expect(spy).toHaveBeenCalledWith(plugins_dir, 'android');
-            });
-            it('should append specified plugin to platform.json', function() {
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'PooPlugin', 'android', {});
-                var json = configChanges.get_platform_json(plugins_dir, 'android');
-                expect(json.prepare_queue.installed[0].plugin).toEqual('PooPlugin');
-                expect(json.prepare_queue.installed[0].vars).toEqual({});
-            });
-            it('should append specified plugin with any variables to platform.json', function() {
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'PooPlugin', 'android', {'dude':'man'});
-                var json = configChanges.get_platform_json(plugins_dir, 'android');
-                expect(json.prepare_queue.installed[0].plugin).toEqual('PooPlugin');
-                expect(json.prepare_queue.installed[0].vars).toEqual({'dude':'man'});
-            });
-            it('should call save_platform_json with updated config', function() {
-                var spy = spyOn(configChanges, 'save_platform_json');
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'PooPlugin', 'android', {});
-                var config = spy.mostRecentCall.args[0];
-                expect(config.prepare_queue.installed[0].plugin).toEqual('PooPlugin');
-            });
-        });
-
-        describe('add_uninstalled_plugin_to_prepare_queue', function() {
-            beforeEach(function() {
-                shell.cp('-rf', dummyplugin, plugins_dir);
-            });
-
-            it('should call get_platform_json method', function() {
-                var spy = spyOn(configChanges, 'get_platform_json').andReturn({
-                    prepare_queue:{
-                        installed:[],
-                        uninstalled:[]
-                    }
-                });
-                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'DummyPlugin', 'android');
-                expect(spy).toHaveBeenCalledWith(plugins_dir, 'android');
-            });
-            it('should append specified plugin to platform.json', function() {
-                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'DummyPlugin', 'android');
-                var json = configChanges.get_platform_json(plugins_dir, 'android');
-                expect(json.prepare_queue.uninstalled[0].plugin).toEqual('DummyPlugin');
-                expect(json.prepare_queue.uninstalled[0].id).toEqual('com.phonegap.plugins.dummyplugin');
-            });
-            it('should call save_platform_json with updated config', function() {
-                var spy = spyOn(configChanges, 'save_platform_json');
-                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'DummyPlugin', 'android', {});
-                var config = spy.mostRecentCall.args[0];
-                expect(config.prepare_queue.uninstalled[0].plugin).toEqual('DummyPlugin');
-                expect(config.prepare_queue.uninstalled[0].id).toEqual('com.phonegap.plugins.dummyplugin');
-            });
-        });
-    });
-
-    describe('get_platform_json method', function() {
-        it('should return an empty config json object if file doesn\'t exist', function() {
-            var filepath = path.join(plugins_dir, 'android.json');
-            var cfg = configChanges.get_platform_json(plugins_dir, 'android');
-            expect(cfg).toBeDefined();
-            expect(cfg.prepare_queue).toBeDefined();
-            expect(cfg.config_munge).toBeDefined();
-            expect(cfg.installed_plugins).toBeDefined();
-        });
-        it('should return the json file if it exists', function() {
-            var filepath = path.join(plugins_dir, 'android.json');
-            var json = {
-                prepare_queue: {installed: [], uninstalled: []},
-                config_munge: {files: {"some_file": {parents: {"some_parent": [{"xml": "some_change", "count": 1}]}}}},
-                installed_plugins: {}};
-            fs.writeFileSync(filepath, JSON.stringify(json), 'utf-8');
-            var cfg = configChanges.get_platform_json(plugins_dir, 'android');
-            expect(JSON.stringify(json)).toEqual(JSON.stringify(cfg));
-        });
-    });
-
-    describe('save_platform_json method', function() {
-        it('should write out specified json', function() {
-            var filepath = path.join(plugins_dir, 'android.json');
-            var cfg = {poop:true};
-            configChanges.save_platform_json(cfg, plugins_dir, 'android');
-            expect(fs.existsSync(filepath)).toBe(true);
-            expect(JSON.parse(fs.readFileSync(filepath, 'utf-8'))).toEqual(cfg);
-        });
-    });
-
-    describe('generate_plugin_config_munge method', function() {
-        describe('for android projects', function() {
-            beforeEach(function() {
-                shell.cp('-rf', android_two_project, temp);
-            });
-            it('should return a flat config hierarchy for simple, one-off config changes', function() {
-                var xml;
-                var munger = new configChanges.PlatformMunger('android', temp, 'unused');
-                var munge = munger.generate_plugin_config_munge(dummyplugin, {});
-                expect(munge.files['AndroidManifest.xml']).toBeDefined();
-                expect(munge.files['AndroidManifest.xml'].parents['/manifest/application']).toBeDefined();
-                xml = (new et.ElementTree(dummy_xml.find('./platform[@name="android"]/config-file[@target="AndroidManifest.xml"]'))).write({xml_declaration:false});
-                xml = innerXML(xml);
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest/application', xml).count).toEqual(1);
-                expect(munge.files['res/xml/plugins.xml']).toBeDefined();
-                expect(munge.files['res/xml/plugins.xml'].parents['/plugins']).toBeDefined();
-                xml = (new et.ElementTree(dummy_xml.find('./platform[@name="android"]/config-file[@target="res/xml/plugins.xml"]'))).write({xml_declaration:false});
-                xml = innerXML(xml);
-                expect(configChanges.get_munge_change(munge, 'res/xml/plugins.xml', '/plugins', xml).count).toEqual(1);
-                expect(munge.files['res/xml/config.xml']).toBeDefined();
-                expect(munge.files['res/xml/config.xml'].parents['/cordova/plugins']).toBeDefined();
-                xml = (new et.ElementTree(dummy_xml.find('./platform[@name="android"]/config-file[@target="res/xml/config.xml"]'))).write({xml_declaration:false});
-                xml = innerXML(xml);
-                expect(configChanges.get_munge_change(munge, 'res/xml/config.xml', '/cordova/plugins', xml).count).toEqual(1);
-            });
-            it('should split out multiple children of config-file elements into individual leaves', function() {
-                var munger = new configChanges.PlatformMunger('android', temp, 'unused');
-                var munge = munger.generate_plugin_config_munge(childrenplugin, {});
-                expect(munge.files['AndroidManifest.xml']).toBeDefined();
-                expect(munge.files['AndroidManifest.xml'].parents['/manifest']).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />')).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />')).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="android.permission.READ_PHONE_STATE" />')).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="android.permission.INTERNET" />')).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="android.permission.GET_ACCOUNTS" />')).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="android.permission.WAKE_LOCK" />')).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<permission android:name="com.alunny.childapp.permission.C2D_MESSAGE" android:protectionLevel="signature" />')).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="com.alunny.childapp.permission.C2D_MESSAGE" />')).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />')).toBeDefined();
-            });
-            it('should not use xml comments as config munge leaves', function() {
-                var munger = new configChanges.PlatformMunger('android', temp, 'unused');
-                var munge = munger.generate_plugin_config_munge(childrenplugin, {});
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<!--library-->')).not.toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<!-- GCM connects to Google Services. -->')).not.toBeDefined();
-            });
-            it('should increment config hierarchy leaves if different config-file elements target the same file + selector + xml', function() {
-                var munger = new configChanges.PlatformMunger('android', temp, 'unused');
-                var munge = munger.generate_plugin_config_munge(configplugin, {});
-                expect(configChanges.get_munge_change(munge, 'res/xml/config.xml', '/widget', '<poop />').count).toEqual(2);
-            });
-            it('should take into account interpolation variables', function() {
-                var munger = new configChanges.PlatformMunger('android', temp, 'unused');
-                var munge = munger.generate_plugin_config_munge(childrenplugin, {PACKAGE_NAME:'ca.filmaj.plugins'});
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="ca.filmaj.plugins.permission.C2D_MESSAGE" />')).toBeDefined();
-            });
-            it('should create munges for platform-agnostic config.xml changes', function() {
-                var munger = new configChanges.PlatformMunger('android', temp, 'unused');
-                var munge = munger.generate_plugin_config_munge(dummyplugin, {});
-                expect(configChanges.get_munge_change(munge, 'config.xml', '/*', '<access origin="build.phonegap.com" />')).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'config.xml', '/*', '<access origin="s3.amazonaws.com" />')).toBeDefined();
-            });
-            it('should automatically add on app java identifier as PACKAGE_NAME variable for android config munges', function() {
-                shell.cp('-rf', android_two_project, temp);
-                var munger = new configChanges.PlatformMunger('android', temp, 'unused');
-                var munge = munger.generate_plugin_config_munge(varplugin, {});
-                var expected_xml = '<package>com.alunny.childapp</package>';
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', expected_xml)).toBeDefined();
-            });
-        });
-
-        describe('for ios projects', function() {
-            beforeEach(function() {
-                shell.cp('-rf', ios_config_xml, temp);
-            });
-            it('should automatically add on ios bundle identifier as PACKAGE_NAME variable for ios config munges', function() {
-                var munger = new configChanges.PlatformMunger('ios', temp, 'unused');
-                var munge = munger.generate_plugin_config_munge(varplugin, {});
-                var expected_xml = '<cfbundleid>com.example.friendstring</cfbundleid>';
-                expect(configChanges.get_munge_change(munge, 'config.xml', '/widget', expected_xml)).toBeDefined();
-            });
-            it('should special case framework elements for ios', function() {
-                var munger = new configChanges.PlatformMunger('ios', temp, 'unused');
-                var munge = munger.generate_plugin_config_munge(cbplugin, {});
-                expect(munge.files['framework']).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'framework', 'libsqlite3.dylib', 'false')).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'framework', 'social.framework', 'true')).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'framework', 'music.framework', 'false')).toBeDefined();
-                expect(munge.files['framework'].parents['Custom.framework']).not.toBeDefined();
-            });
-        });
-    });
-
-    describe('processing of plugins (via process method)', function() {
-        beforeEach(function() {
-            shell.cp('-rf', dummyplugin, plugins_dir);
-        });
-        it('should generate config munges for queued plugins', function() {
-            shell.cp('-rf', android_two_project, temp);
-            var cfg = configChanges.get_platform_json(plugins_dir, 'android');
-            cfg.prepare_queue.installed = [{'plugin':'DummyPlugin', 'vars':{}}];
-            configChanges.save_platform_json(cfg, plugins_dir, 'android');
-            var munger = new configChanges.PlatformMunger('android', temp, plugins_dir);
-            var spy = spyOn(munger, 'generate_plugin_config_munge').andReturn({});
-            munger.process();
-            expect(spy).toHaveBeenCalledWith(path.join(plugins_dir, 'DummyPlugin'), {});
-        });
-        it('should get a reference to existing config munge by calling get_platform_json', function() {
-            shell.cp('-rf', android_two_project, temp);
-            var spy = spyOn(configChanges, 'get_platform_json').andReturn({
-                prepare_queue:{
-                    installed:[],
-                    uninstalled:[]
-                },
-                config_munge:{}
-            });
-            configChanges.process(plugins_dir, temp, 'android');
-            expect(spy).toHaveBeenCalledWith(plugins_dir, 'android');
-        });
-        describe(': installation', function() {
-            describe('of xml config files', function() {
-                beforeEach(function() {
-                    shell.cp('-rf', android_two_project, temp);
-                });
-                it('should call graftXML for every new config munge it introduces (every leaf in config munge that does not exist)', function() {
-                    var cfg = configChanges.get_platform_json(plugins_dir, 'android');
-                    cfg.prepare_queue.installed = [{'plugin':'DummyPlugin', 'vars':{}}];
-                    configChanges.save_platform_json(cfg, plugins_dir, 'android');
-
-                    var spy = spyOn(xml_helpers, 'graftXML').andReturn(true);
-
-                    var manifest_doc = new et.ElementTree(et.XML(fs.readFileSync(path.join(temp, 'AndroidManifest.xml'), 'utf-8')));
-                    var munge = dummy_xml.find('./platform[@name="android"]/config-file[@target="AndroidManifest.xml"]');
-                    configChanges.process(plugins_dir, temp, 'android');
-                    expect(spy.calls.length).toEqual(4);
-                    expect(spy.argsForCall[0][2]).toEqual('/*');
-                    expect(spy.argsForCall[1][2]).toEqual('/*');
-                    expect(spy.argsForCall[2][2]).toEqual('/manifest/application');
-                    expect(spy.argsForCall[3][2]).toEqual('/cordova/plugins');
-                });
-                it('should not call graftXML for a config munge that already exists from another plugin', function() {
-                    shell.cp('-rf', configplugin, plugins_dir);
-                    configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'ConfigTestPlugin', 'android', {});
-
-                    var spy = spyOn(xml_helpers, 'graftXML').andReturn(true);
-                    configChanges.process(plugins_dir, temp, 'android');
-                    expect(spy.calls.length).toEqual(1);
-                });
-                it('should not call graftXML for a config munge targeting a config file that does not exist', function() {
-                    configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'DummyPlugin', 'android', {});
-
-                    var spy = spyOn(fs, 'readFileSync').andCallThrough();
-
-                    configChanges.process(plugins_dir, temp, 'android');
-                    expect(spy).not.toHaveBeenCalledWith(path.join(temp, 'res', 'xml', 'plugins.xml'), 'utf-8');
-                });
-            });
-            describe('of plist config files', function() {
-                var xcode_add, xcode_rm;
-                it('should write empty string nodes with no whitespace', function() {
-                    shell.cp('-rf', ios_config_xml, temp);
-                    shell.cp('-rf', varplugin, plugins_dir);
-                    configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'ios', {});
-                    configChanges.process(plugins_dir, temp, 'ios');
-                    expect(fs.readFileSync(path.join(temp, 'SampleApp', 'SampleApp-Info.plist'), 'utf-8')).toMatch(/<key>APluginNode<\/key>\n    <string><\/string>/m);
-                });
-            });
-            describe('of pbxproject framework files', function() {
-                var xcode_add, xcode_rm;
-                beforeEach(function() {
-                    shell.cp('-rf', ios_config_xml, temp);
-                    shell.cp('-rf', cbplugin, plugins_dir);
-                    xcode_add = spyOn(xcode.project.prototype, 'addFramework').andCallThrough();
-                });
-                it('should call into xcode.addFramework if plugin has <framework> file defined and is ios',function() {
-                    configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'ChildBrowser', 'ios', {});
-                    configChanges.process(plugins_dir, temp, 'ios');
-                    expect(xcode_add).toHaveBeenCalledWith('libsqlite3.dylib', {weak:false});
-                    expect(xcode_add).toHaveBeenCalledWith('social.framework', {weak:true});
-                    expect(xcode_add).toHaveBeenCalledWith('music.framework', {weak:false});
-                    expect(xcode_add).not.toHaveBeenCalledWith('Custom.framework');
-                });
-            });
-            it('should resolve wildcard config-file targets to the project, if applicable', function() {
-                shell.cp('-rf', ios_config_xml, temp);
-                shell.cp('-rf', cbplugin, plugins_dir);
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'ChildBrowser', 'ios', {});
-                var spy = spyOn(fs, 'readFileSync').andCallThrough();
-
-                configChanges.process(plugins_dir, temp, 'ios');
-                expect(spy).toHaveBeenCalledWith(path.join(temp, 'SampleApp', 'SampleApp-Info.plist').replace(/\\/g, '/'), 'utf8');
-            });
-            it('should move successfully installed plugins from queue to installed plugins section, and include/retain vars if applicable', function() {
-                shell.cp('-rf', android_two_project, temp);
-                shell.cp('-rf', varplugin, plugins_dir);
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'android', {"API_KEY":"hi"}, true);
-
-                configChanges.process(plugins_dir, temp, 'android');
-
-                var cfg = configChanges.get_platform_json(plugins_dir, 'android');
-                expect(cfg.prepare_queue.installed.length).toEqual(0);
-                expect(cfg.installed_plugins['com.adobe.vars']).toBeDefined();
-                expect(cfg.installed_plugins['com.adobe.vars']['API_KEY']).toEqual('hi');
-            });
-            it('should save changes to global config munge after completing an install', function() {
-                shell.cp('-rf', android_two_project, temp);
-                shell.cp('-rf', varplugin, plugins_dir);
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'android', {"API_KEY":"hi"});
-
-                var spy = spyOn(configChanges, 'save_platform_json');
-                configChanges.process(plugins_dir, temp, 'android');
-                expect(spy).toHaveBeenCalled();
-            });
-        });
-
-        describe(': uninstallation', function() {
-            it('should call pruneXML for every config munge it completely removes from the app (every leaf that is decremented to 0)', function() {
-                shell.cp('-rf', android_two_project, temp);
-                // Run through an "install"
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'DummyPlugin', 'android', {});
-                configChanges.process(plugins_dir, temp, 'android');
-
-                // Now set up an uninstall and make sure prunexml is called properly
-                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'DummyPlugin', 'android');
-                var spy = spyOn(xml_helpers, 'pruneXML').andReturn(true);
-                configChanges.process(plugins_dir, temp, 'android');
-                expect(spy.calls.length).toEqual(4);
-                expect(spy.argsForCall[0][2]).toEqual('/*');
-                expect(spy.argsForCall[1][2]).toEqual('/*');
-                expect(spy.argsForCall[2][2]).toEqual('/manifest/application');
-                expect(spy.argsForCall[3][2]).toEqual('/cordova/plugins');
-            });
-            it('should generate a config munge that interpolates variables into config changes, if applicable', function() {
-                shell.cp('-rf', android_two_project, temp);
-                shell.cp('-rf', varplugin, plugins_dir);
-                // Run through an "install"
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'android', {"API_KEY":"canucks"});
-                var munger = new configChanges.PlatformMunger('android', temp, plugins_dir);
-                munger.process();
-
-                // Now set up an uninstall and make sure prunexml is called properly
-                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'android');
-                var spy = spyOn(munger, 'generate_plugin_config_munge').andReturn({});
-                munger.process();
-                var munge_params = spy.mostRecentCall.args;
-                expect(munge_params[0]).toEqual(path.join(plugins_dir, 'VariablePlugin'));
-                expect(munge_params[1]['API_KEY']).toEqual('canucks');
-            });
-            it('should not call pruneXML for a config munge that another plugin depends on', function() {
-                shell.cp('-rf', android_two_no_perms_project, temp);
-                shell.cp('-rf', childrenplugin, plugins_dir);
-                shell.cp('-rf', shareddepsplugin, plugins_dir);
-
-                // Run through and "install" two plugins (they share a permission for INTERNET)
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'multiple-children', 'android', {});
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'shared-deps-multi-child', 'android', {});
-                configChanges.process(plugins_dir, temp, 'android');
-
-                // Now set up an uninstall for multi-child plugin
-                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'multiple-children', 'android');
-                configChanges.process(plugins_dir, temp, 'android');
-                var am_xml = new et.ElementTree(et.XML(fs.readFileSync(path.join(temp, 'AndroidManifest.xml'), 'utf-8')));
-                var permission = am_xml.find('./uses-permission');
-                expect(permission).toBeDefined();
-                expect(permission.attrib['android:name']).toEqual('android.permission.INTERNET');
-            });
-            it('should not call pruneXML for a config munge targeting a config file that does not exist', function() {
-                shell.cp('-rf', android_two_project, temp);
-                // install a plugin
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'DummyPlugin', 'android', {});
-                configChanges.process(plugins_dir, temp, 'android');
-                // set up an uninstall for the same plugin
-                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'DummyPlugin', 'android', {});
-
-                var spy = spyOn(fs, 'readFileSync').andCallThrough();
-                configChanges.process(plugins_dir, temp, 'android');
-
-                expect(spy).not.toHaveBeenCalledWith(path.join(temp, 'res', 'xml', 'plugins.xml'), 'utf-8');
-            });
-            it('should remove uninstalled plugins from installed plugins list', function() {
-                shell.cp('-rf', android_two_project, temp);
-                shell.cp('-rf', varplugin, plugins_dir);
-                // install the var plugin
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'android', {"API_KEY":"eat my shorts"});
-                configChanges.process(plugins_dir, temp, 'android');
-                // queue up an uninstall for the same plugin
-                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'android');
-                configChanges.process(plugins_dir, temp, 'android');
-
-                var cfg = configChanges.get_platform_json(plugins_dir, 'android');
-                expect(cfg.prepare_queue.uninstalled.length).toEqual(0);
-                expect(cfg.installed_plugins['com.adobe.vars']).not.toBeDefined();
-            });
-            it('should save changes to global config munge after completing an uninstall', function() {
-                shell.cp('-rf', android_two_project, temp);
-                shell.cp('-rf', varplugin, plugins_dir);
-                // install a plugin
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'android', {"API_KEY":"eat my shorts"});
-                configChanges.process(plugins_dir, temp, 'android');
-                // set up an uninstall for the plugin
-                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'android');
-
-                var spy = spyOn(configChanges, 'save_platform_json');
-                configChanges.process(plugins_dir, temp, 'android');
-                expect(spy).toHaveBeenCalled();
-            });
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/util/csproj.spec.js
----------------------------------------------------------------------
diff --git a/spec/util/csproj.spec.js b/spec/util/csproj.spec.js
deleted file mode 100644
index c506c38..0000000
--- a/spec/util/csproj.spec.js
+++ /dev/null
@@ -1,97 +0,0 @@
-var csproj  = require('../../src/util/csproj'),
-    path    = require('path'),
-    os      = require('osenv'),
-    et      = require('elementtree'),
-    fs      = require('fs'),
-    xml_helpers = require('../../src/util/xml-helpers');
-
-var wp7_project     = path.join(__dirname, '..', 'projects', 'wp7'),
-    wp8_project     = path.join(__dirname, '..', 'projects', 'wp8'),
-    temp            = path.join(os.tmpdir(), 'plugman'),
-    example1_csproj  = path.join(wp7_project, 'CordovaAppProj.csproj'),
-    example2_csproj  = path.join(wp8_project, 'CordovaAppProj.csproj'),
-    wpcsproj        = path.join(__dirname, '..', 'plugins', 'WPcsproj');
-
-describe('csproj', function() {
-    it('should throw if passed in an invalid xml file path ref', function() {
-        expect(function() {
-            new csproj('blahblah');
-        }).toThrow();
-    });
-    it('should successfully parse a valid csproj file into an xml document', function() {
-        var doc;
-        expect(function() {
-            doc = new csproj(example1_csproj);
-        }).not.toThrow();
-        expect(doc.xml.getroot()).toBeDefined();
-    });
-
-    describe('write method', function() {
-
-    });
-
-    describe('source file', function() {
-
-        var test_csproj;
-        var page_test   = path.join('src', 'UI', 'PageTest.xaml');
-        var page_test_cs = path.join('src', 'UI', 'PageTest.xaml.cs');
-        var lib_test    = path.join('lib', 'LibraryTest.dll');
-        var file_test   = path.join('src', 'FileTest.cs');
-        var content_test   = path.join('src', 'Content.img');
-
-        describe('add method', function() {
-            var test_csproj = new csproj(example1_csproj);
-            it('should properly add .xaml files', function() {
-                test_csproj.addSourceFile(page_test);
-                expect(test_csproj.xml.getroot().find('.//Page[@Include="src\\UI\\PageTest.xaml"]')).toBeTruthy();
-                expect(test_csproj.xml.getroot().find('.//Page[@Include="src\\UI\\PageTest.xaml"]/Generator').text).toEqual('MSBuild:Compile');
-                expect(test_csproj.xml.getroot().find('.//Page[@Include="src\\UI\\PageTest.xaml"]/SubType').text).toEqual('Designer');
-            });
-            it('should properly add .xaml.cs files', function() {
-                test_csproj.addSourceFile(page_test_cs);
-                expect(test_csproj.xml.getroot().find('.//Compile[@Include="src\\UI\\PageTest.xaml.cs"]')).toBeTruthy();
-                expect(test_csproj.xml.getroot().find('.//Compile[@Include="src\\UI\\PageTest.xaml.cs"]/DependentUpon').text).toEqual('PageTest.xaml');
-            });
-            it('should properly add .cs files', function() {
-                test_csproj.addSourceFile(file_test);
-                expect(test_csproj.xml.getroot().find('.//Compile[@Include="src\\FileTest.cs"]')).toBeTruthy();
-            });
-            it('should properly add content files', function() {
-                test_csproj.addSourceFile(content_test);
-                expect(test_csproj.xml.getroot().find('.//Content[@Include="src\\Content.img"]')).toBeTruthy();
-            });
-        });
-
-        describe('remove method', function() {
-            var test_csproj = new csproj(example2_csproj);
-            it('should properly remove .xaml pages', function() {
-                test_csproj.removeSourceFile(page_test);
-                expect(test_csproj.xml.getroot().find('.//Page[@Include="src\\UI\\PageTest.xaml"]')).toBeFalsy();
-            });
-            it('should properly remove .xaml.cs files', function() {
-                test_csproj.removeSourceFile(page_test_cs);
-                expect(test_csproj.xml.getroot().find('.//Compile[@Include="src\\UI\\PageTest.xaml.cs"]')).toBeFalsy();
-            });
-            it('should properly remove .cs files', function() {
-                test_csproj.removeSourceFile(file_test);
-                expect(test_csproj.xml.getroot().find('.//Compile[@Include="src\\FileTest.cs"]')).toBeFalsy();
-            });
-            it('should properly remove content files', function() {
-                test_csproj.removeSourceFile(content_test);
-                expect(test_csproj.xml.getroot().find('.//Content[@Include="src\\Content.img"]')).toBeFalsy();
-            });
-            it('should remove all empty ItemGroup\'s', function() {
-                test_csproj.removeSourceFile(page_test);
-                test_csproj.removeSourceFile(page_test_cs);
-                test_csproj.removeSourceFile(lib_test);
-                test_csproj.removeSourceFile(file_test);
-                var item_groups = test_csproj.xml.findall('ItemGroup');
-                for (var i = 0, l = item_groups.length; i < l; i++) {
-                    var group = item_groups[i];
-                    expect(group._children.length).toBeGreaterThan(0);
-                }
-            })
-
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/util/dependencies.spec.js
----------------------------------------------------------------------
diff --git a/spec/util/dependencies.spec.js b/spec/util/dependencies.spec.js
deleted file mode 100644
index bbc7111..0000000
--- a/spec/util/dependencies.spec.js
+++ /dev/null
@@ -1,41 +0,0 @@
-var dependencies = require('../../src/util/dependencies'),
-    xml_helpers = require('../../src/util/xml-helpers'),
-    path = require('path'),
-    config = require('../../src/util/config-changes');
-
-describe('dependency module', function() {
-    describe('generate_dependency_info method', function() {
-        it('should return a list of top-level plugins based on what is inside a platform.json file', function() {
-            var tlps = {
-                "hello":"",
-                "isitme":"",
-                "yourelookingfor":""
-            };
-            spyOn(xml_helpers, 'parseElementtreeSync').andReturn({findall:function(){}});
-            var spy = spyOn(config, 'get_platform_json').andReturn({
-                installed_plugins:tlps,
-                dependent_plugins:[]
-            });
-            var obj = dependencies.generate_dependency_info('some dir');
-            expect(obj.top_level_plugins).toEqual(Object.keys(tlps));
-        });
-        it('should return a dependency graph for the plugins', function() {
-            var tlps = {
-                "A":"",
-                "B":""
-            };
-            var deps = {
-                "C":"",
-                "D":"",
-                "E":""
-            };
-            var spy = spyOn(config, 'get_platform_json').andReturn({
-                installed_plugins:tlps,
-                dependent_plugins:[]
-            });
-            var obj = dependencies.generate_dependency_info(path.join(__dirname, '..', 'plugins', 'dependencies'), 'android');
-            expect(obj.graph.getChain('A')).toEqual(['C','D']);
-            expect(obj.graph.getChain('B')).toEqual(['D', 'E']);
-        });
-    });
-});


[59/70] Remove all cordova-lib files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_reader.cpp
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_reader.cpp b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_reader.cpp
deleted file mode 100644
index 750088c..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_reader.cpp
+++ /dev/null
@@ -1,894 +0,0 @@
-#include <json/reader.h>
-#include <json/value.h>
-#include <utility>
-#include <cstdio>
-#include <cassert>
-#include <cstring>
-#include <iostream>
-#include <stdexcept>
-
-#if _MSC_VER >= 1400 // VC++ 8.0
-#pragma warning( disable : 4996 )   // disable warning about strdup being deprecated.
-#endif
-
-namespace Json {
-
-// QNX is strict about declaring C symbols in the std namespace.
-#ifdef __QNXNTO__
-using std::memcpy;
-using std::sprintf;
-using std::sscanf;
-#endif
-
-// Implementation of class Features
-// ////////////////////////////////
-
-Features::Features()
-   : allowComments_( true )
-   , strictRoot_( false )
-{
-}
-
-
-Features 
-Features::all()
-{
-   return Features();
-}
-
-
-Features 
-Features::strictMode()
-{
-   Features features;
-   features.allowComments_ = false;
-   features.strictRoot_ = true;
-   return features;
-}
-
-// Implementation of class Reader
-// ////////////////////////////////
-
-
-static inline bool 
-in( Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4 )
-{
-   return c == c1  ||  c == c2  ||  c == c3  ||  c == c4;
-}
-
-static inline bool 
-in( Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4, Reader::Char c5 )
-{
-   return c == c1  ||  c == c2  ||  c == c3  ||  c == c4  ||  c == c5;
-}
-
-
-static bool 
-containsNewLine( Reader::Location begin, 
-                 Reader::Location end )
-{
-   for ( ;begin < end; ++begin )
-      if ( *begin == '\n'  ||  *begin == '\r' )
-         return true;
-   return false;
-}
-
-static std::string codePointToUTF8(unsigned int cp)
-{
-   std::string result;
-   
-   // based on description from http://en.wikipedia.org/wiki/UTF-8
-
-   if (cp <= 0x7f) 
-   {
-      result.resize(1);
-      result[0] = static_cast<char>(cp);
-   } 
-   else if (cp <= 0x7FF) 
-   {
-      result.resize(2);
-      result[1] = static_cast<char>(0x80 | (0x3f & cp));
-      result[0] = static_cast<char>(0xC0 | (0x1f & (cp >> 6)));
-   } 
-   else if (cp <= 0xFFFF) 
-   {
-      result.resize(3);
-      result[2] = static_cast<char>(0x80 | (0x3f & cp));
-      result[1] = 0x80 | static_cast<char>((0x3f & (cp >> 6)));
-      result[0] = 0xE0 | static_cast<char>((0xf & (cp >> 12)));
-   }
-   else if (cp <= 0x10FFFF) 
-   {
-      result.resize(4);
-      result[3] = static_cast<char>(0x80 | (0x3f & cp));
-      result[2] = static_cast<char>(0x80 | (0x3f & (cp >> 6)));
-      result[1] = static_cast<char>(0x80 | (0x3f & (cp >> 12)));
-      result[0] = static_cast<char>(0xF0 | (0x7 & (cp >> 18)));
-   }
-
-   return result;
-}
-
-
-// Class Reader
-// //////////////////////////////////////////////////////////////////
-
-Reader::Reader()
-   : features_( Features::all() )
-{
-}
-
-
-Reader::Reader( const Features &features )
-   : features_( features )
-{
-}
-
-
-bool
-Reader::parse( const std::string &document, 
-               Value &root,
-               bool collectComments )
-{
-   document_ = document;
-   const char *begin = document_.c_str();
-   const char *end = begin + document_.length();
-   return parse( begin, end, root, collectComments );
-}
-
-
-bool
-Reader::parse( std::istream& sin,
-               Value &root,
-               bool collectComments )
-{
-   //std::istream_iterator<char> begin(sin);
-   //std::istream_iterator<char> end;
-   // Those would allow streamed input from a file, if parse() were a
-   // template function.
-
-   // Since std::string is reference-counted, this at least does not
-   // create an extra copy.
-   std::string doc;
-   std::getline(sin, doc, (char)EOF);
-   return parse( doc, root, collectComments );
-}
-
-bool 
-Reader::parse( const char *beginDoc, const char *endDoc, 
-               Value &root,
-               bool collectComments )
-{
-   if ( !features_.allowComments_ )
-   {
-      collectComments = false;
-   }
-
-   begin_ = beginDoc;
-   end_ = endDoc;
-   collectComments_ = collectComments;
-   current_ = begin_;
-   lastValueEnd_ = 0;
-   lastValue_ = 0;
-   commentsBefore_ = "";
-   errors_.clear();
-   while ( !nodes_.empty() )
-      nodes_.pop();
-   nodes_.push( &root );
-   
-   bool successful = readValue();
-   Token token;
-   skipCommentTokens( token );
-   if ( collectComments_  &&  !commentsBefore_.empty() )
-      root.setComment( commentsBefore_, commentAfter );
-   if ( features_.strictRoot_ )
-   {
-      if ( !root.isArray()  &&  !root.isObject() )
-      {
-         // Set error location to start of doc, ideally should be first token found in doc
-         token.type_ = tokenError;
-         token.start_ = beginDoc;
-         token.end_ = endDoc;
-         addError( "A valid JSON document must be either an array or an object value.",
-                   token );
-         return false;
-      }
-   }
-   return successful;
-}
-
-
-bool
-Reader::readValue()
-{
-   Token token;
-   skipCommentTokens( token );
-   bool successful = true;
-
-   if ( collectComments_  &&  !commentsBefore_.empty() )
-   {
-      currentValue().setComment( commentsBefore_, commentBefore );
-      commentsBefore_ = "";
-   }
-
-
-   switch ( token.type_ )
-   {
-   case tokenObjectBegin:
-      successful = readObject( token );
-      break;
-   case tokenArrayBegin:
-      successful = readArray( token );
-      break;
-   case tokenNumber:
-      successful = decodeNumber( token );
-      break;
-   case tokenString:
-      successful = decodeString( token );
-      break;
-   case tokenTrue:
-      currentValue() = true;
-      break;
-   case tokenFalse:
-      currentValue() = false;
-      break;
-   case tokenNull:
-      currentValue() = Value();
-      break;
-   default:
-      return addError( "Syntax error: value, object or array expected.", token );
-   }
-
-   if ( collectComments_ )
-   {
-      lastValueEnd_ = current_;
-      lastValue_ = &currentValue();
-   }
-
-   return successful;
-}
-
-
-void 
-Reader::skipCommentTokens( Token &token )
-{
-   if ( features_.allowComments_ )
-   {
-      do
-      {
-         readToken( token );
-      }
-      while ( token.type_ == tokenComment );
-   }
-   else
-   {
-      readToken( token );
-   }
-}
-
-
-bool 
-Reader::expectToken( TokenType type, Token &token, const char *message )
-{
-   readToken( token );
-   if ( token.type_ != type )
-      return addError( message, token );
-   return true;
-}
-
-
-bool 
-Reader::readToken( Token &token )
-{
-   skipSpaces();
-   token.start_ = current_;
-   Char c = getNextChar();
-   bool ok = true;
-   switch ( c )
-   {
-   case '{':
-      token.type_ = tokenObjectBegin;
-      break;
-   case '}':
-      token.type_ = tokenObjectEnd;
-      break;
-   case '[':
-      token.type_ = tokenArrayBegin;
-      break;
-   case ']':
-      token.type_ = tokenArrayEnd;
-      break;
-   case '"':
-      token.type_ = tokenString;
-      ok = readString();
-      break;
-   case '/':
-      token.type_ = tokenComment;
-      ok = readComment();
-      break;
-   case '0':
-   case '1':
-   case '2':
-   case '3':
-   case '4':
-   case '5':
-   case '6':
-   case '7':
-   case '8':
-   case '9':
-   case '-':
-      token.type_ = tokenNumber;
-      readNumber();
-      break;
-   case 't':
-      token.type_ = tokenTrue;
-      ok = match( "rue", 3 );
-      break;
-   case 'f':
-      token.type_ = tokenFalse;
-      ok = match( "alse", 4 );
-      break;
-   case 'n':
-      token.type_ = tokenNull;
-      ok = match( "ull", 3 );
-      break;
-   case ',':
-      token.type_ = tokenArraySeparator;
-      break;
-   case ':':
-      token.type_ = tokenMemberSeparator;
-      break;
-   case 0:
-      token.type_ = tokenEndOfStream;
-      break;
-   default:
-      ok = false;
-      break;
-   }
-   if ( !ok )
-      token.type_ = tokenError;
-   token.end_ = current_;
-   return true;
-}
-
-
-void 
-Reader::skipSpaces()
-{
-   while ( current_ != end_ )
-   {
-      Char c = *current_;
-      if ( c == ' '  ||  c == '\t'  ||  c == '\r'  ||  c == '\n' )
-         ++current_;
-      else
-         break;
-   }
-}
-
-
-bool 
-Reader::match( Location pattern, 
-               int patternLength )
-{
-   if ( end_ - current_ < patternLength )
-      return false;
-   int index = patternLength;
-   while ( index-- )
-      if ( current_[index] != pattern[index] )
-         return false;
-   current_ += patternLength;
-   return true;
-}
-
-
-bool
-Reader::readComment()
-{
-   Location commentBegin = current_ - 1;
-   Char c = getNextChar();
-   bool successful = false;
-   if ( c == '*' )
-      successful = readCStyleComment();
-   else if ( c == '/' )
-      successful = readCppStyleComment();
-   if ( !successful )
-      return false;
-
-   if ( collectComments_ )
-   {
-      CommentPlacement placement = commentBefore;
-      if ( lastValueEnd_  &&  !containsNewLine( lastValueEnd_, commentBegin ) )
-      {
-         if ( c != '*'  ||  !containsNewLine( commentBegin, current_ ) )
-            placement = commentAfterOnSameLine;
-      }
-
-      addComment( commentBegin, current_, placement );
-   }
-   return true;
-}
-
-
-void 
-Reader::addComment( Location begin, 
-                    Location end, 
-                    CommentPlacement placement )
-{
-   assert( collectComments_ );
-   if ( placement == commentAfterOnSameLine )
-   {
-      assert( lastValue_ != 0 );
-      lastValue_->setComment( std::string( begin, end ), placement );
-   }
-   else
-   {
-      if ( !commentsBefore_.empty() )
-         commentsBefore_ += "\n";
-      commentsBefore_ += std::string( begin, end );
-   }
-}
-
-
-bool 
-Reader::readCStyleComment()
-{
-   while ( current_ != end_ )
-   {
-      Char c = getNextChar();
-      if ( c == '*'  &&  *current_ == '/' )
-         break;
-   }
-   return getNextChar() == '/';
-}
-
-
-bool 
-Reader::readCppStyleComment()
-{
-   while ( current_ != end_ )
-   {
-      Char c = getNextChar();
-      if (  c == '\r'  ||  c == '\n' )
-         break;
-   }
-   return true;
-}
-
-
-void 
-Reader::readNumber()
-{
-   while ( current_ != end_ )
-   {
-      if ( !(*current_ >= '0'  &&  *current_ <= '9')  &&
-           !in( *current_, '.', 'e', 'E', '+', '-' ) )
-         break;
-      ++current_;
-   }
-}
-
-bool
-Reader::readString()
-{
-   Char c = 0;
-   while ( current_ != end_ )
-   {
-      c = getNextChar();
-      if ( c == '\\' )
-         getNextChar();
-      else if ( c == '"' )
-         break;
-   }
-   return c == '"';
-}
-
-
-bool 
-Reader::readObject( Token &tokenStart )
-{
-   Token tokenName;
-   Token something = tokenStart;
-   std::string name;
-   currentValue() = Value( objectValue );
-   while ( readToken( tokenName ) )
-   {
-      bool initialTokenOk = true;
-      while ( tokenName.type_ == tokenComment  &&  initialTokenOk )
-         initialTokenOk = readToken( tokenName );
-      if  ( !initialTokenOk )
-         break;
-      if ( tokenName.type_ == tokenObjectEnd  &&  name.empty() )  // empty object
-         return true;
-      if ( tokenName.type_ != tokenString )
-         break;
-      
-      name = "";
-      if ( !decodeString( tokenName, name ) )
-         return recoverFromError( tokenObjectEnd );
-
-      Token colon;
-      if ( !readToken( colon ) ||  colon.type_ != tokenMemberSeparator )
-      {
-         return addErrorAndRecover( "Missing ':' after object member name", 
-                                    colon, 
-                                    tokenObjectEnd );
-      }
-      Value &value = currentValue()[ name ];
-      nodes_.push( &value );
-      bool ok = readValue();
-      nodes_.pop();
-      if ( !ok ) // error already set
-         return recoverFromError( tokenObjectEnd );
-
-      Token comma;
-      if ( !readToken( comma )
-            ||  ( comma.type_ != tokenObjectEnd  &&  
-                  comma.type_ != tokenArraySeparator &&
-		  comma.type_ != tokenComment ) )
-      {
-         return addErrorAndRecover( "Missing ',' or '}' in object declaration", 
-                                    comma, 
-                                    tokenObjectEnd );
-      }
-      bool finalizeTokenOk = true;
-      while ( comma.type_ == tokenComment &&
-              finalizeTokenOk )
-         finalizeTokenOk = readToken( comma );
-      if ( comma.type_ == tokenObjectEnd )
-         return true;
-   }
-   return addErrorAndRecover( "Missing '}' or object member name", 
-                              tokenName, 
-                              tokenObjectEnd );
-}
-
-
-bool 
-Reader::readArray( Token &tokenStart )
-{
-   Token something = tokenStart;
-   currentValue() = Value( arrayValue );
-   skipSpaces();
-   if ( *current_ == ']' ) // empty array
-   {
-      Token endArray;
-      readToken( endArray );
-      return true;
-   }
-   int index = 0;
-   while ( true )
-   {
-      Value &value = currentValue()[ index++ ];
-      nodes_.push( &value );
-      bool ok = readValue();
-      nodes_.pop();
-      if ( !ok ) // error already set
-         return recoverFromError( tokenArrayEnd );
-
-      Token token;
-      // Accept Comment after last item in the array.
-      ok = readToken( token );
-      while ( token.type_ == tokenComment  &&  ok )
-      {
-         ok = readToken( token );
-      }
-      bool badTokenType = ( token.type_ == tokenArraySeparator  &&  
-                            token.type_ == tokenArrayEnd );
-      if ( !ok  ||  badTokenType )
-      {
-         return addErrorAndRecover( "Missing ',' or ']' in array declaration", 
-                                    token, 
-                                    tokenArrayEnd );
-      }
-      if ( token.type_ == tokenArrayEnd )
-         break;
-   }
-   return true;
-}
-
-
-bool 
-Reader::decodeNumber( Token &token )
-{
-   bool isDouble = false;
-   for ( Location inspect = token.start_; inspect != token.end_; ++inspect )
-   {
-      isDouble = isDouble  
-                 ||  in( *inspect, '.', 'e', 'E', '+' )  
-                 ||  ( *inspect == '-'  &&  inspect != token.start_ );
-   }
-   if ( isDouble )
-      return decodeDouble( token );
-   Location current = token.start_;
-   bool isNegative = *current == '-';
-   if ( isNegative )
-      ++current;
-   Value::UInt threshold = (isNegative ? Value::UInt(-Value::minInt) 
-                                       : Value::maxUInt) / 10;
-   Value::UInt value = 0;
-   while ( current < token.end_ )
-   {
-      Char c = *current++;
-      if ( c < '0'  ||  c > '9' )
-         return addError( "'" + std::string( token.start_, token.end_ ) + "' is not a number.", token );
-      if ( value >= threshold )
-         return decodeDouble( token );
-      value = value * 10 + Value::UInt(c - '0');
-   }
-   if ( isNegative )
-      currentValue() = -Value::Int( value );
-   else if ( value <= Value::UInt(Value::maxInt) )
-      currentValue() = Value::Int( value );
-   else
-      currentValue() = value;
-   return true;
-}
-
-
-bool 
-Reader::decodeDouble( Token &token )
-{
-   double value = 0;
-   const int bufferSize = 32;
-   int count;
-   int length = int(token.end_ - token.start_);
-   if ( length <= bufferSize )
-   {
-      Char buffer[bufferSize];
-      memcpy( buffer, token.start_, length );
-      buffer[length] = 0;
-      count = sscanf( buffer, "%lf", &value );
-   }
-   else
-   {
-      std::string buffer( token.start_, token.end_ );
-      count = sscanf( buffer.c_str(), "%lf", &value );
-   }
-
-   if ( count != 1 )
-      return addError( "'" + std::string( token.start_, token.end_ ) + "' is not a number.", token );
-   currentValue() = value;
-   return true;
-}
-
-
-bool 
-Reader::decodeString( Token &token )
-{
-   std::string decoded;
-   if ( !decodeString( token, decoded ) )
-      return false;
-   currentValue() = decoded;
-   return true;
-}
-
-
-bool 
-Reader::decodeString( Token &token, std::string &decoded )
-{
-   decoded.reserve( token.end_ - token.start_ - 2 );
-   Location current = token.start_ + 1; // skip '"'
-   Location end = token.end_ - 1;      // do not include '"'
-   while ( current != end )
-   {
-      Char c = *current++;
-      if ( c == '"' )
-         break;
-      else if ( c == '\\' )
-      {
-         if ( current == end )
-            return addError( "Empty escape sequence in string", token, current );
-         Char escape = *current++;
-         switch ( escape )
-         {
-         case '"': decoded += '"'; break;
-         case '/': decoded += '/'; break;
-         case '\\': decoded += '\\'; break;
-         case 'b': decoded += '\b'; break;
-         case 'f': decoded += '\f'; break;
-         case 'n': decoded += '\n'; break;
-         case 'r': decoded += '\r'; break;
-         case 't': decoded += '\t'; break;
-         case 'u':
-            {
-               unsigned int unicode;
-               if ( !decodeUnicodeCodePoint( token, current, end, unicode ) )
-                  return false;
-               decoded += codePointToUTF8(unicode);
-            }
-            break;
-         default:
-            return addError( "Bad escape sequence in string", token, current );
-         }
-      }
-      else
-      {
-         decoded += c;
-      }
-   }
-   return true;
-}
-
-bool
-Reader::decodeUnicodeCodePoint( Token &token, 
-                                     Location &current, 
-                                     Location end, 
-                                     unsigned int &unicode )
-{
-
-   if ( !decodeUnicodeEscapeSequence( token, current, end, unicode ) )
-      return false;
-   if (unicode >= 0xD800 && unicode <= 0xDBFF)
-   {
-      // surrogate pairs
-      if (end - current < 6)
-         return addError( "additional six characters expected to parse unicode surrogate pair.", token, current );
-      unsigned int surrogatePair;
-      if (*(current++) == '\\' && *(current++)== 'u')
-      {
-         if (decodeUnicodeEscapeSequence( token, current, end, surrogatePair ))
-         {
-            unicode = 0x10000 + ((unicode & 0x3FF) << 10) + (surrogatePair & 0x3FF);
-         } 
-         else
-            return false;
-      } 
-      else
-         return addError( "expecting another \\u token to begin the second half of a unicode surrogate pair", token, current );
-   }
-   return true;
-}
-
-bool 
-Reader::decodeUnicodeEscapeSequence( Token &token, 
-                                     Location &current, 
-                                     Location end, 
-                                     unsigned int &unicode )
-{
-   if ( end - current < 4 )
-      return addError( "Bad unicode escape sequence in string: four digits expected.", token, current );
-   unicode = 0;
-   for ( int index =0; index < 4; ++index )
-   {
-      Char c = *current++;
-      unicode *= 16;
-      if ( c >= '0'  &&  c <= '9' )
-         unicode += c - '0';
-      else if ( c >= 'a'  &&  c <= 'f' )
-         unicode += c - 'a' + 10;
-      else if ( c >= 'A'  &&  c <= 'F' )
-         unicode += c - 'A' + 10;
-      else
-         return addError( "Bad unicode escape sequence in string: hexadecimal digit expected.", token, current );
-   }
-   return true;
-}
-
-
-bool 
-Reader::addError( const std::string &message, 
-                  Token &token,
-                  Location extra )
-{
-   ErrorInfo info;
-   info.token_ = token;
-   info.message_ = message;
-   info.extra_ = extra;
-   errors_.push_back( info );
-   return false;
-}
-
-
-bool 
-Reader::recoverFromError( TokenType skipUntilToken )
-{
-   int errorCount = int(errors_.size());
-   Token skip;
-   while ( true )
-   {
-      if ( !readToken(skip) )
-         errors_.resize( errorCount ); // discard errors caused by recovery
-      if ( skip.type_ == skipUntilToken  ||  skip.type_ == tokenEndOfStream )
-         break;
-   }
-   errors_.resize( errorCount );
-   return false;
-}
-
-
-bool 
-Reader::addErrorAndRecover( const std::string &message, 
-                            Token &token,
-                            TokenType skipUntilToken )
-{
-   addError( message, token );
-   return recoverFromError( skipUntilToken );
-}
-
-
-Value &
-Reader::currentValue()
-{
-   return *(nodes_.top());
-}
-
-
-Reader::Char 
-Reader::getNextChar()
-{
-   if ( current_ == end_ )
-      return 0;
-   return *current_++;
-}
-
-
-void 
-Reader::getLocationLineAndColumn( Location location,
-                                  int &line,
-                                  int &column ) const
-{
-   Location current = begin_;
-   Location lastLineStart = current;
-   line = 0;
-   while ( current < location  &&  current != end_ )
-   {
-      Char c = *current++;
-      if ( c == '\r' )
-      {
-         if ( *current == '\n' )
-            ++current;
-         lastLineStart = current;
-         ++line;
-      }
-      else if ( c == '\n' )
-      {
-         lastLineStart = current;
-         ++line;
-      }
-   }
-   // column & line start at 1
-   column = int(location - lastLineStart) + 1;
-   ++line;
-}
-
-
-std::string
-Reader::getLocationLineAndColumn( Location location ) const
-{
-   int line, column;
-   getLocationLineAndColumn( location, line, column );
-   char buffer[18+16+16+1];
-   sprintf( buffer, "Line %d, Column %d", line, column );
-   return buffer;
-}
-
-
-std::string 
-Reader::getFormatedErrorMessages() const
-{
-   std::string formattedMessage;
-   for ( Errors::const_iterator itError = errors_.begin();
-         itError != errors_.end();
-         ++itError )
-   {
-      const ErrorInfo &error = *itError;
-      formattedMessage += "* " + getLocationLineAndColumn( error.token_.start_ ) + "\n";
-      formattedMessage += "  " + error.message_ + "\n";
-      if ( error.extra_ )
-         formattedMessage += "See " + getLocationLineAndColumn( error.extra_ ) + " for detail.\n";
-   }
-   return formattedMessage;
-}
-
-
-std::istream& operator>>( std::istream &sin, Value &root )
-{
-    Json::Reader reader;
-    bool ok = reader.parse(sin, root, true);
-    //JSON_ASSERT( ok );
-    if (!ok) throw std::runtime_error(reader.getFormatedErrorMessages());
-    return sin;
-}
-
-
-} // namespace Json

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_value.cpp
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_value.cpp b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_value.cpp
deleted file mode 100644
index 67638ca..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_value.cpp
+++ /dev/null
@@ -1,1726 +0,0 @@
-#include <iostream>
-#include <json/value.h>
-#include <json/writer.h>
-#include <utility>
-#include <stdexcept>
-#include <cstring>
-#include <cassert>
-#ifdef JSON_USE_CPPTL
-# include <cpptl/conststring.h>
-#endif
-#include <cstddef>    // size_t
-#ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
-# include "json_batchallocator.h"
-#endif // #ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
-
-#define JSON_ASSERT_UNREACHABLE assert( false )
-#define JSON_ASSERT( condition ) assert( condition );  // @todo <= change this into an exception throw
-#define JSON_ASSERT_MESSAGE( condition, message ) if (!( condition )) throw std::runtime_error( message );
-
-namespace Json {
-
-// QNX is strict about declaring C symbols in the std namespace.
-#ifdef __QNXNTO__
-using std::memcpy;
-using std::strchr;
-using std::strcmp;
-using std::strlen;
-#endif
-
-const Value Value::null;
-const Int Value::minInt = Int( ~(UInt(-1)/2) );
-const Int Value::maxInt = Int( UInt(-1)/2 );
-const UInt Value::maxUInt = UInt(-1);
-
-// A "safe" implementation of strdup. Allow null pointer to be passed. 
-// Also avoid warning on msvc80.
-//
-//inline char *safeStringDup( const char *czstring )
-//{
-//   if ( czstring )
-//   {
-//      const size_t length = (unsigned int)( strlen(czstring) + 1 );
-//      char *newString = static_cast<char *>( malloc( length ) );
-//      memcpy( newString, czstring, length );
-//      return newString;
-//   }
-//   return 0;
-//}
-//
-//inline char *safeStringDup( const std::string &str )
-//{
-//   if ( !str.empty() )
-//   {
-//      const size_t length = str.length();
-//      char *newString = static_cast<char *>( malloc( length + 1 ) );
-//      memcpy( newString, str.c_str(), length );
-//      newString[length] = 0;
-//      return newString;
-//   }
-//   return 0;
-//}
-
-ValueAllocator::~ValueAllocator()
-{
-}
-
-class DefaultValueAllocator : public ValueAllocator
-{
-public:
-   virtual ~DefaultValueAllocator()
-   {
-   }
-
-   virtual char *makeMemberName( const char *memberName )
-   {
-      return duplicateStringValue( memberName );
-   }
-
-   virtual void releaseMemberName( char *memberName )
-   {
-      releaseStringValue( memberName );
-   }
-
-   virtual char *duplicateStringValue( const char *value, 
-                                       unsigned int length = unknown )
-   {
-      //@todo investigate this old optimization
-      //if ( !value  ||  value[0] == 0 )
-      //   return 0;
-
-      if ( length == unknown )
-         length = (unsigned int)strlen(value);
-      char *newString = static_cast<char *>( malloc( length + 1 ) );
-      memcpy( newString, value, length );
-      newString[length] = 0;
-      return newString;
-   }
-
-   virtual void releaseStringValue( char *value )
-   {
-      if ( value )
-         free( value );
-   }
-};
-
-static ValueAllocator *&valueAllocator()
-{
-   static DefaultValueAllocator defaultAllocator;
-   static ValueAllocator *valueAllocator = &defaultAllocator;
-   return valueAllocator;
-}
-
-static struct DummyValueAllocatorInitializer {
-   DummyValueAllocatorInitializer() 
-   {
-      valueAllocator();      // ensure valueAllocator() statics are initialized before main().
-   }
-} dummyValueAllocatorInitializer;
-
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// ValueInternals...
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
-# include "json_internalarray.inl"
-# include "json_internalmap.inl"
-#endif // JSON_VALUE_USE_INTERNAL_MAP
-
-# include "json_valueiterator.inl"
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class Value::CommentInfo
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-
-Value::CommentInfo::CommentInfo()
-   : comment_( 0 )
-{
-}
-
-Value::CommentInfo::~CommentInfo()
-{
-   if ( comment_ )
-      valueAllocator()->releaseStringValue( comment_ );
-}
-
-
-void 
-Value::CommentInfo::setComment( const char *text )
-{
-   if ( comment_ )
-      valueAllocator()->releaseStringValue( comment_ );
-   JSON_ASSERT( text );
-   JSON_ASSERT_MESSAGE( text[0]=='\0' || text[0]=='/', "Comments must start with /");
-   // It seems that /**/ style comments are acceptable as well.
-   comment_ = valueAllocator()->duplicateStringValue( text );
-}
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class Value::CZString
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-# ifndef JSON_VALUE_USE_INTERNAL_MAP
-
-// Notes: index_ indicates if the string was allocated when
-// a string is stored.
-
-Value::CZString::CZString( int index )
-   : cstr_( 0 )
-   , index_( index )
-{
-}
-
-Value::CZString::CZString( const char *cstr, DuplicationPolicy allocate )
-   : cstr_( allocate == duplicate ? valueAllocator()->makeMemberName(cstr) 
-                                  : cstr )
-   , index_( allocate )
-{
-}
-
-Value::CZString::CZString( const CZString &other )
-: cstr_( other.index_ != noDuplication &&  other.cstr_ != 0
-                ?  valueAllocator()->makeMemberName( other.cstr_ )
-                : other.cstr_ )
-   , index_( other.cstr_ ? (other.index_ == noDuplication ? noDuplication : duplicate)
-                         : other.index_ )
-{
-}
-
-Value::CZString::~CZString()
-{
-   if ( cstr_  &&  index_ == duplicate )
-      valueAllocator()->releaseMemberName( const_cast<char *>( cstr_ ) );
-}
-
-void 
-Value::CZString::swap( CZString &other )
-{
-   std::swap( cstr_, other.cstr_ );
-   std::swap( index_, other.index_ );
-}
-
-Value::CZString &
-Value::CZString::operator =( const CZString &other )
-{
-   CZString temp( other );
-   swap( temp );
-   return *this;
-}
-
-bool 
-Value::CZString::operator<( const CZString &other ) const 
-{
-   if ( cstr_ )
-      return strcmp( cstr_, other.cstr_ ) < 0;
-   return index_ < other.index_;
-}
-
-bool 
-Value::CZString::operator==( const CZString &other ) const 
-{
-   if ( cstr_ )
-      return strcmp( cstr_, other.cstr_ ) == 0;
-   return index_ == other.index_;
-}
-
-
-int 
-Value::CZString::index() const
-{
-   return index_;
-}
-
-
-const char *
-Value::CZString::c_str() const
-{
-   return cstr_;
-}
-
-bool 
-Value::CZString::isStaticString() const
-{
-   return index_ == noDuplication;
-}
-
-#endif // ifndef JSON_VALUE_USE_INTERNAL_MAP
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class Value::Value
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-/*! \internal Default constructor initialization must be equivalent to:
- * memset( this, 0, sizeof(Value) )
- * This optimization is used in ValueInternalMap fast allocator.
- */
-Value::Value( ValueType type )
-   : type_( type )
-   , allocated_( 0 )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   switch ( type )
-   {
-   case nullValue:
-      break;
-   case intValue:
-   case uintValue:
-      value_.int_ = 0;
-      break;
-   case realValue:
-      value_.real_ = 0.0;
-      break;
-   case stringValue:
-      value_.string_ = 0;
-      break;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-   case objectValue:
-      value_.map_ = new ObjectValues();
-      break;
-#else
-   case arrayValue:
-      value_.array_ = arrayAllocator()->newArray();
-      break;
-   case objectValue:
-      value_.map_ = mapAllocator()->newMap();
-      break;
-#endif
-   case booleanValue:
-      value_.bool_ = false;
-      break;
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-}
-
-
-Value::Value( Int value )
-   : type_( intValue )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.int_ = value;
-}
-
-
-Value::Value( UInt value )
-   : type_( uintValue )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.uint_ = value;
-}
-
-Value::Value( double value )
-   : type_( realValue )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.real_ = value;
-}
-
-Value::Value( const char *value )
-   : type_( stringValue )
-   , allocated_( true )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.string_ = valueAllocator()->duplicateStringValue( value );
-}
-
-
-Value::Value( const char *beginValue, 
-              const char *endValue )
-   : type_( stringValue )
-   , allocated_( true )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.string_ = valueAllocator()->duplicateStringValue( beginValue, 
-                                                            UInt(endValue - beginValue) );
-}
-
-
-Value::Value( const std::string &value )
-   : type_( stringValue )
-   , allocated_( true )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.string_ = valueAllocator()->duplicateStringValue( value.c_str(), 
-                                                            (unsigned int)value.length() );
-
-}
-
-Value::Value( const StaticString &value )
-   : type_( stringValue )
-   , allocated_( false )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.string_ = const_cast<char *>( value.c_str() );
-}
-
-
-# ifdef JSON_USE_CPPTL
-Value::Value( const CppTL::ConstString &value )
-   : type_( stringValue )
-   , allocated_( true )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.string_ = valueAllocator()->duplicateStringValue( value, value.length() );
-}
-# endif
-
-Value::Value( bool value )
-   : type_( booleanValue )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.bool_ = value;
-}
-
-
-Value::Value( const Value &other )
-   : type_( other.type_ )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   switch ( type_ )
-   {
-   case nullValue:
-   case intValue:
-   case uintValue:
-   case realValue:
-   case booleanValue:
-      value_ = other.value_;
-      break;
-   case stringValue:
-      if ( other.value_.string_ )
-      {
-         value_.string_ = valueAllocator()->duplicateStringValue( other.value_.string_ );
-         allocated_ = true;
-      }
-      else
-         value_.string_ = 0;
-      break;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-   case objectValue:
-      value_.map_ = new ObjectValues( *other.value_.map_ );
-      break;
-#else
-   case arrayValue:
-      value_.array_ = arrayAllocator()->newArrayCopy( *other.value_.array_ );
-      break;
-   case objectValue:
-      value_.map_ = mapAllocator()->newMapCopy( *other.value_.map_ );
-      break;
-#endif
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   if ( other.comments_ )
-   {
-      comments_ = new CommentInfo[numberOfCommentPlacement];
-      for ( int comment =0; comment < numberOfCommentPlacement; ++comment )
-      {
-         const CommentInfo &otherComment = other.comments_[comment];
-         if ( otherComment.comment_ )
-            comments_[comment].setComment( otherComment.comment_ );
-      }
-   }
-}
-
-
-Value::~Value()
-{
-   switch ( type_ )
-   {
-   case nullValue:
-   case intValue:
-   case uintValue:
-   case realValue:
-   case booleanValue:
-      break;
-   case stringValue:
-      if ( allocated_ )
-         valueAllocator()->releaseStringValue( value_.string_ );
-      break;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-   case objectValue:
-      delete value_.map_;
-      break;
-#else
-   case arrayValue:
-      arrayAllocator()->destructArray( value_.array_ );
-      break;
-   case objectValue:
-      mapAllocator()->destructMap( value_.map_ );
-      break;
-#endif
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-
-   if ( comments_ )
-      delete[] comments_;
-}
-
-Value &
-Value::operator=( const Value &other )
-{
-   Value temp( other );
-   swap( temp );
-   return *this;
-}
-
-void 
-Value::swap( Value &other )
-{
-   ValueType temp = type_;
-   type_ = other.type_;
-   other.type_ = temp;
-   std::swap( value_, other.value_ );
-   int temp2 = allocated_;
-   allocated_ = other.allocated_;
-   other.allocated_ = temp2;
-}
-
-ValueType 
-Value::type() const
-{
-   return type_;
-}
-
-
-int 
-Value::compare( const Value &other )
-{
-   /*
-   int typeDelta = other.type_ - type_;
-   switch ( type_ )
-   {
-   case nullValue:
-
-      return other.type_ == type_;
-   case intValue:
-      if ( other.type_.isNumeric()
-   case uintValue:
-   case realValue:
-   case booleanValue:
-      break;
-   case stringValue,
-      break;
-   case arrayValue:
-      delete value_.array_;
-      break;
-   case objectValue:
-      delete value_.map_;
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   */
-   return 0;  // unreachable
-}
-
-bool 
-Value::operator <( const Value &other ) const
-{
-   int typeDelta = type_ - other.type_;
-   if ( typeDelta )
-      return typeDelta < 0 ? true : false;
-   switch ( type_ )
-   {
-   case nullValue:
-      return false;
-   case intValue:
-      return value_.int_ < other.value_.int_;
-   case uintValue:
-      return value_.uint_ < other.value_.uint_;
-   case realValue:
-      return value_.real_ < other.value_.real_;
-   case booleanValue:
-      return value_.bool_ < other.value_.bool_;
-   case stringValue:
-      return ( value_.string_ == 0  &&  other.value_.string_ )
-             || ( other.value_.string_  
-                  &&  value_.string_  
-                  && strcmp( value_.string_, other.value_.string_ ) < 0 );
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-   case objectValue:
-      {
-         int delta = int( value_.map_->size() - other.value_.map_->size() );
-         if ( delta )
-            return delta < 0;
-         return (*value_.map_) < (*other.value_.map_);
-      }
-#else
-   case arrayValue:
-      return value_.array_->compare( *(other.value_.array_) ) < 0;
-   case objectValue:
-      return value_.map_->compare( *(other.value_.map_) ) < 0;
-#endif
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return 0;  // unreachable
-}
-
-bool 
-Value::operator <=( const Value &other ) const
-{
-   return !(other > *this);
-}
-
-bool 
-Value::operator >=( const Value &other ) const
-{
-   return !(*this < other);
-}
-
-bool 
-Value::operator >( const Value &other ) const
-{
-   return other < *this;
-}
-
-bool 
-Value::operator ==( const Value &other ) const
-{
-   //if ( type_ != other.type_ )
-   // GCC 2.95.3 says:
-   // attempt to take address of bit-field structure member `Json::Value::type_'
-   // Beats me, but a temp solves the problem.
-   int temp = other.type_;
-   if ( type_ != temp )
-      return false;
-   switch ( type_ )
-   {
-   case nullValue:
-      return true;
-   case intValue:
-      return value_.int_ == other.value_.int_;
-   case uintValue:
-      return value_.uint_ == other.value_.uint_;
-   case realValue:
-      return value_.real_ == other.value_.real_;
-   case booleanValue:
-      return value_.bool_ == other.value_.bool_;
-   case stringValue:
-      return ( value_.string_ == other.value_.string_ )
-             || ( other.value_.string_  
-                  &&  value_.string_  
-                  && strcmp( value_.string_, other.value_.string_ ) == 0 );
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-   case objectValue:
-      return value_.map_->size() == other.value_.map_->size()
-             && (*value_.map_) == (*other.value_.map_);
-#else
-   case arrayValue:
-      return value_.array_->compare( *(other.value_.array_) ) == 0;
-   case objectValue:
-      return value_.map_->compare( *(other.value_.map_) ) == 0;
-#endif
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return 0;  // unreachable
-}
-
-bool 
-Value::operator !=( const Value &other ) const
-{
-   return !( *this == other );
-}
-
-const char *
-Value::asCString() const
-{
-   JSON_ASSERT( type_ == stringValue );
-   return value_.string_;
-}
-
-
-std::string 
-Value::asString() const
-{
-   switch ( type_ )
-   {
-   case nullValue:
-      return "";
-   case stringValue:
-      return value_.string_ ? value_.string_ : "";
-   case booleanValue:
-      return value_.bool_ ? "true" : "false";
-   case intValue:
-   case uintValue:
-   case realValue:
-   case arrayValue:
-   case objectValue:
-      JSON_ASSERT_MESSAGE( false, "Type is not convertible to string" );
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return ""; // unreachable
-}
-
-# ifdef JSON_USE_CPPTL
-CppTL::ConstString 
-Value::asConstString() const
-{
-   return CppTL::ConstString( asString().c_str() );
-}
-# endif
-
-Value::Int 
-Value::asInt() const
-{
-   switch ( type_ )
-   {
-   case nullValue:
-      return 0;
-   case intValue:
-      return value_.int_;
-   case uintValue:
-      JSON_ASSERT_MESSAGE( value_.uint_ < (unsigned)maxInt, "integer out of signed integer range" );
-      return value_.uint_;
-   case realValue:
-      JSON_ASSERT_MESSAGE( value_.real_ >= minInt  &&  value_.real_ <= maxInt, "Real out of signed integer range" );
-      return Int( value_.real_ );
-   case booleanValue:
-      return value_.bool_ ? 1 : 0;
-   case stringValue:
-   case arrayValue:
-   case objectValue:
-      JSON_ASSERT_MESSAGE( false, "Type is not convertible to int" );
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return 0; // unreachable;
-}
-
-Value::UInt 
-Value::asUInt() const
-{
-   switch ( type_ )
-   {
-   case nullValue:
-      return 0;
-   case intValue:
-      JSON_ASSERT_MESSAGE( value_.int_ >= 0, "Negative integer can not be converted to unsigned integer" );
-      return value_.int_;
-   case uintValue:
-      return value_.uint_;
-   case realValue:
-      JSON_ASSERT_MESSAGE( value_.real_ >= 0  &&  value_.real_ <= maxUInt,  "Real out of unsigned integer range" );
-      return UInt( value_.real_ );
-   case booleanValue:
-      return value_.bool_ ? 1 : 0;
-   case stringValue:
-   case arrayValue:
-   case objectValue:
-      JSON_ASSERT_MESSAGE( false, "Type is not convertible to uint" );
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return 0; // unreachable;
-}
-
-double 
-Value::asDouble() const
-{
-   switch ( type_ )
-   {
-   case nullValue:
-      return 0.0;
-   case intValue:
-      return value_.int_;
-   case uintValue:
-      return value_.uint_;
-   case realValue:
-      return value_.real_;
-   case booleanValue:
-      return value_.bool_ ? 1.0 : 0.0;
-   case stringValue:
-   case arrayValue:
-   case objectValue:
-      JSON_ASSERT_MESSAGE( false, "Type is not convertible to double" );
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return 0; // unreachable;
-}
-
-bool 
-Value::asBool() const
-{
-   switch ( type_ )
-   {
-   case nullValue:
-      return false;
-   case intValue:
-   case uintValue:
-      return value_.int_ != 0;
-   case realValue:
-      return value_.real_ != 0.0;
-   case booleanValue:
-      return value_.bool_;
-   case stringValue:
-      return value_.string_  &&  value_.string_[0] != 0;
-   case arrayValue:
-   case objectValue:
-      return value_.map_->size() != 0;
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return false; // unreachable;
-}
-
-
-bool 
-Value::isConvertibleTo( ValueType other ) const
-{
-   switch ( type_ )
-   {
-   case nullValue:
-      return true;
-   case intValue:
-      return ( other == nullValue  &&  value_.int_ == 0 )
-             || other == intValue
-             || ( other == uintValue  && value_.int_ >= 0 )
-             || other == realValue
-             || other == stringValue
-             || other == booleanValue;
-   case uintValue:
-      return ( other == nullValue  &&  value_.uint_ == 0 )
-             || ( other == intValue  && value_.uint_ <= (unsigned)maxInt )
-             || other == uintValue
-             || other == realValue
-             || other == stringValue
-             || other == booleanValue;
-   case realValue:
-      return ( other == nullValue  &&  value_.real_ == 0.0 )
-             || ( other == intValue  &&  value_.real_ >= minInt  &&  value_.real_ <= maxInt )
-             || ( other == uintValue  &&  value_.real_ >= 0  &&  value_.real_ <= maxUInt )
-             || other == realValue
-             || other == stringValue
-             || other == booleanValue;
-   case booleanValue:
-      return ( other == nullValue  &&  value_.bool_ == false )
-             || other == intValue
-             || other == uintValue
-             || other == realValue
-             || other == stringValue
-             || other == booleanValue;
-   case stringValue:
-      return other == stringValue
-             || ( other == nullValue  &&  (!value_.string_  ||  value_.string_[0] == 0) );
-   case arrayValue:
-      return other == arrayValue
-             ||  ( other == nullValue  &&  value_.map_->size() == 0 );
-   case objectValue:
-      return other == objectValue
-             ||  ( other == nullValue  &&  value_.map_->size() == 0 );
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return false; // unreachable;
-}
-
-
-/// Number of values in array or object
-Value::UInt 
-Value::size() const
-{
-   switch ( type_ )
-   {
-   case nullValue:
-   case intValue:
-   case uintValue:
-   case realValue:
-   case booleanValue:
-   case stringValue:
-      return 0;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:  // size of the array is highest index + 1
-      if ( !value_.map_->empty() )
-      {
-         ObjectValues::const_iterator itLast = value_.map_->end();
-         --itLast;
-         return (*itLast).first.index()+1;
-      }
-      return 0;
-   case objectValue:
-      return Int( value_.map_->size() );
-#else
-   case arrayValue:
-      return Int( value_.array_->size() );
-   case objectValue:
-      return Int( value_.map_->size() );
-#endif
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return 0; // unreachable;
-}
-
-
-bool 
-Value::empty() const
-{
-   if ( isNull() || isArray() || isObject() )
-      return size() == 0u;
-   else
-      return false;
-}
-
-
-bool
-Value::operator!() const
-{
-   return isNull();
-}
-
-
-void 
-Value::clear()
-{
-   JSON_ASSERT( type_ == nullValue  ||  type_ == arrayValue  || type_ == objectValue );
-
-   switch ( type_ )
-   {
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-   case objectValue:
-      value_.map_->clear();
-      break;
-#else
-   case arrayValue:
-      value_.array_->clear();
-      break;
-   case objectValue:
-      value_.map_->clear();
-      break;
-#endif
-   default:
-      break;
-   }
-}
-
-void 
-Value::resize( UInt newSize )
-{
-   JSON_ASSERT( type_ == nullValue  ||  type_ == arrayValue );
-   if ( type_ == nullValue )
-      *this = Value( arrayValue );
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   UInt oldSize = size();
-   if ( newSize == 0 )
-      clear();
-   else if ( newSize > oldSize )
-      (*this)[ newSize - 1 ];
-   else
-   {
-      for ( UInt index = newSize; index < oldSize; ++index )
-         value_.map_->erase( index );
-      assert( size() == newSize );
-   }
-#else
-   value_.array_->resize( newSize );
-#endif
-}
-
-
-Value &
-Value::operator[]( UInt index )
-{
-   JSON_ASSERT( type_ == nullValue  ||  type_ == arrayValue );
-   if ( type_ == nullValue )
-      *this = Value( arrayValue );
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   CZString key( index );
-   ObjectValues::iterator it = value_.map_->lower_bound( key );
-   if ( it != value_.map_->end()  &&  (*it).first == key )
-      return (*it).second;
-
-   ObjectValues::value_type defaultValue( key, null );
-   it = value_.map_->insert( it, defaultValue );
-   return (*it).second;
-#else
-   return value_.array_->resolveReference( index );
-#endif
-}
-
-
-const Value &
-Value::operator[]( UInt index ) const
-{
-   JSON_ASSERT( type_ == nullValue  ||  type_ == arrayValue );
-   if ( type_ == nullValue )
-      return null;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   CZString key( index );
-   ObjectValues::const_iterator it = value_.map_->find( key );
-   if ( it == value_.map_->end() )
-      return null;
-   return (*it).second;
-#else
-   Value *value = value_.array_->find( index );
-   return value ? *value : null;
-#endif
-}
-
-
-Value &
-Value::operator[]( const char *key )
-{
-   return resolveReference( key, false );
-}
-
-
-Value &
-Value::resolveReference( const char *key, 
-                         bool isStatic )
-{
-   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
-   if ( type_ == nullValue )
-      *this = Value( objectValue );
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   CZString actualKey( key, isStatic ? CZString::noDuplication 
-                                     : CZString::duplicateOnCopy );
-   ObjectValues::iterator it = value_.map_->lower_bound( actualKey );
-   if ( it != value_.map_->end()  &&  (*it).first == actualKey )
-      return (*it).second;
-
-   ObjectValues::value_type defaultValue( actualKey, null );
-   it = value_.map_->insert( it, defaultValue );
-   Value &value = (*it).second;
-   return value;
-#else
-   return value_.map_->resolveReference( key, isStatic );
-#endif
-}
-
-
-Value 
-Value::get( UInt index, 
-            const Value &defaultValue ) const
-{
-   const Value *value = &((*this)[index]);
-   return value == &null ? defaultValue : *value;
-}
-
-
-bool 
-Value::isValidIndex( UInt index ) const
-{
-   return index < size();
-}
-
-
-
-const Value &
-Value::operator[]( const char *key ) const
-{
-   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
-   if ( type_ == nullValue )
-      return null;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   CZString actualKey( key, CZString::noDuplication );
-   ObjectValues::const_iterator it = value_.map_->find( actualKey );
-   if ( it == value_.map_->end() )
-      return null;
-   return (*it).second;
-#else
-   const Value *value = value_.map_->find( key );
-   return value ? *value : null;
-#endif
-}
-
-
-Value &
-Value::operator[]( const std::string &key )
-{
-   return (*this)[ key.c_str() ];
-}
-
-
-const Value &
-Value::operator[]( const std::string &key ) const
-{
-   return (*this)[ key.c_str() ];
-}
-
-Value &
-Value::operator[]( const StaticString &key )
-{
-   return resolveReference( key, true );
-}
-
-
-# ifdef JSON_USE_CPPTL
-Value &
-Value::operator[]( const CppTL::ConstString &key )
-{
-   return (*this)[ key.c_str() ];
-}
-
-
-const Value &
-Value::operator[]( const CppTL::ConstString &key ) const
-{
-   return (*this)[ key.c_str() ];
-}
-# endif
-
-
-Value &
-Value::append( const Value &value )
-{
-   return (*this)[size()] = value;
-}
-
-
-Value 
-Value::get( const char *key, 
-            const Value &defaultValue ) const
-{
-   const Value *value = &((*this)[key]);
-   return value == &null ? defaultValue : *value;
-}
-
-
-Value 
-Value::get( const std::string &key,
-            const Value &defaultValue ) const
-{
-   return get( key.c_str(), defaultValue );
-}
-
-Value
-Value::removeMember( const char* key )
-{
-   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
-   if ( type_ == nullValue )
-      return null;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   CZString actualKey( key, CZString::noDuplication );
-   ObjectValues::iterator it = value_.map_->find( actualKey );
-   if ( it == value_.map_->end() )
-      return null;
-   Value old(it->second);
-   value_.map_->erase(it);
-   return old;
-#else
-   Value *value = value_.map_->find( key );
-   if (value){
-      Value old(*value);
-      value_.map_.remove( key );
-      return old;
-   } else {
-      return null;
-   }
-#endif
-}
-
-Value
-Value::removeMember( const std::string &key )
-{
-   return removeMember( key.c_str() );
-}
-
-# ifdef JSON_USE_CPPTL
-Value 
-Value::get( const CppTL::ConstString &key,
-            const Value &defaultValue ) const
-{
-   return get( key.c_str(), defaultValue );
-}
-# endif
-
-bool 
-Value::isMember( const char *key ) const
-{
-   const Value *value = &((*this)[key]);
-   return value != &null;
-}
-
-
-bool 
-Value::isMember( const std::string &key ) const
-{
-   return isMember( key.c_str() );
-}
-
-
-# ifdef JSON_USE_CPPTL
-bool 
-Value::isMember( const CppTL::ConstString &key ) const
-{
-   return isMember( key.c_str() );
-}
-#endif
-
-Value::Members 
-Value::getMemberNames() const
-{
-   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
-   if ( type_ == nullValue )
-       return Value::Members();
-   Members members;
-   members.reserve( value_.map_->size() );
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   ObjectValues::const_iterator it = value_.map_->begin();
-   ObjectValues::const_iterator itEnd = value_.map_->end();
-   for ( ; it != itEnd; ++it )
-      members.push_back( std::string( (*it).first.c_str() ) );
-#else
-   ValueInternalMap::IteratorState it;
-   ValueInternalMap::IteratorState itEnd;
-   value_.map_->makeBeginIterator( it );
-   value_.map_->makeEndIterator( itEnd );
-   for ( ; !ValueInternalMap::equals( it, itEnd ); ValueInternalMap::increment(it) )
-      members.push_back( std::string( ValueInternalMap::key( it ) ) );
-#endif
-   return members;
-}
-//
-//# ifdef JSON_USE_CPPTL
-//EnumMemberNames
-//Value::enumMemberNames() const
-//{
-//   if ( type_ == objectValue )
-//   {
-//      return CppTL::Enum::any(  CppTL::Enum::transform(
-//         CppTL::Enum::keys( *(value_.map_), CppTL::Type<const CZString &>() ),
-//         MemberNamesTransform() ) );
-//   }
-//   return EnumMemberNames();
-//}
-//
-//
-//EnumValues 
-//Value::enumValues() const
-//{
-//   if ( type_ == objectValue  ||  type_ == arrayValue )
-//      return CppTL::Enum::anyValues( *(value_.map_), 
-//                                     CppTL::Type<const Value &>() );
-//   return EnumValues();
-//}
-//
-//# endif
-
-
-bool
-Value::isNull() const
-{
-   return type_ == nullValue;
-}
-
-
-bool 
-Value::isBool() const
-{
-   return type_ == booleanValue;
-}
-
-
-bool 
-Value::isInt() const
-{
-   return type_ == intValue;
-}
-
-
-bool 
-Value::isUInt() const
-{
-   return type_ == uintValue;
-}
-
-
-bool 
-Value::isIntegral() const
-{
-   return type_ == intValue  
-          ||  type_ == uintValue  
-          ||  type_ == booleanValue;
-}
-
-
-bool 
-Value::isDouble() const
-{
-   return type_ == realValue;
-}
-
-
-bool 
-Value::isNumeric() const
-{
-   return isIntegral() || isDouble();
-}
-
-
-bool 
-Value::isString() const
-{
-   return type_ == stringValue;
-}
-
-
-bool 
-Value::isArray() const
-{
-   return type_ == nullValue  ||  type_ == arrayValue;
-}
-
-
-bool 
-Value::isObject() const
-{
-   return type_ == nullValue  ||  type_ == objectValue;
-}
-
-
-void 
-Value::setComment( const char *comment,
-                   CommentPlacement placement )
-{
-   if ( !comments_ )
-      comments_ = new CommentInfo[numberOfCommentPlacement];
-   comments_[placement].setComment( comment );
-}
-
-
-void 
-Value::setComment( const std::string &comment,
-                   CommentPlacement placement )
-{
-   setComment( comment.c_str(), placement );
-}
-
-
-bool 
-Value::hasComment( CommentPlacement placement ) const
-{
-   return comments_ != 0  &&  comments_[placement].comment_ != 0;
-}
-
-std::string 
-Value::getComment( CommentPlacement placement ) const
-{
-   if ( hasComment(placement) )
-      return comments_[placement].comment_;
-   return "";
-}
-
-
-std::string 
-Value::toStyledString() const
-{
-   StyledWriter writer;
-   return writer.write( *this );
-}
-
-
-Value::const_iterator 
-Value::begin() const
-{
-   switch ( type_ )
-   {
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-      if ( value_.array_ )
-      {
-         ValueInternalArray::IteratorState it;
-         value_.array_->makeBeginIterator( it );
-         return const_iterator( it );
-      }
-      break;
-   case objectValue:
-      if ( value_.map_ )
-      {
-         ValueInternalMap::IteratorState it;
-         value_.map_->makeBeginIterator( it );
-         return const_iterator( it );
-      }
-      break;
-#else
-   case arrayValue:
-   case objectValue:
-      if ( value_.map_ )
-         return const_iterator( value_.map_->begin() );
-      break;
-#endif
-   default:
-      break;
-   }
-   return const_iterator();
-}
-
-Value::const_iterator 
-Value::end() const
-{
-   switch ( type_ )
-   {
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-      if ( value_.array_ )
-      {
-         ValueInternalArray::IteratorState it;
-         value_.array_->makeEndIterator( it );
-         return const_iterator( it );
-      }
-      break;
-   case objectValue:
-      if ( value_.map_ )
-      {
-         ValueInternalMap::IteratorState it;
-         value_.map_->makeEndIterator( it );
-         return const_iterator( it );
-      }
-      break;
-#else
-   case arrayValue:
-   case objectValue:
-      if ( value_.map_ )
-         return const_iterator( value_.map_->end() );
-      break;
-#endif
-   default:
-      break;
-   }
-   return const_iterator();
-}
-
-
-Value::iterator 
-Value::begin()
-{
-   switch ( type_ )
-   {
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-      if ( value_.array_ )
-      {
-         ValueInternalArray::IteratorState it;
-         value_.array_->makeBeginIterator( it );
-         return iterator( it );
-      }
-      break;
-   case objectValue:
-      if ( value_.map_ )
-      {
-         ValueInternalMap::IteratorState it;
-         value_.map_->makeBeginIterator( it );
-         return iterator( it );
-      }
-      break;
-#else
-   case arrayValue:
-   case objectValue:
-      if ( value_.map_ )
-         return iterator( value_.map_->begin() );
-      break;
-#endif
-   default:
-      break;
-   }
-   return iterator();
-}
-
-Value::iterator 
-Value::end()
-{
-   switch ( type_ )
-   {
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-      if ( value_.array_ )
-      {
-         ValueInternalArray::IteratorState it;
-         value_.array_->makeEndIterator( it );
-         return iterator( it );
-      }
-      break;
-   case objectValue:
-      if ( value_.map_ )
-      {
-         ValueInternalMap::IteratorState it;
-         value_.map_->makeEndIterator( it );
-         return iterator( it );
-      }
-      break;
-#else
-   case arrayValue:
-   case objectValue:
-      if ( value_.map_ )
-         return iterator( value_.map_->end() );
-      break;
-#endif
-   default:
-      break;
-   }
-   return iterator();
-}
-
-
-// class PathArgument
-// //////////////////////////////////////////////////////////////////
-
-PathArgument::PathArgument()
-   : kind_( kindNone )
-{
-}
-
-
-PathArgument::PathArgument( Value::UInt index )
-   : index_( index )
-   , kind_( kindIndex )
-{
-}
-
-
-PathArgument::PathArgument( const char *key )
-   : key_( key )
-   , kind_( kindKey )
-{
-}
-
-
-PathArgument::PathArgument( const std::string &key )
-   : key_( key.c_str() )
-   , kind_( kindKey )
-{
-}
-
-// class Path
-// //////////////////////////////////////////////////////////////////
-
-Path::Path( const std::string &path,
-            const PathArgument &a1,
-            const PathArgument &a2,
-            const PathArgument &a3,
-            const PathArgument &a4,
-            const PathArgument &a5 )
-{
-   InArgs in;
-   in.push_back( &a1 );
-   in.push_back( &a2 );
-   in.push_back( &a3 );
-   in.push_back( &a4 );
-   in.push_back( &a5 );
-   makePath( path, in );
-}
-
-
-void 
-Path::makePath( const std::string &path,
-                const InArgs &in )
-{
-   const char *current = path.c_str();
-   const char *end = current + path.length();
-   InArgs::const_iterator itInArg = in.begin();
-   while ( current != end )
-   {
-      if ( *current == '[' )
-      {
-         ++current;
-         if ( *current == '%' )
-            addPathInArg( path, in, itInArg, PathArgument::kindIndex );
-         else
-         {
-            Value::UInt index = 0;
-            for ( ; current != end && *current >= '0'  &&  *current <= '9'; ++current )
-               index = index * 10 + Value::UInt(*current - '0');
-            args_.push_back( index );
-         }
-         if ( current == end  ||  *current++ != ']' )
-            invalidPath( path, int(current - path.c_str()) );
-      }
-      else if ( *current == '%' )
-      {
-         addPathInArg( path, in, itInArg, PathArgument::kindKey );
-         ++current;
-      }
-      else if ( *current == '.' )
-      {
-         ++current;
-      }
-      else
-      {
-         const char *beginName = current;
-         while ( current != end  &&  !strchr( "[.", *current ) )
-            ++current;
-         args_.push_back( std::string( beginName, current ) );
-      }
-   }
-}
-
-
-void 
-Path::addPathInArg( const std::string &path, 
-                    const InArgs &in, 
-                    InArgs::const_iterator &itInArg, 
-                    PathArgument::Kind kind )
-{
-   if ( itInArg == in.end() )
-   {
-      // Error: missing argument %d
-   }
-   else if ( (*itInArg)->kind_ != kind )
-   {
-      // Error: bad argument type
-   }
-   else
-   {
-      args_.push_back( **itInArg );
-   }
-}
-
-
-void 
-Path::invalidPath( const std::string &path, 
-                   int location )
-{
-   // Error: invalid path.
-}
-
-
-const Value &
-Path::resolve( const Value &root ) const
-{
-   const Value *node = &root;
-   for ( Args::const_iterator it = args_.begin(); it != args_.end(); ++it )
-   {
-      const PathArgument &arg = *it;
-      if ( arg.kind_ == PathArgument::kindIndex )
-      {
-         if ( !node->isArray()  ||  node->isValidIndex( arg.index_ ) )
-         {
-            // Error: unable to resolve path (array value expected at position...
-         }
-         node = &((*node)[arg.index_]);
-      }
-      else if ( arg.kind_ == PathArgument::kindKey )
-      {
-         if ( !node->isObject() )
-         {
-            // Error: unable to resolve path (object value expected at position...)
-         }
-         node = &((*node)[arg.key_]);
-         if ( node == &Value::null )
-         {
-            // Error: unable to resolve path (object has no member named '' at position...)
-         }
-      }
-   }
-   return *node;
-}
-
-
-Value 
-Path::resolve( const Value &root, 
-               const Value &defaultValue ) const
-{
-   const Value *node = &root;
-   for ( Args::const_iterator it = args_.begin(); it != args_.end(); ++it )
-   {
-      const PathArgument &arg = *it;
-      if ( arg.kind_ == PathArgument::kindIndex )
-      {
-         if ( !node->isArray()  ||  node->isValidIndex( arg.index_ ) )
-            return defaultValue;
-         node = &((*node)[arg.index_]);
-      }
-      else if ( arg.kind_ == PathArgument::kindKey )
-      {
-         if ( !node->isObject() )
-            return defaultValue;
-         node = &((*node)[arg.key_]);
-         if ( node == &Value::null )
-            return defaultValue;
-      }
-   }
-   return *node;
-}
-
-
-Value &
-Path::make( Value &root ) const
-{
-   Value *node = &root;
-   for ( Args::const_iterator it = args_.begin(); it != args_.end(); ++it )
-   {
-      const PathArgument &arg = *it;
-      if ( arg.kind_ == PathArgument::kindIndex )
-      {
-         if ( !node->isArray() )
-         {
-            // Error: node is not an array at position ...
-         }
-         node = &((*node)[arg.index_]);
-      }
-      else if ( arg.kind_ == PathArgument::kindKey )
-      {
-         if ( !node->isObject() )
-         {
-            // Error: node is not an object at position...
-         }
-         node = &((*node)[arg.key_]);
-      }
-   }
-   return *node;
-}
-
-
-} // namespace Json

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_valueiterator.inl
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_valueiterator.inl b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_valueiterator.inl
deleted file mode 100644
index 736e260..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json_valueiterator.inl
+++ /dev/null
@@ -1,292 +0,0 @@
-// included by json_value.cpp
-// everything is within Json namespace
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class ValueIteratorBase
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-ValueIteratorBase::ValueIteratorBase()
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   : current_()
-   , isNull_( true )
-{
-}
-#else
-   : isArray_( true )
-   , isNull_( true )
-{
-   iterator_.array_ = ValueInternalArray::IteratorState();
-}
-#endif
-
-
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-ValueIteratorBase::ValueIteratorBase( const Value::ObjectValues::iterator &current )
-   : current_( current )
-   , isNull_( false )
-{
-}
-#else
-ValueIteratorBase::ValueIteratorBase( const ValueInternalArray::IteratorState &state )
-   : isArray_( true )
-{
-   iterator_.array_ = state;
-}
-
-
-ValueIteratorBase::ValueIteratorBase( const ValueInternalMap::IteratorState &state )
-   : isArray_( false )
-{
-   iterator_.map_ = state;
-}
-#endif
-
-Value &
-ValueIteratorBase::deref() const
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   return current_->second;
-#else
-   if ( isArray_ )
-      return ValueInternalArray::dereference( iterator_.array_ );
-   return ValueInternalMap::value( iterator_.map_ );
-#endif
-}
-
-
-void 
-ValueIteratorBase::increment()
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   ++current_;
-#else
-   if ( isArray_ )
-      ValueInternalArray::increment( iterator_.array_ );
-   ValueInternalMap::increment( iterator_.map_ );
-#endif
-}
-
-
-void 
-ValueIteratorBase::decrement()
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   --current_;
-#else
-   if ( isArray_ )
-      ValueInternalArray::decrement( iterator_.array_ );
-   ValueInternalMap::decrement( iterator_.map_ );
-#endif
-}
-
-
-ValueIteratorBase::difference_type 
-ValueIteratorBase::computeDistance( const SelfType &other ) const
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-# ifdef JSON_USE_CPPTL_SMALLMAP
-   return current_ - other.current_;
-# else
-   // Iterator for null value are initialized using the default
-   // constructor, which initialize current_ to the default
-   // std::map::iterator. As begin() and end() are two instance 
-   // of the default std::map::iterator, they can not be compared.
-   // To allow this, we handle this comparison specifically.
-   if ( isNull_  &&  other.isNull_ )
-   {
-      return 0;
-   }
-
-
-   // Usage of std::distance is not portable (does not compile with Sun Studio 12 RogueWave STL,
-   // which is the one used by default).
-   // Using a portable hand-made version for non random iterator instead:
-   //   return difference_type( std::distance( current_, other.current_ ) );
-   difference_type myDistance = 0;
-   for ( Value::ObjectValues::iterator it = current_; it != other.current_; ++it )
-   {
-      ++myDistance;
-   }
-   return myDistance;
-# endif
-#else
-   if ( isArray_ )
-      return ValueInternalArray::distance( iterator_.array_, other.iterator_.array_ );
-   return ValueInternalMap::distance( iterator_.map_, other.iterator_.map_ );
-#endif
-}
-
-
-bool 
-ValueIteratorBase::isEqual( const SelfType &other ) const
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   if ( isNull_ )
-   {
-      return other.isNull_;
-   }
-   return current_ == other.current_;
-#else
-   if ( isArray_ )
-      return ValueInternalArray::equals( iterator_.array_, other.iterator_.array_ );
-   return ValueInternalMap::equals( iterator_.map_, other.iterator_.map_ );
-#endif
-}
-
-
-void 
-ValueIteratorBase::copy( const SelfType &other )
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   current_ = other.current_;
-#else
-   if ( isArray_ )
-      iterator_.array_ = other.iterator_.array_;
-   iterator_.map_ = other.iterator_.map_;
-#endif
-}
-
-
-Value 
-ValueIteratorBase::key() const
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   const Value::CZString czstring = (*current_).first;
-   if ( czstring.c_str() )
-   {
-      if ( czstring.isStaticString() )
-         return Value( StaticString( czstring.c_str() ) );
-      return Value( czstring.c_str() );
-   }
-   return Value( czstring.index() );
-#else
-   if ( isArray_ )
-      return Value( ValueInternalArray::indexOf( iterator_.array_ ) );
-   bool isStatic;
-   const char *memberName = ValueInternalMap::key( iterator_.map_, isStatic );
-   if ( isStatic )
-      return Value( StaticString( memberName ) );
-   return Value( memberName );
-#endif
-}
-
-
-UInt 
-ValueIteratorBase::index() const
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   const Value::CZString czstring = (*current_).first;
-   if ( !czstring.c_str() )
-      return czstring.index();
-   return Value::UInt( -1 );
-#else
-   if ( isArray_ )
-      return Value::UInt( ValueInternalArray::indexOf( iterator_.array_ ) );
-   return Value::UInt( -1 );
-#endif
-}
-
-
-const char *
-ValueIteratorBase::memberName() const
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   const char *name = (*current_).first.c_str();
-   return name ? name : "";
-#else
-   if ( !isArray_ )
-      return ValueInternalMap::key( iterator_.map_ );
-   return "";
-#endif
-}
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class ValueConstIterator
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-ValueConstIterator::ValueConstIterator()
-{
-}
-
-
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-ValueConstIterator::ValueConstIterator( const Value::ObjectValues::iterator &current )
-   : ValueIteratorBase( current )
-{
-}
-#else
-ValueConstIterator::ValueConstIterator( const ValueInternalArray::IteratorState &state )
-   : ValueIteratorBase( state )
-{
-}
-
-ValueConstIterator::ValueConstIterator( const ValueInternalMap::IteratorState &state )
-   : ValueIteratorBase( state )
-{
-}
-#endif
-
-ValueConstIterator &
-ValueConstIterator::operator =( const ValueIteratorBase &other )
-{
-   copy( other );
-   return *this;
-}
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class ValueIterator
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-ValueIterator::ValueIterator()
-{
-}
-
-
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-ValueIterator::ValueIterator( const Value::ObjectValues::iterator &current )
-   : ValueIteratorBase( current )
-{
-}
-#else
-ValueIterator::ValueIterator( const ValueInternalArray::IteratorState &state )
-   : ValueIteratorBase( state )
-{
-}
-
-ValueIterator::ValueIterator( const ValueInternalMap::IteratorState &state )
-   : ValueIteratorBase( state )
-{
-}
-#endif
-
-ValueIterator::ValueIterator( const ValueConstIterator &other )
-   : ValueIteratorBase( other )
-{
-}
-
-ValueIterator::ValueIterator( const ValueIterator &other )
-   : ValueIteratorBase( other )
-{
-}
-
-ValueIterator &
-ValueIterator::operator =( const SelfType &other )
-{
-   copy( other );
-   return *this;
-}


[56/70] Remove all cordova-lib files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_one/assets/www/cordova.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/assets/www/cordova.js b/cordova-lib/spec-plugman/projects/android_one/assets/www/cordova.js
deleted file mode 100644
index 000791b..0000000
--- a/cordova-lib/spec-plugman/projects/android_one/assets/www/cordova.js
+++ /dev/null
@@ -1,6848 +0,0 @@
-// Platform: android
-// 2.7.0rc1-12-ga86559a
-/*
- 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.
-*/
-;(function() {
-var CORDOVA_JS_BUILD_LABEL = '2.7.0rc1-12-ga86559a';
-// file: lib/scripts/require.js
-
-var require,
-    define;
-
-(function () {
-    var modules = {};
-    // Stack of moduleIds currently being built.
-    var requireStack = [];
-    // Map of module ID -> index into requireStack of modules currently being built.
-    var inProgressModules = {};
-
-    function build(module) {
-        var factory = module.factory;
-        module.exports = {};
-        delete module.factory;
-        factory(require, module.exports, module);
-        return module.exports;
-    }
-
-    require = function (id) {
-        if (!modules[id]) {
-            throw "module " + id + " not found";
-        } else if (id in inProgressModules) {
-            var cycle = requireStack.slice(inProgressModules[id]).join('->') + '->' + id;
-            throw "Cycle in require graph: " + cycle;
-        }
-        if (modules[id].factory) {
-            try {
-                inProgressModules[id] = requireStack.length;
-                requireStack.push(id);
-                return build(modules[id]);
-            } finally {
-                delete inProgressModules[id];
-                requireStack.pop();
-            }
-        }
-        return modules[id].exports;
-    };
-
-    define = function (id, factory) {
-        if (modules[id]) {
-            throw "module " + id + " already defined";
-        }
-
-        modules[id] = {
-            id: id,
-            factory: factory
-        };
-    };
-
-    define.remove = function (id) {
-        delete modules[id];
-    };
-
-    define.moduleMap = modules;
-})();
-
-//Export for use in node
-if (typeof module === "object" && typeof require === "function") {
-    module.exports.require = require;
-    module.exports.define = define;
-}
-
-// file: lib/cordova.js
-define("cordova", function(require, exports, module) {
-
-
-var channel = require('cordova/channel');
-
-/**
- * Listen for DOMContentLoaded and notify our channel subscribers.
- */
-document.addEventListener('DOMContentLoaded', function() {
-    channel.onDOMContentLoaded.fire();
-}, false);
-if (document.readyState == 'complete' || document.readyState == 'interactive') {
-    channel.onDOMContentLoaded.fire();
-}
-
-/**
- * Intercept calls to addEventListener + removeEventListener and handle deviceready,
- * resume, and pause events.
- */
-var m_document_addEventListener = document.addEventListener;
-var m_document_removeEventListener = document.removeEventListener;
-var m_window_addEventListener = window.addEventListener;
-var m_window_removeEventListener = window.removeEventListener;
-
-/**
- * Houses custom event handlers to intercept on document + window event listeners.
- */
-var documentEventHandlers = {},
-    windowEventHandlers = {};
-
-document.addEventListener = function(evt, handler, capture) {
-    var e = evt.toLowerCase();
-    if (typeof documentEventHandlers[e] != 'undefined') {
-        documentEventHandlers[e].subscribe(handler);
-    } else {
-        m_document_addEventListener.call(document, evt, handler, capture);
-    }
-};
-
-window.addEventListener = function(evt, handler, capture) {
-    var e = evt.toLowerCase();
-    if (typeof windowEventHandlers[e] != 'undefined') {
-        windowEventHandlers[e].subscribe(handler);
-    } else {
-        m_window_addEventListener.call(window, evt, handler, capture);
-    }
-};
-
-document.removeEventListener = function(evt, handler, capture) {
-    var e = evt.toLowerCase();
-    // If unsubscribing from an event that is handled by a plugin
-    if (typeof documentEventHandlers[e] != "undefined") {
-        documentEventHandlers[e].unsubscribe(handler);
-    } else {
-        m_document_removeEventListener.call(document, evt, handler, capture);
-    }
-};
-
-window.removeEventListener = function(evt, handler, capture) {
-    var e = evt.toLowerCase();
-    // If unsubscribing from an event that is handled by a plugin
-    if (typeof windowEventHandlers[e] != "undefined") {
-        windowEventHandlers[e].unsubscribe(handler);
-    } else {
-        m_window_removeEventListener.call(window, evt, handler, capture);
-    }
-};
-
-function createEvent(type, data) {
-    var event = document.createEvent('Events');
-    event.initEvent(type, false, false);
-    if (data) {
-        for (var i in data) {
-            if (data.hasOwnProperty(i)) {
-                event[i] = data[i];
-            }
-        }
-    }
-    return event;
-}
-
-if(typeof window.console === "undefined") {
-    window.console = {
-        log:function(){}
-    };
-}
-
-var cordova = {
-    define:define,
-    require:require,
-    /**
-     * Methods to add/remove your own addEventListener hijacking on document + window.
-     */
-    addWindowEventHandler:function(event) {
-        return (windowEventHandlers[event] = channel.create(event));
-    },
-    addStickyDocumentEventHandler:function(event) {
-        return (documentEventHandlers[event] = channel.createSticky(event));
-    },
-    addDocumentEventHandler:function(event) {
-        return (documentEventHandlers[event] = channel.create(event));
-    },
-    removeWindowEventHandler:function(event) {
-        delete windowEventHandlers[event];
-    },
-    removeDocumentEventHandler:function(event) {
-        delete documentEventHandlers[event];
-    },
-    /**
-     * Retrieve original event handlers that were replaced by Cordova
-     *
-     * @return object
-     */
-    getOriginalHandlers: function() {
-        return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener},
-        'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}};
-    },
-    /**
-     * Method to fire event from native code
-     * bNoDetach is required for events which cause an exception which needs to be caught in native code
-     */
-    fireDocumentEvent: function(type, data, bNoDetach) {
-        var evt = createEvent(type, data);
-        if (typeof documentEventHandlers[type] != 'undefined') {
-            if( bNoDetach ) {
-              documentEventHandlers[type].fire(evt);
-            }
-            else {
-              setTimeout(function() {
-                  // Fire deviceready on listeners that were registered before cordova.js was loaded.
-                  if (type == 'deviceready') {
-                      document.dispatchEvent(evt);
-                  }
-                  documentEventHandlers[type].fire(evt);
-              }, 0);
-            }
-        } else {
-            document.dispatchEvent(evt);
-        }
-    },
-    fireWindowEvent: function(type, data) {
-        var evt = createEvent(type,data);
-        if (typeof windowEventHandlers[type] != 'undefined') {
-            setTimeout(function() {
-                windowEventHandlers[type].fire(evt);
-            }, 0);
-        } else {
-            window.dispatchEvent(evt);
-        }
-    },
-
-    /**
-     * Plugin callback mechanism.
-     */
-    // Randomize the starting callbackId to avoid collisions after refreshing or navigating.
-    // This way, it's very unlikely that any new callback would get the same callbackId as an old callback.
-    callbackId: Math.floor(Math.random() * 2000000000),
-    callbacks:  {},
-    callbackStatus: {
-        NO_RESULT: 0,
-        OK: 1,
-        CLASS_NOT_FOUND_EXCEPTION: 2,
-        ILLEGAL_ACCESS_EXCEPTION: 3,
-        INSTANTIATION_EXCEPTION: 4,
-        MALFORMED_URL_EXCEPTION: 5,
-        IO_EXCEPTION: 6,
-        INVALID_ACTION: 7,
-        JSON_EXCEPTION: 8,
-        ERROR: 9
-    },
-
-    /**
-     * Called by native code when returning successful result from an action.
-     */
-    callbackSuccess: function(callbackId, args) {
-        try {
-            cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback);
-        } catch (e) {
-            console.log("Error in error callback: " + callbackId + " = "+e);
-        }
-    },
-
-    /**
-     * Called by native code when returning error result from an action.
-     */
-    callbackError: function(callbackId, args) {
-        // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative.
-        // Derive success from status.
-        try {
-            cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback);
-        } catch (e) {
-            console.log("Error in error callback: " + callbackId + " = "+e);
-        }
-    },
-
-    /**
-     * Called by native code when returning the result from an action.
-     */
-    callbackFromNative: function(callbackId, success, status, args, keepCallback) {
-        var callback = cordova.callbacks[callbackId];
-        if (callback) {
-            if (success && status == cordova.callbackStatus.OK) {
-                callback.success && callback.success.apply(null, args);
-            } else if (!success) {
-                callback.fail && callback.fail.apply(null, args);
-            }
-
-            // Clear callback if not expecting any more results
-            if (!keepCallback) {
-                delete cordova.callbacks[callbackId];
-            }
-        }
-    },
-    addConstructor: function(func) {
-        channel.onCordovaReady.subscribe(function() {
-            try {
-                func();
-            } catch(e) {
-                console.log("Failed to run constructor: " + e);
-            }
-        });
-    }
-};
-
-// Register pause, resume and deviceready channels as events on document.
-channel.onPause = cordova.addDocumentEventHandler('pause');
-channel.onResume = cordova.addDocumentEventHandler('resume');
-channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');
-
-module.exports = cordova;
-
-});
-
-// file: lib/common/argscheck.js
-define("cordova/argscheck", function(require, exports, module) {
-
-var exec = require('cordova/exec');
-var utils = require('cordova/utils');
-
-var moduleExports = module.exports;
-
-var typeMap = {
-    'A': 'Array',
-    'D': 'Date',
-    'N': 'Number',
-    'S': 'String',
-    'F': 'Function',
-    'O': 'Object'
-};
-
-function extractParamName(callee, argIndex) {
-  return (/.*?\((.*?)\)/).exec(callee)[1].split(', ')[argIndex];
-}
-
-function checkArgs(spec, functionName, args, opt_callee) {
-    if (!moduleExports.enableChecks) {
-        return;
-    }
-    var errMsg = null;
-    var typeName;
-    for (var i = 0; i < spec.length; ++i) {
-        var c = spec.charAt(i),
-            cUpper = c.toUpperCase(),
-            arg = args[i];
-        // Asterix means allow anything.
-        if (c == '*') {
-            continue;
-        }
-        typeName = utils.typeName(arg);
-        if ((arg === null || arg === undefined) && c == cUpper) {
-            continue;
-        }
-        if (typeName != typeMap[cUpper]) {
-            errMsg = 'Expected ' + typeMap[cUpper];
-            break;
-        }
-    }
-    if (errMsg) {
-        errMsg += ', but got ' + typeName + '.';
-        errMsg = 'Wrong type for parameter "' + extractParamName(opt_callee || args.callee, i) + '" of ' + functionName + ': ' + errMsg;
-        // Don't log when running jake test.
-        if (typeof jasmine == 'undefined') {
-            console.error(errMsg);
-        }
-        throw TypeError(errMsg);
-    }
-}
-
-function getValue(value, defaultValue) {
-    return value === undefined ? defaultValue : value;
-}
-
-moduleExports.checkArgs = checkArgs;
-moduleExports.getValue = getValue;
-moduleExports.enableChecks = true;
-
-
-});
-
-// file: lib/common/builder.js
-define("cordova/builder", function(require, exports, module) {
-
-var utils = require('cordova/utils');
-
-function each(objects, func, context) {
-    for (var prop in objects) {
-        if (objects.hasOwnProperty(prop)) {
-            func.apply(context, [objects[prop], prop]);
-        }
-    }
-}
-
-function clobber(obj, key, value) {
-    exports.replaceHookForTesting(obj, key);
-    obj[key] = value;
-    // Getters can only be overridden by getters.
-    if (obj[key] !== value) {
-        utils.defineGetter(obj, key, function() {
-            return value;
-        });
-    }
-}
-
-function assignOrWrapInDeprecateGetter(obj, key, value, message) {
-    if (message) {
-        utils.defineGetter(obj, key, function() {
-            console.log(message);
-            delete obj[key];
-            clobber(obj, key, value);
-            return value;
-        });
-    } else {
-        clobber(obj, key, value);
-    }
-}
-
-function include(parent, objects, clobber, merge) {
-    each(objects, function (obj, key) {
-        try {
-          var result = obj.path ? require(obj.path) : {};
-
-          if (clobber) {
-              // Clobber if it doesn't exist.
-              if (typeof parent[key] === 'undefined') {
-                  assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
-              } else if (typeof obj.path !== 'undefined') {
-                  // If merging, merge properties onto parent, otherwise, clobber.
-                  if (merge) {
-                      recursiveMerge(parent[key], result);
-                  } else {
-                      assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
-                  }
-              }
-              result = parent[key];
-          } else {
-            // Overwrite if not currently defined.
-            if (typeof parent[key] == 'undefined') {
-              assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
-            } else {
-              // Set result to what already exists, so we can build children into it if they exist.
-              result = parent[key];
-            }
-          }
-
-          if (obj.children) {
-            include(result, obj.children, clobber, merge);
-          }
-        } catch(e) {
-          utils.alert('Exception building cordova JS globals: ' + e + ' for key "' + key + '"');
-        }
-    });
-}
-
-/**
- * Merge properties from one object onto another recursively.  Properties from
- * the src object will overwrite existing target property.
- *
- * @param target Object to merge properties into.
- * @param src Object to merge properties from.
- */
-function recursiveMerge(target, src) {
-    for (var prop in src) {
-        if (src.hasOwnProperty(prop)) {
-            if (target.prototype && target.prototype.constructor === target) {
-                // If the target object is a constructor override off prototype.
-                clobber(target.prototype, prop, src[prop]);
-            } else {
-                if (typeof src[prop] === 'object' && typeof target[prop] === 'object') {
-                    recursiveMerge(target[prop], src[prop]);
-                } else {
-                    clobber(target, prop, src[prop]);
-                }
-            }
-        }
-    }
-}
-
-exports.buildIntoButDoNotClobber = function(objects, target) {
-    include(target, objects, false, false);
-};
-exports.buildIntoAndClobber = function(objects, target) {
-    include(target, objects, true, false);
-};
-exports.buildIntoAndMerge = function(objects, target) {
-    include(target, objects, true, true);
-};
-exports.recursiveMerge = recursiveMerge;
-exports.assignOrWrapInDeprecateGetter = assignOrWrapInDeprecateGetter;
-exports.replaceHookForTesting = function() {};
-
-});
-
-// file: lib/common/channel.js
-define("cordova/channel", function(require, exports, module) {
-
-var utils = require('cordova/utils'),
-    nextGuid = 1;
-
-/**
- * Custom pub-sub "channel" that can have functions subscribed to it
- * This object is used to define and control firing of events for
- * cordova initialization, as well as for custom events thereafter.
- *
- * The order of events during page load and Cordova startup is as follows:
- *
- * onDOMContentLoaded*         Internal event that is received when the web page is loaded and parsed.
- * onNativeReady*              Internal event that indicates the Cordova native side is ready.
- * onCordovaReady*             Internal event fired when all Cordova JavaScript objects have been created.
- * onCordovaInfoReady*         Internal event fired when device properties are available.
- * onCordovaConnectionReady*   Internal event fired when the connection property has been set.
- * onDeviceReady*              User event fired to indicate that Cordova is ready
- * onResume                    User event fired to indicate a start/resume lifecycle event
- * onPause                     User event fired to indicate a pause lifecycle event
- * onDestroy*                  Internal event fired when app is being destroyed (User should use window.onunload event, not this one).
- *
- * The events marked with an * are sticky. Once they have fired, they will stay in the fired state.
- * All listeners that subscribe after the event is fired will be executed right away.
- *
- * The only Cordova events that user code should register for are:
- *      deviceready           Cordova native code is initialized and Cordova APIs can be called from JavaScript
- *      pause                 App has moved to background
- *      resume                App has returned to foreground
- *
- * Listeners can be registered as:
- *      document.addEventListener("deviceready", myDeviceReadyListener, false);
- *      document.addEventListener("resume", myResumeListener, false);
- *      document.addEventListener("pause", myPauseListener, false);
- *
- * The DOM lifecycle events should be used for saving and restoring state
- *      window.onload
- *      window.onunload
- *
- */
-
-/**
- * Channel
- * @constructor
- * @param type  String the channel name
- */
-var Channel = function(type, sticky) {
-    this.type = type;
-    // Map of guid -> function.
-    this.handlers = {};
-    // 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired.
-    this.state = sticky ? 1 : 0;
-    // Used in sticky mode to remember args passed to fire().
-    this.fireArgs = null;
-    // Used by onHasSubscribersChange to know if there are any listeners.
-    this.numHandlers = 0;
-    // Function that is called when the first listener is subscribed, or when
-    // the last listener is unsubscribed.
-    this.onHasSubscribersChange = null;
-},
-    channel = {
-        /**
-         * Calls the provided function only after all of the channels specified
-         * have been fired. All channels must be sticky channels.
-         */
-        join: function(h, c) {
-            var len = c.length,
-                i = len,
-                f = function() {
-                    if (!(--i)) h();
-                };
-            for (var j=0; j<len; j++) {
-                if (c[j].state === 0) {
-                    throw Error('Can only use join with sticky channels.');
-                }
-                c[j].subscribe(f);
-            }
-            if (!len) h();
-        },
-        create: function(type) {
-            return channel[type] = new Channel(type, false);
-        },
-        createSticky: function(type) {
-            return channel[type] = new Channel(type, true);
-        },
-
-        /**
-         * cordova Channels that must fire before "deviceready" is fired.
-         */
-        deviceReadyChannelsArray: [],
-        deviceReadyChannelsMap: {},
-
-        /**
-         * Indicate that a feature needs to be initialized before it is ready to be used.
-         * This holds up Cordova's "deviceready" event until the feature has been initialized
-         * and Cordova.initComplete(feature) is called.
-         *
-         * @param feature {String}     The unique feature name
-         */
-        waitForInitialization: function(feature) {
-            if (feature) {
-                var c = channel[feature] || this.createSticky(feature);
-                this.deviceReadyChannelsMap[feature] = c;
-                this.deviceReadyChannelsArray.push(c);
-            }
-        },
-
-        /**
-         * Indicate that initialization code has completed and the feature is ready to be used.
-         *
-         * @param feature {String}     The unique feature name
-         */
-        initializationComplete: function(feature) {
-            var c = this.deviceReadyChannelsMap[feature];
-            if (c) {
-                c.fire();
-            }
-        }
-    };
-
-function forceFunction(f) {
-    if (typeof f != 'function') throw "Function required as first argument!";
-}
-
-/**
- * Subscribes the given function to the channel. Any time that
- * Channel.fire is called so too will the function.
- * Optionally specify an execution context for the function
- * and a guid that can be used to stop subscribing to the channel.
- * Returns the guid.
- */
-Channel.prototype.subscribe = function(f, c) {
-    // need a function to call
-    forceFunction(f);
-    if (this.state == 2) {
-        f.apply(c || this, this.fireArgs);
-        return;
-    }
-
-    var func = f,
-        guid = f.observer_guid;
-    if (typeof c == "object") { func = utils.close(c, f); }
-
-    if (!guid) {
-        // first time any channel has seen this subscriber
-        guid = '' + nextGuid++;
-    }
-    func.observer_guid = guid;
-    f.observer_guid = guid;
-
-    // Don't add the same handler more than once.
-    if (!this.handlers[guid]) {
-        this.handlers[guid] = func;
-        this.numHandlers++;
-        if (this.numHandlers == 1) {
-            this.onHasSubscribersChange && this.onHasSubscribersChange();
-        }
-    }
-};
-
-/**
- * Unsubscribes the function with the given guid from the channel.
- */
-Channel.prototype.unsubscribe = function(f) {
-    // need a function to unsubscribe
-    forceFunction(f);
-
-    var guid = f.observer_guid,
-        handler = this.handlers[guid];
-    if (handler) {
-        delete this.handlers[guid];
-        this.numHandlers--;
-        if (this.numHandlers === 0) {
-            this.onHasSubscribersChange && this.onHasSubscribersChange();
-        }
-    }
-};
-
-/**
- * Calls all functions subscribed to this channel.
- */
-Channel.prototype.fire = function(e) {
-    var fail = false,
-        fireArgs = Array.prototype.slice.call(arguments);
-    // Apply stickiness.
-    if (this.state == 1) {
-        this.state = 2;
-        this.fireArgs = fireArgs;
-    }
-    if (this.numHandlers) {
-        // Copy the values first so that it is safe to modify it from within
-        // callbacks.
-        var toCall = [];
-        for (var item in this.handlers) {
-            toCall.push(this.handlers[item]);
-        }
-        for (var i = 0; i < toCall.length; ++i) {
-            toCall[i].apply(this, fireArgs);
-        }
-        if (this.state == 2 && this.numHandlers) {
-            this.numHandlers = 0;
-            this.handlers = {};
-            this.onHasSubscribersChange && this.onHasSubscribersChange();
-        }
-    }
-};
-
-
-// defining them here so they are ready super fast!
-// DOM event that is received when the web page is loaded and parsed.
-channel.createSticky('onDOMContentLoaded');
-
-// Event to indicate the Cordova native side is ready.
-channel.createSticky('onNativeReady');
-
-// Event to indicate that all Cordova JavaScript objects have been created
-// and it's time to run plugin constructors.
-channel.createSticky('onCordovaReady');
-
-// Event to indicate that device properties are available
-channel.createSticky('onCordovaInfoReady');
-
-// Event to indicate that the connection property has been set.
-channel.createSticky('onCordovaConnectionReady');
-
-// Event to indicate that all automatically loaded JS plugins are loaded and ready.
-channel.createSticky('onPluginsReady');
-
-// Event to indicate that Cordova is ready
-channel.createSticky('onDeviceReady');
-
-// Event to indicate a resume lifecycle event
-channel.create('onResume');
-
-// Event to indicate a pause lifecycle event
-channel.create('onPause');
-
-// Event to indicate a destroy lifecycle event
-channel.createSticky('onDestroy');
-
-// Channels that must fire before "deviceready" is fired.
-channel.waitForInitialization('onCordovaReady');
-channel.waitForInitialization('onCordovaConnectionReady');
-channel.waitForInitialization('onDOMContentLoaded');
-
-module.exports = channel;
-
-});
-
-// file: lib/common/commandProxy.js
-define("cordova/commandProxy", function(require, exports, module) {
-
-
-// internal map of proxy function
-var CommandProxyMap = {};
-
-module.exports = {
-
-    // example: cordova.commandProxy.add("Accelerometer",{getCurrentAcceleration: function(successCallback, errorCallback, options) {...},...);
-    add:function(id,proxyObj) {
-        console.log("adding proxy for " + id);
-        CommandProxyMap[id] = proxyObj;
-        return proxyObj;
-    },
-
-    // cordova.commandProxy.remove("Accelerometer");
-    remove:function(id) {
-        var proxy = CommandProxyMap[id];
-        delete CommandProxyMap[id];
-        CommandProxyMap[id] = null;
-        return proxy;
-    },
-
-    get:function(service,action) {
-        return ( CommandProxyMap[service] ? CommandProxyMap[service][action] : null );
-    }
-};
-});
-
-// file: lib/android/exec.js
-define("cordova/exec", function(require, exports, module) {
-
-/**
- * Execute a cordova command.  It is up to the native side whether this action
- * is synchronous or asynchronous.  The native side can return:
- *      Synchronous: PluginResult object as a JSON string
- *      Asynchronous: Empty string ""
- * If async, the native side will cordova.callbackSuccess or cordova.callbackError,
- * depending upon the result of the action.
- *
- * @param {Function} success    The success callback
- * @param {Function} fail       The fail callback
- * @param {String} service      The name of the service to use
- * @param {String} action       Action to be run in cordova
- * @param {String[]} [args]     Zero or more arguments to pass to the method
- */
-var cordova = require('cordova'),
-    nativeApiProvider = require('cordova/plugin/android/nativeapiprovider'),
-    utils = require('cordova/utils'),
-    jsToNativeModes = {
-        PROMPT: 0,
-        JS_OBJECT: 1,
-        // This mode is currently for benchmarking purposes only. It must be enabled
-        // on the native side through the ENABLE_LOCATION_CHANGE_EXEC_MODE
-        // constant within CordovaWebViewClient.java before it will work.
-        LOCATION_CHANGE: 2
-    },
-    nativeToJsModes = {
-        // Polls for messages using the JS->Native bridge.
-        POLLING: 0,
-        // For LOAD_URL to be viable, it would need to have a work-around for
-        // the bug where the soft-keyboard gets dismissed when a message is sent.
-        LOAD_URL: 1,
-        // For the ONLINE_EVENT to be viable, it would need to intercept all event
-        // listeners (both through addEventListener and window.ononline) as well
-        // as set the navigator property itself.
-        ONLINE_EVENT: 2,
-        // Uses reflection to access private APIs of the WebView that can send JS
-        // to be executed.
-        // Requires Android 3.2.4 or above.
-        PRIVATE_API: 3
-    },
-    jsToNativeBridgeMode,  // Set lazily.
-    nativeToJsBridgeMode = nativeToJsModes.ONLINE_EVENT,
-    pollEnabled = false,
-    messagesFromNative = [];
-
-function androidExec(success, fail, service, action, args) {
-    // Set default bridge modes if they have not already been set.
-    // By default, we use the failsafe, since addJavascriptInterface breaks too often
-    if (jsToNativeBridgeMode === undefined) {
-        androidExec.setJsToNativeBridgeMode(jsToNativeModes.JS_OBJECT);
-    }
-
-    // Process any ArrayBuffers in the args into a string.
-    for (var i = 0; i < args.length; i++) {
-        if (utils.typeName(args[i]) == 'ArrayBuffer') {
-            args[i] = window.btoa(String.fromCharCode.apply(null, new Uint8Array(args[i])));
-        }
-    }
-
-    var callbackId = service + cordova.callbackId++,
-        argsJson = JSON.stringify(args);
-
-    if (success || fail) {
-        cordova.callbacks[callbackId] = {success:success, fail:fail};
-    }
-
-    if (jsToNativeBridgeMode == jsToNativeModes.LOCATION_CHANGE) {
-        window.location = 'http://cdv_exec/' + service + '#' + action + '#' + callbackId + '#' + argsJson;
-    } else {
-        var messages = nativeApiProvider.get().exec(service, action, callbackId, argsJson);
-        // If argsJson was received by Java as null, try again with the PROMPT bridge mode.
-        // This happens in rare circumstances, such as when certain Unicode characters are passed over the bridge on a Galaxy S2.  See CB-2666.
-        if (jsToNativeBridgeMode == jsToNativeModes.JS_OBJECT && messages === "@Null arguments.") {
-            androidExec.setJsToNativeBridgeMode(jsToNativeModes.PROMPT);
-            androidExec(success, fail, service, action, args);
-            androidExec.setJsToNativeBridgeMode(jsToNativeModes.JS_OBJECT);
-            return;
-        } else {
-            androidExec.processMessages(messages);
-        }
-    }
-}
-
-function pollOnce() {
-    var msg = nativeApiProvider.get().retrieveJsMessages();
-    androidExec.processMessages(msg);
-}
-
-function pollingTimerFunc() {
-    if (pollEnabled) {
-        pollOnce();
-        setTimeout(pollingTimerFunc, 50);
-    }
-}
-
-function hookOnlineApis() {
-    function proxyEvent(e) {
-        cordova.fireWindowEvent(e.type);
-    }
-    // The network module takes care of firing online and offline events.
-    // It currently fires them only on document though, so we bridge them
-    // to window here (while first listening for exec()-related online/offline
-    // events).
-    window.addEventListener('online', pollOnce, false);
-    window.addEventListener('offline', pollOnce, false);
-    cordova.addWindowEventHandler('online');
-    cordova.addWindowEventHandler('offline');
-    document.addEventListener('online', proxyEvent, false);
-    document.addEventListener('offline', proxyEvent, false);
-}
-
-hookOnlineApis();
-
-androidExec.jsToNativeModes = jsToNativeModes;
-androidExec.nativeToJsModes = nativeToJsModes;
-
-androidExec.setJsToNativeBridgeMode = function(mode) {
-    if (mode == jsToNativeModes.JS_OBJECT && !window._cordovaNative) {
-        console.log('Falling back on PROMPT mode since _cordovaNative is missing. Expected for Android 3.2 and lower only.');
-        mode = jsToNativeModes.PROMPT;
-    }
-    nativeApiProvider.setPreferPrompt(mode == jsToNativeModes.PROMPT);
-    jsToNativeBridgeMode = mode;
-};
-
-androidExec.setNativeToJsBridgeMode = function(mode) {
-    if (mode == nativeToJsBridgeMode) {
-        return;
-    }
-    if (nativeToJsBridgeMode == nativeToJsModes.POLLING) {
-        pollEnabled = false;
-    }
-
-    nativeToJsBridgeMode = mode;
-    // Tell the native side to switch modes.
-    nativeApiProvider.get().setNativeToJsBridgeMode(mode);
-
-    if (mode == nativeToJsModes.POLLING) {
-        pollEnabled = true;
-        setTimeout(pollingTimerFunc, 1);
-    }
-};
-
-// Processes a single message, as encoded by NativeToJsMessageQueue.java.
-function processMessage(message) {
-    try {
-        var firstChar = message.charAt(0);
-        if (firstChar == 'J') {
-            eval(message.slice(1));
-        } else if (firstChar == 'S' || firstChar == 'F') {
-            var success = firstChar == 'S';
-            var keepCallback = message.charAt(1) == '1';
-            var spaceIdx = message.indexOf(' ', 2);
-            var status = +message.slice(2, spaceIdx);
-            var nextSpaceIdx = message.indexOf(' ', spaceIdx + 1);
-            var callbackId = message.slice(spaceIdx + 1, nextSpaceIdx);
-            var payloadKind = message.charAt(nextSpaceIdx + 1);
-            var payload;
-            if (payloadKind == 's') {
-                payload = message.slice(nextSpaceIdx + 2);
-            } else if (payloadKind == 't') {
-                payload = true;
-            } else if (payloadKind == 'f') {
-                payload = false;
-            } else if (payloadKind == 'N') {
-                payload = null;
-            } else if (payloadKind == 'n') {
-                payload = +message.slice(nextSpaceIdx + 2);
-            } else if (payloadKind == 'A') {
-                var data = message.slice(nextSpaceIdx + 2);
-                var bytes = window.atob(data);
-                var arraybuffer = new Uint8Array(bytes.length);
-                for (var i = 0; i < bytes.length; i++) {
-                    arraybuffer[i] = bytes.charCodeAt(i);
-                }
-                payload = arraybuffer.buffer;
-            } else if (payloadKind == 'S') {
-                payload = window.atob(message.slice(nextSpaceIdx + 2));
-            } else {
-                payload = JSON.parse(message.slice(nextSpaceIdx + 1));
-            }
-            cordova.callbackFromNative(callbackId, success, status, [payload], keepCallback);
-        } else {
-            console.log("processMessage failed: invalid message:" + message);
-        }
-    } catch (e) {
-        console.log("processMessage failed: Message: " + message);
-        console.log("processMessage failed: Error: " + e);
-        console.log("processMessage failed: Stack: " + e.stack);
-    }
-}
-
-// This is called from the NativeToJsMessageQueue.java.
-androidExec.processMessages = function(messages) {
-    if (messages) {
-        messagesFromNative.push(messages);
-        // Check for the reentrant case, and enqueue the message if that's the case.
-        if (messagesFromNative.length > 1) {
-            return;
-        }
-        while (messagesFromNative.length) {
-            // Don't unshift until the end so that reentrancy can be detected.
-            messages = messagesFromNative[0];
-            // The Java side can send a * message to indicate that it
-            // still has messages waiting to be retrieved.
-            if (messages == '*') {
-                messagesFromNative.shift();
-                window.setTimeout(pollOnce, 0);
-                return;
-            }
-
-            var spaceIdx = messages.indexOf(' ');
-            var msgLen = +messages.slice(0, spaceIdx);
-            var message = messages.substr(spaceIdx + 1, msgLen);
-            messages = messages.slice(spaceIdx + msgLen + 1);
-            processMessage(message);
-            if (messages) {
-                messagesFromNative[0] = messages;
-            } else {
-                messagesFromNative.shift();
-            }
-        }
-    }
-};
-
-module.exports = androidExec;
-
-});
-
-// file: lib/common/modulemapper.js
-define("cordova/modulemapper", function(require, exports, module) {
-
-var builder = require('cordova/builder'),
-    moduleMap = define.moduleMap,
-    symbolList,
-    deprecationMap;
-
-exports.reset = function() {
-    symbolList = [];
-    deprecationMap = {};
-};
-
-function addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) {
-    if (!(moduleName in moduleMap)) {
-        throw new Error('Module ' + moduleName + ' does not exist.');
-    }
-    symbolList.push(strategy, moduleName, symbolPath);
-    if (opt_deprecationMessage) {
-        deprecationMap[symbolPath] = opt_deprecationMessage;
-    }
-}
-
-// Note: Android 2.3 does have Function.bind().
-exports.clobbers = function(moduleName, symbolPath, opt_deprecationMessage) {
-    addEntry('c', moduleName, symbolPath, opt_deprecationMessage);
-};
-
-exports.merges = function(moduleName, symbolPath, opt_deprecationMessage) {
-    addEntry('m', moduleName, symbolPath, opt_deprecationMessage);
-};
-
-exports.defaults = function(moduleName, symbolPath, opt_deprecationMessage) {
-    addEntry('d', moduleName, symbolPath, opt_deprecationMessage);
-};
-
-function prepareNamespace(symbolPath, context) {
-    if (!symbolPath) {
-        return context;
-    }
-    var parts = symbolPath.split('.');
-    var cur = context;
-    for (var i = 0, part; part = parts[i]; ++i) {
-        cur = cur[part] = cur[part] || {};
-    }
-    return cur;
-}
-
-exports.mapModules = function(context) {
-    var origSymbols = {};
-    context.CDV_origSymbols = origSymbols;
-    for (var i = 0, len = symbolList.length; i < len; i += 3) {
-        var strategy = symbolList[i];
-        var moduleName = symbolList[i + 1];
-        var symbolPath = symbolList[i + 2];
-        var lastDot = symbolPath.lastIndexOf('.');
-        var namespace = symbolPath.substr(0, lastDot);
-        var lastName = symbolPath.substr(lastDot + 1);
-
-        var module = require(moduleName);
-        var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null;
-        var parentObj = prepareNamespace(namespace, context);
-        var target = parentObj[lastName];
-
-        if (strategy == 'm' && target) {
-            builder.recursiveMerge(target, module);
-        } else if ((strategy == 'd' && !target) || (strategy != 'd')) {
-            if (!(symbolPath in origSymbols)) {
-                origSymbols[symbolPath] = target;
-            }
-            builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg);
-        }
-    }
-};
-
-exports.getOriginalSymbol = function(context, symbolPath) {
-    var origSymbols = context.CDV_origSymbols;
-    if (origSymbols && (symbolPath in origSymbols)) {
-        return origSymbols[symbolPath];
-    }
-    var parts = symbolPath.split('.');
-    var obj = context;
-    for (var i = 0; i < parts.length; ++i) {
-        obj = obj && obj[parts[i]];
-    }
-    return obj;
-};
-
-exports.loadMatchingModules = function(matchingRegExp) {
-    for (var k in moduleMap) {
-        if (matchingRegExp.exec(k)) {
-            require(k);
-        }
-    }
-};
-
-exports.reset();
-
-
-});
-
-// file: lib/android/platform.js
-define("cordova/platform", function(require, exports, module) {
-
-module.exports = {
-    id: "android",
-    initialize:function() {
-        var channel = require("cordova/channel"),
-            cordova = require('cordova'),
-            exec = require('cordova/exec'),
-            modulemapper = require('cordova/modulemapper');
-
-        modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
-        modulemapper.clobbers('cordova/plugin/android/app', 'navigator.app');
-
-        modulemapper.mapModules(window);
-
-        // Inject a listener for the backbutton on the document.
-        var backButtonChannel = cordova.addDocumentEventHandler('backbutton');
-        backButtonChannel.onHasSubscribersChange = function() {
-            // If we just attached the first handler or detached the last handler,
-            // let native know we need to override the back button.
-            exec(null, null, "App", "overrideBackbutton", [this.numHandlers == 1]);
-        };
-
-        // Add hardware MENU and SEARCH button handlers
-        cordova.addDocumentEventHandler('menubutton');
-        cordova.addDocumentEventHandler('searchbutton');
-
-        // Let native code know we are all done on the JS side.
-        // Native code will then un-hide the WebView.
-        channel.join(function() {
-            exec(null, null, "App", "show", []);
-        }, [channel.onCordovaReady]);
-    }
-};
-
-});
-
-// file: lib/common/plugin/Acceleration.js
-define("cordova/plugin/Acceleration", function(require, exports, module) {
-
-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;
-
-});
-
-// file: lib/common/plugin/Camera.js
-define("cordova/plugin/Camera", function(require, exports, module) {
-
-var argscheck = require('cordova/argscheck'),
-    exec = require('cordova/exec'),
-    Camera = require('cordova/plugin/CameraConstants'),
-    CameraPopoverHandle = require('cordova/plugin/CameraPopoverHandle');
-
-var cameraExport = {};
-
-// Tack on the Camera Constants to the base camera plugin.
-for (var key in Camera) {
-    cameraExport[key] = Camera[key];
-}
-
-/**
- * Gets a picture from source defined by "options.sourceType", and returns the
- * image as defined by the "options.destinationType" option.
-
- * The defaults are sourceType=CAMERA and destinationType=FILE_URI.
- *
- * @param {Function} successCallback
- * @param {Function} errorCallback
- * @param {Object} options
- */
-cameraExport.getPicture = function(successCallback, errorCallback, options) {
-    argscheck.checkArgs('fFO', 'Camera.getPicture', arguments);
-    options = options || {};
-    var getValue = argscheck.getValue;
-
-    var quality = getValue(options.quality, 50);
-    var destinationType = getValue(options.destinationType, Camera.DestinationType.FILE_URI);
-    var sourceType = getValue(options.sourceType, Camera.PictureSourceType.CAMERA);
-    var targetWidth = getValue(options.targetWidth, -1);
-    var targetHeight = getValue(options.targetHeight, -1);
-    var encodingType = getValue(options.encodingType, Camera.EncodingType.JPEG);
-    var mediaType = getValue(options.mediaType, Camera.MediaType.PICTURE);
-    var allowEdit = !!options.allowEdit;
-    var correctOrientation = !!options.correctOrientation;
-    var saveToPhotoAlbum = !!options.saveToPhotoAlbum;
-    var popoverOptions = getValue(options.popoverOptions, null);
-    var cameraDirection = getValue(options.cameraDirection, Camera.Direction.BACK);
-
-    var args = [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType,
-                mediaType, allowEdit, correctOrientation, saveToPhotoAlbum, popoverOptions, cameraDirection];
-
-    exec(successCallback, errorCallback, "Camera", "takePicture", args);
-    return new CameraPopoverHandle();
-};
-
-cameraExport.cleanup = function(successCallback, errorCallback) {
-    exec(successCallback, errorCallback, "Camera", "cleanup", []);
-};
-
-module.exports = cameraExport;
-
-});
-
-// file: lib/common/plugin/CameraConstants.js
-define("cordova/plugin/CameraConstants", function(require, exports, module) {
-
-module.exports = {
-  DestinationType:{
-    DATA_URL: 0,         // Return base64 encoded string
-    FILE_URI: 1,         // Return file uri (content://media/external/images/media/2 for Android)
-    NATIVE_URI: 2        // Return native uri (eg. asset-library://... for iOS)
-  },
-  EncodingType:{
-    JPEG: 0,             // Return JPEG encoded image
-    PNG: 1               // Return PNG encoded image
-  },
-  MediaType:{
-    PICTURE: 0,          // allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType
-    VIDEO: 1,            // allow selection of video only, ONLY RETURNS URL
-    ALLMEDIA : 2         // allow selection from all media types
-  },
-  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)
-  },
-  PopoverArrowDirection:{
-      ARROW_UP : 1,        // matches iOS UIPopoverArrowDirection constants to specify arrow location on popover
-      ARROW_DOWN : 2,
-      ARROW_LEFT : 4,
-      ARROW_RIGHT : 8,
-      ARROW_ANY : 15
-  },
-  Direction:{
-      BACK: 0,
-      FRONT: 1
-  }
-};
-
-});
-
-// file: lib/common/plugin/CameraPopoverHandle.js
-define("cordova/plugin/CameraPopoverHandle", function(require, exports, module) {
-
-var exec = require('cordova/exec');
-
-/**
- * A handle to an image picker popover.
- */
-var CameraPopoverHandle = function() {
-    this.setPosition = function(popoverOptions) {
-        console.log('CameraPopoverHandle.setPosition is only supported on iOS.');
-    };
-};
-
-module.exports = CameraPopoverHandle;
-
-});
-
-// file: lib/common/plugin/CameraPopoverOptions.js
-define("cordova/plugin/CameraPopoverOptions", function(require, exports, module) {
-
-var Camera = require('cordova/plugin/CameraConstants');
-
-/**
- * Encapsulates options for iOS Popover image picker
- */
-var CameraPopoverOptions = function(x,y,width,height,arrowDir){
-    // information of rectangle that popover should be anchored to
-    this.x = x || 0;
-    this.y = y || 32;
-    this.width = width || 320;
-    this.height = height || 480;
-    // The direction of the popover arrow
-    this.arrowDir = arrowDir || Camera.PopoverArrowDirection.ARROW_ANY;
-};
-
-module.exports = CameraPopoverOptions;
-
-});
-
-// file: lib/common/plugin/CaptureAudioOptions.js
-define("cordova/plugin/CaptureAudioOptions", function(require, exports, module) {
-
-/**
- * Encapsulates all audio capture operation configuration options.
- */
-var CaptureAudioOptions = function(){
-    // Upper limit of sound clips user can record. Value must be equal or greater than 1.
-    this.limit = 1;
-    // Maximum duration of a single sound clip in seconds.
-    this.duration = 0;
-};
-
-module.exports = CaptureAudioOptions;
-
-});
-
-// file: lib/common/plugin/CaptureError.js
-define("cordova/plugin/CaptureError", function(require, exports, module) {
-
-/**
- * The CaptureError interface encapsulates all errors in the Capture API.
- */
-var CaptureError = function(c) {
-   this.code = c || null;
-};
-
-// Camera or microphone failed to capture image or sound.
-CaptureError.CAPTURE_INTERNAL_ERR = 0;
-// Camera application or audio capture application is currently serving other capture request.
-CaptureError.CAPTURE_APPLICATION_BUSY = 1;
-// Invalid use of the API (e.g. limit parameter has value less than one).
-CaptureError.CAPTURE_INVALID_ARGUMENT = 2;
-// User exited camera application or audio capture application before capturing anything.
-CaptureError.CAPTURE_NO_MEDIA_FILES = 3;
-// The requested capture operation is not supported.
-CaptureError.CAPTURE_NOT_SUPPORTED = 20;
-
-module.exports = CaptureError;
-
-});
-
-// file: lib/common/plugin/CaptureImageOptions.js
-define("cordova/plugin/CaptureImageOptions", function(require, exports, module) {
-
-/**
- * Encapsulates all image capture operation configuration options.
- */
-var CaptureImageOptions = function(){
-    // Upper limit of images user can take. Value must be equal or greater than 1.
-    this.limit = 1;
-};
-
-module.exports = CaptureImageOptions;
-
-});
-
-// file: lib/common/plugin/CaptureVideoOptions.js
-define("cordova/plugin/CaptureVideoOptions", function(require, exports, module) {
-
-/**
- * Encapsulates all video capture operation configuration options.
- */
-var CaptureVideoOptions = function(){
-    // Upper limit of videos user can record. Value must be equal or greater than 1.
-    this.limit = 1;
-    // Maximum duration of a single video clip in seconds.
-    this.duration = 0;
-};
-
-module.exports = CaptureVideoOptions;
-
-});
-
-// file: lib/common/plugin/CompassError.js
-define("cordova/plugin/CompassError", function(require, exports, module) {
-
-/**
- *  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;
-
-});
-
-// file: lib/common/plugin/CompassHeading.js
-define("cordova/plugin/CompassHeading", function(require, exports, module) {
-
-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;
-
-});
-
-// file: lib/common/plugin/ConfigurationData.js
-define("cordova/plugin/ConfigurationData", function(require, exports, module) {
-
-/**
- * Encapsulates a set of parameters that the capture device supports.
- */
-function ConfigurationData() {
-    // The ASCII-encoded string in lower case representing the media type.
-    this.type = null;
-    // The height attribute represents height of the image or video in pixels.
-    // In the case of a sound clip this attribute has value 0.
-    this.height = 0;
-    // The width attribute represents width of the image or video in pixels.
-    // In the case of a sound clip this attribute has value 0
-    this.width = 0;
-}
-
-module.exports = ConfigurationData;
-
-});
-
-// file: lib/common/plugin/Connection.js
-define("cordova/plugin/Connection", function(require, exports, module) {
-
-/**
- * Network status
- */
-module.exports = {
-        UNKNOWN: "unknown",
-        ETHERNET: "ethernet",
-        WIFI: "wifi",
-        CELL_2G: "2g",
-        CELL_3G: "3g",
-        CELL_4G: "4g",
-        CELL:"cellular",
-        NONE: "none"
-};
-
-});
-
-// file: lib/common/plugin/Contact.js
-define("cordova/plugin/Contact", function(require, exports, module) {
-
-var argscheck = require('cordova/argscheck'),
-    exec = require('cordova/exec'),
-    ContactError = require('cordova/plugin/ContactError'),
-    utils = require('cordova/utils');
-
-/**
-* Converts primitives into Complex Object
-* Currently only used for Date fields
-*/
-function convertIn(contact) {
-    var value = contact.birthday;
-    try {
-      contact.birthday = new Date(parseFloat(value));
-    } catch (exception){
-      console.log("Cordova Contact convertIn error: exception creating date.");
-    }
-    return contact;
-}
-
-/**
-* Converts Complex objects into primitives
-* Only conversion at present is for Dates.
-**/
-
-function convertOut(contact) {
-    var value = contact.birthday;
-    if (value !== null) {
-        // try to make it a Date object if it is not already
-        if (!utils.isDate(value)){
-            try {
-                value = new Date(value);
-            } catch(exception){
-                value = null;
-            }
-        }
-        if (utils.isDate(value)){
-            value = value.valueOf(); // convert to milliseconds
-        }
-        contact.birthday = value;
-    }
-    return contact;
-}
-
-/**
-* Contains information about a single contact.
-* @constructor
-* @param {DOMString} id unique identifier
-* @param {DOMString} displayName
-* @param {ContactName} name
-* @param {DOMString} nickname
-* @param {Array.<ContactField>} phoneNumbers array of phone numbers
-* @param {Array.<ContactField>} emails array of email addresses
-* @param {Array.<ContactAddress>} addresses array of addresses
-* @param {Array.<ContactField>} ims instant messaging user ids
-* @param {Array.<ContactOrganization>} organizations
-* @param {DOMString} birthday contact's birthday
-* @param {DOMString} note user notes about contact
-* @param {Array.<ContactField>} photos
-* @param {Array.<ContactField>} categories
-* @param {Array.<ContactField>} urls contact's web sites
-*/
-var Contact = function (id, displayName, name, nickname, phoneNumbers, emails, addresses,
-    ims, organizations, birthday, note, photos, categories, urls) {
-    this.id = id || null;
-    this.rawId = null;
-    this.displayName = displayName || null;
-    this.name = name || null; // ContactName
-    this.nickname = nickname || null;
-    this.phoneNumbers = phoneNumbers || null; // ContactField[]
-    this.emails = emails || null; // ContactField[]
-    this.addresses = addresses || null; // ContactAddress[]
-    this.ims = ims || null; // ContactField[]
-    this.organizations = organizations || null; // ContactOrganization[]
-    this.birthday = birthday || null;
-    this.note = note || null;
-    this.photos = photos || null; // ContactField[]
-    this.categories = categories || null; // ContactField[]
-    this.urls = urls || null; // ContactField[]
-};
-
-/**
-* Removes contact from device storage.
-* @param successCB success callback
-* @param errorCB error callback
-*/
-Contact.prototype.remove = function(successCB, errorCB) {
-    argscheck.checkArgs('FF', 'Contact.remove', arguments);
-    var fail = errorCB && function(code) {
-        errorCB(new ContactError(code));
-    };
-    if (this.id === null) {
-        fail(ContactError.UNKNOWN_ERROR);
-    }
-    else {
-        exec(successCB, fail, "Contacts", "remove", [this.id]);
-    }
-};
-
-/**
-* Creates a deep copy of this Contact.
-* With the contact ID set to null.
-* @return copy of this Contact
-*/
-Contact.prototype.clone = function() {
-    var clonedContact = utils.clone(this);
-    clonedContact.id = null;
-    clonedContact.rawId = null;
-
-    function nullIds(arr) {
-        if (arr) {
-            for (var i = 0; i < arr.length; ++i) {
-                arr[i].id = null;
-            }
-        }
-    }
-
-    // Loop through and clear out any id's in phones, emails, etc.
-    nullIds(clonedContact.phoneNumbers);
-    nullIds(clonedContact.emails);
-    nullIds(clonedContact.addresses);
-    nullIds(clonedContact.ims);
-    nullIds(clonedContact.organizations);
-    nullIds(clonedContact.categories);
-    nullIds(clonedContact.photos);
-    nullIds(clonedContact.urls);
-    return clonedContact;
-};
-
-/**
-* Persists contact to device storage.
-* @param successCB success callback
-* @param errorCB error callback
-*/
-Contact.prototype.save = function(successCB, errorCB) {
-    argscheck.checkArgs('FFO', 'Contact.save', arguments);
-    var fail = errorCB && function(code) {
-        errorCB(new ContactError(code));
-    };
-    var success = function(result) {
-        if (result) {
-            if (successCB) {
-                var fullContact = require('cordova/plugin/contacts').create(result);
-                successCB(convertIn(fullContact));
-            }
-        }
-        else {
-            // no Entry object returned
-            fail(ContactError.UNKNOWN_ERROR);
-        }
-    };
-    var dupContact = convertOut(utils.clone(this));
-    exec(success, fail, "Contacts", "save", [dupContact]);
-};
-
-
-module.exports = Contact;
-
-});
-
-// file: lib/common/plugin/ContactAddress.js
-define("cordova/plugin/ContactAddress", function(require, exports, module) {
-
-/**
-* Contact address.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code
-* @param formatted // NOTE: not a W3C standard
-* @param streetAddress
-* @param locality
-* @param region
-* @param postalCode
-* @param country
-*/
-
-var ContactAddress = function(pref, type, formatted, streetAddress, locality, region, postalCode, country) {
-    this.id = null;
-    this.pref = (typeof pref != 'undefined' ? pref : false);
-    this.type = type || null;
-    this.formatted = formatted || null;
-    this.streetAddress = streetAddress || null;
-    this.locality = locality || null;
-    this.region = region || null;
-    this.postalCode = postalCode || null;
-    this.country = country || null;
-};
-
-module.exports = ContactAddress;
-
-});
-
-// file: lib/common/plugin/ContactError.js
-define("cordova/plugin/ContactError", function(require, exports, module) {
-
-/**
- *  ContactError.
- *  An error code assigned by an implementation when an error has occurred
- * @constructor
- */
-var ContactError = function(err) {
-    this.code = (typeof err != 'undefined' ? err : null);
-};
-
-/**
- * Error codes
- */
-ContactError.UNKNOWN_ERROR = 0;
-ContactError.INVALID_ARGUMENT_ERROR = 1;
-ContactError.TIMEOUT_ERROR = 2;
-ContactError.PENDING_OPERATION_ERROR = 3;
-ContactError.IO_ERROR = 4;
-ContactError.NOT_SUPPORTED_ERROR = 5;
-ContactError.PERMISSION_DENIED_ERROR = 20;
-
-module.exports = ContactError;
-
-});
-
-// file: lib/common/plugin/ContactField.js
-define("cordova/plugin/ContactField", function(require, exports, module) {
-
-/**
-* Generic contact field.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
-* @param type
-* @param value
-* @param pref
-*/
-var ContactField = function(type, value, pref) {
-    this.id = null;
-    this.type = (type && type.toString()) || null;
-    this.value = (value && value.toString()) || null;
-    this.pref = (typeof pref != 'undefined' ? pref : false);
-};
-
-module.exports = ContactField;
-
-});
-
-// file: lib/common/plugin/ContactFindOptions.js
-define("cordova/plugin/ContactFindOptions", function(require, exports, module) {
-
-/**
- * ContactFindOptions.
- * @constructor
- * @param filter used to match contacts against
- * @param multiple boolean used to determine if more than one contact should be returned
- */
-
-var ContactFindOptions = function(filter, multiple) {
-    this.filter = filter || '';
-    this.multiple = (typeof multiple != 'undefined' ? multiple : false);
-};
-
-module.exports = ContactFindOptions;
-
-});
-
-// file: lib/common/plugin/ContactName.js
-define("cordova/plugin/ContactName", function(require, exports, module) {
-
-/**
-* Contact name.
-* @constructor
-* @param formatted // NOTE: not part of W3C standard
-* @param familyName
-* @param givenName
-* @param middle
-* @param prefix
-* @param suffix
-*/
-var ContactName = function(formatted, familyName, givenName, middle, prefix, suffix) {
-    this.formatted = formatted || null;
-    this.familyName = familyName || null;
-    this.givenName = givenName || null;
-    this.middleName = middle || null;
-    this.honorificPrefix = prefix || null;
-    this.honorificSuffix = suffix || null;
-};
-
-module.exports = ContactName;
-
-});
-
-// file: lib/common/plugin/ContactOrganization.js
-define("cordova/plugin/ContactOrganization", function(require, exports, module) {
-
-/**
-* Contact organization.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
-* @param name
-* @param dept
-* @param title
-* @param startDate
-* @param endDate
-* @param location
-* @param desc
-*/
-
-var ContactOrganization = function(pref, type, name, dept, title) {
-    this.id = null;
-    this.pref = (typeof pref != 'undefined' ? pref : false);
-    this.type = type || null;
-    this.name = name || null;
-    this.department = dept || null;
-    this.title = title || null;
-};
-
-module.exports = ContactOrganization;
-
-});
-
-// file: lib/common/plugin/Coordinates.js
-define("cordova/plugin/Coordinates", function(require, exports, module) {
-
-/**
- * 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;
-
-});
-
-// file: lib/common/plugin/DirectoryEntry.js
-define("cordova/plugin/DirectoryEntry", function(require, exports, module) {
-
-var argscheck = require('cordova/argscheck'),
-    utils = require('cordova/utils'),
-    exec = require('cordova/exec'),
-    Entry = require('cordova/plugin/Entry'),
-    FileError = require('cordova/plugin/FileError'),
-    DirectoryReader = require('cordova/plugin/DirectoryReader');
-
-/**
- * An interface representing a directory on the file system.
- *
- * {boolean} isFile always false (readonly)
- * {boolean} isDirectory always true (readonly)
- * {DOMString} name of the directory, excluding the path leading to it (readonly)
- * {DOMString} fullPath the absolute full path to the directory (readonly)
- * TODO: implement this!!! {FileSystem} filesystem on which the directory resides (readonly)
- */
-var DirectoryEntry = function(name, fullPath) {
-     DirectoryEntry.__super__.constructor.call(this, false, true, name, fullPath);
-};
-
-utils.extend(DirectoryEntry, Entry);
-
-/**
- * Creates a new DirectoryReader to read entries from this directory
- */
-DirectoryEntry.prototype.createReader = function() {
-    return new DirectoryReader(this.fullPath);
-};
-
-/**
- * Creates or looks up a directory
- *
- * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a directory
- * @param {Flags} options to create or exclusively create the directory
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.getDirectory = function(path, options, successCallback, errorCallback) {
-    argscheck.checkArgs('sOFF', 'DirectoryEntry.getDirectory', arguments);
-    var win = successCallback && function(result) {
-        var entry = new DirectoryEntry(result.name, result.fullPath);
-        successCallback(entry);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "getDirectory", [this.fullPath, path, options]);
-};
-
-/**
- * Deletes a directory and all of it's contents
- *
- * @param {Function} successCallback is called with no parameters
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.removeRecursively = function(successCallback, errorCallback) {
-    argscheck.checkArgs('FF', 'DirectoryEntry.removeRecursively', arguments);
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(successCallback, fail, "File", "removeRecursively", [this.fullPath]);
-};
-
-/**
- * Creates or looks up a file
- *
- * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a file
- * @param {Flags} options to create or exclusively create the file
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.getFile = function(path, options, successCallback, errorCallback) {
-    argscheck.checkArgs('sOFF', 'DirectoryEntry.getFile', arguments);
-    var win = successCallback && function(result) {
-        var FileEntry = require('cordova/plugin/FileEntry');
-        var entry = new FileEntry(result.name, result.fullPath);
-        successCallback(entry);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "getFile", [this.fullPath, path, options]);
-};
-
-module.exports = DirectoryEntry;
-
-});
-
-// file: lib/common/plugin/DirectoryReader.js
-define("cordova/plugin/DirectoryReader", function(require, exports, module) {
-
-var exec = require('cordova/exec'),
-    FileError = require('cordova/plugin/FileError') ;
-
-/**
- * An interface that lists the files and directories in a directory.
- */
-function DirectoryReader(path) {
-    this.path = path || null;
-}
-
-/**
- * Returns a list of entries from a directory.
- *
- * @param {Function} successCallback is called with a list of entries
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryReader.prototype.readEntries = function(successCallback, errorCallback) {
-    var win = typeof successCallback !== 'function' ? null : function(result) {
-        var retVal = [];
-        for (var i=0; i<result.length; i++) {
-            var entry = null;
-            if (result[i].isDirectory) {
-                entry = new (require('cordova/plugin/DirectoryEntry'))();
-            }
-            else if (result[i].isFile) {
-                entry = new (require('cordova/plugin/FileEntry'))();
-            }
-            entry.isDirectory = result[i].isDirectory;
-            entry.isFile = result[i].isFile;
-            entry.name = result[i].name;
-            entry.fullPath = result[i].fullPath;
-            retVal.push(entry);
-        }
-        successCallback(retVal);
-    };
-    var fail = typeof errorCallback !== 'function' ? null : function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "readEntries", [this.path]);
-};
-
-module.exports = DirectoryReader;
-
-});
-
-// file: lib/common/plugin/Entry.js
-define("cordova/plugin/Entry", function(require, exports, module) {
-
-var argscheck = require('cordova/argscheck'),
-    exec = require('cordova/exec'),
-    FileError = require('cordova/plugin/FileError'),
-    Metadata = require('cordova/plugin/Metadata');
-
-/**
- * Represents a file or directory on the local file system.
- *
- * @param isFile
- *            {boolean} true if Entry is a file (readonly)
- * @param isDirectory
- *            {boolean} true if Entry is a directory (readonly)
- * @param name
- *            {DOMString} name of the file or directory, excluding the path
- *            leading to it (readonly)
- * @param fullPath
- *            {DOMString} the absolute full path to the file or directory
- *            (readonly)
- */
-function Entry(isFile, isDirectory, name, fullPath, fileSystem) {
-    this.isFile = !!isFile;
-    this.isDirectory = !!isDirectory;
-    this.name = name || '';
-    this.fullPath = fullPath || '';
-    this.filesystem = fileSystem || null;
-}
-
-/**
- * Look up the metadata of the entry.
- *
- * @param successCallback
- *            {Function} is called with a Metadata object
- * @param errorCallback
- *            {Function} is called with a FileError
- */
-Entry.prototype.getMetadata = function(successCallback, errorCallback) {
-    argscheck.checkArgs('FF', 'Entry.getMetadata', arguments);
-    var success = successCallback && function(lastModified) {
-        var metadata = new Metadata(lastModified);
-        successCallback(metadata);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-
-    exec(success, fail, "File", "getMetadata", [this.fullPath]);
-};
-
-/**
- * Set the metadata of the entry.
- *
- * @param successCallback
- *            {Function} is called with a Metadata object
- * @param errorCallback
- *            {Function} is called with a FileError
- * @param metadataObject
- *            {Object} keys and values to set
- */
-Entry.prototype.setMetadata = function(successCallback, errorCallback, metadataObject) {
-    argscheck.checkArgs('FFO', 'Entry.setMetadata', arguments);
-    exec(successCallback, errorCallback, "File", "setMetadata", [this.fullPath, metadataObject]);
-};
-
-/**
- * Move a file or directory to a new location.
- *
- * @param parent
- *            {DirectoryEntry} the directory to which to move this entry
- * @param newName
- *            {DOMString} new name of the entry, defaults to the current name
- * @param successCallback
- *            {Function} called with the new DirectoryEntry object
- * @param errorCallback
- *            {Function} called with a FileError
- */
-Entry.prototype.moveTo = function(parent, newName, successCallback, errorCallback) {
-    argscheck.checkArgs('oSFF', 'Entry.moveTo', arguments);
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    // source path
-    var srcPath = this.fullPath,
-        // entry name
-        name = newName || this.name,
-        success = function(entry) {
-            if (entry) {
-                if (successCallback) {
-                    // create appropriate Entry object
-                    var result = (entry.isDirectory) ? new (require('cordova/plugin/DirectoryEntry'))(entry.name, entry.fullPath) : new (require('cordova/plugin/FileEntry'))(entry.name, entry.fullPath);
-                    successCallback(result);
-                }
-            }
-            else {
-                // no Entry object returned
-                fail && fail(FileError.NOT_FOUND_ERR);
-            }
-        };
-
-    // copy
-    exec(success, fail, "File", "moveTo", [srcPath, parent.fullPath, name]);
-};
-
-/**
- * Copy a directory to a different location.
- *
- * @param parent
- *            {DirectoryEntry} the directory to which to copy the entry
- * @param newName
- *            {DOMString} new name of the entry, defaults to the current name
- * @param successCallback
- *            {Function} called with the new Entry object
- * @param errorCallback
- *            {Function} called with a FileError
- */
-Entry.prototype.copyTo = function(parent, newName, successCallback, errorCallback) {
-    argscheck.checkArgs('oSFF', 'Entry.copyTo', arguments);
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-
-        // source path
-    var srcPath = this.fullPath,
-        // entry name
-        name = newName || this.name,
-        // success callback
-        success = function(entry) {
-            if (entry) {
-                if (successCallback) {
-                    // create appropriate Entry object
-                    var result = (entry.isDirectory) ? new (require('cordova/plugin/DirectoryEntry'))(entry.name, entry.fullPath) : new (require('cordova/plugin/FileEntry'))(entry.name, entry.fullPath);
-                    successCallback(result);
-                }
-            }
-            else {
-                // no Entry object returned
-                fail && fail(FileError.NOT_FOUND_ERR);
-            }
-        };
-
-    // copy
-    exec(success, fail, "File", "copyTo", [srcPath, parent.fullPath, name]);
-};
-
-/**
- * Return a URL that can be used to identify this entry.
- */
-Entry.prototype.toURL = function() {
-    // fullPath attribute contains the full URL
-    return this.fullPath;
-};
-
-/**
- * Returns a URI that can be used to identify this entry.
- *
- * @param {DOMString} mimeType for a FileEntry, the mime type to be used to interpret the file, when loaded through this URI.
- * @return uri
- */
-Entry.prototype.toURI = function(mimeType) {
-    console.log("DEPRECATED: Update your code to use 'toURL'");
-    // fullPath attribute contains the full URI
-    return this.toURL();
-};
-
-/**
- * Remove a file or directory. It is an error to attempt to delete a
- * directory that is not empty. It is an error to attempt to delete a
- * root directory of a file system.
- *
- * @param successCallback {Function} called with no parameters
- * @param errorCallback {Function} called with a FileError
- */
-Entry.prototype.remove = function(successCallback, errorCallback) {
-    argscheck.checkArgs('FF', 'Entry.remove', arguments);
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(successCallback, fail, "File", "remove", [this.fullPath]);
-};
-
-/**
- * Look up the parent DirectoryEntry of this entry.
- *
- * @param successCallback {Function} called with the parent DirectoryEntry object
- * @param errorCallback {Function} called with a FileError
- */
-Entry.prototype.getParent = function(successCallback, errorCallback) {
-    argscheck.checkArgs('FF', 'Entry.getParent', arguments);
-    var win = successCallback && function(result) {
-        var DirectoryEntry = require('cordova/plugin/DirectoryEntry');
-        var entry = new DirectoryEntry(result.name, result.fullPath);
-        successCallback(entry);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "getParent", [this.fullPath]);
-};
-
-module.exports = Entry;
-
-});
-
-// file: lib/common/plugin/File.js
-define("cordova/plugin/File", function(require, exports, module) {
-
-/**
- * Constructor.
- * name {DOMString} name of the file, without path information
- * fullPath {DOMString} the full path of the file, including the name
- * type {DOMString} mime type
- * lastModifiedDate {Date} last modified date
- * size {Number} size of the file in bytes
- */
-
-var File = function(name, fullPath, type, lastModifiedDate, size){
-    this.name = name || '';
-    this.fullPath = fullPath || null;
-    this.type = type || null;
-    this.lastModifiedDate = lastModifiedDate || null;
-    this.size = size || 0;
-
-    // These store the absolute start and end for slicing the file.
-    this.start = 0;
-    this.end = this.size;
-};
-
-/**
- * Returns a "slice" of the file. Since Cordova Files don't contain the actual
- * content, this really returns a File with adjusted start and end.
- * Slices of slices are supported.
- * start {Number} The index at which to start the slice (inclusive).
- * end {Number} The index at which to end the slice (exclusive).
- */
-File.prototype.slice = function(start, end) {
-    var size = this.end - this.start;
-    var newStart = 0;
-    var newEnd = size;
-    if (arguments.length) {
-        if (start < 0) {
-            newStart = Math.max(size + start, 0);
-        } else {
-            newStart = Math.min(size, start);
-        }
-    }
-
-    if (arguments.length >= 2) {
-        if (end < 0) {
-            newEnd = Math.max(size + end, 0);
-        } else {
-            newEnd = Math.min(end, size);
-        }
-    }
-
-    var newFile = new File(this.name, this.fullPath, this.type, this.lastModifiedData, this.size);
-    newFile.start = this.start + newStart;
-    newFile.end = this.start + newEnd;
-    return newFile;
-};
-
-
-module.exports = File;
-
-});
-
-// file: lib/common/plugin/FileEntry.js
-define("cordova/plugin/FileEntry", function(require, exports, module) {
-
-var utils = require('cordova/utils'),
-    exec = require('cordova/exec'),
-    Entry = require('cordova/plugin/Entry'),
-    FileWriter = require('cordova/plugin/FileWriter'),
-    File = require('cordova/plugin/File'),
-    FileError = require('cordova/plugin/FileError');
-
-/**
- * An interface representing a file on the file system.
- *
- * {boolean} isFile always true (readonly)
- * {boolean} isDirectory always false (readonly)
- * {DOMString} name of the file, excluding the path leading to it (readonly)
- * {DOMString} fullPath the absolute full path to the file (readonly)
- * {FileSystem} filesystem on which the file resides (readonly)
- */
-var FileEntry = function(name, fullPath) {
-     FileEntry.__super__.constructor.apply(this, [true, false, name, fullPath]);
-};
-
-utils.extend(FileEntry, Entry);
-
-/**
- * Creates a new FileWriter associated with the file that this FileEntry represents.
- *
- * @param {Function} successCallback is called with the new FileWriter
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.createWriter = function(successCallback, errorCallback) {
-    this.file(function(filePointer) {
-        var writer = new FileWriter(filePointer);
-
-        if (writer.fileName === null || writer.fileName === "") {
-            errorCallback && errorCallback(new FileError(FileError.INVALID_STATE_ERR));
-        } else {
-            successCallback && successCallback(writer);
-        }
-    }, errorCallback);
-};
-
-/**
- * Returns a File that represents the current state of the file that this FileEntry represents.
- *
- * @param {Function} successCallback is called with the new File object
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.file = function(successCallback, errorCallback) {
-    var win = successCallback && function(f) {
-        var file = new File(f.name, f.fullPath, f.type, f.lastModifiedDate, f.size);
-        successCallback(file);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "getFileMetadata", [this.fullPath]);
-};
-
-
-module.exports = FileEntry;
-
-});
-
-// file: lib/common/plugin/FileError.js
-define("cordova/plugin/FileError", function(require, exports, module) {
-
-/**
- * FileError
- */
-function FileError(error) {
-  this.code = error || null;
-}
-
-// File error codes
-// Found in DOMException
-FileError.NOT_FOUND_ERR = 1;
-FileError.SECURITY_ERR = 2;
-FileError.ABORT_ERR = 3;
-
-// Added by File API specification
-FileError.NOT_READABLE_ERR = 4;
-FileError.ENCODING_ERR = 5;
-FileError.NO_MODIFICATION_ALLOWED_ERR = 6;
-FileError.INVALID_STATE_ERR = 7;
-FileError.SYNTAX_ERR = 8;
-FileError.INVALID_MODIFICATION_ERR = 9;
-FileError.QUOTA_EXCEEDED_ERR = 10;
-FileError.TYPE_MISMATCH_ERR = 11;
-FileError.PATH_EXISTS_ERR = 12;
-
-module.exports = FileError;
-
-});
-
-// file: lib/common/plugin/FileReader.js
-define("cordova/plugin/FileReader", function(require, exports, module) {
-
-var exec = require('cordova/exec'),
-    modulemapper = require('cordova/modulemapper'),
-    utils = require('cordova/utils'),
-    File = require('cordova/plugin/File'),
-    FileError = require('cordova/plugin/FileError'),
-    ProgressEvent = require('cordova/plugin/ProgressEvent'),
-    origFileReader = modulemapper.getOriginalSymbol(this, 'FileReader');
-
-/**
- * This class reads the mobile device file system.
- *
- * For Android:
- *      The root directory is the root of the file system.
- *      To read from the SD card, the file name is "sdcard/my_file.txt"
- * @constructor
- */
-var FileReader = function() {
-    this._readyState = 0;
-    this._error = null;
-    this._result = null;
-    this._fileName = '';
-    this._realReader = origFileReader ? new origFileReader() : {};
-};
-
-// States
-FileReader.EMPTY = 0;
-FileReader.LOADING = 1;
-FileReader.DONE = 2;
-
-utils.defineGetter(FileReader.prototype, 'readyState', function() {
-    return this._fileName ? this._readyState : this._realReader.readyState;
-});
-
-utils.defineGetter(FileReader.prototype, 'error', function() {
-    return this._fileName ? this._error: this._realReader.error;
-});
-
-utils.defineGetter(FileReader.prototype, 'result', function() {
-    return this._fileName ? this._result: this._realReader.result;
-});
-
-function defineEvent(eventName) {
-    utils.defineGetterSetter(FileReader.prototype, eventName, function() {
-        return this._realReader[eventName] || null;
-    }, function(value) {
-        this._realReader[eventName] = value;
-    });
-}
-defineEvent('onloadstart');    // When the read starts.
-defineEvent('onprogress');     // While reading (and decoding) file or fileBlob data, and reporting partial file data (progress.loaded/progress.total)
-defineEvent('onload');         // When the read has successfully completed.
-defineEvent('onerror');        // When the read has failed (see errors).
-defineEvent('onloadend');      // When the request has completed (either in success or failure).
-defineEvent('onabort');        // When the read has been aborted. For instance, by invoking the abort() method.
-
-function initRead(reader, file) {
-    // Already loading something
-    if (reader.readyState == FileReader.LOADING) {
-      throw new FileError(FileError.INVALID_STATE_ERR);
-    }
-
-    reader._result = null;
-    reader._error = null;
-    reader._readyState = FileReader.LOADING;
-
-    if (typeof file == 'string') {
-        // Deprecated in Cordova 2.4.
-        console.warn('Using a string argument with FileReader.readAs functions is deprecated.');
-        reader._fileName = file;
-    } else if (typeof file.fullPath == 'string') {
-        reader._fileName = file.fullPath;
-    } else {
-        reader._fileName = '';
-        return true;
-    }
-
-    reader.onloadstart && reader.onloadstart(new ProgressEvent("loadstart", {target:reader}));
-}
-
-/**
- * Abort reading file.
- */
-FileReader.prototype.abort = function() {
-    if (origFileReader && !this._fileName) {
-        return this._realReader.abort();
-    }
-    this._result = null;
-
-    if (this._readyState == FileReader.DONE || this._readyState == FileReader.EMPTY) {
-      return;
-    }
-
-    this._readyState = FileReader.DONE;
-
-    // If abort callback
-    if (typeof this.onabort === 'function') {
-        this.onabort(new ProgressEvent('abort', {target:this}));
-    }
-    // If load end callback
-    if (typeof this.onloadend === 'function') {
-        this.onloadend(new ProgressEvent('loadend', {target:this}));
-    }
-};
-
-/**
- * Read text file.
- *
- * @param file          {File} File object containing file properties
- * @param encoding      [Optional] (see http://www.iana.org/assignments/character-sets)
- */
-FileReader.prototype.readAsText = function(file, encoding) {
-    if (initRead(this, file)) {
-        return this._realReader.readAsText(file, encoding);
-    }
-
-    // Default encoding is UTF-8
-    var enc = encoding ? encoding : "UTF-8";
-    var me = this;
-    var execArgs = [this._fileName, enc, file.start, file.end];
-
-    // Read file
-    exec(
-        // Success callback
-        function(r) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // Save result
-            me._result = r;
-
-            // If onload callback
-            if (typeof me.onload === "function") {
-                me.onload(new ProgressEvent("load", {target:me}));
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        },
-        // Error callback
-        function(e) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            // null result
-            me._result = null;
-
-            // Save error
-            me._error = new FileError(e);
-
-            // If onerror callback
-            if (typeof me.onerror === "function") {
-                me.onerror(new ProgressEvent("error", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        }, "File", "readAsText", execArgs);
-};
-
-
-/**
- * Read file and return data as a base64 encoded data url.
- * A data url is of the form:
- *      data:[<mediatype>][;base64],<data>
- *
- * @param file          {File} File object containing file properties
- */
-FileReader.prototype.readAsDataURL = function(file) {
-    if (initRead(this, file)) {
-        return this._realReader.readAsDataURL(file);
-    }
-
-    var me = this;
-    var execArgs = [this._fileName, file.start, file.end];
-
-    // Read file
-    exec(
-        // Success callback
-        function(r) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            // Save result
-            me._result = r;
-
-            // If onload callback
-            if (typeof me.onload === "function") {
-                me.onload(new ProgressEvent("load", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        },
-        // Error callback
-        function(e) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            me._result = null;
-
-            // Save error
-            me._error = new FileError(e);
-
-            // If onerror callback
-            if (typeof me.onerror === "function") {
-                me.onerror(new ProgressEvent("error", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        }, "File", "readAsDataURL", execArgs);
-};
-
-/**
- * Read file and return data as a binary data.
- *
- * @param file          {File} File object containing file properties
- */
-FileReader.prototype.readAsBinaryString = function(file) {
-    if (initRead(this, file)) {
-        return this._realReader.readAsBinaryString(file);
-    }
-
-    var me = this;
-    var execArgs = [this._fileName, file.start, file.end];
-
-    // Read file
-    exec(
-        // Success callback
-        function(r) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            me._result = r;
-
-            // If onload callback
-            if (typeof me.onload === "function") {
-                me.onload(new ProgressEvent("load", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        },
-        // Error callback
-        function(e) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            me._result = null;
-
-            // Save error
-            me._error = new FileError(e);
-
-            // If onerror callback
-            if (typeof me.onerror === "function") {
-                me.onerror(new ProgressEvent("error", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        }, "File", "readAsBinaryString", execArgs);
-};
-
-/**
- * Read file and return data as a binary data.
- *
- * @param file          {File} File object containing file properties
- */
-FileReader.prototype.readAsArrayBuffer = function(file) {
-    if (initRead(this, file)) {
-        return this._realReader.readAsArrayBuffer(file);
-    }
-
-    var me = this;
-    var execArgs = [this._fileName, file.start, file.end];
-
-    // Read file
-    exec(
-        // Success callback
-        function(r) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            me._result = r;
-
-            // If onload callback
-            if (typeof me.onload === "function") {
-                me.onload(new ProgressEvent("load", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        },
-        // Error callback
-        function(e) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;

<TRUNCATED>

[33/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_one/assets/www/cordova.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/assets/www/cordova.js b/cordova-lib/spec-plugman/projects/android_one/assets/www/cordova.js
new file mode 100644
index 0000000..000791b
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_one/assets/www/cordova.js
@@ -0,0 +1,6848 @@
+// Platform: android
+// 2.7.0rc1-12-ga86559a
+/*
+ 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.
+*/
+;(function() {
+var CORDOVA_JS_BUILD_LABEL = '2.7.0rc1-12-ga86559a';
+// file: lib/scripts/require.js
+
+var require,
+    define;
+
+(function () {
+    var modules = {};
+    // Stack of moduleIds currently being built.
+    var requireStack = [];
+    // Map of module ID -> index into requireStack of modules currently being built.
+    var inProgressModules = {};
+
+    function build(module) {
+        var factory = module.factory;
+        module.exports = {};
+        delete module.factory;
+        factory(require, module.exports, module);
+        return module.exports;
+    }
+
+    require = function (id) {
+        if (!modules[id]) {
+            throw "module " + id + " not found";
+        } else if (id in inProgressModules) {
+            var cycle = requireStack.slice(inProgressModules[id]).join('->') + '->' + id;
+            throw "Cycle in require graph: " + cycle;
+        }
+        if (modules[id].factory) {
+            try {
+                inProgressModules[id] = requireStack.length;
+                requireStack.push(id);
+                return build(modules[id]);
+            } finally {
+                delete inProgressModules[id];
+                requireStack.pop();
+            }
+        }
+        return modules[id].exports;
+    };
+
+    define = function (id, factory) {
+        if (modules[id]) {
+            throw "module " + id + " already defined";
+        }
+
+        modules[id] = {
+            id: id,
+            factory: factory
+        };
+    };
+
+    define.remove = function (id) {
+        delete modules[id];
+    };
+
+    define.moduleMap = modules;
+})();
+
+//Export for use in node
+if (typeof module === "object" && typeof require === "function") {
+    module.exports.require = require;
+    module.exports.define = define;
+}
+
+// file: lib/cordova.js
+define("cordova", function(require, exports, module) {
+
+
+var channel = require('cordova/channel');
+
+/**
+ * Listen for DOMContentLoaded and notify our channel subscribers.
+ */
+document.addEventListener('DOMContentLoaded', function() {
+    channel.onDOMContentLoaded.fire();
+}, false);
+if (document.readyState == 'complete' || document.readyState == 'interactive') {
+    channel.onDOMContentLoaded.fire();
+}
+
+/**
+ * Intercept calls to addEventListener + removeEventListener and handle deviceready,
+ * resume, and pause events.
+ */
+var m_document_addEventListener = document.addEventListener;
+var m_document_removeEventListener = document.removeEventListener;
+var m_window_addEventListener = window.addEventListener;
+var m_window_removeEventListener = window.removeEventListener;
+
+/**
+ * Houses custom event handlers to intercept on document + window event listeners.
+ */
+var documentEventHandlers = {},
+    windowEventHandlers = {};
+
+document.addEventListener = function(evt, handler, capture) {
+    var e = evt.toLowerCase();
+    if (typeof documentEventHandlers[e] != 'undefined') {
+        documentEventHandlers[e].subscribe(handler);
+    } else {
+        m_document_addEventListener.call(document, evt, handler, capture);
+    }
+};
+
+window.addEventListener = function(evt, handler, capture) {
+    var e = evt.toLowerCase();
+    if (typeof windowEventHandlers[e] != 'undefined') {
+        windowEventHandlers[e].subscribe(handler);
+    } else {
+        m_window_addEventListener.call(window, evt, handler, capture);
+    }
+};
+
+document.removeEventListener = function(evt, handler, capture) {
+    var e = evt.toLowerCase();
+    // If unsubscribing from an event that is handled by a plugin
+    if (typeof documentEventHandlers[e] != "undefined") {
+        documentEventHandlers[e].unsubscribe(handler);
+    } else {
+        m_document_removeEventListener.call(document, evt, handler, capture);
+    }
+};
+
+window.removeEventListener = function(evt, handler, capture) {
+    var e = evt.toLowerCase();
+    // If unsubscribing from an event that is handled by a plugin
+    if (typeof windowEventHandlers[e] != "undefined") {
+        windowEventHandlers[e].unsubscribe(handler);
+    } else {
+        m_window_removeEventListener.call(window, evt, handler, capture);
+    }
+};
+
+function createEvent(type, data) {
+    var event = document.createEvent('Events');
+    event.initEvent(type, false, false);
+    if (data) {
+        for (var i in data) {
+            if (data.hasOwnProperty(i)) {
+                event[i] = data[i];
+            }
+        }
+    }
+    return event;
+}
+
+if(typeof window.console === "undefined") {
+    window.console = {
+        log:function(){}
+    };
+}
+
+var cordova = {
+    define:define,
+    require:require,
+    /**
+     * Methods to add/remove your own addEventListener hijacking on document + window.
+     */
+    addWindowEventHandler:function(event) {
+        return (windowEventHandlers[event] = channel.create(event));
+    },
+    addStickyDocumentEventHandler:function(event) {
+        return (documentEventHandlers[event] = channel.createSticky(event));
+    },
+    addDocumentEventHandler:function(event) {
+        return (documentEventHandlers[event] = channel.create(event));
+    },
+    removeWindowEventHandler:function(event) {
+        delete windowEventHandlers[event];
+    },
+    removeDocumentEventHandler:function(event) {
+        delete documentEventHandlers[event];
+    },
+    /**
+     * Retrieve original event handlers that were replaced by Cordova
+     *
+     * @return object
+     */
+    getOriginalHandlers: function() {
+        return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener},
+        'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}};
+    },
+    /**
+     * Method to fire event from native code
+     * bNoDetach is required for events which cause an exception which needs to be caught in native code
+     */
+    fireDocumentEvent: function(type, data, bNoDetach) {
+        var evt = createEvent(type, data);
+        if (typeof documentEventHandlers[type] != 'undefined') {
+            if( bNoDetach ) {
+              documentEventHandlers[type].fire(evt);
+            }
+            else {
+              setTimeout(function() {
+                  // Fire deviceready on listeners that were registered before cordova.js was loaded.
+                  if (type == 'deviceready') {
+                      document.dispatchEvent(evt);
+                  }
+                  documentEventHandlers[type].fire(evt);
+              }, 0);
+            }
+        } else {
+            document.dispatchEvent(evt);
+        }
+    },
+    fireWindowEvent: function(type, data) {
+        var evt = createEvent(type,data);
+        if (typeof windowEventHandlers[type] != 'undefined') {
+            setTimeout(function() {
+                windowEventHandlers[type].fire(evt);
+            }, 0);
+        } else {
+            window.dispatchEvent(evt);
+        }
+    },
+
+    /**
+     * Plugin callback mechanism.
+     */
+    // Randomize the starting callbackId to avoid collisions after refreshing or navigating.
+    // This way, it's very unlikely that any new callback would get the same callbackId as an old callback.
+    callbackId: Math.floor(Math.random() * 2000000000),
+    callbacks:  {},
+    callbackStatus: {
+        NO_RESULT: 0,
+        OK: 1,
+        CLASS_NOT_FOUND_EXCEPTION: 2,
+        ILLEGAL_ACCESS_EXCEPTION: 3,
+        INSTANTIATION_EXCEPTION: 4,
+        MALFORMED_URL_EXCEPTION: 5,
+        IO_EXCEPTION: 6,
+        INVALID_ACTION: 7,
+        JSON_EXCEPTION: 8,
+        ERROR: 9
+    },
+
+    /**
+     * Called by native code when returning successful result from an action.
+     */
+    callbackSuccess: function(callbackId, args) {
+        try {
+            cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback);
+        } catch (e) {
+            console.log("Error in error callback: " + callbackId + " = "+e);
+        }
+    },
+
+    /**
+     * Called by native code when returning error result from an action.
+     */
+    callbackError: function(callbackId, args) {
+        // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative.
+        // Derive success from status.
+        try {
+            cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback);
+        } catch (e) {
+            console.log("Error in error callback: " + callbackId + " = "+e);
+        }
+    },
+
+    /**
+     * Called by native code when returning the result from an action.
+     */
+    callbackFromNative: function(callbackId, success, status, args, keepCallback) {
+        var callback = cordova.callbacks[callbackId];
+        if (callback) {
+            if (success && status == cordova.callbackStatus.OK) {
+                callback.success && callback.success.apply(null, args);
+            } else if (!success) {
+                callback.fail && callback.fail.apply(null, args);
+            }
+
+            // Clear callback if not expecting any more results
+            if (!keepCallback) {
+                delete cordova.callbacks[callbackId];
+            }
+        }
+    },
+    addConstructor: function(func) {
+        channel.onCordovaReady.subscribe(function() {
+            try {
+                func();
+            } catch(e) {
+                console.log("Failed to run constructor: " + e);
+            }
+        });
+    }
+};
+
+// Register pause, resume and deviceready channels as events on document.
+channel.onPause = cordova.addDocumentEventHandler('pause');
+channel.onResume = cordova.addDocumentEventHandler('resume');
+channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');
+
+module.exports = cordova;
+
+});
+
+// file: lib/common/argscheck.js
+define("cordova/argscheck", function(require, exports, module) {
+
+var exec = require('cordova/exec');
+var utils = require('cordova/utils');
+
+var moduleExports = module.exports;
+
+var typeMap = {
+    'A': 'Array',
+    'D': 'Date',
+    'N': 'Number',
+    'S': 'String',
+    'F': 'Function',
+    'O': 'Object'
+};
+
+function extractParamName(callee, argIndex) {
+  return (/.*?\((.*?)\)/).exec(callee)[1].split(', ')[argIndex];
+}
+
+function checkArgs(spec, functionName, args, opt_callee) {
+    if (!moduleExports.enableChecks) {
+        return;
+    }
+    var errMsg = null;
+    var typeName;
+    for (var i = 0; i < spec.length; ++i) {
+        var c = spec.charAt(i),
+            cUpper = c.toUpperCase(),
+            arg = args[i];
+        // Asterix means allow anything.
+        if (c == '*') {
+            continue;
+        }
+        typeName = utils.typeName(arg);
+        if ((arg === null || arg === undefined) && c == cUpper) {
+            continue;
+        }
+        if (typeName != typeMap[cUpper]) {
+            errMsg = 'Expected ' + typeMap[cUpper];
+            break;
+        }
+    }
+    if (errMsg) {
+        errMsg += ', but got ' + typeName + '.';
+        errMsg = 'Wrong type for parameter "' + extractParamName(opt_callee || args.callee, i) + '" of ' + functionName + ': ' + errMsg;
+        // Don't log when running jake test.
+        if (typeof jasmine == 'undefined') {
+            console.error(errMsg);
+        }
+        throw TypeError(errMsg);
+    }
+}
+
+function getValue(value, defaultValue) {
+    return value === undefined ? defaultValue : value;
+}
+
+moduleExports.checkArgs = checkArgs;
+moduleExports.getValue = getValue;
+moduleExports.enableChecks = true;
+
+
+});
+
+// file: lib/common/builder.js
+define("cordova/builder", function(require, exports, module) {
+
+var utils = require('cordova/utils');
+
+function each(objects, func, context) {
+    for (var prop in objects) {
+        if (objects.hasOwnProperty(prop)) {
+            func.apply(context, [objects[prop], prop]);
+        }
+    }
+}
+
+function clobber(obj, key, value) {
+    exports.replaceHookForTesting(obj, key);
+    obj[key] = value;
+    // Getters can only be overridden by getters.
+    if (obj[key] !== value) {
+        utils.defineGetter(obj, key, function() {
+            return value;
+        });
+    }
+}
+
+function assignOrWrapInDeprecateGetter(obj, key, value, message) {
+    if (message) {
+        utils.defineGetter(obj, key, function() {
+            console.log(message);
+            delete obj[key];
+            clobber(obj, key, value);
+            return value;
+        });
+    } else {
+        clobber(obj, key, value);
+    }
+}
+
+function include(parent, objects, clobber, merge) {
+    each(objects, function (obj, key) {
+        try {
+          var result = obj.path ? require(obj.path) : {};
+
+          if (clobber) {
+              // Clobber if it doesn't exist.
+              if (typeof parent[key] === 'undefined') {
+                  assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
+              } else if (typeof obj.path !== 'undefined') {
+                  // If merging, merge properties onto parent, otherwise, clobber.
+                  if (merge) {
+                      recursiveMerge(parent[key], result);
+                  } else {
+                      assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
+                  }
+              }
+              result = parent[key];
+          } else {
+            // Overwrite if not currently defined.
+            if (typeof parent[key] == 'undefined') {
+              assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
+            } else {
+              // Set result to what already exists, so we can build children into it if they exist.
+              result = parent[key];
+            }
+          }
+
+          if (obj.children) {
+            include(result, obj.children, clobber, merge);
+          }
+        } catch(e) {
+          utils.alert('Exception building cordova JS globals: ' + e + ' for key "' + key + '"');
+        }
+    });
+}
+
+/**
+ * Merge properties from one object onto another recursively.  Properties from
+ * the src object will overwrite existing target property.
+ *
+ * @param target Object to merge properties into.
+ * @param src Object to merge properties from.
+ */
+function recursiveMerge(target, src) {
+    for (var prop in src) {
+        if (src.hasOwnProperty(prop)) {
+            if (target.prototype && target.prototype.constructor === target) {
+                // If the target object is a constructor override off prototype.
+                clobber(target.prototype, prop, src[prop]);
+            } else {
+                if (typeof src[prop] === 'object' && typeof target[prop] === 'object') {
+                    recursiveMerge(target[prop], src[prop]);
+                } else {
+                    clobber(target, prop, src[prop]);
+                }
+            }
+        }
+    }
+}
+
+exports.buildIntoButDoNotClobber = function(objects, target) {
+    include(target, objects, false, false);
+};
+exports.buildIntoAndClobber = function(objects, target) {
+    include(target, objects, true, false);
+};
+exports.buildIntoAndMerge = function(objects, target) {
+    include(target, objects, true, true);
+};
+exports.recursiveMerge = recursiveMerge;
+exports.assignOrWrapInDeprecateGetter = assignOrWrapInDeprecateGetter;
+exports.replaceHookForTesting = function() {};
+
+});
+
+// file: lib/common/channel.js
+define("cordova/channel", function(require, exports, module) {
+
+var utils = require('cordova/utils'),
+    nextGuid = 1;
+
+/**
+ * Custom pub-sub "channel" that can have functions subscribed to it
+ * This object is used to define and control firing of events for
+ * cordova initialization, as well as for custom events thereafter.
+ *
+ * The order of events during page load and Cordova startup is as follows:
+ *
+ * onDOMContentLoaded*         Internal event that is received when the web page is loaded and parsed.
+ * onNativeReady*              Internal event that indicates the Cordova native side is ready.
+ * onCordovaReady*             Internal event fired when all Cordova JavaScript objects have been created.
+ * onCordovaInfoReady*         Internal event fired when device properties are available.
+ * onCordovaConnectionReady*   Internal event fired when the connection property has been set.
+ * onDeviceReady*              User event fired to indicate that Cordova is ready
+ * onResume                    User event fired to indicate a start/resume lifecycle event
+ * onPause                     User event fired to indicate a pause lifecycle event
+ * onDestroy*                  Internal event fired when app is being destroyed (User should use window.onunload event, not this one).
+ *
+ * The events marked with an * are sticky. Once they have fired, they will stay in the fired state.
+ * All listeners that subscribe after the event is fired will be executed right away.
+ *
+ * The only Cordova events that user code should register for are:
+ *      deviceready           Cordova native code is initialized and Cordova APIs can be called from JavaScript
+ *      pause                 App has moved to background
+ *      resume                App has returned to foreground
+ *
+ * Listeners can be registered as:
+ *      document.addEventListener("deviceready", myDeviceReadyListener, false);
+ *      document.addEventListener("resume", myResumeListener, false);
+ *      document.addEventListener("pause", myPauseListener, false);
+ *
+ * The DOM lifecycle events should be used for saving and restoring state
+ *      window.onload
+ *      window.onunload
+ *
+ */
+
+/**
+ * Channel
+ * @constructor
+ * @param type  String the channel name
+ */
+var Channel = function(type, sticky) {
+    this.type = type;
+    // Map of guid -> function.
+    this.handlers = {};
+    // 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired.
+    this.state = sticky ? 1 : 0;
+    // Used in sticky mode to remember args passed to fire().
+    this.fireArgs = null;
+    // Used by onHasSubscribersChange to know if there are any listeners.
+    this.numHandlers = 0;
+    // Function that is called when the first listener is subscribed, or when
+    // the last listener is unsubscribed.
+    this.onHasSubscribersChange = null;
+},
+    channel = {
+        /**
+         * Calls the provided function only after all of the channels specified
+         * have been fired. All channels must be sticky channels.
+         */
+        join: function(h, c) {
+            var len = c.length,
+                i = len,
+                f = function() {
+                    if (!(--i)) h();
+                };
+            for (var j=0; j<len; j++) {
+                if (c[j].state === 0) {
+                    throw Error('Can only use join with sticky channels.');
+                }
+                c[j].subscribe(f);
+            }
+            if (!len) h();
+        },
+        create: function(type) {
+            return channel[type] = new Channel(type, false);
+        },
+        createSticky: function(type) {
+            return channel[type] = new Channel(type, true);
+        },
+
+        /**
+         * cordova Channels that must fire before "deviceready" is fired.
+         */
+        deviceReadyChannelsArray: [],
+        deviceReadyChannelsMap: {},
+
+        /**
+         * Indicate that a feature needs to be initialized before it is ready to be used.
+         * This holds up Cordova's "deviceready" event until the feature has been initialized
+         * and Cordova.initComplete(feature) is called.
+         *
+         * @param feature {String}     The unique feature name
+         */
+        waitForInitialization: function(feature) {
+            if (feature) {
+                var c = channel[feature] || this.createSticky(feature);
+                this.deviceReadyChannelsMap[feature] = c;
+                this.deviceReadyChannelsArray.push(c);
+            }
+        },
+
+        /**
+         * Indicate that initialization code has completed and the feature is ready to be used.
+         *
+         * @param feature {String}     The unique feature name
+         */
+        initializationComplete: function(feature) {
+            var c = this.deviceReadyChannelsMap[feature];
+            if (c) {
+                c.fire();
+            }
+        }
+    };
+
+function forceFunction(f) {
+    if (typeof f != 'function') throw "Function required as first argument!";
+}
+
+/**
+ * Subscribes the given function to the channel. Any time that
+ * Channel.fire is called so too will the function.
+ * Optionally specify an execution context for the function
+ * and a guid that can be used to stop subscribing to the channel.
+ * Returns the guid.
+ */
+Channel.prototype.subscribe = function(f, c) {
+    // need a function to call
+    forceFunction(f);
+    if (this.state == 2) {
+        f.apply(c || this, this.fireArgs);
+        return;
+    }
+
+    var func = f,
+        guid = f.observer_guid;
+    if (typeof c == "object") { func = utils.close(c, f); }
+
+    if (!guid) {
+        // first time any channel has seen this subscriber
+        guid = '' + nextGuid++;
+    }
+    func.observer_guid = guid;
+    f.observer_guid = guid;
+
+    // Don't add the same handler more than once.
+    if (!this.handlers[guid]) {
+        this.handlers[guid] = func;
+        this.numHandlers++;
+        if (this.numHandlers == 1) {
+            this.onHasSubscribersChange && this.onHasSubscribersChange();
+        }
+    }
+};
+
+/**
+ * Unsubscribes the function with the given guid from the channel.
+ */
+Channel.prototype.unsubscribe = function(f) {
+    // need a function to unsubscribe
+    forceFunction(f);
+
+    var guid = f.observer_guid,
+        handler = this.handlers[guid];
+    if (handler) {
+        delete this.handlers[guid];
+        this.numHandlers--;
+        if (this.numHandlers === 0) {
+            this.onHasSubscribersChange && this.onHasSubscribersChange();
+        }
+    }
+};
+
+/**
+ * Calls all functions subscribed to this channel.
+ */
+Channel.prototype.fire = function(e) {
+    var fail = false,
+        fireArgs = Array.prototype.slice.call(arguments);
+    // Apply stickiness.
+    if (this.state == 1) {
+        this.state = 2;
+        this.fireArgs = fireArgs;
+    }
+    if (this.numHandlers) {
+        // Copy the values first so that it is safe to modify it from within
+        // callbacks.
+        var toCall = [];
+        for (var item in this.handlers) {
+            toCall.push(this.handlers[item]);
+        }
+        for (var i = 0; i < toCall.length; ++i) {
+            toCall[i].apply(this, fireArgs);
+        }
+        if (this.state == 2 && this.numHandlers) {
+            this.numHandlers = 0;
+            this.handlers = {};
+            this.onHasSubscribersChange && this.onHasSubscribersChange();
+        }
+    }
+};
+
+
+// defining them here so they are ready super fast!
+// DOM event that is received when the web page is loaded and parsed.
+channel.createSticky('onDOMContentLoaded');
+
+// Event to indicate the Cordova native side is ready.
+channel.createSticky('onNativeReady');
+
+// Event to indicate that all Cordova JavaScript objects have been created
+// and it's time to run plugin constructors.
+channel.createSticky('onCordovaReady');
+
+// Event to indicate that device properties are available
+channel.createSticky('onCordovaInfoReady');
+
+// Event to indicate that the connection property has been set.
+channel.createSticky('onCordovaConnectionReady');
+
+// Event to indicate that all automatically loaded JS plugins are loaded and ready.
+channel.createSticky('onPluginsReady');
+
+// Event to indicate that Cordova is ready
+channel.createSticky('onDeviceReady');
+
+// Event to indicate a resume lifecycle event
+channel.create('onResume');
+
+// Event to indicate a pause lifecycle event
+channel.create('onPause');
+
+// Event to indicate a destroy lifecycle event
+channel.createSticky('onDestroy');
+
+// Channels that must fire before "deviceready" is fired.
+channel.waitForInitialization('onCordovaReady');
+channel.waitForInitialization('onCordovaConnectionReady');
+channel.waitForInitialization('onDOMContentLoaded');
+
+module.exports = channel;
+
+});
+
+// file: lib/common/commandProxy.js
+define("cordova/commandProxy", function(require, exports, module) {
+
+
+// internal map of proxy function
+var CommandProxyMap = {};
+
+module.exports = {
+
+    // example: cordova.commandProxy.add("Accelerometer",{getCurrentAcceleration: function(successCallback, errorCallback, options) {...},...);
+    add:function(id,proxyObj) {
+        console.log("adding proxy for " + id);
+        CommandProxyMap[id] = proxyObj;
+        return proxyObj;
+    },
+
+    // cordova.commandProxy.remove("Accelerometer");
+    remove:function(id) {
+        var proxy = CommandProxyMap[id];
+        delete CommandProxyMap[id];
+        CommandProxyMap[id] = null;
+        return proxy;
+    },
+
+    get:function(service,action) {
+        return ( CommandProxyMap[service] ? CommandProxyMap[service][action] : null );
+    }
+};
+});
+
+// file: lib/android/exec.js
+define("cordova/exec", function(require, exports, module) {
+
+/**
+ * Execute a cordova command.  It is up to the native side whether this action
+ * is synchronous or asynchronous.  The native side can return:
+ *      Synchronous: PluginResult object as a JSON string
+ *      Asynchronous: Empty string ""
+ * If async, the native side will cordova.callbackSuccess or cordova.callbackError,
+ * depending upon the result of the action.
+ *
+ * @param {Function} success    The success callback
+ * @param {Function} fail       The fail callback
+ * @param {String} service      The name of the service to use
+ * @param {String} action       Action to be run in cordova
+ * @param {String[]} [args]     Zero or more arguments to pass to the method
+ */
+var cordova = require('cordova'),
+    nativeApiProvider = require('cordova/plugin/android/nativeapiprovider'),
+    utils = require('cordova/utils'),
+    jsToNativeModes = {
+        PROMPT: 0,
+        JS_OBJECT: 1,
+        // This mode is currently for benchmarking purposes only. It must be enabled
+        // on the native side through the ENABLE_LOCATION_CHANGE_EXEC_MODE
+        // constant within CordovaWebViewClient.java before it will work.
+        LOCATION_CHANGE: 2
+    },
+    nativeToJsModes = {
+        // Polls for messages using the JS->Native bridge.
+        POLLING: 0,
+        // For LOAD_URL to be viable, it would need to have a work-around for
+        // the bug where the soft-keyboard gets dismissed when a message is sent.
+        LOAD_URL: 1,
+        // For the ONLINE_EVENT to be viable, it would need to intercept all event
+        // listeners (both through addEventListener and window.ononline) as well
+        // as set the navigator property itself.
+        ONLINE_EVENT: 2,
+        // Uses reflection to access private APIs of the WebView that can send JS
+        // to be executed.
+        // Requires Android 3.2.4 or above.
+        PRIVATE_API: 3
+    },
+    jsToNativeBridgeMode,  // Set lazily.
+    nativeToJsBridgeMode = nativeToJsModes.ONLINE_EVENT,
+    pollEnabled = false,
+    messagesFromNative = [];
+
+function androidExec(success, fail, service, action, args) {
+    // Set default bridge modes if they have not already been set.
+    // By default, we use the failsafe, since addJavascriptInterface breaks too often
+    if (jsToNativeBridgeMode === undefined) {
+        androidExec.setJsToNativeBridgeMode(jsToNativeModes.JS_OBJECT);
+    }
+
+    // Process any ArrayBuffers in the args into a string.
+    for (var i = 0; i < args.length; i++) {
+        if (utils.typeName(args[i]) == 'ArrayBuffer') {
+            args[i] = window.btoa(String.fromCharCode.apply(null, new Uint8Array(args[i])));
+        }
+    }
+
+    var callbackId = service + cordova.callbackId++,
+        argsJson = JSON.stringify(args);
+
+    if (success || fail) {
+        cordova.callbacks[callbackId] = {success:success, fail:fail};
+    }
+
+    if (jsToNativeBridgeMode == jsToNativeModes.LOCATION_CHANGE) {
+        window.location = 'http://cdv_exec/' + service + '#' + action + '#' + callbackId + '#' + argsJson;
+    } else {
+        var messages = nativeApiProvider.get().exec(service, action, callbackId, argsJson);
+        // If argsJson was received by Java as null, try again with the PROMPT bridge mode.
+        // This happens in rare circumstances, such as when certain Unicode characters are passed over the bridge on a Galaxy S2.  See CB-2666.
+        if (jsToNativeBridgeMode == jsToNativeModes.JS_OBJECT && messages === "@Null arguments.") {
+            androidExec.setJsToNativeBridgeMode(jsToNativeModes.PROMPT);
+            androidExec(success, fail, service, action, args);
+            androidExec.setJsToNativeBridgeMode(jsToNativeModes.JS_OBJECT);
+            return;
+        } else {
+            androidExec.processMessages(messages);
+        }
+    }
+}
+
+function pollOnce() {
+    var msg = nativeApiProvider.get().retrieveJsMessages();
+    androidExec.processMessages(msg);
+}
+
+function pollingTimerFunc() {
+    if (pollEnabled) {
+        pollOnce();
+        setTimeout(pollingTimerFunc, 50);
+    }
+}
+
+function hookOnlineApis() {
+    function proxyEvent(e) {
+        cordova.fireWindowEvent(e.type);
+    }
+    // The network module takes care of firing online and offline events.
+    // It currently fires them only on document though, so we bridge them
+    // to window here (while first listening for exec()-related online/offline
+    // events).
+    window.addEventListener('online', pollOnce, false);
+    window.addEventListener('offline', pollOnce, false);
+    cordova.addWindowEventHandler('online');
+    cordova.addWindowEventHandler('offline');
+    document.addEventListener('online', proxyEvent, false);
+    document.addEventListener('offline', proxyEvent, false);
+}
+
+hookOnlineApis();
+
+androidExec.jsToNativeModes = jsToNativeModes;
+androidExec.nativeToJsModes = nativeToJsModes;
+
+androidExec.setJsToNativeBridgeMode = function(mode) {
+    if (mode == jsToNativeModes.JS_OBJECT && !window._cordovaNative) {
+        console.log('Falling back on PROMPT mode since _cordovaNative is missing. Expected for Android 3.2 and lower only.');
+        mode = jsToNativeModes.PROMPT;
+    }
+    nativeApiProvider.setPreferPrompt(mode == jsToNativeModes.PROMPT);
+    jsToNativeBridgeMode = mode;
+};
+
+androidExec.setNativeToJsBridgeMode = function(mode) {
+    if (mode == nativeToJsBridgeMode) {
+        return;
+    }
+    if (nativeToJsBridgeMode == nativeToJsModes.POLLING) {
+        pollEnabled = false;
+    }
+
+    nativeToJsBridgeMode = mode;
+    // Tell the native side to switch modes.
+    nativeApiProvider.get().setNativeToJsBridgeMode(mode);
+
+    if (mode == nativeToJsModes.POLLING) {
+        pollEnabled = true;
+        setTimeout(pollingTimerFunc, 1);
+    }
+};
+
+// Processes a single message, as encoded by NativeToJsMessageQueue.java.
+function processMessage(message) {
+    try {
+        var firstChar = message.charAt(0);
+        if (firstChar == 'J') {
+            eval(message.slice(1));
+        } else if (firstChar == 'S' || firstChar == 'F') {
+            var success = firstChar == 'S';
+            var keepCallback = message.charAt(1) == '1';
+            var spaceIdx = message.indexOf(' ', 2);
+            var status = +message.slice(2, spaceIdx);
+            var nextSpaceIdx = message.indexOf(' ', spaceIdx + 1);
+            var callbackId = message.slice(spaceIdx + 1, nextSpaceIdx);
+            var payloadKind = message.charAt(nextSpaceIdx + 1);
+            var payload;
+            if (payloadKind == 's') {
+                payload = message.slice(nextSpaceIdx + 2);
+            } else if (payloadKind == 't') {
+                payload = true;
+            } else if (payloadKind == 'f') {
+                payload = false;
+            } else if (payloadKind == 'N') {
+                payload = null;
+            } else if (payloadKind == 'n') {
+                payload = +message.slice(nextSpaceIdx + 2);
+            } else if (payloadKind == 'A') {
+                var data = message.slice(nextSpaceIdx + 2);
+                var bytes = window.atob(data);
+                var arraybuffer = new Uint8Array(bytes.length);
+                for (var i = 0; i < bytes.length; i++) {
+                    arraybuffer[i] = bytes.charCodeAt(i);
+                }
+                payload = arraybuffer.buffer;
+            } else if (payloadKind == 'S') {
+                payload = window.atob(message.slice(nextSpaceIdx + 2));
+            } else {
+                payload = JSON.parse(message.slice(nextSpaceIdx + 1));
+            }
+            cordova.callbackFromNative(callbackId, success, status, [payload], keepCallback);
+        } else {
+            console.log("processMessage failed: invalid message:" + message);
+        }
+    } catch (e) {
+        console.log("processMessage failed: Message: " + message);
+        console.log("processMessage failed: Error: " + e);
+        console.log("processMessage failed: Stack: " + e.stack);
+    }
+}
+
+// This is called from the NativeToJsMessageQueue.java.
+androidExec.processMessages = function(messages) {
+    if (messages) {
+        messagesFromNative.push(messages);
+        // Check for the reentrant case, and enqueue the message if that's the case.
+        if (messagesFromNative.length > 1) {
+            return;
+        }
+        while (messagesFromNative.length) {
+            // Don't unshift until the end so that reentrancy can be detected.
+            messages = messagesFromNative[0];
+            // The Java side can send a * message to indicate that it
+            // still has messages waiting to be retrieved.
+            if (messages == '*') {
+                messagesFromNative.shift();
+                window.setTimeout(pollOnce, 0);
+                return;
+            }
+
+            var spaceIdx = messages.indexOf(' ');
+            var msgLen = +messages.slice(0, spaceIdx);
+            var message = messages.substr(spaceIdx + 1, msgLen);
+            messages = messages.slice(spaceIdx + msgLen + 1);
+            processMessage(message);
+            if (messages) {
+                messagesFromNative[0] = messages;
+            } else {
+                messagesFromNative.shift();
+            }
+        }
+    }
+};
+
+module.exports = androidExec;
+
+});
+
+// file: lib/common/modulemapper.js
+define("cordova/modulemapper", function(require, exports, module) {
+
+var builder = require('cordova/builder'),
+    moduleMap = define.moduleMap,
+    symbolList,
+    deprecationMap;
+
+exports.reset = function() {
+    symbolList = [];
+    deprecationMap = {};
+};
+
+function addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) {
+    if (!(moduleName in moduleMap)) {
+        throw new Error('Module ' + moduleName + ' does not exist.');
+    }
+    symbolList.push(strategy, moduleName, symbolPath);
+    if (opt_deprecationMessage) {
+        deprecationMap[symbolPath] = opt_deprecationMessage;
+    }
+}
+
+// Note: Android 2.3 does have Function.bind().
+exports.clobbers = function(moduleName, symbolPath, opt_deprecationMessage) {
+    addEntry('c', moduleName, symbolPath, opt_deprecationMessage);
+};
+
+exports.merges = function(moduleName, symbolPath, opt_deprecationMessage) {
+    addEntry('m', moduleName, symbolPath, opt_deprecationMessage);
+};
+
+exports.defaults = function(moduleName, symbolPath, opt_deprecationMessage) {
+    addEntry('d', moduleName, symbolPath, opt_deprecationMessage);
+};
+
+function prepareNamespace(symbolPath, context) {
+    if (!symbolPath) {
+        return context;
+    }
+    var parts = symbolPath.split('.');
+    var cur = context;
+    for (var i = 0, part; part = parts[i]; ++i) {
+        cur = cur[part] = cur[part] || {};
+    }
+    return cur;
+}
+
+exports.mapModules = function(context) {
+    var origSymbols = {};
+    context.CDV_origSymbols = origSymbols;
+    for (var i = 0, len = symbolList.length; i < len; i += 3) {
+        var strategy = symbolList[i];
+        var moduleName = symbolList[i + 1];
+        var symbolPath = symbolList[i + 2];
+        var lastDot = symbolPath.lastIndexOf('.');
+        var namespace = symbolPath.substr(0, lastDot);
+        var lastName = symbolPath.substr(lastDot + 1);
+
+        var module = require(moduleName);
+        var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null;
+        var parentObj = prepareNamespace(namespace, context);
+        var target = parentObj[lastName];
+
+        if (strategy == 'm' && target) {
+            builder.recursiveMerge(target, module);
+        } else if ((strategy == 'd' && !target) || (strategy != 'd')) {
+            if (!(symbolPath in origSymbols)) {
+                origSymbols[symbolPath] = target;
+            }
+            builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg);
+        }
+    }
+};
+
+exports.getOriginalSymbol = function(context, symbolPath) {
+    var origSymbols = context.CDV_origSymbols;
+    if (origSymbols && (symbolPath in origSymbols)) {
+        return origSymbols[symbolPath];
+    }
+    var parts = symbolPath.split('.');
+    var obj = context;
+    for (var i = 0; i < parts.length; ++i) {
+        obj = obj && obj[parts[i]];
+    }
+    return obj;
+};
+
+exports.loadMatchingModules = function(matchingRegExp) {
+    for (var k in moduleMap) {
+        if (matchingRegExp.exec(k)) {
+            require(k);
+        }
+    }
+};
+
+exports.reset();
+
+
+});
+
+// file: lib/android/platform.js
+define("cordova/platform", function(require, exports, module) {
+
+module.exports = {
+    id: "android",
+    initialize:function() {
+        var channel = require("cordova/channel"),
+            cordova = require('cordova'),
+            exec = require('cordova/exec'),
+            modulemapper = require('cordova/modulemapper');
+
+        modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
+        modulemapper.clobbers('cordova/plugin/android/app', 'navigator.app');
+
+        modulemapper.mapModules(window);
+
+        // Inject a listener for the backbutton on the document.
+        var backButtonChannel = cordova.addDocumentEventHandler('backbutton');
+        backButtonChannel.onHasSubscribersChange = function() {
+            // If we just attached the first handler or detached the last handler,
+            // let native know we need to override the back button.
+            exec(null, null, "App", "overrideBackbutton", [this.numHandlers == 1]);
+        };
+
+        // Add hardware MENU and SEARCH button handlers
+        cordova.addDocumentEventHandler('menubutton');
+        cordova.addDocumentEventHandler('searchbutton');
+
+        // Let native code know we are all done on the JS side.
+        // Native code will then un-hide the WebView.
+        channel.join(function() {
+            exec(null, null, "App", "show", []);
+        }, [channel.onCordovaReady]);
+    }
+};
+
+});
+
+// file: lib/common/plugin/Acceleration.js
+define("cordova/plugin/Acceleration", function(require, exports, module) {
+
+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;
+
+});
+
+// file: lib/common/plugin/Camera.js
+define("cordova/plugin/Camera", function(require, exports, module) {
+
+var argscheck = require('cordova/argscheck'),
+    exec = require('cordova/exec'),
+    Camera = require('cordova/plugin/CameraConstants'),
+    CameraPopoverHandle = require('cordova/plugin/CameraPopoverHandle');
+
+var cameraExport = {};
+
+// Tack on the Camera Constants to the base camera plugin.
+for (var key in Camera) {
+    cameraExport[key] = Camera[key];
+}
+
+/**
+ * Gets a picture from source defined by "options.sourceType", and returns the
+ * image as defined by the "options.destinationType" option.
+
+ * The defaults are sourceType=CAMERA and destinationType=FILE_URI.
+ *
+ * @param {Function} successCallback
+ * @param {Function} errorCallback
+ * @param {Object} options
+ */
+cameraExport.getPicture = function(successCallback, errorCallback, options) {
+    argscheck.checkArgs('fFO', 'Camera.getPicture', arguments);
+    options = options || {};
+    var getValue = argscheck.getValue;
+
+    var quality = getValue(options.quality, 50);
+    var destinationType = getValue(options.destinationType, Camera.DestinationType.FILE_URI);
+    var sourceType = getValue(options.sourceType, Camera.PictureSourceType.CAMERA);
+    var targetWidth = getValue(options.targetWidth, -1);
+    var targetHeight = getValue(options.targetHeight, -1);
+    var encodingType = getValue(options.encodingType, Camera.EncodingType.JPEG);
+    var mediaType = getValue(options.mediaType, Camera.MediaType.PICTURE);
+    var allowEdit = !!options.allowEdit;
+    var correctOrientation = !!options.correctOrientation;
+    var saveToPhotoAlbum = !!options.saveToPhotoAlbum;
+    var popoverOptions = getValue(options.popoverOptions, null);
+    var cameraDirection = getValue(options.cameraDirection, Camera.Direction.BACK);
+
+    var args = [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType,
+                mediaType, allowEdit, correctOrientation, saveToPhotoAlbum, popoverOptions, cameraDirection];
+
+    exec(successCallback, errorCallback, "Camera", "takePicture", args);
+    return new CameraPopoverHandle();
+};
+
+cameraExport.cleanup = function(successCallback, errorCallback) {
+    exec(successCallback, errorCallback, "Camera", "cleanup", []);
+};
+
+module.exports = cameraExport;
+
+});
+
+// file: lib/common/plugin/CameraConstants.js
+define("cordova/plugin/CameraConstants", function(require, exports, module) {
+
+module.exports = {
+  DestinationType:{
+    DATA_URL: 0,         // Return base64 encoded string
+    FILE_URI: 1,         // Return file uri (content://media/external/images/media/2 for Android)
+    NATIVE_URI: 2        // Return native uri (eg. asset-library://... for iOS)
+  },
+  EncodingType:{
+    JPEG: 0,             // Return JPEG encoded image
+    PNG: 1               // Return PNG encoded image
+  },
+  MediaType:{
+    PICTURE: 0,          // allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType
+    VIDEO: 1,            // allow selection of video only, ONLY RETURNS URL
+    ALLMEDIA : 2         // allow selection from all media types
+  },
+  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)
+  },
+  PopoverArrowDirection:{
+      ARROW_UP : 1,        // matches iOS UIPopoverArrowDirection constants to specify arrow location on popover
+      ARROW_DOWN : 2,
+      ARROW_LEFT : 4,
+      ARROW_RIGHT : 8,
+      ARROW_ANY : 15
+  },
+  Direction:{
+      BACK: 0,
+      FRONT: 1
+  }
+};
+
+});
+
+// file: lib/common/plugin/CameraPopoverHandle.js
+define("cordova/plugin/CameraPopoverHandle", function(require, exports, module) {
+
+var exec = require('cordova/exec');
+
+/**
+ * A handle to an image picker popover.
+ */
+var CameraPopoverHandle = function() {
+    this.setPosition = function(popoverOptions) {
+        console.log('CameraPopoverHandle.setPosition is only supported on iOS.');
+    };
+};
+
+module.exports = CameraPopoverHandle;
+
+});
+
+// file: lib/common/plugin/CameraPopoverOptions.js
+define("cordova/plugin/CameraPopoverOptions", function(require, exports, module) {
+
+var Camera = require('cordova/plugin/CameraConstants');
+
+/**
+ * Encapsulates options for iOS Popover image picker
+ */
+var CameraPopoverOptions = function(x,y,width,height,arrowDir){
+    // information of rectangle that popover should be anchored to
+    this.x = x || 0;
+    this.y = y || 32;
+    this.width = width || 320;
+    this.height = height || 480;
+    // The direction of the popover arrow
+    this.arrowDir = arrowDir || Camera.PopoverArrowDirection.ARROW_ANY;
+};
+
+module.exports = CameraPopoverOptions;
+
+});
+
+// file: lib/common/plugin/CaptureAudioOptions.js
+define("cordova/plugin/CaptureAudioOptions", function(require, exports, module) {
+
+/**
+ * Encapsulates all audio capture operation configuration options.
+ */
+var CaptureAudioOptions = function(){
+    // Upper limit of sound clips user can record. Value must be equal or greater than 1.
+    this.limit = 1;
+    // Maximum duration of a single sound clip in seconds.
+    this.duration = 0;
+};
+
+module.exports = CaptureAudioOptions;
+
+});
+
+// file: lib/common/plugin/CaptureError.js
+define("cordova/plugin/CaptureError", function(require, exports, module) {
+
+/**
+ * The CaptureError interface encapsulates all errors in the Capture API.
+ */
+var CaptureError = function(c) {
+   this.code = c || null;
+};
+
+// Camera or microphone failed to capture image or sound.
+CaptureError.CAPTURE_INTERNAL_ERR = 0;
+// Camera application or audio capture application is currently serving other capture request.
+CaptureError.CAPTURE_APPLICATION_BUSY = 1;
+// Invalid use of the API (e.g. limit parameter has value less than one).
+CaptureError.CAPTURE_INVALID_ARGUMENT = 2;
+// User exited camera application or audio capture application before capturing anything.
+CaptureError.CAPTURE_NO_MEDIA_FILES = 3;
+// The requested capture operation is not supported.
+CaptureError.CAPTURE_NOT_SUPPORTED = 20;
+
+module.exports = CaptureError;
+
+});
+
+// file: lib/common/plugin/CaptureImageOptions.js
+define("cordova/plugin/CaptureImageOptions", function(require, exports, module) {
+
+/**
+ * Encapsulates all image capture operation configuration options.
+ */
+var CaptureImageOptions = function(){
+    // Upper limit of images user can take. Value must be equal or greater than 1.
+    this.limit = 1;
+};
+
+module.exports = CaptureImageOptions;
+
+});
+
+// file: lib/common/plugin/CaptureVideoOptions.js
+define("cordova/plugin/CaptureVideoOptions", function(require, exports, module) {
+
+/**
+ * Encapsulates all video capture operation configuration options.
+ */
+var CaptureVideoOptions = function(){
+    // Upper limit of videos user can record. Value must be equal or greater than 1.
+    this.limit = 1;
+    // Maximum duration of a single video clip in seconds.
+    this.duration = 0;
+};
+
+module.exports = CaptureVideoOptions;
+
+});
+
+// file: lib/common/plugin/CompassError.js
+define("cordova/plugin/CompassError", function(require, exports, module) {
+
+/**
+ *  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;
+
+});
+
+// file: lib/common/plugin/CompassHeading.js
+define("cordova/plugin/CompassHeading", function(require, exports, module) {
+
+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;
+
+});
+
+// file: lib/common/plugin/ConfigurationData.js
+define("cordova/plugin/ConfigurationData", function(require, exports, module) {
+
+/**
+ * Encapsulates a set of parameters that the capture device supports.
+ */
+function ConfigurationData() {
+    // The ASCII-encoded string in lower case representing the media type.
+    this.type = null;
+    // The height attribute represents height of the image or video in pixels.
+    // In the case of a sound clip this attribute has value 0.
+    this.height = 0;
+    // The width attribute represents width of the image or video in pixels.
+    // In the case of a sound clip this attribute has value 0
+    this.width = 0;
+}
+
+module.exports = ConfigurationData;
+
+});
+
+// file: lib/common/plugin/Connection.js
+define("cordova/plugin/Connection", function(require, exports, module) {
+
+/**
+ * Network status
+ */
+module.exports = {
+        UNKNOWN: "unknown",
+        ETHERNET: "ethernet",
+        WIFI: "wifi",
+        CELL_2G: "2g",
+        CELL_3G: "3g",
+        CELL_4G: "4g",
+        CELL:"cellular",
+        NONE: "none"
+};
+
+});
+
+// file: lib/common/plugin/Contact.js
+define("cordova/plugin/Contact", function(require, exports, module) {
+
+var argscheck = require('cordova/argscheck'),
+    exec = require('cordova/exec'),
+    ContactError = require('cordova/plugin/ContactError'),
+    utils = require('cordova/utils');
+
+/**
+* Converts primitives into Complex Object
+* Currently only used for Date fields
+*/
+function convertIn(contact) {
+    var value = contact.birthday;
+    try {
+      contact.birthday = new Date(parseFloat(value));
+    } catch (exception){
+      console.log("Cordova Contact convertIn error: exception creating date.");
+    }
+    return contact;
+}
+
+/**
+* Converts Complex objects into primitives
+* Only conversion at present is for Dates.
+**/
+
+function convertOut(contact) {
+    var value = contact.birthday;
+    if (value !== null) {
+        // try to make it a Date object if it is not already
+        if (!utils.isDate(value)){
+            try {
+                value = new Date(value);
+            } catch(exception){
+                value = null;
+            }
+        }
+        if (utils.isDate(value)){
+            value = value.valueOf(); // convert to milliseconds
+        }
+        contact.birthday = value;
+    }
+    return contact;
+}
+
+/**
+* Contains information about a single contact.
+* @constructor
+* @param {DOMString} id unique identifier
+* @param {DOMString} displayName
+* @param {ContactName} name
+* @param {DOMString} nickname
+* @param {Array.<ContactField>} phoneNumbers array of phone numbers
+* @param {Array.<ContactField>} emails array of email addresses
+* @param {Array.<ContactAddress>} addresses array of addresses
+* @param {Array.<ContactField>} ims instant messaging user ids
+* @param {Array.<ContactOrganization>} organizations
+* @param {DOMString} birthday contact's birthday
+* @param {DOMString} note user notes about contact
+* @param {Array.<ContactField>} photos
+* @param {Array.<ContactField>} categories
+* @param {Array.<ContactField>} urls contact's web sites
+*/
+var Contact = function (id, displayName, name, nickname, phoneNumbers, emails, addresses,
+    ims, organizations, birthday, note, photos, categories, urls) {
+    this.id = id || null;
+    this.rawId = null;
+    this.displayName = displayName || null;
+    this.name = name || null; // ContactName
+    this.nickname = nickname || null;
+    this.phoneNumbers = phoneNumbers || null; // ContactField[]
+    this.emails = emails || null; // ContactField[]
+    this.addresses = addresses || null; // ContactAddress[]
+    this.ims = ims || null; // ContactField[]
+    this.organizations = organizations || null; // ContactOrganization[]
+    this.birthday = birthday || null;
+    this.note = note || null;
+    this.photos = photos || null; // ContactField[]
+    this.categories = categories || null; // ContactField[]
+    this.urls = urls || null; // ContactField[]
+};
+
+/**
+* Removes contact from device storage.
+* @param successCB success callback
+* @param errorCB error callback
+*/
+Contact.prototype.remove = function(successCB, errorCB) {
+    argscheck.checkArgs('FF', 'Contact.remove', arguments);
+    var fail = errorCB && function(code) {
+        errorCB(new ContactError(code));
+    };
+    if (this.id === null) {
+        fail(ContactError.UNKNOWN_ERROR);
+    }
+    else {
+        exec(successCB, fail, "Contacts", "remove", [this.id]);
+    }
+};
+
+/**
+* Creates a deep copy of this Contact.
+* With the contact ID set to null.
+* @return copy of this Contact
+*/
+Contact.prototype.clone = function() {
+    var clonedContact = utils.clone(this);
+    clonedContact.id = null;
+    clonedContact.rawId = null;
+
+    function nullIds(arr) {
+        if (arr) {
+            for (var i = 0; i < arr.length; ++i) {
+                arr[i].id = null;
+            }
+        }
+    }
+
+    // Loop through and clear out any id's in phones, emails, etc.
+    nullIds(clonedContact.phoneNumbers);
+    nullIds(clonedContact.emails);
+    nullIds(clonedContact.addresses);
+    nullIds(clonedContact.ims);
+    nullIds(clonedContact.organizations);
+    nullIds(clonedContact.categories);
+    nullIds(clonedContact.photos);
+    nullIds(clonedContact.urls);
+    return clonedContact;
+};
+
+/**
+* Persists contact to device storage.
+* @param successCB success callback
+* @param errorCB error callback
+*/
+Contact.prototype.save = function(successCB, errorCB) {
+    argscheck.checkArgs('FFO', 'Contact.save', arguments);
+    var fail = errorCB && function(code) {
+        errorCB(new ContactError(code));
+    };
+    var success = function(result) {
+        if (result) {
+            if (successCB) {
+                var fullContact = require('cordova/plugin/contacts').create(result);
+                successCB(convertIn(fullContact));
+            }
+        }
+        else {
+            // no Entry object returned
+            fail(ContactError.UNKNOWN_ERROR);
+        }
+    };
+    var dupContact = convertOut(utils.clone(this));
+    exec(success, fail, "Contacts", "save", [dupContact]);
+};
+
+
+module.exports = Contact;
+
+});
+
+// file: lib/common/plugin/ContactAddress.js
+define("cordova/plugin/ContactAddress", function(require, exports, module) {
+
+/**
+* Contact address.
+* @constructor
+* @param {DOMString} id unique identifier, should only be set by native code
+* @param formatted // NOTE: not a W3C standard
+* @param streetAddress
+* @param locality
+* @param region
+* @param postalCode
+* @param country
+*/
+
+var ContactAddress = function(pref, type, formatted, streetAddress, locality, region, postalCode, country) {
+    this.id = null;
+    this.pref = (typeof pref != 'undefined' ? pref : false);
+    this.type = type || null;
+    this.formatted = formatted || null;
+    this.streetAddress = streetAddress || null;
+    this.locality = locality || null;
+    this.region = region || null;
+    this.postalCode = postalCode || null;
+    this.country = country || null;
+};
+
+module.exports = ContactAddress;
+
+});
+
+// file: lib/common/plugin/ContactError.js
+define("cordova/plugin/ContactError", function(require, exports, module) {
+
+/**
+ *  ContactError.
+ *  An error code assigned by an implementation when an error has occurred
+ * @constructor
+ */
+var ContactError = function(err) {
+    this.code = (typeof err != 'undefined' ? err : null);
+};
+
+/**
+ * Error codes
+ */
+ContactError.UNKNOWN_ERROR = 0;
+ContactError.INVALID_ARGUMENT_ERROR = 1;
+ContactError.TIMEOUT_ERROR = 2;
+ContactError.PENDING_OPERATION_ERROR = 3;
+ContactError.IO_ERROR = 4;
+ContactError.NOT_SUPPORTED_ERROR = 5;
+ContactError.PERMISSION_DENIED_ERROR = 20;
+
+module.exports = ContactError;
+
+});
+
+// file: lib/common/plugin/ContactField.js
+define("cordova/plugin/ContactField", function(require, exports, module) {
+
+/**
+* Generic contact field.
+* @constructor
+* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
+* @param type
+* @param value
+* @param pref
+*/
+var ContactField = function(type, value, pref) {
+    this.id = null;
+    this.type = (type && type.toString()) || null;
+    this.value = (value && value.toString()) || null;
+    this.pref = (typeof pref != 'undefined' ? pref : false);
+};
+
+module.exports = ContactField;
+
+});
+
+// file: lib/common/plugin/ContactFindOptions.js
+define("cordova/plugin/ContactFindOptions", function(require, exports, module) {
+
+/**
+ * ContactFindOptions.
+ * @constructor
+ * @param filter used to match contacts against
+ * @param multiple boolean used to determine if more than one contact should be returned
+ */
+
+var ContactFindOptions = function(filter, multiple) {
+    this.filter = filter || '';
+    this.multiple = (typeof multiple != 'undefined' ? multiple : false);
+};
+
+module.exports = ContactFindOptions;
+
+});
+
+// file: lib/common/plugin/ContactName.js
+define("cordova/plugin/ContactName", function(require, exports, module) {
+
+/**
+* Contact name.
+* @constructor
+* @param formatted // NOTE: not part of W3C standard
+* @param familyName
+* @param givenName
+* @param middle
+* @param prefix
+* @param suffix
+*/
+var ContactName = function(formatted, familyName, givenName, middle, prefix, suffix) {
+    this.formatted = formatted || null;
+    this.familyName = familyName || null;
+    this.givenName = givenName || null;
+    this.middleName = middle || null;
+    this.honorificPrefix = prefix || null;
+    this.honorificSuffix = suffix || null;
+};
+
+module.exports = ContactName;
+
+});
+
+// file: lib/common/plugin/ContactOrganization.js
+define("cordova/plugin/ContactOrganization", function(require, exports, module) {
+
+/**
+* Contact organization.
+* @constructor
+* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
+* @param name
+* @param dept
+* @param title
+* @param startDate
+* @param endDate
+* @param location
+* @param desc
+*/
+
+var ContactOrganization = function(pref, type, name, dept, title) {
+    this.id = null;
+    this.pref = (typeof pref != 'undefined' ? pref : false);
+    this.type = type || null;
+    this.name = name || null;
+    this.department = dept || null;
+    this.title = title || null;
+};
+
+module.exports = ContactOrganization;
+
+});
+
+// file: lib/common/plugin/Coordinates.js
+define("cordova/plugin/Coordinates", function(require, exports, module) {
+
+/**
+ * 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;
+
+});
+
+// file: lib/common/plugin/DirectoryEntry.js
+define("cordova/plugin/DirectoryEntry", function(require, exports, module) {
+
+var argscheck = require('cordova/argscheck'),
+    utils = require('cordova/utils'),
+    exec = require('cordova/exec'),
+    Entry = require('cordova/plugin/Entry'),
+    FileError = require('cordova/plugin/FileError'),
+    DirectoryReader = require('cordova/plugin/DirectoryReader');
+
+/**
+ * An interface representing a directory on the file system.
+ *
+ * {boolean} isFile always false (readonly)
+ * {boolean} isDirectory always true (readonly)
+ * {DOMString} name of the directory, excluding the path leading to it (readonly)
+ * {DOMString} fullPath the absolute full path to the directory (readonly)
+ * TODO: implement this!!! {FileSystem} filesystem on which the directory resides (readonly)
+ */
+var DirectoryEntry = function(name, fullPath) {
+     DirectoryEntry.__super__.constructor.call(this, false, true, name, fullPath);
+};
+
+utils.extend(DirectoryEntry, Entry);
+
+/**
+ * Creates a new DirectoryReader to read entries from this directory
+ */
+DirectoryEntry.prototype.createReader = function() {
+    return new DirectoryReader(this.fullPath);
+};
+
+/**
+ * Creates or looks up a directory
+ *
+ * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a directory
+ * @param {Flags} options to create or exclusively create the directory
+ * @param {Function} successCallback is called with the new entry
+ * @param {Function} errorCallback is called with a FileError
+ */
+DirectoryEntry.prototype.getDirectory = function(path, options, successCallback, errorCallback) {
+    argscheck.checkArgs('sOFF', 'DirectoryEntry.getDirectory', arguments);
+    var win = successCallback && function(result) {
+        var entry = new DirectoryEntry(result.name, result.fullPath);
+        successCallback(entry);
+    };
+    var fail = errorCallback && function(code) {
+        errorCallback(new FileError(code));
+    };
+    exec(win, fail, "File", "getDirectory", [this.fullPath, path, options]);
+};
+
+/**
+ * Deletes a directory and all of it's contents
+ *
+ * @param {Function} successCallback is called with no parameters
+ * @param {Function} errorCallback is called with a FileError
+ */
+DirectoryEntry.prototype.removeRecursively = function(successCallback, errorCallback) {
+    argscheck.checkArgs('FF', 'DirectoryEntry.removeRecursively', arguments);
+    var fail = errorCallback && function(code) {
+        errorCallback(new FileError(code));
+    };
+    exec(successCallback, fail, "File", "removeRecursively", [this.fullPath]);
+};
+
+/**
+ * Creates or looks up a file
+ *
+ * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a file
+ * @param {Flags} options to create or exclusively create the file
+ * @param {Function} successCallback is called with the new entry
+ * @param {Function} errorCallback is called with a FileError
+ */
+DirectoryEntry.prototype.getFile = function(path, options, successCallback, errorCallback) {
+    argscheck.checkArgs('sOFF', 'DirectoryEntry.getFile', arguments);
+    var win = successCallback && function(result) {
+        var FileEntry = require('cordova/plugin/FileEntry');
+        var entry = new FileEntry(result.name, result.fullPath);
+        successCallback(entry);
+    };
+    var fail = errorCallback && function(code) {
+        errorCallback(new FileError(code));
+    };
+    exec(win, fail, "File", "getFile", [this.fullPath, path, options]);
+};
+
+module.exports = DirectoryEntry;
+
+});
+
+// file: lib/common/plugin/DirectoryReader.js
+define("cordova/plugin/DirectoryReader", function(require, exports, module) {
+
+var exec = require('cordova/exec'),
+    FileError = require('cordova/plugin/FileError') ;
+
+/**
+ * An interface that lists the files and directories in a directory.
+ */
+function DirectoryReader(path) {
+    this.path = path || null;
+}
+
+/**
+ * Returns a list of entries from a directory.
+ *
+ * @param {Function} successCallback is called with a list of entries
+ * @param {Function} errorCallback is called with a FileError
+ */
+DirectoryReader.prototype.readEntries = function(successCallback, errorCallback) {
+    var win = typeof successCallback !== 'function' ? null : function(result) {
+        var retVal = [];
+        for (var i=0; i<result.length; i++) {
+            var entry = null;
+            if (result[i].isDirectory) {
+                entry = new (require('cordova/plugin/DirectoryEntry'))();
+            }
+            else if (result[i].isFile) {
+                entry = new (require('cordova/plugin/FileEntry'))();
+            }
+            entry.isDirectory = result[i].isDirectory;
+            entry.isFile = result[i].isFile;
+            entry.name = result[i].name;
+            entry.fullPath = result[i].fullPath;
+            retVal.push(entry);
+        }
+        successCallback(retVal);
+    };
+    var fail = typeof errorCallback !== 'function' ? null : function(code) {
+        errorCallback(new FileError(code));
+    };
+    exec(win, fail, "File", "readEntries", [this.path]);
+};
+
+module.exports = DirectoryReader;
+
+});
+
+// file: lib/common/plugin/Entry.js
+define("cordova/plugin/Entry", function(require, exports, module) {
+
+var argscheck = require('cordova/argscheck'),
+    exec = require('cordova/exec'),
+    FileError = require('cordova/plugin/FileError'),
+    Metadata = require('cordova/plugin/Metadata');
+
+/**
+ * Represents a file or directory on the local file system.
+ *
+ * @param isFile
+ *            {boolean} true if Entry is a file (readonly)
+ * @param isDirectory
+ *            {boolean} true if Entry is a directory (readonly)
+ * @param name
+ *            {DOMString} name of the file or directory, excluding the path
+ *            leading to it (readonly)
+ * @param fullPath
+ *            {DOMString} the absolute full path to the file or directory
+ *            (readonly)
+ */
+function Entry(isFile, isDirectory, name, fullPath, fileSystem) {
+    this.isFile = !!isFile;
+    this.isDirectory = !!isDirectory;
+    this.name = name || '';
+    this.fullPath = fullPath || '';
+    this.filesystem = fileSystem || null;
+}
+
+/**
+ * Look up the metadata of the entry.
+ *
+ * @param successCallback
+ *            {Function} is called with a Metadata object
+ * @param errorCallback
+ *            {Function} is called with a FileError
+ */
+Entry.prototype.getMetadata = function(successCallback, errorCallback) {
+    argscheck.checkArgs('FF', 'Entry.getMetadata', arguments);
+    var success = successCallback && function(lastModified) {
+        var metadata = new Metadata(lastModified);
+        successCallback(metadata);
+    };
+    var fail = errorCallback && function(code) {
+        errorCallback(new FileError(code));
+    };
+
+    exec(success, fail, "File", "getMetadata", [this.fullPath]);
+};
+
+/**
+ * Set the metadata of the entry.
+ *
+ * @param successCallback
+ *            {Function} is called with a Metadata object
+ * @param errorCallback
+ *            {Function} is called with a FileError
+ * @param metadataObject
+ *            {Object} keys and values to set
+ */
+Entry.prototype.setMetadata = function(successCallback, errorCallback, metadataObject) {
+    argscheck.checkArgs('FFO', 'Entry.setMetadata', arguments);
+    exec(successCallback, errorCallback, "File", "setMetadata", [this.fullPath, metadataObject]);
+};
+
+/**
+ * Move a file or directory to a new location.
+ *
+ * @param parent
+ *            {DirectoryEntry} the directory to which to move this entry
+ * @param newName
+ *            {DOMString} new name of the entry, defaults to the current name
+ * @param successCallback
+ *            {Function} called with the new DirectoryEntry object
+ * @param errorCallback
+ *            {Function} called with a FileError
+ */
+Entry.prototype.moveTo = function(parent, newName, successCallback, errorCallback) {
+    argscheck.checkArgs('oSFF', 'Entry.moveTo', arguments);
+    var fail = errorCallback && function(code) {
+        errorCallback(new FileError(code));
+    };
+    // source path
+    var srcPath = this.fullPath,
+        // entry name
+        name = newName || this.name,
+        success = function(entry) {
+            if (entry) {
+                if (successCallback) {
+                    // create appropriate Entry object
+                    var result = (entry.isDirectory) ? new (require('cordova/plugin/DirectoryEntry'))(entry.name, entry.fullPath) : new (require('cordova/plugin/FileEntry'))(entry.name, entry.fullPath);
+                    successCallback(result);
+                }
+            }
+            else {
+                // no Entry object returned
+                fail && fail(FileError.NOT_FOUND_ERR);
+            }
+        };
+
+    // copy
+    exec(success, fail, "File", "moveTo", [srcPath, parent.fullPath, name]);
+};
+
+/**
+ * Copy a directory to a different location.
+ *
+ * @param parent
+ *            {DirectoryEntry} the directory to which to copy the entry
+ * @param newName
+ *            {DOMString} new name of the entry, defaults to the current name
+ * @param successCallback
+ *            {Function} called with the new Entry object
+ * @param errorCallback
+ *            {Function} called with a FileError
+ */
+Entry.prototype.copyTo = function(parent, newName, successCallback, errorCallback) {
+    argscheck.checkArgs('oSFF', 'Entry.copyTo', arguments);
+    var fail = errorCallback && function(code) {
+        errorCallback(new FileError(code));
+    };
+
+        // source path
+    var srcPath = this.fullPath,
+        // entry name
+        name = newName || this.name,
+        // success callback
+        success = function(entry) {
+            if (entry) {
+                if (successCallback) {
+                    // create appropriate Entry object
+                    var result = (entry.isDirectory) ? new (require('cordova/plugin/DirectoryEntry'))(entry.name, entry.fullPath) : new (require('cordova/plugin/FileEntry'))(entry.name, entry.fullPath);
+                    successCallback(result);
+                }
+            }
+            else {
+                // no Entry object returned
+                fail && fail(FileError.NOT_FOUND_ERR);
+            }
+        };
+
+    // copy
+    exec(success, fail, "File", "copyTo", [srcPath, parent.fullPath, name]);
+};
+
+/**
+ * Return a URL that can be used to identify this entry.
+ */
+Entry.prototype.toURL = function() {
+    // fullPath attribute contains the full URL
+    return this.fullPath;
+};
+
+/**
+ * Returns a URI that can be used to identify this entry.
+ *
+ * @param {DOMString} mimeType for a FileEntry, the mime type to be used to interpret the file, when loaded through this URI.
+ * @return uri
+ */
+Entry.prototype.toURI = function(mimeType) {
+    console.log("DEPRECATED: Update your code to use 'toURL'");
+    // fullPath attribute contains the full URI
+    return this.toURL();
+};
+
+/**
+ * Remove a file or directory. It is an error to attempt to delete a
+ * directory that is not empty. It is an error to attempt to delete a
+ * root directory of a file system.
+ *
+ * @param successCallback {Function} called with no parameters
+ * @param errorCallback {Function} called with a FileError
+ */
+Entry.prototype.remove = function(successCallback, errorCallback) {
+    argscheck.checkArgs('FF', 'Entry.remove', arguments);
+    var fail = errorCallback && function(code) {
+        errorCallback(new FileError(code));
+    };
+    exec(successCallback, fail, "File", "remove", [this.fullPath]);
+};
+
+/**
+ * Look up the parent DirectoryEntry of this entry.
+ *
+ * @param successCallback {Function} called with the parent DirectoryEntry object
+ * @param errorCallback {Function} called with a FileError
+ */
+Entry.prototype.getParent = function(successCallback, errorCallback) {
+    argscheck.checkArgs('FF', 'Entry.getParent', arguments);
+    var win = successCallback && function(result) {
+        var DirectoryEntry = require('cordova/plugin/DirectoryEntry');
+        var entry = new DirectoryEntry(result.name, result.fullPath);
+        successCallback(entry);
+    };
+    var fail = errorCallback && function(code) {
+        errorCallback(new FileError(code));
+    };
+    exec(win, fail, "File", "getParent", [this.fullPath]);
+};
+
+module.exports = Entry;
+
+});
+
+// file: lib/common/plugin/File.js
+define("cordova/plugin/File", function(require, exports, module) {
+
+/**
+ * Constructor.
+ * name {DOMString} name of the file, without path information
+ * fullPath {DOMString} the full path of the file, including the name
+ * type {DOMString} mime type
+ * lastModifiedDate {Date} last modified date
+ * size {Number} size of the file in bytes
+ */
+
+var File = function(name, fullPath, type, lastModifiedDate, size){
+    this.name = name || '';
+    this.fullPath = fullPath || null;
+    this.type = type || null;
+    this.lastModifiedDate = lastModifiedDate || null;
+    this.size = size || 0;
+
+    // These store the absolute start and end for slicing the file.
+    this.start = 0;
+    this.end = this.size;
+};
+
+/**
+ * Returns a "slice" of the file. Since Cordova Files don't contain the actual
+ * content, this really returns a File with adjusted start and end.
+ * Slices of slices are supported.
+ * start {Number} The index at which to start the slice (inclusive).
+ * end {Number} The index at which to end the slice (exclusive).
+ */
+File.prototype.slice = function(start, end) {
+    var size = this.end - this.start;
+    var newStart = 0;
+    var newEnd = size;
+    if (arguments.length) {
+        if (start < 0) {
+            newStart = Math.max(size + start, 0);
+        } else {
+            newStart = Math.min(size, start);
+        }
+    }
+
+    if (arguments.length >= 2) {
+        if (end < 0) {
+            newEnd = Math.max(size + end, 0);
+        } else {
+            newEnd = Math.min(end, size);
+        }
+    }
+
+    var newFile = new File(this.name, this.fullPath, this.type, this.lastModifiedData, this.size);
+    newFile.start = this.start + newStart;
+    newFile.end = this.start + newEnd;
+    return newFile;
+};
+
+
+module.exports = File;
+
+});
+
+// file: lib/common/plugin/FileEntry.js
+define("cordova/plugin/FileEntry", function(require, exports, module) {
+
+var utils = require('cordova/utils'),
+    exec = require('cordova/exec'),
+    Entry = require('cordova/plugin/Entry'),
+    FileWriter = require('cordova/plugin/FileWriter'),
+    File = require('cordova/plugin/File'),
+    FileError = require('cordova/plugin/FileError');
+
+/**
+ * An interface representing a file on the file system.
+ *
+ * {boolean} isFile always true (readonly)
+ * {boolean} isDirectory always false (readonly)
+ * {DOMString} name of the file, excluding the path leading to it (readonly)
+ * {DOMString} fullPath the absolute full path to the file (readonly)
+ * {FileSystem} filesystem on which the file resides (readonly)
+ */
+var FileEntry = function(name, fullPath) {
+     FileEntry.__super__.constructor.apply(this, [true, false, name, fullPath]);
+};
+
+utils.extend(FileEntry, Entry);
+
+/**
+ * Creates a new FileWriter associated with the file that this FileEntry represents.
+ *
+ * @param {Function} successCallback is called with the new FileWriter
+ * @param {Function} errorCallback is called with a FileError
+ */
+FileEntry.prototype.createWriter = function(successCallback, errorCallback) {
+    this.file(function(filePointer) {
+        var writer = new FileWriter(filePointer);
+
+        if (writer.fileName === null || writer.fileName === "") {
+            errorCallback && errorCallback(new FileError(FileError.INVALID_STATE_ERR));
+        } else {
+            successCallback && successCallback(writer);
+        }
+    }, errorCallback);
+};
+
+/**
+ * Returns a File that represents the current state of the file that this FileEntry represents.
+ *
+ * @param {Function} successCallback is called with the new File object
+ * @param {Function} errorCallback is called with a FileError
+ */
+FileEntry.prototype.file = function(successCallback, errorCallback) {
+    var win = successCallback && function(f) {
+        var file = new File(f.name, f.fullPath, f.type, f.lastModifiedDate, f.size);
+        successCallback(file);
+    };
+    var fail = errorCallback && function(code) {
+        errorCallback(new FileError(code));
+    };
+    exec(win, fail, "File", "getFileMetadata", [this.fullPath]);
+};
+
+
+module.exports = FileEntry;
+
+});
+
+// file: lib/common/plugin/FileError.js
+define("cordova/plugin/FileError", function(require, exports, module) {
+
+/**
+ * FileError
+ */
+function FileError(error) {
+  this.code = error || null;
+}
+
+// File error codes
+// Found in DOMException
+FileError.NOT_FOUND_ERR = 1;
+FileError.SECURITY_ERR = 2;
+FileError.ABORT_ERR = 3;
+
+// Added by File API specification
+FileError.NOT_READABLE_ERR = 4;
+FileError.ENCODING_ERR = 5;
+FileError.NO_MODIFICATION_ALLOWED_ERR = 6;
+FileError.INVALID_STATE_ERR = 7;
+FileError.SYNTAX_ERR = 8;
+FileError.INVALID_MODIFICATION_ERR = 9;
+FileError.QUOTA_EXCEEDED_ERR = 10;
+FileError.TYPE_MISMATCH_ERR = 11;
+FileError.PATH_EXISTS_ERR = 12;
+
+module.exports = FileError;
+
+});
+
+// file: lib/common/plugin/FileReader.js
+define("cordova/plugin/FileReader", function(require, exports, module) {
+
+var exec = require('cordova/exec'),
+    modulemapper = require('cordova/modulemapper'),
+    utils = require('cordova/utils'),
+    File = require('cordova/plugin/File'),
+    FileError = require('cordova/plugin/FileError'),
+    ProgressEvent = require('cordova/plugin/ProgressEvent'),
+    origFileReader = modulemapper.getOriginalSymbol(this, 'FileReader');
+
+/**
+ * This class reads the mobile device file system.
+ *
+ * For Android:
+ *      The root directory is the root of the file system.
+ *      To read from the SD card, the file name is "sdcard/my_file.txt"
+ * @constructor
+ */
+var FileReader = function() {
+    this._readyState = 0;
+    this._error = null;
+    this._result = null;
+    this._fileName = '';
+    this._realReader = origFileReader ? new origFileReader() : {};
+};
+
+// States
+FileReader.EMPTY = 0;
+FileReader.LOADING = 1;
+FileReader.DONE = 2;
+
+utils.defineGetter(FileReader.prototype, 'readyState', function() {
+    return this._fileName ? this._readyState : this._realReader.readyState;
+});
+
+utils.defineGetter(FileReader.prototype, 'error', function() {
+    return this._fileName ? this._error: this._realReader.error;
+});
+
+utils.defineGetter(FileReader.prototype, 'result', function() {
+    return this._fileName ? this._result: this._realReader.result;
+});
+
+function defineEvent(eventName) {
+    utils.defineGetterSetter(FileReader.prototype, eventName, function() {
+        return this._realReader[eventName] || null;
+    }, function(value) {
+        this._realReader[eventName] = value;
+    });
+}
+defineEvent('onloadstart');    // When the read starts.
+defineEvent('onprogress');     // While reading (and decoding) file or fileBlob data, and reporting partial file data (progress.loaded/progress.total)
+defineEvent('onload');         // When the read has successfully completed.
+defineEvent('onerror');        // When the read has failed (see errors).
+defineEvent('onloadend');      // When the request has completed (either in success or failure).
+defineEvent('onabort');        // When the read has been aborted. For instance, by invoking the abort() method.
+
+function initRead(reader, file) {
+    // Already loading something
+    if (reader.readyState == FileReader.LOADING) {
+      throw new FileError(FileError.INVALID_STATE_ERR);
+    }
+
+    reader._result = null;
+    reader._error = null;
+    reader._readyState = FileReader.LOADING;
+
+    if (typeof file == 'string') {
+        // Deprecated in Cordova 2.4.
+        console.warn('Using a string argument with FileReader.readAs functions is deprecated.');
+        reader._fileName = file;
+    } else if (typeof file.fullPath == 'string') {
+        reader._fileName = file.fullPath;
+    } else {
+        reader._fileName = '';
+        return true;
+    }
+
+    reader.onloadstart && reader.onloadstart(new ProgressEvent("loadstart", {target:reader}));
+}
+
+/**
+ * Abort reading file.
+ */
+FileReader.prototype.abort = function() {
+    if (origFileReader && !this._fileName) {
+        return this._realReader.abort();
+    }
+    this._result = null;
+
+    if (this._readyState == FileReader.DONE || this._readyState == FileReader.EMPTY) {
+      return;
+    }
+
+    this._readyState = FileReader.DONE;
+
+    // If abort callback
+    if (typeof this.onabort === 'function') {
+        this.onabort(new ProgressEvent('abort', {target:this}));
+    }
+    // If load end callback
+    if (typeof this.onloadend === 'function') {
+        this.onloadend(new ProgressEvent('loadend', {target:this}));
+    }
+};
+
+/**
+ * Read text file.
+ *
+ * @param file          {File} File object containing file properties
+ * @param encoding      [Optional] (see http://www.iana.org/assignments/character-sets)
+ */
+FileReader.prototype.readAsText = function(file, encoding) {
+    if (initRead(this, file)) {
+        return this._realReader.readAsText(file, encoding);
+    }
+
+    // Default encoding is UTF-8
+    var enc = encoding ? encoding : "UTF-8";
+    var me = this;
+    var execArgs = [this._fileName, enc, file.start, file.end];
+
+    // Read file
+    exec(
+        // Success callback
+        function(r) {
+            // If DONE (cancelled), then don't do anything
+            if (me._readyState === FileReader.DONE) {
+                return;
+            }
+
+            // Save result
+            me._result = r;
+
+            // If onload callback
+            if (typeof me.onload === "function") {
+                me.onload(new ProgressEvent("load", {target:me}));
+            }
+
+            // DONE state
+            me._readyState = FileReader.DONE;
+
+            // If onloadend callback
+            if (typeof me.onloadend === "function") {
+                me.onloadend(new ProgressEvent("loadend", {target:me}));
+            }
+        },
+        // Error callback
+        function(e) {
+            // If DONE (cancelled), then don't do anything
+            if (me._readyState === FileReader.DONE) {
+                return;
+            }
+
+            // DONE state
+            me._readyState = FileReader.DONE;
+
+            // null result
+            me._result = null;
+
+            // Save error
+            me._error = new FileError(e);
+
+            // If onerror callback
+            if (typeof me.onerror === "function") {
+                me.onerror(new ProgressEvent("error", {target:me}));
+            }
+
+            // If onloadend callback
+            if (typeof me.onloadend === "function") {
+                me.onloadend(new ProgressEvent("loadend", {target:me}));
+            }
+        }, "File", "readAsText", execArgs);
+};
+
+
+/**
+ * Read file and return data as a base64 encoded data url.
+ * A data url is of the form:
+ *      data:[<mediatype>][;base64],<data>
+ *
+ * @param file          {File} File object containing file properties
+ */
+FileReader.prototype.readAsDataURL = function(file) {
+    if (initRead(this, file)) {
+        return this._realReader.readAsDataURL(file);
+    }
+
+    var me = this;
+    var execArgs = [this._fileName, file.start, file.end];
+
+    // Read file
+    exec(
+        // Success callback
+        function(r) {
+            // If DONE (cancelled), then don't do anything
+            if (me._readyState === FileReader.DONE) {
+                return;
+            }
+
+            // DONE state
+            me._readyState = FileReader.DONE;
+
+            // Save result
+            me._result = r;
+
+            // If onload callback
+            if (typeof me.onload === "function") {
+                me.onload(new ProgressEvent("load", {target:me}));
+            }
+
+            // If onloadend callback
+            if (typeof me.onloadend === "function") {
+                me.onloadend(new ProgressEvent("loadend", {target:me}));
+            }
+        },
+        // Error callback
+        function(e) {
+            // If DONE (cancelled), then don't do anything
+            if (me._readyState === FileReader.DONE) {
+                return;
+            }
+
+            // DONE state
+            me._readyState = FileReader.DONE;
+
+            me._result = null;
+
+            // Save error
+            me._error = new FileError(e);
+
+            // If onerror callback
+            if (typeof me.onerror === "function") {
+                me.onerror(new ProgressEvent("error", {target:me}));
+            }
+
+            // If onloadend callback
+            if (typeof me.onloadend === "function") {
+                me.onloadend(new ProgressEvent("loadend", {target:me}));
+            }
+        }, "File", "readAsDataURL", execArgs);
+};
+
+/**
+ * Read file and return data as a binary data.
+ *
+ * @param file          {File} File object containing file properties
+ */
+FileReader.prototype.readAsBinaryString = function(file) {
+    if (initRead(this, file)) {
+        return this._realReader.readAsBinaryString(file);
+    }
+
+    var me = this;
+    var execArgs = [this._fileName, file.start, file.end];
+
+    // Read file
+    exec(
+        // Success callback
+        function(r) {
+            // If DONE (cancelled), then don't do anything
+            if (me._readyState === FileReader.DONE) {
+                return;
+            }
+
+            // DONE state
+            me._readyState = FileReader.DONE;
+
+            me._result = r;
+
+            // If onload callback
+            if (typeof me.onload === "function") {
+                me.onload(new ProgressEvent("load", {target:me}));
+            }
+
+            // If onloadend callback
+            if (typeof me.onloadend === "function") {
+                me.onloadend(new ProgressEvent("loadend", {target:me}));
+            }
+        },
+        // Error callback
+        function(e) {
+            // If DONE (cancelled), then don't do anything
+            if (me._readyState === FileReader.DONE) {
+                return;
+            }
+
+            // DONE state
+            me._readyState = FileReader.DONE;
+
+            me._result = null;
+
+            // Save error
+            me._error = new FileError(e);
+
+            // If onerror callback
+            if (typeof me.onerror === "function") {
+                me.onerror(new ProgressEvent("error", {target:me}));
+            }
+
+            // If onloadend callback
+            if (typeof me.onloadend === "function") {
+                me.onloadend(new ProgressEvent("loadend", {target:me}));
+            }
+        }, "File", "readAsBinaryString", execArgs);
+};
+
+/**
+ * Read file and return data as a binary data.
+ *
+ * @param file          {File} File object containing file properties
+ */
+FileReader.prototype.readAsArrayBuffer = function(file) {
+    if (initRead(this, file)) {
+        return this._realReader.readAsArrayBuffer(file);
+    }
+
+    var me = this;
+    var execArgs = [this._fileName, file.start, file.end];
+
+    // Read file
+    exec(
+        // Success callback
+        function(r) {
+            // If DONE (cancelled), then don't do anything
+            if (me._readyState === FileReader.DONE) {
+                return;
+            }
+
+            // DONE state
+            me._readyState = FileReader.DONE;
+
+            me._result = r;
+
+            // If onload callback
+            if (typeof me.onload === "function") {
+                me.onload(new ProgressEvent("load", {target:me}));
+            }
+
+            // If onloadend callback
+            if (typeof me.onloadend === "function") {
+                me.onloadend(new ProgressEvent("loadend", {target:me}));
+            }
+        },
+        // Error callback
+        function(e) {
+            // If DONE (cancelled), then don't do anything
+            if (me._readyState === FileReader.DONE) {
+                return;
+            }
+
+            // DONE state
+            me._readyState = FileReader.DONE;
+
+

<TRUNCATED>

[09/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_one/cordova/build
----------------------------------------------------------------------
diff --git a/spec/projects/android_one/cordova/build b/spec/projects/android_one/cordova/build
deleted file mode 100755
index 3cbd9c1..0000000
--- a/spec/projects/android_one/cordova/build
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-# 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.
-
-set -e
-
-CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash "$CORDOVA_PATH"/lib/cordova build "$@"

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_one/cordova/clean
----------------------------------------------------------------------
diff --git a/spec/projects/android_one/cordova/clean b/spec/projects/android_one/cordova/clean
deleted file mode 100755
index f52966a..0000000
--- a/spec/projects/android_one/cordova/clean
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-# 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.
-
-set -e
-
-CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash "$CORDOVA_PATH"/lib/cordova clean "$@"

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_one/cordova/lib/cordova
----------------------------------------------------------------------
diff --git a/spec/projects/android_one/cordova/lib/cordova b/spec/projects/android_one/cordova/lib/cordova
deleted file mode 100755
index be343e9..0000000
--- a/spec/projects/android_one/cordova/lib/cordova
+++ /dev/null
@@ -1,386 +0,0 @@
-#!/bin/bash
-#   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.
-
-PROJECT_PATH=$( cd "$( dirname "$0" )/../.." && pwd )
-
-function list_devices {
-    IFS=$'\n'
-    devices=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep -v 'emulator'`
-    device_list=($devices)
-    if [[ ${#device_list[@]} > 0 ]] ; then
-        for i in ${devices[@]}
-        do
-            # remove space and 'device'
-            echo ${i/[^a-zA-Z0-9._]device/}
-        done
-    else
-        echo "No devices found."
-        exit 2
-    fi
-}
-
-function list_started_emulators {
-    IFS=$'\n'
-    devices=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep 'emulator'`
-    emulator_list=($devices)
-    if [[ ${#emulator_list[@]} > 0 ]] ; then
-        for i in ${emulator_list[@]}
-        do
-            # remove space and 'device'
-            echo ${i/[^a-zA-Z0-9._]device/}
-        done
-    else
-        echo "No started emulators found, you can start an emulator by using the command"
-        echo " 'cordova/lib/start-emulator'"
-        exit 2
-    fi
-}
-
-function list_emulator_images {
-    emulator_images=`android list avds | grep "Name:" | cut -f 2 -d ":"`
-    emulator_list=($emulator_images)
-    if [[ ${#emulator_list[@]} > 0 ]] ; then
-        for i in ${emulator_list[@]}
-        do
-            echo ${i/[^a-zA-Z0-9._]/}
-        done
-    else
-        echo "No emulators found, if you would like to create an emulator follow the instructions"
-        echo " provided here : http://developer.android.com/tools/devices/index.html"
-        echo " Or run 'android create avd --name <name> --target <targetID>' in on the command line."
-        exit 2
-    fi
-}
-
-function start_emulator {
-    emulator_images=`android list avds | grep "Name:" | cut -f 2 -d ":"`
-    # if target emulator is provided
-    if [[ "$#" -eq 1 ]] ; then
-        # check that it exists
-        if [[ $emulator_images =~ $1 ]] ; then
-            #xterm -e emulator -avd $1 &
-            emulator -avd $1 1> /dev/null 2>&1 &
-        else
-            echo "Could not find the provided emulator, make sure the emulator exists"
-            echo " by checking 'cordova/lib/list-emulator-images'"
-            exit 2
-        fi
-    else
-        # start first emulator
-        emulator_list=($emulator_images)
-        if [[ ${#emulator_list[@]} > 0 ]] ; then
-            #xterm -e emulator -avd ${emulator_list[0]} &
-            emulator -avd ${emulator_list[0]/[^a-zA-Z0-9._]/} 1> /dev/null 2>&1 &
-        else
-            echo "No emulators found, if you would like to create an emulator follow the instructions"
-            echo " provided here : http://developer.android.com/tools/devices/index.html"
-            echo " Or run 'android create avd --name <name> --target <targetID>' in on the command line."
-            exit 2
-        fi
-    fi
-}
-
-function install_device {
-    IFS=$'\n'
-    devices=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep -v 'emulator'`
-    device_list=($devices)
-    if [[ ${#device_list[@]} > 0 ]] ; then
-        apks=`find $PROJECT_PATH/bin -type f -maxdepth 1 | egrep '\.apk$'`
-        apk_list=($apks)
-        if [[ ${#apk_list[@]} > 0 ]] ; then
-            local target
-            # handle target emulator
-            if [[ "$#" -eq 1 ]] ; then
-                # deploy to given target
-                target=${1/--target=/}
-            else
-                # delete trailing space and 'device' after device ID
-                target=${device_list[0]/[^a-zA-Z0-9._]device/}
-            fi
-            echo "Installing ${apk_list[0]} onto device $target..."
-            adb -s $target install -r ${apk_list[0]};
-            echo "Launching application..."
-            local launch_str=$(java -jar "$PROJECT_PATH"/cordova/appinfo.jar "$PROJECT_PATH"/AndroidManifest.xml)
-            adb -s $target shell am start -W -a android.intent.action.MAIN -n $launch_str
-        else
-            echo "Application package not found, could not install to device"
-            echo " make sure your application is built before deploying."
-            exit 2
-        fi
-    else
-        echo "No devices found to deploy to. Please make sure your device is connected"
-        echo " and you can view it using the 'cordova/lib/list-devices' command."
-        exit 2
-    fi
-}
-
-function install_emulator {
-    IFS=$'\n'
-    # check that there is an emulator to deploy to
-    emulator_string=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'emulator'`
-    emulator_list=($emulator_string)
-    if [[ ${#emulator_list[@]} > 0 ]] ; then
-        apks=`find $PROJECT_PATH/bin -type f -maxdepth 1 | egrep '\.apk$'`
-        apk_list=($apks)
-        if [[ ${#apk_list[@]} > 0 ]] ; then
-            local target
-            # handle target emulator
-            if [[ "$#" -eq 1 ]] ; then
-                # deploy to given target
-                target=${1/--target=/}
-            else
-                # delete trailing space and 'device' after emulator ID
-                target=${emulator_list[0]/[^a-zA-Z0-9._]device/}
-            fi
-            echo "Installing ${apk_list[0]} onto $target..."
-            adb -s $target install -r ${apk_list[0]};
-            echo "Launching application..."
-            local launch_str=$(java -jar "$PROJECT_PATH"/cordova/appinfo.jar "$PROJECT_PATH"/AndroidManifest.xml)
-            adb -s $target shell am start -W -a android.intent.action.MAIN -n $launch_str
-
-        else
-            echo "Application package not found, could not install to device"
-            echo " make sure your application is built before deploying."
-            exit 2
-        fi
-    else
-        echo "No emulators found to deploy to. Please make sure your emulator is started"
-        echo " and you can view it using the 'cordova/lib/list-started-emulators' command."
-        exit 2
-    fi
-}
-
-# cleans the project
-function clean {
-    echo "Cleaning project..."
-    ant clean
-}
-
-# has to be used independently and not in conjunction with other commands
-function log {
-    # filter out nativeGetEnabledTags spam from latest sdk bug.
-    adb logcat | grep -v nativeGetEnabledTags
-}
-
-
-function build {
-    if [[ "$#" -eq 1 ]] ; then
-        if [[ $1 == "--debug" ]] ; then
-            clean
-            ant debug -f "$PROJECT_PATH"/build.xml
-        elif [[ $1 == "--release" ]] ; then
-            clean
-            ant release -f "$PROJECT_PATH"/build.xml
-        elif [[ $1 == "--nobuild" ]] ; then
-            echo "Skipping build..."
-        else
-            echo "Error : Build command '$1' not recognized."
-            exit 2
-        fi
-    else
-        echo "Warning : [ --debug | --release | --nobuild ] not specified, defaulting to --debug"
-        clean
-        ant debug -f "$PROJECT_PATH"/build.xml
-    fi
-}
-
-
-function wait_for_emulator {
-    emulator_string=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep 'emulator'`
-    old_started=($emulator_string)
-    local new_started
-    local new_emulator_name
-    local i="0"
-    echo -n "Waiting for emulator..."
-    while [ $i -lt 300 ]
-    do
-        emulator_string=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep 'emulator'`
-        new_started=($emulator_string)
-        if [[ ${#new_started[@]} > ${#old_started[@]} && -z "$new_emulator_name" ]] ; then
-            # get the name of the started emulator
-            local count="0"
-            if [[ ${#old_started[@]} == 0 ]] ; then
-                new_emulator_name=${new_started[$count]/[^a-zA-Z0-9._]device/}
-            else
-                for count in {0...${#old_started[@]}}
-                do
-                    if [[ ! ${new_started[$count]} == ${old_started[$count]} ]] ; then
-                        new_emulator_name=${new_started[$count]/[^a-zA-Z0-9._]device/}
-                    fi
-                done
-                if [[ -z "$new_emulator_name" ]] ; then
-                    count=$[count+1]
-                    new_emulator_name=${new_started[$count]/[^a-zA-Z0-9._]device/}
-                fi
-            fi
-        elif [[ "$new_emulator_name" ]] ; then
-            boot_anim=`adb -s $new_emulator_name shell getprop init.svc.bootanim`
-            if [[ $boot_anim =~ "stopped" ]] ; then
-                break
-            else
-                sleep 1
-                i=$[i+1]
-                echo -n "."
-            fi
-        else
-            sleep 1
-            i=$[i+1]
-            echo -n "."
-        fi
-    done
-    # Device timeout: emulator has not started in time
-    if [ $i -eq 300 ]
-    then
-        echo "emulator timeout!"
-        exit 69
-    else
-        echo "connected!"
-    fi
-}
-
-function run {
-    IFS=$'\n'
-    if [[ "$#" -eq 2 ]] ; then
-        build $2
-        if [[ $1 == "--device" ]] ; then
-            install_device
-        elif [[ $1 == "--emulator" ]] ; then
-            install_emulator
-        elif [[ $1 =~ "--target=" ]]; then
-            install_device $1
-        else
-            echo "Error : '$1' is not recognized as an install option"
-        fi
-    elif [[ "$#" -eq 1 ]] ; then
-        if [[ $1 == "--debug" || $1 == "--release" || $1 == "--nobuild" ]] ; then
-            build $1
-        elif [[ $1 == "--device" ]] ; then
-            install_device
-        elif [[ $1 == "--emulator" ]] ; then
-            install_emulator
-        elif [[ $1 =~ "--target=" ]]; then
-            install_device $1
-        else
-            echo "Error : '$1' is not recognized as an install option"
-        fi
-    else
-        echo "Warning : [ --device | --emulate | --target=<targetID> ] not specified, using defaults."
-        build
-        devices=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep -v 'emulator'`
-        device_list=($devices)
-        emulator_string=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep 'emulator'`
-        emulator_list=($emulator_string)
-        if [[ ${#device_list[@]} > 0 ]] ; then
-            install_device
-        elif [[ ${#emulator_list[@]} > 0 ]] ; then
-            install_emulator
-        else
-            emulator_images=`android list avds | grep "Name:" | cut -f 2 -d ":"`
-            echo $emulator_images
-            emulator_image_list=($emulator_images)
-            if [[ ${#emulator_image_list[@]} > 0 ]] ; then
-                echo "Starting emulator : ${emulator_image_list[0]}" 
-                emulator -avd ${emulator_image_list[0]/[^.\w]/} 1> /dev/null 2>&1 &
-                wait_for_emulator
-                install_emulator
-            else
-                # TODO : look for emulator images and start one if it's available
-                echo "Error : there are no available devices or emulators to deploy to."
-                echo " create an emulator or connect your device to run this command."
-                echo "If you would like to create an emulator follow the instructions"
-                echo " provided here : http://developer.android.com/tools/devices/index.html"
-                echo " Or run 'android create avd --name <name> --target <targetID>' in on the command line."
-                exit 2
-            fi
-        fi
-    fi
-}
-
-# parse command line arguments
-
-if [[ $# > 3 ]] ; then 
-    echo "Error :  too many arguments."
-    exit 2
-elif [[ $# == 3 ]] ; then
-    if [[ $1 == "run" ]] ; then
-        run $2 $3
-    else
-        echo "Error : too many arguments for '$1'"
-        exit 2
-    fi
-elif [[ $# == 2 ]] ; then
-    if [[ $1 == "run" ]] ; then
-        if [[ $2 == "--emulator" || $2 == "--device" || $2 =~ "--target=" ]] ; then
-            run $2 ''
-        elif [[ $2 == "--debug" || $2 == "--release" || $2 == "--nobuild" ]] ; then
-            run '' $2
-        else 
-            echo "Error : '$2' is not recognized as a run option."
-            exit 2
-        fi
-    elif [[ $1 == "build" ]] ; then
-        build $2
-    elif [[ $1 == "start-emulator" ]] ; then
-        start_emulator $2
-    elif [[ $1 == "install-device" ]] ; then
-        if [[ $2 =~ "--target=" ]] ; then
-            install_device $2
-        else
-            echo "Error : '$2' is not recognized as an install option"
-            exit 2
-        fi
-    elif [[ $1 == "install-emulator" ]] ; then
-        if [[ $2 =~ "--target=" ]] ; then
-            install_emulator $2
-        else
-            echo "Error : '$2' is not recognized as an install option"
-            exit 2
-        fi
-    else
-        echo "Error : '$1' is not recognized as an option that takes arguments"
-        exit 2
-    fi
-elif [[ $# == 1 ]] ; then
-    if [[ $1 == "run" ]] ; then
-        run
-    elif [[ $1 == "build" ]]; then
-        build
-    elif [[ $1 == "clean" ]]; then
-        clean
-    elif [[ $1 == "log" ]]; then
-        log
-    elif [[ $1 == "list-devices" ]]; then
-        list_devices
-    elif [[ $1 == "list-emulator-images" ]]; then
-        list_emulator_images
-    elif [[ $1 == "list-started-emulators" ]]; then
-        list_started_emulators
-    elif [[ $1 == "install-device" ]]; then
-        install_device
-    elif [[ $1 == "install-emulator" ]]; then
-        install_emulator
-    elif [[ $1 == "start-emulator" ]]; then
-        start_emulator
-    else
-        echo "Error : '$1' is not recognized as a tooling command."
-        exit 2
-    fi
-else
-    echo "Error : No command received, exiting..."
-    exit 2
-fi
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_one/cordova/lib/install-device
----------------------------------------------------------------------
diff --git a/spec/projects/android_one/cordova/lib/install-device b/spec/projects/android_one/cordova/lib/install-device
deleted file mode 100755
index 604b5ae..0000000
--- a/spec/projects/android_one/cordova/lib/install-device
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-# 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.
-
-set -e
-
-CORDOVA_LIB_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash "$CORDOVA_LIB_PATH"/cordova install-device "$@"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_one/cordova/lib/install-emulator
----------------------------------------------------------------------
diff --git a/spec/projects/android_one/cordova/lib/install-emulator b/spec/projects/android_one/cordova/lib/install-emulator
deleted file mode 100755
index 105e2ee..0000000
--- a/spec/projects/android_one/cordova/lib/install-emulator
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-# 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.
-
-set -e
-
-CORDOVA_LIB_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash "$CORDOVA_LIB_PATH"/cordova install-emulator "$@"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_one/cordova/lib/list-devices
----------------------------------------------------------------------
diff --git a/spec/projects/android_one/cordova/lib/list-devices b/spec/projects/android_one/cordova/lib/list-devices
deleted file mode 100755
index 7a5b2f5..0000000
--- a/spec/projects/android_one/cordova/lib/list-devices
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-# 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.
-
-set -e
-
-CORDOVA_LIB_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash "$CORDOVA_LIB_PATH"/cordova list-devices
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_one/cordova/lib/list-emulator-images
----------------------------------------------------------------------
diff --git a/spec/projects/android_one/cordova/lib/list-emulator-images b/spec/projects/android_one/cordova/lib/list-emulator-images
deleted file mode 100755
index db8e563..0000000
--- a/spec/projects/android_one/cordova/lib/list-emulator-images
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-# 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.
-
-set -e
-
-CORDOVA_LIB_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash "$CORDOVA_LIB_PATH"/cordova list-emulator-images
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_one/cordova/lib/list-started-emulators
----------------------------------------------------------------------
diff --git a/spec/projects/android_one/cordova/lib/list-started-emulators b/spec/projects/android_one/cordova/lib/list-started-emulators
deleted file mode 100755
index 7911763..0000000
--- a/spec/projects/android_one/cordova/lib/list-started-emulators
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-# 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.
-
-set -e
-
-CORDOVA_LIB_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash "$CORDOVA_LIB_PATH"/cordova list-started-emulators
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_one/cordova/lib/start-emulator
----------------------------------------------------------------------
diff --git a/spec/projects/android_one/cordova/lib/start-emulator b/spec/projects/android_one/cordova/lib/start-emulator
deleted file mode 100755
index 8e8964d..0000000
--- a/spec/projects/android_one/cordova/lib/start-emulator
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-# 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.
-
-set -e
-
-CORDOVA_LIB_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash "$CORDOVA_LIB_PATH"/cordova start-emulator "$@"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_one/cordova/log
----------------------------------------------------------------------
diff --git a/spec/projects/android_one/cordova/log b/spec/projects/android_one/cordova/log
deleted file mode 100755
index 01fe107..0000000
--- a/spec/projects/android_one/cordova/log
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-# 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.
-
-set -e
-
-CORDOVA_PATH=$( cd "$( dirname "$0" )/.." && pwd )
-
-bash "$CORDOVA_PATH"/cordova/lib/cordova log "$@"

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_one/cordova/run
----------------------------------------------------------------------
diff --git a/spec/projects/android_one/cordova/run b/spec/projects/android_one/cordova/run
deleted file mode 100755
index ec352b0..0000000
--- a/spec/projects/android_one/cordova/run
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-# 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.
-
-set -e
-
-CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash "$CORDOVA_PATH"/lib/cordova run "$@"

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_one/cordova/version
----------------------------------------------------------------------
diff --git a/spec/projects/android_one/cordova/version b/spec/projects/android_one/cordova/version
deleted file mode 100755
index 5760e95..0000000
--- a/spec/projects/android_one/cordova/version
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-# 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.
-
-set -e
-
-CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P)
-PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
-
-VERSION_FILE_PATH="$PROJECT_PATH/assets/www/cordova.js"
-
-if [ -f "$VERSION_FILE_PATH" ]; then
-    JSVersion=$(sed -n '2,2p' $VERSION_FILE_PATH)
-    echo $JSVersion | sed -e 's/\/\/ //'| cut -f 1 -d '-'
-else
-    echo "The file \"$VERSION_FILE_PATH\" does not exist."
-    exit 1
-fi

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_one/res/xml/plugins.xml
----------------------------------------------------------------------
diff --git a/spec/projects/android_one/res/xml/plugins.xml b/spec/projects/android_one/res/xml/plugins.xml
deleted file mode 100644
index 9cee85e..0000000
--- a/spec/projects/android_one/res/xml/plugins.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugins>
-    <plugin name="App" value="com.phonegap.App"/>
-    <plugin name="Geolocation" value="com.phonegap.GeoBroker"/>
-    <plugin name="Device" value="com.phonegap.Device"/>
-    <plugin name="Accelerometer" value="com.phonegap.AccelListener"/>
-    <plugin name="Compass" value="com.phonegap.CompassListener"/>
-    <plugin name="Media" value="com.phonegap.AudioHandler"/>
-    <plugin name="Camera" value="com.phonegap.CameraLauncher"/>
-    <plugin name="Contacts" value="com.phonegap.ContactManager"/>
-    <plugin name="Crypto" value="com.phonegap.CryptoHandler"/>
-    <plugin name="File" value="com.phonegap.FileUtils"/>
-    <plugin name="Network Status" value="com.phonegap.NetworkManager"/>
-    <plugin name="Notification" value="com.phonegap.Notification"/>
-    <plugin name="Storage" value="com.phonegap.Storage"/>
-    <plugin name="Temperature" value="com.phonegap.TempListener"/>
-    <plugin name="FileTransfer" value="com.phonegap.FileTransfer"/>
-    <plugin name="Capture" value="com.phonegap.Capture"/>
-</plugins>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_one/src/.gitkeep
----------------------------------------------------------------------
diff --git a/spec/projects/android_one/src/.gitkeep b/spec/projects/android_one/src/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_two/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/spec/projects/android_two/AndroidManifest.xml b/spec/projects/android_two/AndroidManifest.xml
deleted file mode 100644
index 0c52803..0000000
--- a/spec/projects/android_two/AndroidManifest.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
-      package="com.alunny.childapp" android:versionName="1.1" android:versionCode="5">
-    <supports-screens
-    	android:largeScreens="true"
-    	android:normalScreens="true"
-    	android:smallScreens="true"
-    	android:xlargeScreens="true"
-    	android:resizeable="true"
-    	android:anyDensity="true"
-    	/>
-
-    <uses-permission android:name="android.permission.CAMERA" />
-    <uses-permission android:name="android.permission.VIBRATE" />
-    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
-    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
-    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
-    <uses-permission android:name="android.permission.INTERNET" />
-    <uses-permission android:name="android.permission.RECEIVE_SMS" />
-    <uses-permission android:name="android.permission.RECORD_AUDIO" />
-    <uses-permission android:name="android.permission.RECORD_VIDEO"/>
-    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
-    <uses-permission android:name="android.permission.READ_CONTACTS" />
-    <uses-permission android:name="android.permission.WRITE_CONTACTS" />   
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />   
-    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
-    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
-    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
-
-    <uses-feature android:name="android.hardware.camera" />
-    <uses-feature android:name="android.hardware.camera.autofocus" />
-
-    <application android:icon="@drawable/icon" android:label="@string/app_name"
-    	android:debuggable="true">
-		<activity android:name="ChildApp" android:label="@string/app_name" 
-				  android:configChanges="orientation|keyboardHidden">
-			<intent-filter>
-				<action android:name="android.intent.action.MAIN" />
-				<category android:name="android.intent.category.LAUNCHER" />
-			</intent-filter>
-        </activity>
-        <activity android:name="com.phonegap.DroidGap" android:label="@string/app_name" 
-            	  android:configChanges="orientation|keyboardHidden">
-        	<intent-filter>
-        	</intent-filter>
-        </activity>
-    </application>
-
-	<uses-sdk android:minSdkVersion="5" />
-</manifest> 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_two/assets/www/.gitkeep
----------------------------------------------------------------------
diff --git a/spec/projects/android_two/assets/www/.gitkeep b/spec/projects/android_two/assets/www/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_two/res/xml/config.xml
----------------------------------------------------------------------
diff --git a/spec/projects/android_two/res/xml/config.xml b/spec/projects/android_two/res/xml/config.xml
deleted file mode 100644
index d37aba5..0000000
--- a/spec/projects/android_two/res/xml/config.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-       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.
--->
-<cordova>
-    <!--
-    access elements control the Android whitelist.
-    Domains are assumed blocked unless set otherwise
-     -->
-
-    <access origin="http://127.0.0.1*"/> <!-- allow local pages -->
-
-    <!-- <access origin="https://example.com" /> allow any secure requests to example.com -->
-    <!-- <access origin="https://example.com" subdomains="true" /> such as above, but including subdomains, such as www -->
-    <!-- <access origin=".*"/> Allow all domains, suggested development use only -->
-
-    <log level="DEBUG"/>
-    <preference name="useBrowserHistory" value="false" />
-<plugins>
-    <plugin name="App" value="org.apache.cordova.App"/>
-    <plugin name="Geolocation" value="org.apache.cordova.GeoBroker"/>
-    <plugin name="Device" value="org.apache.cordova.Device"/>
-    <plugin name="Accelerometer" value="org.apache.cordova.AccelListener"/>
-    <plugin name="Compass" value="org.apache.cordova.CompassListener"/>
-    <plugin name="Media" value="org.apache.cordova.AudioHandler"/>
-    <plugin name="Camera" value="org.apache.cordova.CameraLauncher"/>
-    <plugin name="Contacts" value="org.apache.cordova.ContactManager"/>
-    <plugin name="File" value="org.apache.cordova.FileUtils"/>
-    <plugin name="NetworkStatus" value="org.apache.cordova.NetworkManager"/>
-    <plugin name="Notification" value="org.apache.cordova.Notification"/>
-    <plugin name="Storage" value="org.apache.cordova.Storage"/>
-    <plugin name="Temperature" value="org.apache.cordova.TempListener"/>
-    <plugin name="FileTransfer" value="org.apache.cordova.FileTransfer"/>
-    <plugin name="Capture" value="org.apache.cordova.Capture"/>
-    <plugin name="Battery" value="org.apache.cordova.BatteryListener"/>
-    <plugin name="SplashScreen" value="org.apache.cordova.SplashScreen"/>
-</plugins>
-</cordova>
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_two/src/.gitkeep
----------------------------------------------------------------------
diff --git a/spec/projects/android_two/src/.gitkeep b/spec/projects/android_two/src/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_two_no_perms/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/spec/projects/android_two_no_perms/AndroidManifest.xml b/spec/projects/android_two_no_perms/AndroidManifest.xml
deleted file mode 100644
index 6e4b480..0000000
--- a/spec/projects/android_two_no_perms/AndroidManifest.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
-      package="com.alunny.childapp" android:versionName="1.1" android:versionCode="5">
-    <supports-screens
-    	android:largeScreens="true"
-    	android:normalScreens="true"
-    	android:smallScreens="true"
-    	android:xlargeScreens="true"
-    	android:resizeable="true"
-    	android:anyDensity="true"
-    	/>
-
-    <application android:icon="@drawable/icon" android:label="@string/app_name"
-    	android:debuggable="true">
-		<activity android:name="ChildApp" android:label="@string/app_name" 
-				  android:configChanges="orientation|keyboardHidden">
-			<intent-filter>
-				<action android:name="android.intent.action.MAIN" />
-				<category android:name="android.intent.category.LAUNCHER" />
-			</intent-filter>
-        </activity>
-        <activity android:name="com.phonegap.DroidGap" android:label="@string/app_name" 
-            	  android:configChanges="orientation|keyboardHidden">
-        	<intent-filter>
-        	</intent-filter>
-        </activity>
-    </application>
-
-	<uses-sdk android:minSdkVersion="5" />
-</manifest> 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_two_no_perms/assets/www/.gitkeep
----------------------------------------------------------------------
diff --git a/spec/projects/android_two_no_perms/assets/www/.gitkeep b/spec/projects/android_two_no_perms/assets/www/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_two_no_perms/res/xml/config.xml
----------------------------------------------------------------------
diff --git a/spec/projects/android_two_no_perms/res/xml/config.xml b/spec/projects/android_two_no_perms/res/xml/config.xml
deleted file mode 100644
index d37aba5..0000000
--- a/spec/projects/android_two_no_perms/res/xml/config.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-       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.
--->
-<cordova>
-    <!--
-    access elements control the Android whitelist.
-    Domains are assumed blocked unless set otherwise
-     -->
-
-    <access origin="http://127.0.0.1*"/> <!-- allow local pages -->
-
-    <!-- <access origin="https://example.com" /> allow any secure requests to example.com -->
-    <!-- <access origin="https://example.com" subdomains="true" /> such as above, but including subdomains, such as www -->
-    <!-- <access origin=".*"/> Allow all domains, suggested development use only -->
-
-    <log level="DEBUG"/>
-    <preference name="useBrowserHistory" value="false" />
-<plugins>
-    <plugin name="App" value="org.apache.cordova.App"/>
-    <plugin name="Geolocation" value="org.apache.cordova.GeoBroker"/>
-    <plugin name="Device" value="org.apache.cordova.Device"/>
-    <plugin name="Accelerometer" value="org.apache.cordova.AccelListener"/>
-    <plugin name="Compass" value="org.apache.cordova.CompassListener"/>
-    <plugin name="Media" value="org.apache.cordova.AudioHandler"/>
-    <plugin name="Camera" value="org.apache.cordova.CameraLauncher"/>
-    <plugin name="Contacts" value="org.apache.cordova.ContactManager"/>
-    <plugin name="File" value="org.apache.cordova.FileUtils"/>
-    <plugin name="NetworkStatus" value="org.apache.cordova.NetworkManager"/>
-    <plugin name="Notification" value="org.apache.cordova.Notification"/>
-    <plugin name="Storage" value="org.apache.cordova.Storage"/>
-    <plugin name="Temperature" value="org.apache.cordova.TempListener"/>
-    <plugin name="FileTransfer" value="org.apache.cordova.FileTransfer"/>
-    <plugin name="Capture" value="org.apache.cordova.Capture"/>
-    <plugin name="Battery" value="org.apache.cordova.BatteryListener"/>
-    <plugin name="SplashScreen" value="org.apache.cordova.SplashScreen"/>
-</plugins>
-</cordova>
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_two_no_perms/src/.gitkeep
----------------------------------------------------------------------
diff --git a/spec/projects/android_two_no_perms/src/.gitkeep b/spec/projects/android_two_no_perms/src/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_uninstall/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/spec/projects/android_uninstall/AndroidManifest.xml b/spec/projects/android_uninstall/AndroidManifest.xml
deleted file mode 100644
index b5fea9d..0000000
--- a/spec/projects/android_uninstall/AndroidManifest.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<manifest android:versionCode="5" android:versionName="1.1" android:windowSoftInputMode="adjustPan" package="cordova.test.uninstall" xmlns:android="http://schemas.android.com/apk/res/android">
-    <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
-    <application android:debuggable="true" android:icon="@drawable/icon" android:label="@string/app_name">
-        <activity android:configChanges="orientation|keyboardHidden" android:label="@string/app_name" android:name="ChildApp">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-        <activity android:configChanges="orientation|keyboardHidden" android:label="@string/app_name" android:name="com.phonegap.DroidGap">
-            <intent-filter>
-            </intent-filter>
-        </activity>
-        <activity android:label="@string/app_name" android:name="com.phonegap.plugins.dummyplugin.DummyPlugin">
-            <intent-filter />
-        </activity>
-    </application>
-    <uses-sdk android:minSdkVersion="5" />
-</manifest>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_uninstall/cordova/version
----------------------------------------------------------------------
diff --git a/spec/projects/android_uninstall/cordova/version b/spec/projects/android_uninstall/cordova/version
deleted file mode 100644
index 01f68fd..0000000
--- a/spec/projects/android_uninstall/cordova/version
+++ /dev/null
@@ -1 +0,0 @@
-echo 9.0.0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/android_uninstall/cordova/version.bat
----------------------------------------------------------------------
diff --git a/spec/projects/android_uninstall/cordova/version.bat b/spec/projects/android_uninstall/cordova/version.bat
deleted file mode 100644
index c637d7c..0000000
--- a/spec/projects/android_uninstall/cordova/version.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-@ECHO OFF
-echo 9.0.0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/blackberry10/native/device/chrome/.gitkeep
----------------------------------------------------------------------
diff --git a/spec/projects/blackberry10/native/device/chrome/.gitkeep b/spec/projects/blackberry10/native/device/chrome/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/blackberry10/native/device/plugins/jnext/auth.txt
----------------------------------------------------------------------
diff --git a/spec/projects/blackberry10/native/device/plugins/jnext/auth.txt b/spec/projects/blackberry10/native/device/plugins/jnext/auth.txt
deleted file mode 100644
index 0983f4f..0000000
--- a/spec/projects/blackberry10/native/device/plugins/jnext/auth.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-local:/// *
-file:// *
-http:// *
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/blackberry10/native/simulator/chrome/.gitkeep
----------------------------------------------------------------------
diff --git a/spec/projects/blackberry10/native/simulator/chrome/.gitkeep b/spec/projects/blackberry10/native/simulator/chrome/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/blackberry10/native/simulator/plugins/jnext/auth.txt
----------------------------------------------------------------------
diff --git a/spec/projects/blackberry10/native/simulator/plugins/jnext/auth.txt b/spec/projects/blackberry10/native/simulator/plugins/jnext/auth.txt
deleted file mode 100644
index 0983f4f..0000000
--- a/spec/projects/blackberry10/native/simulator/plugins/jnext/auth.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-local:/// *
-file:// *
-http:// *
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/blackberry10/www/config.xml
----------------------------------------------------------------------
diff --git a/spec/projects/blackberry10/www/config.xml b/spec/projects/blackberry10/www/config.xml
deleted file mode 100644
index 1dc8fe8..0000000
--- a/spec/projects/blackberry10/www/config.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-       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.
--->
-<!--
-  Widget Configuration Reference:
-    http://docs.blackberry.com/en/developers/deliverables/15274/
--->
-
-<widget xmlns="http://www.w3.org/ns/widgets"
-        xmlns:rim="http://www.blackberry.com/ns/widgets"
-  version="1.0.0.0" id="cordovaExample">
-
-  <name>cordovaExample</name>
-
-  <author>Your Name Here</author>
-
-  <description>
-       A sample Apache Cordova application that responds to the deviceready event.
-  </description>
-    
-  <license href="http://opensource.org/licenses/alphabetical">
-  </license>
-
-  <!-- Cordova API -->
-  <feature id="blackberry.system" required="true" version="1.0.0.0" />
-  <feature id="org.apache.cordova" required="true" version="1.0.0" />
-  <feature id="blackberry.find" required="true" version="1.0.0.0" />
-  <feature id="blackberry.identity" required="true" version="1.0.0.0" />
-  <feature id="blackberry.identity.phone" required="true" version="1.0.0.0" />
-  <feature id="blackberry.pim.Address" required="true" version="1.0.0.0" />
-  <feature id="blackberry.pim.Contact" required="true" version="1.0.0.0" />
-  <feature id="blackberry.io.file" required="true" version="1.0.0.0" />
-  <feature id="blackberry.utils" required="true" version="1.0.0.0" />
-  <feature id="blackberry.io.dir" required="true" version="1.0.0.0" />
-  <feature id="blackberry.app" required="true" version="1.0.0.0" />
-  <feature id="blackberry.app.event" required="true" version="1.0.0.0" />
-  <feature id="blackberry.system.event" required="true" version="1.0.0.0"/>
-  <feature id="blackberry.widgetcache" required="true" version="1.0.0.0"/>
-  <feature id="blackberry.media.camera" />
-  <feature id="blackberry.ui.dialog" />
-  <feature id="blackberry.connection" />
-  <feature id="blackberry.bbm.platform" />
-  <feature id="blackberry.invoke.card" />
-  <feature id="blackberry.pim.contacts" />
-  <feature id="blackberry.ui.contextmenu" />
-  <feature id="blackberry.io.filetransfer" />
-  <feature id="blackberry.io" />
-  <feature id="blackberry.invoke" />
-  <feature id="blackberry.invoked" />
-  <feature id="blackberry.push" />
-  <feature id="blackberry.media.microphone" required="true" version="1.0.0.0"/>
-  
-  <!-- Cordova API -->
-  <access subdomains="true" uri="file:///store/home" />
-  <access subdomains="true" uri="file:///SDCard" />
-
-  <!-- Expose access to all URIs, including the file and http protocols -->
-  <access subdomains="true" uri="*" />
-
-  
-  <icon rim:hover="false" src="res/icon/blackberry/icon-80.png" />
-  <icon rim:hover="true" src="res/icon/blackberry/icon-80.png" />
-
-  <rim:loadingScreen backgroundColor="#CFCFCF"
-                     foregroundImage="res/screen/blackberry/screen-225.png"
-                     onFirstLaunch="true">
-    <rim:transitionEffect type="fadeOut" />
-  </rim:loadingScreen>
-
-  <content src="index.html" />
-
-  <rim:permissions>
-    <rim:permit>use_camera</rim:permit>
-    <rim:permit>read_device_identifying_information</rim:permit>
-    <rim:permit>access_shared</rim:permit>
-    <rim:permit>read_geolocation</rim:permit>
-    <rim:permit>record_audio</rim:permit> 
-    <rim:permit>access_pimdomain_contacts</rim:permit> 
-  </rim:permissions>
-
-</widget>


[06/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/ios-plist/SampleApp.xcodeproj/project.orig.pbxproj
----------------------------------------------------------------------
diff --git a/spec/projects/ios-plist/SampleApp.xcodeproj/project.orig.pbxproj b/spec/projects/ios-plist/SampleApp.xcodeproj/project.orig.pbxproj
deleted file mode 100644
index a4d87f9..0000000
--- a/spec/projects/ios-plist/SampleApp.xcodeproj/project.orig.pbxproj
+++ /dev/null
@@ -1,498 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A463F14DB0A1B007FEAC7 /* Foundation.framework */; };
-		571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464114DB0A1B007FEAC7 /* UIKit.framework */; };
-		571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */; };
-		571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464514DB0A1B007FEAC7 /* AddressBook.framework */; };
-		571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */; };
-		571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */; };
-		571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */; };
-		571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */; };
-		571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */; };
-		571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465114DB0A1B007FEAC7 /* QuartzCore.framework */; };
-		571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */; };
-		571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */; };
-		571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465714DB0A1B007FEAC7 /* CoreMedia.framework */; };
-		571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */; };
-		571A466014DB0A1B007FEAC7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A465F14DB0A1B007FEAC7 /* main.m */; };
-		571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A466214DB0A1B007FEAC7 /* PhoneGap.framework */; };
-		571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466614DB0A1B007FEAC7 /* Localizable.strings */; };
-		571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466A14DB0A1B007FEAC7 /* Localizable.strings */; };
-		571A466F14DB0A1B007FEAC7 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A466E14DB0A1B007FEAC7 /* icon.png */; };
-		571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467014DB0A1B007FEAC7 /* icon@2x.png */; };
-		571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467214DB0A1B007FEAC7 /* icon-72.png */; };
-		571A467614DB0A1B007FEAC7 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467514DB0A1B007FEAC7 /* Default.png */; };
-		571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467714DB0A1B007FEAC7 /* Default@2x.png */; };
-		571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 571A467914DB0A1B007FEAC7 /* Capture.bundle */; };
-		571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */ = {isa = PBXBuildFile; fileRef = 571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */; };
-		571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A467F14DB0A1B007FEAC7 /* AppDelegate.m */; };
-		571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A468214DB0A1B007FEAC7 /* MainViewController.m */; };
-		571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 571A468414DB0A1B007FEAC7 /* MainViewController.xib */; };
-		577FC36614DB0B620082BA7B /* www in Resources */ = {isa = PBXBuildFile; fileRef = 577FC36514DB0B620082BA7B /* www */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
-		571A463B14DB0A1B007FEAC7 /* ChildApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChildApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		571A463F14DB0A1B007FEAC7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-		571A464114DB0A1B007FEAC7 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
-		571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
-		571A464514DB0A1B007FEAC7 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
-		571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
-		571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
-		571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
-		571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
-		571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
-		571A465114DB0A1B007FEAC7 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
-		571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
-		571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
-		571A465714DB0A1B007FEAC7 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
-		571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ChildApp-Info.plist"; sourceTree = "<group>"; };
-		571A465D14DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		571A465F14DB0A1B007FEAC7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
-		571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ChildApp-Prefix.pch"; sourceTree = "<group>"; };
-		571A466214DB0A1B007FEAC7 /* PhoneGap.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PhoneGap.framework; path = /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework; sourceTree = "<absolute>"; };
-		571A466714DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/Localizable.strings; sourceTree = "<group>"; };
-		571A466B14DB0A1B007FEAC7 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Resources/es.lproj/Localizable.strings; sourceTree = "<group>"; };
-		571A466E14DB0A1B007FEAC7 /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon.png; path = Resources/icons/icon.png; sourceTree = "<group>"; };
-		571A467014DB0A1B007FEAC7 /* icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon@2x.png"; path = "Resources/icons/icon@2x.png"; sourceTree = "<group>"; };
-		571A467214DB0A1B007FEAC7 /* icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon-72.png"; path = "Resources/icons/icon-72.png"; sourceTree = "<group>"; };
-		571A467514DB0A1B007FEAC7 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/splash/Default.png; sourceTree = "<group>"; };
-		571A467714DB0A1B007FEAC7 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "Resources/splash/Default@2x.png"; sourceTree = "<group>"; };
-		571A467914DB0A1B007FEAC7 /* Capture.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Capture.bundle; path = Resources/Capture.bundle; sourceTree = "<group>"; };
-		571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = PhoneGap.plist; sourceTree = "<group>"; };
-		571A467E14DB0A1B007FEAC7 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Classes/AppDelegate.h; sourceTree = "<group>"; };
-		571A467F14DB0A1B007FEAC7 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Classes/AppDelegate.m; sourceTree = "<group>"; };
-		571A468114DB0A1B007FEAC7 /* MainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainViewController.h; path = Classes/MainViewController.h; sourceTree = "<group>"; };
-		571A468214DB0A1B007FEAC7 /* MainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = Classes/MainViewController.m; sourceTree = "<group>"; };
-		571A468414DB0A1B007FEAC7 /* MainViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainViewController.xib; path = Classes/MainViewController.xib; sourceTree = "<group>"; };
-		571A468714DB0A1B007FEAC7 /* README */ = {isa = PBXFileReference; lastKnownFileType = text; name = README; path = Plugins/README; sourceTree = "<group>"; };
-		577FC36514DB0B620082BA7B /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		571A463514DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */,
-				571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */,
-				571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */,
-				571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */,
-				571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */,
-				571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */,
-				571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */,
-				571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */,
-				571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */,
-				571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */,
-				571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */,
-				571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */,
-				571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */,
-				571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		571A463814DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		571A462D14DB0A1A007FEAC7 = {
-			isa = PBXGroup;
-			children = (
-				577FC36514DB0B620082BA7B /* www */,
-				571A465914DB0A1B007FEAC7 /* ChildApp */,
-				571A463E14DB0A1B007FEAC7 /* Frameworks */,
-				571A463C14DB0A1B007FEAC7 /* Products */,
-			);
-			sourceTree = "<group>";
-		};
-		571A463C14DB0A1B007FEAC7 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				571A463B14DB0A1B007FEAC7 /* ChildApp.app */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		571A463E14DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				571A463F14DB0A1B007FEAC7 /* Foundation.framework */,
-				571A464114DB0A1B007FEAC7 /* UIKit.framework */,
-				571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */,
-				571A464514DB0A1B007FEAC7 /* AddressBook.framework */,
-				571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */,
-				571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */,
-				571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */,
-				571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */,
-				571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */,
-				571A465114DB0A1B007FEAC7 /* QuartzCore.framework */,
-				571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */,
-				571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */,
-				571A465714DB0A1B007FEAC7 /* CoreMedia.framework */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
-		571A465914DB0A1B007FEAC7 /* ChildApp */ = {
-			isa = PBXGroup;
-			children = (
-				571A466214DB0A1B007FEAC7 /* PhoneGap.framework */,
-				571A466414DB0A1B007FEAC7 /* Resources */,
-				571A467D14DB0A1B007FEAC7 /* Classes */,
-				571A468614DB0A1B007FEAC7 /* Plugins */,
-				571A465A14DB0A1B007FEAC7 /* Supporting Files */,
-			);
-			path = ChildApp;
-			sourceTree = "<group>";
-		};
-		571A465A14DB0A1B007FEAC7 /* Supporting Files */ = {
-			isa = PBXGroup;
-			children = (
-				571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */,
-				571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */,
-				571A465F14DB0A1B007FEAC7 /* main.m */,
-				571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */,
-				571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */,
-				571A468414DB0A1B007FEAC7 /* MainViewController.xib */,
-			);
-			name = "Supporting Files";
-			sourceTree = "<group>";
-		};
-		571A466414DB0A1B007FEAC7 /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				571A467914DB0A1B007FEAC7 /* Capture.bundle */,
-				571A466514DB0A1B007FEAC7 /* en.lproj */,
-				571A466914DB0A1B007FEAC7 /* es.lproj */,
-				571A466D14DB0A1B007FEAC7 /* icons */,
-				571A467414DB0A1B007FEAC7 /* splash */,
-			);
-			name = Resources;
-			sourceTree = "<group>";
-		};
-		571A466514DB0A1B007FEAC7 /* en.lproj */ = {
-			isa = PBXGroup;
-			children = (
-				571A466614DB0A1B007FEAC7 /* Localizable.strings */,
-			);
-			name = en.lproj;
-			sourceTree = "<group>";
-		};
-		571A466914DB0A1B007FEAC7 /* es.lproj */ = {
-			isa = PBXGroup;
-			children = (
-				571A466A14DB0A1B007FEAC7 /* Localizable.strings */,
-			);
-			name = es.lproj;
-			sourceTree = "<group>";
-		};
-		571A466D14DB0A1B007FEAC7 /* icons */ = {
-			isa = PBXGroup;
-			children = (
-				571A466E14DB0A1B007FEAC7 /* icon.png */,
-				571A467014DB0A1B007FEAC7 /* icon@2x.png */,
-				571A467214DB0A1B007FEAC7 /* icon-72.png */,
-			);
-			name = icons;
-			sourceTree = "<group>";
-		};
-		571A467414DB0A1B007FEAC7 /* splash */ = {
-			isa = PBXGroup;
-			children = (
-				571A467514DB0A1B007FEAC7 /* Default.png */,
-				571A467714DB0A1B007FEAC7 /* Default@2x.png */,
-			);
-			name = splash;
-			sourceTree = "<group>";
-		};
-		571A467D14DB0A1B007FEAC7 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-				571A467E14DB0A1B007FEAC7 /* AppDelegate.h */,
-				571A467F14DB0A1B007FEAC7 /* AppDelegate.m */,
-				571A468114DB0A1B007FEAC7 /* MainViewController.h */,
-				571A468214DB0A1B007FEAC7 /* MainViewController.m */,
-			);
-			name = Classes;
-			sourceTree = "<group>";
-		};
-		571A468614DB0A1B007FEAC7 /* Plugins */ = {
-			isa = PBXGroup;
-			children = (
-				571A468714DB0A1B007FEAC7 /* README */,
-			);
-			name = Plugins;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		571A463A14DB0A1B007FEAC7 /* ChildApp */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */;
-			buildPhases = (
-				571A463414DB0A1B007FEAC7 /* Sources */,
-				571A463514DB0A1B007FEAC7 /* Frameworks */,
-				571A463614DB0A1B007FEAC7 /* Resources */,
-				571A463714DB0A1B007FEAC7 /* Sources */,
-				571A463814DB0A1B007FEAC7 /* Frameworks */,
-				571A463914DB0A1B007FEAC7 /* ShellScript */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = ChildApp;
-			productName = ChildApp;
-			productReference = 571A463B14DB0A1B007FEAC7 /* ChildApp.app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		571A462F14DB0A1A007FEAC7 /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastUpgradeCheck = 0420;
-			};
-			buildConfigurationList = 571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 0;
-			knownRegions = (
-				en,
-				es,
-			);
-			mainGroup = 571A462D14DB0A1A007FEAC7;
-			productRefGroup = 571A463C14DB0A1B007FEAC7 /* Products */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				571A463A14DB0A1B007FEAC7 /* ChildApp */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		571A463614DB0A1B007FEAC7 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */,
-				571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */,
-				571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */,
-				571A466F14DB0A1B007FEAC7 /* icon.png in Resources */,
-				571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */,
-				571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */,
-				571A467614DB0A1B007FEAC7 /* Default.png in Resources */,
-				571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */,
-				571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */,
-				571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */,
-				571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */,
-				577FC36614DB0B620082BA7B /* www in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
-		571A463914DB0A1B007FEAC7 /* ShellScript */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/bash;
-			shellScript = "\n\t\t\t\t\t\t\t\tif [ ! -d \"$PROJECT_DIR/www\" ] ; then\n\t\t\t\t\t\t\t\t\tcp -R /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework/www \"$PROJECT_DIR\"\n\t\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\t\t# detect www folder reference in project, if missing, print warning\n\t\t\t\t\t\t\t\tgrep \"{isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = \\\"<group>\\\"; };\" \"$PROJECT_DIR/$PROJECT_NAME.xcodeproj/project.pbxproj\"\n\t\t\t\t\t\t\t\trc=$? \n\t\t\t\t\t\t\t\tif [ $rc != 0 ] ; then\n\t\t\t\t\t\t\t\techo -e \"warning: Missing - Add $PROJECT_DIR/www as a folder reference in your project. Just drag and drop the folder into your project, into the Project Navigator of Xcode 4. Make sure you select the second radio-button: 'Create folder references for any added folders' (which will create a blue folder)\" 1>&2\n\t\t\t\t\t\t\t\tfi\t\t\t\t\t\t\t";
-		};
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		571A463414DB0A1B007FEAC7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A466014DB0A1B007FEAC7 /* main.m in Sources */,
-				571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */,
-				571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		571A463714DB0A1B007FEAC7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A465D14DB0A1B007FEAC7 /* en */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "<group>";
-		};
-		571A466614DB0A1B007FEAC7 /* Localizable.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A466714DB0A1B007FEAC7 /* en */,
-			);
-			name = Localizable.strings;
-			sourceTree = "<group>";
-		};
-		571A466A14DB0A1B007FEAC7 /* Localizable.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A466B14DB0A1B007FEAC7 /* es */,
-			);
-			name = Localizable.strings;
-			sourceTree = "<group>";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		571A468814DB0A1B007FEAC7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
-				CLANG_ENABLE_OBJC_ARC = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = NO;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				GCC_VERSION = com.apple.compilers.llvmgcc42;
-				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
-				SDKROOT = iphoneos;
-			};
-			name = Debug;
-		};
-		571A468914DB0A1B007FEAC7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
-				CLANG_ENABLE_OBJC_ARC = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_VERSION = com.apple.compilers.llvmgcc42;
-				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
-				SDKROOT = iphoneos;
-				VALIDATE_PRODUCT = YES;
-			};
-			name = Release;
-		};
-		571A468B14DB0A1B007FEAC7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = YES;
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
-				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
-				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak_library",
-					/usr/lib/libSystem.B.dylib,
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				TARGETED_DEVICE_FAMILY = "1,2";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Debug;
-		};
-		571A468C14DB0A1B007FEAC7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = YES;
-				COPY_PHASE_STRIP = YES;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
-				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
-				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak_library",
-					/usr/lib/libSystem.B.dylib,
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				TARGETED_DEVICE_FAMILY = "1,2";
-				VALIDATE_PRODUCT = YES;
-				WRAPPER_EXTENSION = app;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				571A468814DB0A1B007FEAC7 /* Debug */,
-				571A468914DB0A1B007FEAC7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				571A468B14DB0A1B007FEAC7 /* Debug */,
-				571A468C14DB0A1B007FEAC7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 571A462F14DB0A1A007FEAC7 /* Project object */;
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/ios-plist/SampleApp.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/spec/projects/ios-plist/SampleApp.xcodeproj/project.pbxproj b/spec/projects/ios-plist/SampleApp.xcodeproj/project.pbxproj
deleted file mode 100644
index a4d87f9..0000000
--- a/spec/projects/ios-plist/SampleApp.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,498 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A463F14DB0A1B007FEAC7 /* Foundation.framework */; };
-		571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464114DB0A1B007FEAC7 /* UIKit.framework */; };
-		571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */; };
-		571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464514DB0A1B007FEAC7 /* AddressBook.framework */; };
-		571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */; };
-		571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */; };
-		571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */; };
-		571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */; };
-		571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */; };
-		571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465114DB0A1B007FEAC7 /* QuartzCore.framework */; };
-		571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */; };
-		571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */; };
-		571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465714DB0A1B007FEAC7 /* CoreMedia.framework */; };
-		571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */; };
-		571A466014DB0A1B007FEAC7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A465F14DB0A1B007FEAC7 /* main.m */; };
-		571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A466214DB0A1B007FEAC7 /* PhoneGap.framework */; };
-		571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466614DB0A1B007FEAC7 /* Localizable.strings */; };
-		571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466A14DB0A1B007FEAC7 /* Localizable.strings */; };
-		571A466F14DB0A1B007FEAC7 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A466E14DB0A1B007FEAC7 /* icon.png */; };
-		571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467014DB0A1B007FEAC7 /* icon@2x.png */; };
-		571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467214DB0A1B007FEAC7 /* icon-72.png */; };
-		571A467614DB0A1B007FEAC7 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467514DB0A1B007FEAC7 /* Default.png */; };
-		571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467714DB0A1B007FEAC7 /* Default@2x.png */; };
-		571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 571A467914DB0A1B007FEAC7 /* Capture.bundle */; };
-		571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */ = {isa = PBXBuildFile; fileRef = 571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */; };
-		571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A467F14DB0A1B007FEAC7 /* AppDelegate.m */; };
-		571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A468214DB0A1B007FEAC7 /* MainViewController.m */; };
-		571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 571A468414DB0A1B007FEAC7 /* MainViewController.xib */; };
-		577FC36614DB0B620082BA7B /* www in Resources */ = {isa = PBXBuildFile; fileRef = 577FC36514DB0B620082BA7B /* www */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
-		571A463B14DB0A1B007FEAC7 /* ChildApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChildApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		571A463F14DB0A1B007FEAC7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-		571A464114DB0A1B007FEAC7 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
-		571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
-		571A464514DB0A1B007FEAC7 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
-		571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
-		571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
-		571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
-		571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
-		571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
-		571A465114DB0A1B007FEAC7 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
-		571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
-		571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
-		571A465714DB0A1B007FEAC7 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
-		571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ChildApp-Info.plist"; sourceTree = "<group>"; };
-		571A465D14DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		571A465F14DB0A1B007FEAC7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
-		571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ChildApp-Prefix.pch"; sourceTree = "<group>"; };
-		571A466214DB0A1B007FEAC7 /* PhoneGap.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PhoneGap.framework; path = /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework; sourceTree = "<absolute>"; };
-		571A466714DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/Localizable.strings; sourceTree = "<group>"; };
-		571A466B14DB0A1B007FEAC7 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Resources/es.lproj/Localizable.strings; sourceTree = "<group>"; };
-		571A466E14DB0A1B007FEAC7 /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon.png; path = Resources/icons/icon.png; sourceTree = "<group>"; };
-		571A467014DB0A1B007FEAC7 /* icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon@2x.png"; path = "Resources/icons/icon@2x.png"; sourceTree = "<group>"; };
-		571A467214DB0A1B007FEAC7 /* icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon-72.png"; path = "Resources/icons/icon-72.png"; sourceTree = "<group>"; };
-		571A467514DB0A1B007FEAC7 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/splash/Default.png; sourceTree = "<group>"; };
-		571A467714DB0A1B007FEAC7 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "Resources/splash/Default@2x.png"; sourceTree = "<group>"; };
-		571A467914DB0A1B007FEAC7 /* Capture.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Capture.bundle; path = Resources/Capture.bundle; sourceTree = "<group>"; };
-		571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = PhoneGap.plist; sourceTree = "<group>"; };
-		571A467E14DB0A1B007FEAC7 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Classes/AppDelegate.h; sourceTree = "<group>"; };
-		571A467F14DB0A1B007FEAC7 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Classes/AppDelegate.m; sourceTree = "<group>"; };
-		571A468114DB0A1B007FEAC7 /* MainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainViewController.h; path = Classes/MainViewController.h; sourceTree = "<group>"; };
-		571A468214DB0A1B007FEAC7 /* MainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = Classes/MainViewController.m; sourceTree = "<group>"; };
-		571A468414DB0A1B007FEAC7 /* MainViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainViewController.xib; path = Classes/MainViewController.xib; sourceTree = "<group>"; };
-		571A468714DB0A1B007FEAC7 /* README */ = {isa = PBXFileReference; lastKnownFileType = text; name = README; path = Plugins/README; sourceTree = "<group>"; };
-		577FC36514DB0B620082BA7B /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		571A463514DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */,
-				571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */,
-				571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */,
-				571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */,
-				571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */,
-				571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */,
-				571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */,
-				571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */,
-				571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */,
-				571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */,
-				571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */,
-				571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */,
-				571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */,
-				571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		571A463814DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		571A462D14DB0A1A007FEAC7 = {
-			isa = PBXGroup;
-			children = (
-				577FC36514DB0B620082BA7B /* www */,
-				571A465914DB0A1B007FEAC7 /* ChildApp */,
-				571A463E14DB0A1B007FEAC7 /* Frameworks */,
-				571A463C14DB0A1B007FEAC7 /* Products */,
-			);
-			sourceTree = "<group>";
-		};
-		571A463C14DB0A1B007FEAC7 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				571A463B14DB0A1B007FEAC7 /* ChildApp.app */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		571A463E14DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				571A463F14DB0A1B007FEAC7 /* Foundation.framework */,
-				571A464114DB0A1B007FEAC7 /* UIKit.framework */,
-				571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */,
-				571A464514DB0A1B007FEAC7 /* AddressBook.framework */,
-				571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */,
-				571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */,
-				571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */,
-				571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */,
-				571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */,
-				571A465114DB0A1B007FEAC7 /* QuartzCore.framework */,
-				571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */,
-				571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */,
-				571A465714DB0A1B007FEAC7 /* CoreMedia.framework */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
-		571A465914DB0A1B007FEAC7 /* ChildApp */ = {
-			isa = PBXGroup;
-			children = (
-				571A466214DB0A1B007FEAC7 /* PhoneGap.framework */,
-				571A466414DB0A1B007FEAC7 /* Resources */,
-				571A467D14DB0A1B007FEAC7 /* Classes */,
-				571A468614DB0A1B007FEAC7 /* Plugins */,
-				571A465A14DB0A1B007FEAC7 /* Supporting Files */,
-			);
-			path = ChildApp;
-			sourceTree = "<group>";
-		};
-		571A465A14DB0A1B007FEAC7 /* Supporting Files */ = {
-			isa = PBXGroup;
-			children = (
-				571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */,
-				571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */,
-				571A465F14DB0A1B007FEAC7 /* main.m */,
-				571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */,
-				571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */,
-				571A468414DB0A1B007FEAC7 /* MainViewController.xib */,
-			);
-			name = "Supporting Files";
-			sourceTree = "<group>";
-		};
-		571A466414DB0A1B007FEAC7 /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				571A467914DB0A1B007FEAC7 /* Capture.bundle */,
-				571A466514DB0A1B007FEAC7 /* en.lproj */,
-				571A466914DB0A1B007FEAC7 /* es.lproj */,
-				571A466D14DB0A1B007FEAC7 /* icons */,
-				571A467414DB0A1B007FEAC7 /* splash */,
-			);
-			name = Resources;
-			sourceTree = "<group>";
-		};
-		571A466514DB0A1B007FEAC7 /* en.lproj */ = {
-			isa = PBXGroup;
-			children = (
-				571A466614DB0A1B007FEAC7 /* Localizable.strings */,
-			);
-			name = en.lproj;
-			sourceTree = "<group>";
-		};
-		571A466914DB0A1B007FEAC7 /* es.lproj */ = {
-			isa = PBXGroup;
-			children = (
-				571A466A14DB0A1B007FEAC7 /* Localizable.strings */,
-			);
-			name = es.lproj;
-			sourceTree = "<group>";
-		};
-		571A466D14DB0A1B007FEAC7 /* icons */ = {
-			isa = PBXGroup;
-			children = (
-				571A466E14DB0A1B007FEAC7 /* icon.png */,
-				571A467014DB0A1B007FEAC7 /* icon@2x.png */,
-				571A467214DB0A1B007FEAC7 /* icon-72.png */,
-			);
-			name = icons;
-			sourceTree = "<group>";
-		};
-		571A467414DB0A1B007FEAC7 /* splash */ = {
-			isa = PBXGroup;
-			children = (
-				571A467514DB0A1B007FEAC7 /* Default.png */,
-				571A467714DB0A1B007FEAC7 /* Default@2x.png */,
-			);
-			name = splash;
-			sourceTree = "<group>";
-		};
-		571A467D14DB0A1B007FEAC7 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-				571A467E14DB0A1B007FEAC7 /* AppDelegate.h */,
-				571A467F14DB0A1B007FEAC7 /* AppDelegate.m */,
-				571A468114DB0A1B007FEAC7 /* MainViewController.h */,
-				571A468214DB0A1B007FEAC7 /* MainViewController.m */,
-			);
-			name = Classes;
-			sourceTree = "<group>";
-		};
-		571A468614DB0A1B007FEAC7 /* Plugins */ = {
-			isa = PBXGroup;
-			children = (
-				571A468714DB0A1B007FEAC7 /* README */,
-			);
-			name = Plugins;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		571A463A14DB0A1B007FEAC7 /* ChildApp */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */;
-			buildPhases = (
-				571A463414DB0A1B007FEAC7 /* Sources */,
-				571A463514DB0A1B007FEAC7 /* Frameworks */,
-				571A463614DB0A1B007FEAC7 /* Resources */,
-				571A463714DB0A1B007FEAC7 /* Sources */,
-				571A463814DB0A1B007FEAC7 /* Frameworks */,
-				571A463914DB0A1B007FEAC7 /* ShellScript */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = ChildApp;
-			productName = ChildApp;
-			productReference = 571A463B14DB0A1B007FEAC7 /* ChildApp.app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		571A462F14DB0A1A007FEAC7 /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastUpgradeCheck = 0420;
-			};
-			buildConfigurationList = 571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 0;
-			knownRegions = (
-				en,
-				es,
-			);
-			mainGroup = 571A462D14DB0A1A007FEAC7;
-			productRefGroup = 571A463C14DB0A1B007FEAC7 /* Products */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				571A463A14DB0A1B007FEAC7 /* ChildApp */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		571A463614DB0A1B007FEAC7 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */,
-				571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */,
-				571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */,
-				571A466F14DB0A1B007FEAC7 /* icon.png in Resources */,
-				571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */,
-				571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */,
-				571A467614DB0A1B007FEAC7 /* Default.png in Resources */,
-				571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */,
-				571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */,
-				571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */,
-				571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */,
-				577FC36614DB0B620082BA7B /* www in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
-		571A463914DB0A1B007FEAC7 /* ShellScript */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/bash;
-			shellScript = "\n\t\t\t\t\t\t\t\tif [ ! -d \"$PROJECT_DIR/www\" ] ; then\n\t\t\t\t\t\t\t\t\tcp -R /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework/www \"$PROJECT_DIR\"\n\t\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\t\t# detect www folder reference in project, if missing, print warning\n\t\t\t\t\t\t\t\tgrep \"{isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = \\\"<group>\\\"; };\" \"$PROJECT_DIR/$PROJECT_NAME.xcodeproj/project.pbxproj\"\n\t\t\t\t\t\t\t\trc=$? \n\t\t\t\t\t\t\t\tif [ $rc != 0 ] ; then\n\t\t\t\t\t\t\t\techo -e \"warning: Missing - Add $PROJECT_DIR/www as a folder reference in your project. Just drag and drop the folder into your project, into the Project Navigator of Xcode 4. Make sure you select the second radio-button: 'Create folder references for any added folders' (which will create a blue folder)\" 1>&2\n\t\t\t\t\t\t\t\tfi\t\t\t\t\t\t\t";
-		};
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		571A463414DB0A1B007FEAC7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A466014DB0A1B007FEAC7 /* main.m in Sources */,
-				571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */,
-				571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		571A463714DB0A1B007FEAC7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A465D14DB0A1B007FEAC7 /* en */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "<group>";
-		};
-		571A466614DB0A1B007FEAC7 /* Localizable.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A466714DB0A1B007FEAC7 /* en */,
-			);
-			name = Localizable.strings;
-			sourceTree = "<group>";
-		};
-		571A466A14DB0A1B007FEAC7 /* Localizable.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A466B14DB0A1B007FEAC7 /* es */,
-			);
-			name = Localizable.strings;
-			sourceTree = "<group>";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		571A468814DB0A1B007FEAC7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
-				CLANG_ENABLE_OBJC_ARC = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = NO;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				GCC_VERSION = com.apple.compilers.llvmgcc42;
-				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
-				SDKROOT = iphoneos;
-			};
-			name = Debug;
-		};
-		571A468914DB0A1B007FEAC7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
-				CLANG_ENABLE_OBJC_ARC = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_VERSION = com.apple.compilers.llvmgcc42;
-				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
-				SDKROOT = iphoneos;
-				VALIDATE_PRODUCT = YES;
-			};
-			name = Release;
-		};
-		571A468B14DB0A1B007FEAC7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = YES;
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
-				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
-				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak_library",
-					/usr/lib/libSystem.B.dylib,
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				TARGETED_DEVICE_FAMILY = "1,2";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Debug;
-		};
-		571A468C14DB0A1B007FEAC7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = YES;
-				COPY_PHASE_STRIP = YES;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
-				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
-				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak_library",
-					/usr/lib/libSystem.B.dylib,
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				TARGETED_DEVICE_FAMILY = "1,2";
-				VALIDATE_PRODUCT = YES;
-				WRAPPER_EXTENSION = app;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				571A468814DB0A1B007FEAC7 /* Debug */,
-				571A468914DB0A1B007FEAC7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				571A468B14DB0A1B007FEAC7 /* Debug */,
-				571A468C14DB0A1B007FEAC7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 571A462F14DB0A1A007FEAC7 /* Project object */;
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/ios-plist/SampleApp/PhoneGap.plist
----------------------------------------------------------------------
diff --git a/spec/projects/ios-plist/SampleApp/PhoneGap.plist b/spec/projects/ios-plist/SampleApp/PhoneGap.plist
deleted file mode 100644
index 5ffe25e..0000000
--- a/spec/projects/ios-plist/SampleApp/PhoneGap.plist
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>TopActivityIndicator</key>
-	<string>gray</string>
-	<key>EnableLocation</key>
-	<false/>
-	<key>EnableViewportScale</key>
-	<false/>
-	<key>AutoHideSplashScreen</key>
-	<true/>
-	<key>ShowSplashScreenSpinner</key>
-	<true/>
-	<key>MediaPlaybackRequiresUserAction</key>
-	<false/>
-	<key>AllowInlineMediaPlayback</key>
-	<false/>
-	<key>OpenAllWhitelistURLsInWebView</key>
-	<false/>
-	<key>ExternalHosts</key>
-	<array/>
-	<key>Plugins</key>
-	<dict>
-		<key>com.phonegap.accelerometer</key>
-		<string>PGAccelerometer</string>
-		<key>com.phonegap.camera</key>
-		<string>PGCamera</string>
-		<key>com.phonegap.connection</key>
-		<string>PGConnection</string>
-		<key>com.phonegap.contacts</key>
-		<string>PGContacts</string>
-		<key>com.phonegap.debugconsole</key>
-		<string>PGDebugConsole</string>
-		<key>com.phonegap.file</key>
-		<string>PGFile</string>
-		<key>com.phonegap.filetransfer</key>
-		<string>PGFileTransfer</string>
-		<key>com.phonegap.geolocation</key>
-		<string>PGLocation</string>
-		<key>com.phonegap.notification</key>
-		<string>PGNotification</string>
-		<key>com.phonegap.media</key>
-		<string>PGSound</string>
-		<key>com.phonegap.mediacapture</key>
-		<string>PGCapture</string>
-		<key>com.phonegap.splashscreen</key>
-		<string>PGSplashScreen</string>
-		<key>com.phonegap.battery</key>
-		<string>PGBattery</string>
-	</dict>
-</dict>
-</plist>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/ios-plist/SampleApp/SampleApp-Info.plist
----------------------------------------------------------------------
diff --git a/spec/projects/ios-plist/SampleApp/SampleApp-Info.plist b/spec/projects/ios-plist/SampleApp/SampleApp-Info.plist
deleted file mode 100644
index 08b9ee3..0000000
--- a/spec/projects/ios-plist/SampleApp/SampleApp-Info.plist
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<!--
-#
-# 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.
-#
--->
-<plist version="1.0">
-<dict>
-	<key>CFBundleIcons</key>
-	<dict>
-		<key>CFBundlePrimaryIcon</key>
-		<dict>
-			<key>CFBundleIconFiles</key>
-			<array>
-                <string>icon.png</string>
-                <string>icon@2x.png</string>
-                <string>icon-72.png</string>
-                <string>icon-72@2x.png</string>
-			</array>
-			<key>UIPrerenderedIcon</key>
-			<false/>
-		</dict>
-	</dict>
-	<key>UISupportedInterfaceOrientations~ipad</key>
-	<array>
-		<string>UIInterfaceOrientationPortrait</string>
-		<string>UIInterfaceOrientationLandscapeLeft</string>
-		<string>UIInterfaceOrientationPortraitUpsideDown</string>
-		<string>UIInterfaceOrientationLandscapeRight</string>
-	</array>
-	<key>UISupportedInterfaceOrientations</key>
-	<array>
-		<string>UIInterfaceOrientationPortrait</string>
-	</array>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleDisplayName</key>
-	<string>${PRODUCT_NAME}</string>
-	<key>CFBundleExecutable</key>
-	<string>${EXECUTABLE_NAME}</string>
-	<key>CFBundleIconFile</key>
-	<string>icon.png</string>
-	<key>CFBundleIdentifier</key>
-	<string>com.example.friendstring</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>${PRODUCT_NAME}</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1.0</string>
-	<key>LSRequiresIPhoneOS</key>
-	<true/>
-	<key>NSMainNibFile</key>
-	<string></string>
-	<key>NSMainNibFile~ipad</key>
-	<string></string>
-	<key>AppId</key>
-	<string>$APP_ID</string>
-</dict>
-</plist>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/ios-plist/www/.gitkeep
----------------------------------------------------------------------
diff --git a/spec/projects/ios-plist/www/.gitkeep b/spec/projects/ios-plist/www/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/multiple-children/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/spec/projects/multiple-children/AndroidManifest.xml b/spec/projects/multiple-children/AndroidManifest.xml
deleted file mode 100644
index 0c52803..0000000
--- a/spec/projects/multiple-children/AndroidManifest.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
-      package="com.alunny.childapp" android:versionName="1.1" android:versionCode="5">
-    <supports-screens
-    	android:largeScreens="true"
-    	android:normalScreens="true"
-    	android:smallScreens="true"
-    	android:xlargeScreens="true"
-    	android:resizeable="true"
-    	android:anyDensity="true"
-    	/>
-
-    <uses-permission android:name="android.permission.CAMERA" />
-    <uses-permission android:name="android.permission.VIBRATE" />
-    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
-    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
-    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
-    <uses-permission android:name="android.permission.INTERNET" />
-    <uses-permission android:name="android.permission.RECEIVE_SMS" />
-    <uses-permission android:name="android.permission.RECORD_AUDIO" />
-    <uses-permission android:name="android.permission.RECORD_VIDEO"/>
-    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
-    <uses-permission android:name="android.permission.READ_CONTACTS" />
-    <uses-permission android:name="android.permission.WRITE_CONTACTS" />   
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />   
-    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
-    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
-    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
-
-    <uses-feature android:name="android.hardware.camera" />
-    <uses-feature android:name="android.hardware.camera.autofocus" />
-
-    <application android:icon="@drawable/icon" android:label="@string/app_name"
-    	android:debuggable="true">
-		<activity android:name="ChildApp" android:label="@string/app_name" 
-				  android:configChanges="orientation|keyboardHidden">
-			<intent-filter>
-				<action android:name="android.intent.action.MAIN" />
-				<category android:name="android.intent.category.LAUNCHER" />
-			</intent-filter>
-        </activity>
-        <activity android:name="com.phonegap.DroidGap" android:label="@string/app_name" 
-            	  android:configChanges="orientation|keyboardHidden">
-        	<intent-filter>
-        	</intent-filter>
-        </activity>
-    </application>
-
-	<uses-sdk android:minSdkVersion="5" />
-</manifest> 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/multiple-children/res/xml/plugins.xml
----------------------------------------------------------------------
diff --git a/spec/projects/multiple-children/res/xml/plugins.xml b/spec/projects/multiple-children/res/xml/plugins.xml
deleted file mode 100644
index 9cee85e..0000000
--- a/spec/projects/multiple-children/res/xml/plugins.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugins>
-    <plugin name="App" value="com.phonegap.App"/>
-    <plugin name="Geolocation" value="com.phonegap.GeoBroker"/>
-    <plugin name="Device" value="com.phonegap.Device"/>
-    <plugin name="Accelerometer" value="com.phonegap.AccelListener"/>
-    <plugin name="Compass" value="com.phonegap.CompassListener"/>
-    <plugin name="Media" value="com.phonegap.AudioHandler"/>
-    <plugin name="Camera" value="com.phonegap.CameraLauncher"/>
-    <plugin name="Contacts" value="com.phonegap.ContactManager"/>
-    <plugin name="Crypto" value="com.phonegap.CryptoHandler"/>
-    <plugin name="File" value="com.phonegap.FileUtils"/>
-    <plugin name="Network Status" value="com.phonegap.NetworkManager"/>
-    <plugin name="Notification" value="com.phonegap.Notification"/>
-    <plugin name="Storage" value="com.phonegap.Storage"/>
-    <plugin name="Temperature" value="com.phonegap.TempListener"/>
-    <plugin name="FileTransfer" value="com.phonegap.FileTransfer"/>
-    <plugin name="Capture" value="com.phonegap.Capture"/>
-</plugins>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/tizen/www/config.xml
----------------------------------------------------------------------
diff --git a/spec/projects/tizen/www/config.xml b/spec/projects/tizen/www/config.xml
deleted file mode 100644
index 788f6d4..0000000
--- a/spec/projects/tizen/www/config.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<widget id="TizenTestPackage"></widget>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/windows8/CordovaApp_TemporaryKey.pfx
----------------------------------------------------------------------
diff --git a/spec/projects/windows8/CordovaApp_TemporaryKey.pfx b/spec/projects/windows8/CordovaApp_TemporaryKey.pfx
deleted file mode 100644
index 4df1e37..0000000
Binary files a/spec/projects/windows8/CordovaApp_TemporaryKey.pfx and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/windows8/TestApp.jsproj
----------------------------------------------------------------------
diff --git a/spec/projects/windows8/TestApp.jsproj b/spec/projects/windows8/TestApp.jsproj
deleted file mode 100644
index d508c3f..0000000
--- a/spec/projects/windows8/TestApp.jsproj
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|AnyCPU">
-      <Configuration>Debug</Configuration>
-      <Platform>AnyCPU</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Debug|ARM">
-      <Configuration>Debug</Configuration>
-      <Platform>ARM</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Debug|x64">
-      <Configuration>Debug</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Debug|x86">
-      <Configuration>Debug</Configuration>
-      <Platform>x86</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|AnyCPU">
-      <Configuration>Release</Configuration>
-      <Platform>AnyCPU</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|ARM">
-      <Configuration>Release</Configuration>
-      <Platform>ARM</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|x64">
-      <Configuration>Release</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|x86">
-      <Configuration>Release</Configuration>
-      <Platform>x86</Platform>
-    </ProjectConfiguration>
-  </ItemGroup>
-  <PropertyGroup Label="Globals">
-    <ProjectGuid>efffab2f-bfc5-4eda-b545-45ef4995f55a</ProjectGuid>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '11.0'">
-    <VisualStudioVersion>11.0</VisualStudioVersion>
-  </PropertyGroup>
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).Default.props" />
-  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).props" />
-  <PropertyGroup>
-    <TargetPlatformIdentifier>Windows</TargetPlatformIdentifier>
-    <TargetPlatformVersion>8.0</TargetPlatformVersion>
-    <DefaultLanguage>en-US</DefaultLanguage>
-    <PackageCertificateKeyFile>CordovaApp_TemporaryKey.pfx</PackageCertificateKeyFile>
-  </PropertyGroup>
-  <ItemGroup>
-    <AppxManifest Include="package.appxmanifest">
-      <SubType>Designer</SubType>
-    </AppxManifest>
-    <Content Include="www\cordova-2.6.0.js" />
-    <Content Include="www\css\index.css" />
-    <Content Include="www\img\logo.png" />
-    <Content Include="www\img\smalllogo.png" />
-    <Content Include="www\img\splashscreen.png" />
-    <Content Include="www\img\storelogo.png" />
-    <Content Include="www\index.html" />
-    <Content Include="www\js\index.js" />
-    <None Include="CordovaApp_TemporaryKey.pfx" />
-  </ItemGroup>
-  <ItemGroup>
-    <SDKReference Include="Microsoft.WinJS.1.0, Version=1.0" />
-  </ItemGroup>
-  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).targets" />
-  <!-- To modify your build process, add your task inside one of the targets below then uncomment
-       that target and the DisableFastUpToDateCheck PropertyGroup. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  <PropertyGroup>
-    <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
-  </PropertyGroup>
-  -->
-</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/windows8/TestApp.sln
----------------------------------------------------------------------
diff --git a/spec/projects/windows8/TestApp.sln b/spec/projects/windows8/TestApp.sln
deleted file mode 100644
index 6c1ea33..0000000
--- a/spec/projects/windows8/TestApp.sln
+++ /dev/null
@@ -1,46 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
-Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "TestApp", "TestApp.jsproj", "{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}"
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Any CPU = Debug|Any CPU
-		Debug|ARM = Debug|ARM
-		Debug|x64 = Debug|x64
-		Debug|x86 = Debug|x86
-		Release|Any CPU = Release|Any CPU
-		Release|ARM = Release|ARM
-		Release|x64 = Release|x64
-		Release|x86 = Release|x86
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|ARM.ActiveCfg = Debug|ARM
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|ARM.Build.0 = Debug|ARM
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|ARM.Deploy.0 = Debug|ARM
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x64.ActiveCfg = Debug|x64
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x64.Build.0 = Debug|x64
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x64.Deploy.0 = Debug|x64
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x86.ActiveCfg = Debug|x86
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x86.Build.0 = Debug|x86
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x86.Deploy.0 = Debug|x86
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|Any CPU.Build.0 = Release|Any CPU
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|Any CPU.Deploy.0 = Release|Any CPU
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|ARM.ActiveCfg = Release|ARM
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|ARM.Build.0 = Release|ARM
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|ARM.Deploy.0 = Release|ARM
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x64.ActiveCfg = Release|x64
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x64.Build.0 = Release|x64
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x64.Deploy.0 = Release|x64
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x86.ActiveCfg = Release|x86
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x86.Build.0 = Release|x86
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x86.Deploy.0 = Release|x86
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/projects/windows8/package.appxmanifest
----------------------------------------------------------------------
diff --git a/spec/projects/windows8/package.appxmanifest b/spec/projects/windows8/package.appxmanifest
deleted file mode 100644
index 62c8f28..0000000
--- a/spec/projects/windows8/package.appxmanifest
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
-  <Identity Name="efffab2f-bfc5-4eda-b545-45ef4995f55a" Version="1.0.0.0" Publisher="CN=Jesse" />
-  <Properties>
-    <DisplayName>CordovaApp</DisplayName>
-    <PublisherDisplayName>Jesse</PublisherDisplayName>
-    <Logo>images\storelogo.png</Logo>
-  </Properties>
-  <Prerequisites>
-    <OSMinVersion>6.2.1</OSMinVersion>
-    <OSMaxVersionTested>6.2.1</OSMaxVersionTested>
-  </Prerequisites>
-  <Resources>
-    <Resource Language="x-generate" />
-  </Resources>
-  <Applications>
-    <Application Id="App" StartPage="www/index.html">
-      <VisualElements DisplayName="CordovaApp" Logo="www\img\logo.png" SmallLogo="www\img\smalllogo.png" Description="CordovaApp" ForegroundText="light" BackgroundColor="#464646">
-        <DefaultTile ShowName="allLogos" />
-        <SplashScreen Image="www\img\splashscreen.png" />
-      </VisualElements>
-    </Application>
-  </Applications>
-  <Capabilities>
-    <Capability Name="internetClient" />
-  </Capabilities>
-</Package>
\ No newline at end of file


[55/70] Remove all cordova-lib files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_one/cordova/appinfo.jar
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/appinfo.jar b/cordova-lib/spec-plugman/projects/android_one/cordova/appinfo.jar
deleted file mode 100644
index 583776d..0000000
Binary files a/cordova-lib/spec-plugman/projects/android_one/cordova/appinfo.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_one/cordova/build
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/build b/cordova-lib/spec-plugman/projects/android_one/cordova/build
deleted file mode 100755
index 3cbd9c1..0000000
--- a/cordova-lib/spec-plugman/projects/android_one/cordova/build
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-# 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.
-
-set -e
-
-CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash "$CORDOVA_PATH"/lib/cordova build "$@"

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_one/cordova/clean
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/clean b/cordova-lib/spec-plugman/projects/android_one/cordova/clean
deleted file mode 100755
index f52966a..0000000
--- a/cordova-lib/spec-plugman/projects/android_one/cordova/clean
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-# 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.
-
-set -e
-
-CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash "$CORDOVA_PATH"/lib/cordova clean "$@"

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_one/cordova/lib/cordova
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/lib/cordova b/cordova-lib/spec-plugman/projects/android_one/cordova/lib/cordova
deleted file mode 100755
index be343e9..0000000
--- a/cordova-lib/spec-plugman/projects/android_one/cordova/lib/cordova
+++ /dev/null
@@ -1,386 +0,0 @@
-#!/bin/bash
-#   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.
-
-PROJECT_PATH=$( cd "$( dirname "$0" )/../.." && pwd )
-
-function list_devices {
-    IFS=$'\n'
-    devices=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep -v 'emulator'`
-    device_list=($devices)
-    if [[ ${#device_list[@]} > 0 ]] ; then
-        for i in ${devices[@]}
-        do
-            # remove space and 'device'
-            echo ${i/[^a-zA-Z0-9._]device/}
-        done
-    else
-        echo "No devices found."
-        exit 2
-    fi
-}
-
-function list_started_emulators {
-    IFS=$'\n'
-    devices=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep 'emulator'`
-    emulator_list=($devices)
-    if [[ ${#emulator_list[@]} > 0 ]] ; then
-        for i in ${emulator_list[@]}
-        do
-            # remove space and 'device'
-            echo ${i/[^a-zA-Z0-9._]device/}
-        done
-    else
-        echo "No started emulators found, you can start an emulator by using the command"
-        echo " 'cordova/lib/start-emulator'"
-        exit 2
-    fi
-}
-
-function list_emulator_images {
-    emulator_images=`android list avds | grep "Name:" | cut -f 2 -d ":"`
-    emulator_list=($emulator_images)
-    if [[ ${#emulator_list[@]} > 0 ]] ; then
-        for i in ${emulator_list[@]}
-        do
-            echo ${i/[^a-zA-Z0-9._]/}
-        done
-    else
-        echo "No emulators found, if you would like to create an emulator follow the instructions"
-        echo " provided here : http://developer.android.com/tools/devices/index.html"
-        echo " Or run 'android create avd --name <name> --target <targetID>' in on the command line."
-        exit 2
-    fi
-}
-
-function start_emulator {
-    emulator_images=`android list avds | grep "Name:" | cut -f 2 -d ":"`
-    # if target emulator is provided
-    if [[ "$#" -eq 1 ]] ; then
-        # check that it exists
-        if [[ $emulator_images =~ $1 ]] ; then
-            #xterm -e emulator -avd $1 &
-            emulator -avd $1 1> /dev/null 2>&1 &
-        else
-            echo "Could not find the provided emulator, make sure the emulator exists"
-            echo " by checking 'cordova/lib/list-emulator-images'"
-            exit 2
-        fi
-    else
-        # start first emulator
-        emulator_list=($emulator_images)
-        if [[ ${#emulator_list[@]} > 0 ]] ; then
-            #xterm -e emulator -avd ${emulator_list[0]} &
-            emulator -avd ${emulator_list[0]/[^a-zA-Z0-9._]/} 1> /dev/null 2>&1 &
-        else
-            echo "No emulators found, if you would like to create an emulator follow the instructions"
-            echo " provided here : http://developer.android.com/tools/devices/index.html"
-            echo " Or run 'android create avd --name <name> --target <targetID>' in on the command line."
-            exit 2
-        fi
-    fi
-}
-
-function install_device {
-    IFS=$'\n'
-    devices=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep -v 'emulator'`
-    device_list=($devices)
-    if [[ ${#device_list[@]} > 0 ]] ; then
-        apks=`find $PROJECT_PATH/bin -type f -maxdepth 1 | egrep '\.apk$'`
-        apk_list=($apks)
-        if [[ ${#apk_list[@]} > 0 ]] ; then
-            local target
-            # handle target emulator
-            if [[ "$#" -eq 1 ]] ; then
-                # deploy to given target
-                target=${1/--target=/}
-            else
-                # delete trailing space and 'device' after device ID
-                target=${device_list[0]/[^a-zA-Z0-9._]device/}
-            fi
-            echo "Installing ${apk_list[0]} onto device $target..."
-            adb -s $target install -r ${apk_list[0]};
-            echo "Launching application..."
-            local launch_str=$(java -jar "$PROJECT_PATH"/cordova/appinfo.jar "$PROJECT_PATH"/AndroidManifest.xml)
-            adb -s $target shell am start -W -a android.intent.action.MAIN -n $launch_str
-        else
-            echo "Application package not found, could not install to device"
-            echo " make sure your application is built before deploying."
-            exit 2
-        fi
-    else
-        echo "No devices found to deploy to. Please make sure your device is connected"
-        echo " and you can view it using the 'cordova/lib/list-devices' command."
-        exit 2
-    fi
-}
-
-function install_emulator {
-    IFS=$'\n'
-    # check that there is an emulator to deploy to
-    emulator_string=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'emulator'`
-    emulator_list=($emulator_string)
-    if [[ ${#emulator_list[@]} > 0 ]] ; then
-        apks=`find $PROJECT_PATH/bin -type f -maxdepth 1 | egrep '\.apk$'`
-        apk_list=($apks)
-        if [[ ${#apk_list[@]} > 0 ]] ; then
-            local target
-            # handle target emulator
-            if [[ "$#" -eq 1 ]] ; then
-                # deploy to given target
-                target=${1/--target=/}
-            else
-                # delete trailing space and 'device' after emulator ID
-                target=${emulator_list[0]/[^a-zA-Z0-9._]device/}
-            fi
-            echo "Installing ${apk_list[0]} onto $target..."
-            adb -s $target install -r ${apk_list[0]};
-            echo "Launching application..."
-            local launch_str=$(java -jar "$PROJECT_PATH"/cordova/appinfo.jar "$PROJECT_PATH"/AndroidManifest.xml)
-            adb -s $target shell am start -W -a android.intent.action.MAIN -n $launch_str
-
-        else
-            echo "Application package not found, could not install to device"
-            echo " make sure your application is built before deploying."
-            exit 2
-        fi
-    else
-        echo "No emulators found to deploy to. Please make sure your emulator is started"
-        echo " and you can view it using the 'cordova/lib/list-started-emulators' command."
-        exit 2
-    fi
-}
-
-# cleans the project
-function clean {
-    echo "Cleaning project..."
-    ant clean
-}
-
-# has to be used independently and not in conjunction with other commands
-function log {
-    # filter out nativeGetEnabledTags spam from latest sdk bug.
-    adb logcat | grep -v nativeGetEnabledTags
-}
-
-
-function build {
-    if [[ "$#" -eq 1 ]] ; then
-        if [[ $1 == "--debug" ]] ; then
-            clean
-            ant debug -f "$PROJECT_PATH"/build.xml
-        elif [[ $1 == "--release" ]] ; then
-            clean
-            ant release -f "$PROJECT_PATH"/build.xml
-        elif [[ $1 == "--nobuild" ]] ; then
-            echo "Skipping build..."
-        else
-            echo "Error : Build command '$1' not recognized."
-            exit 2
-        fi
-    else
-        echo "Warning : [ --debug | --release | --nobuild ] not specified, defaulting to --debug"
-        clean
-        ant debug -f "$PROJECT_PATH"/build.xml
-    fi
-}
-
-
-function wait_for_emulator {
-    emulator_string=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep 'emulator'`
-    old_started=($emulator_string)
-    local new_started
-    local new_emulator_name
-    local i="0"
-    echo -n "Waiting for emulator..."
-    while [ $i -lt 300 ]
-    do
-        emulator_string=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep 'emulator'`
-        new_started=($emulator_string)
-        if [[ ${#new_started[@]} > ${#old_started[@]} && -z "$new_emulator_name" ]] ; then
-            # get the name of the started emulator
-            local count="0"
-            if [[ ${#old_started[@]} == 0 ]] ; then
-                new_emulator_name=${new_started[$count]/[^a-zA-Z0-9._]device/}
-            else
-                for count in {0...${#old_started[@]}}
-                do
-                    if [[ ! ${new_started[$count]} == ${old_started[$count]} ]] ; then
-                        new_emulator_name=${new_started[$count]/[^a-zA-Z0-9._]device/}
-                    fi
-                done
-                if [[ -z "$new_emulator_name" ]] ; then
-                    count=$[count+1]
-                    new_emulator_name=${new_started[$count]/[^a-zA-Z0-9._]device/}
-                fi
-            fi
-        elif [[ "$new_emulator_name" ]] ; then
-            boot_anim=`adb -s $new_emulator_name shell getprop init.svc.bootanim`
-            if [[ $boot_anim =~ "stopped" ]] ; then
-                break
-            else
-                sleep 1
-                i=$[i+1]
-                echo -n "."
-            fi
-        else
-            sleep 1
-            i=$[i+1]
-            echo -n "."
-        fi
-    done
-    # Device timeout: emulator has not started in time
-    if [ $i -eq 300 ]
-    then
-        echo "emulator timeout!"
-        exit 69
-    else
-        echo "connected!"
-    fi
-}
-
-function run {
-    IFS=$'\n'
-    if [[ "$#" -eq 2 ]] ; then
-        build $2
-        if [[ $1 == "--device" ]] ; then
-            install_device
-        elif [[ $1 == "--emulator" ]] ; then
-            install_emulator
-        elif [[ $1 =~ "--target=" ]]; then
-            install_device $1
-        else
-            echo "Error : '$1' is not recognized as an install option"
-        fi
-    elif [[ "$#" -eq 1 ]] ; then
-        if [[ $1 == "--debug" || $1 == "--release" || $1 == "--nobuild" ]] ; then
-            build $1
-        elif [[ $1 == "--device" ]] ; then
-            install_device
-        elif [[ $1 == "--emulator" ]] ; then
-            install_emulator
-        elif [[ $1 =~ "--target=" ]]; then
-            install_device $1
-        else
-            echo "Error : '$1' is not recognized as an install option"
-        fi
-    else
-        echo "Warning : [ --device | --emulate | --target=<targetID> ] not specified, using defaults."
-        build
-        devices=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep -v 'emulator'`
-        device_list=($devices)
-        emulator_string=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep 'emulator'`
-        emulator_list=($emulator_string)
-        if [[ ${#device_list[@]} > 0 ]] ; then
-            install_device
-        elif [[ ${#emulator_list[@]} > 0 ]] ; then
-            install_emulator
-        else
-            emulator_images=`android list avds | grep "Name:" | cut -f 2 -d ":"`
-            echo $emulator_images
-            emulator_image_list=($emulator_images)
-            if [[ ${#emulator_image_list[@]} > 0 ]] ; then
-                echo "Starting emulator : ${emulator_image_list[0]}" 
-                emulator -avd ${emulator_image_list[0]/[^.\w]/} 1> /dev/null 2>&1 &
-                wait_for_emulator
-                install_emulator
-            else
-                # TODO : look for emulator images and start one if it's available
-                echo "Error : there are no available devices or emulators to deploy to."
-                echo " create an emulator or connect your device to run this command."
-                echo "If you would like to create an emulator follow the instructions"
-                echo " provided here : http://developer.android.com/tools/devices/index.html"
-                echo " Or run 'android create avd --name <name> --target <targetID>' in on the command line."
-                exit 2
-            fi
-        fi
-    fi
-}
-
-# parse command line arguments
-
-if [[ $# > 3 ]] ; then 
-    echo "Error :  too many arguments."
-    exit 2
-elif [[ $# == 3 ]] ; then
-    if [[ $1 == "run" ]] ; then
-        run $2 $3
-    else
-        echo "Error : too many arguments for '$1'"
-        exit 2
-    fi
-elif [[ $# == 2 ]] ; then
-    if [[ $1 == "run" ]] ; then
-        if [[ $2 == "--emulator" || $2 == "--device" || $2 =~ "--target=" ]] ; then
-            run $2 ''
-        elif [[ $2 == "--debug" || $2 == "--release" || $2 == "--nobuild" ]] ; then
-            run '' $2
-        else 
-            echo "Error : '$2' is not recognized as a run option."
-            exit 2
-        fi
-    elif [[ $1 == "build" ]] ; then
-        build $2
-    elif [[ $1 == "start-emulator" ]] ; then
-        start_emulator $2
-    elif [[ $1 == "install-device" ]] ; then
-        if [[ $2 =~ "--target=" ]] ; then
-            install_device $2
-        else
-            echo "Error : '$2' is not recognized as an install option"
-            exit 2
-        fi
-    elif [[ $1 == "install-emulator" ]] ; then
-        if [[ $2 =~ "--target=" ]] ; then
-            install_emulator $2
-        else
-            echo "Error : '$2' is not recognized as an install option"
-            exit 2
-        fi
-    else
-        echo "Error : '$1' is not recognized as an option that takes arguments"
-        exit 2
-    fi
-elif [[ $# == 1 ]] ; then
-    if [[ $1 == "run" ]] ; then
-        run
-    elif [[ $1 == "build" ]]; then
-        build
-    elif [[ $1 == "clean" ]]; then
-        clean
-    elif [[ $1 == "log" ]]; then
-        log
-    elif [[ $1 == "list-devices" ]]; then
-        list_devices
-    elif [[ $1 == "list-emulator-images" ]]; then
-        list_emulator_images
-    elif [[ $1 == "list-started-emulators" ]]; then
-        list_started_emulators
-    elif [[ $1 == "install-device" ]]; then
-        install_device
-    elif [[ $1 == "install-emulator" ]]; then
-        install_emulator
-    elif [[ $1 == "start-emulator" ]]; then
-        start_emulator
-    else
-        echo "Error : '$1' is not recognized as a tooling command."
-        exit 2
-    fi
-else
-    echo "Error : No command received, exiting..."
-    exit 2
-fi
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_one/cordova/lib/install-device
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/lib/install-device b/cordova-lib/spec-plugman/projects/android_one/cordova/lib/install-device
deleted file mode 100755
index 604b5ae..0000000
--- a/cordova-lib/spec-plugman/projects/android_one/cordova/lib/install-device
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-# 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.
-
-set -e
-
-CORDOVA_LIB_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash "$CORDOVA_LIB_PATH"/cordova install-device "$@"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_one/cordova/lib/install-emulator
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/lib/install-emulator b/cordova-lib/spec-plugman/projects/android_one/cordova/lib/install-emulator
deleted file mode 100755
index 105e2ee..0000000
--- a/cordova-lib/spec-plugman/projects/android_one/cordova/lib/install-emulator
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-# 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.
-
-set -e
-
-CORDOVA_LIB_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash "$CORDOVA_LIB_PATH"/cordova install-emulator "$@"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_one/cordova/lib/list-devices
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/lib/list-devices b/cordova-lib/spec-plugman/projects/android_one/cordova/lib/list-devices
deleted file mode 100755
index 7a5b2f5..0000000
--- a/cordova-lib/spec-plugman/projects/android_one/cordova/lib/list-devices
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-# 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.
-
-set -e
-
-CORDOVA_LIB_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash "$CORDOVA_LIB_PATH"/cordova list-devices
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_one/cordova/lib/list-emulator-images
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/lib/list-emulator-images b/cordova-lib/spec-plugman/projects/android_one/cordova/lib/list-emulator-images
deleted file mode 100755
index db8e563..0000000
--- a/cordova-lib/spec-plugman/projects/android_one/cordova/lib/list-emulator-images
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-# 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.
-
-set -e
-
-CORDOVA_LIB_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash "$CORDOVA_LIB_PATH"/cordova list-emulator-images
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_one/cordova/lib/list-started-emulators
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/lib/list-started-emulators b/cordova-lib/spec-plugman/projects/android_one/cordova/lib/list-started-emulators
deleted file mode 100755
index 7911763..0000000
--- a/cordova-lib/spec-plugman/projects/android_one/cordova/lib/list-started-emulators
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-# 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.
-
-set -e
-
-CORDOVA_LIB_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash "$CORDOVA_LIB_PATH"/cordova list-started-emulators
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_one/cordova/lib/start-emulator
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/lib/start-emulator b/cordova-lib/spec-plugman/projects/android_one/cordova/lib/start-emulator
deleted file mode 100755
index 8e8964d..0000000
--- a/cordova-lib/spec-plugman/projects/android_one/cordova/lib/start-emulator
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-# 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.
-
-set -e
-
-CORDOVA_LIB_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash "$CORDOVA_LIB_PATH"/cordova start-emulator "$@"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_one/cordova/log
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/log b/cordova-lib/spec-plugman/projects/android_one/cordova/log
deleted file mode 100755
index 01fe107..0000000
--- a/cordova-lib/spec-plugman/projects/android_one/cordova/log
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-# 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.
-
-set -e
-
-CORDOVA_PATH=$( cd "$( dirname "$0" )/.." && pwd )
-
-bash "$CORDOVA_PATH"/cordova/lib/cordova log "$@"

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_one/cordova/run
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/run b/cordova-lib/spec-plugman/projects/android_one/cordova/run
deleted file mode 100755
index ec352b0..0000000
--- a/cordova-lib/spec-plugman/projects/android_one/cordova/run
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-# 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.
-
-set -e
-
-CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash "$CORDOVA_PATH"/lib/cordova run "$@"

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_one/cordova/version
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/version b/cordova-lib/spec-plugman/projects/android_one/cordova/version
deleted file mode 100755
index 5760e95..0000000
--- a/cordova-lib/spec-plugman/projects/android_one/cordova/version
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-# 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.
-
-set -e
-
-CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P)
-PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
-
-VERSION_FILE_PATH="$PROJECT_PATH/assets/www/cordova.js"
-
-if [ -f "$VERSION_FILE_PATH" ]; then
-    JSVersion=$(sed -n '2,2p' $VERSION_FILE_PATH)
-    echo $JSVersion | sed -e 's/\/\/ //'| cut -f 1 -d '-'
-else
-    echo "The file \"$VERSION_FILE_PATH\" does not exist."
-    exit 1
-fi

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_one/res/xml/plugins.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/res/xml/plugins.xml b/cordova-lib/spec-plugman/projects/android_one/res/xml/plugins.xml
deleted file mode 100644
index 9cee85e..0000000
--- a/cordova-lib/spec-plugman/projects/android_one/res/xml/plugins.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugins>
-    <plugin name="App" value="com.phonegap.App"/>
-    <plugin name="Geolocation" value="com.phonegap.GeoBroker"/>
-    <plugin name="Device" value="com.phonegap.Device"/>
-    <plugin name="Accelerometer" value="com.phonegap.AccelListener"/>
-    <plugin name="Compass" value="com.phonegap.CompassListener"/>
-    <plugin name="Media" value="com.phonegap.AudioHandler"/>
-    <plugin name="Camera" value="com.phonegap.CameraLauncher"/>
-    <plugin name="Contacts" value="com.phonegap.ContactManager"/>
-    <plugin name="Crypto" value="com.phonegap.CryptoHandler"/>
-    <plugin name="File" value="com.phonegap.FileUtils"/>
-    <plugin name="Network Status" value="com.phonegap.NetworkManager"/>
-    <plugin name="Notification" value="com.phonegap.Notification"/>
-    <plugin name="Storage" value="com.phonegap.Storage"/>
-    <plugin name="Temperature" value="com.phonegap.TempListener"/>
-    <plugin name="FileTransfer" value="com.phonegap.FileTransfer"/>
-    <plugin name="Capture" value="com.phonegap.Capture"/>
-</plugins>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_one/src/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/src/.gitkeep b/cordova-lib/spec-plugman/projects/android_one/src/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_two/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_two/AndroidManifest.xml b/cordova-lib/spec-plugman/projects/android_two/AndroidManifest.xml
deleted file mode 100644
index 0c52803..0000000
--- a/cordova-lib/spec-plugman/projects/android_two/AndroidManifest.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
-      package="com.alunny.childapp" android:versionName="1.1" android:versionCode="5">
-    <supports-screens
-    	android:largeScreens="true"
-    	android:normalScreens="true"
-    	android:smallScreens="true"
-    	android:xlargeScreens="true"
-    	android:resizeable="true"
-    	android:anyDensity="true"
-    	/>
-
-    <uses-permission android:name="android.permission.CAMERA" />
-    <uses-permission android:name="android.permission.VIBRATE" />
-    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
-    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
-    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
-    <uses-permission android:name="android.permission.INTERNET" />
-    <uses-permission android:name="android.permission.RECEIVE_SMS" />
-    <uses-permission android:name="android.permission.RECORD_AUDIO" />
-    <uses-permission android:name="android.permission.RECORD_VIDEO"/>
-    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
-    <uses-permission android:name="android.permission.READ_CONTACTS" />
-    <uses-permission android:name="android.permission.WRITE_CONTACTS" />   
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />   
-    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
-    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
-    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
-
-    <uses-feature android:name="android.hardware.camera" />
-    <uses-feature android:name="android.hardware.camera.autofocus" />
-
-    <application android:icon="@drawable/icon" android:label="@string/app_name"
-    	android:debuggable="true">
-		<activity android:name="ChildApp" android:label="@string/app_name" 
-				  android:configChanges="orientation|keyboardHidden">
-			<intent-filter>
-				<action android:name="android.intent.action.MAIN" />
-				<category android:name="android.intent.category.LAUNCHER" />
-			</intent-filter>
-        </activity>
-        <activity android:name="com.phonegap.DroidGap" android:label="@string/app_name" 
-            	  android:configChanges="orientation|keyboardHidden">
-        	<intent-filter>
-        	</intent-filter>
-        </activity>
-    </application>
-
-	<uses-sdk android:minSdkVersion="5" />
-</manifest> 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_two/assets/www/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_two/assets/www/.gitkeep b/cordova-lib/spec-plugman/projects/android_two/assets/www/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_two/res/xml/config.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_two/res/xml/config.xml b/cordova-lib/spec-plugman/projects/android_two/res/xml/config.xml
deleted file mode 100644
index d37aba5..0000000
--- a/cordova-lib/spec-plugman/projects/android_two/res/xml/config.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-       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.
--->
-<cordova>
-    <!--
-    access elements control the Android whitelist.
-    Domains are assumed blocked unless set otherwise
-     -->
-
-    <access origin="http://127.0.0.1*"/> <!-- allow local pages -->
-
-    <!-- <access origin="https://example.com" /> allow any secure requests to example.com -->
-    <!-- <access origin="https://example.com" subdomains="true" /> such as above, but including subdomains, such as www -->
-    <!-- <access origin=".*"/> Allow all domains, suggested development use only -->
-
-    <log level="DEBUG"/>
-    <preference name="useBrowserHistory" value="false" />
-<plugins>
-    <plugin name="App" value="org.apache.cordova.App"/>
-    <plugin name="Geolocation" value="org.apache.cordova.GeoBroker"/>
-    <plugin name="Device" value="org.apache.cordova.Device"/>
-    <plugin name="Accelerometer" value="org.apache.cordova.AccelListener"/>
-    <plugin name="Compass" value="org.apache.cordova.CompassListener"/>
-    <plugin name="Media" value="org.apache.cordova.AudioHandler"/>
-    <plugin name="Camera" value="org.apache.cordova.CameraLauncher"/>
-    <plugin name="Contacts" value="org.apache.cordova.ContactManager"/>
-    <plugin name="File" value="org.apache.cordova.FileUtils"/>
-    <plugin name="NetworkStatus" value="org.apache.cordova.NetworkManager"/>
-    <plugin name="Notification" value="org.apache.cordova.Notification"/>
-    <plugin name="Storage" value="org.apache.cordova.Storage"/>
-    <plugin name="Temperature" value="org.apache.cordova.TempListener"/>
-    <plugin name="FileTransfer" value="org.apache.cordova.FileTransfer"/>
-    <plugin name="Capture" value="org.apache.cordova.Capture"/>
-    <plugin name="Battery" value="org.apache.cordova.BatteryListener"/>
-    <plugin name="SplashScreen" value="org.apache.cordova.SplashScreen"/>
-</plugins>
-</cordova>
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_two/src/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_two/src/.gitkeep b/cordova-lib/spec-plugman/projects/android_two/src/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_two_no_perms/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_two_no_perms/AndroidManifest.xml b/cordova-lib/spec-plugman/projects/android_two_no_perms/AndroidManifest.xml
deleted file mode 100644
index 6e4b480..0000000
--- a/cordova-lib/spec-plugman/projects/android_two_no_perms/AndroidManifest.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
-      package="com.alunny.childapp" android:versionName="1.1" android:versionCode="5">
-    <supports-screens
-    	android:largeScreens="true"
-    	android:normalScreens="true"
-    	android:smallScreens="true"
-    	android:xlargeScreens="true"
-    	android:resizeable="true"
-    	android:anyDensity="true"
-    	/>
-
-    <application android:icon="@drawable/icon" android:label="@string/app_name"
-    	android:debuggable="true">
-		<activity android:name="ChildApp" android:label="@string/app_name" 
-				  android:configChanges="orientation|keyboardHidden">
-			<intent-filter>
-				<action android:name="android.intent.action.MAIN" />
-				<category android:name="android.intent.category.LAUNCHER" />
-			</intent-filter>
-        </activity>
-        <activity android:name="com.phonegap.DroidGap" android:label="@string/app_name" 
-            	  android:configChanges="orientation|keyboardHidden">
-        	<intent-filter>
-        	</intent-filter>
-        </activity>
-    </application>
-
-	<uses-sdk android:minSdkVersion="5" />
-</manifest> 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_two_no_perms/assets/www/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_two_no_perms/assets/www/.gitkeep b/cordova-lib/spec-plugman/projects/android_two_no_perms/assets/www/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_two_no_perms/res/xml/config.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_two_no_perms/res/xml/config.xml b/cordova-lib/spec-plugman/projects/android_two_no_perms/res/xml/config.xml
deleted file mode 100644
index d37aba5..0000000
--- a/cordova-lib/spec-plugman/projects/android_two_no_perms/res/xml/config.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-       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.
--->
-<cordova>
-    <!--
-    access elements control the Android whitelist.
-    Domains are assumed blocked unless set otherwise
-     -->
-
-    <access origin="http://127.0.0.1*"/> <!-- allow local pages -->
-
-    <!-- <access origin="https://example.com" /> allow any secure requests to example.com -->
-    <!-- <access origin="https://example.com" subdomains="true" /> such as above, but including subdomains, such as www -->
-    <!-- <access origin=".*"/> Allow all domains, suggested development use only -->
-
-    <log level="DEBUG"/>
-    <preference name="useBrowserHistory" value="false" />
-<plugins>
-    <plugin name="App" value="org.apache.cordova.App"/>
-    <plugin name="Geolocation" value="org.apache.cordova.GeoBroker"/>
-    <plugin name="Device" value="org.apache.cordova.Device"/>
-    <plugin name="Accelerometer" value="org.apache.cordova.AccelListener"/>
-    <plugin name="Compass" value="org.apache.cordova.CompassListener"/>
-    <plugin name="Media" value="org.apache.cordova.AudioHandler"/>
-    <plugin name="Camera" value="org.apache.cordova.CameraLauncher"/>
-    <plugin name="Contacts" value="org.apache.cordova.ContactManager"/>
-    <plugin name="File" value="org.apache.cordova.FileUtils"/>
-    <plugin name="NetworkStatus" value="org.apache.cordova.NetworkManager"/>
-    <plugin name="Notification" value="org.apache.cordova.Notification"/>
-    <plugin name="Storage" value="org.apache.cordova.Storage"/>
-    <plugin name="Temperature" value="org.apache.cordova.TempListener"/>
-    <plugin name="FileTransfer" value="org.apache.cordova.FileTransfer"/>
-    <plugin name="Capture" value="org.apache.cordova.Capture"/>
-    <plugin name="Battery" value="org.apache.cordova.BatteryListener"/>
-    <plugin name="SplashScreen" value="org.apache.cordova.SplashScreen"/>
-</plugins>
-</cordova>
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_two_no_perms/src/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_two_no_perms/src/.gitkeep b/cordova-lib/spec-plugman/projects/android_two_no_perms/src/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_uninstall/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_uninstall/AndroidManifest.xml b/cordova-lib/spec-plugman/projects/android_uninstall/AndroidManifest.xml
deleted file mode 100644
index b5fea9d..0000000
--- a/cordova-lib/spec-plugman/projects/android_uninstall/AndroidManifest.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<manifest android:versionCode="5" android:versionName="1.1" android:windowSoftInputMode="adjustPan" package="cordova.test.uninstall" xmlns:android="http://schemas.android.com/apk/res/android">
-    <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
-    <application android:debuggable="true" android:icon="@drawable/icon" android:label="@string/app_name">
-        <activity android:configChanges="orientation|keyboardHidden" android:label="@string/app_name" android:name="ChildApp">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-        <activity android:configChanges="orientation|keyboardHidden" android:label="@string/app_name" android:name="com.phonegap.DroidGap">
-            <intent-filter>
-            </intent-filter>
-        </activity>
-        <activity android:label="@string/app_name" android:name="com.phonegap.plugins.dummyplugin.DummyPlugin">
-            <intent-filter />
-        </activity>
-    </application>
-    <uses-sdk android:minSdkVersion="5" />
-</manifest>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_uninstall/cordova/version
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_uninstall/cordova/version b/cordova-lib/spec-plugman/projects/android_uninstall/cordova/version
deleted file mode 100644
index 01f68fd..0000000
--- a/cordova-lib/spec-plugman/projects/android_uninstall/cordova/version
+++ /dev/null
@@ -1 +0,0 @@
-echo 9.0.0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/android_uninstall/cordova/version.bat
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_uninstall/cordova/version.bat b/cordova-lib/spec-plugman/projects/android_uninstall/cordova/version.bat
deleted file mode 100644
index c637d7c..0000000
--- a/cordova-lib/spec-plugman/projects/android_uninstall/cordova/version.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-@ECHO OFF
-echo 9.0.0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/blackberry10/native/device/chrome/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/blackberry10/native/device/chrome/.gitkeep b/cordova-lib/spec-plugman/projects/blackberry10/native/device/chrome/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/blackberry10/native/device/plugins/jnext/auth.txt
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/blackberry10/native/device/plugins/jnext/auth.txt b/cordova-lib/spec-plugman/projects/blackberry10/native/device/plugins/jnext/auth.txt
deleted file mode 100644
index 0983f4f..0000000
--- a/cordova-lib/spec-plugman/projects/blackberry10/native/device/plugins/jnext/auth.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-local:/// *
-file:// *
-http:// *
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/blackberry10/native/simulator/chrome/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/blackberry10/native/simulator/chrome/.gitkeep b/cordova-lib/spec-plugman/projects/blackberry10/native/simulator/chrome/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/blackberry10/native/simulator/plugins/jnext/auth.txt
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/blackberry10/native/simulator/plugins/jnext/auth.txt b/cordova-lib/spec-plugman/projects/blackberry10/native/simulator/plugins/jnext/auth.txt
deleted file mode 100644
index 0983f4f..0000000
--- a/cordova-lib/spec-plugman/projects/blackberry10/native/simulator/plugins/jnext/auth.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-local:/// *
-file:// *
-http:// *
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/blackberry10/www/config.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/blackberry10/www/config.xml b/cordova-lib/spec-plugman/projects/blackberry10/www/config.xml
deleted file mode 100644
index 1dc8fe8..0000000
--- a/cordova-lib/spec-plugman/projects/blackberry10/www/config.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-       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.
--->
-<!--
-  Widget Configuration Reference:
-    http://docs.blackberry.com/en/developers/deliverables/15274/
--->
-
-<widget xmlns="http://www.w3.org/ns/widgets"
-        xmlns:rim="http://www.blackberry.com/ns/widgets"
-  version="1.0.0.0" id="cordovaExample">
-
-  <name>cordovaExample</name>
-
-  <author>Your Name Here</author>
-
-  <description>
-       A sample Apache Cordova application that responds to the deviceready event.
-  </description>
-    
-  <license href="http://opensource.org/licenses/alphabetical">
-  </license>
-
-  <!-- Cordova API -->
-  <feature id="blackberry.system" required="true" version="1.0.0.0" />
-  <feature id="org.apache.cordova" required="true" version="1.0.0" />
-  <feature id="blackberry.find" required="true" version="1.0.0.0" />
-  <feature id="blackberry.identity" required="true" version="1.0.0.0" />
-  <feature id="blackberry.identity.phone" required="true" version="1.0.0.0" />
-  <feature id="blackberry.pim.Address" required="true" version="1.0.0.0" />
-  <feature id="blackberry.pim.Contact" required="true" version="1.0.0.0" />
-  <feature id="blackberry.io.file" required="true" version="1.0.0.0" />
-  <feature id="blackberry.utils" required="true" version="1.0.0.0" />
-  <feature id="blackberry.io.dir" required="true" version="1.0.0.0" />
-  <feature id="blackberry.app" required="true" version="1.0.0.0" />
-  <feature id="blackberry.app.event" required="true" version="1.0.0.0" />
-  <feature id="blackberry.system.event" required="true" version="1.0.0.0"/>
-  <feature id="blackberry.widgetcache" required="true" version="1.0.0.0"/>
-  <feature id="blackberry.media.camera" />
-  <feature id="blackberry.ui.dialog" />
-  <feature id="blackberry.connection" />
-  <feature id="blackberry.bbm.platform" />
-  <feature id="blackberry.invoke.card" />
-  <feature id="blackberry.pim.contacts" />
-  <feature id="blackberry.ui.contextmenu" />
-  <feature id="blackberry.io.filetransfer" />
-  <feature id="blackberry.io" />
-  <feature id="blackberry.invoke" />
-  <feature id="blackberry.invoked" />
-  <feature id="blackberry.push" />
-  <feature id="blackberry.media.microphone" required="true" version="1.0.0.0"/>
-  
-  <!-- Cordova API -->
-  <access subdomains="true" uri="file:///store/home" />
-  <access subdomains="true" uri="file:///SDCard" />
-
-  <!-- Expose access to all URIs, including the file and http protocols -->
-  <access subdomains="true" uri="*" />
-
-  
-  <icon rim:hover="false" src="res/icon/blackberry/icon-80.png" />
-  <icon rim:hover="true" src="res/icon/blackberry/icon-80.png" />
-
-  <rim:loadingScreen backgroundColor="#CFCFCF"
-                     foregroundImage="res/screen/blackberry/screen-225.png"
-                     onFirstLaunch="true">
-    <rim:transitionEffect type="fadeOut" />
-  </rim:loadingScreen>
-
-  <content src="index.html" />
-
-  <rim:permissions>
-    <rim:permit>use_camera</rim:permit>
-    <rim:permit>read_device_identifying_information</rim:permit>
-    <rim:permit>access_shared</rim:permit>
-    <rim:permit>read_geolocation</rim:permit>
-    <rim:permit>record_audio</rim:permit> 
-    <rim:permit>access_pimdomain_contacts</rim:permit> 
-  </rim:permissions>
-
-</widget>


[46/70] git commit: Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
Split out cordova-lib: move cordova-plugman files

HISTORY:
git log <file> will show no history from before this commit for files that
moved. To see full history use either
git log --follow <file>
or
git log plugman_pre_lib <old file name>

'plugman_pre_lib' is a tag for the last commit made in cordova-plugman repo before
cordova-lib was split out.


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

Branch: refs/heads/cordova-lib
Commit: 0318d8cddf7c3ac627dd24afa7fefd5845dc85da
Parents: ff2a9f0
Author: Mark Koudritsky <ka...@gmail.com>
Authored: Wed Apr 30 18:11:57 2014 -0400
Committer: Mark Koudritsky <ka...@gmail.com>
Committed: Wed Apr 30 18:11:57 2014 -0400

----------------------------------------------------------------------
 cordova-lib/spec-plugman/add_platform.spec.js   |   64 +
 cordova-lib/spec-plugman/adduser.spec.js        |   11 +
 cordova-lib/spec-plugman/common.js              |   62 +
 cordova-lib/spec-plugman/config.spec.js         |   12 +
 cordova-lib/spec-plugman/create.spec.js         |   62 +
 cordova-lib/spec-plugman/fetch.spec.js          |  211 +
 cordova-lib/spec-plugman/info.spec.js           |   15 +
 cordova-lib/spec-plugman/install.spec.js        |  472 +
 cordova-lib/spec-plugman/owner.spec.js          |   12 +
 cordova-lib/spec-plugman/platform.spec.js       |   26 +
 .../platforms/amazon-fireos.spec.js             |  139 +
 .../spec-plugman/platforms/android.spec.js      |  156 +
 .../spec-plugman/platforms/blackberry10.spec.js |  148 +
 .../spec-plugman/platforms/common.spec.js       |  130 +
 cordova-lib/spec-plugman/platforms/ios.spec.js  |  390 +
 .../spec-plugman/platforms/tizen.spec.js        |   54 +
 .../spec-plugman/platforms/windows8.spec.js     |  135 +
 cordova-lib/spec-plugman/platforms/wp7.spec.js  |  129 +
 cordova-lib/spec-plugman/platforms/wp8.spec.js  |  150 +
 cordova-lib/spec-plugman/plugins/.gitkeep       |    0
 .../spec-plugman/plugins/AndroidJS/plugin.xml   |   34 +
 .../plugins/AndroidJS/www/android.js            |    1 +
 .../plugins/ChildBrowser/plugin.xml             |  143 +
 .../ChildBrowser/src/android/ChildBrowser.java  |   19 +
 .../src/ios/ChildBrowser.bundle/arrow_left.png  |  Bin 0 -> 2946 bytes
 .../ios/ChildBrowser.bundle/arrow_left@2x.png   |  Bin 0 -> 2946 bytes
 .../src/ios/ChildBrowser.bundle/arrow_right.png |  Bin 0 -> 2946 bytes
 .../ios/ChildBrowser.bundle/arrow_right@2x.png  |  Bin 0 -> 2946 bytes
 .../src/ios/ChildBrowser.bundle/but_refresh.png |  Bin 0 -> 3369 bytes
 .../ios/ChildBrowser.bundle/but_refresh@2x.png  |  Bin 0 -> 3369 bytes
 .../src/ios/ChildBrowser.bundle/compass.png     |  Bin 0 -> 3035 bytes
 .../src/ios/ChildBrowser.bundle/compass@2x.png  |  Bin 0 -> 3035 bytes
 .../ChildBrowser/src/ios/ChildBrowserCommand.h  |   49 +
 .../ChildBrowser/src/ios/ChildBrowserCommand.m  |   86 +
 .../src/ios/ChildBrowserViewController.h        |   73 +
 .../src/ios/ChildBrowserViewController.m        |  239 +
 .../src/ios/ChildBrowserViewController.xib      |  875 ++
 .../ChildBrowser/src/ios/TargetDirTest.h        |   20 +
 .../ChildBrowser/src/ios/TargetDirTest.m        |    1 +
 .../src/ios/preserveDirs/PreserveDirsTest.h     |   20 +
 .../src/ios/preserveDirs/PreserveDirsTest.m     |    1 +
 .../plugins/ChildBrowser/www/childbrowser.js    |   19 +
 .../ChildBrowser/www/childbrowser/image.jpg     |    1 +
 .../ChildBrowser/www/childbrowser_file.html     |    1 +
 .../plugins/ConfigTestPlugin/plugin.xml         |   37 +
 .../spec-plugman/plugins/Contacts/plugin.xml    |  143 +
 .../Contacts/src/android/ContactAccessor.java   |  198 +
 .../src/android/ContactAccessorSdk5.java        | 2183 +++++
 .../Contacts/src/android/ContactManager.java    |  122 +
 .../src/blackberry10/ContactActivity.js         |   26 +
 .../Contacts/src/blackberry10/ContactAddress.js |   30 +
 .../Contacts/src/blackberry10/ContactError.js   |   30 +
 .../Contacts/src/blackberry10/ContactField.js   |   27 +
 .../src/blackberry10/ContactFindOptions.js      |   50 +
 .../Contacts/src/blackberry10/ContactName.js    |   39 +
 .../Contacts/src/blackberry10/ContactNews.js    |   26 +
 .../src/blackberry10/ContactOrganization.js     |   22 +
 .../Contacts/src/blackberry10/ContactPhoto.js   |   23 +
 .../Contacts/src/blackberry10/contactConsts.js  |  225 +
 .../Contacts/src/blackberry10/contactUtils.js   |  223 +
 .../plugins/Contacts/src/blackberry10/index.js  |  374 +
 .../Contacts/src/blackberry10/plugin.xml        |   41 +
 .../plugins/Contacts/src/ios/CDVContact.h       |  136 +
 .../plugins/Contacts/src/ios/CDVContact.m       | 1752 ++++
 .../plugins/Contacts/src/ios/CDVContacts.h      |  151 +
 .../plugins/Contacts/src/ios/CDVContacts.m      |  593 ++
 .../plugins/Contacts/src/wp/Contacts.cs         |  664 ++
 .../plugins/Contacts/www/Contact.js             |  177 +
 .../plugins/Contacts/www/ContactAddress.js      |   46 +
 .../plugins/Contacts/www/ContactError.js        |   42 +
 .../plugins/Contacts/www/ContactField.js        |   37 +
 .../plugins/Contacts/www/ContactFindOptions.js  |   34 +
 .../plugins/Contacts/www/ContactName.js         |   41 +
 .../plugins/Contacts/www/ContactOrganization.js |   44 +
 .../plugins/Contacts/www/contacts.js            |   76 +
 .../plugins/Contacts/www/ios/Contact.js         |   51 +
 .../plugins/Contacts/www/ios/contacts.js        |   62 +
 .../plugins/DummyPlugin/android-resource.xml    |    1 +
 .../spec-plugman/plugins/DummyPlugin/plugin.xml |  203 +
 .../DummyPlugin/src/android/DummyPlugin.java    |   19 +
 .../plugins/DummyPlugin/src/android/TestLib.jar |    0
 .../DummyPlugin/src/blackberry10/index.js       |   19 +
 .../src/ios/Custom.framework/someFheader.h      |    0
 .../src/ios/Custom.framework/somebinlib         |    0
 .../DummyPlugin/src/ios/DummyPlugin.bundle      |    0
 .../DummyPlugin/src/ios/DummyPluginCommand.h    |    0
 .../DummyPlugin/src/ios/DummyPluginCommand.m    |    0
 .../DummyPlugin/src/ios/SourceWithFramework.m   |    0
 .../plugins/DummyPlugin/src/ios/TargetDirTest.h |    0
 .../plugins/DummyPlugin/src/ios/TargetDirTest.m |    0
 .../DummyPlugin/src/ios/libsqlite3.dylib        |    0
 .../plugins/DummyPlugin/src/tizen/dummer.js     |    0
 .../plugins/DummyPlugin/src/windows8/dummer.js  |    0
 .../plugins/DummyPlugin/src/wp7/DummyPlugin.cs  |   19 +
 .../plugins/DummyPlugin/src/wp8/DummyPlugin.cs  |   19 +
 .../plugins/DummyPlugin/www/dummyplugin.js      |   19 +
 .../DummyPlugin/www/dummyplugin/image.jpg       |    1 +
 .../plugins/EnginePlugin/megaBoringVersion      |   23 +
 .../plugins/EnginePlugin/megaFunVersion         |   23 +
 .../plugins/EnginePlugin/plugin.xml             |   33 +
 .../plugins/EnginePluginAndroid/plugin.xml      |   32 +
 .../plugins/EnginePluginiOS/plugin.xml          |   34 +
 .../plugins/FaultyPlugin/plugin.xml             |  161 +
 .../FaultyPlugin/src/android/FaultyPlugin.java  |   19 +
 .../FaultyPlugin/src/blackberry10/client.js     |    0
 .../plugins/FaultyPlugin/src/ios/FaultyPlugin.h |   49 +
 .../plugins/FaultyPlugin/src/ios/FaultyPlugin.m |   86 +
 .../FaultyPlugin/src/windows8/faultyPlugin.js   |    0
 .../FaultyPlugin/src/wp7/FaultyPlugin.cs        |   19 +
 .../FaultyPlugin/src/wp8/FaultyPlugin.cs        |   19 +
 .../plugins/PluginsPlistOnly/plugin.xml         |   31 +
 .../plugins/VariablePlugin/plugin.xml           |   59 +
 .../plugins/WebNotifications/plugin.xml         |   47 +
 .../WebNotifications/src/ios/AppDelegate.m.diff |   18 +
 .../WebNotifications/src/ios/WebNotifications.h |   35 +
 .../WebNotifications/src/ios/WebNotifications.m |  124 +
 .../WebNotifications/www/webnotifications.js    |  123 +
 .../plugins/WeblessPlugin/plugin.xml            |   83 +
 .../src/android/WeblessPlugin.java              |   19 +
 .../src/ios/WeblessPlugin.bundle/arrow_left.png |  Bin 0 -> 2946 bytes
 .../ios/WeblessPlugin.bundle/arrow_left@2x.png  |  Bin 0 -> 2946 bytes
 .../ios/WeblessPlugin.bundle/arrow_right.png    |  Bin 0 -> 2946 bytes
 .../ios/WeblessPlugin.bundle/arrow_right@2x.png |  Bin 0 -> 2946 bytes
 .../ios/WeblessPlugin.bundle/but_refresh.png    |  Bin 0 -> 3369 bytes
 .../ios/WeblessPlugin.bundle/but_refresh@2x.png |  Bin 0 -> 3369 bytes
 .../src/ios/WeblessPlugin.bundle/compass.png    |  Bin 0 -> 3035 bytes
 .../src/ios/WeblessPlugin.bundle/compass@2x.png |  Bin 0 -> 3035 bytes
 .../src/ios/WeblessPluginCommand.h              |   49 +
 .../src/ios/WeblessPluginCommand.m              |   86 +
 .../src/ios/WeblessPluginViewController.h       |   73 +
 .../src/ios/WeblessPluginViewController.m       |  239 +
 .../src/ios/WeblessPluginViewController.xib     |  875 ++
 .../plugins/cordova.echo/.gitignore             |    1 +
 .../plugins/cordova.echo/plugin.xml             |   24 +
 .../cordova.echo/src/blackberry10/index.js      |   85 +
 .../src/blackberry10/native/device/echoJnext.so |  Bin 0 -> 1291818 bytes
 .../blackberry10/native/public/json/autolink.h  |   19 +
 .../blackberry10/native/public/json/config.h    |   43 +
 .../blackberry10/native/public/json/features.h  |   42 +
 .../blackberry10/native/public/json/forwards.h  |   39 +
 .../src/blackberry10/native/public/json/json.h  |   10 +
 .../blackberry10/native/public/json/reader.h    |  196 +
 .../src/blackberry10/native/public/json/value.h | 1069 +++
 .../blackberry10/native/public/json/writer.h    |  174 +
 .../native/public/json_batchallocator.h         |  125 +
 .../native/public/json_internalarray.inl        |  448 +
 .../native/public/json_internalmap.inl          |  607 ++
 .../blackberry10/native/public/json_reader.cpp  |  894 ++
 .../blackberry10/native/public/json_value.cpp   | 1726 ++++
 .../native/public/json_valueiterator.inl        |  292 +
 .../blackberry10/native/public/json_writer.cpp  |  829 ++
 .../src/blackberry10/native/public/plugin.cpp   |  320 +
 .../src/blackberry10/native/public/plugin.h     |   70 +
 .../blackberry10/native/public/tokenizer.cpp    |  222 +
 .../src/blackberry10/native/public/tokenizer.h  |   55 +
 .../blackberry10/native/simulator/echoJnext.so  |  Bin 0 -> 231778 bytes
 .../src/blackberry10/native/src/echo.cpp        |  121 +
 .../src/blackberry10/native/src/echo.hpp        |   45 +
 .../plugins/cordova.echo/www/client.js          |   53 +
 .../plugins/dependencies/A/plugin.xml           |   60 +
 .../plugins/dependencies/A/src/android/A.java   |    0
 .../dependencies/A/src/ios/APluginCommand.h     |    0
 .../dependencies/A/src/ios/APluginCommand.m     |    0
 .../plugins/dependencies/A/www/plugin-a.js      |    0
 .../plugins/dependencies/B/plugin.xml           |   60 +
 .../plugins/dependencies/B/src/android/B.java   |    0
 .../dependencies/B/src/ios/BPluginCommand.h     |    0
 .../dependencies/B/src/ios/BPluginCommand.m     |    0
 .../plugins/dependencies/B/www/plugin-b.js      |    0
 .../plugins/dependencies/C/plugin.xml           |   57 +
 .../plugins/dependencies/C/src/android/C.java   |    0
 .../dependencies/C/src/ios/CPluginCommand.h     |    0
 .../dependencies/C/src/ios/CPluginCommand.m     |    0
 .../plugins/dependencies/C/www/plugin-c.js      |    0
 .../plugins/dependencies/D/plugin.xml           |   57 +
 .../plugins/dependencies/D/src/android/D.java   |    0
 .../dependencies/D/src/ios/DPluginCommand.h     |    0
 .../dependencies/D/src/ios/DPluginCommand.m     |    0
 .../plugins/dependencies/D/www/plugin-d.js      |    0
 .../plugins/dependencies/E/plugin.xml           |   59 +
 .../plugins/dependencies/E/src/android/E.java   |    0
 .../dependencies/E/src/ios/EPluginCommand.h     |    0
 .../dependencies/E/src/ios/EPluginCommand.m     |    0
 .../plugins/dependencies/E/www/plugin-d.js      |    0
 .../plugins/dependencies/F/plugin.xml           |   60 +
 .../plugins/dependencies/F/src/android/F.java   |    0
 .../dependencies/F/src/ios/FPluginCommand.h     |    0
 .../dependencies/F/src/ios/FPluginCommand.m     |    0
 .../plugins/dependencies/F/www/plugin-f.js      |    0
 .../plugins/dependencies/G/plugin.xml           |   59 +
 .../plugins/dependencies/G/src/android/G.java   |    0
 .../dependencies/G/src/ios/EPluginCommand.m     |    0
 .../dependencies/G/src/ios/GPluginCommand.h     |    0
 .../plugins/dependencies/G/www/plugin-g.js      |    0
 .../plugins/dependencies/H/plugin.xml           |   59 +
 .../plugins/dependencies/H/src/android/H.java   |    0
 .../dependencies/H/src/ios/HPluginCommand.h     |    0
 .../dependencies/H/src/ios/HPluginCommand.m     |    0
 .../plugins/dependencies/H/www/plugin-h.js      |    0
 .../spec-plugman/plugins/dependencies/README.md |   10 +
 .../plugins/dependencies/meta/D/plugin.xml      |   61 +
 .../dependencies/meta/D/src/android/D.java      |    0
 .../meta/D/src/ios/DPluginCommand.h             |    0
 .../meta/D/src/ios/DPluginCommand.m             |    0
 .../plugins/dependencies/meta/D/www/plugin-d.js |    0
 .../dependencies/meta/subdir/E/plugin.xml       |   57 +
 .../meta/subdir/E/src/android/E.java            |    0
 .../meta/subdir/E/src/ios/EPluginCommand.h      |    0
 .../meta/subdir/E/src/ios/EPluginCommand.m      |    0
 .../dependencies/meta/subdir/E/www/plugin-e.js  |    0
 .../plugins/dependencies/subdir/E/plugin.xml    |   57 +
 .../dependencies/subdir/E/src/android/E.java    |    0
 .../subdir/E/src/ios/EPluginCommand.h           |    0
 .../subdir/E/src/ios/EPluginCommand.m           |    0
 .../dependencies/subdir/E/www/plugin-e.js       |    0
 .../plugins/multiple-children/plugin.xml        |  108 +
 .../plugins/shared-deps-multi-child/plugin.xml  |   34 +
 cordova-lib/spec-plugman/prepare.spec.js        |   59 +
 cordova-lib/spec-plugman/projects/.gitkeep      |    0
 .../android_install/AndroidManifest.xml         |   20 +
 .../android_install/cordova/android_sdk_version |    1 +
 .../projects/android_install/cordova/version    |    1 +
 .../android_install/cordova/version.bat         |    2 +
 .../projects/android_one/AndroidManifest.xml    |   71 +
 .../projects/android_one/assets/www/.gitkeep    |    0
 .../projects/android_one/assets/www/cordova.js  | 6848 +++++++++++++++
 .../projects/android_one/cordova/appinfo.jar    |  Bin 0 -> 1574 bytes
 .../projects/android_one/cordova/build          |   23 +
 .../projects/android_one/cordova/clean          |   23 +
 .../projects/android_one/cordova/lib/cordova    |  386 +
 .../android_one/cordova/lib/install-device      |   23 +
 .../android_one/cordova/lib/install-emulator    |   23 +
 .../android_one/cordova/lib/list-devices        |   23 +
 .../cordova/lib/list-emulator-images            |   23 +
 .../cordova/lib/list-started-emulators          |   23 +
 .../android_one/cordova/lib/start-emulator      |   23 +
 .../projects/android_one/cordova/log            |   23 +
 .../projects/android_one/cordova/run            |   23 +
 .../projects/android_one/cordova/version        |   32 +
 .../projects/android_one/res/xml/plugins.xml    |   38 +
 .../projects/android_one/src/.gitkeep           |    0
 .../projects/android_two/AndroidManifest.xml    |   69 +
 .../projects/android_two/assets/www/.gitkeep    |    0
 .../projects/android_two/res/xml/config.xml     |   54 +
 .../projects/android_two/src/.gitkeep           |    0
 .../android_two_no_perms/AndroidManifest.xml    |   49 +
 .../android_two_no_perms/assets/www/.gitkeep    |    0
 .../android_two_no_perms/res/xml/config.xml     |   54 +
 .../projects/android_two_no_perms/src/.gitkeep  |    0
 .../android_uninstall/AndroidManifest.xml       |   20 +
 .../projects/android_uninstall/cordova/version  |    1 +
 .../android_uninstall/cordova/version.bat       |    2 +
 .../blackberry10/native/device/chrome/.gitkeep  |    0
 .../native/device/plugins/jnext/auth.txt        |    3 +
 .../native/simulator/chrome/.gitkeep            |    0
 .../native/simulator/plugins/jnext/auth.txt     |    3 +
 .../projects/blackberry10/www/config.xml        |   97 +
 .../CordovaLib.xcodeproj/project.pbxproj        |  636 ++
 .../SampleApp.xcodeproj/project.orig.pbxproj    |  498 ++
 .../SampleApp.xcodeproj/project.pbxproj         |  496 ++
 .../SampleApp/SampleApp-Info.plist              |   78 +
 .../ios-config-xml/SampleApp/config.xml         |   59 +
 .../projects/ios-config-xml/www/.gitkeep        |    0
 .../CordovaLib.xcodeproj/project.pbxproj        |  636 ++
 .../SampleApp.xcodeproj/project.orig.pbxproj    |  498 ++
 .../SampleApp.xcodeproj/project.pbxproj         |  498 ++
 .../projects/ios-plist/SampleApp/PhoneGap.plist |   53 +
 .../ios-plist/SampleApp/SampleApp-Info.plist    |   80 +
 .../projects/ios-plist/www/.gitkeep             |    0
 .../multiple-children/AndroidManifest.xml       |   69 +
 .../multiple-children/res/xml/plugins.xml       |   38 +
 .../spec-plugman/projects/tizen/www/config.xml  |    2 +
 .../windows8/CordovaApp_TemporaryKey.pfx        |  Bin 0 -> 2504 bytes
 .../projects/windows8/TestApp.jsproj            |   81 +
 .../spec-plugman/projects/windows8/TestApp.sln  |   46 +
 .../projects/windows8/package.appxmanifest      |   27 +
 .../projects/windows8/www/cordova-2.6.0.js      | 8075 ++++++++++++++++++
 .../projects/windows8/www/css/index.css         |  115 +
 .../projects/windows8/www/img/logo.png          |  Bin 0 -> 11600 bytes
 .../projects/windows8/www/img/smalllogo.png     |  Bin 0 -> 2831 bytes
 .../projects/windows8/www/img/splashscreen.png  |  Bin 0 -> 24855 bytes
 .../projects/windows8/www/img/storelogo.png     |  Bin 0 -> 4052 bytes
 .../projects/windows8/www/index.html            |   42 +
 .../projects/windows8/www/js/index.js           |   49 +
 .../projects/wp7/CordovaAppProj.csproj          |   76 +
 .../projects/wp7/Properties/WMAppManifest.xml   |   28 +
 .../projects/wp8/CordovaAppProj.csproj          |  136 +
 .../projects/wp8/Properties/WMAppManifest.xml   |   39 +
 .../spec-plugman/projects/www-only/.gitkeep     |    0
 cordova-lib/spec-plugman/publish.spec.js        |   11 +
 .../spec-plugman/registry/registry.spec.js      |  134 +
 cordova-lib/spec-plugman/search.spec.js         |   11 +
 cordova-lib/spec-plugman/uninstall.spec.js      |  289 +
 cordova-lib/spec-plugman/unpublish.spec.js      |   11 +
 .../spec-plugman/util/action-stack.spec.js      |   58 +
 .../spec-plugman/util/config-changes.spec.js    |  449 +
 cordova-lib/spec-plugman/util/csproj.spec.js    |   97 +
 .../spec-plugman/util/dependencies.spec.js      |   41 +
 cordova-lib/spec-plugman/util/plugins.spec.js   |   82 +
 .../spec-plugman/util/xml-helpers.spec.js       |  170 +
 cordova-lib/spec-plugman/wrappers.spec.js       |   40 +
 cordova-lib/src/plugman/adduser.js              |    5 +
 cordova-lib/src/plugman/config.js               |    5 +
 cordova-lib/src/plugman/create.js               |   81 +
 cordova-lib/src/plugman/events.js               |    2 +
 cordova-lib/src/plugman/fetch.js                |  175 +
 cordova-lib/src/plugman/info.js                 |    6 +
 cordova-lib/src/plugman/install.js              |  629 ++
 cordova-lib/src/plugman/owner.js                |    6 +
 cordova-lib/src/plugman/platform.js             |  119 +
 cordova-lib/src/plugman/platform_operation.js   |    5 +
 cordova-lib/src/plugman/platforms.js            |   12 +
 .../src/plugman/platforms/amazon-fireos.js      |   88 +
 cordova-lib/src/plugman/platforms/android.js    |   89 +
 .../src/plugman/platforms/blackberry10.js       |   94 +
 cordova-lib/src/plugman/platforms/common.js     |   94 +
 cordova-lib/src/plugman/platforms/firefoxos.js  |   72 +
 cordova-lib/src/plugman/platforms/ios.js        |  216 +
 cordova-lib/src/plugman/platforms/tizen.js      |   72 +
 cordova-lib/src/plugman/platforms/ubuntu.js     |  124 +
 cordova-lib/src/plugman/platforms/windows8.js   |  134 +
 cordova-lib/src/plugman/platforms/wp7.js        |   91 +
 cordova-lib/src/plugman/platforms/wp8.js        |  113 +
 cordova-lib/src/plugman/plugman.js              |  207 +
 cordova-lib/src/plugman/prepare.js              |  232 +
 cordova-lib/src/plugman/publish.js              |    6 +
 cordova-lib/src/plugman/registry/manifest.js    |   95 +
 cordova-lib/src/plugman/registry/registry.js    |  290 +
 cordova-lib/src/plugman/registry/whitelist.js   |   21 +
 cordova-lib/src/plugman/search.js               |    5 +
 cordova-lib/src/plugman/uninstall.js            |  288 +
 cordova-lib/src/plugman/unpublish.js            |    5 +
 cordova-lib/src/plugman/util/action-stack.js    |   85 +
 cordova-lib/src/plugman/util/config-changes.js  |  812 ++
 cordova-lib/src/plugman/util/csproj.js          |  124 +
 cordova-lib/src/plugman/util/default-engines.js |   36 +
 cordova-lib/src/plugman/util/dependencies.js    |   96 +
 cordova-lib/src/plugman/util/metadata.js        |   19 +
 cordova-lib/src/plugman/util/plist-helpers.js   |   88 +
 cordova-lib/src/plugman/util/plugins.js         |  100 +
 .../src/plugman/util/search-and-replace.js      |   37 +
 cordova-lib/src/plugman/util/w8jsproj.js        |  239 +
 cordova-lib/src/plugman/util/xml-helpers.js     |  196 +
 cordova-lib/templates/base.js                   |    5 +
 .../templates/platforms/android/android.xml     |   12 +
 .../templates/platforms/android/base.java       |   32 +
 cordova-lib/templates/platforms/ios/base.m      |   28 +
 cordova-lib/templates/platforms/ios/ios.xml     |    9 +
 doc/base.js                                     |    5 -
 doc/platforms/android/android.xml               |   12 -
 doc/platforms/android/base.java                 |   32 -
 doc/platforms/ios/base.m                        |   28 -
 doc/platforms/ios/ios.xml                       |    9 -
 plugman.js                                      |  207 -
 spec/add_platform.spec.js                       |   64 -
 spec/adduser.spec.js                            |   11 -
 spec/common.js                                  |   62 -
 spec/config.spec.js                             |   12 -
 spec/create.spec.js                             |   62 -
 spec/fetch.spec.js                              |  211 -
 spec/info.spec.js                               |   15 -
 spec/install.spec.js                            |  472 -
 spec/owner.spec.js                              |   12 -
 spec/platform.spec.js                           |   26 -
 spec/platforms/amazon-fireos.spec.js            |  139 -
 spec/platforms/android.spec.js                  |  156 -
 spec/platforms/blackberry10.spec.js             |  148 -
 spec/platforms/common.spec.js                   |  130 -
 spec/platforms/ios.spec.js                      |  390 -
 spec/platforms/tizen.spec.js                    |   54 -
 spec/platforms/windows8.spec.js                 |  135 -
 spec/platforms/wp7.spec.js                      |  129 -
 spec/platforms/wp8.spec.js                      |  150 -
 spec/plugins/.gitkeep                           |    0
 spec/plugins/AndroidJS/plugin.xml               |   34 -
 spec/plugins/AndroidJS/www/android.js           |    1 -
 spec/plugins/ChildBrowser/plugin.xml            |  143 -
 .../ChildBrowser/src/android/ChildBrowser.java  |   19 -
 .../src/ios/ChildBrowser.bundle/arrow_left.png  |  Bin 2946 -> 0 bytes
 .../ios/ChildBrowser.bundle/arrow_left@2x.png   |  Bin 2946 -> 0 bytes
 .../src/ios/ChildBrowser.bundle/arrow_right.png |  Bin 2946 -> 0 bytes
 .../ios/ChildBrowser.bundle/arrow_right@2x.png  |  Bin 2946 -> 0 bytes
 .../src/ios/ChildBrowser.bundle/but_refresh.png |  Bin 3369 -> 0 bytes
 .../ios/ChildBrowser.bundle/but_refresh@2x.png  |  Bin 3369 -> 0 bytes
 .../src/ios/ChildBrowser.bundle/compass.png     |  Bin 3035 -> 0 bytes
 .../src/ios/ChildBrowser.bundle/compass@2x.png  |  Bin 3035 -> 0 bytes
 .../ChildBrowser/src/ios/ChildBrowserCommand.h  |   49 -
 .../ChildBrowser/src/ios/ChildBrowserCommand.m  |   86 -
 .../src/ios/ChildBrowserViewController.h        |   73 -
 .../src/ios/ChildBrowserViewController.m        |  239 -
 .../src/ios/ChildBrowserViewController.xib      |  875 --
 .../ChildBrowser/src/ios/TargetDirTest.h        |   20 -
 .../ChildBrowser/src/ios/TargetDirTest.m        |    1 -
 .../src/ios/preserveDirs/PreserveDirsTest.h     |   20 -
 .../src/ios/preserveDirs/PreserveDirsTest.m     |    1 -
 spec/plugins/ChildBrowser/www/childbrowser.js   |   19 -
 .../ChildBrowser/www/childbrowser/image.jpg     |    1 -
 .../ChildBrowser/www/childbrowser_file.html     |    1 -
 spec/plugins/ConfigTestPlugin/plugin.xml        |   37 -
 spec/plugins/Contacts/plugin.xml                |  143 -
 .../Contacts/src/android/ContactAccessor.java   |  198 -
 .../src/android/ContactAccessorSdk5.java        | 2183 -----
 .../Contacts/src/android/ContactManager.java    |  122 -
 .../src/blackberry10/ContactActivity.js         |   26 -
 .../Contacts/src/blackberry10/ContactAddress.js |   30 -
 .../Contacts/src/blackberry10/ContactError.js   |   30 -
 .../Contacts/src/blackberry10/ContactField.js   |   27 -
 .../src/blackberry10/ContactFindOptions.js      |   50 -
 .../Contacts/src/blackberry10/ContactName.js    |   39 -
 .../Contacts/src/blackberry10/ContactNews.js    |   26 -
 .../src/blackberry10/ContactOrganization.js     |   22 -
 .../Contacts/src/blackberry10/ContactPhoto.js   |   23 -
 .../Contacts/src/blackberry10/contactConsts.js  |  225 -
 .../Contacts/src/blackberry10/contactUtils.js   |  223 -
 spec/plugins/Contacts/src/blackberry10/index.js |  374 -
 .../Contacts/src/blackberry10/plugin.xml        |   41 -
 spec/plugins/Contacts/src/ios/CDVContact.h      |  136 -
 spec/plugins/Contacts/src/ios/CDVContact.m      | 1752 ----
 spec/plugins/Contacts/src/ios/CDVContacts.h     |  151 -
 spec/plugins/Contacts/src/ios/CDVContacts.m     |  593 --
 spec/plugins/Contacts/src/wp/Contacts.cs        |  664 --
 spec/plugins/Contacts/www/Contact.js            |  177 -
 spec/plugins/Contacts/www/ContactAddress.js     |   46 -
 spec/plugins/Contacts/www/ContactError.js       |   42 -
 spec/plugins/Contacts/www/ContactField.js       |   37 -
 spec/plugins/Contacts/www/ContactFindOptions.js |   34 -
 spec/plugins/Contacts/www/ContactName.js        |   41 -
 .../plugins/Contacts/www/ContactOrganization.js |   44 -
 spec/plugins/Contacts/www/contacts.js           |   76 -
 spec/plugins/Contacts/www/ios/Contact.js        |   51 -
 spec/plugins/Contacts/www/ios/contacts.js       |   62 -
 spec/plugins/DummyPlugin/android-resource.xml   |    1 -
 spec/plugins/DummyPlugin/plugin.xml             |  203 -
 .../DummyPlugin/src/android/DummyPlugin.java    |   19 -
 .../plugins/DummyPlugin/src/android/TestLib.jar |    0
 .../DummyPlugin/src/blackberry10/index.js       |   19 -
 .../src/ios/Custom.framework/someFheader.h      |    0
 .../src/ios/Custom.framework/somebinlib         |    0
 .../DummyPlugin/src/ios/DummyPlugin.bundle      |    0
 .../DummyPlugin/src/ios/DummyPluginCommand.h    |    0
 .../DummyPlugin/src/ios/DummyPluginCommand.m    |    0
 .../DummyPlugin/src/ios/SourceWithFramework.m   |    0
 .../plugins/DummyPlugin/src/ios/TargetDirTest.h |    0
 .../plugins/DummyPlugin/src/ios/TargetDirTest.m |    0
 .../DummyPlugin/src/ios/libsqlite3.dylib        |    0
 spec/plugins/DummyPlugin/src/tizen/dummer.js    |    0
 spec/plugins/DummyPlugin/src/windows8/dummer.js |    0
 spec/plugins/DummyPlugin/src/wp7/DummyPlugin.cs |   19 -
 spec/plugins/DummyPlugin/src/wp8/DummyPlugin.cs |   19 -
 spec/plugins/DummyPlugin/www/dummyplugin.js     |   19 -
 .../DummyPlugin/www/dummyplugin/image.jpg       |    1 -
 spec/plugins/EnginePlugin/megaBoringVersion     |   23 -
 spec/plugins/EnginePlugin/megaFunVersion        |   23 -
 spec/plugins/EnginePlugin/plugin.xml            |   33 -
 spec/plugins/EnginePluginAndroid/plugin.xml     |   32 -
 spec/plugins/EnginePluginiOS/plugin.xml         |   34 -
 spec/plugins/FaultyPlugin/plugin.xml            |  161 -
 .../FaultyPlugin/src/android/FaultyPlugin.java  |   19 -
 .../FaultyPlugin/src/blackberry10/client.js     |    0
 .../plugins/FaultyPlugin/src/ios/FaultyPlugin.h |   49 -
 .../plugins/FaultyPlugin/src/ios/FaultyPlugin.m |   86 -
 .../FaultyPlugin/src/windows8/faultyPlugin.js   |    0
 .../FaultyPlugin/src/wp7/FaultyPlugin.cs        |   19 -
 .../FaultyPlugin/src/wp8/FaultyPlugin.cs        |   19 -
 spec/plugins/PluginsPlistOnly/plugin.xml        |   31 -
 spec/plugins/VariablePlugin/plugin.xml          |   59 -
 spec/plugins/WebNotifications/plugin.xml        |   47 -
 .../WebNotifications/src/ios/AppDelegate.m.diff |   18 -
 .../WebNotifications/src/ios/WebNotifications.h |   35 -
 .../WebNotifications/src/ios/WebNotifications.m |  124 -
 .../WebNotifications/www/webnotifications.js    |  123 -
 spec/plugins/WeblessPlugin/plugin.xml           |   83 -
 .../src/android/WeblessPlugin.java              |   19 -
 .../src/ios/WeblessPlugin.bundle/arrow_left.png |  Bin 2946 -> 0 bytes
 .../ios/WeblessPlugin.bundle/arrow_left@2x.png  |  Bin 2946 -> 0 bytes
 .../ios/WeblessPlugin.bundle/arrow_right.png    |  Bin 2946 -> 0 bytes
 .../ios/WeblessPlugin.bundle/arrow_right@2x.png |  Bin 2946 -> 0 bytes
 .../ios/WeblessPlugin.bundle/but_refresh.png    |  Bin 3369 -> 0 bytes
 .../ios/WeblessPlugin.bundle/but_refresh@2x.png |  Bin 3369 -> 0 bytes
 .../src/ios/WeblessPlugin.bundle/compass.png    |  Bin 3035 -> 0 bytes
 .../src/ios/WeblessPlugin.bundle/compass@2x.png |  Bin 3035 -> 0 bytes
 .../src/ios/WeblessPluginCommand.h              |   49 -
 .../src/ios/WeblessPluginCommand.m              |   86 -
 .../src/ios/WeblessPluginViewController.h       |   73 -
 .../src/ios/WeblessPluginViewController.m       |  239 -
 .../src/ios/WeblessPluginViewController.xib     |  875 --
 spec/plugins/cordova.echo/.gitignore            |    1 -
 spec/plugins/cordova.echo/plugin.xml            |   24 -
 .../cordova.echo/src/blackberry10/index.js      |   85 -
 .../src/blackberry10/native/device/echoJnext.so |  Bin 1291818 -> 0 bytes
 .../blackberry10/native/public/json/autolink.h  |   19 -
 .../blackberry10/native/public/json/config.h    |   43 -
 .../blackberry10/native/public/json/features.h  |   42 -
 .../blackberry10/native/public/json/forwards.h  |   39 -
 .../src/blackberry10/native/public/json/json.h  |   10 -
 .../blackberry10/native/public/json/reader.h    |  196 -
 .../src/blackberry10/native/public/json/value.h | 1069 ---
 .../blackberry10/native/public/json/writer.h    |  174 -
 .../native/public/json_batchallocator.h         |  125 -
 .../native/public/json_internalarray.inl        |  448 -
 .../native/public/json_internalmap.inl          |  607 --
 .../blackberry10/native/public/json_reader.cpp  |  894 --
 .../blackberry10/native/public/json_value.cpp   | 1726 ----
 .../native/public/json_valueiterator.inl        |  292 -
 .../blackberry10/native/public/json_writer.cpp  |  829 --
 .../src/blackberry10/native/public/plugin.cpp   |  320 -
 .../src/blackberry10/native/public/plugin.h     |   70 -
 .../blackberry10/native/public/tokenizer.cpp    |  222 -
 .../src/blackberry10/native/public/tokenizer.h  |   55 -
 .../blackberry10/native/simulator/echoJnext.so  |  Bin 231778 -> 0 bytes
 .../src/blackberry10/native/src/echo.cpp        |  121 -
 .../src/blackberry10/native/src/echo.hpp        |   45 -
 spec/plugins/cordova.echo/www/client.js         |   53 -
 spec/plugins/dependencies/A/plugin.xml          |   60 -
 spec/plugins/dependencies/A/src/android/A.java  |    0
 .../dependencies/A/src/ios/APluginCommand.h     |    0
 .../dependencies/A/src/ios/APluginCommand.m     |    0
 spec/plugins/dependencies/A/www/plugin-a.js     |    0
 spec/plugins/dependencies/B/plugin.xml          |   60 -
 spec/plugins/dependencies/B/src/android/B.java  |    0
 .../dependencies/B/src/ios/BPluginCommand.h     |    0
 .../dependencies/B/src/ios/BPluginCommand.m     |    0
 spec/plugins/dependencies/B/www/plugin-b.js     |    0
 spec/plugins/dependencies/C/plugin.xml          |   57 -
 spec/plugins/dependencies/C/src/android/C.java  |    0
 .../dependencies/C/src/ios/CPluginCommand.h     |    0
 .../dependencies/C/src/ios/CPluginCommand.m     |    0
 spec/plugins/dependencies/C/www/plugin-c.js     |    0
 spec/plugins/dependencies/D/plugin.xml          |   57 -
 spec/plugins/dependencies/D/src/android/D.java  |    0
 .../dependencies/D/src/ios/DPluginCommand.h     |    0
 .../dependencies/D/src/ios/DPluginCommand.m     |    0
 spec/plugins/dependencies/D/www/plugin-d.js     |    0
 spec/plugins/dependencies/E/plugin.xml          |   59 -
 spec/plugins/dependencies/E/src/android/E.java  |    0
 .../dependencies/E/src/ios/EPluginCommand.h     |    0
 .../dependencies/E/src/ios/EPluginCommand.m     |    0
 spec/plugins/dependencies/E/www/plugin-d.js     |    0
 spec/plugins/dependencies/F/plugin.xml          |   60 -
 spec/plugins/dependencies/F/src/android/F.java  |    0
 .../dependencies/F/src/ios/FPluginCommand.h     |    0
 .../dependencies/F/src/ios/FPluginCommand.m     |    0
 spec/plugins/dependencies/F/www/plugin-f.js     |    0
 spec/plugins/dependencies/G/plugin.xml          |   59 -
 spec/plugins/dependencies/G/src/android/G.java  |    0
 .../dependencies/G/src/ios/EPluginCommand.m     |    0
 .../dependencies/G/src/ios/GPluginCommand.h     |    0
 spec/plugins/dependencies/G/www/plugin-g.js     |    0
 spec/plugins/dependencies/H/plugin.xml          |   59 -
 spec/plugins/dependencies/H/src/android/H.java  |    0
 .../dependencies/H/src/ios/HPluginCommand.h     |    0
 .../dependencies/H/src/ios/HPluginCommand.m     |    0
 spec/plugins/dependencies/H/www/plugin-h.js     |    0
 spec/plugins/dependencies/README.md             |   10 -
 spec/plugins/dependencies/meta/D/plugin.xml     |   61 -
 .../dependencies/meta/D/src/android/D.java      |    0
 .../meta/D/src/ios/DPluginCommand.h             |    0
 .../meta/D/src/ios/DPluginCommand.m             |    0
 .../plugins/dependencies/meta/D/www/plugin-d.js |    0
 .../dependencies/meta/subdir/E/plugin.xml       |   57 -
 .../meta/subdir/E/src/android/E.java            |    0
 .../meta/subdir/E/src/ios/EPluginCommand.h      |    0
 .../meta/subdir/E/src/ios/EPluginCommand.m      |    0
 .../dependencies/meta/subdir/E/www/plugin-e.js  |    0
 spec/plugins/dependencies/subdir/E/plugin.xml   |   57 -
 .../dependencies/subdir/E/src/android/E.java    |    0
 .../subdir/E/src/ios/EPluginCommand.h           |    0
 .../subdir/E/src/ios/EPluginCommand.m           |    0
 .../dependencies/subdir/E/www/plugin-e.js       |    0
 spec/plugins/multiple-children/plugin.xml       |  108 -
 spec/plugins/shared-deps-multi-child/plugin.xml |   34 -
 spec/prepare.spec.js                            |   59 -
 spec/projects/.gitkeep                          |    0
 .../android_install/AndroidManifest.xml         |   20 -
 .../android_install/cordova/android_sdk_version |    1 -
 spec/projects/android_install/cordova/version   |    1 -
 .../android_install/cordova/version.bat         |    2 -
 spec/projects/android_one/AndroidManifest.xml   |   71 -
 spec/projects/android_one/assets/www/.gitkeep   |    0
 spec/projects/android_one/assets/www/cordova.js | 6848 ---------------
 spec/projects/android_one/cordova/appinfo.jar   |  Bin 1574 -> 0 bytes
 spec/projects/android_one/cordova/build         |   23 -
 spec/projects/android_one/cordova/clean         |   23 -
 spec/projects/android_one/cordova/lib/cordova   |  386 -
 .../android_one/cordova/lib/install-device      |   23 -
 .../android_one/cordova/lib/install-emulator    |   23 -
 .../android_one/cordova/lib/list-devices        |   23 -
 .../cordova/lib/list-emulator-images            |   23 -
 .../cordova/lib/list-started-emulators          |   23 -
 .../android_one/cordova/lib/start-emulator      |   23 -
 spec/projects/android_one/cordova/log           |   23 -
 spec/projects/android_one/cordova/run           |   23 -
 spec/projects/android_one/cordova/version       |   32 -
 spec/projects/android_one/res/xml/plugins.xml   |   38 -
 spec/projects/android_one/src/.gitkeep          |    0
 spec/projects/android_two/AndroidManifest.xml   |   69 -
 spec/projects/android_two/assets/www/.gitkeep   |    0
 spec/projects/android_two/res/xml/config.xml    |   54 -
 spec/projects/android_two/src/.gitkeep          |    0
 .../android_two_no_perms/AndroidManifest.xml    |   49 -
 .../android_two_no_perms/assets/www/.gitkeep    |    0
 .../android_two_no_perms/res/xml/config.xml     |   54 -
 spec/projects/android_two_no_perms/src/.gitkeep |    0
 .../android_uninstall/AndroidManifest.xml       |   20 -
 spec/projects/android_uninstall/cordova/version |    1 -
 .../android_uninstall/cordova/version.bat       |    2 -
 .../blackberry10/native/device/chrome/.gitkeep  |    0
 .../native/device/plugins/jnext/auth.txt        |    3 -
 .../native/simulator/chrome/.gitkeep            |    0
 .../native/simulator/plugins/jnext/auth.txt     |    3 -
 spec/projects/blackberry10/www/config.xml       |   97 -
 .../CordovaLib.xcodeproj/project.pbxproj        |  636 --
 .../SampleApp.xcodeproj/project.orig.pbxproj    |  498 --
 .../SampleApp.xcodeproj/project.pbxproj         |  496 --
 .../SampleApp/SampleApp-Info.plist              |   78 -
 .../ios-config-xml/SampleApp/config.xml         |   59 -
 spec/projects/ios-config-xml/www/.gitkeep       |    0
 .../CordovaLib.xcodeproj/project.pbxproj        |  636 --
 .../SampleApp.xcodeproj/project.orig.pbxproj    |  498 --
 .../SampleApp.xcodeproj/project.pbxproj         |  498 --
 .../projects/ios-plist/SampleApp/PhoneGap.plist |   53 -
 .../ios-plist/SampleApp/SampleApp-Info.plist    |   80 -
 spec/projects/ios-plist/www/.gitkeep            |    0
 .../multiple-children/AndroidManifest.xml       |   69 -
 .../multiple-children/res/xml/plugins.xml       |   38 -
 spec/projects/tizen/www/config.xml              |    2 -
 .../windows8/CordovaApp_TemporaryKey.pfx        |  Bin 2504 -> 0 bytes
 spec/projects/windows8/TestApp.jsproj           |   81 -
 spec/projects/windows8/TestApp.sln              |   46 -
 spec/projects/windows8/package.appxmanifest     |   27 -
 spec/projects/windows8/www/cordova-2.6.0.js     | 8075 ------------------
 spec/projects/windows8/www/css/index.css        |  115 -
 spec/projects/windows8/www/img/logo.png         |  Bin 11600 -> 0 bytes
 spec/projects/windows8/www/img/smalllogo.png    |  Bin 2831 -> 0 bytes
 spec/projects/windows8/www/img/splashscreen.png |  Bin 24855 -> 0 bytes
 spec/projects/windows8/www/img/storelogo.png    |  Bin 4052 -> 0 bytes
 spec/projects/windows8/www/index.html           |   42 -
 spec/projects/windows8/www/js/index.js          |   49 -
 spec/projects/wp7/CordovaAppProj.csproj         |   76 -
 spec/projects/wp7/Properties/WMAppManifest.xml  |   28 -
 spec/projects/wp8/CordovaAppProj.csproj         |  136 -
 spec/projects/wp8/Properties/WMAppManifest.xml  |   39 -
 spec/projects/www-only/.gitkeep                 |    0
 spec/publish.spec.js                            |   11 -
 spec/registry/registry.spec.js                  |  134 -
 spec/search.spec.js                             |   11 -
 spec/uninstall.spec.js                          |  289 -
 spec/unpublish.spec.js                          |   11 -
 spec/util/action-stack.spec.js                  |   58 -
 spec/util/config-changes.spec.js                |  449 -
 spec/util/csproj.spec.js                        |   97 -
 spec/util/dependencies.spec.js                  |   41 -
 spec/util/plugins.spec.js                       |   82 -
 spec/util/xml-helpers.spec.js                   |  170 -
 spec/wrappers.spec.js                           |   40 -
 src/adduser.js                                  |    5 -
 src/config.js                                   |    5 -
 src/create.js                                   |   81 -
 src/events.js                                   |    2 -
 src/fetch.js                                    |  175 -
 src/info.js                                     |    6 -
 src/install.js                                  |  629 --
 src/owner.js                                    |    6 -
 src/platform.js                                 |  119 -
 src/platform_operation.js                       |    5 -
 src/platforms.js                                |   12 -
 src/platforms/amazon-fireos.js                  |   88 -
 src/platforms/android.js                        |   89 -
 src/platforms/blackberry10.js                   |   94 -
 src/platforms/common.js                         |   94 -
 src/platforms/firefoxos.js                      |   72 -
 src/platforms/ios.js                            |  216 -
 src/platforms/tizen.js                          |   72 -
 src/platforms/ubuntu.js                         |  124 -
 src/platforms/windows8.js                       |  134 -
 src/platforms/wp7.js                            |   91 -
 src/platforms/wp8.js                            |  113 -
 src/prepare.js                                  |  232 -
 src/publish.js                                  |    6 -
 src/registry/manifest.js                        |   95 -
 src/registry/registry.js                        |  290 -
 src/registry/whitelist.js                       |   21 -
 src/search.js                                   |    5 -
 src/uninstall.js                                |  288 -
 src/unpublish.js                                |    5 -
 src/util/action-stack.js                        |   85 -
 src/util/config-changes.js                      |  812 --
 src/util/csproj.js                              |  124 -
 src/util/default-engines.js                     |   36 -
 src/util/dependencies.js                        |   96 -
 src/util/metadata.js                            |   19 -
 src/util/plist-helpers.js                       |   88 -
 src/util/plugins.js                             |  100 -
 src/util/search-and-replace.js                  |   37 -
 src/util/w8jsproj.js                            |  239 -
 src/util/xml-helpers.js                         |  196 -
 696 files changed, 49738 insertions(+), 49738 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/add_platform.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/add_platform.spec.js b/cordova-lib/spec-plugman/add_platform.spec.js
new file mode 100644
index 0000000..18bad02
--- /dev/null
+++ b/cordova-lib/spec-plugman/add_platform.spec.js
@@ -0,0 +1,64 @@
+var platform = require('../src/platform'),
+    Q = require('q'),
+    fs = require('fs'),
+    shell = require('shelljs'),
+    plugman = require('../plugman');
+
+describe( 'platform add/remove', function() {
+    it( 'should call platform add', function() {
+        var sPlatformA = spyOn( platform, 'add' ).andReturn(Q()),
+            sPlatformR = spyOn( platform, 'remove' ).andReturn(Q());
+        platform.add();
+        expect(sPlatformA).toHaveBeenCalled();
+        platform.remove();
+        expect(sPlatformR).toHaveBeenCalled();
+    });
+});
+
+
+describe( 'platform add', function() {
+    var done = false,
+        existsSync,
+        mkdir,
+        writeFileSync;
+    function platformPromise( f ) {
+        f.then( function() { done = true; }, function(err) { done = err; } );
+    }
+    beforeEach( function() {
+        existsSync = spyOn( fs, 'existsSync' ).andReturn( false );
+        done = false;
+    });
+    it( 'should error on non existing plugin.xml', function() {
+        runs(function() {
+            platformPromise( platform.add() );
+        });
+        waitsFor(function() { return done; }, 'platform promise never resolved', 500);
+        runs(function() {
+            expect(''+ done ).toContain( "can't find a plugin.xml.  Are you in the plugin?"  );
+        });
+    });
+});
+
+
+describe( 'platform remove', function() {
+    var done = false,
+        existsSync,
+        mkdir,
+        writeFileSync;
+    function platformPromise( f ) {
+        f.then( function() { done = true; }, function(err) { done = err; } );
+    }
+    beforeEach( function() {
+        existsSync = spyOn( fs, 'existsSync' ).andReturn( false );
+        done = false;
+    });
+    it( 'should error on non existing plugin.xml', function() {
+        runs(function() {
+            platformPromise( platform.remove() );
+        });
+        waitsFor(function() { return done; }, 'platform promise never resolved', 500);
+        runs(function() {
+            expect(''+ done ).toContain( "can't find a plugin.xml.  Are you in the plugin?"  );
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/adduser.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/adduser.spec.js b/cordova-lib/spec-plugman/adduser.spec.js
new file mode 100644
index 0000000..48b1281
--- /dev/null
+++ b/cordova-lib/spec-plugman/adduser.spec.js
@@ -0,0 +1,11 @@
+var adduser = require('../src/adduser'),
+    Q = require('q'),
+    registry = require('../src/registry/registry');
+
+describe('adduser', function() {
+    it('should add a user', function() {
+        var sAddUser = spyOn(registry, 'adduser').andReturn(Q());
+        adduser();
+        expect(sAddUser).toHaveBeenCalled();
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/common.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/common.js b/cordova-lib/spec-plugman/common.js
new file mode 100644
index 0000000..b71efbf
--- /dev/null
+++ b/cordova-lib/spec-plugman/common.js
@@ -0,0 +1,62 @@
+
+var plugman = require('../plugman'),
+    nopt = require('nopt');
+
+var known_opts = {
+    'verbose' : Boolean,
+    'debug' : Number
+}, shortHands = { 'd' : ['--debug'] };
+
+var opt = nopt(known_opts, shortHands);
+var mapNames = {
+    'verbose' : 7,
+    'info'    : 6,
+    'notice'  : 5,
+    'warn'    : 4,
+    'error'   : 3
+}
+
+if(opt.verbose)
+    opt.debug = 7;
+
+if(opt.debug) {
+    for(var i in mapNames) {
+        if(mapNames[i] <= opt.debug)
+            plugman.on(i, console.log);
+    }
+
+    if(opt.debug >= 6)
+        plugman.on('log', console.log);
+}
+
+module.exports = common = {
+    spy: {
+        getInstall: function(emitSpy){
+            return common.spy.startsWith(emitSpy, 'Install start');
+        },
+
+        getDeleted: function(emitSpy){
+            return common.spy.startsWith(emitSpy, 'Deleted');
+        },
+
+        startsWith: function(emitSpy, string)
+        {
+            var match = [], i;
+            for(i in emitSpy.argsForCall) {
+                if(emitSpy.argsForCall[i][1].substr(0, string.length) === string)
+                    match.push(emitSpy.argsForCall[i][1]);
+            }
+            return match;
+        },
+
+        contains: function(emitSpy, string)
+        {
+            var match = [], i;
+            for(i in emitSpy.argsForCall) {
+                if(emitSpy.argsForCall[i][1].indexOf(string) >= 0)
+                    match.push(emitSpy.argsForCall[i][1]);
+            }
+            return match;
+        }
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/config.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/config.spec.js b/cordova-lib/spec-plugman/config.spec.js
new file mode 100644
index 0000000..65addbf
--- /dev/null
+++ b/cordova-lib/spec-plugman/config.spec.js
@@ -0,0 +1,12 @@
+var config = require('../src/config'),
+    Q = require('q'),
+    registry = require('../src/registry/registry');
+
+describe('config', function() {
+    it('should run config', function() {
+        var sConfig = spyOn(registry, 'config').andReturn(Q());
+        var params = ['set', 'registry', 'http://registry.cordova.io'];
+        config(params);
+        expect(sConfig).toHaveBeenCalledWith(params);
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/create.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/create.spec.js b/cordova-lib/spec-plugman/create.spec.js
new file mode 100644
index 0000000..afc034a
--- /dev/null
+++ b/cordova-lib/spec-plugman/create.spec.js
@@ -0,0 +1,62 @@
+var create = require('../src/create'),
+    Q = require('q'),
+    fs = require('fs'),
+    shell = require('shelljs'),
+    plugman = require('../plugman');
+
+describe( 'create', function() {
+    it( 'should call create', function() {
+        var sCreate = spyOn( plugman, 'create' ).andReturn(Q());
+        plugman.create();
+        expect(sCreate).toHaveBeenCalled();
+    });
+});
+
+describe( 'create plugin', function() {
+    var done = false,
+        existsSync,
+        mkdir,
+        writeFileSync;
+    function createPromise( f ) {
+        f.then( function() { done = true; }, function(err) { done = err; } );
+    }
+    beforeEach( function() {
+        existsSync = spyOn( fs, 'existsSync' ).andReturn( false );
+        mkdir = spyOn( shell, 'mkdir' ).andReturn( true );
+        writeFileSync = spyOn( fs, 'writeFileSync' );
+        done = false;
+    });
+
+    it( 'should be successful', function() {
+        runs(function() {
+            createPromise( create( 'name', 'org.plugin.id', '0.0.0', '.', [] ) );
+        });
+        waitsFor(function() { return done; }, 'create promise never resolved', 500);
+        runs(function() {
+            expect( done ).toBe( true );
+            expect( writeFileSync.calls.length ).toEqual( 2 );
+        });
+    });
+});
+
+describe( 'create plugin in existing plugin', function() {
+    var done = false,
+        existsSync;
+    function createPromise( f ) {
+        f.then( function() { done = true; }, function(err) { done = err; } );
+    }
+    beforeEach( function() {
+        existsSync = spyOn( fs, 'existsSync' ).andReturn( true );
+        done = false;
+    });
+
+    it( 'should fail due to an existing plugin.xml', function() {
+        runs(function() {
+            createPromise( create() );
+        });
+        waitsFor(function() { return done; }, 'create promise never resolved', 500);
+        runs(function() {
+            expect(''+ done ).toContain( 'Error: plugin.xml already exists. Are you already in a plugin?'  );
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/fetch.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/fetch.spec.js b/cordova-lib/spec-plugman/fetch.spec.js
new file mode 100644
index 0000000..2a0b660
--- /dev/null
+++ b/cordova-lib/spec-plugman/fetch.spec.js
@@ -0,0 +1,211 @@
+var fetch   = require('../src/fetch'),
+    fs      = require('fs'),
+    os      = require('osenv'),
+    path    = require('path'),
+    shell   = require('shelljs'),
+    xml_helpers = require('../src/util/xml-helpers'),
+    metadata = require('../src/util/metadata'),
+    temp    = path.join(os.tmpdir(), 'plugman'),
+    test_plugin = path.join(__dirname, 'plugins', 'ChildBrowser'),
+    test_plugin_with_space = path.join(__dirname, 'folder with space', 'plugins', 'ChildBrowser'),
+    plugins = require('../src/util/plugins'),
+    Q = require('q'),
+    registry = require('../src/registry/registry');
+
+describe('fetch', function() {
+    function wrapper(p, done, post) {
+        p.then(post, function(err) {
+            expect(err).toBeUndefined();
+        }).fin(done);
+    }
+
+    describe('local plugins', function() {
+        var xml, rm, sym, mkdir, cp, save_metadata;
+        beforeEach(function() {
+            xml = spyOn(xml_helpers, 'parseElementtreeSync').andReturn({
+                getroot:function() { return {attrib:{id:'id'}};}
+            });
+            rm = spyOn(shell, 'rm');
+            sym = spyOn(fs, 'symlinkSync');
+            mkdir = spyOn(shell, 'mkdir');
+            cp = spyOn(shell, 'cp');
+            save_metadata = spyOn(metadata, 'save_fetch_metadata');
+        });
+
+        it('should copy locally-available plugin to plugins directory', function(done) {
+            wrapper(fetch(test_plugin, temp), done, function() {
+                expect(cp).toHaveBeenCalledWith('-R', path.join(test_plugin, '*'), path.join(temp, 'id'));
+            });
+        });
+        it('should copy locally-available plugin to plugins directory when spaces in path', function(done) {
+            //XXX: added this because plugman tries to fetch from registry when plugin folder does not exist
+            spyOn(fs,'existsSync').andReturn(true);
+            wrapper(fetch(test_plugin_with_space, temp), done, function() {
+                expect(cp).toHaveBeenCalledWith('-R', path.join(test_plugin_with_space, '*'), path.join(temp, 'id'));
+            });
+        });
+        it('should create a symlink if used with `link` param', function(done) {
+            wrapper(fetch(test_plugin, temp, { link: true }), done, function() {
+                expect(sym).toHaveBeenCalledWith(test_plugin, path.join(temp, 'id'), 'dir');
+            });
+        });
+        it('should fail when the expected ID doesn\'t match', function(done) {
+            fetch(test_plugin, temp, { expected_id: 'wrongID' })
+            .then(function() {
+                expect('this call').toBe('fail');
+            }, function(err) {
+                expect(''+err).toContain('Expected fetched plugin to have ID "wrongID" but got "id".');
+            }).fin(done);
+        });
+        it('should succeed when the expected ID is correct', function(done) {
+            wrapper(fetch(test_plugin, temp, { expected_id: 'id' }), done, function() {
+                expect(1).toBe(1);
+            });
+        });
+    });
+    describe('git plugins', function() {
+        var clone, save_metadata, done, xml;
+
+        function fetchPromise(f) {
+            f.then(function() { done = true; }, function(err) { done = err; });
+        }
+
+        beforeEach(function() {
+            clone = spyOn(plugins, 'clonePluginGitRepo').andReturn(Q('somedir'));
+            save_metadata = spyOn(metadata, 'save_fetch_metadata');
+            done = false;
+            xml = spyOn(xml_helpers, 'parseElementtreeSync').andReturn({
+                getroot:function() { return {attrib:{id:'id'}};}
+            });
+        });
+        it('should call clonePluginGitRepo for https:// and git:// based urls', function() {
+            var url = "https://github.com/bobeast/GAPlugin.git";
+            runs(function() {
+                fetchPromise(fetch(url, temp));
+            });
+            waitsFor(function() { return done; }, 'fetch promise never resolved', 250);
+            runs(function() {
+                expect(done).toBe(true);
+                expect(clone).toHaveBeenCalledWith(url, temp, '.', undefined);
+                expect(save_metadata).toHaveBeenCalledWith('somedir', jasmine.any(Object));
+            });
+        });
+        it('should call clonePluginGitRepo with subdir if applicable', function() {
+            var url = "https://github.com/bobeast/GAPlugin.git";
+            var dir = 'fakeSubDir';
+            runs(function() {
+                fetchPromise(fetch(url, temp, { subdir: dir }));
+            });
+            waitsFor(function() { return done; }, 'fetch promise never resolved', 250);
+            runs(function() {
+                expect(clone).toHaveBeenCalledWith(url, temp, dir, undefined);
+                expect(save_metadata).toHaveBeenCalledWith('somedir', jasmine.any(Object));
+            });
+        });
+        it('should call clonePluginGitRepo with subdir and git ref if applicable', function() {
+            var url = "https://github.com/bobeast/GAPlugin.git";
+            var dir = 'fakeSubDir';
+            var ref = 'fakeGitRef';
+            runs(function() {
+                fetchPromise(fetch(url, temp, { subdir: dir, git_ref: ref }));
+            });
+            waitsFor(function() { return done; }, 'fetch promise never resolved', 250);
+            runs(function() {
+                expect(clone).toHaveBeenCalledWith(url, temp, dir, ref);
+                expect(save_metadata).toHaveBeenCalledWith('somedir', jasmine.any(Object));
+            });
+        });
+        it('should extract the git ref from the URL hash, if provided', function() {
+            var url = "https://github.com/bobeast/GAPlugin.git#fakeGitRef";
+            var baseURL = "https://github.com/bobeast/GAPlugin.git";
+            runs(function() {
+                fetchPromise(fetch(url, temp, {}));
+            });
+            waitsFor(function() { return done; }, 'fetch promise never resolved', 250);
+            runs(function() {
+                expect(clone).toHaveBeenCalledWith(baseURL, temp, '.', 'fakeGitRef');
+                expect(save_metadata).toHaveBeenCalledWith('somedir', jasmine.any(Object));
+            });
+        });
+        it('should extract the subdir from the URL hash, if provided', function() {
+            var url = "https://github.com/bobeast/GAPlugin.git#:fakeSubDir";
+            var baseURL = "https://github.com/bobeast/GAPlugin.git";
+            runs(function() {
+                fetchPromise(fetch(url, temp, {}));
+            });
+            waitsFor(function() { return done; }, 'fetch promise never resolved', 250);
+            runs(function() {
+                expect(clone).toHaveBeenCalledWith(baseURL, temp, 'fakeSubDir', undefined);
+                expect(save_metadata).toHaveBeenCalledWith('somedir', jasmine.any(Object));
+            });
+        });
+        it('should extract the git ref and subdir from the URL hash, if provided', function() {
+            var url = "https://github.com/bobeast/GAPlugin.git#fakeGitRef:/fake/Sub/Dir/";
+            var baseURL = "https://github.com/bobeast/GAPlugin.git";
+            runs(function() {
+                fetchPromise(fetch(url, temp, {}));
+            });
+            waitsFor(function() { return done; }, 'fetch promise never resolved', 250);
+            runs(function() {
+                expect(clone).toHaveBeenCalledWith(baseURL, temp, 'fake/Sub/Dir', 'fakeGitRef');
+                expect(save_metadata).toHaveBeenCalledWith('somedir', jasmine.any(Object));
+            });
+        });
+        it('should throw if used with url and `link` param', function() {
+            runs(function() {
+                fetch("https://github.com/bobeast/GAPlugin.git", temp, {link:true}).then(null, function(err) { done = err; });
+            });
+            waitsFor(function() { return done; }, 'fetch promise never resolved', 250);
+            runs(function() {
+                expect(''+done).toContain('--link is not supported for git URLs');
+            });
+        });
+        it('should fail when the expected ID doesn\'t match', function(done) {
+            fetch('https://github.com/bobeast/GAPlugin.git', temp, { expected_id: 'wrongID' })
+            .then(function() {
+                expect('this call').toBe('fail');
+            }, function(err) {
+                expect(''+err).toContain('Expected fetched plugin to have ID "wrongID" but got "id".');
+            }).fin(done);
+        });
+        it('should succeed when the expected ID is correct', function(done) {
+            wrapper(fetch('https://github.com/bobeast/GAPlugin.git', temp, { expected_id: 'id' }), done, function() {
+                expect(1).toBe(1);
+            });
+        });
+    });
+    describe('registry plugins', function() {
+        var pluginId = 'dummyplugin', sFetch;
+        var xml, rm, sym, mkdir, cp, save_metadata;
+        beforeEach(function() {
+            xml = spyOn(xml_helpers, 'parseElementtreeSync').andReturn({
+                getroot:function() { return {attrib:{id:'id'}};}
+            });
+            rm = spyOn(shell, 'rm');
+            sym = spyOn(fs, 'symlinkSync');
+            mkdir = spyOn(shell, 'mkdir');
+            cp = spyOn(shell, 'cp');
+            save_metadata = spyOn(metadata, 'save_fetch_metadata');
+            sFetch = spyOn(registry, 'fetch').andReturn(Q('somedir'));
+        });
+
+        it('should get a plugin from registry and set the right client when argument is not a folder nor URL', function(done) {
+            wrapper(fetch(pluginId, temp, {client: 'plugman'}), done, function() {
+                expect(sFetch).toHaveBeenCalledWith([pluginId], 'plugman');
+            });
+        });
+        it('should fail when the expected ID doesn\'t match', function(done) {
+            fetch(pluginId, temp, { expected_id: 'wrongID' })
+            .then(function() {
+                expect('this call').toBe('fail');
+            }, function(err) {
+                expect(''+err).toContain('Expected fetched plugin to have ID "wrongID" but got "id".');
+            }).fin(done);
+        });
+        it('should succeed when the expected ID is correct', function(done) {
+            wrapper(fetch(pluginId, temp, { expected_id: 'id' }), done, function() {
+                expect(1).toBe(1);
+            });
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/info.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/info.spec.js b/cordova-lib/spec-plugman/info.spec.js
new file mode 100644
index 0000000..96256c7
--- /dev/null
+++ b/cordova-lib/spec-plugman/info.spec.js
@@ -0,0 +1,15 @@
+var search = require('../src/info'),
+    Q = require('q'),
+    registry = require('../src/registry/registry');
+
+describe('info', function() {
+    it('should show plugin info', function() {
+        var sSearch = spyOn(registry, 'info').andReturn(Q({
+            name: 'fakePlugin',
+            version: '1.0.0',
+            engines: [{ name: 'plugman', version: '>=0.11' }]
+        }));
+        search(new Array('myplugin'));
+        expect(sSearch).toHaveBeenCalledWith(['myplugin']);
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/install.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/install.spec.js b/cordova-lib/spec-plugman/install.spec.js
new file mode 100644
index 0000000..20a3d37
--- /dev/null
+++ b/cordova-lib/spec-plugman/install.spec.js
@@ -0,0 +1,472 @@
+var install = require('../src/install'),
+    actions = require('../src/util/action-stack'),
+    config_changes = require('../src/util/config-changes'),
+    xml_helpers = require('../src/util/xml-helpers'),
+    events  = require('../src/events'),
+    plugman = require('../plugman'),
+    platforms = require('../src/platforms/common'),
+    common  = require('./common'),
+    fs      = require('fs'),
+    os      = require('os'),
+    path    = require('path'),
+    shell   = require('shelljs'),
+    child_process = require('child_process'),
+    semver  = require('semver'),
+    Q = require('q'),
+    spec    = __dirname,
+    done    = false,
+    srcProject = path.join(spec, 'projects', 'android_install'),
+    project = path.join(os.tmpdir(), 'plugman-test', 'android_install'),
+
+    plugins_dir = path.join(spec, 'plugins'),
+    plugins_install_dir = path.join(project, 'cordova', 'plugins'),
+    plugins = {
+        'DummyPlugin' : path.join(plugins_dir, 'DummyPlugin'),
+        'EnginePlugin' : path.join(plugins_dir, 'EnginePlugin'),
+        'EnginePluginAndroid' : path.join(plugins_dir, 'EnginePluginAndroid'),
+        'ChildBrowser' : path.join(plugins_dir, 'ChildBrowser'),
+        'VariablePlugin' : path.join(plugins_dir, 'VariablePlugin'),
+        'A' : path.join(plugins_dir, 'dependencies', 'A'),
+        'B' : path.join(plugins_dir, 'dependencies', 'B'),
+        'C' : path.join(plugins_dir, 'dependencies', 'C'),
+        'F' : path.join(plugins_dir, 'dependencies', 'F'),
+        'G' : path.join(plugins_dir, 'dependencies', 'G')
+    },
+    promise,
+    results = {},
+    dummy_id = 'com.phonegap.plugins.dummyplugin';
+
+function installPromise(f) {
+  f.then(function(res) { done = true; }, function(err) { done = err; });
+}
+
+var existsSync = fs.existsSync;
+
+// Mocked functions for tests
+var fake = {
+    'existsSync' : {
+        'noPlugins' : function(path){
+            // fake installed plugin directories as 'not found'
+            if( path.slice(-5) !== '.json' && path.indexOf(plugins_install_dir) >= 0) {
+                return false;
+            }
+
+            return existsSync(path);
+        }
+    },
+    'fetch' : {
+        'dependencies' : function(id, dir) {
+            if(id == plugins['A'])
+                return Q(id); // full path to plugin
+
+            return Q( path.join(plugins_dir, 'dependencies', id) );
+        }
+    }
+}
+
+describe('start', function() {
+    var prepare, config_queue_add, proc, actions_push, ca, emit;
+
+    beforeEach(function() {
+        prepare = spyOn(plugman, 'prepare');
+        config_queue_add = spyOn(config_changes, 'add_installed_plugin_to_prepare_queue');
+        proc = spyOn(actions.prototype, 'process').andReturn( Q(true) );
+        actions_push = spyOn(actions.prototype, 'push');
+        ca = spyOn(actions.prototype, 'createAction');
+    });
+    it('start', function() {
+        shell.rm('-rf', project);
+        shell.cp('-R', path.join(srcProject, '*'), project);
+
+        done = false;
+        promise = Q()
+         .then(
+            function(){ return install('android', project, plugins['DummyPlugin']) }
+        ).then(
+            function(){
+                results['actions_callCount'] = actions_push.callCount;
+                results['actions_create'] = ca.argsForCall[0];
+                results['config_add'] = config_queue_add.argsForCall[0];
+
+                return Q();
+            }
+        ).then(
+            function(){ return install('android', project, plugins['EnginePlugin']) }
+        ).then(
+            function(){
+                emit = spyOn(events, 'emit');
+                return install('android', project, plugins['ChildBrowser'])
+            }
+        ).then(
+            function(){
+                return install('android', project, plugins['VariablePlugin'], plugins_install_dir, { cli_variables:{API_KEY:'batman'} })
+            }
+        ).then(
+            function(){
+                done = true;
+                results['prepareCount'] = prepare.callCount;
+                results['emit_results'] = [];
+
+                for(var i in emit.calls) {
+                    if(emit.calls[i].args[0] === 'results')
+                        results['emit_results'].push(emit.calls[i].args[1]);
+                }
+
+                events.emit("verbose", "***** DONE START *****");
+            }
+        );
+        waitsFor(function() { return done; }, 'promise never resolved', 500);
+    });
+});
+
+describe('install', function() {
+    var chmod, exec, proc, add_to_queue, prepare, actions_push, c_a, mkdir, cp, rm, fetchSpy, emit;
+
+    beforeEach(function() {
+        prepare = spyOn(plugman, 'prepare').andReturn( Q(true) );
+
+        exec = spyOn(child_process, 'exec').andCallFake(function(cmd, cb) {
+            cb(false, '', '');
+        });
+        spyOn(fs, 'mkdirSync').andReturn(true);
+        spyOn(shell, 'mkdir').andReturn(true);
+        spyOn(platforms, 'copyFile').andReturn(true);
+
+        fetchSpy = spyOn(plugman.raw, 'fetch').andReturn( Q( plugins['EnginePlugin'] ) );
+        chmod = spyOn(fs, 'chmodSync').andReturn(true);
+        fsWrite = spyOn(fs, 'writeFileSync').andReturn(true);
+        cp = spyOn(shell, 'cp').andReturn(true);
+        rm = spyOn(shell, 'rm').andReturn(true);
+        add_to_queue = spyOn(config_changes, 'add_installed_plugin_to_prepare_queue');
+        done = false;
+    });
+
+    describe('success', function() {
+        it('should call prepare after a successful install', function() {
+           expect(results['prepareCount']).toBe(4);
+        });
+
+        it('should emit a results event with platform-agnostic <info>', function() {
+            // ChildBrowser
+            expect(results['emit_results'][0]).toBe('No matter what platform you are installing to, this notice is very important.');
+        });
+        it('should emit a results event with platform-specific <info>', function() {
+            // ChildBrowser
+            expect(results['emit_results'][1]).toBe('Please make sure you read this because it is very important to complete the installation of your plugin.');
+        });
+        it('should interpolate variables into <info> tags', function() {
+            // VariableBrowser
+            expect(results['emit_results'][2]).toBe('Remember that your api key is batman!');
+        });
+
+        it('should call fetch if provided plugin cannot be resolved locally', function() {
+            fetchSpy.andReturn( Q( plugins['DummyPlugin'] ) );
+            spyOn(fs, 'existsSync').andCallFake( fake['existsSync']['noPlugins'] );
+
+            runs(function() {
+                installPromise(install('android', project, 'CLEANYOURSHORTS' ));
+            });
+            waitsFor(function() { return done; }, 'install promise never resolved', 200);
+            runs(function() {
+                expect(done).toBe(true);
+                expect(fetchSpy).toHaveBeenCalled();
+            });
+        });
+
+        it('should call the config-changes module\'s add_installed_plugin_to_prepare_queue method after processing an install', function() {
+           expect(results['config_add']).toEqual([plugins_install_dir, dummy_id, 'android', {}, true]);
+        });
+        it('should queue up actions as appropriate for that plugin and call process on the action stack',
+           function() {
+                expect(results['actions_callCount']).toEqual(3);
+                expect(results['actions_create']).toEqual([jasmine.any(Function), [jasmine.any(Object), path.join(plugins_install_dir, dummy_id), project, dummy_id], jasmine.any(Function), [jasmine.any(Object), project, dummy_id]]);
+        });
+
+        it('should check version if plugin has engine tag', function(){
+            var satisfies = spyOn(semver, 'satisfies').andReturn(true);
+            exec.andCallFake(function(cmd, cb) {
+                cb(null, '2.5.0\n');
+            });
+
+            runs(function() {
+                installPromise( install('android', project, plugins['EnginePlugin']) );
+            });
+            waitsFor(function() { return done; }, 'install promise never resolved', 200);
+            runs(function() {
+                expect(satisfies).toHaveBeenCalledWith('2.5.0','>=2.3.0');
+            });
+        });
+        it('should check version and munge it a little if it has "rc" in it so it plays nice with semver (introduce a dash in it)', function() {
+            var satisfies = spyOn(semver, 'satisfies').andReturn(true);
+            exec.andCallFake(function(cmd, cb) {
+                cb(null, '3.0.0rc1\n');
+            });
+
+            runs(function() {
+                installPromise( install('android', project, plugins['EnginePlugin']) );
+            });
+            waitsFor(function() { return done; }, 'install promise never resolved', 200);
+            runs(function() {
+                expect(satisfies).toHaveBeenCalledWith('3.0.0-rc1','>=2.3.0');
+            });
+        });
+        it('should check specific platform version over cordova version if specified', function() {
+            var spy = spyOn(semver, 'satisfies').andReturn(true);
+            exec.andCallFake(function(cmd, cb) {
+                cb(null, '3.1.0\n');
+            });
+            fetchSpy.andReturn( Q( plugins['EnginePluginAndroid'] ) );
+
+            runs(function() {
+                installPromise( install('android', project, plugins['EnginePluginAndroid']) );
+            });
+            waitsFor(function() { return done; }, 'install promise never resolved', 200);
+            runs(function() {
+                expect(spy).toHaveBeenCalledWith('3.1.0','>=3.1.0');
+            });
+        });
+        it('should check platform sdk version if specified', function() {
+            var spy = spyOn(semver, 'satisfies').andReturn(true);
+            fetchSpy.andReturn( Q( plugins['EnginePluginAndroid'] ) );
+            exec.andCallFake(function(cmd, cb) {
+                cb(null, '18\n');
+            });
+
+            runs(function() {
+                installPromise( install('android', project, 'EnginePluginAndroid') );
+            });
+            waitsFor(function() { return done; }, 'install promise never resolved', 200);
+            runs(function() {
+                // <engine name="cordova" VERSION=">=3.0.0"/>
+                // <engine name="cordova-android" VERSION=">=3.1.0"/>
+                // <engine name="android-sdk" VERSION=">=18"/>
+
+                expect(spy.calls.length).toBe(3);
+                expect(spy.calls[0].args).toEqual([ '18.0.0', '>=3.0.0' ]);
+                expect(spy.calls[1].args).toEqual([ '18.0.0', '>=3.1.0' ]);
+                expect(spy.calls[2].args).toEqual([ '18.0.0','>=18' ]);
+            });
+        });
+        it('should check engine versions', function() {
+            var spy = spyOn(semver, 'satisfies').andReturn(true);
+            fetchSpy.andReturn( Q( plugins['EnginePlugin'] ) );
+
+            runs(function() {
+                installPromise( install('android', project, plugins['EnginePlugin']) );
+            });
+            waitsFor(function() { return done; }, 'install promise never resolved', 200);
+            runs(function() {
+                // <engine name="cordova" version=">=2.3.0"/>
+                // <engine name="cordova-plugman" version=">=0.10.0" />
+                // <engine name="mega-fun-plugin" version=">=1.0.0" scriptSrc="megaFunVersion" platform="*" />
+                // <engine name="mega-boring-plugin" version=">=3.0.0" scriptSrc="megaBoringVersion" platform="ios|android" />
+
+                var plugmanVersion = require('../package.json').version;
+
+                expect(spy.calls.length).toBe(4);
+                expect(spy.calls[0].args).toEqual([ '', '>=2.3.0' ]);
+                expect(spy.calls[1].args).toEqual([ plugmanVersion, '>=0.10.0' ]);
+                expect(spy.calls[2].args).toEqual([ '', '>=1.0.0' ]);
+                expect(spy.calls[3].args).toEqual([ '', '>=3.0.0' ]);
+            });
+        });
+        it('should not check custom engine version that is not supported for platform', function() {
+            var spy = spyOn(semver, 'satisfies').andReturn(true);
+            runs(function() {
+                installPromise( install('blackberry10', project, plugins['EnginePlugin']) );
+            });
+            waitsFor(function() { return done; }, 'install promise never resolved', 200);
+            runs(function() {
+                expect(spy).not.toHaveBeenCalledWith('','>=3.0.0');
+            });
+        });
+
+        describe('with dependencies', function() {
+            var emit;
+            beforeEach(function() {
+                spyOn(fs, 'existsSync').andCallFake( fake['existsSync']['noPlugins'] );
+                fetchSpy.andCallFake( fake['fetch']['dependencies'] );
+                emit = spyOn(events, 'emit');
+                exec.andCallFake(function(cmd, cb) {
+                    cb(null, '9.0.0\n');
+                });
+            });
+
+            it('should install any dependent plugins if missing', function() {
+                runs(function() {
+                    installPromise( install('android', project, plugins['A']) );
+                });
+                waitsFor(function() { return done; }, 'install promise never resolved', 200);
+                runs(function() {
+                    // Look for 'Installing plugin ...' in events
+                    var install = common.spy.getInstall(emit);
+
+                    expect(install).toEqual([
+                        'Install start for "C" on android.',
+                        'Install start for "D" on android.',
+                        'Install start for "A" on android.'
+                    ]);
+                });
+            });
+
+            it('should install any dependent plugins from registry when url is not defined', function() {
+                // Plugin A depends on C & D
+                runs(function() {
+                    installPromise( install('android', project, plugins['A']) );
+                });
+                waitsFor(function() { return done; }, 'promise never resolved', 200);
+                runs(function() {
+                    // TODO: this is same test as above? Need test other dependency with url=?
+                    var install = common.spy.getInstall(emit);
+
+                    expect(install).toEqual([
+                        'Install start for "C" on android.',
+                        'Install start for "D" on android.',
+                        'Install start for "A" on android.'
+                    ]);;
+                });
+            });
+
+            it('should process all dependent plugins with alternate routes to the same plugin', function() {
+                // Plugin F depends on A, C, D and E
+                runs(function () {
+                    installPromise(install('android', project, plugins['F']));
+                });
+                waitsFor(function () { return done; }, 'install promise never resolved', 200);
+                runs(function () {
+                    var install = common.spy.getInstall(emit);
+
+                    expect(install).toEqual([
+                        'Install start for "C" on android.',
+                        'Install start for "D" on android.',
+                        'Install start for "A" on android.',
+                        'Install start for "D" on android.',
+                        'Install start for "F" on android.'
+                    ]);
+                });
+            });
+
+            it('should throw if there is a cyclic dependency', function() {
+                runs(function () {
+                    installPromise( install('android', project, plugins['G']) );
+                });
+                waitsFor(function () { return done; }, 'install promise never resolved', 200);
+                runs(function () {
+                    var install = common.spy.getInstall(emit);
+
+                    expect(done.message).toEqual('Cyclic dependency from G to H');
+                });
+            });
+
+            it('install subdir relative to top level plugin if no fetch meta', function() {
+                runs(function () {
+                    installPromise(install('android', project, plugins['B']));
+                });
+                waitsFor(function () { return done; }, 'install promise never resolved', 200);
+                runs(function () {
+                    var install = common.spy.getInstall(emit);
+
+                    expect(install).toEqual([
+                        'Install start for "D" on android.',
+                        'Install start for "E" on android.',
+                        'Install start for "B" on android.'
+                    ]);
+                });
+            });
+
+            it('install uses meta data (if available) of top level plugin source', function() {
+                // Fake metadata so plugin 'B' appears from 'meta/B'
+                var meta = require('../src/util/metadata');
+                spyOn(meta, 'get_fetch_metadata').andCallFake(function(){
+                    return {
+                        source: {type: 'dir', url: path.join(plugins['B'], '..', 'meta')}
+                    };
+                });
+
+                runs(function () {
+                    installPromise(install('android', project, plugins['B']));
+                });
+                waitsFor(function () { return done; }, 'install promise never resolved', 200);
+                runs(function () {
+                    var install = common.spy.getInstall(emit);
+
+                    expect(install).toEqual([
+                        'Install start for "D" on android.',
+                        'Install start for "E" on android.',
+                        'Install start for "B" on android.'
+                    ]);
+
+                    var copy = common.spy.startsWith(emit, "Copying from");
+                    expect(copy.length).toBe(3);
+                    expect(copy[0].indexOf(path.normalize('meta/D')) > 0).toBe(true);
+                    expect(copy[1].indexOf(path.normalize('meta/subdir/E')) > 0).toBe(true);
+                });
+            });
+        });
+
+    });
+
+    xdescribe('failure', function() {
+        it('should throw if platform is unrecognized', function() {
+            runs(function() {
+                installPromise( install('atari', project, 'SomePlugin') );
+            });
+            waitsFor(function() { return done; }, 'install promise never resolved', 200);
+            runs(function() {
+                expect(''+done).toContain('atari not supported.');
+            });
+        });
+        it('should throw if variables are missing', function() {
+            runs(function() {
+                installPromise( install('android', project, plugins['VariablePlugin']) );
+            });
+            waitsFor(function(){ return done; }, 'install promise never resolved', 200);
+            runs(function() {
+                expect(''+done).toContain('Variable(s) missing: API_KEY');
+            });
+        });
+        it('should throw if git is not found on the path and a remote url is requested', function() {
+            spyOn(fs, 'existsSync').andCallFake( fake['existsSync']['noPlugins'] );
+            var which_spy = spyOn(shell, 'which').andReturn(null);
+            runs(function() {
+                installPromise( install('android', project, 'https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git') );
+            });
+            waitsFor(function(){ return done; }, 'install promise never resolved', 200);
+            runs(function() {
+                expect(''+done).toContain('"git" command line tool is not installed: make sure it is accessible on your PATH.');
+            });
+        });
+        it('should throw if plugin version is less than the minimum requirement', function(){
+            var spy = spyOn(semver, 'satisfies').andReturn(false);
+            exec.andCallFake(function(cmd, cb) {
+                cb(null, '0.0.1\n');
+            });
+            runs(function() {
+                installPromise( install('android', project, plugins['EnginePlugin']) );
+            });
+            waitsFor(function(){ return done; }, 'install promise never resolved', 200);
+            runs(function() {
+                expect(''+done).toContain('Plugin doesn\'t support this project\'s cordova version. cordova: 0.0.1, failed version requirement: >=2.3.0');
+            });
+        });
+    });
+
+});
+
+
+describe('end', function() {
+
+    it('end', function() {
+        done = false;
+
+        promise.fin(function(err){
+            if(err)
+                events.emit('error', err);
+
+            shell.rm('-rf', project);
+            done = true;
+        });
+
+        waitsFor(function() { return done; }, 'promise never resolved', 500);
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/owner.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/owner.spec.js b/cordova-lib/spec-plugman/owner.spec.js
new file mode 100644
index 0000000..1c6bd2c
--- /dev/null
+++ b/cordova-lib/spec-plugman/owner.spec.js
@@ -0,0 +1,12 @@
+var owner = require('../src/owner'),
+    Q = require('q'),
+    registry = require('../src/registry/registry');
+
+describe('owner', function() {
+    it('should run owner', function() {
+        var sOwner = spyOn(registry, 'owner').andReturn(Q());
+        var params = ['add', 'anis', 'com.phonegap.plugins.dummyplugin'];
+        owner(params);
+        expect(sOwner).toHaveBeenCalledWith(params);
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/platform.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platform.spec.js b/cordova-lib/spec-plugman/platform.spec.js
new file mode 100644
index 0000000..4f8099c
--- /dev/null
+++ b/cordova-lib/spec-plugman/platform.spec.js
@@ -0,0 +1,26 @@
+var platforms = require('../src/platforms')
+var pluginTags = ["source-file", "header-file", "lib-file", "resource-file", "framework"];
+
+function getTest(platformId, pluginTag) {
+    return function() {
+        it('should exist', function() {
+            expect(platforms[platformId][pluginTag] ).toBeDefined();
+        });
+        it('with an install method', function() {
+            expect(platforms[platformId][pluginTag].install ).toBeDefined();
+        });
+        it('with an uninstall method', function() {
+            expect(platforms[platformId][pluginTag].uninstall ).toBeDefined();
+        });
+    }
+}
+
+for(var platformId in platforms) {
+    for(var index = 0, len = pluginTags.length; index < len; index++) {
+        var funk = getTest(platformId,pluginTags[index]);
+        describe(platformId + " should have a " + pluginTags[index] + " object", funk);
+    }
+
+}
+
+


[50/70] Remove all cordova-lib files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/windows8/www/css/index.css
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/windows8/www/css/index.css b/cordova-lib/spec-plugman/projects/windows8/www/css/index.css
deleted file mode 100644
index 51daa79..0000000
--- a/cordova-lib/spec-plugman/projects/windows8/www/css/index.css
+++ /dev/null
@@ -1,115 +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.
- */
-* {
-    -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
-}
-
-body {
-    -webkit-touch-callout: none;                /* prevent callout to copy image, etc when tap to hold */
-    -webkit-text-size-adjust: none;             /* prevent webkit from resizing text to fit */
-    -webkit-user-select: none;                  /* prevent copy paste, to allow, change 'none' to 'text' */
-    background-color:#E4E4E4;
-    background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
-    background-image:-webkit-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
-    background-image:-ms-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
-    background-image:-webkit-gradient(
-        linear,
-        left top,
-        left bottom,
-        color-stop(0, #A7A7A7),
-        color-stop(0.51, #E4E4E4)
-    );
-    background-attachment:fixed;
-    font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif;
-    font-size:12px;
-    height:100%;
-    margin:0px;
-    padding:0px;
-    text-transform:uppercase;
-    width:100%;
-}
-
-/* Portrait layout (default) */
-.app {
-    background:url(../img/logo.png) no-repeat center top; /* 170px x 200px */
-    position:absolute;             /* position in the center of the screen */
-    left:50%;
-    top:50%;
-    height:50px;                   /* text area height */
-    width:225px;                   /* text area width */
-    text-align:center;
-    padding:180px 0px 0px 0px;     /* image height is 200px (bottom 20px are overlapped with text) */
-    margin:-115px 0px 0px -112px;  /* offset vertical: half of image height and text area height */
-                                   /* offset horizontal: half of text area width */
-}
-
-/* Landscape layout (with min-width) */
-@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) {
-    .app {
-        background-position:left center;
-        padding:75px 0px 75px 170px;  /* padding-top + padding-bottom + text area = image height */
-        margin:-90px 0px 0px -198px;  /* offset vertical: half of image height */
-                                      /* offset horizontal: half of image width and text area width */
-    }
-}
-
-h1 {
-    font-size:24px;
-    font-weight:normal;
-    margin:0px;
-    overflow:visible;
-    padding:0px;
-    text-align:center;
-}
-
-.event {
-    border-radius:4px;
-    -webkit-border-radius:4px;
-    color:#FFFFFF;
-    font-size:12px;
-    margin:0px 30px;
-    padding:2px 0px;
-}
-
-.event.listening {
-    background-color:#333333;
-    display:block;
-}
-
-.event.received {
-    background-color:#4B946A;
-    display:none;
-}
-
-@keyframes fade {
-    from { opacity: 1.0; }
-    50% { opacity: 0.4; }
-    to { opacity: 1.0; }
-}
- 
-@-webkit-keyframes fade {
-    from { opacity: 1.0; }
-    50% { opacity: 0.4; }
-    to { opacity: 1.0; }
-}
- 
-.blink {
-    animation:fade 3000ms infinite;
-    -webkit-animation:fade 3000ms infinite;
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/windows8/www/img/logo.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/windows8/www/img/logo.png b/cordova-lib/spec-plugman/projects/windows8/www/img/logo.png
deleted file mode 100644
index 86a48a8..0000000
Binary files a/cordova-lib/spec-plugman/projects/windows8/www/img/logo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/windows8/www/img/smalllogo.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/windows8/www/img/smalllogo.png b/cordova-lib/spec-plugman/projects/windows8/www/img/smalllogo.png
deleted file mode 100644
index 0e648ef..0000000
Binary files a/cordova-lib/spec-plugman/projects/windows8/www/img/smalllogo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/windows8/www/img/splashscreen.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/windows8/www/img/splashscreen.png b/cordova-lib/spec-plugman/projects/windows8/www/img/splashscreen.png
deleted file mode 100644
index d1e6c98..0000000
Binary files a/cordova-lib/spec-plugman/projects/windows8/www/img/splashscreen.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/windows8/www/img/storelogo.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/windows8/www/img/storelogo.png b/cordova-lib/spec-plugman/projects/windows8/www/img/storelogo.png
deleted file mode 100644
index dd00478..0000000
Binary files a/cordova-lib/spec-plugman/projects/windows8/www/img/storelogo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/windows8/www/index.html
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/windows8/www/index.html b/cordova-lib/spec-plugman/projects/windows8/www/index.html
deleted file mode 100644
index ca8ab84..0000000
--- a/cordova-lib/spec-plugman/projects/windows8/www/index.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE html>
-<!--
-    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.
--->
-<html>
-    <head>
-        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-        <meta name="format-detection" content="telephone=no" />
-        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
-        <link rel="stylesheet" type="text/css" href="css/index.css" />
-        <title>Hello World</title>
-    </head>
-    <body>
-        <div class="app">
-            <h1>Apache Cordova</h1>
-            <div id="deviceready" class="blink">
-                <p class="event listening">Connecting to Device</p>
-                <p class="event received">Device is Ready</p>
-            </div>
-        </div>
-        <script type="text/javascript" src="cordova-2.6.0.js"></script>
-        <script type="text/javascript" src="js/index.js"></script>
-        <script type="text/javascript">
-            app.initialize();
-        </script>
-    </body>
-</html>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/windows8/www/js/index.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/windows8/www/js/index.js b/cordova-lib/spec-plugman/projects/windows8/www/js/index.js
deleted file mode 100644
index 87b5660..0000000
--- a/cordova-lib/spec-plugman/projects/windows8/www/js/index.js
+++ /dev/null
@@ -1,49 +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 app = {
-    // Application Constructor
-    initialize: function() {
-        this.bindEvents();
-    },
-    // Bind Event Listeners
-    //
-    // Bind any events that are required on startup. Common events are:
-    // 'load', 'deviceready', 'offline', and 'online'.
-    bindEvents: function() {
-        document.addEventListener('deviceready', this.onDeviceReady, false);
-    },
-    // deviceready Event Handler
-    //
-    // The scope of 'this' is the event. In order to call the 'receivedEvent'
-    // function, we must explicitly call 'app.receivedEvent(...);'
-    onDeviceReady: function() {
-        app.receivedEvent('deviceready');
-    },
-    // Update DOM on a Received Event
-    receivedEvent: function(id) {
-        var parentElement = document.getElementById(id);
-        var listeningElement = parentElement.querySelector('.listening');
-        var receivedElement = parentElement.querySelector('.received');
-
-        listeningElement.setAttribute('style', 'display:none;');
-        receivedElement.setAttribute('style', 'display:block;');
-
-        console.log('Received Event: ' + id);
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/wp7/CordovaAppProj.csproj
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/wp7/CordovaAppProj.csproj b/cordova-lib/spec-plugman/projects/wp7/CordovaAppProj.csproj
deleted file mode 100644
index 4b122a2..0000000
--- a/cordova-lib/spec-plugman/projects/wp7/CordovaAppProj.csproj
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-    <PropertyGroup>
-        <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-        <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-        <ProductVersion>10.0.20506</ProductVersion>
-        <SchemaVersion>2.0</SchemaVersion>
-        <ProjectGuid>{3677C1B7-D68B-4CF9-BF8A-E869D437A6DF}</ProjectGuid>
-        <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
-        <OutputType>Library</OutputType>
-        <AppDesignerFolder>Properties</AppDesignerFolder>
-        <RootNamespace>$safeprojectname$</RootNamespace>
-        <AssemblyName>$safeprojectname$</AssemblyName>
-        <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
-        <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
-        <TargetFrameworkProfile>WindowsPhone71</TargetFrameworkProfile>
-        <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
-        <SilverlightApplication>true</SilverlightApplication>
-        <SupportedCultures>
-        </SupportedCultures>
-        <XapOutputs>true</XapOutputs>
-        <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
-        <XapFilename>$safeprojectname$.xap</XapFilename>
-        <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
-        <SilverlightAppEntry>$safeprojectname$.App</SilverlightAppEntry>
-        <ValidateXaml>true</ValidateXaml>
-        <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
-    </PropertyGroup>
-    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-        <DebugSymbols>true</DebugSymbols>
-        <DebugType>full</DebugType>
-        <Optimize>false</Optimize>
-        <OutputPath>Bin\Debug</OutputPath>
-        <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
-        <NoStdLib>true</NoStdLib>
-        <NoConfig>true</NoConfig>
-        <ErrorReport>prompt</ErrorReport>
-        <WarningLevel>4</WarningLevel>
-    </PropertyGroup>
-    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-        <DebugType>pdbonly</DebugType>
-        <Optimize>true</Optimize>
-        <OutputPath>Bin\Release</OutputPath>
-        <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
-        <NoStdLib>true</NoStdLib>
-        <NoConfig>true</NoConfig>
-        <ErrorReport>prompt</ErrorReport>
-        <WarningLevel>4</WarningLevel>
-    </PropertyGroup>
-    <ItemGroup>
-        <Reference Include="Microsoft.Devices.Sensors" />
-        <Reference Include="Microsoft.Phone" />
-        <Reference Include="Microsoft.Phone.Interop" />
-        <Reference Include="Microsoft.Xna.Framework" />
-        <Reference Include="System.Device" />
-        <Reference Include="System.Runtime.Serialization" />
-        <Reference Include="System.Servicemodel.Web" />
-        <Reference Include="System.Windows" />
-        <Reference Include="system" />
-        <Reference Include="System.Core" />
-        <Reference Include="System.Net" />
-        <Reference Include="System.Xml" />
-        <Reference Include="System.Xml.Linq" />
-    </ItemGroup>
-    <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" />
-    <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.CSharp.targets" />
-    <ProjectExtensions />
-    <PropertyGroup>
-        <PreBuildEvent>CScript "$(ProjectDir)/BuildManifestProcessor.js" "$(ProjectPath)"</PreBuildEvent>
-    </PropertyGroup>
-    <PropertyGroup>
-        <PostBuildEvent>
-        </PostBuildEvent>
-    </PropertyGroup>
-    <ItemGroup />
-</Project>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/wp7/Properties/WMAppManifest.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/wp7/Properties/WMAppManifest.xml b/cordova-lib/spec-plugman/projects/wp7/Properties/WMAppManifest.xml
deleted file mode 100644
index b218fcb..0000000
--- a/cordova-lib/spec-plugman/projects/wp7/Properties/WMAppManifest.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2009/deployment" AppPlatformVersion="7.1">
-  <App xmlns="" ProductID="{5FC10D78-8779-4EDB-9B61-1D04F0A755D4}" Title="An App" 
-       RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal"  
-       Author="An App author" 
-       BitsPerPixel="32" 
-       Description="Apache Cordova for Windows Phone 7"
-       Publisher="An App">
-    
-    <IconPath IsRelative="true" IsResource="false">ApplicationIcon.png</IconPath>
-    <Capabilities>
-      <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />   
-    </Capabilities>
-    
-    <Tasks>
-      <DefaultTask Name="_default" NavigationPage="MainPage.xaml" />
-    </Tasks>
-    <Tokens>
-      <PrimaryToken TokenID="An AppToken" TaskName="_default">
-        <TemplateType5>
-          <BackgroundImageURI IsRelative="true" IsResource="false">Background.png</BackgroundImageURI>
-          <Count>0</Count>
-          <Title>An App</Title>
-        </TemplateType5>
-      </PrimaryToken>
-    </Tokens>
-  </App>
-</Deployment>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/wp8/CordovaAppProj.csproj
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/wp8/CordovaAppProj.csproj b/cordova-lib/spec-plugman/projects/wp8/CordovaAppProj.csproj
deleted file mode 100644
index bc229e5..0000000
--- a/cordova-lib/spec-plugman/projects/wp8/CordovaAppProj.csproj
+++ /dev/null
@@ -1,136 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-    <PropertyGroup>
-        <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-        <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-        <ProductVersion>10.0.20506</ProductVersion>
-        <SchemaVersion>2.0</SchemaVersion>
-        <ProjectGuid>{3677C1B7-D68B-4CF9-BF8A-E869D437A6DF}</ProjectGuid>
-        <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
-        <OutputType>Library</OutputType>
-        <AppDesignerFolder>Properties</AppDesignerFolder>
-        <RootNamespace>my.test.project</RootNamespace>
-        <AssemblyName>my.test.project</AssemblyName>
-        <TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
-        <SilverlightVersion>
-        </SilverlightVersion>
-        <TargetFrameworkProfile>
-        </TargetFrameworkProfile>
-        <TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>
-        <SilverlightApplication>true</SilverlightApplication>
-        <SupportedCultures>en-US</SupportedCultures>
-        <XapOutputs>true</XapOutputs>
-        <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
-        <XapFilename>CordovaAppProj_$(Configuration)_$(Platform).xap</XapFilename>
-        <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
-        <SilverlightAppEntry>my.test.project.App</SilverlightAppEntry>
-        <ValidateXaml>true</ValidateXaml>
-        <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
-        <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
-        <BackgroundAgentType />
-    </PropertyGroup>
-    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-        <DebugSymbols>true</DebugSymbols>
-        <DebugType>full</DebugType>
-        <Optimize>false</Optimize>
-        <OutputPath>Bin\Debug</OutputPath>
-        <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;WP8</DefineConstants>
-        <NoStdLib>true</NoStdLib>
-        <NoConfig>true</NoConfig>
-        <ErrorReport>prompt</ErrorReport>
-        <WarningLevel>4</WarningLevel>
-        <Prefer32Bit>false</Prefer32Bit>
-    </PropertyGroup>
-    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-        <DebugType>pdbonly</DebugType>
-        <Optimize>true</Optimize>
-        <OutputPath>Bin\Release</OutputPath>
-        <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;WP8</DefineConstants>
-        <NoStdLib>true</NoStdLib>
-        <NoConfig>true</NoConfig>
-        <ErrorReport>prompt</ErrorReport>
-        <WarningLevel>4</WarningLevel>
-        <Prefer32Bit>false</Prefer32Bit>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
-        <DebugSymbols>true</DebugSymbols>
-        <OutputPath>Bin\x86\Debug</OutputPath>
-        <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
-        <NoStdLib>true</NoStdLib>
-        <DebugType>full</DebugType>
-        <PlatformTarget>
-        </PlatformTarget>
-        <ErrorReport>prompt</ErrorReport>
-        <CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
-        <Optimize>false</Optimize>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
-        <OutputPath>Bin\x86\Release</OutputPath>
-        <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
-        <Optimize>true</Optimize>
-        <NoStdLib>true</NoStdLib>
-        <DebugType>pdbonly</DebugType>
-        <PlatformTarget>
-        </PlatformTarget>
-        <ErrorReport>prompt</ErrorReport>
-        <CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
-        <Prefer32Bit>false</Prefer32Bit>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
-        <DebugSymbols>true</DebugSymbols>
-        <OutputPath>Bin\ARM\Debug</OutputPath>
-        <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
-        <NoStdLib>true</NoStdLib>
-        <DebugType>full</DebugType>
-        <PlatformTarget>
-        </PlatformTarget>
-        <ErrorReport>prompt</ErrorReport>
-        <CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
-        <Prefer32Bit>false</Prefer32Bit>
-        <Optimize>false</Optimize>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
-        <OutputPath>Bin\ARM\Release</OutputPath>
-        <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
-        <Optimize>true</Optimize>
-        <NoStdLib>true</NoStdLib>
-        <DebugType>pdbonly</DebugType>
-        <PlatformTarget>
-        </PlatformTarget>
-        <ErrorReport>prompt</ErrorReport>
-        <CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
-        <Prefer32Bit>false</Prefer32Bit>
-    </PropertyGroup>
-    <ItemGroup>
-        <Compile Include="App.xaml.cs">
-            <DependentUpon>App.xaml</DependentUpon>
-        </Compile>
-        <Compile Include="MainPage.xaml.cs">
-            <DependentUpon>MainPage.xaml</DependentUpon>
-        </Compile>
-        <Compile Include="Properties\AssemblyInfo.cs" />
-        <Page Include="src\UI\PageTest.xaml">
-            <SubType>Designer</SubType>
-            <Generator>MSBuild:Compile</Generator>
-        </Page>
-    </ItemGroup>
-    <ItemGroup>
-        <Compile Include="Plugins\org.apache.cordova.core.InAppBrowser\InAppBrowser.cs" />
-    </ItemGroup>
-        <ItemGroup>
-        <Compile Include="src\UI\PageTest.xaml.cs">
-            <DependentUpon>PageTest.xaml</DependentUpon>
-        </Compile>
-    </ItemGroup>
-    <ItemGroup>
-        <Reference Include="LibraryTest">
-            <HintPath>lib\LibraryTest.dll</HintPath>
-        </Reference>
-    </ItemGroup>
-    <ItemGroup>
-        <Compile Include="src\FileTest.cs" />
-    </ItemGroup>
-    <ItemGroup>
-        <Content Include="src\Content.img" />
-    </ItemGroup>
-</Project>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/wp8/Properties/WMAppManifest.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/wp8/Properties/WMAppManifest.xml b/cordova-lib/spec-plugman/projects/wp8/Properties/WMAppManifest.xml
deleted file mode 100644
index 5b37a95..0000000
--- a/cordova-lib/spec-plugman/projects/wp8/Properties/WMAppManifest.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2012/deployment" AppPlatformVersion="8.0">
-  <DefaultLanguage xmlns="" code="en-US" />
-  <Languages xmlns="">
-    <Language code="en-US" />
-  </Languages>
-  <App xmlns="" ProductID="{F3A8197B-6B16-456D-B5F4-DD4F04AC0BEC}" Title="An App" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal" Author="An App author" BitsPerPixel="32" Description="Apache Cordova for Windows Phone" Publisher="An App" PublisherID="{db093ed5-53b1-45f7-af72-751e8f36ab80}">
-    <IconPath IsRelative="true" IsResource="false">ApplicationIcon.png</IconPath>
-    <Capabilities>
-      <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
-    </Capabilities>
-    <Tasks>
-      <DefaultTask Name="_default" NavigationPage="MainPage.xaml" />
-    </Tasks>
-    <Tokens>
-      <PrimaryToken TokenID="An AppToken" TaskName="_default">
-        <TemplateFlip>
-          <SmallImageURI IsResource="false" IsRelative="true">Background.png</SmallImageURI>
-          <Count>0</Count>
-          <BackgroundImageURI IsResource="false" IsRelative="true">Background.png</BackgroundImageURI>
-          <Title>An App</Title>
-          <BackContent></BackContent>
-          <BackBackgroundImageURI></BackBackgroundImageURI>
-          <BackTitle></BackTitle>
-          <LargeBackgroundImageURI></LargeBackgroundImageURI>
-          <LargeBackContent></LargeBackContent>
-          <LargeBackBackgroundImageURI></LargeBackBackgroundImageURI>
-          <DeviceLockImageURI></DeviceLockImageURI>
-          <HasLarge>false</HasLarge>
-        </TemplateFlip>
-      </PrimaryToken>
-    </Tokens>
-    <ScreenResolutions>
-      <ScreenResolution Name="ID_RESOLUTION_WVGA" />
-      <ScreenResolution Name="ID_RESOLUTION_WXGA" />
-      <ScreenResolution Name="ID_RESOLUTION_HD720P" />
-    </ScreenResolutions>
-  </App>
-</Deployment>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/www-only/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/www-only/.gitkeep b/cordova-lib/spec-plugman/projects/www-only/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/publish.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/publish.spec.js b/cordova-lib/spec-plugman/publish.spec.js
deleted file mode 100644
index 3498bd6..0000000
--- a/cordova-lib/spec-plugman/publish.spec.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var publish = require('../src/publish'),
-    Q = require('q'),
-    registry = require('../src/registry/registry');
-
-describe('publish', function() {
-    it('should publish a plugin', function() {
-        var sPublish = spyOn(registry, 'publish').andReturn(Q(['/path/to/my/plugin']));
-        publish(new Array('/path/to/myplugin'));
-        expect(sPublish).toHaveBeenCalledWith(['/path/to/myplugin']);
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/registry/registry.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/registry/registry.spec.js b/cordova-lib/spec-plugman/registry/registry.spec.js
deleted file mode 100644
index 7615ee6..0000000
--- a/cordova-lib/spec-plugman/registry/registry.spec.js
+++ /dev/null
@@ -1,134 +0,0 @@
-var registry = require('../../src/registry/registry'),
-    manifest = require('../../src/registry/manifest'),
-    fs = require('fs'),
-    path = require('path'),
-    Q = require('q'),
-    shell   = require('shelljs'),
-    os = require('os'),
-    npm = require('npm');
-
-describe('registry', function() {
-    var done;
-    beforeEach(function() {
-        done = false;
-    });
-    function registryPromise(shouldSucceed, f) {
-        waitsFor(function() { return done; }, 'promise never resolved', 500);
-        return f.then(function() {
-          done = true;
-          expect(shouldSucceed).toBe(true);
-        }, function(err) {
-          done = err;
-          expect(shouldSucceed).toBe(false);
-        });
-    }
-
-    describe('manifest', function() {
-        var pluginDir, packageJson, tmp_plugin, tmp_plugin_xml, tmp_package_json;
-        beforeEach(function() {
-            pluginDir = __dirname + '/../plugins/EnginePlugin';
-            tmp_plugin = path.join(os.tmpdir(), 'plugin');
-            tmp_plugin_xml = path.join(tmp_plugin, 'plugin.xml');
-            tmp_package_json = path.join(tmp_plugin, 'package.json');
-            shell.cp('-R', pluginDir+"/*", tmp_plugin);
-        });
-        afterEach(function() {
-            shell.rm('-rf', tmp_plugin);
-        });
-        it('should generate a package.json from a plugin.xml', function() {
-            registryPromise(true, manifest.generatePackageJsonFromPluginXml(tmp_plugin).then(function() {
-                expect(fs.existsSync(tmp_package_json));
-                var packageJson = JSON.parse(fs.readFileSync(tmp_package_json));
-                expect(packageJson.name).toEqual('com.cordova.engine');
-                expect(packageJson.version).toEqual('1.0.0');
-                expect(packageJson.engines).toEqual(
-                    [ { name : 'cordova', version : '>=2.3.0' }, { name : 'cordova-plugman', version : '>=0.10.0' }, { name : 'mega-fun-plugin', version : '>=1.0.0' }, { name : 'mega-boring-plugin', version : '>=3.0.0' } ]);
-            }));
-        });
-        it('should raise an error if name does not follow com.domain.* format', function() {
-            var xmlData = fs.readFileSync(tmp_plugin_xml).toString().replace('id="com.cordova.engine"', 'id="engine"');
-            fs.writeFileSync(tmp_plugin_xml, xmlData);
-            registryPromise(false, manifest.generatePackageJsonFromPluginXml(tmp_plugin));
-        });
-        it('should generate a package.json if name uses org.apache.cordova.* for a whitelisted plugin', function() {
-            var xmlData = fs.readFileSync(tmp_plugin_xml).toString().replace('id="com.cordova.engine"', 'id="org.apache.cordova.camera"');
-            fs.writeFileSync(tmp_plugin_xml, xmlData);
-            registryPromise(true, manifest.generatePackageJsonFromPluginXml(tmp_plugin).then(function() {
-                expect(!fs.existsSync(tmp_package_json));
-            }));
-        });
-        it('should raise an error if name uses org.apache.cordova.* for a non-whitelisted plugin', function() {
-            var xmlData = fs.readFileSync(tmp_plugin_xml).toString().replace('id="com.cordova.engine"', 'id="org.apache.cordova.myinvalidplugin"');
-            fs.writeFileSync(tmp_plugin_xml, xmlData);
-            registryPromise(false, manifest.generatePackageJsonFromPluginXml(tmp_plugin));
-        });
-    });
-    describe('actions', function() {
-        var fakeLoad, fakeNPMCommands;
-
-        beforeEach(function() {
-            done = false;
-            var fakeSettings = {
-                cache: '/some/cache/dir',
-                logstream: 'somelogstream@2313213',
-                userconfig: '/some/config/dir'
-            };
-
-            var fakeNPM = function() {
-                if (arguments.length > 0) {
-                    var cb = arguments[arguments.length-1];
-                    if (cb && typeof cb === 'function') cb(null, true);
-                }
-            };
-
-            registry.settings = fakeSettings;
-            fakeLoad = spyOn(npm, 'load').andCallFake(function(settings, cb) { cb(null, true); });
-
-            fakeNPMCommands = {};
-            ['config', 'adduser', 'cache', 'publish', 'unpublish', 'search'].forEach(function(cmd) {
-                fakeNPMCommands[cmd] = jasmine.createSpy(cmd).andCallFake(fakeNPM);
-            });
-
-            npm.commands = fakeNPMCommands;
-        });
-        it('should run config', function() {
-            var params = ['set', 'registry', 'http://registry.cordova.io'];
-            registryPromise(true, registry.config(params).then(function() {
-                expect(fakeLoad).toHaveBeenCalledWith(registry.settings, jasmine.any(Function));
-                expect(fakeNPMCommands.config).toHaveBeenCalledWith(params, jasmine.any(Function));
-            }));
-        });
-        it('should run adduser', function() {
-            registryPromise(true, registry.adduser(null).then(function() {
-                expect(fakeLoad).toHaveBeenCalledWith(registry.settings, jasmine.any(Function));
-                expect(fakeNPMCommands.adduser).toHaveBeenCalledWith(null, jasmine.any(Function));
-            }));
-        });
-        it('should run publish', function() {
-            var params = [__dirname + '/../plugins/DummyPlugin'];
-            var spyGenerate = spyOn(manifest, 'generatePackageJsonFromPluginXml').andReturn(Q());
-            var spyUnlink = spyOn(fs, 'unlink');
-            registryPromise(true, registry.publish(params).then(function() {
-                expect(fakeLoad).toHaveBeenCalledWith(registry.settings, jasmine.any(Function));
-                expect(spyGenerate).toHaveBeenCalledWith(params[0]);
-                expect(fakeNPMCommands.publish).toHaveBeenCalledWith(params, jasmine.any(Function));
-                expect(spyUnlink).toHaveBeenCalledWith(path.resolve(params[0], 'package.json'));
-            }));
-        });
-        it('should run unpublish', function() {
-            var params = ['dummyplugin@0.6.0'];
-            registryPromise(true, registry.unpublish(params).then(function() {
-                expect(fakeLoad).toHaveBeenCalledWith(registry.settings, jasmine.any(Function));
-                expect(fakeNPMCommands.unpublish).toHaveBeenCalledWith(params, jasmine.any(Function));
-                expect(fakeNPMCommands.cache).toHaveBeenCalledWith(['clean'], jasmine.any(Function));
-            }));
-        });
-        it('should run search', function() {
-            var params = ['dummyplugin', 'plugin'];
-            registryPromise(true, registry.search(params).then(function() {
-                expect(fakeLoad).toHaveBeenCalledWith(registry.settings, jasmine.any(Function));
-                expect(fakeNPMCommands.search).toHaveBeenCalledWith(params, true, jasmine.any(Function));
-            }));
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/search.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/search.spec.js b/cordova-lib/spec-plugman/search.spec.js
deleted file mode 100644
index 4955d2d..0000000
--- a/cordova-lib/spec-plugman/search.spec.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var search = require('../src/search'),
-    Q = require('q'),
-    registry = require('../src/registry/registry');
-
-describe('search', function() {
-    it('should search a plugin', function() {
-        var sSearch = spyOn(registry, 'search').andReturn(Q());
-        search(new Array('myplugin', 'keyword'));
-        expect(sSearch).toHaveBeenCalledWith(['myplugin', 'keyword']);
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/uninstall.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/uninstall.spec.js b/cordova-lib/spec-plugman/uninstall.spec.js
deleted file mode 100644
index a8c2b97..0000000
--- a/cordova-lib/spec-plugman/uninstall.spec.js
+++ /dev/null
@@ -1,289 +0,0 @@
-var uninstall = require('../src/uninstall'),
-    install = require('../src/install'),
-    actions = require('../src/util/action-stack'),
-    config_changes = require('../src/util/config-changes'),
-    events  = require('../src/events'),
-    plugman = require('../plugman'),
-    common  = require('./common'),
-    fs      = require('fs'),
-    path    = require('path'),
-    shell   = require('shelljs'),
-    Q       = require('q'),
-    spec    = __dirname,
-    done    = false,
-    srcProject = path.join(spec, 'projects', 'android_uninstall'),
-    project = path.join(spec, 'projects', 'android_uninstall.test'),
-    project2 = path.join(spec, 'projects', 'android_uninstall.test2'),
-
-    plugins_dir = path.join(spec, 'plugins'),
-    plugins_install_dir = path.join(project, 'cordova', 'plugins'),
-    plugins_install_dir2 = path.join(project2, 'cordova', 'plugins'),
-
-    plugins = {
-        'DummyPlugin' : path.join(plugins_dir, 'DummyPlugin'),
-        'A' : path.join(plugins_dir, 'dependencies', 'A'),
-        'C' : path.join(plugins_dir, 'dependencies', 'C')
-    },
-    promise,
-    dummy_id = 'com.phonegap.plugins.dummyplugin';
-
-function uninstallPromise(f) {
-    return f.then(function() { done = true; }, function(err) { done = err; });
-}
-
-describe('start', function() {
-
-    it('start', function() {
-        shell.rm('-rf', project);
-        shell.rm('-rf', project2);
-        shell.cp('-R', path.join(srcProject, '*'), project);
-        shell.cp('-R', path.join(srcProject, '*'), project2);
-
-        done = false;
-        promise = Q()
-        .then(
-            function(){ return install('android', project, plugins['DummyPlugin']) }
-        ).then(
-            function(){ return install('android', project, plugins['A']) }
-        ).then(
-            function(){ return install('android', project2, plugins['C']) }
-        ).then(
-            function(){ return install('android', project2, plugins['A']) }
-        ).then(
-            function(){ done = true; }
-        );
-        waitsFor(function() { return done; }, 'promise never resolved', 500);
-    });
-});
-
-describe('uninstallPlatform', function() {
-    var proc, prepare, actions_push, add_to_queue, c_a, rm;
-    var fsWrite;
-
-    var plat_common = require('../src/platforms/common');
-
-    beforeEach(function() {
-        proc = spyOn(actions.prototype, 'process').andReturn(Q());
-        actions_push = spyOn(actions.prototype, 'push');
-        c_a = spyOn(actions.prototype, 'createAction');
-        prepare = spyOn(plugman, 'prepare');
-        fsWrite = spyOn(fs, 'writeFileSync').andReturn(true);
-        rm = spyOn(shell, 'rm').andReturn(true);
-        spyOn(shell, 'cp').andReturn(true);
-        add_to_queue = spyOn(config_changes, 'add_uninstalled_plugin_to_prepare_queue');
-        done = false;
-    });
-    describe('success', function() {
-        it('should call prepare after a successful uninstall', function() {
-            runs(function() {
-                uninstallPromise(uninstall.uninstallPlatform('android', project, dummy_id));
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 200);
-            runs(function() {
-                expect(prepare).toHaveBeenCalled();
-            });
-        });
-        it('should call the config-changes module\'s add_uninstalled_plugin_to_prepare_queue method after processing an install', function() {
-            runs(function() {
-                uninstallPromise(uninstall.uninstallPlatform('android', project, dummy_id));
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 200);
-            runs(function() {
-                expect(add_to_queue).toHaveBeenCalledWith(plugins_install_dir, dummy_id, 'android', true);
-            });
-        });
-        it('should queue up actions as appropriate for that plugin and call process on the action stack', function() {
-            runs(function() {
-                uninstallPromise(uninstall.uninstallPlatform('android', project, dummy_id));
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 200);
-            runs(function() {
-                expect(actions_push.calls.length).toEqual(5);
-                expect(proc).toHaveBeenCalled();
-            });
-        });
-
-        describe('with dependencies', function() {
-            var emit;
-            beforeEach(function() {
-                emit = spyOn(events, 'emit');
-            });
-            it('should uninstall "dangling" dependencies', function() {
-                runs(function() {
-                    uninstallPromise(uninstall.uninstallPlatform('android', project, 'A'));
-                });
-                waitsFor(function() { return done; }, 'promise never resolved', 200);
-                runs(function() {
-                    expect(emit).toHaveBeenCalledWith('log', 'Uninstalling 2 dependent plugins.');
-                });
-            });
-        });
-    });
-
-    describe('failure', function() {
-        it('should throw if platform is unrecognized', function() {
-            runs(function() {
-                uninstallPromise( uninstall.uninstallPlatform('atari', project, 'SomePlugin') );
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 200);
-            runs(function() {
-                expect(''+done).toContain('atari not supported.');
-            });
-        });
-        it('should throw if plugin is missing', function() {
-            runs(function() {
-                uninstallPromise( uninstall.uninstallPlatform('android', project, 'SomePluginThatDoesntExist') );
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 200);
-            runs(function() {
-                expect(''+done).toContain('Plugin "SomePluginThatDoesntExist" not found. Already uninstalled?');
-            });
-        });
-    });
-});
-
-describe('uninstallPlugin', function() {
-    var rm, fsWrite, rmstack = [], emit;
-
-    beforeEach(function() {
-        fsWrite = spyOn(fs, 'writeFileSync').andReturn(true);
-        rm = spyOn(shell, 'rm').andCallFake(function(f,p) { rmstack.push(p); return true});
-        rmstack = [];
-        emit = spyOn(events, 'emit');
-        done = false;
-    });
-    describe('with dependencies', function() {
-
-        it('should delete all dependent plugins', function() {
-            runs(function() {
-                uninstallPromise( uninstall.uninstallPlugin('A', plugins_install_dir) );
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 200);
-            runs(function() {
-                var del = common.spy.getDeleted(emit);
-
-                expect(del).toEqual([
-                    'Deleted "C"',
-                    'Deleted "D"',
-                    'Deleted "A"'
-                ]);
-            });
-        });
-
-        it("should fail if plugin is a required dependency", function() {
-            runs(function() {
-                uninstallPromise( uninstall.uninstallPlugin('C', plugins_install_dir) );
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 200);
-            runs(function() {
-                expect(done.message).toBe('"C" is required by (A) and cannot be removed (hint: use -f or --force)');
-            });
-        });
-
-        it("allow forcefully removing a plugin", function() {
-            runs(function() {
-                uninstallPromise( uninstall.uninstallPlugin('C', plugins_install_dir, {force: true}) );
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 200);
-            runs(function() {
-                expect(done).toBe(true);
-                var del = common.spy.getDeleted(emit);
-                expect(del).toEqual(['Deleted "C"']);
-            });
-        });
-
-        it("never remove top level plugins if they are a dependency", function() {
-            runs(function() {
-                uninstallPromise( uninstall.uninstallPlugin('A', plugins_install_dir2) );
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 200);
-            runs(function() {
-                var del = common.spy.getDeleted(emit);
-
-                expect(del).toEqual([
-                    'Deleted "D"',
-                    'Deleted "A"'
-                ]);
-            });
-        });
-    });
-});
-
-describe('uninstall', function() {
-    var fsWrite, rm, add_to_queue;
-
-    beforeEach(function() {
-        fsWrite = spyOn(fs, 'writeFileSync').andReturn(true);
-        rm = spyOn(shell, 'rm').andReturn(true);
-        add_to_queue = spyOn(config_changes, 'add_uninstalled_plugin_to_prepare_queue');
-        done = false;
-    });
-    describe('success', function() {
-        it('should call the config-changes module\'s add_uninstalled_plugin_to_prepare_queue method after processing an install', function() {
-            runs(function() {
-                uninstallPromise( uninstall('android', project, plugins['DummyPlugin']) );
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 200);
-            runs(function() {
-                expect(add_to_queue).toHaveBeenCalledWith(plugins_install_dir, dummy_id, 'android', true);
-            });
-        });
-    });
-
-    describe('failure', function() {
-        it('should throw if platform is unrecognized', function() {
-            runs(function() {
-                uninstallPromise(uninstall('atari', project, 'SomePlugin'));
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 200);
-            runs(function() {
-                expect(''+done).toContain('atari not supported.');
-            });
-        });
-        it('should throw if plugin is missing', function() {
-            runs(function() {
-                uninstallPromise(uninstall('android', project, 'SomePluginThatDoesntExist'));
-            });
-            waitsFor(function() { return done; }, 'promise never resolved', 200);
-            runs(function() {
-                expect(''+done).toContain('Plugin "SomePluginThatDoesntExist" not found. Already uninstalled?');
-            });
-        });
-    });
-});
-
-describe('end', function() {
-
-    it('end', function() {
-        done = false;
-
-        promise.then(
-            function(){
-                return uninstall('android', project, plugins['DummyPlugin'])
-            }
-        ).then(
-            function(){
-                // Fails... A depends on
-                return uninstall('android', project, plugins['C'])
-            }
-        ).fail(
-            function(err) {
-                expect(err.message).toBe("The plugin 'C' is required by (A), skipping uninstallation.");
-            }
-        ).then(
-            function(){
-                // dependencies on C,D ... should this only work with --recursive? prompt user..?
-                return uninstall('android', project, plugins['A'])
-            }
-        ).fin(function(err){
-            if(err)
-                plugman.emit('error', err);
-
-            shell.rm('-rf', project);
-            shell.rm('-rf', project2);
-            done = true;
-        });
-
-        waitsFor(function() { return done; }, 'promise never resolved', 500);
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/unpublish.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/unpublish.spec.js b/cordova-lib/spec-plugman/unpublish.spec.js
deleted file mode 100644
index 944f640..0000000
--- a/cordova-lib/spec-plugman/unpublish.spec.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var unpublish = require('../src/unpublish'),
-    Q = require('q'),
-    registry = require('../src/registry/registry');
-
-describe('unpublish', function() {
-    it('should unpublish a plugin', function() {
-        var sUnpublish = spyOn(registry, 'unpublish').andReturn(Q());
-        unpublish(new Array('myplugin@0.0.1'));
-        expect(sUnpublish).toHaveBeenCalledWith(['myplugin@0.0.1']);
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/util/action-stack.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/util/action-stack.spec.js b/cordova-lib/spec-plugman/util/action-stack.spec.js
deleted file mode 100644
index 3aa732f..0000000
--- a/cordova-lib/spec-plugman/util/action-stack.spec.js
+++ /dev/null
@@ -1,58 +0,0 @@
-var action_stack = require('../../src/util/action-stack'),
-    ios = require('../../src/platforms/ios');
-
-describe('action-stack', function() {
-    var stack;
-    beforeEach(function() {
-        stack = new action_stack();
-    });
-    describe('processing of actions', function() {
-        it('should process actions one at a time until all are done', function() {
-            var first_spy = jasmine.createSpy();
-            var first_args = [1];
-            var second_spy = jasmine.createSpy();
-            var second_args = [2];
-            var third_spy = jasmine.createSpy();
-            var third_args = [3];
-            stack.push(stack.createAction(first_spy, first_args, function(){}, []));
-            stack.push(stack.createAction(second_spy, second_args, function(){}, []));
-            stack.push(stack.createAction(third_spy, third_args, function(){}, []));
-            stack.process('android', 'blah');
-            expect(first_spy).toHaveBeenCalledWith(first_args[0]);
-            expect(second_spy).toHaveBeenCalledWith(second_args[0]);
-            expect(third_spy).toHaveBeenCalledWith(third_args[0]);
-        });
-        it('should revert processed actions if an exception occurs', function() {
-            spyOn(console, 'log');
-            var first_spy = jasmine.createSpy();
-            var first_args = [1];
-            var first_reverter = jasmine.createSpy();
-            var first_reverter_args = [true];
-            var process_err = new Error('process_err');
-            var second_spy = jasmine.createSpy().andCallFake(function() {
-                throw process_err;
-            });
-            var second_args = [2];
-            var third_spy = jasmine.createSpy();
-            var third_args = [3];
-            stack.push(stack.createAction(first_spy, first_args, first_reverter, first_reverter_args));
-            stack.push(stack.createAction(second_spy, second_args, function(){}, []));
-            stack.push(stack.createAction(third_spy, third_args, function(){}, []));
-            // process should throw
-            var error;
-            runs(function() {
-                stack.process('android', 'blah').fail(function(err) { error = err; });
-            });
-            waitsFor(function(){ return error; }, 'process promise never resolved', 500);
-            runs(function() {
-                expect(error).toEqual(process_err);
-                // first two actions should have been called, but not the third
-                expect(first_spy).toHaveBeenCalledWith(first_args[0]);
-                expect(second_spy).toHaveBeenCalledWith(second_args[0]);
-                expect(third_spy).not.toHaveBeenCalledWith(third_args[0]);
-                // first reverter should have been called after second action exploded
-                expect(first_reverter).toHaveBeenCalledWith(first_reverter_args[0]);
-            });
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/util/config-changes.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/util/config-changes.spec.js b/cordova-lib/spec-plugman/util/config-changes.spec.js
deleted file mode 100644
index 9d93d72..0000000
--- a/cordova-lib/spec-plugman/util/config-changes.spec.js
+++ /dev/null
@@ -1,449 +0,0 @@
-/* jshint node:true, sub:true, indent:4  */
-/* global jasmine, describe, beforeEach, afterEach, it, spyOn, expect */
-
-var configChanges = require('../../src/util/config-changes'),
-    xml_helpers = require('../../src/util/xml-helpers'),
-    ios_parser = require('../../src/platforms/ios'),
-    fs      = require('fs'),
-    os      = require('osenv'),
-    plugman = require('../../plugman'),
-    events  = require('../../src/events'),
-    et      = require('elementtree'),
-    path    = require('path'),
-    plist = require('plist-with-patches'),
-    shell   = require('shelljs'),
-    xcode = require('xcode'),
-    temp    = path.join(os.tmpdir(), 'plugman'),
-    dummyplugin = path.join(__dirname, '..', 'plugins', 'DummyPlugin'),
-    cbplugin = path.join(__dirname, '..', 'plugins', 'ChildBrowser'),
-    childrenplugin = path.join(__dirname, '..', 'plugins', 'multiple-children'),
-    shareddepsplugin = path.join(__dirname, '..', 'plugins', 'shared-deps-multi-child'),
-    configplugin = path.join(__dirname, '..', 'plugins', 'ConfigTestPlugin'),
-    varplugin = path.join(__dirname, '..', 'plugins', 'VariablePlugin'),
-    android_two_project = path.join(__dirname, '..', 'projects', 'android_two', '*'),
-    android_two_no_perms_project = path.join(__dirname, '..', 'projects', 'android_two_no_perms', '*'),
-    ios_plist_project = path.join(__dirname, '..', 'projects', 'ios-plist', '*'),
-    ios_config_xml = path.join(__dirname, '..', 'projects', 'ios-config-xml', '*'),
-    plugins_dir = path.join(temp, 'cordova', 'plugins');
-
-// TODO: dont do fs so much
-
-var dummy_xml = new et.ElementTree(et.XML(fs.readFileSync(path.join(dummyplugin, 'plugin.xml'), 'utf-8')));
-
-function innerXML(xmltext) {
-    return xmltext.replace(/^<[\w\s\-=\/"\.]+>/, '').replace(/<\/[\w\s\-=\/"\.]+>$/,'');
-}
-
-describe('config-changes module', function() {
-    beforeEach(function() {
-        shell.mkdir('-p', temp);
-        shell.mkdir('-p', plugins_dir);
-    });
-    afterEach(function() {
-        shell.rm('-rf', temp);
-        ios_parser.purgeProjectFileCache(temp);
-    });
-
-    describe('queue methods', function() {
-        describe('add_installed_plugin_to_prepare_queue', function() {
-            it('should call get_platform_json method', function() {
-                var spy = spyOn(configChanges, 'get_platform_json').andReturn({
-                    prepare_queue:{
-                        installed:[],
-                        uninstalled:[]
-                    }
-                });
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'PooPlugin', 'android', {});
-                expect(spy).toHaveBeenCalledWith(plugins_dir, 'android');
-            });
-            it('should append specified plugin to platform.json', function() {
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'PooPlugin', 'android', {});
-                var json = configChanges.get_platform_json(plugins_dir, 'android');
-                expect(json.prepare_queue.installed[0].plugin).toEqual('PooPlugin');
-                expect(json.prepare_queue.installed[0].vars).toEqual({});
-            });
-            it('should append specified plugin with any variables to platform.json', function() {
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'PooPlugin', 'android', {'dude':'man'});
-                var json = configChanges.get_platform_json(plugins_dir, 'android');
-                expect(json.prepare_queue.installed[0].plugin).toEqual('PooPlugin');
-                expect(json.prepare_queue.installed[0].vars).toEqual({'dude':'man'});
-            });
-            it('should call save_platform_json with updated config', function() {
-                var spy = spyOn(configChanges, 'save_platform_json');
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'PooPlugin', 'android', {});
-                var config = spy.mostRecentCall.args[0];
-                expect(config.prepare_queue.installed[0].plugin).toEqual('PooPlugin');
-            });
-        });
-
-        describe('add_uninstalled_plugin_to_prepare_queue', function() {
-            beforeEach(function() {
-                shell.cp('-rf', dummyplugin, plugins_dir);
-            });
-
-            it('should call get_platform_json method', function() {
-                var spy = spyOn(configChanges, 'get_platform_json').andReturn({
-                    prepare_queue:{
-                        installed:[],
-                        uninstalled:[]
-                    }
-                });
-                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'DummyPlugin', 'android');
-                expect(spy).toHaveBeenCalledWith(plugins_dir, 'android');
-            });
-            it('should append specified plugin to platform.json', function() {
-                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'DummyPlugin', 'android');
-                var json = configChanges.get_platform_json(plugins_dir, 'android');
-                expect(json.prepare_queue.uninstalled[0].plugin).toEqual('DummyPlugin');
-                expect(json.prepare_queue.uninstalled[0].id).toEqual('com.phonegap.plugins.dummyplugin');
-            });
-            it('should call save_platform_json with updated config', function() {
-                var spy = spyOn(configChanges, 'save_platform_json');
-                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'DummyPlugin', 'android', {});
-                var config = spy.mostRecentCall.args[0];
-                expect(config.prepare_queue.uninstalled[0].plugin).toEqual('DummyPlugin');
-                expect(config.prepare_queue.uninstalled[0].id).toEqual('com.phonegap.plugins.dummyplugin');
-            });
-        });
-    });
-
-    describe('get_platform_json method', function() {
-        it('should return an empty config json object if file doesn\'t exist', function() {
-            var filepath = path.join(plugins_dir, 'android.json');
-            var cfg = configChanges.get_platform_json(plugins_dir, 'android');
-            expect(cfg).toBeDefined();
-            expect(cfg.prepare_queue).toBeDefined();
-            expect(cfg.config_munge).toBeDefined();
-            expect(cfg.installed_plugins).toBeDefined();
-        });
-        it('should return the json file if it exists', function() {
-            var filepath = path.join(plugins_dir, 'android.json');
-            var json = {
-                prepare_queue: {installed: [], uninstalled: []},
-                config_munge: {files: {"some_file": {parents: {"some_parent": [{"xml": "some_change", "count": 1}]}}}},
-                installed_plugins: {}};
-            fs.writeFileSync(filepath, JSON.stringify(json), 'utf-8');
-            var cfg = configChanges.get_platform_json(plugins_dir, 'android');
-            expect(JSON.stringify(json)).toEqual(JSON.stringify(cfg));
-        });
-    });
-
-    describe('save_platform_json method', function() {
-        it('should write out specified json', function() {
-            var filepath = path.join(plugins_dir, 'android.json');
-            var cfg = {poop:true};
-            configChanges.save_platform_json(cfg, plugins_dir, 'android');
-            expect(fs.existsSync(filepath)).toBe(true);
-            expect(JSON.parse(fs.readFileSync(filepath, 'utf-8'))).toEqual(cfg);
-        });
-    });
-
-    describe('generate_plugin_config_munge method', function() {
-        describe('for android projects', function() {
-            beforeEach(function() {
-                shell.cp('-rf', android_two_project, temp);
-            });
-            it('should return a flat config hierarchy for simple, one-off config changes', function() {
-                var xml;
-                var munger = new configChanges.PlatformMunger('android', temp, 'unused');
-                var munge = munger.generate_plugin_config_munge(dummyplugin, {});
-                expect(munge.files['AndroidManifest.xml']).toBeDefined();
-                expect(munge.files['AndroidManifest.xml'].parents['/manifest/application']).toBeDefined();
-                xml = (new et.ElementTree(dummy_xml.find('./platform[@name="android"]/config-file[@target="AndroidManifest.xml"]'))).write({xml_declaration:false});
-                xml = innerXML(xml);
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest/application', xml).count).toEqual(1);
-                expect(munge.files['res/xml/plugins.xml']).toBeDefined();
-                expect(munge.files['res/xml/plugins.xml'].parents['/plugins']).toBeDefined();
-                xml = (new et.ElementTree(dummy_xml.find('./platform[@name="android"]/config-file[@target="res/xml/plugins.xml"]'))).write({xml_declaration:false});
-                xml = innerXML(xml);
-                expect(configChanges.get_munge_change(munge, 'res/xml/plugins.xml', '/plugins', xml).count).toEqual(1);
-                expect(munge.files['res/xml/config.xml']).toBeDefined();
-                expect(munge.files['res/xml/config.xml'].parents['/cordova/plugins']).toBeDefined();
-                xml = (new et.ElementTree(dummy_xml.find('./platform[@name="android"]/config-file[@target="res/xml/config.xml"]'))).write({xml_declaration:false});
-                xml = innerXML(xml);
-                expect(configChanges.get_munge_change(munge, 'res/xml/config.xml', '/cordova/plugins', xml).count).toEqual(1);
-            });
-            it('should split out multiple children of config-file elements into individual leaves', function() {
-                var munger = new configChanges.PlatformMunger('android', temp, 'unused');
-                var munge = munger.generate_plugin_config_munge(childrenplugin, {});
-                expect(munge.files['AndroidManifest.xml']).toBeDefined();
-                expect(munge.files['AndroidManifest.xml'].parents['/manifest']).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />')).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />')).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="android.permission.READ_PHONE_STATE" />')).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="android.permission.INTERNET" />')).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="android.permission.GET_ACCOUNTS" />')).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="android.permission.WAKE_LOCK" />')).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<permission android:name="com.alunny.childapp.permission.C2D_MESSAGE" android:protectionLevel="signature" />')).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="com.alunny.childapp.permission.C2D_MESSAGE" />')).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />')).toBeDefined();
-            });
-            it('should not use xml comments as config munge leaves', function() {
-                var munger = new configChanges.PlatformMunger('android', temp, 'unused');
-                var munge = munger.generate_plugin_config_munge(childrenplugin, {});
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<!--library-->')).not.toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<!-- GCM connects to Google Services. -->')).not.toBeDefined();
-            });
-            it('should increment config hierarchy leaves if different config-file elements target the same file + selector + xml', function() {
-                var munger = new configChanges.PlatformMunger('android', temp, 'unused');
-                var munge = munger.generate_plugin_config_munge(configplugin, {});
-                expect(configChanges.get_munge_change(munge, 'res/xml/config.xml', '/widget', '<poop />').count).toEqual(2);
-            });
-            it('should take into account interpolation variables', function() {
-                var munger = new configChanges.PlatformMunger('android', temp, 'unused');
-                var munge = munger.generate_plugin_config_munge(childrenplugin, {PACKAGE_NAME:'ca.filmaj.plugins'});
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="ca.filmaj.plugins.permission.C2D_MESSAGE" />')).toBeDefined();
-            });
-            it('should create munges for platform-agnostic config.xml changes', function() {
-                var munger = new configChanges.PlatformMunger('android', temp, 'unused');
-                var munge = munger.generate_plugin_config_munge(dummyplugin, {});
-                expect(configChanges.get_munge_change(munge, 'config.xml', '/*', '<access origin="build.phonegap.com" />')).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'config.xml', '/*', '<access origin="s3.amazonaws.com" />')).toBeDefined();
-            });
-            it('should automatically add on app java identifier as PACKAGE_NAME variable for android config munges', function() {
-                shell.cp('-rf', android_two_project, temp);
-                var munger = new configChanges.PlatformMunger('android', temp, 'unused');
-                var munge = munger.generate_plugin_config_munge(varplugin, {});
-                var expected_xml = '<package>com.alunny.childapp</package>';
-                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', expected_xml)).toBeDefined();
-            });
-        });
-
-        describe('for ios projects', function() {
-            beforeEach(function() {
-                shell.cp('-rf', ios_config_xml, temp);
-            });
-            it('should automatically add on ios bundle identifier as PACKAGE_NAME variable for ios config munges', function() {
-                var munger = new configChanges.PlatformMunger('ios', temp, 'unused');
-                var munge = munger.generate_plugin_config_munge(varplugin, {});
-                var expected_xml = '<cfbundleid>com.example.friendstring</cfbundleid>';
-                expect(configChanges.get_munge_change(munge, 'config.xml', '/widget', expected_xml)).toBeDefined();
-            });
-            it('should special case framework elements for ios', function() {
-                var munger = new configChanges.PlatformMunger('ios', temp, 'unused');
-                var munge = munger.generate_plugin_config_munge(cbplugin, {});
-                expect(munge.files['framework']).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'framework', 'libsqlite3.dylib', 'false')).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'framework', 'social.framework', 'true')).toBeDefined();
-                expect(configChanges.get_munge_change(munge, 'framework', 'music.framework', 'false')).toBeDefined();
-                expect(munge.files['framework'].parents['Custom.framework']).not.toBeDefined();
-            });
-        });
-    });
-
-    describe('processing of plugins (via process method)', function() {
-        beforeEach(function() {
-            shell.cp('-rf', dummyplugin, plugins_dir);
-        });
-        it('should generate config munges for queued plugins', function() {
-            shell.cp('-rf', android_two_project, temp);
-            var cfg = configChanges.get_platform_json(plugins_dir, 'android');
-            cfg.prepare_queue.installed = [{'plugin':'DummyPlugin', 'vars':{}}];
-            configChanges.save_platform_json(cfg, plugins_dir, 'android');
-            var munger = new configChanges.PlatformMunger('android', temp, plugins_dir);
-            var spy = spyOn(munger, 'generate_plugin_config_munge').andReturn({});
-            munger.process();
-            expect(spy).toHaveBeenCalledWith(path.join(plugins_dir, 'DummyPlugin'), {});
-        });
-        it('should get a reference to existing config munge by calling get_platform_json', function() {
-            shell.cp('-rf', android_two_project, temp);
-            var spy = spyOn(configChanges, 'get_platform_json').andReturn({
-                prepare_queue:{
-                    installed:[],
-                    uninstalled:[]
-                },
-                config_munge:{}
-            });
-            configChanges.process(plugins_dir, temp, 'android');
-            expect(spy).toHaveBeenCalledWith(plugins_dir, 'android');
-        });
-        describe(': installation', function() {
-            describe('of xml config files', function() {
-                beforeEach(function() {
-                    shell.cp('-rf', android_two_project, temp);
-                });
-                it('should call graftXML for every new config munge it introduces (every leaf in config munge that does not exist)', function() {
-                    var cfg = configChanges.get_platform_json(plugins_dir, 'android');
-                    cfg.prepare_queue.installed = [{'plugin':'DummyPlugin', 'vars':{}}];
-                    configChanges.save_platform_json(cfg, plugins_dir, 'android');
-
-                    var spy = spyOn(xml_helpers, 'graftXML').andReturn(true);
-
-                    var manifest_doc = new et.ElementTree(et.XML(fs.readFileSync(path.join(temp, 'AndroidManifest.xml'), 'utf-8')));
-                    var munge = dummy_xml.find('./platform[@name="android"]/config-file[@target="AndroidManifest.xml"]');
-                    configChanges.process(plugins_dir, temp, 'android');
-                    expect(spy.calls.length).toEqual(4);
-                    expect(spy.argsForCall[0][2]).toEqual('/*');
-                    expect(spy.argsForCall[1][2]).toEqual('/*');
-                    expect(spy.argsForCall[2][2]).toEqual('/manifest/application');
-                    expect(spy.argsForCall[3][2]).toEqual('/cordova/plugins');
-                });
-                it('should not call graftXML for a config munge that already exists from another plugin', function() {
-                    shell.cp('-rf', configplugin, plugins_dir);
-                    configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'ConfigTestPlugin', 'android', {});
-
-                    var spy = spyOn(xml_helpers, 'graftXML').andReturn(true);
-                    configChanges.process(plugins_dir, temp, 'android');
-                    expect(spy.calls.length).toEqual(1);
-                });
-                it('should not call graftXML for a config munge targeting a config file that does not exist', function() {
-                    configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'DummyPlugin', 'android', {});
-
-                    var spy = spyOn(fs, 'readFileSync').andCallThrough();
-
-                    configChanges.process(plugins_dir, temp, 'android');
-                    expect(spy).not.toHaveBeenCalledWith(path.join(temp, 'res', 'xml', 'plugins.xml'), 'utf-8');
-                });
-            });
-            describe('of plist config files', function() {
-                var xcode_add, xcode_rm;
-                it('should write empty string nodes with no whitespace', function() {
-                    shell.cp('-rf', ios_config_xml, temp);
-                    shell.cp('-rf', varplugin, plugins_dir);
-                    configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'ios', {});
-                    configChanges.process(plugins_dir, temp, 'ios');
-                    expect(fs.readFileSync(path.join(temp, 'SampleApp', 'SampleApp-Info.plist'), 'utf-8')).toMatch(/<key>APluginNode<\/key>\n    <string><\/string>/m);
-                });
-            });
-            describe('of pbxproject framework files', function() {
-                var xcode_add, xcode_rm;
-                beforeEach(function() {
-                    shell.cp('-rf', ios_config_xml, temp);
-                    shell.cp('-rf', cbplugin, plugins_dir);
-                    xcode_add = spyOn(xcode.project.prototype, 'addFramework').andCallThrough();
-                });
-                it('should call into xcode.addFramework if plugin has <framework> file defined and is ios',function() {
-                    configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'ChildBrowser', 'ios', {});
-                    configChanges.process(plugins_dir, temp, 'ios');
-                    expect(xcode_add).toHaveBeenCalledWith('libsqlite3.dylib', {weak:false});
-                    expect(xcode_add).toHaveBeenCalledWith('social.framework', {weak:true});
-                    expect(xcode_add).toHaveBeenCalledWith('music.framework', {weak:false});
-                    expect(xcode_add).not.toHaveBeenCalledWith('Custom.framework');
-                });
-            });
-            it('should resolve wildcard config-file targets to the project, if applicable', function() {
-                shell.cp('-rf', ios_config_xml, temp);
-                shell.cp('-rf', cbplugin, plugins_dir);
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'ChildBrowser', 'ios', {});
-                var spy = spyOn(fs, 'readFileSync').andCallThrough();
-
-                configChanges.process(plugins_dir, temp, 'ios');
-                expect(spy).toHaveBeenCalledWith(path.join(temp, 'SampleApp', 'SampleApp-Info.plist').replace(/\\/g, '/'), 'utf8');
-            });
-            it('should move successfully installed plugins from queue to installed plugins section, and include/retain vars if applicable', function() {
-                shell.cp('-rf', android_two_project, temp);
-                shell.cp('-rf', varplugin, plugins_dir);
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'android', {"API_KEY":"hi"}, true);
-
-                configChanges.process(plugins_dir, temp, 'android');
-
-                var cfg = configChanges.get_platform_json(plugins_dir, 'android');
-                expect(cfg.prepare_queue.installed.length).toEqual(0);
-                expect(cfg.installed_plugins['com.adobe.vars']).toBeDefined();
-                expect(cfg.installed_plugins['com.adobe.vars']['API_KEY']).toEqual('hi');
-            });
-            it('should save changes to global config munge after completing an install', function() {
-                shell.cp('-rf', android_two_project, temp);
-                shell.cp('-rf', varplugin, plugins_dir);
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'android', {"API_KEY":"hi"});
-
-                var spy = spyOn(configChanges, 'save_platform_json');
-                configChanges.process(plugins_dir, temp, 'android');
-                expect(spy).toHaveBeenCalled();
-            });
-        });
-
-        describe(': uninstallation', function() {
-            it('should call pruneXML for every config munge it completely removes from the app (every leaf that is decremented to 0)', function() {
-                shell.cp('-rf', android_two_project, temp);
-                // Run through an "install"
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'DummyPlugin', 'android', {});
-                configChanges.process(plugins_dir, temp, 'android');
-
-                // Now set up an uninstall and make sure prunexml is called properly
-                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'DummyPlugin', 'android');
-                var spy = spyOn(xml_helpers, 'pruneXML').andReturn(true);
-                configChanges.process(plugins_dir, temp, 'android');
-                expect(spy.calls.length).toEqual(4);
-                expect(spy.argsForCall[0][2]).toEqual('/*');
-                expect(spy.argsForCall[1][2]).toEqual('/*');
-                expect(spy.argsForCall[2][2]).toEqual('/manifest/application');
-                expect(spy.argsForCall[3][2]).toEqual('/cordova/plugins');
-            });
-            it('should generate a config munge that interpolates variables into config changes, if applicable', function() {
-                shell.cp('-rf', android_two_project, temp);
-                shell.cp('-rf', varplugin, plugins_dir);
-                // Run through an "install"
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'android', {"API_KEY":"canucks"});
-                var munger = new configChanges.PlatformMunger('android', temp, plugins_dir);
-                munger.process();
-
-                // Now set up an uninstall and make sure prunexml is called properly
-                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'android');
-                var spy = spyOn(munger, 'generate_plugin_config_munge').andReturn({});
-                munger.process();
-                var munge_params = spy.mostRecentCall.args;
-                expect(munge_params[0]).toEqual(path.join(plugins_dir, 'VariablePlugin'));
-                expect(munge_params[1]['API_KEY']).toEqual('canucks');
-            });
-            it('should not call pruneXML for a config munge that another plugin depends on', function() {
-                shell.cp('-rf', android_two_no_perms_project, temp);
-                shell.cp('-rf', childrenplugin, plugins_dir);
-                shell.cp('-rf', shareddepsplugin, plugins_dir);
-
-                // Run through and "install" two plugins (they share a permission for INTERNET)
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'multiple-children', 'android', {});
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'shared-deps-multi-child', 'android', {});
-                configChanges.process(plugins_dir, temp, 'android');
-
-                // Now set up an uninstall for multi-child plugin
-                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'multiple-children', 'android');
-                configChanges.process(plugins_dir, temp, 'android');
-                var am_xml = new et.ElementTree(et.XML(fs.readFileSync(path.join(temp, 'AndroidManifest.xml'), 'utf-8')));
-                var permission = am_xml.find('./uses-permission');
-                expect(permission).toBeDefined();
-                expect(permission.attrib['android:name']).toEqual('android.permission.INTERNET');
-            });
-            it('should not call pruneXML for a config munge targeting a config file that does not exist', function() {
-                shell.cp('-rf', android_two_project, temp);
-                // install a plugin
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'DummyPlugin', 'android', {});
-                configChanges.process(plugins_dir, temp, 'android');
-                // set up an uninstall for the same plugin
-                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'DummyPlugin', 'android', {});
-
-                var spy = spyOn(fs, 'readFileSync').andCallThrough();
-                configChanges.process(plugins_dir, temp, 'android');
-
-                expect(spy).not.toHaveBeenCalledWith(path.join(temp, 'res', 'xml', 'plugins.xml'), 'utf-8');
-            });
-            it('should remove uninstalled plugins from installed plugins list', function() {
-                shell.cp('-rf', android_two_project, temp);
-                shell.cp('-rf', varplugin, plugins_dir);
-                // install the var plugin
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'android', {"API_KEY":"eat my shorts"});
-                configChanges.process(plugins_dir, temp, 'android');
-                // queue up an uninstall for the same plugin
-                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'android');
-                configChanges.process(plugins_dir, temp, 'android');
-
-                var cfg = configChanges.get_platform_json(plugins_dir, 'android');
-                expect(cfg.prepare_queue.uninstalled.length).toEqual(0);
-                expect(cfg.installed_plugins['com.adobe.vars']).not.toBeDefined();
-            });
-            it('should save changes to global config munge after completing an uninstall', function() {
-                shell.cp('-rf', android_two_project, temp);
-                shell.cp('-rf', varplugin, plugins_dir);
-                // install a plugin
-                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'android', {"API_KEY":"eat my shorts"});
-                configChanges.process(plugins_dir, temp, 'android');
-                // set up an uninstall for the plugin
-                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'android');
-
-                var spy = spyOn(configChanges, 'save_platform_json');
-                configChanges.process(plugins_dir, temp, 'android');
-                expect(spy).toHaveBeenCalled();
-            });
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/util/csproj.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/util/csproj.spec.js b/cordova-lib/spec-plugman/util/csproj.spec.js
deleted file mode 100644
index c506c38..0000000
--- a/cordova-lib/spec-plugman/util/csproj.spec.js
+++ /dev/null
@@ -1,97 +0,0 @@
-var csproj  = require('../../src/util/csproj'),
-    path    = require('path'),
-    os      = require('osenv'),
-    et      = require('elementtree'),
-    fs      = require('fs'),
-    xml_helpers = require('../../src/util/xml-helpers');
-
-var wp7_project     = path.join(__dirname, '..', 'projects', 'wp7'),
-    wp8_project     = path.join(__dirname, '..', 'projects', 'wp8'),
-    temp            = path.join(os.tmpdir(), 'plugman'),
-    example1_csproj  = path.join(wp7_project, 'CordovaAppProj.csproj'),
-    example2_csproj  = path.join(wp8_project, 'CordovaAppProj.csproj'),
-    wpcsproj        = path.join(__dirname, '..', 'plugins', 'WPcsproj');
-
-describe('csproj', function() {
-    it('should throw if passed in an invalid xml file path ref', function() {
-        expect(function() {
-            new csproj('blahblah');
-        }).toThrow();
-    });
-    it('should successfully parse a valid csproj file into an xml document', function() {
-        var doc;
-        expect(function() {
-            doc = new csproj(example1_csproj);
-        }).not.toThrow();
-        expect(doc.xml.getroot()).toBeDefined();
-    });
-
-    describe('write method', function() {
-
-    });
-
-    describe('source file', function() {
-
-        var test_csproj;
-        var page_test   = path.join('src', 'UI', 'PageTest.xaml');
-        var page_test_cs = path.join('src', 'UI', 'PageTest.xaml.cs');
-        var lib_test    = path.join('lib', 'LibraryTest.dll');
-        var file_test   = path.join('src', 'FileTest.cs');
-        var content_test   = path.join('src', 'Content.img');
-
-        describe('add method', function() {
-            var test_csproj = new csproj(example1_csproj);
-            it('should properly add .xaml files', function() {
-                test_csproj.addSourceFile(page_test);
-                expect(test_csproj.xml.getroot().find('.//Page[@Include="src\\UI\\PageTest.xaml"]')).toBeTruthy();
-                expect(test_csproj.xml.getroot().find('.//Page[@Include="src\\UI\\PageTest.xaml"]/Generator').text).toEqual('MSBuild:Compile');
-                expect(test_csproj.xml.getroot().find('.//Page[@Include="src\\UI\\PageTest.xaml"]/SubType').text).toEqual('Designer');
-            });
-            it('should properly add .xaml.cs files', function() {
-                test_csproj.addSourceFile(page_test_cs);
-                expect(test_csproj.xml.getroot().find('.//Compile[@Include="src\\UI\\PageTest.xaml.cs"]')).toBeTruthy();
-                expect(test_csproj.xml.getroot().find('.//Compile[@Include="src\\UI\\PageTest.xaml.cs"]/DependentUpon').text).toEqual('PageTest.xaml');
-            });
-            it('should properly add .cs files', function() {
-                test_csproj.addSourceFile(file_test);
-                expect(test_csproj.xml.getroot().find('.//Compile[@Include="src\\FileTest.cs"]')).toBeTruthy();
-            });
-            it('should properly add content files', function() {
-                test_csproj.addSourceFile(content_test);
-                expect(test_csproj.xml.getroot().find('.//Content[@Include="src\\Content.img"]')).toBeTruthy();
-            });
-        });
-
-        describe('remove method', function() {
-            var test_csproj = new csproj(example2_csproj);
-            it('should properly remove .xaml pages', function() {
-                test_csproj.removeSourceFile(page_test);
-                expect(test_csproj.xml.getroot().find('.//Page[@Include="src\\UI\\PageTest.xaml"]')).toBeFalsy();
-            });
-            it('should properly remove .xaml.cs files', function() {
-                test_csproj.removeSourceFile(page_test_cs);
-                expect(test_csproj.xml.getroot().find('.//Compile[@Include="src\\UI\\PageTest.xaml.cs"]')).toBeFalsy();
-            });
-            it('should properly remove .cs files', function() {
-                test_csproj.removeSourceFile(file_test);
-                expect(test_csproj.xml.getroot().find('.//Compile[@Include="src\\FileTest.cs"]')).toBeFalsy();
-            });
-            it('should properly remove content files', function() {
-                test_csproj.removeSourceFile(content_test);
-                expect(test_csproj.xml.getroot().find('.//Content[@Include="src\\Content.img"]')).toBeFalsy();
-            });
-            it('should remove all empty ItemGroup\'s', function() {
-                test_csproj.removeSourceFile(page_test);
-                test_csproj.removeSourceFile(page_test_cs);
-                test_csproj.removeSourceFile(lib_test);
-                test_csproj.removeSourceFile(file_test);
-                var item_groups = test_csproj.xml.findall('ItemGroup');
-                for (var i = 0, l = item_groups.length; i < l; i++) {
-                    var group = item_groups[i];
-                    expect(group._children.length).toBeGreaterThan(0);
-                }
-            })
-
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/util/dependencies.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/util/dependencies.spec.js b/cordova-lib/spec-plugman/util/dependencies.spec.js
deleted file mode 100644
index bbc7111..0000000
--- a/cordova-lib/spec-plugman/util/dependencies.spec.js
+++ /dev/null
@@ -1,41 +0,0 @@
-var dependencies = require('../../src/util/dependencies'),
-    xml_helpers = require('../../src/util/xml-helpers'),
-    path = require('path'),
-    config = require('../../src/util/config-changes');
-
-describe('dependency module', function() {
-    describe('generate_dependency_info method', function() {
-        it('should return a list of top-level plugins based on what is inside a platform.json file', function() {
-            var tlps = {
-                "hello":"",
-                "isitme":"",
-                "yourelookingfor":""
-            };
-            spyOn(xml_helpers, 'parseElementtreeSync').andReturn({findall:function(){}});
-            var spy = spyOn(config, 'get_platform_json').andReturn({
-                installed_plugins:tlps,
-                dependent_plugins:[]
-            });
-            var obj = dependencies.generate_dependency_info('some dir');
-            expect(obj.top_level_plugins).toEqual(Object.keys(tlps));
-        });
-        it('should return a dependency graph for the plugins', function() {
-            var tlps = {
-                "A":"",
-                "B":""
-            };
-            var deps = {
-                "C":"",
-                "D":"",
-                "E":""
-            };
-            var spy = spyOn(config, 'get_platform_json').andReturn({
-                installed_plugins:tlps,
-                dependent_plugins:[]
-            });
-            var obj = dependencies.generate_dependency_info(path.join(__dirname, '..', 'plugins', 'dependencies'), 'android');
-            expect(obj.graph.getChain('A')).toEqual(['C','D']);
-            expect(obj.graph.getChain('B')).toEqual(['D', 'E']);
-        });
-    });
-});


[53/70] Remove all cordova-lib files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp.xcodeproj/project.pbxproj b/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp.xcodeproj/project.pbxproj
deleted file mode 100644
index 60f478f..0000000
--- a/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,496 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A463F14DB0A1B007FEAC7 /* Foundation.framework */; };
-		571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464114DB0A1B007FEAC7 /* UIKit.framework */; };
-		571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */; };
-		571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464514DB0A1B007FEAC7 /* AddressBook.framework */; };
-		571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */; };
-		571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */; };
-		571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */; };
-		571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */; };
-		571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */; };
-		571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465114DB0A1B007FEAC7 /* QuartzCore.framework */; };
-		571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */; };
-		571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */; };
-		571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465714DB0A1B007FEAC7 /* CoreMedia.framework */; };
-		571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */; };
-		571A466014DB0A1B007FEAC7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A465F14DB0A1B007FEAC7 /* main.m */; };
-		571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A466214DB0A1B007FEAC7 /* PhoneGap.framework */; };
-		571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466614DB0A1B007FEAC7 /* Localizable.strings */; };
-		571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466A14DB0A1B007FEAC7 /* Localizable.strings */; };
-		571A466F14DB0A1B007FEAC7 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A466E14DB0A1B007FEAC7 /* icon.png */; };
-		571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467014DB0A1B007FEAC7 /* icon@2x.png */; };
-		571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467214DB0A1B007FEAC7 /* icon-72.png */; };
-		571A467614DB0A1B007FEAC7 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467514DB0A1B007FEAC7 /* Default.png */; };
-		571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467714DB0A1B007FEAC7 /* Default@2x.png */; };
-		571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 571A467914DB0A1B007FEAC7 /* Capture.bundle */; };
-		571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */ = {isa = PBXBuildFile; fileRef = 571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */; };
-		571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A467F14DB0A1B007FEAC7 /* AppDelegate.m */; };
-		571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A468214DB0A1B007FEAC7 /* MainViewController.m */; };
-		571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 571A468414DB0A1B007FEAC7 /* MainViewController.xib */; };
-		577FC36614DB0B620082BA7B /* www in Resources */ = {isa = PBXBuildFile; fileRef = 577FC36514DB0B620082BA7B /* www */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
-		571A463B14DB0A1B007FEAC7 /* ChildApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChildApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		571A463F14DB0A1B007FEAC7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-		571A464114DB0A1B007FEAC7 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
-		571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
-		571A464514DB0A1B007FEAC7 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
-		571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
-		571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
-		571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
-		571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
-		571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
-		571A465114DB0A1B007FEAC7 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
-		571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
-		571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
-		571A465714DB0A1B007FEAC7 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
-		571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ChildApp-Info.plist"; sourceTree = "<group>"; };
-		571A465D14DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		571A465F14DB0A1B007FEAC7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
-		571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ChildApp-Prefix.pch"; sourceTree = "<group>"; };
-		571A466214DB0A1B007FEAC7 /* PhoneGap.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PhoneGap.framework; path = /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework; sourceTree = "<absolute>"; };
-		571A466714DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/Localizable.strings; sourceTree = "<group>"; };
-		571A466B14DB0A1B007FEAC7 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Resources/es.lproj/Localizable.strings; sourceTree = "<group>"; };
-		571A466E14DB0A1B007FEAC7 /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon.png; path = Resources/icons/icon.png; sourceTree = "<group>"; };
-		571A467014DB0A1B007FEAC7 /* icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon@2x.png"; path = "Resources/icons/icon@2x.png"; sourceTree = "<group>"; };
-		571A467214DB0A1B007FEAC7 /* icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon-72.png"; path = "Resources/icons/icon-72.png"; sourceTree = "<group>"; };
-		571A467514DB0A1B007FEAC7 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/splash/Default.png; sourceTree = "<group>"; };
-		571A467714DB0A1B007FEAC7 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "Resources/splash/Default@2x.png"; sourceTree = "<group>"; };
-		571A467914DB0A1B007FEAC7 /* Capture.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Capture.bundle; path = Resources/Capture.bundle; sourceTree = "<group>"; };
-		571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = PhoneGap.plist; sourceTree = "<group>"; };
-		571A467E14DB0A1B007FEAC7 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Classes/AppDelegate.h; sourceTree = "<group>"; };
-		571A467F14DB0A1B007FEAC7 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Classes/AppDelegate.m; sourceTree = "<group>"; };
-		571A468114DB0A1B007FEAC7 /* MainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainViewController.h; path = Classes/MainViewController.h; sourceTree = "<group>"; };
-		571A468214DB0A1B007FEAC7 /* MainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = Classes/MainViewController.m; sourceTree = "<group>"; };
-		571A468414DB0A1B007FEAC7 /* MainViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainViewController.xib; path = Classes/MainViewController.xib; sourceTree = "<group>"; };
-		571A468714DB0A1B007FEAC7 /* README */ = {isa = PBXFileReference; lastKnownFileType = text; name = README; path = Plugins/README; sourceTree = "<group>"; };
-		577FC36514DB0B620082BA7B /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		571A463514DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */,
-				571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */,
-				571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */,
-				571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */,
-				571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */,
-				571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */,
-				571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */,
-				571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */,
-				571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */,
-				571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */,
-				571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */,
-				571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */,
-				571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */,
-				571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		571A463814DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		571A462D14DB0A1A007FEAC7 = {
-			isa = PBXGroup;
-			children = (
-				577FC36514DB0B620082BA7B /* www */,
-				571A465914DB0A1B007FEAC7 /* ChildApp */,
-				571A463E14DB0A1B007FEAC7 /* Frameworks */,
-				571A463C14DB0A1B007FEAC7 /* Products */,
-			);
-			sourceTree = "<group>";
-		};
-		571A463C14DB0A1B007FEAC7 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				571A463B14DB0A1B007FEAC7 /* ChildApp.app */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		571A463E14DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				571A463F14DB0A1B007FEAC7 /* Foundation.framework */,
-				571A464114DB0A1B007FEAC7 /* UIKit.framework */,
-				571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */,
-				571A464514DB0A1B007FEAC7 /* AddressBook.framework */,
-				571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */,
-				571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */,
-				571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */,
-				571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */,
-				571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */,
-				571A465114DB0A1B007FEAC7 /* QuartzCore.framework */,
-				571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */,
-				571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */,
-				571A465714DB0A1B007FEAC7 /* CoreMedia.framework */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
-		571A465914DB0A1B007FEAC7 /* ChildApp */ = {
-			isa = PBXGroup;
-			children = (
-				571A466214DB0A1B007FEAC7 /* PhoneGap.framework */,
-				571A466414DB0A1B007FEAC7 /* Resources */,
-				571A467D14DB0A1B007FEAC7 /* Classes */,
-				571A468614DB0A1B007FEAC7 /* Plugins */,
-				571A465A14DB0A1B007FEAC7 /* Supporting Files */,
-			);
-			path = ChildApp;
-			sourceTree = "<group>";
-		};
-		571A465A14DB0A1B007FEAC7 /* Supporting Files */ = {
-			isa = PBXGroup;
-			children = (
-				571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */,
-				571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */,
-				571A465F14DB0A1B007FEAC7 /* main.m */,
-				571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */,
-				571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */,
-				571A468414DB0A1B007FEAC7 /* MainViewController.xib */,
-			);
-			name = "Supporting Files";
-			sourceTree = "<group>";
-		};
-		571A466414DB0A1B007FEAC7 /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				571A467914DB0A1B007FEAC7 /* Capture.bundle */,
-				571A466514DB0A1B007FEAC7 /* en.lproj */,
-				571A466914DB0A1B007FEAC7 /* es.lproj */,
-				571A466D14DB0A1B007FEAC7 /* icons */,
-				571A467414DB0A1B007FEAC7 /* splash */,
-			);
-			name = Resources;
-			sourceTree = "<group>";
-		};
-		571A466514DB0A1B007FEAC7 /* en.lproj */ = {
-			isa = PBXGroup;
-			children = (
-				571A466614DB0A1B007FEAC7 /* Localizable.strings */,
-			);
-			name = en.lproj;
-			sourceTree = "<group>";
-		};
-		571A466914DB0A1B007FEAC7 /* es.lproj */ = {
-			isa = PBXGroup;
-			children = (
-				571A466A14DB0A1B007FEAC7 /* Localizable.strings */,
-			);
-			name = es.lproj;
-			sourceTree = "<group>";
-		};
-		571A466D14DB0A1B007FEAC7 /* icons */ = {
-			isa = PBXGroup;
-			children = (
-				571A466E14DB0A1B007FEAC7 /* icon.png */,
-				571A467014DB0A1B007FEAC7 /* icon@2x.png */,
-				571A467214DB0A1B007FEAC7 /* icon-72.png */,
-			);
-			name = icons;
-			sourceTree = "<group>";
-		};
-		571A467414DB0A1B007FEAC7 /* splash */ = {
-			isa = PBXGroup;
-			children = (
-				571A467514DB0A1B007FEAC7 /* Default.png */,
-				571A467714DB0A1B007FEAC7 /* Default@2x.png */,
-			);
-			name = splash;
-			sourceTree = "<group>";
-		};
-		571A467D14DB0A1B007FEAC7 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-				571A467E14DB0A1B007FEAC7 /* AppDelegate.h */,
-				571A467F14DB0A1B007FEAC7 /* AppDelegate.m */,
-				571A468114DB0A1B007FEAC7 /* MainViewController.h */,
-				571A468214DB0A1B007FEAC7 /* MainViewController.m */,
-			);
-			name = Classes;
-			sourceTree = "<group>";
-		};
-		571A468614DB0A1B007FEAC7 /* Plugins */ = {
-			isa = PBXGroup;
-			children = (
-				571A468714DB0A1B007FEAC7 /* README */,
-			);
-			name = Plugins;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		571A463A14DB0A1B007FEAC7 /* ChildApp */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */;
-			buildPhases = (
-				571A463414DB0A1B007FEAC7 /* Sources */,
-				571A463514DB0A1B007FEAC7 /* Frameworks */,
-				571A463614DB0A1B007FEAC7 /* Resources */,
-				571A463714DB0A1B007FEAC7 /* Sources */,
-				571A463814DB0A1B007FEAC7 /* Frameworks */,
-				571A463914DB0A1B007FEAC7 /* ShellScript */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = ChildApp;
-			productName = ChildApp;
-			productReference = 571A463B14DB0A1B007FEAC7 /* ChildApp.app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		571A462F14DB0A1A007FEAC7 /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastUpgradeCheck = 0420;
-			};
-			buildConfigurationList = 571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 0;
-			knownRegions = (
-				en,
-				es,
-			);
-			mainGroup = 571A462D14DB0A1A007FEAC7;
-			productRefGroup = 571A463C14DB0A1B007FEAC7 /* Products */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				571A463A14DB0A1B007FEAC7 /* ChildApp */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		571A463614DB0A1B007FEAC7 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */,
-				571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */,
-				571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */,
-				571A466F14DB0A1B007FEAC7 /* icon.png in Resources */,
-				571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */,
-				571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */,
-				571A467614DB0A1B007FEAC7 /* Default.png in Resources */,
-				571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */,
-				571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */,
-				571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */,
-				571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */,
-				577FC36614DB0B620082BA7B /* www in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
-		571A463914DB0A1B007FEAC7 /* ShellScript */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/bash;
-			shellScript = "\n\t\t\t\t\t\t\t\tif [ ! -d \"$PROJECT_DIR/www\" ] ; then\n\t\t\t\t\t\t\t\t\tcp -R /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework/www \"$PROJECT_DIR\"\n\t\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\t\t# detect www folder reference in project, if missing, print warning\n\t\t\t\t\t\t\t\tgrep \"{isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = \\\"<group>\\\"; };\" \"$PROJECT_DIR/$PROJECT_NAME.xcodeproj/project.pbxproj\"\n\t\t\t\t\t\t\t\trc=$? \n\t\t\t\t\t\t\t\tif [ $rc != 0 ] ; then\n\t\t\t\t\t\t\t\techo -e \"warning: Missing - Add $PROJECT_DIR/www as a folder reference in your project. Just drag and drop the folder into your project, into the Project Navigator of Xcode 4. Make sure you select the second radio-button: 'Create folder references for any added folders' (which will create a blue folder)\" 1>&2\n\t\t\t\t\t\t\t\tfi\t\t\t\t\t\t\t";
-		};
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		571A463414DB0A1B007FEAC7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A466014DB0A1B007FEAC7 /* main.m in Sources */,
-				571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */,
-				571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		571A463714DB0A1B007FEAC7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A465D14DB0A1B007FEAC7 /* en */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "<group>";
-		};
-		571A466614DB0A1B007FEAC7 /* Localizable.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A466714DB0A1B007FEAC7 /* en */,
-			);
-			name = Localizable.strings;
-			sourceTree = "<group>";
-		};
-		571A466A14DB0A1B007FEAC7 /* Localizable.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A466B14DB0A1B007FEAC7 /* es */,
-			);
-			name = Localizable.strings;
-			sourceTree = "<group>";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		571A468814DB0A1B007FEAC7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
-				CLANG_ENABLE_OBJC_ARC = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = NO;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				GCC_VERSION = com.apple.compilers.llvmgcc42;
-				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
-				SDKROOT = iphoneos;
-			};
-			name = Debug;
-		};
-		571A468914DB0A1B007FEAC7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
-				CLANG_ENABLE_OBJC_ARC = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_VERSION = com.apple.compilers.llvmgcc42;
-				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
-				SDKROOT = iphoneos;
-				VALIDATE_PRODUCT = YES;
-			};
-			name = Release;
-		};
-		571A468B14DB0A1B007FEAC7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = YES;
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
-				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
-				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak_library",
-					/usr/lib/libSystem.B.dylib,
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				TARGETED_DEVICE_FAMILY = "1,2";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Debug;
-		};
-		571A468C14DB0A1B007FEAC7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = YES;
-				COPY_PHASE_STRIP = YES;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
-				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
-				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak_library",
-					/usr/lib/libSystem.B.dylib,
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				TARGETED_DEVICE_FAMILY = "1,2";
-				VALIDATE_PRODUCT = YES;
-				WRAPPER_EXTENSION = app;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				571A468814DB0A1B007FEAC7 /* Debug */,
-				571A468914DB0A1B007FEAC7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				571A468B14DB0A1B007FEAC7 /* Debug */,
-				571A468C14DB0A1B007FEAC7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 571A462F14DB0A1A007FEAC7 /* Project object */;
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp/SampleApp-Info.plist
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp/SampleApp-Info.plist b/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp/SampleApp-Info.plist
deleted file mode 100644
index 6010b61..0000000
--- a/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp/SampleApp-Info.plist
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<!--
-#
-# 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.
-#
--->
-<plist version="1.0">
-<dict>
-	<key>CFBundleIcons</key>
-	<dict>
-		<key>CFBundlePrimaryIcon</key>
-		<dict>
-			<key>CFBundleIconFiles</key>
-			<array>
-                <string>icon.png</string>
-                <string>icon@2x.png</string>
-                <string>icon-72.png</string>
-                <string>icon-72@2x.png</string>
-			</array>
-			<key>UIPrerenderedIcon</key>
-			<false/>
-		</dict>
-	</dict>
-	<key>UISupportedInterfaceOrientations~ipad</key>
-	<array>
-		<string>UIInterfaceOrientationPortrait</string>
-		<string>UIInterfaceOrientationLandscapeLeft</string>
-		<string>UIInterfaceOrientationPortraitUpsideDown</string>
-		<string>UIInterfaceOrientationLandscapeRight</string>
-	</array>
-	<key>UISupportedInterfaceOrientations</key>
-	<array>
-		<string>UIInterfaceOrientationPortrait</string>
-	</array>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleDisplayName</key>
-	<string>${PRODUCT_NAME}</string>
-	<key>CFBundleExecutable</key>
-	<string>${EXECUTABLE_NAME}</string>
-	<key>CFBundleIconFile</key>
-	<string>icon.png</string>
-	<key>CFBundleIdentifier</key>
-	<string>com.example.friendstring</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>${PRODUCT_NAME}</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1.0</string>
-	<key>LSRequiresIPhoneOS</key>
-	<true/>
-	<key>NSMainNibFile</key>
-	<string></string>
-	<key>NSMainNibFile~ipad</key>
-	<string></string>
-</dict>
-</plist>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp/config.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp/config.xml b/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp/config.xml
deleted file mode 100644
index 2858c28..0000000
--- a/cordova-lib/spec-plugman/projects/ios-config-xml/SampleApp/config.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-#
-# 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.
-#
--->
-<widget>
-    <preference name="KeyboardDisplayRequiresUserAction" value="true" />
-    <preference name="SuppressesIncrementalRendering" value="false" />
-    <preference name="UIWebViewBounce" value="true" />
-    <preference name="TopActivityIndicator" value="gray" />
-    <preference name="EnableLocation" value="false" />
-    <preference name="EnableViewportScale" value="false" />
-    <preference name="AutoHideSplashScreen" value="true" />
-    <preference name="ShowSplashScreenSpinner" value="true" />
-    <preference name="MediaPlaybackRequiresUserAction" value="false" />
-    <preference name="AllowInlineMediaPlayback" value="false" />
-    <preference name="OpenAllWhitelistURLsInWebView" value="false" />
-    <preference name="BackupWebStorage" value="cloud" />
-
-    <plugins>
-        <plugin name="Device" value="CDVDevice" />
-        <plugin name="Logger" value="CDVLogger" />
-        <plugin name="Compass" value="CDVLocation" />
-        <plugin name="Accelerometer" value="CDVAccelerometer" />
-        <plugin name="Camera" value="CDVCamera" />
-        <plugin name="NetworkStatus" value="CDVConnection" />
-        <plugin name="Contacts" value="CDVContacts" />
-        <plugin name="Debug Console" value="CDVDebugConsole" />
-        <plugin name="Echo" value="CDVEcho" />
-        <plugin name="File" value="CDVFile" />
-        <plugin name="FileTransfer" value="CDVFileTransfer" />
-        <plugin name="Geolocation" value="CDVLocation" />
-        <plugin name="Notification" value="CDVNotification" />
-        <plugin name="Media" value="CDVSound" />
-        <plugin name="Capture" value="CDVCapture" />
-        <plugin name="SplashScreen" value="CDVSplashScreen" />
-        <plugin name="Battery" value="CDVBattery" />
-        <plugin name="Globalization" value="CDVGlobalization" />
-        <plugin name="InAppBrowser" value="CDVInAppBrowser" />
-    </plugins>
-
-    <access origin="*" />
-</widget>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/ios-config-xml/www/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/ios-config-xml/www/.gitkeep b/cordova-lib/spec-plugman/projects/ios-config-xml/www/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/ios-plist/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/ios-plist/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/cordova-lib/spec-plugman/projects/ios-plist/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
deleted file mode 100644
index 5d0d461..0000000
--- a/cordova-lib/spec-plugman/projects/ios-plist/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,636 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		1F2BECC013F9785B00A93BF6 /* CDVBattery.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F2BECBE13F9785B00A93BF6 /* CDVBattery.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		1F2BECC113F9785B00A93BF6 /* CDVBattery.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F2BECBF13F9785B00A93BF6 /* CDVBattery.m */; };
-		1F3C04CE12BC247D004F9E10 /* CDVContact.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F3C04CC12BC247D004F9E10 /* CDVContact.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		1F3C04CF12BC247D004F9E10 /* CDVContact.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F3C04CD12BC247D004F9E10 /* CDVContact.m */; };
-		1F584B9B1385A28A00ED25E8 /* CDVCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F584B991385A28900ED25E8 /* CDVCapture.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		1F584B9C1385A28A00ED25E8 /* CDVCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F584B9A1385A28900ED25E8 /* CDVCapture.m */; };
-		1F92F4A01314023E0046367C /* CDVPluginResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F92F49E1314023E0046367C /* CDVPluginResult.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		1F92F4A11314023E0046367C /* CDVPluginResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F92F49F1314023E0046367C /* CDVPluginResult.m */; };
-		301F2F2A14F3C9CA003FE9FC /* CDV.h in Headers */ = {isa = PBXBuildFile; fileRef = 301F2F2914F3C9CA003FE9FC /* CDV.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		302965BC13A94E9D007046C5 /* CDVDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 302965BB13A94E9D007046C5 /* CDVDebug.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3034979C1513D56A0090E688 /* CDVLocalStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 3034979A1513D56A0090E688 /* CDVLocalStorage.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3034979E1513D56A0090E688 /* CDVLocalStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 3034979B1513D56A0090E688 /* CDVLocalStorage.m */; };
-		30392E4E14F4FCAB00B9E0B8 /* CDVAvailability.h in Headers */ = {isa = PBXBuildFile; fileRef = 30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3062D120151D0EDB000D9128 /* UIDevice+Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3062D122151D0EDB000D9128 /* UIDevice+Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */; };
-		307A8F9E1385A2EC00E43782 /* CDVConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 307A8F9C1385A2EC00E43782 /* CDVConnection.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		307A8F9F1385A2EC00E43782 /* CDVConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 307A8F9D1385A2EC00E43782 /* CDVConnection.m */; };
-		30A90B9114588697006178D3 /* JSONKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 30A90B8F14588697006178D3 /* JSONKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30A90B9314588697006178D3 /* JSONKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 30A90B9014588697006178D3 /* JSONKit.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
-		30B39EBE13D0268B0009682A /* CDVSplashScreen.h in Headers */ = {isa = PBXBuildFile; fileRef = 30B39EBC13D0268B0009682A /* CDVSplashScreen.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30B39EBF13D0268B0009682A /* CDVSplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 30B39EBD13D0268B0009682A /* CDVSplashScreen.m */; };
-		30C5F1DF15AF9E950052A00D /* CDVDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C5F1DD15AF9E950052A00D /* CDVDevice.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30C5F1E015AF9E950052A00D /* CDVDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C5F1DE15AF9E950052A00D /* CDVDevice.m */; };
-		30C684801406CB38004C1A8E /* CDVWhitelist.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C6847E1406CB38004C1A8E /* CDVWhitelist.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30C684821406CB38004C1A8E /* CDVWhitelist.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C6847F1406CB38004C1A8E /* CDVWhitelist.m */; };
-		30C684941407044B004C1A8E /* CDVURLProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C684921407044A004C1A8E /* CDVURLProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30C684961407044B004C1A8E /* CDVURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C684931407044A004C1A8E /* CDVURLProtocol.m */; };
-		30E33AF213A7E24B00594D64 /* CDVPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E33AF013A7E24B00594D64 /* CDVPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30E33AF313A7E24B00594D64 /* CDVPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 30E33AF113A7E24B00594D64 /* CDVPlugin.m */; };
-		30E563CF13E217EC00C949AA /* NSMutableArray+QueueAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30E563D013E217EC00C949AA /* NSMutableArray+QueueAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */; };
-		30F5EBAB14CA26E700987760 /* CDVCommandDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3E76876D156A90EE00EB6FA3 /* CDVLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E76876B156A90EE00EB6FA3 /* CDVLogger.m */; };
-		3E76876F156A90EE00EB6FA3 /* CDVLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E76876C156A90EE00EB6FA3 /* CDVLogger.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8852C43A14B65FD800F0E735 /* CDVViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 8852C43614B65FD800F0E735 /* CDVViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8852C43C14B65FD800F0E735 /* CDVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8852C43714B65FD800F0E735 /* CDVViewController.m */; };
-		8852C43F14B65FD800F0E735 /* CDVCordovaView.h in Headers */ = {isa = PBXBuildFile; fileRef = 8852C43814B65FD800F0E735 /* CDVCordovaView.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8852C44114B65FD800F0E735 /* CDVCordovaView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8852C43914B65FD800F0E735 /* CDVCordovaView.m */; };
-		8887FD661090FBE7009987E8 /* CDVCamera.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD261090FBE7009987E8 /* CDVCamera.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD671090FBE7009987E8 /* CDVCamera.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD271090FBE7009987E8 /* CDVCamera.m */; };
-		8887FD681090FBE7009987E8 /* NSDictionary+Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD691090FBE7009987E8 /* NSDictionary+Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD291090FBE7009987E8 /* NSDictionary+Extensions.m */; };
-		8887FD6A1090FBE7009987E8 /* CDVContacts.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD2A1090FBE7009987E8 /* CDVContacts.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD6B1090FBE7009987E8 /* CDVContacts.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD2B1090FBE7009987E8 /* CDVContacts.m */; };
-		8887FD6C1090FBE7009987E8 /* CDVDebugConsole.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD2C1090FBE7009987E8 /* CDVDebugConsole.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD6D1090FBE7009987E8 /* CDVDebugConsole.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD2D1090FBE7009987E8 /* CDVDebugConsole.m */; };
-		8887FD701090FBE7009987E8 /* CDVFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD301090FBE7009987E8 /* CDVFile.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD711090FBE7009987E8 /* CDVFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD311090FBE7009987E8 /* CDVFile.m */; };
-		8887FD741090FBE7009987E8 /* CDVInvokedUrlCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD751090FBE7009987E8 /* CDVInvokedUrlCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */; };
-		8887FD851090FBE7009987E8 /* CDVLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD461090FBE7009987E8 /* CDVLocation.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD861090FBE7009987E8 /* CDVLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD471090FBE7009987E8 /* CDVLocation.m */; };
-		8887FD8D1090FBE7009987E8 /* CDVNotification.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD4E1090FBE7009987E8 /* CDVNotification.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD8E1090FBE7009987E8 /* CDVNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD4F1090FBE7009987E8 /* CDVNotification.m */; };
-		8887FD8F1090FBE7009987E8 /* NSData+Base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD501090FBE7009987E8 /* NSData+Base64.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD901090FBE7009987E8 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD511090FBE7009987E8 /* NSData+Base64.m */; };
-		8887FD9D1090FBE7009987E8 /* CDVReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD5E1090FBE7009987E8 /* CDVReachability.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD9E1090FBE7009987E8 /* CDVReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD5F1090FBE7009987E8 /* CDVReachability.m */; };
-		8887FD9F1090FBE7009987E8 /* CDVSound.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD601090FBE7009987E8 /* CDVSound.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FDA01090FBE7009987E8 /* CDVSound.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD611090FBE7009987E8 /* CDVSound.m */; };
-		88BA573D109BB46F00FB5E78 /* CDVAccelerometer.h in Headers */ = {isa = PBXBuildFile; fileRef = 88BA573B109BB46F00FB5E78 /* CDVAccelerometer.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		88BA573E109BB46F00FB5E78 /* CDVAccelerometer.m in Sources */ = {isa = PBXBuildFile; fileRef = 88BA573C109BB46F00FB5E78 /* CDVAccelerometer.m */; };
-		9D76CF3C1625A4C50008A0F6 /* CDVGlobalization.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D76CF3A1625A4C50008A0F6 /* CDVGlobalization.h */; };
-		9D76CF3D1625A4C50008A0F6 /* CDVGlobalization.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D76CF3B1625A4C50008A0F6 /* CDVGlobalization.m */; };
-		C937A4561337599E002C4C79 /* CDVFileTransfer.h in Headers */ = {isa = PBXBuildFile; fileRef = C937A4541337599E002C4C79 /* CDVFileTransfer.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		C937A4571337599E002C4C79 /* CDVFileTransfer.m in Sources */ = {isa = PBXBuildFile; fileRef = C937A4551337599E002C4C79 /* CDVFileTransfer.m */; };
-		EB3B3547161CB44D003DBE7D /* CDVCommandQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */; };
-		EB3B3548161CB44D003DBE7D /* CDVCommandQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */; };
-		EB3B357C161F2A45003DBE7D /* CDVCommandDelegateImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */; };
-		EB3B357D161F2A45003DBE7D /* CDVCommandDelegateImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */; };
-		EB80C2AC15DEA63D004D9E7B /* CDVEcho.h in Headers */ = {isa = PBXBuildFile; fileRef = EB80C2AA15DEA63D004D9E7B /* CDVEcho.h */; };
-		EB80C2AD15DEA63D004D9E7B /* CDVEcho.m in Sources */ = {isa = PBXBuildFile; fileRef = EB80C2AB15DEA63D004D9E7B /* CDVEcho.m */; };
-		EBA3557315ABD38C00F4DE24 /* NSArray+Comparisons.h in Headers */ = {isa = PBXBuildFile; fileRef = EBA3557115ABD38C00F4DE24 /* NSArray+Comparisons.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		EBA3557515ABD38C00F4DE24 /* NSArray+Comparisons.m in Sources */ = {isa = PBXBuildFile; fileRef = EBA3557215ABD38C00F4DE24 /* NSArray+Comparisons.m */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
-		1F2BECBE13F9785B00A93BF6 /* CDVBattery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVBattery.h; path = Classes/CDVBattery.h; sourceTree = "<group>"; };
-		1F2BECBF13F9785B00A93BF6 /* CDVBattery.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVBattery.m; path = Classes/CDVBattery.m; sourceTree = "<group>"; };
-		1F3C04CC12BC247D004F9E10 /* CDVContact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVContact.h; path = Classes/CDVContact.h; sourceTree = "<group>"; };
-		1F3C04CD12BC247D004F9E10 /* CDVContact.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVContact.m; path = Classes/CDVContact.m; sourceTree = "<group>"; };
-		1F584B991385A28900ED25E8 /* CDVCapture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCapture.h; path = Classes/CDVCapture.h; sourceTree = "<group>"; };
-		1F584B9A1385A28900ED25E8 /* CDVCapture.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCapture.m; path = Classes/CDVCapture.m; sourceTree = "<group>"; };
-		1F92F49E1314023E0046367C /* CDVPluginResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVPluginResult.h; path = Classes/CDVPluginResult.h; sourceTree = "<group>"; };
-		1F92F49F1314023E0046367C /* CDVPluginResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVPluginResult.m; path = Classes/CDVPluginResult.m; sourceTree = "<group>"; };
-		301F2F2914F3C9CA003FE9FC /* CDV.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDV.h; path = Classes/CDV.h; sourceTree = "<group>"; };
-		302965BB13A94E9D007046C5 /* CDVDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDebug.h; path = Classes/CDVDebug.h; sourceTree = "<group>"; };
-		30325A0B136B343700982B63 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
-		3034979A1513D56A0090E688 /* CDVLocalStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLocalStorage.h; path = Classes/CDVLocalStorage.h; sourceTree = "<group>"; };
-		3034979B1513D56A0090E688 /* CDVLocalStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLocalStorage.m; path = Classes/CDVLocalStorage.m; sourceTree = "<group>"; };
-		30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVAvailability.h; path = Classes/CDVAvailability.h; sourceTree = "<group>"; };
-		3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIDevice+Extensions.h"; path = "Classes/UIDevice+Extensions.h"; sourceTree = "<group>"; };
-		3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIDevice+Extensions.m"; path = "Classes/UIDevice+Extensions.m"; sourceTree = "<group>"; };
-		307A8F9C1385A2EC00E43782 /* CDVConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVConnection.h; path = Classes/CDVConnection.h; sourceTree = "<group>"; };
-		307A8F9D1385A2EC00E43782 /* CDVConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVConnection.m; path = Classes/CDVConnection.m; sourceTree = "<group>"; };
-		30A90B8F14588697006178D3 /* JSONKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONKit.h; sourceTree = "<group>"; };
-		30A90B9014588697006178D3 /* JSONKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONKit.m; sourceTree = "<group>"; };
-		30B39EBC13D0268B0009682A /* CDVSplashScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVSplashScreen.h; path = Classes/CDVSplashScreen.h; sourceTree = "<group>"; };
-		30B39EBD13D0268B0009682A /* CDVSplashScreen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVSplashScreen.m; path = Classes/CDVSplashScreen.m; sourceTree = "<group>"; };
-		30C5F1DD15AF9E950052A00D /* CDVDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDevice.h; path = Classes/CDVDevice.h; sourceTree = "<group>"; };
-		30C5F1DE15AF9E950052A00D /* CDVDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVDevice.m; path = Classes/CDVDevice.m; sourceTree = "<group>"; };
-		30C6847E1406CB38004C1A8E /* CDVWhitelist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVWhitelist.h; path = Classes/CDVWhitelist.h; sourceTree = "<group>"; };
-		30C6847F1406CB38004C1A8E /* CDVWhitelist.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVWhitelist.m; path = Classes/CDVWhitelist.m; sourceTree = "<group>"; };
-		30C684921407044A004C1A8E /* CDVURLProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVURLProtocol.h; path = Classes/CDVURLProtocol.h; sourceTree = "<group>"; };
-		30C684931407044A004C1A8E /* CDVURLProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVURLProtocol.m; path = Classes/CDVURLProtocol.m; sourceTree = "<group>"; };
-		30E33AF013A7E24B00594D64 /* CDVPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVPlugin.h; path = Classes/CDVPlugin.h; sourceTree = "<group>"; };
-		30E33AF113A7E24B00594D64 /* CDVPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVPlugin.m; path = Classes/CDVPlugin.m; sourceTree = "<group>"; };
-		30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSMutableArray+QueueAdditions.h"; path = "Classes/NSMutableArray+QueueAdditions.h"; sourceTree = "<group>"; };
-		30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSMutableArray+QueueAdditions.m"; path = "Classes/NSMutableArray+QueueAdditions.m"; sourceTree = "<group>"; };
-		30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandDelegate.h; path = Classes/CDVCommandDelegate.h; sourceTree = "<group>"; };
-		3E76876B156A90EE00EB6FA3 /* CDVLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLogger.m; path = Classes/CDVLogger.m; sourceTree = "<group>"; };
-		3E76876C156A90EE00EB6FA3 /* CDVLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLogger.h; path = Classes/CDVLogger.h; sourceTree = "<group>"; };
-		686357AA141002F100DF4CF2 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
-		686357AC141002F100DF4CF2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-		686357AE141002F100DF4CF2 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
-		686357CC14100AAD00DF4CF2 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
-		686357CE14100ADA00DF4CF2 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
-		686357CF14100ADB00DF4CF2 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
-		686357D014100ADE00DF4CF2 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
-		686357D214100AE700DF4CF2 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
-		686357D414100AF200DF4CF2 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
-		686357DC14100B1600DF4CF2 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
-		68A32D7114102E1C006B237C /* libCordova.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCordova.a; sourceTree = BUILT_PRODUCTS_DIR; };
-		68A32D7414103017006B237C /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
-		8852C43614B65FD800F0E735 /* CDVViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVViewController.h; path = Classes/CDVViewController.h; sourceTree = "<group>"; };
-		8852C43714B65FD800F0E735 /* CDVViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVViewController.m; path = Classes/CDVViewController.m; sourceTree = "<group>"; };
-		8852C43814B65FD800F0E735 /* CDVCordovaView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCordovaView.h; path = Classes/CDVCordovaView.h; sourceTree = "<group>"; };
-		8852C43914B65FD800F0E735 /* CDVCordovaView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCordovaView.m; path = Classes/CDVCordovaView.m; sourceTree = "<group>"; };
-		8887FD261090FBE7009987E8 /* CDVCamera.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCamera.h; path = Classes/CDVCamera.h; sourceTree = "<group>"; };
-		8887FD271090FBE7009987E8 /* CDVCamera.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCamera.m; path = Classes/CDVCamera.m; sourceTree = "<group>"; };
-		8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+Extensions.h"; path = "Classes/NSDictionary+Extensions.h"; sourceTree = "<group>"; };
-		8887FD291090FBE7009987E8 /* NSDictionary+Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+Extensions.m"; path = "Classes/NSDictionary+Extensions.m"; sourceTree = "<group>"; };
-		8887FD2A1090FBE7009987E8 /* CDVContacts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVContacts.h; path = Classes/CDVContacts.h; sourceTree = "<group>"; };
-		8887FD2B1090FBE7009987E8 /* CDVContacts.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVContacts.m; path = Classes/CDVContacts.m; sourceTree = "<group>"; };
-		8887FD2C1090FBE7009987E8 /* CDVDebugConsole.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDebugConsole.h; path = Classes/CDVDebugConsole.h; sourceTree = "<group>"; };
-		8887FD2D1090FBE7009987E8 /* CDVDebugConsole.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVDebugConsole.m; path = Classes/CDVDebugConsole.m; sourceTree = "<group>"; };
-		8887FD301090FBE7009987E8 /* CDVFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVFile.h; path = Classes/CDVFile.h; sourceTree = "<group>"; };
-		8887FD311090FBE7009987E8 /* CDVFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVFile.m; path = Classes/CDVFile.m; sourceTree = "<group>"; };
-		8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVInvokedUrlCommand.h; path = Classes/CDVInvokedUrlCommand.h; sourceTree = "<group>"; };
-		8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVInvokedUrlCommand.m; path = Classes/CDVInvokedUrlCommand.m; sourceTree = "<group>"; };
-		8887FD461090FBE7009987E8 /* CDVLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLocation.h; path = Classes/CDVLocation.h; sourceTree = "<group>"; };
-		8887FD471090FBE7009987E8 /* CDVLocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLocation.m; path = Classes/CDVLocation.m; sourceTree = "<group>"; };
-		8887FD4E1090FBE7009987E8 /* CDVNotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVNotification.h; path = Classes/CDVNotification.h; sourceTree = "<group>"; };
-		8887FD4F1090FBE7009987E8 /* CDVNotification.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVNotification.m; path = Classes/CDVNotification.m; sourceTree = "<group>"; };
-		8887FD501090FBE7009987E8 /* NSData+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSData+Base64.h"; path = "Classes/NSData+Base64.h"; sourceTree = "<group>"; };
-		8887FD511090FBE7009987E8 /* NSData+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSData+Base64.m"; path = "Classes/NSData+Base64.m"; sourceTree = "<group>"; };
-		8887FD5E1090FBE7009987E8 /* CDVReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVReachability.h; path = Classes/CDVReachability.h; sourceTree = "<group>"; };
-		8887FD5F1090FBE7009987E8 /* CDVReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVReachability.m; path = Classes/CDVReachability.m; sourceTree = "<group>"; };
-		8887FD601090FBE7009987E8 /* CDVSound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVSound.h; path = Classes/CDVSound.h; sourceTree = "<group>"; };
-		8887FD611090FBE7009987E8 /* CDVSound.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVSound.m; path = Classes/CDVSound.m; sourceTree = "<group>"; };
-		88BA573B109BB46F00FB5E78 /* CDVAccelerometer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVAccelerometer.h; path = Classes/CDVAccelerometer.h; sourceTree = "<group>"; };
-		88BA573C109BB46F00FB5E78 /* CDVAccelerometer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVAccelerometer.m; path = Classes/CDVAccelerometer.m; sourceTree = "<group>"; };
-		9D76CF3A1625A4C50008A0F6 /* CDVGlobalization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVGlobalization.h; path = Classes/CDVGlobalization.h; sourceTree = "<group>"; };
-		9D76CF3B1625A4C50008A0F6 /* CDVGlobalization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVGlobalization.m; path = Classes/CDVGlobalization.m; sourceTree = "<group>"; };
-		AA747D9E0F9514B9006C5449 /* CordovaLib_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CordovaLib_Prefix.pch; sourceTree = SOURCE_ROOT; };
-		C937A4541337599E002C4C79 /* CDVFileTransfer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVFileTransfer.h; path = Classes/CDVFileTransfer.h; sourceTree = "<group>"; };
-		C937A4551337599E002C4C79 /* CDVFileTransfer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVFileTransfer.m; path = Classes/CDVFileTransfer.m; sourceTree = "<group>"; };
-		EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandQueue.h; path = Classes/CDVCommandQueue.h; sourceTree = "<group>"; };
-		EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCommandQueue.m; path = Classes/CDVCommandQueue.m; sourceTree = "<group>"; };
-		EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandDelegateImpl.h; path = Classes/CDVCommandDelegateImpl.h; sourceTree = "<group>"; };
-		EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCommandDelegateImpl.m; path = Classes/CDVCommandDelegateImpl.m; sourceTree = "<group>"; };
-		EB80C2AA15DEA63D004D9E7B /* CDVEcho.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVEcho.h; path = Classes/CDVEcho.h; sourceTree = "<group>"; };
-		EB80C2AB15DEA63D004D9E7B /* CDVEcho.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVEcho.m; path = Classes/CDVEcho.m; sourceTree = "<group>"; };
-		EBA3557115ABD38C00F4DE24 /* NSArray+Comparisons.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSArray+Comparisons.h"; path = "Classes/NSArray+Comparisons.h"; sourceTree = "<group>"; };
-		EBA3557215ABD38C00F4DE24 /* NSArray+Comparisons.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSArray+Comparisons.m"; path = "Classes/NSArray+Comparisons.m"; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		D2AAC07C0554694100DB518D /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		034768DFFF38A50411DB9C8B /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				68A32D7114102E1C006B237C /* libCordova.a */,
-			);
-			name = Products;
-			sourceTree = CORDOVALIB;
-		};
-		0867D691FE84028FC02AAC07 /* CordovaLib */ = {
-			isa = PBXGroup;
-			children = (
-				8887FD101090FB43009987E8 /* Classes */,
-				32C88DFF0371C24200C91783 /* Other Sources */,
-				0867D69AFE84028FC02AAC07 /* Frameworks */,
-				034768DFFF38A50411DB9C8B /* Products */,
-				30325A0B136B343700982B63 /* VERSION */,
-			);
-			name = CordovaLib;
-			sourceTree = "<group>";
-		};
-		0867D69AFE84028FC02AAC07 /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				68A32D7414103017006B237C /* AddressBook.framework */,
-				686357DC14100B1600DF4CF2 /* CoreMedia.framework */,
-				686357CE14100ADA00DF4CF2 /* AudioToolbox.framework */,
-				686357CF14100ADB00DF4CF2 /* AVFoundation.framework */,
-				686357D014100ADE00DF4CF2 /* CoreLocation.framework */,
-				686357D214100AE700DF4CF2 /* MobileCoreServices.framework */,
-				686357D414100AF200DF4CF2 /* SystemConfiguration.framework */,
-				686357CC14100AAD00DF4CF2 /* AddressBookUI.framework */,
-				686357AA141002F100DF4CF2 /* UIKit.framework */,
-				686357AC141002F100DF4CF2 /* Foundation.framework */,
-				686357AE141002F100DF4CF2 /* CoreGraphics.framework */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
-		3054098714B77FF3009841CA /* Cleaver */ = {
-			isa = PBXGroup;
-			children = (
-				8852C43614B65FD800F0E735 /* CDVViewController.h */,
-				8852C43714B65FD800F0E735 /* CDVViewController.m */,
-				8852C43814B65FD800F0E735 /* CDVCordovaView.h */,
-				8852C43914B65FD800F0E735 /* CDVCordovaView.m */,
-				EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */,
-				EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */,
-			);
-			name = Cleaver;
-			sourceTree = "<group>";
-		};
-		32C88DFF0371C24200C91783 /* Other Sources */ = {
-			isa = PBXGroup;
-			children = (
-				AA747D9E0F9514B9006C5449 /* CordovaLib_Prefix.pch */,
-			);
-			name = "Other Sources";
-			sourceTree = "<group>";
-		};
-		888700D710922F56009987E8 /* Commands */ = {
-			isa = PBXGroup;
-			children = (
-				30C5F1DD15AF9E950052A00D /* CDVDevice.h */,
-				30C5F1DE15AF9E950052A00D /* CDVDevice.m */,
-				301F2F2914F3C9CA003FE9FC /* CDV.h */,
-				3034979A1513D56A0090E688 /* CDVLocalStorage.h */,
-				3034979B1513D56A0090E688 /* CDVLocalStorage.m */,
-				30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */,
-				30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */,
-				EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */,
-				EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */,
-				30C684921407044A004C1A8E /* CDVURLProtocol.h */,
-				30C684931407044A004C1A8E /* CDVURLProtocol.m */,
-				30C6847E1406CB38004C1A8E /* CDVWhitelist.h */,
-				30C6847F1406CB38004C1A8E /* CDVWhitelist.m */,
-				1F2BECBE13F9785B00A93BF6 /* CDVBattery.h */,
-				1F2BECBF13F9785B00A93BF6 /* CDVBattery.m */,
-				30B39EBC13D0268B0009682A /* CDVSplashScreen.h */,
-				30B39EBD13D0268B0009682A /* CDVSplashScreen.m */,
-				30E33AF013A7E24B00594D64 /* CDVPlugin.h */,
-				30E33AF113A7E24B00594D64 /* CDVPlugin.m */,
-				307A8F9C1385A2EC00E43782 /* CDVConnection.h */,
-				307A8F9D1385A2EC00E43782 /* CDVConnection.m */,
-				1F92F49E1314023E0046367C /* CDVPluginResult.h */,
-				1F92F49F1314023E0046367C /* CDVPluginResult.m */,
-				88BA573B109BB46F00FB5E78 /* CDVAccelerometer.h */,
-				88BA573C109BB46F00FB5E78 /* CDVAccelerometer.m */,
-				8887FD261090FBE7009987E8 /* CDVCamera.h */,
-				8887FD271090FBE7009987E8 /* CDVCamera.m */,
-				1F584B991385A28900ED25E8 /* CDVCapture.h */,
-				1F584B9A1385A28900ED25E8 /* CDVCapture.m */,
-				1F3C04CC12BC247D004F9E10 /* CDVContact.h */,
-				1F3C04CD12BC247D004F9E10 /* CDVContact.m */,
-				8887FD2A1090FBE7009987E8 /* CDVContacts.h */,
-				8887FD2B1090FBE7009987E8 /* CDVContacts.m */,
-				8887FD2C1090FBE7009987E8 /* CDVDebugConsole.h */,
-				8887FD2D1090FBE7009987E8 /* CDVDebugConsole.m */,
-				EB80C2AA15DEA63D004D9E7B /* CDVEcho.h */,
-				EB80C2AB15DEA63D004D9E7B /* CDVEcho.m */,
-				8887FD301090FBE7009987E8 /* CDVFile.h */,
-				8887FD311090FBE7009987E8 /* CDVFile.m */,
-				8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */,
-				8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */,
-				C937A4541337599E002C4C79 /* CDVFileTransfer.h */,
-				C937A4551337599E002C4C79 /* CDVFileTransfer.m */,
-				8887FD461090FBE7009987E8 /* CDVLocation.h */,
-				8887FD471090FBE7009987E8 /* CDVLocation.m */,
-				8887FD4E1090FBE7009987E8 /* CDVNotification.h */,
-				8887FD4F1090FBE7009987E8 /* CDVNotification.m */,
-				8887FD5E1090FBE7009987E8 /* CDVReachability.h */,
-				8887FD5F1090FBE7009987E8 /* CDVReachability.m */,
-				8887FD601090FBE7009987E8 /* CDVSound.h */,
-				8887FD611090FBE7009987E8 /* CDVSound.m */,
-				3E76876B156A90EE00EB6FA3 /* CDVLogger.m */,
-				3E76876C156A90EE00EB6FA3 /* CDVLogger.h */,
-				9D76CF3A1625A4C50008A0F6 /* CDVGlobalization.h */,
-				9D76CF3B1625A4C50008A0F6 /* CDVGlobalization.m */,
-			);
-			name = Commands;
-			sourceTree = "<group>";
-		};
-		888700D910923009009987E8 /* Util */ = {
-			isa = PBXGroup;
-			children = (
-				3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */,
-				3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */,
-				EBA3557115ABD38C00F4DE24 /* NSArray+Comparisons.h */,
-				EBA3557215ABD38C00F4DE24 /* NSArray+Comparisons.m */,
-				8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */,
-				8887FD291090FBE7009987E8 /* NSDictionary+Extensions.m */,
-				302965BB13A94E9D007046C5 /* CDVDebug.h */,
-				30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */,
-				30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */,
-				8887FD501090FBE7009987E8 /* NSData+Base64.h */,
-				8887FD511090FBE7009987E8 /* NSData+Base64.m */,
-			);
-			name = Util;
-			sourceTree = "<group>";
-		};
-		8887FD101090FB43009987E8 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-				3054098714B77FF3009841CA /* Cleaver */,
-				888700D710922F56009987E8 /* Commands */,
-				8887FD361090FBE7009987E8 /* JSON */,
-				888700D910923009009987E8 /* Util */,
-			);
-			name = Classes;
-			sourceTree = "<group>";
-		};
-		8887FD361090FBE7009987E8 /* JSON */ = {
-			isa = PBXGroup;
-			children = (
-				30A90B8F14588697006178D3 /* JSONKit.h */,
-				30A90B9014588697006178D3 /* JSONKit.m */,
-			);
-			name = JSON;
-			path = Classes/JSON;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXHeadersBuildPhase section */
-		D2AAC07A0554694100DB518D /* Headers */ = {
-			isa = PBXHeadersBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				8887FD661090FBE7009987E8 /* CDVCamera.h in Headers */,
-				8887FD681090FBE7009987E8 /* NSDictionary+Extensions.h in Headers */,
-				8887FD6A1090FBE7009987E8 /* CDVContacts.h in Headers */,
-				8887FD6C1090FBE7009987E8 /* CDVDebugConsole.h in Headers */,
-				8887FD701090FBE7009987E8 /* CDVFile.h in Headers */,
-				8887FD741090FBE7009987E8 /* CDVInvokedUrlCommand.h in Headers */,
-				8887FD851090FBE7009987E8 /* CDVLocation.h in Headers */,
-				8887FD8D1090FBE7009987E8 /* CDVNotification.h in Headers */,
-				8887FD8F1090FBE7009987E8 /* NSData+Base64.h in Headers */,
-				8887FD9D1090FBE7009987E8 /* CDVReachability.h in Headers */,
-				8887FD9F1090FBE7009987E8 /* CDVSound.h in Headers */,
-				88BA573D109BB46F00FB5E78 /* CDVAccelerometer.h in Headers */,
-				1F3C04CE12BC247D004F9E10 /* CDVContact.h in Headers */,
-				1F92F4A01314023E0046367C /* CDVPluginResult.h in Headers */,
-				C937A4561337599E002C4C79 /* CDVFileTransfer.h in Headers */,
-				307A8F9E1385A2EC00E43782 /* CDVConnection.h in Headers */,
-				1F584B9B1385A28A00ED25E8 /* CDVCapture.h in Headers */,
-				30E33AF213A7E24B00594D64 /* CDVPlugin.h in Headers */,
-				302965BC13A94E9D007046C5 /* CDVDebug.h in Headers */,
-				30B39EBE13D0268B0009682A /* CDVSplashScreen.h in Headers */,
-				30E563CF13E217EC00C949AA /* NSMutableArray+QueueAdditions.h in Headers */,
-				1F2BECC013F9785B00A93BF6 /* CDVBattery.h in Headers */,
-				30C684801406CB38004C1A8E /* CDVWhitelist.h in Headers */,
-				30C684941407044B004C1A8E /* CDVURLProtocol.h in Headers */,
-				30A90B9114588697006178D3 /* JSONKit.h in Headers */,
-				8852C43A14B65FD800F0E735 /* CDVViewController.h in Headers */,
-				8852C43F14B65FD800F0E735 /* CDVCordovaView.h in Headers */,
-				30F5EBAB14CA26E700987760 /* CDVCommandDelegate.h in Headers */,
-				301F2F2A14F3C9CA003FE9FC /* CDV.h in Headers */,
-				30392E4E14F4FCAB00B9E0B8 /* CDVAvailability.h in Headers */,
-				3034979C1513D56A0090E688 /* CDVLocalStorage.h in Headers */,
-				3062D120151D0EDB000D9128 /* UIDevice+Extensions.h in Headers */,
-				3E76876F156A90EE00EB6FA3 /* CDVLogger.h in Headers */,
-				EBA3557315ABD38C00F4DE24 /* NSArray+Comparisons.h in Headers */,
-				30C5F1DF15AF9E950052A00D /* CDVDevice.h in Headers */,
-				EB80C2AC15DEA63D004D9E7B /* CDVEcho.h in Headers */,
-				EB3B3547161CB44D003DBE7D /* CDVCommandQueue.h in Headers */,
-				EB3B357C161F2A45003DBE7D /* CDVCommandDelegateImpl.h in Headers */,
-				9D76CF3C1625A4C50008A0F6 /* CDVGlobalization.h in Headers */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXHeadersBuildPhase section */
-
-/* Begin PBXNativeTarget section */
-		D2AAC07D0554694100DB518D /* CordovaLib */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CordovaLib" */;
-			buildPhases = (
-				D2AAC07A0554694100DB518D /* Headers */,
-				D2AAC07B0554694100DB518D /* Sources */,
-				D2AAC07C0554694100DB518D /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = CordovaLib;
-			productName = CordovaLib;
-			productReference = 68A32D7114102E1C006B237C /* libCordova.a */;
-			productType = "com.apple.product-type.library.static";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		0867D690FE84028FC02AAC07 /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastUpgradeCheck = 0430;
-			};
-			buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CordovaLib" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 1;
-			knownRegions = (
-				English,
-				Japanese,
-				French,
-				German,
-				en,
-			);
-			mainGroup = 0867D691FE84028FC02AAC07 /* CordovaLib */;
-			productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				D2AAC07D0554694100DB518D /* CordovaLib */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXSourcesBuildPhase section */
-		D2AAC07B0554694100DB518D /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				8887FD671090FBE7009987E8 /* CDVCamera.m in Sources */,
-				8887FD691090FBE7009987E8 /* NSDictionary+Extensions.m in Sources */,
-				8887FD6B1090FBE7009987E8 /* CDVContacts.m in Sources */,
-				8887FD6D1090FBE7009987E8 /* CDVDebugConsole.m in Sources */,
-				8887FD711090FBE7009987E8 /* CDVFile.m in Sources */,
-				8887FD751090FBE7009987E8 /* CDVInvokedUrlCommand.m in Sources */,
-				8887FD861090FBE7009987E8 /* CDVLocation.m in Sources */,
-				8887FD8E1090FBE7009987E8 /* CDVNotification.m in Sources */,
-				8887FD901090FBE7009987E8 /* NSData+Base64.m in Sources */,
-				8887FD9E1090FBE7009987E8 /* CDVReachability.m in Sources */,
-				8887FDA01090FBE7009987E8 /* CDVSound.m in Sources */,
-				88BA573E109BB46F00FB5E78 /* CDVAccelerometer.m in Sources */,
-				1F3C04CF12BC247D004F9E10 /* CDVContact.m in Sources */,
-				1F92F4A11314023E0046367C /* CDVPluginResult.m in Sources */,
-				C937A4571337599E002C4C79 /* CDVFileTransfer.m in Sources */,
-				307A8F9F1385A2EC00E43782 /* CDVConnection.m in Sources */,
-				1F584B9C1385A28A00ED25E8 /* CDVCapture.m in Sources */,
-				30E33AF313A7E24B00594D64 /* CDVPlugin.m in Sources */,
-				30B39EBF13D0268B0009682A /* CDVSplashScreen.m in Sources */,
-				30E563D013E217EC00C949AA /* NSMutableArray+QueueAdditions.m in Sources */,
-				1F2BECC113F9785B00A93BF6 /* CDVBattery.m in Sources */,
-				30C684821406CB38004C1A8E /* CDVWhitelist.m in Sources */,
-				30C684961407044B004C1A8E /* CDVURLProtocol.m in Sources */,
-				30A90B9314588697006178D3 /* JSONKit.m in Sources */,
-				8852C43C14B65FD800F0E735 /* CDVViewController.m in Sources */,
-				8852C44114B65FD800F0E735 /* CDVCordovaView.m in Sources */,
-				3034979E1513D56A0090E688 /* CDVLocalStorage.m in Sources */,
-				3062D122151D0EDB000D9128 /* UIDevice+Extensions.m in Sources */,
-				3E76876D156A90EE00EB6FA3 /* CDVLogger.m in Sources */,
-				EBA3557515ABD38C00F4DE24 /* NSArray+Comparisons.m in Sources */,
-				30C5F1E015AF9E950052A00D /* CDVDevice.m in Sources */,
-				EB80C2AD15DEA63D004D9E7B /* CDVEcho.m in Sources */,
-				EB3B3548161CB44D003DBE7D /* CDVCommandQueue.m in Sources */,
-				EB3B357D161F2A45003DBE7D /* CDVCommandDelegateImpl.m in Sources */,
-				9D76CF3D1625A4C50008A0F6 /* CDVGlobalization.m in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
-		1DEB921F08733DC00010E9CD /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				"ARCHS[sdk=iphoneos*]" = (
-					armv6,
-					armv7,
-				);
-				"ARCHS[sdk=iphoneos6.*]" = (
-					armv7,
-					armv7s,
-				);
-				"ARCHS[sdk=iphonesimulator*]" = i386;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				COPY_PHASE_STRIP = NO;
-				DSTROOT = "/tmp/$(PROJECT_NAME).dst";
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = CordovaLib_Prefix.pch;
-				GCC_PREPROCESSOR_DEFINITIONS = "";
-				GCC_THUMB_SUPPORT = NO;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				INSTALL_PATH = /usr/local/lib;
-				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
-				PRODUCT_NAME = Cordova;
-				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
-				SKIP_INSTALL = YES;
-			};
-			name = Debug;
-		};
-		1DEB922008733DC00010E9CD /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				"ARCHS[sdk=iphoneos*]" = (
-					armv6,
-					armv7,
-				);
-				"ARCHS[sdk=iphoneos6.*]" = (
-					armv7,
-					armv7s,
-				);
-				"ARCHS[sdk=iphonesimulator*]" = i386;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				DSTROOT = "/tmp/$(PROJECT_NAME).dst";
-				GCC_MODEL_TUNING = G5;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = CordovaLib_Prefix.pch;
-				GCC_PREPROCESSOR_DEFINITIONS = "";
-				GCC_THUMB_SUPPORT = NO;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				INSTALL_PATH = /usr/local/lib;
-				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
-				PRODUCT_NAME = Cordova;
-				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
-				SKIP_INSTALL = YES;
-			};
-			name = Release;
-		};
-		1DEB922308733DC00010E9CD /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				"ARCHS[sdk=iphoneos*]" = (
-					armv6,
-					armv7,
-				);
-				"ARCHS[sdk=iphoneos6.*]" = (
-					armv7,
-					armv7s,
-				);
-				"ARCHS[sdk=iphonesimulator*]" = i386;
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = "";
-				GCC_THUMB_SUPPORT = NO;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
-				ONLY_ACTIVE_ARCH = NO;
-				OTHER_CFLAGS = "-DDEBUG";
-				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
-				SDKROOT = iphoneos;
-				SKIP_INSTALL = YES;
-				TARGETED_DEVICE_FAMILY = "1,2";
-				USER_HEADER_SEARCH_PATHS = "";
-				VALID_ARCHS = "i386 armv6 armv7 armv7s";
-			};
-			name = Debug;
-		};
-		1DEB922408733DC00010E9CD /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				"ARCHS[sdk=iphoneos*]" = (
-					armv6,
-					armv7,
-				);
-				"ARCHS[sdk=iphoneos6.*]" = (
-					armv7,
-					armv7s,
-				);
-				"ARCHS[sdk=iphonesimulator*]" = i386;
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_PREPROCESSOR_DEFINITIONS = "";
-				GCC_THUMB_SUPPORT = NO;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
-				ONLY_ACTIVE_ARCH = NO;
-				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
-				SDKROOT = iphoneos;
-				SKIP_INSTALL = YES;
-				TARGETED_DEVICE_FAMILY = "1,2";
-				VALID_ARCHS = "i386 armv6 armv7 armv7s";
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CordovaLib" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				1DEB921F08733DC00010E9CD /* Debug */,
-				1DEB922008733DC00010E9CD /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CordovaLib" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				1DEB922308733DC00010E9CD /* Debug */,
-				1DEB922408733DC00010E9CD /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
-}


[63/70] Remove all cordova-lib files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContacts.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContacts.m b/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContacts.m
deleted file mode 100644
index 3ca3e81..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/src/ios/CDVContacts.m
+++ /dev/null
@@ -1,593 +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.
- */
-
-#import "CDVContacts.h"
-#import <UIKit/UIKit.h>
-#import <Cordova/NSArray+Comparisons.h>
-#import <Cordova/NSDictionary+Extensions.h>
-//#import "CDVNotification.h"
-
-@implementation CDVContactsPicker
-
-@synthesize allowsEditing;
-@synthesize callbackId;
-@synthesize options;
-@synthesize pickedContactDictionary;
-
-@end
-@implementation CDVNewContactsController
-
-@synthesize callbackId;
-
-@end
-
-@implementation CDVContacts
-
-// no longer used since code gets AddressBook for each operation.
-// If address book changes during save or remove operation, may get error but not much we can do about it
-// If address book changes during UI creation, display or edit, we don't control any saves so no need for callback
-
-/*void addressBookChanged(ABAddressBookRef addressBook, CFDictionaryRef info, void* context)
-{
-    // note that this function is only called when another AddressBook instance modifies
-    // the address book, not the current one. For example, through an OTA MobileMe sync
-    Contacts* contacts = (Contacts*)context;
-    [contacts addressBookDirty];
-    }*/
-
-- (CDVPlugin*)initWithWebView:(UIWebView*)theWebView
-{
-    self = (CDVContacts*)[super initWithWebView:(UIWebView*)theWebView];
-
-    /*if (self) {
-        addressBook = ABAddressBookCreate();
-        ABAddressBookRegisterExternalChangeCallback(addressBook, addressBookChanged, self);
-    }*/
-
-    return self;
-}
-
-// overridden to clean up Contact statics
-- (void)onAppTerminate
-{
-    // NSLog(@"Contacts::onAppTerminate");
-}
-
-// iPhone only method to create a new contact through the GUI
-- (void)newContact:(CDVInvokedUrlCommand*)command
-{
-    NSString* callbackId = command.callbackId;
-
-    CDVAddressBookHelper* abHelper = [[CDVAddressBookHelper alloc] init];
-    CDVContacts* __weak weakSelf = self;  // play it safe to avoid retain cycles
-
-    [abHelper createAddressBook: ^(ABAddressBookRef addrBook, CDVAddressBookAccessError* errCode) {
-        if (addrBook == NULL) {
-            // permission was denied or other error just return (no error callback)
-            return;
-        }
-        CDVNewContactsController* npController = [[CDVNewContactsController alloc] init];
-        npController.addressBook = addrBook;     // a CF retaining assign
-        CFRelease(addrBook);
-
-        npController.newPersonViewDelegate = self;
-        npController.callbackId = callbackId;
-
-        UINavigationController* navController = [[UINavigationController alloc] initWithRootViewController:npController];
-
-        if ([weakSelf.viewController respondsToSelector:@selector(presentViewController:::)]) {
-            [weakSelf.viewController presentViewController:navController animated:YES completion:nil];
-        } else {
-            [weakSelf.viewController presentModalViewController:navController animated:YES];
-        }
-    }];
-}
-
-- (void)newPersonViewController:(ABNewPersonViewController*)newPersonViewController didCompleteWithNewPerson:(ABRecordRef)person
-{
-    ABRecordID recordId = kABRecordInvalidID;
-    CDVNewContactsController* newCP = (CDVNewContactsController*)newPersonViewController;
-    NSString* callbackId = newCP.callbackId;
-
-    if (person != NULL) {
-        // return the contact id
-        recordId = ABRecordGetRecordID(person);
-    }
-
-    if ([newPersonViewController respondsToSelector:@selector(presentingViewController)]) {
-        [[newPersonViewController presentingViewController] dismissViewControllerAnimated:YES completion:nil];
-    } else {
-        [[newPersonViewController parentViewController] dismissModalViewControllerAnimated:YES];
-    }
-
-    CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:recordId];
-    [self.commandDelegate sendPluginResult:result callbackId:callbackId];
-}
-
-- (void)displayContact:(CDVInvokedUrlCommand*)command
-{
-    NSString* callbackId = command.callbackId;
-    ABRecordID recordID = [[command.arguments objectAtIndex:0] intValue];
-    NSDictionary* options = [command.arguments objectAtIndex:1 withDefault:[NSNull null]];
-    bool bEdit = [options isKindOfClass:[NSNull class]] ? false : [options existsValue:@"true" forKey:@"allowsEditing"];
-
-    CDVAddressBookHelper* abHelper = [[CDVAddressBookHelper alloc] init];
-    CDVContacts* __weak weakSelf = self;  // play it safe to avoid retain cycles
-
-    [abHelper createAddressBook: ^(ABAddressBookRef addrBook, CDVAddressBookAccessError* errCode) {
-        if (addrBook == NULL) {
-            // permission was denied or other error - return error
-            CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageToErrorObject:errCode ? errCode.errorCode:UNKNOWN_ERROR];
-            [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId];
-            return;
-        }
-        ABRecordRef rec = ABAddressBookGetPersonWithRecordID(addrBook, recordID);
-
-        if (rec) {
-            CDVDisplayContactViewController* personController = [[CDVDisplayContactViewController alloc] init];
-            personController.displayedPerson = rec;
-            personController.personViewDelegate = self;
-            personController.allowsEditing = NO;
-
-            // create this so DisplayContactViewController will have a "back" button.
-            UIViewController* parentController = [[UIViewController alloc] init];
-            UINavigationController* navController = [[UINavigationController alloc] initWithRootViewController:parentController];
-
-            [navController pushViewController:personController animated:YES];
-
-            if ([self.viewController respondsToSelector:@selector(presentViewController:::)]) {
-                [self.viewController presentViewController:navController animated:YES completion:nil];
-            } else {
-                [self.viewController presentModalViewController:navController animated:YES];
-            }
-
-            if (bEdit) {
-                // create the editing controller and push it onto the stack
-                ABPersonViewController* editPersonController = [[ABPersonViewController alloc] init];
-                editPersonController.displayedPerson = rec;
-                editPersonController.personViewDelegate = self;
-                editPersonController.allowsEditing = YES;
-                [navController pushViewController:editPersonController animated:YES];
-            }
-        } else {
-            // no record, return error
-            CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:UNKNOWN_ERROR];
-            [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId];
-        }
-        CFRelease(addrBook);
-    }];
-}
-
-- (BOOL)personViewController:(ABPersonViewController*)personViewController shouldPerformDefaultActionForPerson:(ABRecordRef)person
-                    property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifierForValue
-{
-    return YES;
-}
-
-- (void)chooseContact:(CDVInvokedUrlCommand*)command
-{
-    NSString* callbackId = command.callbackId;
-    NSDictionary* options = [command.arguments objectAtIndex:0 withDefault:[NSNull null]];
-
-    CDVContactsPicker* pickerController = [[CDVContactsPicker alloc] init];
-
-    pickerController.peoplePickerDelegate = self;
-    pickerController.callbackId = callbackId;
-    pickerController.options = options;
-    pickerController.pickedContactDictionary = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:kABRecordInvalidID], kW3ContactId, nil];
-    pickerController.allowsEditing = (BOOL)[options existsValue : @"true" forKey : @"allowsEditing"];
-
-    if ([self.viewController respondsToSelector:@selector(presentViewController:::)]) {
-        [self.viewController presentViewController:pickerController animated:YES completion:nil];
-    } else {
-        [self.viewController presentModalViewController:pickerController animated:YES];
-    }
-}
-
-- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController*)peoplePicker
-      shouldContinueAfterSelectingPerson:(ABRecordRef)person
-{
-    CDVContactsPicker* picker = (CDVContactsPicker*)peoplePicker;
-    NSNumber* pickedId = [NSNumber numberWithInt:ABRecordGetRecordID(person)];
-
-    if (picker.allowsEditing) {
-        ABPersonViewController* personController = [[ABPersonViewController alloc] init];
-        personController.displayedPerson = person;
-        personController.personViewDelegate = self;
-        personController.allowsEditing = picker.allowsEditing;
-        // store id so can get info in peoplePickerNavigationControllerDidCancel
-        picker.pickedContactDictionary = [NSDictionary dictionaryWithObjectsAndKeys:pickedId, kW3ContactId, nil];
-
-        [peoplePicker pushViewController:personController animated:YES];
-    } else {
-        // Retrieve and return pickedContact information
-        CDVContact* pickedContact = [[CDVContact alloc] initFromABRecord:(ABRecordRef)person];
-        NSArray* fields = [picker.options objectForKey:@"fields"];
-        NSDictionary* returnFields = [[CDVContact class] calcReturnFields:fields];
-        picker.pickedContactDictionary = [pickedContact toDictionary:returnFields];
-
-        CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:picker.pickedContactDictionary];
-        [self.commandDelegate sendPluginResult:result callbackId:picker.callbackId];
-
-        if ([picker respondsToSelector:@selector(presentingViewController)]) {
-            [[picker presentingViewController] dismissViewControllerAnimated:YES completion:nil];
-        } else {
-            [[picker parentViewController] dismissModalViewControllerAnimated:YES];
-        }
-    }
-    return NO;
-}
-
-- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController*)peoplePicker
-      shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier
-{
-    return YES;
-}
-
-- (void)peoplePickerNavigationControllerDidCancel:(ABPeoplePickerNavigationController*)peoplePicker
-{
-    // return contactId or invalid if none picked
-    CDVContactsPicker* picker = (CDVContactsPicker*)peoplePicker;
-
-    if (picker.allowsEditing) {
-        // get the info after possible edit
-        // if we got this far, user has already approved/ disapproved addressBook access
-        ABAddressBookRef addrBook = nil;
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000
-            if (&ABAddressBookCreateWithOptions != NULL) {
-                addrBook = ABAddressBookCreateWithOptions(NULL, NULL);
-            } else
-#endif
-        {
-            // iOS 4 & 5
-            addrBook = ABAddressBookCreate();
-        }
-        ABRecordRef person = ABAddressBookGetPersonWithRecordID(addrBook, [[picker.pickedContactDictionary objectForKey:kW3ContactId] integerValue]);
-        if (person) {
-            CDVContact* pickedContact = [[CDVContact alloc] initFromABRecord:(ABRecordRef)person];
-            NSArray* fields = [picker.options objectForKey:@"fields"];
-            NSDictionary* returnFields = [[CDVContact class] calcReturnFields:fields];
-            picker.pickedContactDictionary = [pickedContact toDictionary:returnFields];
-        }
-        CFRelease(addrBook);
-    }
-    CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:picker.pickedContactDictionary];
-    [self.commandDelegate sendPluginResult:result callbackId:picker.callbackId];
-
-    if ([peoplePicker respondsToSelector:@selector(presentingViewController)]) {
-        [[peoplePicker presentingViewController] dismissViewControllerAnimated:YES completion:nil];
-    } else {
-        [[peoplePicker parentViewController] dismissModalViewControllerAnimated:YES];
-    }
-}
-
-- (void)search:(CDVInvokedUrlCommand*)command
-{
-    NSString* callbackId = command.callbackId;
-    NSArray* fields = [command.arguments objectAtIndex:0];
-    NSDictionary* findOptions = [command.arguments objectAtIndex:1 withDefault:[NSNull null]];
-
-    [self.commandDelegate runInBackground:^{
-        // from Apple:  Important You must ensure that an instance of ABAddressBookRef is used by only one thread.
-        // which is why address book is created within the dispatch queue.
-        // more details here: http: //blog.byadrian.net/2012/05/05/ios-addressbook-framework-and-gcd/
-        CDVAddressBookHelper* abHelper = [[CDVAddressBookHelper alloc] init];
-        CDVContacts* __weak weakSelf = self;     // play it safe to avoid retain cycles
-        // it gets uglier, block within block.....
-        [abHelper createAddressBook: ^(ABAddressBookRef addrBook, CDVAddressBookAccessError* errCode) {
-            if (addrBook == NULL) {
-                // permission was denied or other error - return error
-                CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageToErrorObject:errCode ? errCode.errorCode:UNKNOWN_ERROR];
-                [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId];
-                return;
-            }
-
-            NSArray* foundRecords = nil;
-            // get the findOptions values
-            BOOL multiple = NO;         // default is false
-            NSString* filter = nil;
-            if (![findOptions isKindOfClass:[NSNull class]]) {
-                id value = nil;
-                filter = (NSString*)[findOptions objectForKey:@"filter"];
-                value = [findOptions objectForKey:@"multiple"];
-                if ([value isKindOfClass:[NSNumber class]]) {
-                    // multiple is a boolean that will come through as an NSNumber
-                    multiple = [(NSNumber*)value boolValue];
-                    // NSLog(@"multiple is: %d", multiple);
-                }
-            }
-
-            NSDictionary* returnFields = [[CDVContact class] calcReturnFields:fields];
-
-            NSMutableArray* matches = nil;
-            if (!filter || [filter isEqualToString:@""]) {
-                // get all records
-                foundRecords = (__bridge_transfer NSArray*)ABAddressBookCopyArrayOfAllPeople(addrBook);
-                if (foundRecords && ([foundRecords count] > 0)) {
-                    // create Contacts and put into matches array
-                    // doesn't make sense to ask for all records when multiple == NO but better check
-                    int xferCount = multiple == YES ? [foundRecords count] : 1;
-                    matches = [NSMutableArray arrayWithCapacity:xferCount];
-
-                    for (int k = 0; k < xferCount; k++) {
-                        CDVContact* xferContact = [[CDVContact alloc] initFromABRecord:(__bridge ABRecordRef)[foundRecords objectAtIndex:k]];
-                        [matches addObject:xferContact];
-                        xferContact = nil;
-                    }
-                }
-            } else {
-                foundRecords = (__bridge_transfer NSArray*)ABAddressBookCopyArrayOfAllPeople(addrBook);
-                matches = [NSMutableArray arrayWithCapacity:1];
-                BOOL bFound = NO;
-                int testCount = [foundRecords count];
-
-                for (int j = 0; j < testCount; j++) {
-                    CDVContact* testContact = [[CDVContact alloc] initFromABRecord:(__bridge ABRecordRef)[foundRecords objectAtIndex:j]];
-                    if (testContact) {
-                        bFound = [testContact foundValue:filter inFields:returnFields];
-                        if (bFound) {
-                            [matches addObject:testContact];
-                        }
-                        testContact = nil;
-                    }
-                }
-            }
-            NSMutableArray* returnContacts = [NSMutableArray arrayWithCapacity:1];
-
-            if ((matches != nil) && ([matches count] > 0)) {
-                // convert to JS Contacts format and return in callback
-                // - returnFields  determines what properties to return
-                @autoreleasepool {
-                    int count = multiple == YES ? [matches count] : 1;
-
-                    for (int i = 0; i < count; i++) {
-                        CDVContact* newContact = [matches objectAtIndex:i];
-                        NSDictionary* aContact = [newContact toDictionary:returnFields];
-                        [returnContacts addObject:aContact];
-                    }
-                }
-            }
-            // return found contacts (array is empty if no contacts found)
-            CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:returnContacts];
-            [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId];
-            // NSLog(@"findCallback string: %@", jsString);
-
-            if (addrBook) {
-                CFRelease(addrBook);
-            }
-        }];
-    }];     // end of workQueue block
-
-    return;
-}
-
-- (void)save:(CDVInvokedUrlCommand*)command
-{
-    NSString* callbackId = command.callbackId;
-    NSDictionary* contactDict = [command.arguments objectAtIndex:0];
-
-    [self.commandDelegate runInBackground:^{
-        CDVAddressBookHelper* abHelper = [[CDVAddressBookHelper alloc] init];
-        CDVContacts* __weak weakSelf = self;     // play it safe to avoid retain cycles
-
-        [abHelper createAddressBook: ^(ABAddressBookRef addrBook, CDVAddressBookAccessError* errorCode) {
-            CDVPluginResult* result = nil;
-            if (addrBook == NULL) {
-                // permission was denied or other error - return error
-                result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:errorCode ? errorCode.errorCode:UNKNOWN_ERROR];
-                [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId];
-                return;
-            }
-
-            bool bIsError = FALSE, bSuccess = FALSE;
-            BOOL bUpdate = NO;
-            CDVContactError errCode = UNKNOWN_ERROR;
-            CFErrorRef error;
-            NSNumber* cId = [contactDict valueForKey:kW3ContactId];
-            CDVContact* aContact = nil;
-            ABRecordRef rec = nil;
-            if (cId && ![cId isKindOfClass:[NSNull class]]) {
-                rec = ABAddressBookGetPersonWithRecordID(addrBook, [cId intValue]);
-                if (rec) {
-                    aContact = [[CDVContact alloc] initFromABRecord:rec];
-                    bUpdate = YES;
-                }
-            }
-            if (!aContact) {
-                aContact = [[CDVContact alloc] init];
-            }
-
-            bSuccess = [aContact setFromContactDict:contactDict asUpdate:bUpdate];
-            if (bSuccess) {
-                if (!bUpdate) {
-                    bSuccess = ABAddressBookAddRecord(addrBook, [aContact record], &error);
-                }
-                if (bSuccess) {
-                    bSuccess = ABAddressBookSave(addrBook, &error);
-                }
-                if (!bSuccess) {         // need to provide error codes
-                    bIsError = TRUE;
-                    errCode = IO_ERROR;
-                } else {
-                    // give original dictionary back?  If generate dictionary from saved contact, have no returnFields specified
-                    // so would give back all fields (which W3C spec. indicates is not desired)
-                    // for now (while testing) give back saved, full contact
-                    NSDictionary* newContact = [aContact toDictionary:[CDVContact defaultFields]];
-                    // NSString* contactStr = [newContact JSONRepresentation];
-                    result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:newContact];
-                }
-            } else {
-                bIsError = TRUE;
-                errCode = IO_ERROR;
-            }
-            CFRelease(addrBook);
-
-            if (bIsError) {
-                result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:errCode];
-            }
-
-            if (result) {
-                [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId];
-            }
-        }];
-    }];     // end of  queue
-}
-
-- (void)remove:(CDVInvokedUrlCommand*)command
-{
-    NSString* callbackId = command.callbackId;
-    NSNumber* cId = [command.arguments objectAtIndex:0];
-
-    CDVAddressBookHelper* abHelper = [[CDVAddressBookHelper alloc] init];
-    CDVContacts* __weak weakSelf = self;  // play it safe to avoid retain cycles
-
-    [abHelper createAddressBook: ^(ABAddressBookRef addrBook, CDVAddressBookAccessError* errorCode) {
-        CDVPluginResult* result = nil;
-        if (addrBook == NULL) {
-            // permission was denied or other error - return error
-            result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:errorCode ? errorCode.errorCode:UNKNOWN_ERROR];
-            [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId];
-            return;
-        }
-
-        bool bIsError = FALSE, bSuccess = FALSE;
-        CDVContactError errCode = UNKNOWN_ERROR;
-        CFErrorRef error;
-        ABRecordRef rec = nil;
-        if (cId && ![cId isKindOfClass:[NSNull class]] && ([cId intValue] != kABRecordInvalidID)) {
-            rec = ABAddressBookGetPersonWithRecordID(addrBook, [cId intValue]);
-            if (rec) {
-                bSuccess = ABAddressBookRemoveRecord(addrBook, rec, &error);
-                if (!bSuccess) {
-                    bIsError = TRUE;
-                    errCode = IO_ERROR;
-                } else {
-                    bSuccess = ABAddressBookSave(addrBook, &error);
-                    if (!bSuccess) {
-                        bIsError = TRUE;
-                        errCode = IO_ERROR;
-                    } else {
-                        // set id to null
-                        // [contactDict setObject:[NSNull null] forKey:kW3ContactId];
-                        // result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary: contactDict];
-                        result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
-                        // NSString* contactStr = [contactDict JSONRepresentation];
-                    }
-                }
-            } else {
-                // no record found return error
-                bIsError = TRUE;
-                errCode = UNKNOWN_ERROR;
-            }
-        } else {
-            // invalid contact id provided
-            bIsError = TRUE;
-            errCode = INVALID_ARGUMENT_ERROR;
-        }
-
-        if (addrBook) {
-            CFRelease(addrBook);
-        }
-        if (bIsError) {
-            result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:errCode];
-        }
-        if (result) {
-            [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId];
-        }
-    }];
-    return;
-}
-
-@end
-
-/* ABPersonViewController does not have any UI to dismiss.  Adding navigationItems to it does not work properly
- * The navigationItems are lost when the app goes into the background.  The solution was to create an empty
- * NavController in front of the ABPersonViewController. This will cause the ABPersonViewController to have a back button. By subclassing the ABPersonViewController, we can override viewDidDisappear and take down the entire NavigationController.
- */
-@implementation CDVDisplayContactViewController
-@synthesize contactsPlugin;
-
-- (void)viewWillDisappear:(BOOL)animated
-{
-    [super viewWillDisappear:animated];
-
-    if ([self respondsToSelector:@selector(presentingViewController)]) {
-        [[self presentingViewController] dismissViewControllerAnimated:YES completion:nil];
-    } else {
-        [[self parentViewController] dismissModalViewControllerAnimated:YES];
-    }
-}
-
-@end
-@implementation CDVAddressBookAccessError
-
-@synthesize errorCode;
-
-- (CDVAddressBookAccessError*)initWithCode:(CDVContactError)code
-{
-    self = [super init];
-    if (self) {
-        self.errorCode = code;
-    }
-    return self;
-}
-
-@end
-
-@implementation CDVAddressBookHelper
-
-/**
- * NOTE: workerBlock is responsible for releasing the addressBook that is passed to it
- */
-- (void)createAddressBook:(CDVAddressBookWorkerBlock)workerBlock
-{
-    // TODO: this probably should be reworked - seems like the workerBlock can just create and release its own AddressBook,
-    // and also this important warning from (http://developer.apple.com/library/ios/#documentation/ContactData/Conceptual/AddressBookProgrammingGuideforiPhone/Chapters/BasicObjects.html):
-    // "Important: Instances of ABAddressBookRef cannot be used by multiple threads. Each thread must make its own instance."
-    ABAddressBookRef addressBook;
-
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000
-        if (&ABAddressBookCreateWithOptions != NULL) {
-            CFErrorRef error = nil;
-            // CFIndex status = ABAddressBookGetAuthorizationStatus();
-            addressBook = ABAddressBookCreateWithOptions(NULL, &error);
-            // NSLog(@"addressBook access: %lu", status);
-            ABAddressBookRequestAccessWithCompletion(addressBook, ^(bool granted, CFErrorRef error) {
-                    // callback can occur in background, address book must be accessed on thread it was created on
-                    dispatch_sync(dispatch_get_main_queue(), ^{
-                        if (error) {
-                            workerBlock(NULL, [[CDVAddressBookAccessError alloc] initWithCode:UNKNOWN_ERROR]);
-                        } else if (!granted) {
-                            workerBlock(NULL, [[CDVAddressBookAccessError alloc] initWithCode:PERMISSION_DENIED_ERROR]);
-                        } else {
-                            // access granted
-                            workerBlock(addressBook, [[CDVAddressBookAccessError alloc] initWithCode:UNKNOWN_ERROR]);
-                        }
-                    });
-                });
-        } else
-#endif
-    {
-        // iOS 4 or 5 no checks needed
-        addressBook = ABAddressBookCreate();
-        workerBlock(addressBook, NULL);
-    }
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/src/wp/Contacts.cs
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/src/wp/Contacts.cs b/cordova-lib/spec-plugman/plugins/Contacts/src/wp/Contacts.cs
deleted file mode 100644
index 6789bb8..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/src/wp/Contacts.cs
+++ /dev/null
@@ -1,664 +0,0 @@
-/*  
-	Licensed 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.
-*/
-
-using Microsoft.Phone.Tasks;
-using Microsoft.Phone.UserData;
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Runtime.Serialization;
-using System.Windows;
-using DeviceContacts = Microsoft.Phone.UserData.Contacts;
-
-
-namespace WPCordovaClassLib.Cordova.Commands
-{
-    [DataContract]
-    public class SearchOptions
-    {
-        [DataMember]
-        public string filter { get; set; }
-        [DataMember]
-        public bool multiple { get; set; }
-    }
-
-    [DataContract]
-    public class ContactSearchParams
-    {
-        [DataMember]
-        public string[] fields { get; set; }
-        [DataMember]
-        public SearchOptions options { get; set; }
-    }
-
-    [DataContract]
-    public class JSONContactAddress
-    {
-        [DataMember]
-        public string formatted { get; set; }
-        [DataMember]
-        public string type { get; set; }
-        [DataMember]
-        public string streetAddress { get; set; }
-        [DataMember]
-        public string locality { get; set; }
-        [DataMember]
-        public string region { get; set; }
-        [DataMember]
-        public string postalCode { get; set; }
-        [DataMember]
-        public string country { get; set; }
-        [DataMember]
-        public bool pref { get; set; }
-    }
-
-    [DataContract]
-    public class JSONContactName
-    {
-        [DataMember]
-        public string formatted { get; set; }
-        [DataMember]
-        public string familyName { get; set; }
-        [DataMember]
-        public string givenName { get; set; }
-        [DataMember]
-        public string middleName { get; set; }
-        [DataMember]
-        public string honorificPrefix { get; set; }
-        [DataMember]
-        public string honorificSuffix { get; set; }
-    }
-
-    [DataContract]
-    public class JSONContactField
-    {
-        [DataMember]
-        public string type { get; set; }
-        [DataMember]
-        public string value { get; set; }
-        [DataMember]
-        public bool pref { get; set; }
-    }
-
-    [DataContract]
-    public class JSONContactOrganization
-    {
-        [DataMember]
-        public string type { get; set; }
-        [DataMember]
-        public string name { get; set; }
-        [DataMember]
-        public bool pref { get; set; }
-        [DataMember]
-        public string department { get; set; }
-        [DataMember]
-        public string title { get; set; }
-    }
-
-    [DataContract]
-    public class JSONContact
-    {
-        [DataMember]
-        public string id { get; set; }
-        [DataMember]
-        public string rawId { get; set; }
-        [DataMember]
-        public string displayName { get; set; }
-        [DataMember]
-        public string nickname { get; set; }
-        [DataMember]
-        public string note { get; set; }
-
-        [DataMember]
-        public JSONContactName name { get; set; }
-
-        [DataMember]
-        public JSONContactField[] emails { get; set; }
-
-        [DataMember]
-        public JSONContactField[] phoneNumbers { get; set; }
-
-        [DataMember]
-        public JSONContactField[] ims { get; set; }
-
-        [DataMember]
-        public JSONContactField[] photos { get; set; }
-
-        [DataMember]
-        public JSONContactField[] categories { get; set; }
-
-        [DataMember]
-        public JSONContactField[] urls { get; set; }
-
-        [DataMember]
-        public JSONContactOrganization[] organizations { get; set; }
-
-        [DataMember]
-        public JSONContactAddress[] addresses { get; set; }
-    }
-
-
-    public class Contacts : BaseCommand
-    {
-
-        public const int UNKNOWN_ERROR = 0;
-        public const int INVALID_ARGUMENT_ERROR = 1;
-        public const int TIMEOUT_ERROR = 2;
-        public const int PENDING_OPERATION_ERROR = 3;
-        public const int IO_ERROR = 4;
-        public const int NOT_SUPPORTED_ERROR = 5;
-        public const int PERMISSION_DENIED_ERROR = 20;
-        public const int SYNTAX_ERR = 8;
-
-        public Contacts()
-        {
-
-        }
-
-        // refer here for contact properties we can access: http://msdn.microsoft.com/en-us/library/microsoft.phone.tasks.savecontacttask_members%28v=VS.92%29.aspx
-        public void save(string jsonContact)
-        {
-
-            // jsonContact is actually an array of 1 {contact}
-            string[] args = JSON.JsonHelper.Deserialize<string[]>(jsonContact);
-
-
-            JSONContact contact = JSON.JsonHelper.Deserialize<JSONContact>(args[0]);
-
-            SaveContactTask contactTask = new SaveContactTask();
-
-            if (contact.nickname != null)
-            {
-                contactTask.Nickname = contact.nickname;
-            }
-            if (contact.urls != null && contact.urls.Length > 0)
-            {
-                contactTask.Website = contact.urls[0].value;
-            }
-            if (contact.note != null)
-            {
-                contactTask.Notes = contact.note;
-            }
-
-            #region contact.name
-            if (contact.name != null)
-            {
-                if (contact.name.givenName != null)
-                    contactTask.FirstName = contact.name.givenName;
-                if (contact.name.familyName != null)
-                    contactTask.LastName = contact.name.familyName;
-                if (contact.name.middleName != null)
-                    contactTask.MiddleName = contact.name.middleName;
-                if (contact.name.honorificSuffix != null)
-                    contactTask.Suffix = contact.name.honorificSuffix;
-                if (contact.name.honorificPrefix != null)
-                    contactTask.Title = contact.name.honorificPrefix;
-            }
-            #endregion
-
-            #region contact.org
-            if (contact.organizations != null && contact.organizations.Count() > 0)
-            {
-                contactTask.Company = contact.organizations[0].name;
-                contactTask.JobTitle = contact.organizations[0].title;
-            }
-            #endregion
-
-            #region contact.phoneNumbers
-            if (contact.phoneNumbers != null && contact.phoneNumbers.Length > 0)
-            {
-                foreach (JSONContactField field in contact.phoneNumbers)
-                {
-                    string fieldType = field.type.ToLower();
-                    if (fieldType == "work")
-                    {
-                        contactTask.WorkPhone = field.value;
-                    }
-                    else if (fieldType == "home")
-                    {
-                        contactTask.HomePhone = field.value;
-                    }
-                    else if (fieldType == "mobile")
-                    {
-                        contactTask.MobilePhone = field.value;
-                    }
-                }
-            }
-            #endregion
-
-            #region contact.emails
-
-            if (contact.emails != null && contact.emails.Length > 0)
-            {
-
-                // set up different email types if they are not explicitly defined
-                foreach (string type in new string[] { "personal", "work", "other" })
-                {
-                    foreach (JSONContactField field in contact.emails)
-                    {
-                        if (field != null && String.IsNullOrEmpty(field.type))
-                        {
-                            field.type = type;
-                            break;
-                        }
-                    }
-                }
-
-                foreach (JSONContactField field in contact.emails)
-                {
-                    if (field != null)
-                    {
-                        if (field.type != null && field.type != "other")
-                        {
-                            string fieldType = field.type.ToLower();
-                            if (fieldType == "work")
-                            {
-                                contactTask.WorkEmail = field.value;
-                            }
-                            else if (fieldType == "home" || fieldType == "personal")
-                            {
-                                contactTask.PersonalEmail = field.value;
-                            }
-                        }
-                        else
-                        {
-                            contactTask.OtherEmail = field.value;
-                        }
-                    }
-
-                }
-            }
-            #endregion
-
-            if (contact.note != null && contact.note.Length > 0)
-            {
-                contactTask.Notes = contact.note;
-            }
-
-            #region contact.addresses
-            if (contact.addresses != null && contact.addresses.Length > 0)
-            {
-                foreach (JSONContactAddress address in contact.addresses)
-                {
-                    if (address.type == null)
-                    {
-                        address.type = "home"; // set a default
-                    }
-                    string fieldType = address.type.ToLower();
-                    if (fieldType == "work")
-                    {
-                        contactTask.WorkAddressCity = address.locality;
-                        contactTask.WorkAddressCountry = address.country;
-                        contactTask.WorkAddressState = address.region;
-                        contactTask.WorkAddressStreet = address.streetAddress;
-                        contactTask.WorkAddressZipCode = address.postalCode;
-                    }
-                    else if (fieldType == "home" || fieldType == "personal")
-                    {
-                        contactTask.HomeAddressCity = address.locality;
-                        contactTask.HomeAddressCountry = address.country;
-                        contactTask.HomeAddressState = address.region;
-                        contactTask.HomeAddressStreet = address.streetAddress;
-                        contactTask.HomeAddressZipCode = address.postalCode;
-                    }
-                    else
-                    {
-                        // no other address fields available ...
-                        Debug.WriteLine("Creating contact with unsupported address type :: " + address.type);
-                    }
-                }
-            }
-            #endregion
-
-
-            contactTask.Completed += new EventHandler<SaveContactResult>(ContactSaveTaskCompleted);
-            contactTask.Show();
-        }
-
-        void ContactSaveTaskCompleted(object sender, SaveContactResult e)
-        {
-            SaveContactTask task = sender as SaveContactTask;
-
-            if (e.TaskResult == TaskResult.OK)
-            {
-
-                Deployment.Current.Dispatcher.BeginInvoke(() =>
-                {
-                    DeviceContacts deviceContacts = new DeviceContacts();
-                    deviceContacts.SearchCompleted += new EventHandler<ContactsSearchEventArgs>(postAdd_SearchCompleted);
-
-                    string displayName = String.Format("{0}{2}{1}", task.FirstName, task.LastName, String.IsNullOrEmpty(task.FirstName) ? "" : " ");
-
-                    deviceContacts.SearchAsync(displayName, FilterKind.DisplayName, task);
-                });
-
-
-            }
-            else if (e.TaskResult == TaskResult.Cancel)
-            {
-                DispatchCommandResult(new PluginResult(PluginResult.Status.ERROR, "Operation cancelled."));
-            }
-        }
-
-        void postAdd_SearchCompleted(object sender, ContactsSearchEventArgs e)
-        {
-            if (e.Results.Count() > 0)
-            {
-                List<Contact> foundContacts = new List<Contact>();
-
-                int n = (from Contact contact in e.Results select contact.GetHashCode()).Max();
-                Contact newContact = (from Contact contact in e.Results
-                                      where contact.GetHashCode() == n
-                                      select contact).First();
-
-                DispatchCommandResult(new PluginResult(PluginResult.Status.OK, FormatJSONContact(newContact, null)));
-            }
-            else
-            {
-                DispatchCommandResult(new PluginResult(PluginResult.Status.NO_RESULT));
-            }
-        }
-
-
-
-        public void remove(string id)
-        {
-            // note id is wrapped in [] and always has exactly one string ...
-            DispatchCommandResult(new PluginResult(PluginResult.Status.ERROR, "{\"code\":" + NOT_SUPPORTED_ERROR + "}"));
-        }
-
-        public void search(string searchCriteria)
-        {
-            string[] args = JSON.JsonHelper.Deserialize<string[]>(searchCriteria);
-
-            ContactSearchParams searchParams = new ContactSearchParams();
-            try
-            {
-                searchParams.fields = JSON.JsonHelper.Deserialize<string[]>(args[0]);
-                searchParams.options = JSON.JsonHelper.Deserialize<SearchOptions>(args[1]);
-            }
-            catch (Exception)
-            {
-                DispatchCommandResult(new PluginResult(PluginResult.Status.ERROR, INVALID_ARGUMENT_ERROR));
-                return;
-            }
-
-            if (searchParams.options == null)
-            {
-                searchParams.options = new SearchOptions();
-                searchParams.options.filter = "";
-                searchParams.options.multiple = true;
-            }
-
-            DeviceContacts deviceContacts = new DeviceContacts();
-            deviceContacts.SearchCompleted += new EventHandler<ContactsSearchEventArgs>(contacts_SearchCompleted);
-
-            // default is to search all fields
-            FilterKind filterKind = FilterKind.None;
-            // if only one field is specified, we will try the 3 available DeviceContact search filters
-            if (searchParams.fields.Count() == 1)
-            {
-                if (searchParams.fields.Contains("name"))
-                {
-                    filterKind = FilterKind.DisplayName;
-                }
-                else if (searchParams.fields.Contains("emails"))
-                {
-                    filterKind = FilterKind.EmailAddress;
-                }
-                else if (searchParams.fields.Contains("phoneNumbers"))
-                {
-                    filterKind = FilterKind.PhoneNumber;
-                }
-            }
-
-            try
-            {
-
-                deviceContacts.SearchAsync(searchParams.options.filter, filterKind, searchParams);
-            }
-            catch (Exception ex)
-            {
-                Debug.WriteLine("search contacts exception :: " + ex.Message);
-            }
-        }
-
-        private void contacts_SearchCompleted(object sender, ContactsSearchEventArgs e)
-        {
-            ContactSearchParams searchParams = (ContactSearchParams)e.State;
-
-            List<Contact> foundContacts = null;
-
-            // if we have multiple search fields
-            if (searchParams.options.filter.Length > 0 && searchParams.fields.Count() > 1)
-            {
-                foundContacts = new List<Contact>();
-                if (searchParams.fields.Contains("emails"))
-                {
-                    foundContacts.AddRange(from Contact con in e.Results
-                                           from ContactEmailAddress a in con.EmailAddresses
-                                           where a.EmailAddress.Contains(searchParams.options.filter)
-                                           select con);
-                }
-                if (searchParams.fields.Contains("displayName"))
-                {
-                    foundContacts.AddRange(from Contact con in e.Results
-                                           where con.DisplayName.Contains(searchParams.options.filter)
-                                           select con);
-                }
-                if (searchParams.fields.Contains("name"))
-                {
-                    foundContacts.AddRange(from Contact con in e.Results
-                                           where con.CompleteName != null && con.CompleteName.ToString().Contains(searchParams.options.filter)
-                                           select con);
-                }
-                if (searchParams.fields.Contains("phoneNumbers"))
-                {
-                    foundContacts.AddRange(from Contact con in e.Results
-                                           from ContactPhoneNumber a in con.PhoneNumbers
-                                           where a.PhoneNumber.Contains(searchParams.options.filter)
-                                           select con);
-                }
-                if (searchParams.fields.Contains("urls"))
-                {
-                    foundContacts.AddRange(from Contact con in e.Results
-                                           from string a in con.Websites
-                                           where a.Contains(searchParams.options.filter)
-                                           select con);
-                }
-            }
-            else
-            {
-                foundContacts = new List<Contact>(e.Results);
-            }
-
-            //List<string> contactList = new List<string>();
-
-            string strResult = "";
-
-            IEnumerable<Contact> distinctContacts = foundContacts.Distinct();
-
-            foreach (Contact contact in distinctContacts)
-            {
-                strResult += FormatJSONContact(contact, null) + ",";
-                //contactList.Add(FormatJSONContact(contact, null));
-                if (!searchParams.options.multiple)
-                {
-                    break; // just return the first item
-                }
-            }
-            PluginResult result = new PluginResult(PluginResult.Status.OK);
-            result.Message = "[" + strResult.TrimEnd(',') + "]";
-            DispatchCommandResult(result);
-
-        }
-
-        private string FormatJSONPhoneNumbers(Contact con)
-        {
-            string retVal = "";
-            string contactFieldFormat = "\"type\":\"{0}\",\"value\":\"{1}\",\"pref\":\"false\"";
-            foreach (ContactPhoneNumber number in con.PhoneNumbers)
-            {
-
-                string contactField = string.Format(contactFieldFormat,
-                                                    number.Kind.ToString(),
-                                                    number.PhoneNumber);
-
-                retVal += "{" + contactField + "},";
-            }
-            return retVal.TrimEnd(',');
-        }
-
-        private string FormatJSONEmails(Contact con)
-        {
-            string retVal = "";
-            string contactFieldFormat = "\"type\":\"{0}\",\"value\":\"{1}\",\"pref\":\"false\"";
-            foreach (ContactEmailAddress address in con.EmailAddresses)
-            {
-                string contactField = string.Format(contactFieldFormat,
-                                                    address.Kind.ToString(),
-                                                    address.EmailAddress);
-
-                retVal += "{" + contactField + "},";
-            }
-            return retVal.TrimEnd(',');
-        }
-
-        private string getFormattedJSONAddress(ContactAddress address, bool isPreferred)
-        {
-
-            string addressFormatString = "\"pref\":{0}," + // bool
-                          "\"type\":\"{1}\"," +
-                          "\"formatted\":\"{2}\"," +
-                          "\"streetAddress\":\"{3}\"," +
-                          "\"locality\":\"{4}\"," +
-                          "\"region\":\"{5}\"," +
-                          "\"postalCode\":\"{6}\"," +
-                          "\"country\":\"{7}\"";
-
-            string formattedAddress = address.PhysicalAddress.AddressLine1 + " "
-                                    + address.PhysicalAddress.AddressLine2 + " "
-                                    + address.PhysicalAddress.City + " "
-                                    + address.PhysicalAddress.StateProvince + " "
-                                    + address.PhysicalAddress.CountryRegion + " "
-                                    + address.PhysicalAddress.PostalCode;
-
-            string jsonAddress = string.Format(addressFormatString,
-                                               isPreferred ? "\"true\"" : "\"false\"",
-                                               address.Kind.ToString(),
-                                               formattedAddress,
-                                               address.PhysicalAddress.AddressLine1 + " " + address.PhysicalAddress.AddressLine2,
-                                               address.PhysicalAddress.City,
-                                               address.PhysicalAddress.StateProvince,
-                                               address.PhysicalAddress.PostalCode,
-                                               address.PhysicalAddress.CountryRegion);
-
-            //Debug.WriteLine("getFormattedJSONAddress returning :: " + jsonAddress);
-
-            return "{" + jsonAddress + "}";
-        }
-
-        private string FormatJSONAddresses(Contact con)
-        {
-            string retVal = "";
-            foreach (ContactAddress address in con.Addresses)
-            {
-                retVal += this.getFormattedJSONAddress(address, false) + ",";
-            }
-
-            //Debug.WriteLine("FormatJSONAddresses returning :: " + retVal);
-            return retVal.TrimEnd(',');
-        }
-
-        private string FormatJSONWebsites(Contact con)
-        {
-            string retVal = "";
-            foreach (string website in con.Websites)
-            {
-                retVal += "\"" + website + "\",";
-            }
-            return retVal.TrimEnd(',');
-        }
-
-        /*
-         *  formatted: The complete name of the contact. (DOMString)
-            familyName: The contacts family name. (DOMString)
-            givenName: The contacts given name. (DOMString)
-            middleName: The contacts middle name. (DOMString)
-            honorificPrefix: The contacts prefix (example Mr. or Dr.) (DOMString)
-            honorificSuffix: The contacts suffix (example Esq.). (DOMString)
-         */
-        private string FormatJSONName(Contact con)
-        {
-            string retVal = "";
-            string formatStr = "\"formatted\":\"{0}\"," +
-                                "\"familyName\":\"{1}\"," +
-                                "\"givenName\":\"{2}\"," +
-                                "\"middleName\":\"{3}\"," +
-                                "\"honorificPrefix\":\"{4}\"," +
-                                "\"honorificSuffix\":\"{5}\"";
-
-            if (con.CompleteName != null)
-            {
-                retVal = string.Format(formatStr,
-                                   con.CompleteName.FirstName + " " + con.CompleteName.LastName, // TODO: does this need suffix? middlename?
-                                   con.CompleteName.LastName,
-                                   con.CompleteName.FirstName,
-                                   con.CompleteName.MiddleName,
-                                   con.CompleteName.Title,
-                                   con.CompleteName.Suffix);
-            }
-            else
-            {
-                retVal = string.Format(formatStr,"","","","","","");
-            }
-
-            return "{" + retVal + "}";
-        }
-
-        private string FormatJSONContact(Contact con, string[] fields)
-        {
-
-            string contactFormatStr = "\"id\":\"{0}\"," +
-                                      "\"displayName\":\"{1}\"," +
-                                      "\"nickname\":\"{2}\"," +
-                                      "\"phoneNumbers\":[{3}]," +
-                                      "\"emails\":[{4}]," +
-                                      "\"addresses\":[{5}]," +
-                                      "\"urls\":[{6}]," +
-                                      "\"name\":{7}," +
-                                      "\"note\":\"{8}\"," +
-                                      "\"birthday\":\"{9}\"";
-
-
-            string jsonContact = String.Format(contactFormatStr,
-                                               con.GetHashCode(),
-                                               con.DisplayName,
-                                               con.CompleteName != null ? con.CompleteName.Nickname : "",
-                                               FormatJSONPhoneNumbers(con),
-                                               FormatJSONEmails(con),
-                                               FormatJSONAddresses(con),
-                                               FormatJSONWebsites(con),
-                                               FormatJSONName(con),
-                                               con.Notes.FirstOrDefault(),
-                                               con.Birthdays.FirstOrDefault());
-
-            //Debug.WriteLine("jsonContact = " + jsonContact);
-            // JSON requires new line characters be escaped
-            return "{" + jsonContact.Replace("\n", "\\n") + "}";
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/www/Contact.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/www/Contact.js b/cordova-lib/spec-plugman/plugins/Contacts/www/Contact.js
deleted file mode 100644
index 9c46a0c..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/www/Contact.js
+++ /dev/null
@@ -1,177 +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'),
-    ContactError = require('./ContactError'),
-    utils = require('cordova/utils');
-
-/**
-* Converts primitives into Complex Object
-* Currently only used for Date fields
-*/
-function convertIn(contact) {
-    var value = contact.birthday;
-    try {
-      contact.birthday = new Date(parseFloat(value));
-    } catch (exception){
-      console.log("Cordova Contact convertIn error: exception creating date.");
-    }
-    return contact;
-}
-
-/**
-* Converts Complex objects into primitives
-* Only conversion at present is for Dates.
-**/
-
-function convertOut(contact) {
-    var value = contact.birthday;
-    if (value !== null) {
-        // try to make it a Date object if it is not already
-        if (!utils.isDate(value)){
-            try {
-                value = new Date(value);
-            } catch(exception){
-                value = null;
-            }
-        }
-        if (utils.isDate(value)){
-            value = value.valueOf(); // convert to milliseconds
-        }
-        contact.birthday = value;
-    }
-    return contact;
-}
-
-/**
-* Contains information about a single contact.
-* @constructor
-* @param {DOMString} id unique identifier
-* @param {DOMString} displayName
-* @param {ContactName} name
-* @param {DOMString} nickname
-* @param {Array.<ContactField>} phoneNumbers array of phone numbers
-* @param {Array.<ContactField>} emails array of email addresses
-* @param {Array.<ContactAddress>} addresses array of addresses
-* @param {Array.<ContactField>} ims instant messaging user ids
-* @param {Array.<ContactOrganization>} organizations
-* @param {DOMString} birthday contact's birthday
-* @param {DOMString} note user notes about contact
-* @param {Array.<ContactField>} photos
-* @param {Array.<ContactField>} categories
-* @param {Array.<ContactField>} urls contact's web sites
-*/
-var Contact = function (id, displayName, name, nickname, phoneNumbers, emails, addresses,
-    ims, organizations, birthday, note, photos, categories, urls) {
-    this.id = id || null;
-    this.rawId = null;
-    this.displayName = displayName || null;
-    this.name = name || null; // ContactName
-    this.nickname = nickname || null;
-    this.phoneNumbers = phoneNumbers || null; // ContactField[]
-    this.emails = emails || null; // ContactField[]
-    this.addresses = addresses || null; // ContactAddress[]
-    this.ims = ims || null; // ContactField[]
-    this.organizations = organizations || null; // ContactOrganization[]
-    this.birthday = birthday || null;
-    this.note = note || null;
-    this.photos = photos || null; // ContactField[]
-    this.categories = categories || null; // ContactField[]
-    this.urls = urls || null; // ContactField[]
-};
-
-/**
-* Removes contact from device storage.
-* @param successCB success callback
-* @param errorCB error callback
-*/
-Contact.prototype.remove = function(successCB, errorCB) {
-    argscheck.checkArgs('FF', 'Contact.remove', arguments);
-    var fail = errorCB && function(code) {
-        errorCB(new ContactError(code));
-    };
-    if (this.id === null) {
-        fail(ContactError.UNKNOWN_ERROR);
-    }
-    else {
-        exec(successCB, fail, "Contacts", "remove", [this.id]);
-    }
-};
-
-/**
-* Creates a deep copy of this Contact.
-* With the contact ID set to null.
-* @return copy of this Contact
-*/
-Contact.prototype.clone = function() {
-    var clonedContact = utils.clone(this);
-    clonedContact.id = null;
-    clonedContact.rawId = null;
-
-    function nullIds(arr) {
-        if (arr) {
-            for (var i = 0; i < arr.length; ++i) {
-                arr[i].id = null;
-            }
-        }
-    }
-
-    // Loop through and clear out any id's in phones, emails, etc.
-    nullIds(clonedContact.phoneNumbers);
-    nullIds(clonedContact.emails);
-    nullIds(clonedContact.addresses);
-    nullIds(clonedContact.ims);
-    nullIds(clonedContact.organizations);
-    nullIds(clonedContact.categories);
-    nullIds(clonedContact.photos);
-    nullIds(clonedContact.urls);
-    return clonedContact;
-};
-
-/**
-* Persists contact to device storage.
-* @param successCB success callback
-* @param errorCB error callback
-*/
-Contact.prototype.save = function(successCB, errorCB) {
-    argscheck.checkArgs('FFO', 'Contact.save', arguments);
-    var fail = errorCB && function(code) {
-        errorCB(new ContactError(code));
-    };
-    var success = function(result) {
-        if (result) {
-            if (successCB) {
-                var fullContact = require('./contacts').create(result);
-                successCB(convertIn(fullContact));
-            }
-        }
-        else {
-            // no Entry object returned
-            fail(ContactError.UNKNOWN_ERROR);
-        }
-    };
-    var dupContact = convertOut(utils.clone(this));
-    exec(success, fail, "Contacts", "save", [dupContact]);
-};
-
-
-module.exports = Contact;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/www/ContactAddress.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/www/ContactAddress.js b/cordova-lib/spec-plugman/plugins/Contacts/www/ContactAddress.js
deleted file mode 100644
index 3d39086..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/www/ContactAddress.js
+++ /dev/null
@@ -1,46 +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.
- *
-*/
-
-/**
-* Contact address.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code
-* @param formatted // NOTE: not a W3C standard
-* @param streetAddress
-* @param locality
-* @param region
-* @param postalCode
-* @param country
-*/
-
-var ContactAddress = function(pref, type, formatted, streetAddress, locality, region, postalCode, country) {
-    this.id = null;
-    this.pref = (typeof pref != 'undefined' ? pref : false);
-    this.type = type || null;
-    this.formatted = formatted || null;
-    this.streetAddress = streetAddress || null;
-    this.locality = locality || null;
-    this.region = region || null;
-    this.postalCode = postalCode || null;
-    this.country = country || null;
-};
-
-module.exports = ContactAddress;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/www/ContactError.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/www/ContactError.js b/cordova-lib/spec-plugman/plugins/Contacts/www/ContactError.js
deleted file mode 100644
index 01b229a..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/www/ContactError.js
+++ /dev/null
@@ -1,42 +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.
- *
-*/
-
-/**
- *  ContactError.
- *  An error code assigned by an implementation when an error has occurred
- * @constructor
- */
-var ContactError = function(err) {
-    this.code = (typeof err != 'undefined' ? err : null);
-};
-
-/**
- * Error codes
- */
-ContactError.UNKNOWN_ERROR = 0;
-ContactError.INVALID_ARGUMENT_ERROR = 1;
-ContactError.TIMEOUT_ERROR = 2;
-ContactError.PENDING_OPERATION_ERROR = 3;
-ContactError.IO_ERROR = 4;
-ContactError.NOT_SUPPORTED_ERROR = 5;
-ContactError.PERMISSION_DENIED_ERROR = 20;
-
-module.exports = ContactError;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/www/ContactField.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/www/ContactField.js b/cordova-lib/spec-plugman/plugins/Contacts/www/ContactField.js
deleted file mode 100644
index e84107a..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/www/ContactField.js
+++ /dev/null
@@ -1,37 +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.
- *
-*/
-
-/**
-* Generic contact field.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
-* @param type
-* @param value
-* @param pref
-*/
-var ContactField = function(type, value, pref) {
-    this.id = null;
-    this.type = (type && type.toString()) || null;
-    this.value = (value && value.toString()) || null;
-    this.pref = (typeof pref != 'undefined' ? pref : false);
-};
-
-module.exports = ContactField;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/www/ContactFindOptions.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/www/ContactFindOptions.js b/cordova-lib/spec-plugman/plugins/Contacts/www/ContactFindOptions.js
deleted file mode 100644
index bd8bf35..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/www/ContactFindOptions.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.
- *
-*/
-
-/**
- * ContactFindOptions.
- * @constructor
- * @param filter used to match contacts against
- * @param multiple boolean used to determine if more than one contact should be returned
- */
-
-var ContactFindOptions = function(filter, multiple) {
-    this.filter = filter || '';
-    this.multiple = (typeof multiple != 'undefined' ? multiple : false);
-};
-
-module.exports = ContactFindOptions;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/www/ContactName.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/www/ContactName.js b/cordova-lib/spec-plugman/plugins/Contacts/www/ContactName.js
deleted file mode 100644
index 15cf60b..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/www/ContactName.js
+++ /dev/null
@@ -1,41 +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.
- *
-*/
-
-/**
-* Contact name.
-* @constructor
-* @param formatted // NOTE: not part of W3C standard
-* @param familyName
-* @param givenName
-* @param middle
-* @param prefix
-* @param suffix
-*/
-var ContactName = function(formatted, familyName, givenName, middle, prefix, suffix) {
-    this.formatted = formatted || null;
-    this.familyName = familyName || null;
-    this.givenName = givenName || null;
-    this.middleName = middle || null;
-    this.honorificPrefix = prefix || null;
-    this.honorificSuffix = suffix || null;
-};
-
-module.exports = ContactName;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/www/ContactOrganization.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/www/ContactOrganization.js b/cordova-lib/spec-plugman/plugins/Contacts/www/ContactOrganization.js
deleted file mode 100644
index 5dd242b..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/www/ContactOrganization.js
+++ /dev/null
@@ -1,44 +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.
- *
-*/
-
-/**
-* Contact organization.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
-* @param name
-* @param dept
-* @param title
-* @param startDate
-* @param endDate
-* @param location
-* @param desc
-*/
-
-var ContactOrganization = function(pref, type, name, dept, title) {
-    this.id = null;
-    this.pref = (typeof pref != 'undefined' ? pref : false);
-    this.type = type || null;
-    this.name = name || null;
-    this.department = dept || null;
-    this.title = title || null;
-};
-
-module.exports = ContactOrganization;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/www/contacts.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/www/contacts.js b/cordova-lib/spec-plugman/plugins/Contacts/www/contacts.js
deleted file mode 100644
index 5e6b4db..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/www/contacts.js
+++ /dev/null
@@ -1,76 +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'),
-    ContactError = require('./ContactError'),
-    utils = require('cordova/utils'),
-    Contact = require('./Contact');
-
-/**
-* Represents a group of Contacts.
-* @constructor
-*/
-var contacts = {
-    /**
-     * Returns an array of Contacts matching the search criteria.
-     * @param fields that should be searched
-     * @param successCB success callback
-     * @param errorCB error callback
-     * @param {ContactFindOptions} options that can be applied to contact searching
-     * @return array of Contacts matching search criteria
-     */
-    find:function(fields, successCB, errorCB, options) {
-        argscheck.checkArgs('afFO', 'contacts.find', arguments);
-        if (!fields.length) {
-            errorCB && errorCB(new ContactError(ContactError.INVALID_ARGUMENT_ERROR));
-        } else {
-            var win = function(result) {
-                var cs = [];
-                for (var i = 0, l = result.length; i < l; i++) {
-                    cs.push(contacts.create(result[i]));
-                }
-                successCB(cs);
-            };
-            exec(win, errorCB, "Contacts", "search", [fields, options]);
-        }
-    },
-
-    /**
-     * This function creates a new contact, but it does not persist the contact
-     * to device storage. To persist the contact to device storage, invoke
-     * contact.save().
-     * @param properties an object whose properties will be examined to create a new Contact
-     * @returns new Contact object
-     */
-    create:function(properties) {
-        argscheck.checkArgs('O', 'contacts.create', arguments);
-        var contact = new Contact();
-        for (var i in properties) {
-            if (typeof contact[i] !== 'undefined' && properties.hasOwnProperty(i)) {
-                contact[i] = properties[i];
-            }
-        }
-        return contact;
-    }
-};
-
-module.exports = contacts;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/www/ios/Contact.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/www/ios/Contact.js b/cordova-lib/spec-plugman/plugins/Contacts/www/ios/Contact.js
deleted file mode 100644
index b40c41a..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/www/ios/Contact.js
+++ /dev/null
@@ -1,51 +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'),
-    ContactError = require('./ContactError');
-
-/**
- * Provides iOS Contact.display API.
- */
-module.exports = {
-    display : function(errorCB, options) {
-        /*
-         *    Display a contact using the iOS Contact Picker UI
-         *    NOT part of W3C spec so no official documentation
-         *
-         *    @param errorCB error callback
-         *    @param options object
-         *    allowsEditing: boolean AS STRING
-         *        "true" to allow editing the contact
-         *        "false" (default) display contact
-         */
-
-        if (this.id === null) {
-            if (typeof errorCB === "function") {
-                var errorObj = new ContactError(ContactError.UNKNOWN_ERROR);
-                errorCB(errorObj);
-            }
-        }
-        else {
-            exec(null, errorCB, "Contacts","displayContact", [this.id, options]);
-        }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/Contacts/www/ios/contacts.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/Contacts/www/ios/contacts.js b/cordova-lib/spec-plugman/plugins/Contacts/www/ios/contacts.js
deleted file mode 100644
index 67cf421..0000000
--- a/cordova-lib/spec-plugman/plugins/Contacts/www/ios/contacts.js
+++ /dev/null
@@ -1,62 +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 iOS enhanced contacts API.
- */
-module.exports = {
-    newContactUI : function(successCallback) {
-        /*
-         *    Create a contact using the iOS Contact Picker UI
-         *    NOT part of W3C spec so no official documentation
-         *
-         * returns:  the id of the created contact as param to successCallback
-         */
-        exec(successCallback, null, "Contacts","newContact", []);
-    },
-    chooseContact : function(successCallback, options) {
-        /*
-         *    Select a contact using the iOS Contact Picker UI
-         *    NOT part of W3C spec so no official documentation
-         *
-         *    @param errorCB error callback
-         *    @param options object
-         *    allowsEditing: boolean AS STRING
-         *        "true" to allow editing the contact
-         *        "false" (default) display contact
-         *      fields: array of fields to return in contact object (see ContactOptions.fields)
-         *
-         *    @returns
-         *        id of contact selected
-         *        ContactObject
-         *            if no fields provided contact contains just id information
-         *            if fields provided contact object contains information for the specified fields
-         *
-         */
-         var win = function(result) {
-             var fullContact = require('./contacts').create(result);
-            successCallback(fullContact.id, fullContact);
-       };
-        exec(win, null, "Contacts","chooseContact", [options]);
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/DummyPlugin/android-resource.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/android-resource.xml b/cordova-lib/spec-plugman/plugins/DummyPlugin/android-resource.xml
deleted file mode 100644
index 421376d..0000000
--- a/cordova-lib/spec-plugman/plugins/DummyPlugin/android-resource.xml
+++ /dev/null
@@ -1 +0,0 @@
-dummy

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/DummyPlugin/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/DummyPlugin/plugin.xml b/cordova-lib/spec-plugman/plugins/DummyPlugin/plugin.xml
deleted file mode 100644
index 4733afb..0000000
--- a/cordova-lib/spec-plugman/plugins/DummyPlugin/plugin.xml
+++ /dev/null
@@ -1,203 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="com.phonegap.plugins.dummyplugin"
-    version="0.6.0">
-
-    <!-- new requirement: NO SPACES -->
-    <name>dummyplugin</name>
-    <!-- These are going to be required by plugman-registry -->
-    <description>my description</description>
-    <author>Jackson Badman</author> 
-    <keywords>dummy,plugin</keywords>
-    <license>BSD</license>
-    <!-- end plugman-registry requirements -->
-
-    <asset src="www/dummyplugin.js" target="dummyplugin.js" />
-    <asset src="www/dummyplugin" target="dummyplugin" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-        <access origin="s3.amazonaws.com" />
-    </config-file>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="AndroidManifest.xml" parent="/manifest/application">
-            <activity android:name="com.phonegap.plugins.dummyplugin.DummyPlugin"
-                      android:label="@string/app_name">
-                <intent-filter>
-                </intent-filter>
-            </activity>
-        </config-file>
-
-        <resource-file src="android-resource.xml" target="res/xml/dummy.xml" />
-
-        <!-- CDV < 2.0 -->
-        <config-file target="res/xml/plugins.xml" parent="/plugins">
-            <plugin name="DummyPlugin"
-                value="com.phonegap.plugins.dummyplugin.DummyPlugin"/>
-        </config-file>
-
-        <!-- CDV 2.0+ (for now) -->
-        <config-file target="res/xml/config.xml" parent="/cordova/plugins">
-            <plugin name="DummyPlugin"
-                value="com.phonegap.plugins.dummyplugin.DummyPlugin"/>
-        </config-file>
-
-        <source-file src="src/android/DummyPlugin.java"
-                target-dir="src/com/phonegap/plugins/dummyplugin" />
-        <lib-file src="src/android/TestLib.jar" />
-    </platform>
-    
-    <!-- amazon fireos -->
-    <platform name="amazon-fireos">
-        <config-file target="AndroidManifest.xml" parent="/manifest/application">
-            <activity android:name="com.phonegap.plugins.dummyplugin.DummyPlugin"
-                      android:label="@string/app_name">
-                <intent-filter>
-                </intent-filter>
-            </activity>
-        </config-file>
-
-        <!-- CDV < 2.0 -->
-        <config-file target="res/xml/plugins.xml" parent="/plugins">
-            <plugin name="DummyPlugin"
-                value="com.phonegap.plugins.dummyplugin.DummyPlugin"/>
-        </config-file>
-
-        <!-- CDV 2.0+ (for now) -->
-        <config-file target="res/xml/config.xml" parent="/cordova/plugins">
-            <plugin name="DummyPlugin"
-                value="com.phonegap.plugins.dummyplugin.DummyPlugin"/>
-        </config-file>
-
-        <source-file src="src/android/DummyPlugin.java"
-                target-dir="src/com/phonegap/plugins/dummyplugin" />
-        <lib-file src="src/android/TestLib.jar" />
-    </platform>
-
-    <!-- blackberry10 -->
-    <platform name="blackberry10">
-        <config-file target="www/config.xml" parent="/widget">
-            <feature id="dummyPlugin" required="true" version="1.0.0.0"/>
-        </config-file>
-
-        <source-file src="src/blackberry10/index.js"/>
-        <js-module src="www/dummyplugin.js" name="Dummy">
-            <clobbers target="dummy" />
-        </js-module>
-    </platform>
-
-        
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV < 2.4 -->
-        <plugins-plist key="com.phonegap.plugins.dummyplugin"
-            string="DummyPluginCommand" />
-        
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="/widget/plugins">
-            <plugin name="DummyPlugin"
-                value="DummyPluginCommand"/>
-        </config-file>
-
-        <resource-file src="src/ios/DummyPlugin.bundle" />
-
-        <header-file src="src/ios/DummyPluginCommand.h" />
-        <source-file src="src/ios/DummyPluginCommand.m"/>
-
-        <source-file src="src/ios/SourceWithFramework.m" framework="true" />
-
-        <header-file src="src/ios/TargetDirTest.h" target-dir="targetDir" />
-        <source-file src="src/ios/TargetDirTest.m" target-dir="targetDir" />
-
-        <!-- framework for testing (not actual dependency of DummyPlugin -->
-        <framework src="src/ios/libsqlite3.dylib" />
-        <framework src="src/ios/libsqlite3.dylib" weak="true" />
-        <framework src="src/ios/Custom.framework" custom="true" />
-    </platform>
-
-    <!-- wp7 -->
-    <platform name="wp7">
-        <config-file target="config.xml" parent="/*">
-            <feature id="dummyPlugin" required="true" version="1.0.0.0"/>
-        </config-file>
-
-        <source-file src="src/wp7/DummyPlugin.cs"/>
-        <js-module src="www/dummyplugin.js" name="Dummy">
-            <clobbers target="dummy" />
-        </js-module>
-    </platform>
-
-    <!-- wp8 -->
-    <platform name="wp8">
-        <config-file target="config.xml" parent="/*">
-            <feature id="dummyPlugin" required="true" version="1.0.0.0"/>
-        </config-file>
-
-        <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App" after="Tokens">
-            <Extensions />
-        </config-file>
-
-        <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Extensions" after="Extension">
-            <Extension ExtensionName="DummyExtension1" ConsumerID="{5B04B775-356B-4AA0-AAF8-6491FFEA5661}" TaskID="_default" ExtraFile="Extensions\\Extras.xml" />
-            <Extension ExtensionName="DummyExtension2" ConsumerID="{5B04B775-356B-4AA0-AAF8-6491FFEA5661}" TaskID="_default" ExtraFile="Extensions\\Extras.xml" />
-        </config-file>
-
-        <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Extensions" after="FileTypeAssociation;Extension">
-            <FileTypeAssociation TaskID="_default" Name="DummyFileType1" NavUriFragment="fileToken=%s">
-                <SupportedFileTypes>
-                    <FileType ContentType="application/dummy1">.dummy1</FileType>
-                </SupportedFileTypes>
-            </FileTypeAssociation>
-            <FileTypeAssociation TaskID="_default" Name="DummyFileType2" NavUriFragment="fileToken=%s">
-                <SupportedFileTypes>
-                    <FileType ContentType="application/dummy2">.dummy2</FileType>
-                </SupportedFileTypes>
-            </FileTypeAssociation>
-        </config-file>
-
-        <source-file src="src/wp8/DummyPlugin.cs"/>
-        <js-module src="www/dummyplugin.js" name="Dummy">
-            <clobbers target="dummy" />
-        </js-module>
-    </platform>
-
-		<!-- tizen -->
-		<platform name="tizen">
-			<source-file src="src/tizen/dummer.js"/>
-		</platform>
-
-    <!-- windows8 -->
-    <platform name="windows8">
-        <config-file target="config.xml" parent="/*">
-            <feature id="dummyPlugin" required="true" version="1.0.0.0"/>
-        </config-file>
-
-        <source-file src="src/windows8/dummer.js"/>
-        <js-module src="www/dummyplugin.js" name="Dummy">
-            <clobbers target="dummy" />
-        </js-module>
-    </platform>
-
-</plugin>


[15/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.xib
----------------------------------------------------------------------
diff --git a/spec/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.xib b/spec/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.xib
deleted file mode 100644
index cc8dd65..0000000
--- a/spec/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.xib
+++ /dev/null
@@ -1,875 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
-	<data>
-		<int key="IBDocument.SystemTarget">768</int>
-		<string key="IBDocument.SystemVersion">10K540</string>
-		<string key="IBDocument.InterfaceBuilderVersion">851</string>
-		<string key="IBDocument.AppKitVersion">1038.36</string>
-		<string key="IBDocument.HIToolboxVersion">461.00</string>
-		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
-			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-			<string key="NS.object.0">141</string>
-		</object>
-		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
-			<bool key="EncodedWithXMLCoder">YES</bool>
-		</object>
-		<object class="NSArray" key="IBDocument.PluginDependencies">
-			<bool key="EncodedWithXMLCoder">YES</bool>
-			<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-		</object>
-		<object class="NSMutableDictionary" key="IBDocument.Metadata">
-			<bool key="EncodedWithXMLCoder">YES</bool>
-			<object class="NSArray" key="dict.sortedKeys" id="0">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-			</object>
-			<object class="NSMutableArray" key="dict.values">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-			</object>
-		</object>
-		<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
-			<bool key="EncodedWithXMLCoder">YES</bool>
-			<object class="IBProxyObject" id="372490531">
-				<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
-				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-			</object>
-			<object class="IBProxyObject" id="975951072">
-				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
-				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-			</object>
-			<object class="IBUIView" id="191373211">
-				<nil key="NSNextResponder"/>
-				<int key="NSvFlags">292</int>
-				<object class="NSMutableArray" key="NSSubviews">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<object class="IBUIWebView" id="345761693">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">-2147483374</int>
-						<string key="NSFrameSize">{480, 229}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<reference key="NSNextKeyView" ref="471899933"/>
-						<object class="NSColor" key="IBUIBackgroundColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MCAwIDAAA</bytes>
-						</object>
-						<bool key="IBUIClipsSubviews">YES</bool>
-						<bool key="IBUIMultipleTouchEnabled">YES</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<int key="IBUIDataDetectorTypes">1</int>
-						<bool key="IBUIDetectsPhoneNumbers">YES</bool>
-					</object>
-					<object class="IBUIToolbar" id="471899933">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">266</int>
-						<string key="NSFrame">{{0, 256}, {480, 44}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<reference key="NSNextKeyView" ref="349240355"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<int key="IBUIBarStyle">1</int>
-						<object class="NSMutableArray" key="IBUIItems">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<object class="IBUIBarButtonItem" id="966737436">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<int key="IBUIStyle">1</int>
-								<reference key="IBUIToolbar" ref="471899933"/>
-								<int key="IBUISystemItemIdentifier">0</int>
-							</object>
-							<object class="IBUIBarButtonItem" id="312951844">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="471899933"/>
-								<int key="IBUISystemItemIdentifier">5</int>
-							</object>
-							<object class="IBUIBarButtonItem" id="615970053">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="471899933"/>
-							</object>
-							<object class="IBUIBarButtonItem" id="111711024">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="471899933"/>
-								<int key="IBUISystemItemIdentifier">5</int>
-							</object>
-							<object class="IBUIBarButtonItem" id="227415391">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<float key="IBUIWidth">32</float>
-								<reference key="IBUIToolbar" ref="471899933"/>
-							</object>
-							<object class="IBUIBarButtonItem" id="766205236">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="471899933"/>
-								<int key="IBUISystemItemIdentifier">5</int>
-							</object>
-							<object class="IBUIBarButtonItem" id="283287216">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<float key="IBUIWidth">32</float>
-								<reference key="IBUIToolbar" ref="471899933"/>
-							</object>
-							<object class="IBUIBarButtonItem" id="129413107">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="471899933"/>
-								<int key="IBUISystemItemIdentifier">5</int>
-							</object>
-							<object class="IBUIBarButtonItem" id="1046195837">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<float key="IBUIWidth">32</float>
-								<reference key="IBUIToolbar" ref="471899933"/>
-							</object>
-							<object class="IBUIBarButtonItem" id="667527307">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="471899933"/>
-								<int key="IBUISystemItemIdentifier">5</int>
-							</object>
-						</object>
-					</object>
-					<object class="IBUILabel" id="349240355">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">270</int>
-						<string key="NSFrame">{{5, 230}, {418, 21}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<reference key="NSNextKeyView" ref="89602979"/>
-						<object class="NSColor" key="IBUIBackgroundColor">
-							<int key="NSColorSpace">4</int>
-							<bytes key="NSWhite">MC42NjY2NjY2OSAwAA</bytes>
-						</object>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClipsSubviews">YES</bool>
-						<bool key="IBUIUserInteractionEnabled">NO</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<string key="IBUIText">Loading...</string>
-						<object class="NSFont" key="IBUIFont">
-							<string key="NSName">Helvetica</string>
-							<double key="NSSize">13</double>
-							<int key="NSfFlags">16</int>
-						</object>
-						<object class="NSColor" key="IBUITextColor">
-							<int key="NSColorSpace">3</int>
-							<bytes key="NSWhite">MQA</bytes>
-						</object>
-						<nil key="IBUIHighlightedColor"/>
-						<int key="IBUIBaselineAdjustment">1</int>
-						<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
-						<float key="IBUIMinimumFontSize">10</float>
-					</object>
-					<object class="IBUIActivityIndicatorView" id="89602979">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">-2147483383</int>
-						<string key="NSFrame">{{454, 231}, {20, 20}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<bool key="IBUIUserInteractionEnabled">NO</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-					</object>
-				</object>
-				<string key="NSFrame">{{0, 20}, {480, 300}}</string>
-				<reference key="NSNextKeyView" ref="345761693"/>
-				<object class="NSColor" key="IBUIBackgroundColor">
-					<int key="NSColorSpace">3</int>
-					<bytes key="NSWhite">MC41AA</bytes>
-					<object class="NSColorSpace" key="NSCustomColorSpace">
-						<int key="NSID">2</int>
-					</object>
-				</object>
-				<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
-				<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
-					<int key="interfaceOrientation">3</int>
-				</object>
-				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-			</object>
-		</object>
-		<object class="IBObjectContainer" key="IBDocument.Objects">
-			<object class="NSMutableArray" key="connectionRecords">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">webView</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="345761693"/>
-					</object>
-					<int key="connectionID">17</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">addressLabel</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="349240355"/>
-					</object>
-					<int key="connectionID">18</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">backBtn</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="227415391"/>
-					</object>
-					<int key="connectionID">19</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">fwdBtn</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="283287216"/>
-					</object>
-					<int key="connectionID">22</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">refreshBtn</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="615970053"/>
-					</object>
-					<int key="connectionID">23</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">onDoneButtonPress:</string>
-						<reference key="source" ref="966737436"/>
-						<reference key="destination" ref="372490531"/>
-					</object>
-					<int key="connectionID">26</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">reload</string>
-						<reference key="source" ref="615970053"/>
-						<reference key="destination" ref="345761693"/>
-					</object>
-					<int key="connectionID">27</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">goBack</string>
-						<reference key="source" ref="227415391"/>
-						<reference key="destination" ref="345761693"/>
-					</object>
-					<int key="connectionID">28</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">goForward</string>
-						<reference key="source" ref="283287216"/>
-						<reference key="destination" ref="345761693"/>
-					</object>
-					<int key="connectionID">29</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">onSafariButtonPress:</string>
-						<reference key="source" ref="1046195837"/>
-						<reference key="destination" ref="372490531"/>
-					</object>
-					<int key="connectionID">31</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">view</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="191373211"/>
-					</object>
-					<int key="connectionID">35</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">spinner</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="89602979"/>
-					</object>
-					<int key="connectionID">36</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">safariBtn</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="1046195837"/>
-					</object>
-					<int key="connectionID">40</int>
-				</object>
-			</object>
-			<object class="IBMutableOrderedSet" key="objectRecords">
-				<object class="NSArray" key="orderedObjects">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<object class="IBObjectRecord">
-						<int key="objectID">0</int>
-						<reference key="object" ref="0"/>
-						<reference key="children" ref="1000"/>
-						<nil key="parent"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">1</int>
-						<reference key="object" ref="191373211"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="471899933"/>
-							<reference ref="349240355"/>
-							<reference ref="89602979"/>
-							<reference ref="345761693"/>
-						</object>
-						<reference key="parent" ref="0"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">-1</int>
-						<reference key="object" ref="372490531"/>
-						<reference key="parent" ref="0"/>
-						<string key="objectName">File's Owner</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">-2</int>
-						<reference key="object" ref="975951072"/>
-						<reference key="parent" ref="0"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">4</int>
-						<reference key="object" ref="345761693"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">6</int>
-						<reference key="object" ref="471899933"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="966737436"/>
-							<reference ref="615970053"/>
-							<reference ref="227415391"/>
-							<reference ref="283287216"/>
-							<reference ref="1046195837"/>
-							<reference ref="111711024"/>
-							<reference ref="129413107"/>
-							<reference ref="312951844"/>
-							<reference ref="667527307"/>
-							<reference ref="766205236"/>
-						</object>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">7</int>
-						<reference key="object" ref="966737436"/>
-						<reference key="parent" ref="471899933"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">8</int>
-						<reference key="object" ref="615970053"/>
-						<reference key="parent" ref="471899933"/>
-						<string key="objectName">Bar Button Item (Reload)</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">9</int>
-						<reference key="object" ref="227415391"/>
-						<reference key="parent" ref="471899933"/>
-						<string key="objectName">Bar Button Item (Go Back)</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">10</int>
-						<reference key="object" ref="283287216"/>
-						<reference key="parent" ref="471899933"/>
-						<string key="objectName">Bar Button Item (Go Forward)</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">11</int>
-						<reference key="object" ref="1046195837"/>
-						<reference key="parent" ref="471899933"/>
-						<string key="objectName">Bar Button Item (Safari)</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">13</int>
-						<reference key="object" ref="349240355"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">14</int>
-						<reference key="object" ref="111711024"/>
-						<reference key="parent" ref="471899933"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">15</int>
-						<reference key="object" ref="129413107"/>
-						<reference key="parent" ref="471899933"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">32</int>
-						<reference key="object" ref="89602979"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">37</int>
-						<reference key="object" ref="312951844"/>
-						<reference key="parent" ref="471899933"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">38</int>
-						<reference key="object" ref="667527307"/>
-						<reference key="parent" ref="471899933"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">39</int>
-						<reference key="object" ref="766205236"/>
-						<reference key="parent" ref="471899933"/>
-					</object>
-				</object>
-			</object>
-			<object class="NSMutableDictionary" key="flattenedProperties">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="NSArray" key="dict.sortedKeys">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<string>-1.CustomClassName</string>
-					<string>-2.CustomClassName</string>
-					<string>1.IBEditorWindowLastContentRect</string>
-					<string>1.IBPluginDependency</string>
-					<string>10.IBPluginDependency</string>
-					<string>11.IBPluginDependency</string>
-					<string>13.IBPluginDependency</string>
-					<string>13.IBViewBoundsToFrameTransform</string>
-					<string>14.IBPluginDependency</string>
-					<string>15.IBPluginDependency</string>
-					<string>32.IBPluginDependency</string>
-					<string>32.IBViewBoundsToFrameTransform</string>
-					<string>37.IBPluginDependency</string>
-					<string>38.IBPluginDependency</string>
-					<string>39.IBPluginDependency</string>
-					<string>4.IBPluginDependency</string>
-					<string>4.IBViewBoundsToFrameTransform</string>
-					<string>6.IBPluginDependency</string>
-					<string>6.IBViewBoundsToFrameTransform</string>
-					<string>7.IBPluginDependency</string>
-					<string>8.IBPluginDependency</string>
-					<string>9.IBPluginDependency</string>
-				</object>
-				<object class="NSMutableArray" key="dict.values">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<string>ChildBrowserViewController</string>
-					<string>UIResponder</string>
-					<string>{{250, 643}, {480, 320}}</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<object class="NSAffineTransform">
-						<bytes key="NSTransformStruct">P4AAAL+AAABCoAAAwygAAA</bytes>
-					</object>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<object class="NSAffineTransform">
-						<bytes key="NSTransformStruct">P4AAAL+AAABD5gAAw3kAAA</bytes>
-					</object>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<object class="NSAffineTransform">
-						<bytes key="NSTransformStruct">P4AAAL+AAABB8AAAwwUAAA</bytes>
-					</object>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<object class="NSAffineTransform">
-						<bytes key="NSTransformStruct">P4AAAL+AAAAAAAAAw10AAA</bytes>
-					</object>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-				</object>
-			</object>
-			<object class="NSMutableDictionary" key="unlocalizedProperties">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<reference key="dict.sortedKeys" ref="0"/>
-				<object class="NSMutableArray" key="dict.values">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-				</object>
-			</object>
-			<nil key="activeLocalization"/>
-			<object class="NSMutableDictionary" key="localizations">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<reference key="dict.sortedKeys" ref="0"/>
-				<object class="NSMutableArray" key="dict.values">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-				</object>
-			</object>
-			<nil key="sourceID"/>
-			<int key="maxID">40</int>
-		</object>
-		<object class="IBClassDescriber" key="IBDocument.Classes">
-			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="IBPartialClassDescription">
-					<string key="className">ChildBrowserViewController</string>
-					<string key="superclassName">UIViewController</string>
-					<object class="NSMutableDictionary" key="actions">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>onDoneButtonPress:</string>
-							<string>onSafariButtonPress:</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>id</string>
-							<string>id</string>
-						</object>
-					</object>
-					<object class="NSMutableDictionary" key="actionInfosByName">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>onDoneButtonPress:</string>
-							<string>onSafariButtonPress:</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<object class="IBActionInfo">
-								<string key="name">onDoneButtonPress:</string>
-								<string key="candidateClassName">id</string>
-							</object>
-							<object class="IBActionInfo">
-								<string key="name">onSafariButtonPress:</string>
-								<string key="candidateClassName">id</string>
-							</object>
-						</object>
-					</object>
-					<object class="NSMutableDictionary" key="outlets">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>addressLabel</string>
-							<string>backBtn</string>
-							<string>closeBtn</string>
-							<string>delegate</string>
-							<string>fwdBtn</string>
-							<string>refreshBtn</string>
-							<string>safariBtn</string>
-							<string>spinner</string>
-							<string>webView</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>UILabel</string>
-							<string>UIBarButtonItem</string>
-							<string>UIBarButtonItem</string>
-							<string>id</string>
-							<string>UIBarButtonItem</string>
-							<string>UIBarButtonItem</string>
-							<string>UIBarButtonItem</string>
-							<string>UIActivityIndicatorView</string>
-							<string>UIWebView</string>
-						</object>
-					</object>
-					<object class="NSMutableDictionary" key="toOneOutletInfosByName">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>addressLabel</string>
-							<string>backBtn</string>
-							<string>closeBtn</string>
-							<string>delegate</string>
-							<string>fwdBtn</string>
-							<string>refreshBtn</string>
-							<string>safariBtn</string>
-							<string>spinner</string>
-							<string>webView</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<object class="IBToOneOutletInfo">
-								<string key="name">addressLabel</string>
-								<string key="candidateClassName">UILabel</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">backBtn</string>
-								<string key="candidateClassName">UIBarButtonItem</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">closeBtn</string>
-								<string key="candidateClassName">UIBarButtonItem</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">delegate</string>
-								<string key="candidateClassName">id</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">fwdBtn</string>
-								<string key="candidateClassName">UIBarButtonItem</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">refreshBtn</string>
-								<string key="candidateClassName">UIBarButtonItem</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">safariBtn</string>
-								<string key="candidateClassName">UIBarButtonItem</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">spinner</string>
-								<string key="candidateClassName">UIActivityIndicatorView</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">webView</string>
-								<string key="candidateClassName">UIWebView</string>
-							</object>
-						</object>
-					</object>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">Plugins/ChildBrowser/ChildBrowserViewController.h</string>
-					</object>
-				</object>
-			</object>
-			<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSError.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">QuartzCore.framework/Headers/CAAnimation.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">QuartzCore.framework/Headers/CALayer.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier" id="485348283">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIActivityIndicatorView</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIActivityIndicatorView.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIBarButtonItem</string>
-					<string key="superclassName">UIBarItem</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIBarButtonItem.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIBarItem</string>
-					<string key="superclassName">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIBarItem.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UILabel</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UILabel.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIResponder</string>
-					<string key="superclassName">NSObject</string>
-					<reference key="sourceIdentifier" ref="485348283"/>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UISearchBar</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UISearchDisplayController</string>
-					<string key="superclassName">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIToolbar</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIToolbar.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIView</string>
-					<string key="superclassName">UIResponder</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIViewController</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">MediaPlayer.framework/Headers/MPMoviePlayerViewController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIViewController</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIViewController</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIViewController</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIViewController</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIViewController</string>
-					<string key="superclassName">UIResponder</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIWebView</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIWebView.h</string>
-					</object>
-				</object>
-			</object>
-		</object>
-		<int key="IBDocument.localizationMode">0</int>
-		<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
-		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
-			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
-			<integer value="768" key="NS.object.0"/>
-		</object>
-		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
-			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
-			<integer value="1056" key="NS.object.0"/>
-		</object>
-		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
-			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
-			<integer value="3000" key="NS.object.0"/>
-		</object>
-		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
-		<nil key="IBDocument.LastKnownRelativeProjectPath"/>
-		<int key="IBDocument.defaultPropertyAccessControl">3</int>
-		<string key="IBCocoaTouchPluginVersion">141</string>
-	</data>
-</archive>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/.gitignore
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/.gitignore b/spec/plugins/cordova.echo/.gitignore
deleted file mode 100644
index e43b0f9..0000000
--- a/spec/plugins/cordova.echo/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-.DS_Store

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/plugin.xml b/spec/plugins/cordova.echo/plugin.xml
deleted file mode 100644
index a9145e7..0000000
--- a/spec/plugins/cordova.echo/plugin.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    id="com.cordova.echo"
-    version="1.0.0">
-
-    <engines>
-        <engine name="cordova" version=">=2.3.0" />
-    </engines>
-
-    <name>cordova echo</name>
-
-    <js-module src="www/client.js">
-        <clobbers target="cordova.echo"/>
-    </js-module>
-
-    <platform name="blackberry10">
-        <source-file src="src/blackberry10/index.js" target-dir="cordova.echo"/>
-        <lib-file src="src/blackberry10/native/device/echoJnext.so" arch="device"/>
-        <lib-file src="src/blackberry10/native/simulator/echoJnext.so" arch="simulator"/>
-        <config-file target="config.xml" parent="/widget">
-            <feature id="cordova.echo" required="true" version="1.0.0.0"/>
-        </config-file>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/src/blackberry10/index.js
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/src/blackberry10/index.js b/spec/plugins/cordova.echo/src/blackberry10/index.js
deleted file mode 100644
index 0759a20..0000000
--- a/spec/plugins/cordova.echo/src/blackberry10/index.js
+++ /dev/null
@@ -1,85 +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 echoJNext,
-    _event = require("../../lib/event"),
-    winCallback = null,
-    failCallback = null;
-    
-module.exports = {   
-    doEcho: function (success, fail, args) {
-        var invokeData = { "message" : JSON.parse(decodeURIComponent(args.message)) };
-        try {
-            success(echoJNext.getEchoJNext(invokeData));
-        } catch (e) {
-            fail(-1, e);
-        }
-    }
-};
-
-///////////////////////////////////////////////////////////////////
-// JavaScript wrapper for JNEXT plugin
-///////////////////////////////////////////////////////////////////
-
-JNEXT.EchoJNext = function ()
-{   
-    var _self = this;
-
-    _self.getEchoJNext = function (args) {
-        return JNEXT.invoke(_self._id, "doEcho " + JSON.stringify(args));
-    };
-
-    _self.getId = function () {
-        return _self._id;
-    };
-
-    _self.init = function () {
-        if (!JNEXT.require("echoJnext")) {
-            return false;
-        }
-
-        _self._id = JNEXT.createObject("echoJnext.Echo");
-
-        if (!_self._id || _self._id === "") {
-            return false;
-        }
-
-        JNEXT.registerEvents(_self);
-    };
-
-    _self.onEvent = function (strData) {
-        var arData = strData.split(" "),
-            strEventId = arData[0],
-            args = arData[1],
-            info = {};
-            
-        if (strEventId === "cordova.echo.callback") {
-            _event.trigger("echoCallback", args);
-        }
-                  
-    };
-    
-    _self._id = "";
-    
-    _self.init();
-};
-
-echoJNext = new JNEXT.EchoJNext();

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/src/blackberry10/native/device/echoJnext.so
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/src/blackberry10/native/device/echoJnext.so b/spec/plugins/cordova.echo/src/blackberry10/native/device/echoJnext.so
deleted file mode 100755
index 169714a..0000000
Binary files a/spec/plugins/cordova.echo/src/blackberry10/native/device/echoJnext.so and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/src/blackberry10/native/public/json/autolink.h
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/src/blackberry10/native/public/json/autolink.h b/spec/plugins/cordova.echo/src/blackberry10/native/public/json/autolink.h
deleted file mode 100644
index 37c9258..0000000
--- a/spec/plugins/cordova.echo/src/blackberry10/native/public/json/autolink.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef JSON_AUTOLINK_H_INCLUDED
-# define JSON_AUTOLINK_H_INCLUDED
-
-# include "config.h"
-
-# ifdef JSON_IN_CPPTL
-#  include <cpptl/cpptl_autolink.h>
-# endif
-
-# if !defined(JSON_NO_AUTOLINK)  &&  !defined(JSON_DLL_BUILD)  &&  !defined(JSON_IN_CPPTL)
-#  define CPPTL_AUTOLINK_NAME "json"
-#  undef CPPTL_AUTOLINK_DLL
-#  ifdef JSON_DLL
-#   define CPPTL_AUTOLINK_DLL
-#  endif
-#  include "autolink.h"
-# endif
-
-#endif // JSON_AUTOLINK_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/src/blackberry10/native/public/json/config.h
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/src/blackberry10/native/public/json/config.h b/spec/plugins/cordova.echo/src/blackberry10/native/public/json/config.h
deleted file mode 100644
index 5d334cb..0000000
--- a/spec/plugins/cordova.echo/src/blackberry10/native/public/json/config.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef JSON_CONFIG_H_INCLUDED
-# define JSON_CONFIG_H_INCLUDED
-
-/// If defined, indicates that json library is embedded in CppTL library.
-//# define JSON_IN_CPPTL 1
-
-/// If defined, indicates that json may leverage CppTL library
-//#  define JSON_USE_CPPTL 1
-/// If defined, indicates that cpptl vector based map should be used instead of std::map
-/// as Value container.
-//#  define JSON_USE_CPPTL_SMALLMAP 1
-/// If defined, indicates that Json specific container should be used
-/// (hash table & simple deque container with customizable allocator).
-/// THIS FEATURE IS STILL EXPERIMENTAL!
-//#  define JSON_VALUE_USE_INTERNAL_MAP 1
-/// Force usage of standard new/malloc based allocator instead of memory pool based allocator.
-/// The memory pools allocator used optimization (initializing Value and ValueInternalLink
-/// as if it was a POD) that may cause some validation tool to report errors.
-/// Only has effects if JSON_VALUE_USE_INTERNAL_MAP is defined.
-//#  define JSON_USE_SIMPLE_INTERNAL_ALLOCATOR 1
-
-/// If defined, indicates that Json use exception to report invalid type manipulation
-/// instead of C assert macro.
-# define JSON_USE_EXCEPTION 1
-
-# ifdef JSON_IN_CPPTL
-#  include <cpptl/config.h>
-#  ifndef JSON_USE_CPPTL
-#   define JSON_USE_CPPTL 1
-#  endif
-# endif
-
-# ifdef JSON_IN_CPPTL
-#  define JSON_API CPPTL_API
-# elif defined(JSON_DLL_BUILD)
-#  define JSON_API __declspec(dllexport)
-# elif defined(JSON_DLL)
-#  define JSON_API __declspec(dllimport)
-# else
-#  define JSON_API
-# endif
-
-#endif // JSON_CONFIG_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/src/blackberry10/native/public/json/features.h
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/src/blackberry10/native/public/json/features.h b/spec/plugins/cordova.echo/src/blackberry10/native/public/json/features.h
deleted file mode 100644
index 5a9adec..0000000
--- a/spec/plugins/cordova.echo/src/blackberry10/native/public/json/features.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef CPPTL_JSON_FEATURES_H_INCLUDED
-# define CPPTL_JSON_FEATURES_H_INCLUDED
-
-# include "forwards.h"
-
-namespace Json {
-
-   /** \brief Configuration passed to reader and writer.
-    * This configuration object can be used to force the Reader or Writer
-    * to behave in a standard conforming way.
-    */
-   class JSON_API Features
-   {
-   public:
-      /** \brief A configuration that allows all features and assumes all strings are UTF-8.
-       * - C & C++ comments are allowed
-       * - Root object can be any JSON value
-       * - Assumes Value strings are encoded in UTF-8
-       */
-      static Features all();
-
-      /** \brief A configuration that is strictly compatible with the JSON specification.
-       * - Comments are forbidden.
-       * - Root object must be either an array or an object value.
-       * - Assumes Value strings are encoded in UTF-8
-       */
-      static Features strictMode();
-
-      /** \brief Initialize the configuration like JsonConfig::allFeatures;
-       */
-      Features();
-
-      /// \c true if comments are allowed. Default: \c true.
-      bool allowComments_;
-
-      /// \c true if root must be either an array or an object value. Default: \c false.
-      bool strictRoot_;
-   };
-
-} // namespace Json
-
-#endif // CPPTL_JSON_FEATURES_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/src/blackberry10/native/public/json/forwards.h
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/src/blackberry10/native/public/json/forwards.h b/spec/plugins/cordova.echo/src/blackberry10/native/public/json/forwards.h
deleted file mode 100644
index d0ce830..0000000
--- a/spec/plugins/cordova.echo/src/blackberry10/native/public/json/forwards.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef JSON_FORWARDS_H_INCLUDED
-# define JSON_FORWARDS_H_INCLUDED
-
-# include "config.h"
-
-namespace Json {
-
-   // writer.h
-   class FastWriter;
-   class StyledWriter;
-
-   // reader.h
-   class Reader;
-
-   // features.h
-   class Features;
-
-   // value.h
-   typedef int Int;
-   typedef unsigned int UInt;
-   class StaticString;
-   class Path;
-   class PathArgument;
-   class Value;
-   class ValueIteratorBase;
-   class ValueIterator;
-   class ValueConstIterator;
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
-   class ValueAllocator;
-   class ValueMapAllocator;
-   class ValueInternalLink;
-   class ValueInternalArray;
-   class ValueInternalMap;
-#endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
-
-} // namespace Json
-
-
-#endif // JSON_FORWARDS_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/src/blackberry10/native/public/json/json.h
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/src/blackberry10/native/public/json/json.h b/spec/plugins/cordova.echo/src/blackberry10/native/public/json/json.h
deleted file mode 100644
index c71ed65..0000000
--- a/spec/plugins/cordova.echo/src/blackberry10/native/public/json/json.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef JSON_JSON_H_INCLUDED
-# define JSON_JSON_H_INCLUDED
-
-# include "autolink.h"
-# include "value.h"
-# include "reader.h"
-# include "writer.h"
-# include "features.h"
-
-#endif // JSON_JSON_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/src/blackberry10/native/public/json/reader.h
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/src/blackberry10/native/public/json/reader.h b/spec/plugins/cordova.echo/src/blackberry10/native/public/json/reader.h
deleted file mode 100644
index ee1d6a2..0000000
--- a/spec/plugins/cordova.echo/src/blackberry10/native/public/json/reader.h
+++ /dev/null
@@ -1,196 +0,0 @@
-#ifndef CPPTL_JSON_READER_H_INCLUDED
-# define CPPTL_JSON_READER_H_INCLUDED
-
-# include "features.h"
-# include "value.h"
-# include <deque>
-# include <stack>
-# include <string>
-# include <iostream>
-
-namespace Json {
-
-   /** \brief Unserialize a <a HREF="http://www.json.org">JSON</a> document into a Value.
-    *
-    */
-   class JSON_API Reader
-   {
-   public:
-      typedef char Char;
-      typedef const Char *Location;
-
-      /** \brief Constructs a Reader allowing all features
-       * for parsing.
-       */
-      Reader();
-
-      /** \brief Constructs a Reader allowing the specified feature set
-       * for parsing.
-       */
-      Reader( const Features &features );
-
-      /** \brief Read a Value from a <a HREF="http://www.json.org">JSON</a> document.
-       * \param document UTF-8 encoded string containing the document to read.
-       * \param root [out] Contains the root value of the document if it was
-       *             successfully parsed.
-       * \param collectComments \c true to collect comment and allow writing them back during
-       *                        serialization, \c false to discard comments.
-       *                        This parameter is ignored if Features::allowComments_
-       *                        is \c false.
-       * \return \c true if the document was successfully parsed, \c false if an error occurred.
-       */
-      bool parse( const std::string &document, 
-                  Value &root,
-                  bool collectComments = true );
-
-      /** \brief Read a Value from a <a HREF="http://www.json.org">JSON</a> document.
-       * \param document UTF-8 encoded string containing the document to read.
-       * \param root [out] Contains the root value of the document if it was
-       *             successfully parsed.
-       * \param collectComments \c true to collect comment and allow writing them back during
-       *                        serialization, \c false to discard comments.
-       *                        This parameter is ignored if Features::allowComments_
-       *                        is \c false.
-       * \return \c true if the document was successfully parsed, \c false if an error occurred.
-       */
-      bool parse( const char *beginDoc, const char *endDoc, 
-                  Value &root,
-                  bool collectComments = true );
-
-      /// \brief Parse from input stream.
-      /// \see Json::operator>>(std::istream&, Json::Value&).
-      bool parse( std::istream &is,
-                  Value &root,
-                  bool collectComments = true );
-
-      /** \brief Returns a user friendly string that list errors in the parsed document.
-       * \return Formatted error message with the list of errors with their location in 
-       *         the parsed document. An empty string is returned if no error occurred
-       *         during parsing.
-       */
-      std::string getFormatedErrorMessages() const;
-
-   private:
-      enum TokenType
-      {
-         tokenEndOfStream = 0,
-         tokenObjectBegin,
-         tokenObjectEnd,
-         tokenArrayBegin,
-         tokenArrayEnd,
-         tokenString,
-         tokenNumber,
-         tokenTrue,
-         tokenFalse,
-         tokenNull,
-         tokenArraySeparator,
-         tokenMemberSeparator,
-         tokenComment,
-         tokenError
-      };
-
-      class Token
-      {
-      public:
-         TokenType type_;
-         Location start_;
-         Location end_;
-      };
-
-      class ErrorInfo
-      {
-      public:
-         Token token_;
-         std::string message_;
-         Location extra_;
-      };
-
-      typedef std::deque<ErrorInfo> Errors;
-
-      bool expectToken( TokenType type, Token &token, const char *message );
-      bool readToken( Token &token );
-      void skipSpaces();
-      bool match( Location pattern, 
-                  int patternLength );
-      bool readComment();
-      bool readCStyleComment();
-      bool readCppStyleComment();
-      bool readString();
-      void readNumber();
-      bool readValue();
-      bool readObject( Token &token );
-      bool readArray( Token &token );
-      bool decodeNumber( Token &token );
-      bool decodeString( Token &token );
-      bool decodeString( Token &token, std::string &decoded );
-      bool decodeDouble( Token &token );
-      bool decodeUnicodeCodePoint( Token &token, 
-                                   Location &current, 
-                                   Location end, 
-                                   unsigned int &unicode );
-      bool decodeUnicodeEscapeSequence( Token &token, 
-                                        Location &current, 
-                                        Location end, 
-                                        unsigned int &unicode );
-      bool addError( const std::string &message, 
-                     Token &token,
-                     Location extra = 0 );
-      bool recoverFromError( TokenType skipUntilToken );
-      bool addErrorAndRecover( const std::string &message, 
-                               Token &token,
-                               TokenType skipUntilToken );
-      void skipUntilSpace();
-      Value &currentValue();
-      Char getNextChar();
-      void getLocationLineAndColumn( Location location,
-                                     int &line,
-                                     int &column ) const;
-      std::string getLocationLineAndColumn( Location location ) const;
-      void addComment( Location begin, 
-                       Location end, 
-                       CommentPlacement placement );
-      void skipCommentTokens( Token &token );
-   
-      typedef std::stack<Value *> Nodes;
-      Nodes nodes_;
-      Errors errors_;
-      std::string document_;
-      Location begin_;
-      Location end_;
-      Location current_;
-      Location lastValueEnd_;
-      Value *lastValue_;
-      std::string commentsBefore_;
-      Features features_;
-      bool collectComments_;
-   };
-
-   /** \brief Read from 'sin' into 'root'.
-
-    Always keep comments from the input JSON.
-
-    This can be used to read a file into a particular sub-object.
-    For example:
-    \code
-    Json::Value root;
-    cin >> root["dir"]["file"];
-    cout << root;
-    \endcode
-    Result:
-    \verbatim
-    {
-	"dir": {
-	    "file": {
-		// The input stream JSON would be nested here.
-	    }
-	}
-    }
-    \endverbatim
-    \throw std::exception on parse error.
-    \see Json::operator<<()
-   */
-   std::istream& operator>>( std::istream&, Value& );
-
-} // namespace Json
-
-#endif // CPPTL_JSON_READER_H_INCLUDED


[61/70] Remove all cordova-lib files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.xib
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.xib b/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.xib
deleted file mode 100644
index cc8dd65..0000000
--- a/cordova-lib/spec-plugman/plugins/WeblessPlugin/src/ios/WeblessPluginViewController.xib
+++ /dev/null
@@ -1,875 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
-	<data>
-		<int key="IBDocument.SystemTarget">768</int>
-		<string key="IBDocument.SystemVersion">10K540</string>
-		<string key="IBDocument.InterfaceBuilderVersion">851</string>
-		<string key="IBDocument.AppKitVersion">1038.36</string>
-		<string key="IBDocument.HIToolboxVersion">461.00</string>
-		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
-			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-			<string key="NS.object.0">141</string>
-		</object>
-		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
-			<bool key="EncodedWithXMLCoder">YES</bool>
-		</object>
-		<object class="NSArray" key="IBDocument.PluginDependencies">
-			<bool key="EncodedWithXMLCoder">YES</bool>
-			<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-		</object>
-		<object class="NSMutableDictionary" key="IBDocument.Metadata">
-			<bool key="EncodedWithXMLCoder">YES</bool>
-			<object class="NSArray" key="dict.sortedKeys" id="0">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-			</object>
-			<object class="NSMutableArray" key="dict.values">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-			</object>
-		</object>
-		<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
-			<bool key="EncodedWithXMLCoder">YES</bool>
-			<object class="IBProxyObject" id="372490531">
-				<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
-				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-			</object>
-			<object class="IBProxyObject" id="975951072">
-				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
-				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-			</object>
-			<object class="IBUIView" id="191373211">
-				<nil key="NSNextResponder"/>
-				<int key="NSvFlags">292</int>
-				<object class="NSMutableArray" key="NSSubviews">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<object class="IBUIWebView" id="345761693">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">-2147483374</int>
-						<string key="NSFrameSize">{480, 229}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<reference key="NSNextKeyView" ref="471899933"/>
-						<object class="NSColor" key="IBUIBackgroundColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MCAwIDAAA</bytes>
-						</object>
-						<bool key="IBUIClipsSubviews">YES</bool>
-						<bool key="IBUIMultipleTouchEnabled">YES</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<int key="IBUIDataDetectorTypes">1</int>
-						<bool key="IBUIDetectsPhoneNumbers">YES</bool>
-					</object>
-					<object class="IBUIToolbar" id="471899933">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">266</int>
-						<string key="NSFrame">{{0, 256}, {480, 44}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<reference key="NSNextKeyView" ref="349240355"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<int key="IBUIBarStyle">1</int>
-						<object class="NSMutableArray" key="IBUIItems">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<object class="IBUIBarButtonItem" id="966737436">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<int key="IBUIStyle">1</int>
-								<reference key="IBUIToolbar" ref="471899933"/>
-								<int key="IBUISystemItemIdentifier">0</int>
-							</object>
-							<object class="IBUIBarButtonItem" id="312951844">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="471899933"/>
-								<int key="IBUISystemItemIdentifier">5</int>
-							</object>
-							<object class="IBUIBarButtonItem" id="615970053">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="471899933"/>
-							</object>
-							<object class="IBUIBarButtonItem" id="111711024">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="471899933"/>
-								<int key="IBUISystemItemIdentifier">5</int>
-							</object>
-							<object class="IBUIBarButtonItem" id="227415391">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<float key="IBUIWidth">32</float>
-								<reference key="IBUIToolbar" ref="471899933"/>
-							</object>
-							<object class="IBUIBarButtonItem" id="766205236">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="471899933"/>
-								<int key="IBUISystemItemIdentifier">5</int>
-							</object>
-							<object class="IBUIBarButtonItem" id="283287216">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<float key="IBUIWidth">32</float>
-								<reference key="IBUIToolbar" ref="471899933"/>
-							</object>
-							<object class="IBUIBarButtonItem" id="129413107">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="471899933"/>
-								<int key="IBUISystemItemIdentifier">5</int>
-							</object>
-							<object class="IBUIBarButtonItem" id="1046195837">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<float key="IBUIWidth">32</float>
-								<reference key="IBUIToolbar" ref="471899933"/>
-							</object>
-							<object class="IBUIBarButtonItem" id="667527307">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="471899933"/>
-								<int key="IBUISystemItemIdentifier">5</int>
-							</object>
-						</object>
-					</object>
-					<object class="IBUILabel" id="349240355">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">270</int>
-						<string key="NSFrame">{{5, 230}, {418, 21}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<reference key="NSNextKeyView" ref="89602979"/>
-						<object class="NSColor" key="IBUIBackgroundColor">
-							<int key="NSColorSpace">4</int>
-							<bytes key="NSWhite">MC42NjY2NjY2OSAwAA</bytes>
-						</object>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClipsSubviews">YES</bool>
-						<bool key="IBUIUserInteractionEnabled">NO</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<string key="IBUIText">Loading...</string>
-						<object class="NSFont" key="IBUIFont">
-							<string key="NSName">Helvetica</string>
-							<double key="NSSize">13</double>
-							<int key="NSfFlags">16</int>
-						</object>
-						<object class="NSColor" key="IBUITextColor">
-							<int key="NSColorSpace">3</int>
-							<bytes key="NSWhite">MQA</bytes>
-						</object>
-						<nil key="IBUIHighlightedColor"/>
-						<int key="IBUIBaselineAdjustment">1</int>
-						<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
-						<float key="IBUIMinimumFontSize">10</float>
-					</object>
-					<object class="IBUIActivityIndicatorView" id="89602979">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">-2147483383</int>
-						<string key="NSFrame">{{454, 231}, {20, 20}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<bool key="IBUIUserInteractionEnabled">NO</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-					</object>
-				</object>
-				<string key="NSFrame">{{0, 20}, {480, 300}}</string>
-				<reference key="NSNextKeyView" ref="345761693"/>
-				<object class="NSColor" key="IBUIBackgroundColor">
-					<int key="NSColorSpace">3</int>
-					<bytes key="NSWhite">MC41AA</bytes>
-					<object class="NSColorSpace" key="NSCustomColorSpace">
-						<int key="NSID">2</int>
-					</object>
-				</object>
-				<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
-				<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
-					<int key="interfaceOrientation">3</int>
-				</object>
-				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-			</object>
-		</object>
-		<object class="IBObjectContainer" key="IBDocument.Objects">
-			<object class="NSMutableArray" key="connectionRecords">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">webView</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="345761693"/>
-					</object>
-					<int key="connectionID">17</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">addressLabel</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="349240355"/>
-					</object>
-					<int key="connectionID">18</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">backBtn</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="227415391"/>
-					</object>
-					<int key="connectionID">19</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">fwdBtn</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="283287216"/>
-					</object>
-					<int key="connectionID">22</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">refreshBtn</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="615970053"/>
-					</object>
-					<int key="connectionID">23</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">onDoneButtonPress:</string>
-						<reference key="source" ref="966737436"/>
-						<reference key="destination" ref="372490531"/>
-					</object>
-					<int key="connectionID">26</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">reload</string>
-						<reference key="source" ref="615970053"/>
-						<reference key="destination" ref="345761693"/>
-					</object>
-					<int key="connectionID">27</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">goBack</string>
-						<reference key="source" ref="227415391"/>
-						<reference key="destination" ref="345761693"/>
-					</object>
-					<int key="connectionID">28</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">goForward</string>
-						<reference key="source" ref="283287216"/>
-						<reference key="destination" ref="345761693"/>
-					</object>
-					<int key="connectionID">29</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">onSafariButtonPress:</string>
-						<reference key="source" ref="1046195837"/>
-						<reference key="destination" ref="372490531"/>
-					</object>
-					<int key="connectionID">31</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">view</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="191373211"/>
-					</object>
-					<int key="connectionID">35</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">spinner</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="89602979"/>
-					</object>
-					<int key="connectionID">36</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">safariBtn</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="1046195837"/>
-					</object>
-					<int key="connectionID">40</int>
-				</object>
-			</object>
-			<object class="IBMutableOrderedSet" key="objectRecords">
-				<object class="NSArray" key="orderedObjects">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<object class="IBObjectRecord">
-						<int key="objectID">0</int>
-						<reference key="object" ref="0"/>
-						<reference key="children" ref="1000"/>
-						<nil key="parent"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">1</int>
-						<reference key="object" ref="191373211"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="471899933"/>
-							<reference ref="349240355"/>
-							<reference ref="89602979"/>
-							<reference ref="345761693"/>
-						</object>
-						<reference key="parent" ref="0"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">-1</int>
-						<reference key="object" ref="372490531"/>
-						<reference key="parent" ref="0"/>
-						<string key="objectName">File's Owner</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">-2</int>
-						<reference key="object" ref="975951072"/>
-						<reference key="parent" ref="0"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">4</int>
-						<reference key="object" ref="345761693"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">6</int>
-						<reference key="object" ref="471899933"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="966737436"/>
-							<reference ref="615970053"/>
-							<reference ref="227415391"/>
-							<reference ref="283287216"/>
-							<reference ref="1046195837"/>
-							<reference ref="111711024"/>
-							<reference ref="129413107"/>
-							<reference ref="312951844"/>
-							<reference ref="667527307"/>
-							<reference ref="766205236"/>
-						</object>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">7</int>
-						<reference key="object" ref="966737436"/>
-						<reference key="parent" ref="471899933"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">8</int>
-						<reference key="object" ref="615970053"/>
-						<reference key="parent" ref="471899933"/>
-						<string key="objectName">Bar Button Item (Reload)</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">9</int>
-						<reference key="object" ref="227415391"/>
-						<reference key="parent" ref="471899933"/>
-						<string key="objectName">Bar Button Item (Go Back)</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">10</int>
-						<reference key="object" ref="283287216"/>
-						<reference key="parent" ref="471899933"/>
-						<string key="objectName">Bar Button Item (Go Forward)</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">11</int>
-						<reference key="object" ref="1046195837"/>
-						<reference key="parent" ref="471899933"/>
-						<string key="objectName">Bar Button Item (Safari)</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">13</int>
-						<reference key="object" ref="349240355"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">14</int>
-						<reference key="object" ref="111711024"/>
-						<reference key="parent" ref="471899933"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">15</int>
-						<reference key="object" ref="129413107"/>
-						<reference key="parent" ref="471899933"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">32</int>
-						<reference key="object" ref="89602979"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">37</int>
-						<reference key="object" ref="312951844"/>
-						<reference key="parent" ref="471899933"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">38</int>
-						<reference key="object" ref="667527307"/>
-						<reference key="parent" ref="471899933"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">39</int>
-						<reference key="object" ref="766205236"/>
-						<reference key="parent" ref="471899933"/>
-					</object>
-				</object>
-			</object>
-			<object class="NSMutableDictionary" key="flattenedProperties">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="NSArray" key="dict.sortedKeys">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<string>-1.CustomClassName</string>
-					<string>-2.CustomClassName</string>
-					<string>1.IBEditorWindowLastContentRect</string>
-					<string>1.IBPluginDependency</string>
-					<string>10.IBPluginDependency</string>
-					<string>11.IBPluginDependency</string>
-					<string>13.IBPluginDependency</string>
-					<string>13.IBViewBoundsToFrameTransform</string>
-					<string>14.IBPluginDependency</string>
-					<string>15.IBPluginDependency</string>
-					<string>32.IBPluginDependency</string>
-					<string>32.IBViewBoundsToFrameTransform</string>
-					<string>37.IBPluginDependency</string>
-					<string>38.IBPluginDependency</string>
-					<string>39.IBPluginDependency</string>
-					<string>4.IBPluginDependency</string>
-					<string>4.IBViewBoundsToFrameTransform</string>
-					<string>6.IBPluginDependency</string>
-					<string>6.IBViewBoundsToFrameTransform</string>
-					<string>7.IBPluginDependency</string>
-					<string>8.IBPluginDependency</string>
-					<string>9.IBPluginDependency</string>
-				</object>
-				<object class="NSMutableArray" key="dict.values">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<string>ChildBrowserViewController</string>
-					<string>UIResponder</string>
-					<string>{{250, 643}, {480, 320}}</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<object class="NSAffineTransform">
-						<bytes key="NSTransformStruct">P4AAAL+AAABCoAAAwygAAA</bytes>
-					</object>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<object class="NSAffineTransform">
-						<bytes key="NSTransformStruct">P4AAAL+AAABD5gAAw3kAAA</bytes>
-					</object>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<object class="NSAffineTransform">
-						<bytes key="NSTransformStruct">P4AAAL+AAABB8AAAwwUAAA</bytes>
-					</object>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<object class="NSAffineTransform">
-						<bytes key="NSTransformStruct">P4AAAL+AAAAAAAAAw10AAA</bytes>
-					</object>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-				</object>
-			</object>
-			<object class="NSMutableDictionary" key="unlocalizedProperties">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<reference key="dict.sortedKeys" ref="0"/>
-				<object class="NSMutableArray" key="dict.values">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-				</object>
-			</object>
-			<nil key="activeLocalization"/>
-			<object class="NSMutableDictionary" key="localizations">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<reference key="dict.sortedKeys" ref="0"/>
-				<object class="NSMutableArray" key="dict.values">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-				</object>
-			</object>
-			<nil key="sourceID"/>
-			<int key="maxID">40</int>
-		</object>
-		<object class="IBClassDescriber" key="IBDocument.Classes">
-			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="IBPartialClassDescription">
-					<string key="className">ChildBrowserViewController</string>
-					<string key="superclassName">UIViewController</string>
-					<object class="NSMutableDictionary" key="actions">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>onDoneButtonPress:</string>
-							<string>onSafariButtonPress:</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>id</string>
-							<string>id</string>
-						</object>
-					</object>
-					<object class="NSMutableDictionary" key="actionInfosByName">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>onDoneButtonPress:</string>
-							<string>onSafariButtonPress:</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<object class="IBActionInfo">
-								<string key="name">onDoneButtonPress:</string>
-								<string key="candidateClassName">id</string>
-							</object>
-							<object class="IBActionInfo">
-								<string key="name">onSafariButtonPress:</string>
-								<string key="candidateClassName">id</string>
-							</object>
-						</object>
-					</object>
-					<object class="NSMutableDictionary" key="outlets">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>addressLabel</string>
-							<string>backBtn</string>
-							<string>closeBtn</string>
-							<string>delegate</string>
-							<string>fwdBtn</string>
-							<string>refreshBtn</string>
-							<string>safariBtn</string>
-							<string>spinner</string>
-							<string>webView</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>UILabel</string>
-							<string>UIBarButtonItem</string>
-							<string>UIBarButtonItem</string>
-							<string>id</string>
-							<string>UIBarButtonItem</string>
-							<string>UIBarButtonItem</string>
-							<string>UIBarButtonItem</string>
-							<string>UIActivityIndicatorView</string>
-							<string>UIWebView</string>
-						</object>
-					</object>
-					<object class="NSMutableDictionary" key="toOneOutletInfosByName">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>addressLabel</string>
-							<string>backBtn</string>
-							<string>closeBtn</string>
-							<string>delegate</string>
-							<string>fwdBtn</string>
-							<string>refreshBtn</string>
-							<string>safariBtn</string>
-							<string>spinner</string>
-							<string>webView</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<object class="IBToOneOutletInfo">
-								<string key="name">addressLabel</string>
-								<string key="candidateClassName">UILabel</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">backBtn</string>
-								<string key="candidateClassName">UIBarButtonItem</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">closeBtn</string>
-								<string key="candidateClassName">UIBarButtonItem</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">delegate</string>
-								<string key="candidateClassName">id</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">fwdBtn</string>
-								<string key="candidateClassName">UIBarButtonItem</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">refreshBtn</string>
-								<string key="candidateClassName">UIBarButtonItem</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">safariBtn</string>
-								<string key="candidateClassName">UIBarButtonItem</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">spinner</string>
-								<string key="candidateClassName">UIActivityIndicatorView</string>
-							</object>
-							<object class="IBToOneOutletInfo">
-								<string key="name">webView</string>
-								<string key="candidateClassName">UIWebView</string>
-							</object>
-						</object>
-					</object>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">Plugins/ChildBrowser/ChildBrowserViewController.h</string>
-					</object>
-				</object>
-			</object>
-			<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSError.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">QuartzCore.framework/Headers/CAAnimation.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">QuartzCore.framework/Headers/CALayer.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier" id="485348283">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIActivityIndicatorView</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIActivityIndicatorView.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIBarButtonItem</string>
-					<string key="superclassName">UIBarItem</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIBarButtonItem.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIBarItem</string>
-					<string key="superclassName">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIBarItem.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UILabel</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UILabel.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIResponder</string>
-					<string key="superclassName">NSObject</string>
-					<reference key="sourceIdentifier" ref="485348283"/>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UISearchBar</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UISearchDisplayController</string>
-					<string key="superclassName">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIToolbar</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIToolbar.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIView</string>
-					<string key="superclassName">UIResponder</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIViewController</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">MediaPlayer.framework/Headers/MPMoviePlayerViewController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIViewController</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIViewController</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIViewController</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIViewController</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIViewController</string>
-					<string key="superclassName">UIResponder</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIWebView</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIWebView.h</string>
-					</object>
-				</object>
-			</object>
-		</object>
-		<int key="IBDocument.localizationMode">0</int>
-		<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
-		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
-			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
-			<integer value="768" key="NS.object.0"/>
-		</object>
-		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
-			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
-			<integer value="1056" key="NS.object.0"/>
-		</object>
-		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
-			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
-			<integer value="3000" key="NS.object.0"/>
-		</object>
-		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
-		<nil key="IBDocument.LastKnownRelativeProjectPath"/>
-		<int key="IBDocument.defaultPropertyAccessControl">3</int>
-		<string key="IBCocoaTouchPluginVersion">141</string>
-	</data>
-</archive>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/.gitignore
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/.gitignore b/cordova-lib/spec-plugman/plugins/cordova.echo/.gitignore
deleted file mode 100644
index e43b0f9..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-.DS_Store

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/plugin.xml b/cordova-lib/spec-plugman/plugins/cordova.echo/plugin.xml
deleted file mode 100644
index a9145e7..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/plugin.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    id="com.cordova.echo"
-    version="1.0.0">
-
-    <engines>
-        <engine name="cordova" version=">=2.3.0" />
-    </engines>
-
-    <name>cordova echo</name>
-
-    <js-module src="www/client.js">
-        <clobbers target="cordova.echo"/>
-    </js-module>
-
-    <platform name="blackberry10">
-        <source-file src="src/blackberry10/index.js" target-dir="cordova.echo"/>
-        <lib-file src="src/blackberry10/native/device/echoJnext.so" arch="device"/>
-        <lib-file src="src/blackberry10/native/simulator/echoJnext.so" arch="simulator"/>
-        <config-file target="config.xml" parent="/widget">
-            <feature id="cordova.echo" required="true" version="1.0.0.0"/>
-        </config-file>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/index.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/index.js b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/index.js
deleted file mode 100644
index 0759a20..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/index.js
+++ /dev/null
@@ -1,85 +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 echoJNext,
-    _event = require("../../lib/event"),
-    winCallback = null,
-    failCallback = null;
-    
-module.exports = {   
-    doEcho: function (success, fail, args) {
-        var invokeData = { "message" : JSON.parse(decodeURIComponent(args.message)) };
-        try {
-            success(echoJNext.getEchoJNext(invokeData));
-        } catch (e) {
-            fail(-1, e);
-        }
-    }
-};
-
-///////////////////////////////////////////////////////////////////
-// JavaScript wrapper for JNEXT plugin
-///////////////////////////////////////////////////////////////////
-
-JNEXT.EchoJNext = function ()
-{   
-    var _self = this;
-
-    _self.getEchoJNext = function (args) {
-        return JNEXT.invoke(_self._id, "doEcho " + JSON.stringify(args));
-    };
-
-    _self.getId = function () {
-        return _self._id;
-    };
-
-    _self.init = function () {
-        if (!JNEXT.require("echoJnext")) {
-            return false;
-        }
-
-        _self._id = JNEXT.createObject("echoJnext.Echo");
-
-        if (!_self._id || _self._id === "") {
-            return false;
-        }
-
-        JNEXT.registerEvents(_self);
-    };
-
-    _self.onEvent = function (strData) {
-        var arData = strData.split(" "),
-            strEventId = arData[0],
-            args = arData[1],
-            info = {};
-            
-        if (strEventId === "cordova.echo.callback") {
-            _event.trigger("echoCallback", args);
-        }
-                  
-    };
-    
-    _self._id = "";
-    
-    _self.init();
-};
-
-echoJNext = new JNEXT.EchoJNext();

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/device/echoJnext.so
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/device/echoJnext.so b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/device/echoJnext.so
deleted file mode 100755
index 169714a..0000000
Binary files a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/device/echoJnext.so and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/autolink.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/autolink.h b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/autolink.h
deleted file mode 100644
index 37c9258..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/autolink.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef JSON_AUTOLINK_H_INCLUDED
-# define JSON_AUTOLINK_H_INCLUDED
-
-# include "config.h"
-
-# ifdef JSON_IN_CPPTL
-#  include <cpptl/cpptl_autolink.h>
-# endif
-
-# if !defined(JSON_NO_AUTOLINK)  &&  !defined(JSON_DLL_BUILD)  &&  !defined(JSON_IN_CPPTL)
-#  define CPPTL_AUTOLINK_NAME "json"
-#  undef CPPTL_AUTOLINK_DLL
-#  ifdef JSON_DLL
-#   define CPPTL_AUTOLINK_DLL
-#  endif
-#  include "autolink.h"
-# endif
-
-#endif // JSON_AUTOLINK_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/config.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/config.h b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/config.h
deleted file mode 100644
index 5d334cb..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/config.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef JSON_CONFIG_H_INCLUDED
-# define JSON_CONFIG_H_INCLUDED
-
-/// If defined, indicates that json library is embedded in CppTL library.
-//# define JSON_IN_CPPTL 1
-
-/// If defined, indicates that json may leverage CppTL library
-//#  define JSON_USE_CPPTL 1
-/// If defined, indicates that cpptl vector based map should be used instead of std::map
-/// as Value container.
-//#  define JSON_USE_CPPTL_SMALLMAP 1
-/// If defined, indicates that Json specific container should be used
-/// (hash table & simple deque container with customizable allocator).
-/// THIS FEATURE IS STILL EXPERIMENTAL!
-//#  define JSON_VALUE_USE_INTERNAL_MAP 1
-/// Force usage of standard new/malloc based allocator instead of memory pool based allocator.
-/// The memory pools allocator used optimization (initializing Value and ValueInternalLink
-/// as if it was a POD) that may cause some validation tool to report errors.
-/// Only has effects if JSON_VALUE_USE_INTERNAL_MAP is defined.
-//#  define JSON_USE_SIMPLE_INTERNAL_ALLOCATOR 1
-
-/// If defined, indicates that Json use exception to report invalid type manipulation
-/// instead of C assert macro.
-# define JSON_USE_EXCEPTION 1
-
-# ifdef JSON_IN_CPPTL
-#  include <cpptl/config.h>
-#  ifndef JSON_USE_CPPTL
-#   define JSON_USE_CPPTL 1
-#  endif
-# endif
-
-# ifdef JSON_IN_CPPTL
-#  define JSON_API CPPTL_API
-# elif defined(JSON_DLL_BUILD)
-#  define JSON_API __declspec(dllexport)
-# elif defined(JSON_DLL)
-#  define JSON_API __declspec(dllimport)
-# else
-#  define JSON_API
-# endif
-
-#endif // JSON_CONFIG_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/features.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/features.h b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/features.h
deleted file mode 100644
index 5a9adec..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/features.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef CPPTL_JSON_FEATURES_H_INCLUDED
-# define CPPTL_JSON_FEATURES_H_INCLUDED
-
-# include "forwards.h"
-
-namespace Json {
-
-   /** \brief Configuration passed to reader and writer.
-    * This configuration object can be used to force the Reader or Writer
-    * to behave in a standard conforming way.
-    */
-   class JSON_API Features
-   {
-   public:
-      /** \brief A configuration that allows all features and assumes all strings are UTF-8.
-       * - C & C++ comments are allowed
-       * - Root object can be any JSON value
-       * - Assumes Value strings are encoded in UTF-8
-       */
-      static Features all();
-
-      /** \brief A configuration that is strictly compatible with the JSON specification.
-       * - Comments are forbidden.
-       * - Root object must be either an array or an object value.
-       * - Assumes Value strings are encoded in UTF-8
-       */
-      static Features strictMode();
-
-      /** \brief Initialize the configuration like JsonConfig::allFeatures;
-       */
-      Features();
-
-      /// \c true if comments are allowed. Default: \c true.
-      bool allowComments_;
-
-      /// \c true if root must be either an array or an object value. Default: \c false.
-      bool strictRoot_;
-   };
-
-} // namespace Json
-
-#endif // CPPTL_JSON_FEATURES_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/forwards.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/forwards.h b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/forwards.h
deleted file mode 100644
index d0ce830..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/forwards.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef JSON_FORWARDS_H_INCLUDED
-# define JSON_FORWARDS_H_INCLUDED
-
-# include "config.h"
-
-namespace Json {
-
-   // writer.h
-   class FastWriter;
-   class StyledWriter;
-
-   // reader.h
-   class Reader;
-
-   // features.h
-   class Features;
-
-   // value.h
-   typedef int Int;
-   typedef unsigned int UInt;
-   class StaticString;
-   class Path;
-   class PathArgument;
-   class Value;
-   class ValueIteratorBase;
-   class ValueIterator;
-   class ValueConstIterator;
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
-   class ValueAllocator;
-   class ValueMapAllocator;
-   class ValueInternalLink;
-   class ValueInternalArray;
-   class ValueInternalMap;
-#endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
-
-} // namespace Json
-
-
-#endif // JSON_FORWARDS_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/json.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/json.h b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/json.h
deleted file mode 100644
index c71ed65..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/json.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef JSON_JSON_H_INCLUDED
-# define JSON_JSON_H_INCLUDED
-
-# include "autolink.h"
-# include "value.h"
-# include "reader.h"
-# include "writer.h"
-# include "features.h"
-
-#endif // JSON_JSON_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/reader.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/reader.h b/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/reader.h
deleted file mode 100644
index ee1d6a2..0000000
--- a/cordova-lib/spec-plugman/plugins/cordova.echo/src/blackberry10/native/public/json/reader.h
+++ /dev/null
@@ -1,196 +0,0 @@
-#ifndef CPPTL_JSON_READER_H_INCLUDED
-# define CPPTL_JSON_READER_H_INCLUDED
-
-# include "features.h"
-# include "value.h"
-# include <deque>
-# include <stack>
-# include <string>
-# include <iostream>
-
-namespace Json {
-
-   /** \brief Unserialize a <a HREF="http://www.json.org">JSON</a> document into a Value.
-    *
-    */
-   class JSON_API Reader
-   {
-   public:
-      typedef char Char;
-      typedef const Char *Location;
-
-      /** \brief Constructs a Reader allowing all features
-       * for parsing.
-       */
-      Reader();
-
-      /** \brief Constructs a Reader allowing the specified feature set
-       * for parsing.
-       */
-      Reader( const Features &features );
-
-      /** \brief Read a Value from a <a HREF="http://www.json.org">JSON</a> document.
-       * \param document UTF-8 encoded string containing the document to read.
-       * \param root [out] Contains the root value of the document if it was
-       *             successfully parsed.
-       * \param collectComments \c true to collect comment and allow writing them back during
-       *                        serialization, \c false to discard comments.
-       *                        This parameter is ignored if Features::allowComments_
-       *                        is \c false.
-       * \return \c true if the document was successfully parsed, \c false if an error occurred.
-       */
-      bool parse( const std::string &document, 
-                  Value &root,
-                  bool collectComments = true );
-
-      /** \brief Read a Value from a <a HREF="http://www.json.org">JSON</a> document.
-       * \param document UTF-8 encoded string containing the document to read.
-       * \param root [out] Contains the root value of the document if it was
-       *             successfully parsed.
-       * \param collectComments \c true to collect comment and allow writing them back during
-       *                        serialization, \c false to discard comments.
-       *                        This parameter is ignored if Features::allowComments_
-       *                        is \c false.
-       * \return \c true if the document was successfully parsed, \c false if an error occurred.
-       */
-      bool parse( const char *beginDoc, const char *endDoc, 
-                  Value &root,
-                  bool collectComments = true );
-
-      /// \brief Parse from input stream.
-      /// \see Json::operator>>(std::istream&, Json::Value&).
-      bool parse( std::istream &is,
-                  Value &root,
-                  bool collectComments = true );
-
-      /** \brief Returns a user friendly string that list errors in the parsed document.
-       * \return Formatted error message with the list of errors with their location in 
-       *         the parsed document. An empty string is returned if no error occurred
-       *         during parsing.
-       */
-      std::string getFormatedErrorMessages() const;
-
-   private:
-      enum TokenType
-      {
-         tokenEndOfStream = 0,
-         tokenObjectBegin,
-         tokenObjectEnd,
-         tokenArrayBegin,
-         tokenArrayEnd,
-         tokenString,
-         tokenNumber,
-         tokenTrue,
-         tokenFalse,
-         tokenNull,
-         tokenArraySeparator,
-         tokenMemberSeparator,
-         tokenComment,
-         tokenError
-      };
-
-      class Token
-      {
-      public:
-         TokenType type_;
-         Location start_;
-         Location end_;
-      };
-
-      class ErrorInfo
-      {
-      public:
-         Token token_;
-         std::string message_;
-         Location extra_;
-      };
-
-      typedef std::deque<ErrorInfo> Errors;
-
-      bool expectToken( TokenType type, Token &token, const char *message );
-      bool readToken( Token &token );
-      void skipSpaces();
-      bool match( Location pattern, 
-                  int patternLength );
-      bool readComment();
-      bool readCStyleComment();
-      bool readCppStyleComment();
-      bool readString();
-      void readNumber();
-      bool readValue();
-      bool readObject( Token &token );
-      bool readArray( Token &token );
-      bool decodeNumber( Token &token );
-      bool decodeString( Token &token );
-      bool decodeString( Token &token, std::string &decoded );
-      bool decodeDouble( Token &token );
-      bool decodeUnicodeCodePoint( Token &token, 
-                                   Location &current, 
-                                   Location end, 
-                                   unsigned int &unicode );
-      bool decodeUnicodeEscapeSequence( Token &token, 
-                                        Location &current, 
-                                        Location end, 
-                                        unsigned int &unicode );
-      bool addError( const std::string &message, 
-                     Token &token,
-                     Location extra = 0 );
-      bool recoverFromError( TokenType skipUntilToken );
-      bool addErrorAndRecover( const std::string &message, 
-                               Token &token,
-                               TokenType skipUntilToken );
-      void skipUntilSpace();
-      Value &currentValue();
-      Char getNextChar();
-      void getLocationLineAndColumn( Location location,
-                                     int &line,
-                                     int &column ) const;
-      std::string getLocationLineAndColumn( Location location ) const;
-      void addComment( Location begin, 
-                       Location end, 
-                       CommentPlacement placement );
-      void skipCommentTokens( Token &token );
-   
-      typedef std::stack<Value *> Nodes;
-      Nodes nodes_;
-      Errors errors_;
-      std::string document_;
-      Location begin_;
-      Location end_;
-      Location current_;
-      Location lastValueEnd_;
-      Value *lastValue_;
-      std::string commentsBefore_;
-      Features features_;
-      bool collectComments_;
-   };
-
-   /** \brief Read from 'sin' into 'root'.
-
-    Always keep comments from the input JSON.
-
-    This can be used to read a file into a particular sub-object.
-    For example:
-    \code
-    Json::Value root;
-    cin >> root["dir"]["file"];
-    cout << root;
-    \endcode
-    Result:
-    \verbatim
-    {
-	"dir": {
-	    "file": {
-		// The input stream JSON would be nested here.
-	    }
-	}
-    }
-    \endverbatim
-    \throw std::exception on parse error.
-    \see Json::operator<<()
-   */
-   std::istream& operator>>( std::istream&, Value& );
-
-} // namespace Json
-
-#endif // CPPTL_JSON_READER_H_INCLUDED


[32/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_one/cordova/appinfo.jar
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/appinfo.jar b/cordova-lib/spec-plugman/projects/android_one/cordova/appinfo.jar
new file mode 100644
index 0000000..583776d
Binary files /dev/null and b/cordova-lib/spec-plugman/projects/android_one/cordova/appinfo.jar differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_one/cordova/build
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/build b/cordova-lib/spec-plugman/projects/android_one/cordova/build
new file mode 100755
index 0000000..3cbd9c1
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_one/cordova/build
@@ -0,0 +1,23 @@
+#!/bin/bash
+# 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.
+
+set -e
+
+CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd )
+
+bash "$CORDOVA_PATH"/lib/cordova build "$@"

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_one/cordova/clean
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/clean b/cordova-lib/spec-plugman/projects/android_one/cordova/clean
new file mode 100755
index 0000000..f52966a
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_one/cordova/clean
@@ -0,0 +1,23 @@
+#!/bin/bash
+# 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.
+
+set -e
+
+CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd )
+
+bash "$CORDOVA_PATH"/lib/cordova clean "$@"

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_one/cordova/lib/cordova
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/lib/cordova b/cordova-lib/spec-plugman/projects/android_one/cordova/lib/cordova
new file mode 100755
index 0000000..be343e9
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_one/cordova/lib/cordova
@@ -0,0 +1,386 @@
+#!/bin/bash
+#   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.
+
+PROJECT_PATH=$( cd "$( dirname "$0" )/../.." && pwd )
+
+function list_devices {
+    IFS=$'\n'
+    devices=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep -v 'emulator'`
+    device_list=($devices)
+    if [[ ${#device_list[@]} > 0 ]] ; then
+        for i in ${devices[@]}
+        do
+            # remove space and 'device'
+            echo ${i/[^a-zA-Z0-9._]device/}
+        done
+    else
+        echo "No devices found."
+        exit 2
+    fi
+}
+
+function list_started_emulators {
+    IFS=$'\n'
+    devices=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep 'emulator'`
+    emulator_list=($devices)
+    if [[ ${#emulator_list[@]} > 0 ]] ; then
+        for i in ${emulator_list[@]}
+        do
+            # remove space and 'device'
+            echo ${i/[^a-zA-Z0-9._]device/}
+        done
+    else
+        echo "No started emulators found, you can start an emulator by using the command"
+        echo " 'cordova/lib/start-emulator'"
+        exit 2
+    fi
+}
+
+function list_emulator_images {
+    emulator_images=`android list avds | grep "Name:" | cut -f 2 -d ":"`
+    emulator_list=($emulator_images)
+    if [[ ${#emulator_list[@]} > 0 ]] ; then
+        for i in ${emulator_list[@]}
+        do
+            echo ${i/[^a-zA-Z0-9._]/}
+        done
+    else
+        echo "No emulators found, if you would like to create an emulator follow the instructions"
+        echo " provided here : http://developer.android.com/tools/devices/index.html"
+        echo " Or run 'android create avd --name <name> --target <targetID>' in on the command line."
+        exit 2
+    fi
+}
+
+function start_emulator {
+    emulator_images=`android list avds | grep "Name:" | cut -f 2 -d ":"`
+    # if target emulator is provided
+    if [[ "$#" -eq 1 ]] ; then
+        # check that it exists
+        if [[ $emulator_images =~ $1 ]] ; then
+            #xterm -e emulator -avd $1 &
+            emulator -avd $1 1> /dev/null 2>&1 &
+        else
+            echo "Could not find the provided emulator, make sure the emulator exists"
+            echo " by checking 'cordova/lib/list-emulator-images'"
+            exit 2
+        fi
+    else
+        # start first emulator
+        emulator_list=($emulator_images)
+        if [[ ${#emulator_list[@]} > 0 ]] ; then
+            #xterm -e emulator -avd ${emulator_list[0]} &
+            emulator -avd ${emulator_list[0]/[^a-zA-Z0-9._]/} 1> /dev/null 2>&1 &
+        else
+            echo "No emulators found, if you would like to create an emulator follow the instructions"
+            echo " provided here : http://developer.android.com/tools/devices/index.html"
+            echo " Or run 'android create avd --name <name> --target <targetID>' in on the command line."
+            exit 2
+        fi
+    fi
+}
+
+function install_device {
+    IFS=$'\n'
+    devices=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep -v 'emulator'`
+    device_list=($devices)
+    if [[ ${#device_list[@]} > 0 ]] ; then
+        apks=`find $PROJECT_PATH/bin -type f -maxdepth 1 | egrep '\.apk$'`
+        apk_list=($apks)
+        if [[ ${#apk_list[@]} > 0 ]] ; then
+            local target
+            # handle target emulator
+            if [[ "$#" -eq 1 ]] ; then
+                # deploy to given target
+                target=${1/--target=/}
+            else
+                # delete trailing space and 'device' after device ID
+                target=${device_list[0]/[^a-zA-Z0-9._]device/}
+            fi
+            echo "Installing ${apk_list[0]} onto device $target..."
+            adb -s $target install -r ${apk_list[0]};
+            echo "Launching application..."
+            local launch_str=$(java -jar "$PROJECT_PATH"/cordova/appinfo.jar "$PROJECT_PATH"/AndroidManifest.xml)
+            adb -s $target shell am start -W -a android.intent.action.MAIN -n $launch_str
+        else
+            echo "Application package not found, could not install to device"
+            echo " make sure your application is built before deploying."
+            exit 2
+        fi
+    else
+        echo "No devices found to deploy to. Please make sure your device is connected"
+        echo " and you can view it using the 'cordova/lib/list-devices' command."
+        exit 2
+    fi
+}
+
+function install_emulator {
+    IFS=$'\n'
+    # check that there is an emulator to deploy to
+    emulator_string=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'emulator'`
+    emulator_list=($emulator_string)
+    if [[ ${#emulator_list[@]} > 0 ]] ; then
+        apks=`find $PROJECT_PATH/bin -type f -maxdepth 1 | egrep '\.apk$'`
+        apk_list=($apks)
+        if [[ ${#apk_list[@]} > 0 ]] ; then
+            local target
+            # handle target emulator
+            if [[ "$#" -eq 1 ]] ; then
+                # deploy to given target
+                target=${1/--target=/}
+            else
+                # delete trailing space and 'device' after emulator ID
+                target=${emulator_list[0]/[^a-zA-Z0-9._]device/}
+            fi
+            echo "Installing ${apk_list[0]} onto $target..."
+            adb -s $target install -r ${apk_list[0]};
+            echo "Launching application..."
+            local launch_str=$(java -jar "$PROJECT_PATH"/cordova/appinfo.jar "$PROJECT_PATH"/AndroidManifest.xml)
+            adb -s $target shell am start -W -a android.intent.action.MAIN -n $launch_str
+
+        else
+            echo "Application package not found, could not install to device"
+            echo " make sure your application is built before deploying."
+            exit 2
+        fi
+    else
+        echo "No emulators found to deploy to. Please make sure your emulator is started"
+        echo " and you can view it using the 'cordova/lib/list-started-emulators' command."
+        exit 2
+    fi
+}
+
+# cleans the project
+function clean {
+    echo "Cleaning project..."
+    ant clean
+}
+
+# has to be used independently and not in conjunction with other commands
+function log {
+    # filter out nativeGetEnabledTags spam from latest sdk bug.
+    adb logcat | grep -v nativeGetEnabledTags
+}
+
+
+function build {
+    if [[ "$#" -eq 1 ]] ; then
+        if [[ $1 == "--debug" ]] ; then
+            clean
+            ant debug -f "$PROJECT_PATH"/build.xml
+        elif [[ $1 == "--release" ]] ; then
+            clean
+            ant release -f "$PROJECT_PATH"/build.xml
+        elif [[ $1 == "--nobuild" ]] ; then
+            echo "Skipping build..."
+        else
+            echo "Error : Build command '$1' not recognized."
+            exit 2
+        fi
+    else
+        echo "Warning : [ --debug | --release | --nobuild ] not specified, defaulting to --debug"
+        clean
+        ant debug -f "$PROJECT_PATH"/build.xml
+    fi
+}
+
+
+function wait_for_emulator {
+    emulator_string=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep 'emulator'`
+    old_started=($emulator_string)
+    local new_started
+    local new_emulator_name
+    local i="0"
+    echo -n "Waiting for emulator..."
+    while [ $i -lt 300 ]
+    do
+        emulator_string=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep 'emulator'`
+        new_started=($emulator_string)
+        if [[ ${#new_started[@]} > ${#old_started[@]} && -z "$new_emulator_name" ]] ; then
+            # get the name of the started emulator
+            local count="0"
+            if [[ ${#old_started[@]} == 0 ]] ; then
+                new_emulator_name=${new_started[$count]/[^a-zA-Z0-9._]device/}
+            else
+                for count in {0...${#old_started[@]}}
+                do
+                    if [[ ! ${new_started[$count]} == ${old_started[$count]} ]] ; then
+                        new_emulator_name=${new_started[$count]/[^a-zA-Z0-9._]device/}
+                    fi
+                done
+                if [[ -z "$new_emulator_name" ]] ; then
+                    count=$[count+1]
+                    new_emulator_name=${new_started[$count]/[^a-zA-Z0-9._]device/}
+                fi
+            fi
+        elif [[ "$new_emulator_name" ]] ; then
+            boot_anim=`adb -s $new_emulator_name shell getprop init.svc.bootanim`
+            if [[ $boot_anim =~ "stopped" ]] ; then
+                break
+            else
+                sleep 1
+                i=$[i+1]
+                echo -n "."
+            fi
+        else
+            sleep 1
+            i=$[i+1]
+            echo -n "."
+        fi
+    done
+    # Device timeout: emulator has not started in time
+    if [ $i -eq 300 ]
+    then
+        echo "emulator timeout!"
+        exit 69
+    else
+        echo "connected!"
+    fi
+}
+
+function run {
+    IFS=$'\n'
+    if [[ "$#" -eq 2 ]] ; then
+        build $2
+        if [[ $1 == "--device" ]] ; then
+            install_device
+        elif [[ $1 == "--emulator" ]] ; then
+            install_emulator
+        elif [[ $1 =~ "--target=" ]]; then
+            install_device $1
+        else
+            echo "Error : '$1' is not recognized as an install option"
+        fi
+    elif [[ "$#" -eq 1 ]] ; then
+        if [[ $1 == "--debug" || $1 == "--release" || $1 == "--nobuild" ]] ; then
+            build $1
+        elif [[ $1 == "--device" ]] ; then
+            install_device
+        elif [[ $1 == "--emulator" ]] ; then
+            install_emulator
+        elif [[ $1 =~ "--target=" ]]; then
+            install_device $1
+        else
+            echo "Error : '$1' is not recognized as an install option"
+        fi
+    else
+        echo "Warning : [ --device | --emulate | --target=<targetID> ] not specified, using defaults."
+        build
+        devices=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep -v 'emulator'`
+        device_list=($devices)
+        emulator_string=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep 'emulator'`
+        emulator_list=($emulator_string)
+        if [[ ${#device_list[@]} > 0 ]] ; then
+            install_device
+        elif [[ ${#emulator_list[@]} > 0 ]] ; then
+            install_emulator
+        else
+            emulator_images=`android list avds | grep "Name:" | cut -f 2 -d ":"`
+            echo $emulator_images
+            emulator_image_list=($emulator_images)
+            if [[ ${#emulator_image_list[@]} > 0 ]] ; then
+                echo "Starting emulator : ${emulator_image_list[0]}" 
+                emulator -avd ${emulator_image_list[0]/[^.\w]/} 1> /dev/null 2>&1 &
+                wait_for_emulator
+                install_emulator
+            else
+                # TODO : look for emulator images and start one if it's available
+                echo "Error : there are no available devices or emulators to deploy to."
+                echo " create an emulator or connect your device to run this command."
+                echo "If you would like to create an emulator follow the instructions"
+                echo " provided here : http://developer.android.com/tools/devices/index.html"
+                echo " Or run 'android create avd --name <name> --target <targetID>' in on the command line."
+                exit 2
+            fi
+        fi
+    fi
+}
+
+# parse command line arguments
+
+if [[ $# > 3 ]] ; then 
+    echo "Error :  too many arguments."
+    exit 2
+elif [[ $# == 3 ]] ; then
+    if [[ $1 == "run" ]] ; then
+        run $2 $3
+    else
+        echo "Error : too many arguments for '$1'"
+        exit 2
+    fi
+elif [[ $# == 2 ]] ; then
+    if [[ $1 == "run" ]] ; then
+        if [[ $2 == "--emulator" || $2 == "--device" || $2 =~ "--target=" ]] ; then
+            run $2 ''
+        elif [[ $2 == "--debug" || $2 == "--release" || $2 == "--nobuild" ]] ; then
+            run '' $2
+        else 
+            echo "Error : '$2' is not recognized as a run option."
+            exit 2
+        fi
+    elif [[ $1 == "build" ]] ; then
+        build $2
+    elif [[ $1 == "start-emulator" ]] ; then
+        start_emulator $2
+    elif [[ $1 == "install-device" ]] ; then
+        if [[ $2 =~ "--target=" ]] ; then
+            install_device $2
+        else
+            echo "Error : '$2' is not recognized as an install option"
+            exit 2
+        fi
+    elif [[ $1 == "install-emulator" ]] ; then
+        if [[ $2 =~ "--target=" ]] ; then
+            install_emulator $2
+        else
+            echo "Error : '$2' is not recognized as an install option"
+            exit 2
+        fi
+    else
+        echo "Error : '$1' is not recognized as an option that takes arguments"
+        exit 2
+    fi
+elif [[ $# == 1 ]] ; then
+    if [[ $1 == "run" ]] ; then
+        run
+    elif [[ $1 == "build" ]]; then
+        build
+    elif [[ $1 == "clean" ]]; then
+        clean
+    elif [[ $1 == "log" ]]; then
+        log
+    elif [[ $1 == "list-devices" ]]; then
+        list_devices
+    elif [[ $1 == "list-emulator-images" ]]; then
+        list_emulator_images
+    elif [[ $1 == "list-started-emulators" ]]; then
+        list_started_emulators
+    elif [[ $1 == "install-device" ]]; then
+        install_device
+    elif [[ $1 == "install-emulator" ]]; then
+        install_emulator
+    elif [[ $1 == "start-emulator" ]]; then
+        start_emulator
+    else
+        echo "Error : '$1' is not recognized as a tooling command."
+        exit 2
+    fi
+else
+    echo "Error : No command received, exiting..."
+    exit 2
+fi
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_one/cordova/lib/install-device
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/lib/install-device b/cordova-lib/spec-plugman/projects/android_one/cordova/lib/install-device
new file mode 100755
index 0000000..604b5ae
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_one/cordova/lib/install-device
@@ -0,0 +1,23 @@
+#!/bin/bash
+# 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.
+
+set -e
+
+CORDOVA_LIB_PATH=$( cd "$( dirname "$0" )" && pwd )
+
+bash "$CORDOVA_LIB_PATH"/cordova install-device "$@"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_one/cordova/lib/install-emulator
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/lib/install-emulator b/cordova-lib/spec-plugman/projects/android_one/cordova/lib/install-emulator
new file mode 100755
index 0000000..105e2ee
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_one/cordova/lib/install-emulator
@@ -0,0 +1,23 @@
+#!/bin/bash
+# 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.
+
+set -e
+
+CORDOVA_LIB_PATH=$( cd "$( dirname "$0" )" && pwd )
+
+bash "$CORDOVA_LIB_PATH"/cordova install-emulator "$@"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_one/cordova/lib/list-devices
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/lib/list-devices b/cordova-lib/spec-plugman/projects/android_one/cordova/lib/list-devices
new file mode 100755
index 0000000..7a5b2f5
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_one/cordova/lib/list-devices
@@ -0,0 +1,23 @@
+#!/bin/bash
+# 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.
+
+set -e
+
+CORDOVA_LIB_PATH=$( cd "$( dirname "$0" )" && pwd )
+
+bash "$CORDOVA_LIB_PATH"/cordova list-devices
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_one/cordova/lib/list-emulator-images
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/lib/list-emulator-images b/cordova-lib/spec-plugman/projects/android_one/cordova/lib/list-emulator-images
new file mode 100755
index 0000000..db8e563
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_one/cordova/lib/list-emulator-images
@@ -0,0 +1,23 @@
+#!/bin/bash
+# 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.
+
+set -e
+
+CORDOVA_LIB_PATH=$( cd "$( dirname "$0" )" && pwd )
+
+bash "$CORDOVA_LIB_PATH"/cordova list-emulator-images
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_one/cordova/lib/list-started-emulators
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/lib/list-started-emulators b/cordova-lib/spec-plugman/projects/android_one/cordova/lib/list-started-emulators
new file mode 100755
index 0000000..7911763
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_one/cordova/lib/list-started-emulators
@@ -0,0 +1,23 @@
+#!/bin/bash
+# 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.
+
+set -e
+
+CORDOVA_LIB_PATH=$( cd "$( dirname "$0" )" && pwd )
+
+bash "$CORDOVA_LIB_PATH"/cordova list-started-emulators
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_one/cordova/lib/start-emulator
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/lib/start-emulator b/cordova-lib/spec-plugman/projects/android_one/cordova/lib/start-emulator
new file mode 100755
index 0000000..8e8964d
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_one/cordova/lib/start-emulator
@@ -0,0 +1,23 @@
+#!/bin/bash
+# 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.
+
+set -e
+
+CORDOVA_LIB_PATH=$( cd "$( dirname "$0" )" && pwd )
+
+bash "$CORDOVA_LIB_PATH"/cordova start-emulator "$@"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_one/cordova/log
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/log b/cordova-lib/spec-plugman/projects/android_one/cordova/log
new file mode 100755
index 0000000..01fe107
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_one/cordova/log
@@ -0,0 +1,23 @@
+#!/bin/bash
+# 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.
+
+set -e
+
+CORDOVA_PATH=$( cd "$( dirname "$0" )/.." && pwd )
+
+bash "$CORDOVA_PATH"/cordova/lib/cordova log "$@"

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_one/cordova/run
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/run b/cordova-lib/spec-plugman/projects/android_one/cordova/run
new file mode 100755
index 0000000..ec352b0
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_one/cordova/run
@@ -0,0 +1,23 @@
+#!/bin/bash
+# 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.
+
+set -e
+
+CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd )
+
+bash "$CORDOVA_PATH"/lib/cordova run "$@"

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_one/cordova/version
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/cordova/version b/cordova-lib/spec-plugman/projects/android_one/cordova/version
new file mode 100755
index 0000000..5760e95
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_one/cordova/version
@@ -0,0 +1,32 @@
+#!/bin/bash
+# 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.
+
+set -e
+
+CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P)
+PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
+
+VERSION_FILE_PATH="$PROJECT_PATH/assets/www/cordova.js"
+
+if [ -f "$VERSION_FILE_PATH" ]; then
+    JSVersion=$(sed -n '2,2p' $VERSION_FILE_PATH)
+    echo $JSVersion | sed -e 's/\/\/ //'| cut -f 1 -d '-'
+else
+    echo "The file \"$VERSION_FILE_PATH\" does not exist."
+    exit 1
+fi

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_one/res/xml/plugins.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/res/xml/plugins.xml b/cordova-lib/spec-plugman/projects/android_one/res/xml/plugins.xml
new file mode 100644
index 0000000..9cee85e
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_one/res/xml/plugins.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<plugins>
+    <plugin name="App" value="com.phonegap.App"/>
+    <plugin name="Geolocation" value="com.phonegap.GeoBroker"/>
+    <plugin name="Device" value="com.phonegap.Device"/>
+    <plugin name="Accelerometer" value="com.phonegap.AccelListener"/>
+    <plugin name="Compass" value="com.phonegap.CompassListener"/>
+    <plugin name="Media" value="com.phonegap.AudioHandler"/>
+    <plugin name="Camera" value="com.phonegap.CameraLauncher"/>
+    <plugin name="Contacts" value="com.phonegap.ContactManager"/>
+    <plugin name="Crypto" value="com.phonegap.CryptoHandler"/>
+    <plugin name="File" value="com.phonegap.FileUtils"/>
+    <plugin name="Network Status" value="com.phonegap.NetworkManager"/>
+    <plugin name="Notification" value="com.phonegap.Notification"/>
+    <plugin name="Storage" value="com.phonegap.Storage"/>
+    <plugin name="Temperature" value="com.phonegap.TempListener"/>
+    <plugin name="FileTransfer" value="com.phonegap.FileTransfer"/>
+    <plugin name="Capture" value="com.phonegap.Capture"/>
+</plugins>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_one/src/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/src/.gitkeep b/cordova-lib/spec-plugman/projects/android_one/src/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_two/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_two/AndroidManifest.xml b/cordova-lib/spec-plugman/projects/android_two/AndroidManifest.xml
new file mode 100644
index 0000000..0c52803
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_two/AndroidManifest.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
+      package="com.alunny.childapp" android:versionName="1.1" android:versionCode="5">
+    <supports-screens
+    	android:largeScreens="true"
+    	android:normalScreens="true"
+    	android:smallScreens="true"
+    	android:xlargeScreens="true"
+    	android:resizeable="true"
+    	android:anyDensity="true"
+    	/>
+
+    <uses-permission android:name="android.permission.CAMERA" />
+    <uses-permission android:name="android.permission.VIBRATE" />
+    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
+    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
+    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.RECEIVE_SMS" />
+    <uses-permission android:name="android.permission.RECORD_AUDIO" />
+    <uses-permission android:name="android.permission.RECORD_VIDEO"/>
+    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
+    <uses-permission android:name="android.permission.READ_CONTACTS" />
+    <uses-permission android:name="android.permission.WRITE_CONTACTS" />   
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />   
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
+    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
+
+    <uses-feature android:name="android.hardware.camera" />
+    <uses-feature android:name="android.hardware.camera.autofocus" />
+
+    <application android:icon="@drawable/icon" android:label="@string/app_name"
+    	android:debuggable="true">
+		<activity android:name="ChildApp" android:label="@string/app_name" 
+				  android:configChanges="orientation|keyboardHidden">
+			<intent-filter>
+				<action android:name="android.intent.action.MAIN" />
+				<category android:name="android.intent.category.LAUNCHER" />
+			</intent-filter>
+        </activity>
+        <activity android:name="com.phonegap.DroidGap" android:label="@string/app_name" 
+            	  android:configChanges="orientation|keyboardHidden">
+        	<intent-filter>
+        	</intent-filter>
+        </activity>
+    </application>
+
+	<uses-sdk android:minSdkVersion="5" />
+</manifest> 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_two/assets/www/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_two/assets/www/.gitkeep b/cordova-lib/spec-plugman/projects/android_two/assets/www/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_two/res/xml/config.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_two/res/xml/config.xml b/cordova-lib/spec-plugman/projects/android_two/res/xml/config.xml
new file mode 100644
index 0000000..d37aba5
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_two/res/xml/config.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+       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.
+-->
+<cordova>
+    <!--
+    access elements control the Android whitelist.
+    Domains are assumed blocked unless set otherwise
+     -->
+
+    <access origin="http://127.0.0.1*"/> <!-- allow local pages -->
+
+    <!-- <access origin="https://example.com" /> allow any secure requests to example.com -->
+    <!-- <access origin="https://example.com" subdomains="true" /> such as above, but including subdomains, such as www -->
+    <!-- <access origin=".*"/> Allow all domains, suggested development use only -->
+
+    <log level="DEBUG"/>
+    <preference name="useBrowserHistory" value="false" />
+<plugins>
+    <plugin name="App" value="org.apache.cordova.App"/>
+    <plugin name="Geolocation" value="org.apache.cordova.GeoBroker"/>
+    <plugin name="Device" value="org.apache.cordova.Device"/>
+    <plugin name="Accelerometer" value="org.apache.cordova.AccelListener"/>
+    <plugin name="Compass" value="org.apache.cordova.CompassListener"/>
+    <plugin name="Media" value="org.apache.cordova.AudioHandler"/>
+    <plugin name="Camera" value="org.apache.cordova.CameraLauncher"/>
+    <plugin name="Contacts" value="org.apache.cordova.ContactManager"/>
+    <plugin name="File" value="org.apache.cordova.FileUtils"/>
+    <plugin name="NetworkStatus" value="org.apache.cordova.NetworkManager"/>
+    <plugin name="Notification" value="org.apache.cordova.Notification"/>
+    <plugin name="Storage" value="org.apache.cordova.Storage"/>
+    <plugin name="Temperature" value="org.apache.cordova.TempListener"/>
+    <plugin name="FileTransfer" value="org.apache.cordova.FileTransfer"/>
+    <plugin name="Capture" value="org.apache.cordova.Capture"/>
+    <plugin name="Battery" value="org.apache.cordova.BatteryListener"/>
+    <plugin name="SplashScreen" value="org.apache.cordova.SplashScreen"/>
+</plugins>
+</cordova>
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_two/src/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_two/src/.gitkeep b/cordova-lib/spec-plugman/projects/android_two/src/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_two_no_perms/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_two_no_perms/AndroidManifest.xml b/cordova-lib/spec-plugman/projects/android_two_no_perms/AndroidManifest.xml
new file mode 100644
index 0000000..6e4b480
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_two_no_perms/AndroidManifest.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
+      package="com.alunny.childapp" android:versionName="1.1" android:versionCode="5">
+    <supports-screens
+    	android:largeScreens="true"
+    	android:normalScreens="true"
+    	android:smallScreens="true"
+    	android:xlargeScreens="true"
+    	android:resizeable="true"
+    	android:anyDensity="true"
+    	/>
+
+    <application android:icon="@drawable/icon" android:label="@string/app_name"
+    	android:debuggable="true">
+		<activity android:name="ChildApp" android:label="@string/app_name" 
+				  android:configChanges="orientation|keyboardHidden">
+			<intent-filter>
+				<action android:name="android.intent.action.MAIN" />
+				<category android:name="android.intent.category.LAUNCHER" />
+			</intent-filter>
+        </activity>
+        <activity android:name="com.phonegap.DroidGap" android:label="@string/app_name" 
+            	  android:configChanges="orientation|keyboardHidden">
+        	<intent-filter>
+        	</intent-filter>
+        </activity>
+    </application>
+
+	<uses-sdk android:minSdkVersion="5" />
+</manifest> 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_two_no_perms/assets/www/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_two_no_perms/assets/www/.gitkeep b/cordova-lib/spec-plugman/projects/android_two_no_perms/assets/www/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_two_no_perms/res/xml/config.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_two_no_perms/res/xml/config.xml b/cordova-lib/spec-plugman/projects/android_two_no_perms/res/xml/config.xml
new file mode 100644
index 0000000..d37aba5
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_two_no_perms/res/xml/config.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+       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.
+-->
+<cordova>
+    <!--
+    access elements control the Android whitelist.
+    Domains are assumed blocked unless set otherwise
+     -->
+
+    <access origin="http://127.0.0.1*"/> <!-- allow local pages -->
+
+    <!-- <access origin="https://example.com" /> allow any secure requests to example.com -->
+    <!-- <access origin="https://example.com" subdomains="true" /> such as above, but including subdomains, such as www -->
+    <!-- <access origin=".*"/> Allow all domains, suggested development use only -->
+
+    <log level="DEBUG"/>
+    <preference name="useBrowserHistory" value="false" />
+<plugins>
+    <plugin name="App" value="org.apache.cordova.App"/>
+    <plugin name="Geolocation" value="org.apache.cordova.GeoBroker"/>
+    <plugin name="Device" value="org.apache.cordova.Device"/>
+    <plugin name="Accelerometer" value="org.apache.cordova.AccelListener"/>
+    <plugin name="Compass" value="org.apache.cordova.CompassListener"/>
+    <plugin name="Media" value="org.apache.cordova.AudioHandler"/>
+    <plugin name="Camera" value="org.apache.cordova.CameraLauncher"/>
+    <plugin name="Contacts" value="org.apache.cordova.ContactManager"/>
+    <plugin name="File" value="org.apache.cordova.FileUtils"/>
+    <plugin name="NetworkStatus" value="org.apache.cordova.NetworkManager"/>
+    <plugin name="Notification" value="org.apache.cordova.Notification"/>
+    <plugin name="Storage" value="org.apache.cordova.Storage"/>
+    <plugin name="Temperature" value="org.apache.cordova.TempListener"/>
+    <plugin name="FileTransfer" value="org.apache.cordova.FileTransfer"/>
+    <plugin name="Capture" value="org.apache.cordova.Capture"/>
+    <plugin name="Battery" value="org.apache.cordova.BatteryListener"/>
+    <plugin name="SplashScreen" value="org.apache.cordova.SplashScreen"/>
+</plugins>
+</cordova>
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_two_no_perms/src/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_two_no_perms/src/.gitkeep b/cordova-lib/spec-plugman/projects/android_two_no_perms/src/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_uninstall/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_uninstall/AndroidManifest.xml b/cordova-lib/spec-plugman/projects/android_uninstall/AndroidManifest.xml
new file mode 100644
index 0000000..b5fea9d
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_uninstall/AndroidManifest.xml
@@ -0,0 +1,20 @@
+<?xml version='1.0' encoding='utf-8'?>
+<manifest android:versionCode="5" android:versionName="1.1" android:windowSoftInputMode="adjustPan" package="cordova.test.uninstall" xmlns:android="http://schemas.android.com/apk/res/android">
+    <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
+    <application android:debuggable="true" android:icon="@drawable/icon" android:label="@string/app_name">
+        <activity android:configChanges="orientation|keyboardHidden" android:label="@string/app_name" android:name="ChildApp">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:configChanges="orientation|keyboardHidden" android:label="@string/app_name" android:name="com.phonegap.DroidGap">
+            <intent-filter>
+            </intent-filter>
+        </activity>
+        <activity android:label="@string/app_name" android:name="com.phonegap.plugins.dummyplugin.DummyPlugin">
+            <intent-filter />
+        </activity>
+    </application>
+    <uses-sdk android:minSdkVersion="5" />
+</manifest>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_uninstall/cordova/version
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_uninstall/cordova/version b/cordova-lib/spec-plugman/projects/android_uninstall/cordova/version
new file mode 100644
index 0000000..01f68fd
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_uninstall/cordova/version
@@ -0,0 +1 @@
+echo 9.0.0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_uninstall/cordova/version.bat
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_uninstall/cordova/version.bat b/cordova-lib/spec-plugman/projects/android_uninstall/cordova/version.bat
new file mode 100644
index 0000000..c637d7c
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_uninstall/cordova/version.bat
@@ -0,0 +1,2 @@
+@ECHO OFF
+echo 9.0.0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/blackberry10/native/device/chrome/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/blackberry10/native/device/chrome/.gitkeep b/cordova-lib/spec-plugman/projects/blackberry10/native/device/chrome/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/blackberry10/native/device/plugins/jnext/auth.txt
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/blackberry10/native/device/plugins/jnext/auth.txt b/cordova-lib/spec-plugman/projects/blackberry10/native/device/plugins/jnext/auth.txt
new file mode 100644
index 0000000..0983f4f
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/blackberry10/native/device/plugins/jnext/auth.txt
@@ -0,0 +1,3 @@
+local:/// *
+file:// *
+http:// *
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/blackberry10/native/simulator/chrome/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/blackberry10/native/simulator/chrome/.gitkeep b/cordova-lib/spec-plugman/projects/blackberry10/native/simulator/chrome/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/blackberry10/native/simulator/plugins/jnext/auth.txt
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/blackberry10/native/simulator/plugins/jnext/auth.txt b/cordova-lib/spec-plugman/projects/blackberry10/native/simulator/plugins/jnext/auth.txt
new file mode 100644
index 0000000..0983f4f
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/blackberry10/native/simulator/plugins/jnext/auth.txt
@@ -0,0 +1,3 @@
+local:/// *
+file:// *
+http:// *
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/blackberry10/www/config.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/blackberry10/www/config.xml b/cordova-lib/spec-plugman/projects/blackberry10/www/config.xml
new file mode 100644
index 0000000..1dc8fe8
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/blackberry10/www/config.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+       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.
+-->
+<!--
+  Widget Configuration Reference:
+    http://docs.blackberry.com/en/developers/deliverables/15274/
+-->
+
+<widget xmlns="http://www.w3.org/ns/widgets"
+        xmlns:rim="http://www.blackberry.com/ns/widgets"
+  version="1.0.0.0" id="cordovaExample">
+
+  <name>cordovaExample</name>
+
+  <author>Your Name Here</author>
+
+  <description>
+       A sample Apache Cordova application that responds to the deviceready event.
+  </description>
+    
+  <license href="http://opensource.org/licenses/alphabetical">
+  </license>
+
+  <!-- Cordova API -->
+  <feature id="blackberry.system" required="true" version="1.0.0.0" />
+  <feature id="org.apache.cordova" required="true" version="1.0.0" />
+  <feature id="blackberry.find" required="true" version="1.0.0.0" />
+  <feature id="blackberry.identity" required="true" version="1.0.0.0" />
+  <feature id="blackberry.identity.phone" required="true" version="1.0.0.0" />
+  <feature id="blackberry.pim.Address" required="true" version="1.0.0.0" />
+  <feature id="blackberry.pim.Contact" required="true" version="1.0.0.0" />
+  <feature id="blackberry.io.file" required="true" version="1.0.0.0" />
+  <feature id="blackberry.utils" required="true" version="1.0.0.0" />
+  <feature id="blackberry.io.dir" required="true" version="1.0.0.0" />
+  <feature id="blackberry.app" required="true" version="1.0.0.0" />
+  <feature id="blackberry.app.event" required="true" version="1.0.0.0" />
+  <feature id="blackberry.system.event" required="true" version="1.0.0.0"/>
+  <feature id="blackberry.widgetcache" required="true" version="1.0.0.0"/>
+  <feature id="blackberry.media.camera" />
+  <feature id="blackberry.ui.dialog" />
+  <feature id="blackberry.connection" />
+  <feature id="blackberry.bbm.platform" />
+  <feature id="blackberry.invoke.card" />
+  <feature id="blackberry.pim.contacts" />
+  <feature id="blackberry.ui.contextmenu" />
+  <feature id="blackberry.io.filetransfer" />
+  <feature id="blackberry.io" />
+  <feature id="blackberry.invoke" />
+  <feature id="blackberry.invoked" />
+  <feature id="blackberry.push" />
+  <feature id="blackberry.media.microphone" required="true" version="1.0.0.0"/>
+  
+  <!-- Cordova API -->
+  <access subdomains="true" uri="file:///store/home" />
+  <access subdomains="true" uri="file:///SDCard" />
+
+  <!-- Expose access to all URIs, including the file and http protocols -->
+  <access subdomains="true" uri="*" />
+
+  
+  <icon rim:hover="false" src="res/icon/blackberry/icon-80.png" />
+  <icon rim:hover="true" src="res/icon/blackberry/icon-80.png" />
+
+  <rim:loadingScreen backgroundColor="#CFCFCF"
+                     foregroundImage="res/screen/blackberry/screen-225.png"
+                     onFirstLaunch="true">
+    <rim:transitionEffect type="fadeOut" />
+  </rim:loadingScreen>
+
+  <content src="index.html" />
+
+  <rim:permissions>
+    <rim:permit>use_camera</rim:permit>
+    <rim:permit>read_device_identifying_information</rim:permit>
+    <rim:permit>access_shared</rim:permit>
+    <rim:permit>read_geolocation</rim:permit>
+    <rim:permit>record_audio</rim:permit> 
+    <rim:permit>access_pimdomain_contacts</rim:permit> 
+  </rim:permissions>
+
+</widget>


[45/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/platforms/amazon-fireos.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platforms/amazon-fireos.spec.js b/cordova-lib/spec-plugman/platforms/amazon-fireos.spec.js
new file mode 100644
index 0000000..49a8b0d
--- /dev/null
+++ b/cordova-lib/spec-plugman/platforms/amazon-fireos.spec.js
@@ -0,0 +1,139 @@
+var amazon_fireos = require('../../src/platforms/amazon-fireos'),
+    common  = require('../../src/platforms/common'),
+    install = require('../../src/install'),
+    path    = require('path'),
+    fs      = require('fs'),
+    shell   = require('shelljs'),
+    et      = require('elementtree'),
+    os      = require('osenv'),
+    temp    = path.join(os.tmpdir(), 'plugman'),
+    plugins_dir = path.join(temp, 'cordova', 'plugins'),
+    xml_helpers = require('../../src/util/xml-helpers'),
+    plugins_module = require('../../src/util/plugins'),
+    dummyplugin = path.join(__dirname, '..', 'plugins', 'DummyPlugin'),
+    faultyplugin = path.join(__dirname, '..', 'plugins', 'FaultyPlugin'),
+    variableplugin = path.join(__dirname, '..', 'plugins', 'VariablePlugin'),
+    amazon_fireos_one_project = path.join(__dirname, '..', 'projects', 'android_one', '*'),
+    amazon_fireos_two_project = path.join(__dirname, '..', 'projects', 'android_two', '*');
+
+var xml_path     = path.join(dummyplugin, 'plugin.xml')
+  , xml_text     = fs.readFileSync(xml_path, 'utf-8')
+  , plugin_et    = new et.ElementTree(et.XML(xml_text));
+
+var platformTag = plugin_et.find('./platform[@name="amazon-fireos"]');
+var dummy_id = plugin_et._root.attrib['id'];
+
+var valid_source = platformTag.findall('./source-file'),
+    valid_libs = platformTag.findall('./lib-file'),
+    assets = plugin_et.findall('./asset'),
+    configChanges = platformTag.findall('./config-file');
+
+xml_path  = path.join(faultyplugin, 'plugin.xml')
+xml_text  = fs.readFileSync(xml_path, 'utf-8')
+plugin_et = new et.ElementTree(et.XML(xml_text));
+
+platformTag = plugin_et.find('./platform[@name="amazon-fireos"]');
+var invalid_source = platformTag.findall('./source-file');
+var faulty_id = plugin_et._root.attrib['id'];
+xml_path  = path.join(variableplugin, 'plugin.xml')
+xml_text  = fs.readFileSync(xml_path, 'utf-8')
+plugin_et = new et.ElementTree(et.XML(xml_text));
+platformTag = plugin_et.find('./platform[@name="amazon-fireos"]');
+
+var variable_id = plugin_et._root.attrib['id'];
+var variable_configs = platformTag.findall('./config-file');
+
+function copyArray(arr) {
+    return Array.prototype.slice.call(arr, 0);
+}
+/*
+describe('amazon-fireos project handler', function() {
+    describe('www_dir method', function() {
+        it('should return cordova-amazon-fireos project www location using www_dir', function() {
+            expect(amazon_fireos.www_dir(path.sep)).toEqual(path.sep + path.join('assets', 'www'));
+        });
+    });
+    describe('package_name method', function() {
+        it('should return an amazon-fireos project\'s proper package name', function() {
+            expect(amazon_fireos.package_name(path.join(amazon_fireos_one_project, '..'))).toEqual('com.alunny.childapp');
+        });
+    });
+
+    describe('installation', function() {
+        beforeEach(function() {
+            shell.mkdir('-p', temp);
+        });
+        afterEach(function() {
+            shell.rm('-rf', temp);
+        });
+        describe('of <lib-file> elements', function() {
+            it("should copy jar files to project/libs", function () {
+                var s = spyOn(common, 'copyFile');
+
+                amazon_fireos['lib-file'].install(valid_libs[0], dummyplugin, temp);
+                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/amazon-fireos/TestLib.jar', temp, path.join('libs', 'TestLib.jar'));
+            });
+        });
+        describe('of <source-file> elements', function() {
+            beforeEach(function() {
+                shell.cp('-rf', amazon_fireos_one_project, temp);
+            });
+
+            it('should copy stuff from one location to another by calling common.copyFile', function() {
+                var source = copyArray(valid_source);
+                var s = spyOn(common, 'copyFile');
+                amazon_fireos['source-file'].install(source[0], dummyplugin, temp);
+                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/amazon-fireos/DummyPlugin.java', temp, path.join('src', 'com', 'phonegap', 'plugins', 'dummyplugin', 'DummyPlugin.java'));
+            });
+            it('should throw if source file cannot be found', function() {
+                var source = copyArray(invalid_source);
+                expect(function() {
+                    amazon_fireos['source-file'].install(source[0], faultyplugin, temp);
+                }).toThrow('"' + path.resolve(faultyplugin, 'src/amazon-fireos/NotHere.java') + '" not found!');
+            });
+            it('should throw if target file already exists', function() {
+                // write out a file
+                var target = path.resolve(temp, 'src/com/phonegap/plugins/dummyplugin');
+                shell.mkdir('-p', target);
+                target = path.join(target, 'DummyPlugin.java');
+                fs.writeFileSync(target, 'some bs', 'utf-8');
+
+                var source = copyArray(valid_source);
+                expect(function() {
+                    amazon_fireos['source-file'].install(source[0], dummyplugin, temp);
+                }).toThrow('"' + target + '" already exists!');
+            });
+        });
+    });
+
+    describe('uninstallation', function() {
+        beforeEach(function() {
+            shell.mkdir('-p', temp);
+            shell.mkdir('-p', plugins_dir);
+            shell.cp('-rf', amazon_fireos_two_project, temp);
+        });
+        afterEach(function() {
+            shell.rm('-rf', temp);
+        });
+        describe('of <lib-file> elements', function(done) {
+            it('should remove jar files', function () {
+                var s = spyOn(common, 'removeFile');
+                amazon_fireos['lib-file'].install(valid_libs[0], dummyplugin, temp);
+                amazon_fireos['lib-file'].uninstall(valid_libs[0], temp, dummy_id);
+                expect(s).toHaveBeenCalledWith(temp, path.join('libs', 'TestLib.jar'));
+            });
+        });
+        describe('of <source-file> elements', function() {
+            it('should remove stuff by calling common.deleteJava', function(done) {
+                var s = spyOn(common, 'deleteJava');
+                install('amazon-fireos', temp, dummyplugin, plugins_dir, {})
+                .then(function() {
+                    var source = copyArray(valid_source);
+                    amazon_fireos['source-file'].uninstall(source[0], temp);
+                    expect(s).toHaveBeenCalledWith(temp, path.join('src', 'com', 'phonegap', 'plugins', 'dummyplugin', 'DummyPlugin.java'));
+                    done();
+                });
+            });
+        });
+    });
+}); */

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/platforms/android.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platforms/android.spec.js b/cordova-lib/spec-plugman/platforms/android.spec.js
new file mode 100644
index 0000000..57f45fe
--- /dev/null
+++ b/cordova-lib/spec-plugman/platforms/android.spec.js
@@ -0,0 +1,156 @@
+var android = require('../../src/platforms/android'),
+    common  = require('../../src/platforms/common'),
+    install = require('../../src/install'),
+    path    = require('path'),
+    fs      = require('fs'),
+    shell   = require('shelljs'),
+    et      = require('elementtree'),
+    os      = require('osenv'),
+    temp    = path.join(os.tmpdir(), 'plugman'),
+    plugins_dir = path.join(temp, 'cordova', 'plugins'),
+    xml_helpers = require('../../src/util/xml-helpers'),
+    plugins_module = require('../../src/util/plugins'),
+    dummyplugin = path.join(__dirname, '..', 'plugins', 'DummyPlugin'),
+    faultyplugin = path.join(__dirname, '..', 'plugins', 'FaultyPlugin'),
+    variableplugin = path.join(__dirname, '..', 'plugins', 'VariablePlugin'),
+    android_one_project = path.join(__dirname, '..', 'projects', 'android_one', '*'),
+    android_two_project = path.join(__dirname, '..', 'projects', 'android_two', '*');
+
+var xml_path     = path.join(dummyplugin, 'plugin.xml')
+  , xml_text     = fs.readFileSync(xml_path, 'utf-8')
+  , plugin_et    = new et.ElementTree(et.XML(xml_text));
+
+var platformTag = plugin_et.find('./platform[@name="android"]');
+var dummy_id = plugin_et._root.attrib['id'];
+var valid_source = platformTag.findall('./source-file'),
+    valid_libs = platformTag.findall('./lib-file'),
+    valid_resources = platformTag.findall('./resource-file'),
+    assets = plugin_et.findall('./asset'),
+    configChanges = platformTag.findall('./config-file');
+
+xml_path  = path.join(faultyplugin, 'plugin.xml')
+xml_text  = fs.readFileSync(xml_path, 'utf-8')
+plugin_et = new et.ElementTree(et.XML(xml_text));
+
+platformTag = plugin_et.find('./platform[@name="android"]');
+var invalid_source = platformTag.findall('./source-file');
+var faulty_id = plugin_et._root.attrib['id'];
+
+xml_path  = path.join(variableplugin, 'plugin.xml')
+xml_text  = fs.readFileSync(xml_path, 'utf-8')
+plugin_et = new et.ElementTree(et.XML(xml_text));
+platformTag = plugin_et.find('./platform[@name="android"]');
+
+var variable_id = plugin_et._root.attrib['id'];
+var variable_configs = platformTag.findall('./config-file');
+
+function copyArray(arr) {
+    return Array.prototype.slice.call(arr, 0);
+}
+
+describe('android project handler', function() {
+    describe('www_dir method', function() {
+        it('should return cordova-android project www location using www_dir', function() {
+            expect(android.www_dir(path.sep)).toEqual(path.sep + path.join('assets', 'www'));
+        });
+    });
+    describe('package_name method', function() {
+        it('should return an android project\'s proper package name', function() {
+            expect(android.package_name(path.join(android_one_project, '..'))).toEqual('com.alunny.childapp');
+        });
+    });
+
+    describe('installation', function() {
+        beforeEach(function() {
+            shell.mkdir('-p', temp);
+        });
+        afterEach(function() {
+            shell.rm('-rf', temp);
+        });
+        describe('of <lib-file> elements', function() {
+            it("should copy jar files to project/libs", function () {
+                var s = spyOn(common, 'copyFile');
+
+                android['lib-file'].install(valid_libs[0], dummyplugin, temp);
+                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/android/TestLib.jar', temp, path.join('libs', 'TestLib.jar'));
+            });
+        });
+        describe('of <resource-file> elements', function() {
+            it("should copy files", function () {
+                var s = spyOn(common, 'copyFile');
+
+                android['resource-file'].install(valid_resources[0], dummyplugin, temp);
+                expect(s).toHaveBeenCalledWith(dummyplugin, 'android-resource.xml', temp, path.join('res', 'xml', 'dummy.xml'));
+            });
+        });
+        describe('of <source-file> elements', function() {
+            beforeEach(function() {
+                shell.cp('-rf', android_one_project, temp);
+            });
+
+            it('should copy stuff from one location to another by calling common.copyFile', function() {
+                var source = copyArray(valid_source);
+                var s = spyOn(common, 'copyFile');
+                android['source-file'].install(source[0], dummyplugin, temp);
+                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/android/DummyPlugin.java', temp, path.join('src', 'com', 'phonegap', 'plugins', 'dummyplugin', 'DummyPlugin.java'));
+            });
+            it('should throw if source file cannot be found', function() {
+                var source = copyArray(invalid_source);
+                expect(function() {
+                    android['source-file'].install(source[0], faultyplugin, temp);
+                }).toThrow('"' + path.resolve(faultyplugin, 'src/android/NotHere.java') + '" not found!');
+            });
+            it('should throw if target file already exists', function() {
+                // write out a file
+                var target = path.resolve(temp, 'src/com/phonegap/plugins/dummyplugin');
+                shell.mkdir('-p', target);
+                target = path.join(target, 'DummyPlugin.java');
+                fs.writeFileSync(target, 'some bs', 'utf-8');
+
+                var source = copyArray(valid_source);
+                expect(function() {
+                    android['source-file'].install(source[0], dummyplugin, temp);
+                }).toThrow('"' + target + '" already exists!');
+            });
+        });
+    });
+
+    describe('uninstallation', function() {
+        beforeEach(function() {
+            shell.mkdir('-p', temp);
+            shell.mkdir('-p', plugins_dir);
+            shell.cp('-rf', android_two_project, temp);
+        });
+        afterEach(function() {
+            shell.rm('-rf', temp);
+        });
+        describe('of <lib-file> elements', function(done) {
+            it('should remove jar files', function () {
+                var s = spyOn(common, 'removeFile');
+                android['lib-file'].install(valid_libs[0], dummyplugin, temp);
+                android['lib-file'].uninstall(valid_libs[0], temp, dummy_id);
+                expect(s).toHaveBeenCalledWith(temp, path.join('libs', 'TestLib.jar'));
+            });
+        });
+        describe('of <resource-file> elements', function(done) {
+            it('should remove files', function () {
+                var s = spyOn(common, 'removeFile');
+                android['resource-file'].install(valid_resources[0], dummyplugin, temp);
+                android['resource-file'].uninstall(valid_resources[0], temp, dummy_id);
+                expect(s).toHaveBeenCalledWith(temp, path.join('res', 'xml', 'dummy.xml'));
+            });
+        });
+        describe('of <source-file> elements', function() {
+            it('should remove stuff by calling common.deleteJava', function(done) {
+                var s = spyOn(common, 'deleteJava');
+                install('android', temp, dummyplugin, plugins_dir, {})
+                .then(function() {
+                    var source = copyArray(valid_source);
+                    android['source-file'].uninstall(source[0], temp);
+                    expect(s).toHaveBeenCalledWith(temp, path.join('src', 'com', 'phonegap', 'plugins', 'dummyplugin', 'DummyPlugin.java'));
+                    done();
+                });
+            });
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/platforms/blackberry10.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platforms/blackberry10.spec.js b/cordova-lib/spec-plugman/platforms/blackberry10.spec.js
new file mode 100644
index 0000000..bfdf926
--- /dev/null
+++ b/cordova-lib/spec-plugman/platforms/blackberry10.spec.js
@@ -0,0 +1,148 @@
+var blackberry10 = require('../../src/platforms/blackberry10'),
+    common = require('../../src/platforms/common'),
+    install = require('../../src/install'),
+    path = require('path'),
+    fs = require('fs'),
+    shell = require('shelljs'),
+    et = require('elementtree'),
+    os = require('osenv'),
+    temp = path.join(os.tmpdir(), 'plugman'),
+    plugins_dir = path.join(temp, 'cordova', 'plugins'),
+    xml_helpers = require('../../src/util/xml-helpers'),
+    plugins_module = require('../../src/util/plugins'),
+    blackberry10_project = path.join(__dirname, '..', 'projects', 'blackberry10', '*'),
+    plugins = {
+        dummy: parsePlugin(path.join(__dirname, '..', 'plugins', 'DummyPlugin')),
+        faulty: parsePlugin(path.join(__dirname, '..', 'plugins', 'FaultyPlugin')),
+        echo: parsePlugin(path.join(__dirname, '..', 'plugins', 'cordova.echo'))
+    };
+
+function copyArray(arr) {
+    return Array.prototype.slice.call(arr, 0);
+}
+
+function parsePlugin (pluginPath) {
+    var pluginXML = fs.readFileSync(path.join(pluginPath, "plugin.xml"), "utf-8"),
+        pluginEt = new et.ElementTree(et.XML(pluginXML)),
+        platformTag = pluginEt.find('./platform[@name="blackberry10"]');
+
+    return {
+        path: pluginPath,
+        id: pluginEt._root.attrib.id,
+        assets: pluginEt.findall('./asset'),
+        srcFiles: platformTag.findall('./source-file'),
+        configChanges: platformTag.findall('./config-file'),
+        libFiles: platformTag.findall('./lib-file')
+    };
+}
+
+
+describe('blackberry10 project handler', function() {
+    describe('www_dir method', function() {
+        it('should return cordova-blackberry10 project www location using www_dir', function() {
+            expect(blackberry10.www_dir(path.sep)).toEqual(path.sep + 'www');
+        });
+    });
+
+    describe('package_name method', function() {
+        it('should return a blackberry10 project\'s proper package name', function() {
+            expect(blackberry10.package_name(path.join(blackberry10_project, '..'))).toEqual('cordovaExample');
+        });
+    });
+
+    describe('installation', function() {
+        beforeEach(function() {
+            shell.mkdir('-p', temp);
+            shell.cp('-rf', blackberry10_project, temp);
+        });
+        afterEach(function() {
+            shell.rm('-rf', temp);
+        });
+        describe('of <lib-file> elements', function() {
+            it("should copy so files to native/target/plugins", function () {
+                var plugin = plugins.echo,
+                    libs = copyArray(plugin.libFiles),
+                    s = spyOn(common, 'copyFile');
+
+                blackberry10['lib-file'].install(libs[0], plugin.path, temp);
+                expect(s).toHaveBeenCalledWith(plugin.path, 'src/blackberry10/native/device/echoJnext.so', temp, path.join('native', 'device', 'plugins', 'jnext', 'echoJnext.so'));
+            });
+        });
+        describe('of <source-file> elements', function() {
+            it('should copy stuff from one location to another by calling common.copyFile', function() {
+                var plugin = plugins.echo,
+                    source = copyArray(plugin.srcFiles);
+                    s = spyOn(common, 'copyFile');
+
+                blackberry10['source-file'].install(source[0], plugin.path, temp, plugin.id);
+                expect(s).toHaveBeenCalledWith(plugin.path, 'src/blackberry10/index.js', temp, path.join('native', 'device', 'chrome', 'plugin', 'cordova.echo', 'index.js'));
+                expect(s).toHaveBeenCalledWith(plugin.path, 'src/blackberry10/index.js', temp, path.join('native', 'simulator', 'chrome', 'plugin', 'cordova.echo', 'index.js'));
+            });
+            it('defaults to plugin id when dest is not present', function() {
+                var source = copyArray(plugins.dummy.srcFiles);
+                var s = spyOn(common, 'copyFile');
+                blackberry10['source-file'].install(source[0], plugins.dummy.path, temp, plugins.dummy.id);
+                expect(s).toHaveBeenCalledWith(plugins.dummy.path, 'src/blackberry10/index.js', temp, path.join('native', 'device', 'chrome', 'plugin', plugins.dummy.id, 'index.js'));
+                expect(s).toHaveBeenCalledWith(plugins.dummy.path, 'src/blackberry10/index.js', temp, path.join('native', 'simulator', 'chrome', 'plugin', plugins.dummy.id, 'index.js'));
+            });
+            it('should throw if source file cannot be found', function() {
+                var source = copyArray(plugins.faulty.srcFiles);
+                expect(function() {
+                    blackberry10['source-file'].install(source[0], plugins.faulty.path, temp, plugins.faulty.id);
+                }).toThrow('"' + path.resolve(plugins.faulty.path, 'src/blackberry10/index.js') + '" not found!');
+            });
+            it('should throw if target file already exists', function() {
+                // write out a file
+                var target = path.resolve(temp, 'native/device/chrome/plugin/com.phonegap.plugins.dummyplugin');
+                shell.mkdir('-p', target);
+                target = path.join(target, 'index.js');
+                fs.writeFileSync(target, 'some bs', 'utf-8');
+
+                var source = copyArray(plugins.dummy.srcFiles);
+                expect(function() {
+                    blackberry10['source-file'].install(source[0], plugins.dummy.path, temp, plugins.dummy.id);
+                }).toThrow('"' + target + '" already exists!');
+            });
+        });
+    });
+
+    describe('uninstallation', function() {
+        beforeEach(function() {
+            shell.mkdir('-p', temp);
+            shell.cp('-rf', blackberry10_project, temp);
+        });
+        afterEach(function() {
+            shell.rm('-rf', temp);
+        });
+        describe('of <source-file> elements', function() {
+            it('should remove stuff by calling common.removeFile', function() {
+                var s = spyOn(common, 'removeFile'),
+                    plugin = plugins.echo;
+                var source = copyArray(plugin.srcFiles);
+                blackberry10['source-file'].install(source[0], plugin.path, temp, plugin.id);
+                blackberry10['source-file'].uninstall(source[0], temp, plugin.id);
+                expect(s).toHaveBeenCalledWith(temp, path.join('native', 'device', 'chrome', 'plugin', 'cordova.echo', 'index.js'));
+                expect(s).toHaveBeenCalledWith(temp, path.join('native', 'simulator', 'chrome', 'plugin', 'cordova.echo', 'index.js'));
+            });
+            it('should remove stuff by calling common.removeFile', function() {
+                var s = spyOn(common, 'removeFile'),
+                    plugin = plugins.dummy;
+                var source = copyArray(plugin.srcFiles);
+                blackberry10['source-file'].install(source[0], plugin.path, temp, plugin.id);
+                blackberry10['source-file'].uninstall(source[0], temp, plugin.id);
+                expect(s).toHaveBeenCalledWith(temp, path.join('native', 'device', 'chrome', 'plugin', plugin.id, 'index.js'));
+                expect(s).toHaveBeenCalledWith(temp, path.join('native', 'simulator', 'chrome', 'plugin', plugin.id, 'index.js'));
+            });
+        });
+        describe('of <lib-file> elements', function(done) {
+            it("should remove so files from www/plugins", function () {
+                var s = spyOn(common, 'removeFile'),
+                    plugin = plugins.echo;
+                var source = copyArray(plugin.libFiles);
+                blackberry10['lib-file'].install(source[0], plugin.path, temp, plugin.id);
+                blackberry10['lib-file'].uninstall(source[0], temp, plugin.id);
+                expect(s).toHaveBeenCalledWith(temp, path.join('native','device','plugins','jnext','echoJnext.so'));
+            });
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/platforms/common.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platforms/common.spec.js b/cordova-lib/spec-plugman/platforms/common.spec.js
new file mode 100644
index 0000000..dcf5f2a
--- /dev/null
+++ b/cordova-lib/spec-plugman/platforms/common.spec.js
@@ -0,0 +1,130 @@
+/*
+ *
+ *
+ * Licensed 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 common = require('../../src/platforms/common')
+  , path = require('path')
+  , fs = require('fs')
+  , osenv = require('osenv')
+  , shell = require('shelljs')
+  , test_dir = path.join(osenv.tmpdir(), 'test_plugman')
+  , project_dir = path.join(test_dir, 'project')
+  , src = path.join(project_dir, 'src')
+  , dest = path.join(project_dir, 'dest')
+  , java_dir = path.join(src, 'one', 'two', 'three')
+  , java_file = path.join(java_dir, 'test.java');
+
+describe('common platform handler', function() {
+    describe('resolveSrcPath', function() {
+        it('should not throw if path exists', function(){
+            shell.mkdir('-p', test_dir);
+            var target = path.join(test_dir, 'somefile');
+            fs.writeFileSync(target, '80085', 'utf-8');
+            expect(function(){common.resolveSrcPath(test_dir, 'somefile')}).not.toThrow();
+            shell.rm('-rf', test_dir);
+        });
+    });
+
+    describe('resolveTargetPath', function() {
+        it('should throw if path exists', function(){
+            shell.mkdir('-p', test_dir);
+            expect(function(){common.resolveTargetPath(test_dir)}).toThrow();
+            shell.rm('-rf', test_dir);
+        });
+
+        it('should not throw if path cannot be resolved', function(){
+            expect(function(){common.resolveTargetPath(test_dir, 'somefile')}).not.toThrow();
+        });
+    });
+
+    describe('copyFile', function() {
+        it('should throw if source path cannot be resolved', function(){
+            expect(function(){common.copyFile(test_dir, src, project_dir, dest)}).toThrow();
+        });
+
+        it('should throw if target path exists', function(){
+            shell.mkdir('-p', dest);
+            expect(function(){common.copyFile(test_dir, src, project_dir, dest)}).toThrow();
+            shell.rm('-rf', dest);
+        });
+
+        it('should call mkdir -p on target path', function(){
+            shell.mkdir('-p', java_dir);
+            fs.writeFileSync(java_file, 'contents', 'utf-8');
+
+            var s = spyOn(shell, 'mkdir').andCallThrough();
+            var resolvedDest = common.resolveTargetPath(project_dir, dest);
+
+            common.copyFile(test_dir, java_file, project_dir, dest);
+
+            expect(s).toHaveBeenCalled();
+            expect(s).toHaveBeenCalledWith('-p', path.dirname(resolvedDest));
+            shell.rm('-rf', project_dir);
+        });
+
+        it('should call cp source/dest paths', function(){
+            shell.mkdir('-p', java_dir);
+            fs.writeFileSync(java_file, 'contents', 'utf-8');
+
+            var s = spyOn(shell, 'cp').andCallThrough();
+            var resolvedDest = common.resolveTargetPath(project_dir, dest);
+
+            common.copyFile(test_dir, java_file, project_dir, dest);
+
+            expect(s).toHaveBeenCalled();
+            expect(s).toHaveBeenCalledWith('-f', java_file, resolvedDest);
+
+            shell.rm('-rf', project_dir);
+        });
+
+    });
+
+    describe('deleteJava', function() {
+        it('should call fs.unlinkSync on the provided paths', function(){
+            shell.mkdir('-p', java_dir);
+            fs.writeFileSync(java_file, 'contents', 'utf-8');
+
+            var s = spyOn(fs, 'unlinkSync').andCallThrough();
+            common.deleteJava(project_dir, java_file);
+            expect(s).toHaveBeenCalled();
+            expect(s).toHaveBeenCalledWith(path.resolve(project_dir, java_file));
+
+            shell.rm('-rf', java_dir);
+        });
+
+        it('should delete empty directories after removing source code in a java src path hierarchy', function(){
+            shell.mkdir('-p', java_dir);
+            fs.writeFileSync(java_file, 'contents', 'utf-8');
+
+            common.deleteJava(project_dir, java_file);
+            expect(fs.existsSync(java_file)).not.toBe(true);
+            expect(fs.existsSync(java_dir)).not.toBe(true);
+            expect(fs.existsSync(path.join(src,'one'))).not.toBe(true);
+
+            shell.rm('-rf', java_dir);
+        });
+
+        it('should never delete the top-level src directory, even if all plugins added were removed', function(){
+            shell.mkdir('-p', java_dir);
+            fs.writeFileSync(java_file, 'contents', 'utf-8');
+
+            common.deleteJava(project_dir, java_file);
+            expect(fs.existsSync(src)).toBe(true);
+
+            shell.rm('-rf', java_dir);
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/platforms/ios.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platforms/ios.spec.js b/cordova-lib/spec-plugman/platforms/ios.spec.js
new file mode 100644
index 0000000..e2589e0
--- /dev/null
+++ b/cordova-lib/spec-plugman/platforms/ios.spec.js
@@ -0,0 +1,390 @@
+var ios = require('../../src/platforms/ios'),
+    install = require('../../src/install'),
+    path = require('path'),
+    fs = require('fs'),
+    et = require('elementtree'),
+    shell = require('shelljs'),
+    os = require('osenv'),
+    common = require('../../src/platforms/common'),
+    xcode = require('xcode'),
+    plist = require('plist-with-patches'),
+    bplist = require('bplist-parser'),
+    temp = path.join(os.tmpdir(), 'plugman'),
+    plugins_dir = path.join(temp, 'cordova', 'plugins'),
+    ios_config_xml_project = path.join(__dirname, '..', 'projects', 'ios-config-xml', '*'),
+    ios_plist_project = path.join(__dirname, '..', 'projects', 'ios-plist', '*'),
+    ios_project = path.join(ios_config_xml_project, '..'),
+    xml_helpers = require('../../src/util/xml-helpers'),
+    variableplugin = path.join(__dirname, '..', 'plugins', 'VariablePlugin'),
+    faultyplugin = path.join(__dirname, '..', 'plugins', 'FaultyPlugin'),
+    plistplugin = path.join(__dirname, '..', 'plugins', 'PluginsPlistOnly'),
+    dummyplugin = path.join(__dirname, '..', 'plugins', 'DummyPlugin');
+
+var xml_path = path.join(dummyplugin, 'plugin.xml'),
+    xml_test = fs.readFileSync(xml_path, 'utf-8'),
+    plugin_et = new et.ElementTree(et.XML(xml_test));
+
+var platformTag = plugin_et.find('./platform[@name="ios"]');
+var dummy_id = plugin_et._root.attrib['id'];
+var valid_source = platformTag.findall('./source-file'),
+    valid_assets = plugin_et.findall('./asset'),
+    valid_headers = platformTag.findall('./header-file'),
+    valid_resources = platformTag.findall('./resource-file'),
+    valid_custom_frameworks = platformTag.findall('./framework[@custom="true"]'),
+    valid_frameworks = platformTag.findall('./framework'),
+    plist_els = platformTag.findall('./plugins-plist'),
+    dummy_configs = platformTag.findall('./config-file');
+
+xml_path = path.join(variableplugin, 'plugin.xml');
+xml_test = fs.readFileSync(xml_path, 'utf-8');
+plugin_et = new et.ElementTree(et.XML(xml_test));
+platformTag = plugin_et.find('./platform[@name="ios"]');
+
+var variable_id = plugin_et._root.attrib['id'];
+var variable_configs = platformTag.findall('./config-file');
+
+xml_path = path.join(faultyplugin, 'plugin.xml');
+xml_test = fs.readFileSync(xml_path, 'utf-8');
+plugin_et = new et.ElementTree(et.XML(xml_test));
+platformTag = plugin_et.find('./platform[@name="ios"]');
+
+var faulty_id = plugin_et._root.attrib['id'];
+var invalid_assets = plugin_et.findall('./asset');
+var invalid_source = platformTag.findall('./source-file');
+var invalid_headers = platformTag.findall('./header-file');
+var invalid_resources = platformTag.findall('./resource-file');
+var invalid_custom_frameworks = platformTag.findall('./framework[@custom="true"]');
+var invalid_frameworks = platformTag.findall('./framework');
+
+xml_path = path.join(plistplugin, 'plugin.xml');
+xml_test = fs.readFileSync(xml_path, 'utf-8');
+plugin_et = new et.ElementTree(et.XML(xml_test));
+platformTag = plugin_et.find('./platform[@name="ios"]');
+
+var plist_id = plugin_et._root.attrib['id'];
+var plist_only_els = platformTag.findall('./plugins-plist');
+
+shell.mkdir('-p', temp);
+shell.cp('-rf', ios_config_xml_project, temp);
+var proj_files = ios.parseProjectFile(temp);
+shell.rm('-rf', temp);
+ios.purgeProjectFileCache(temp);
+
+function copyArray(arr) {
+    return Array.prototype.slice.call(arr, 0);
+}
+
+describe('ios project handler', function() {
+    beforeEach(function() {
+        shell.mkdir('-p', temp);
+        shell.mkdir('-p', plugins_dir);
+    });
+    afterEach(function() {
+        shell.rm('-rf', temp);
+        ios.purgeProjectFileCache(temp);
+    });
+
+    describe('www_dir method', function() {
+        it('should return cordova-ios project www location using www_dir', function() {
+            expect(ios.www_dir(path.sep)).toEqual(path.sep + 'www');
+        });
+    });
+
+    describe('package_name method', function() {
+        it('should return the CFBundleIdentifier from the project\'s Info.plist file', function() {
+            expect(ios.package_name(ios_project)).toEqual('com.example.friendstring');
+        });
+    });
+
+    describe('parseProjectFile method', function () {
+        it('should throw if project is not an xcode project', function() {
+            expect(function() {
+                ios.parseProjectFile(temp);
+            }).toThrow('does not appear to be an xcode project (no xcode project file)');
+        });
+        it('should throw if project does not contain an appropriate PhoneGap/Cordova.plist file or config.xml file', function() {
+            shell.cp('-rf', ios_config_xml_project, temp);
+            shell.rm(path.join(temp, 'SampleApp', 'config.xml'));
+
+            expect(function() {
+                ios.parseProjectFile(temp);
+            }).toThrow('could not find PhoneGap/Cordova plist file, or config.xml file.');
+        });
+    });
+
+    describe('installation', function() {
+        describe('of <source-file> elements', function() {
+            beforeEach(function() {
+                shell.cp('-rf', ios_config_xml_project, temp);
+            });
+
+            it('should throw if source-file src cannot be found', function() {
+                var source = copyArray(invalid_source);
+                expect(function() {
+                    ios['source-file'].install(source[1], faultyplugin, temp, faulty_id, proj_files);
+                }).toThrow('cannot find "' + path.resolve(faultyplugin, 'src/ios/FaultyPluginCommand.m') + '" ios <source-file>');
+            });
+            it('should throw if source-file target already exists', function() {
+                var source = copyArray(valid_source);
+                var target = path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'DummyPluginCommand.m');
+                shell.mkdir('-p', path.dirname(target));
+                fs.writeFileSync(target, 'some bs', 'utf-8');
+                expect(function() {
+                    ios['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
+                }).toThrow('target destination "' + target + '" already exists');
+            });
+            it('should call into xcodeproj\'s addSourceFile appropriately when element has no target-dir', function() {
+                var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] == undefined});
+                var spy = spyOn(proj_files.xcode, 'addSourceFile');
+                ios['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
+                expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'DummyPluginCommand.m'), {});
+            });
+            it('should call into xcodeproj\'s addSourceFile appropriately when element has a target-dir', function() {
+                var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] != undefined});
+                var spy = spyOn(proj_files.xcode, 'addSourceFile');
+                ios['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
+                expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'targetDir', 'TargetDirTest.m'), {});
+            });
+            it('should cp the file to the right target location when element has no target-dir', function() {
+                var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] == undefined});
+                var spy = spyOn(shell, 'cp');
+                ios['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
+                expect(spy).toHaveBeenCalledWith(path.join(dummyplugin, 'src', 'ios', 'DummyPluginCommand.m'), path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'DummyPluginCommand.m'));
+            });
+            it('should cp the file to the right target location when element has a target-dir', function() {
+                var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] != undefined});
+                var spy = spyOn(shell, 'cp');
+                ios['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
+                expect(spy).toHaveBeenCalledWith(path.join(dummyplugin, 'src', 'ios', 'TargetDirTest.m'), path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'targetDir', 'TargetDirTest.m'));
+            });
+            it('should call into xcodeproj\'s addFramework appropriately when element has framework=true set', function() {
+                var source = copyArray(valid_source).filter(function(s) { return s.attrib['framework'] == "true"});
+                spyOn(proj_files.xcode, 'addSourceFile');
+                var spy = spyOn(proj_files.xcode, 'addFramework');
+                ios['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
+                expect(spy).toHaveBeenCalledWith(path.join('SampleApp', 'Plugins', dummy_id, 'SourceWithFramework.m'), {weak:false});
+            });
+        });
+
+        describe('of <header-file> elements', function() {
+            beforeEach(function() {
+                shell.cp('-rf', ios_config_xml_project, temp);
+            });
+
+            it('should throw if header-file src cannot be found', function() {
+                var headers = copyArray(invalid_headers);
+                expect(function() {
+                    ios['header-file'].install(headers[1], faultyplugin, temp, faulty_id, proj_files);
+                }).toThrow('cannot find "' + path.resolve(faultyplugin, 'src/ios/FaultyPluginCommand.h') + '" ios <header-file>');
+            });
+            it('should throw if header-file target already exists', function() {
+                var headers = copyArray(valid_headers);
+                var target = path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'DummyPluginCommand.h');
+                shell.mkdir('-p', path.dirname(target));
+                fs.writeFileSync(target, 'some bs', 'utf-8');
+                expect(function() {
+                    ios['header-file'].install(headers[0], dummyplugin, temp, dummy_id, proj_files);
+                }).toThrow('target destination "' + target + '" already exists');
+            });
+            it('should call into xcodeproj\'s addHeaderFile appropriately when element has no target-dir', function() {
+                var headers = copyArray(valid_headers).filter(function(s) { return s.attrib['target-dir'] == undefined});
+                var spy = spyOn(proj_files.xcode, 'addHeaderFile');
+                ios['header-file'].install(headers[0], dummyplugin, temp, dummy_id,  proj_files);
+                expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'DummyPluginCommand.h'));
+            });
+            it('should call into xcodeproj\'s addHeaderFile appropriately when element a target-dir', function() {
+                var headers = copyArray(valid_headers).filter(function(s) { return s.attrib['target-dir'] != undefined});
+                var spy = spyOn(proj_files.xcode, 'addHeaderFile');
+                ios['header-file'].install(headers[0], dummyplugin, temp, dummy_id, proj_files);
+                expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'targetDir', 'TargetDirTest.h'));
+            });
+            it('should cp the file to the right target location when element has no target-dir', function() {
+                var headers = copyArray(valid_headers).filter(function(s) { return s.attrib['target-dir'] == undefined});
+                var spy = spyOn(shell, 'cp');
+                ios['header-file'].install(headers[0], dummyplugin, temp, dummy_id, proj_files);
+                expect(spy).toHaveBeenCalledWith(path.join(dummyplugin, 'src', 'ios', 'DummyPluginCommand.h'), path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'DummyPluginCommand.h'));
+            });
+            it('should cp the file to the right target location when element has a target-dir', function() {
+                var headers = copyArray(valid_headers).filter(function(s) { return s.attrib['target-dir'] != undefined});
+                var spy = spyOn(shell, 'cp');
+                ios['header-file'].install(headers[0], dummyplugin, temp, dummy_id, proj_files);
+                expect(spy).toHaveBeenCalledWith(path.join(dummyplugin, 'src', 'ios', 'TargetDirTest.h'), path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'targetDir', 'TargetDirTest.h'));
+            });
+        });
+
+        describe('of <resource-file> elements', function() {
+            beforeEach(function() {
+                shell.cp('-rf', ios_config_xml_project, temp);
+            });
+            it('should throw if resource-file src cannot be found', function() {
+                var resources = copyArray(invalid_resources);
+                expect(function() {
+                    ios['resource-file'].install(resources[0], faultyplugin, temp, "pluginid", proj_files);
+                }).toThrow('cannot find "' + path.resolve(faultyplugin, 'src/ios/IDontExist.bundle') + '" ios <resource-file>');
+            });
+            it('should throw if resource-file target already exists', function() {
+                var resources = copyArray(valid_resources);
+                var target = path.join(temp, 'SampleApp', 'Resources', 'DummyPlugin.bundle');
+                shell.mkdir('-p', path.dirname(target));
+                fs.writeFileSync(target, 'some bs', 'utf-8');
+                expect(function() {
+                    ios['resource-file'].install(resources[0], dummyplugin, temp, "pluginid",proj_files);
+                }).toThrow('target destination "' + target + '" already exists');
+            });
+            it('should call into xcodeproj\'s addResourceFile', function() {
+                var resources = copyArray(valid_resources);
+                var spy = spyOn(proj_files.xcode, 'addResourceFile');
+                ios['resource-file'].install(resources[0], dummyplugin, temp, "pluginid", proj_files);
+                expect(spy).toHaveBeenCalledWith(path.join('Resources', 'DummyPlugin.bundle'));
+            });
+            it('should cp the file to the right target location', function() {
+                var resources = copyArray(valid_resources);
+                var spy = spyOn(shell, 'cp');
+                ios['resource-file'].install(resources[0], dummyplugin, temp, "pluginid", proj_files);
+                expect(spy).toHaveBeenCalledWith('-R', path.join(dummyplugin, 'src', 'ios', 'DummyPlugin.bundle'), path.join(temp, 'SampleApp', 'Resources'));
+            });
+        });
+        describe('of <framework custom="true"> elements', function() {
+            beforeEach(function() {
+                shell.cp('-rf', ios_config_xml_project, temp);
+            });
+            it('should throw if framework src cannot be found', function() {
+                var frameworks = copyArray(invalid_custom_frameworks);
+                expect(function() {
+                    ios['framework'].install(frameworks[0], faultyplugin, temp, dummy_id, proj_files);
+                }).toThrow('cannot find "' + path.resolve(faultyplugin, 'src/ios/NonExistantCustomFramework.framework') + '" ios <framework>');
+            });
+            it('should throw if framework target already exists', function() {
+                var frameworks = copyArray(valid_custom_frameworks);
+                var target = path.join(temp, 'SampleApp/Plugins/com.phonegap.plugins.dummyplugin/Custom.framework');
+                shell.mkdir('-p', target);
+                expect(function() {
+                    ios['framework'].install(frameworks[0], dummyplugin, temp, dummy_id, proj_files);
+                }).toThrow('target destination "' + target + '" already exists');
+            });
+            it('should call into xcodeproj\'s addFramework', function() {
+                var frameworks = copyArray(valid_custom_frameworks);
+                var spy = spyOn(proj_files.xcode, 'addFramework');
+                ios['framework'].install(frameworks[0], dummyplugin, temp, dummy_id, proj_files);
+                expect(spy).toHaveBeenCalledWith(path.normalize('SampleApp/Plugins/com.phonegap.plugins.dummyplugin/Custom.framework'), {customFramework:true});
+            });
+            it('should cp the file to the right target location', function() {
+                var frameworks = copyArray(valid_custom_frameworks);
+                var spy = spyOn(shell, 'cp');
+                ios['framework'].install(frameworks[0], dummyplugin, temp, dummy_id, proj_files);
+                expect(spy).toHaveBeenCalledWith('-R', path.join(dummyplugin, 'src', 'ios', 'Custom.framework'),
+                                                 path.join(temp, 'SampleApp/Plugins/com.phonegap.plugins.dummyplugin'));
+            });
+        });
+    });
+
+    describe('uninstallation', function() {
+        describe('of <source-file> elements', function() {
+            it('should call into xcodeproj\'s removeSourceFile appropriately when element has no target-dir', function(){
+                var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] == undefined});
+                shell.cp('-rf', ios_config_xml_project, temp);
+                var spy = spyOn(proj_files.xcode, 'removeSourceFile');
+                ios['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
+                expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'DummyPluginCommand.m'));
+            });
+            it('should call into xcodeproj\'s removeSourceFile appropriately when element a target-dir', function(){
+                var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] != undefined});
+                shell.cp('-rf', ios_config_xml_project, temp);
+                var spy = spyOn(proj_files.xcode, 'removeSourceFile');
+                ios['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
+                expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'targetDir', 'TargetDirTest.m'));
+            });
+            it('should rm the file from the right target location when element has no target-dir', function(){
+                var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] == undefined});
+                shell.cp('-rf', ios_config_xml_project, temp);
+
+                var spy = spyOn(shell, 'rm');
+                ios['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
+                expect(spy).toHaveBeenCalledWith('-rf', path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'DummyPluginCommand.m'));
+            });
+            it('should rm the file from the right target location when element has a target-dir', function(){
+                var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] != undefined});
+                shell.cp('-rf', ios_config_xml_project, temp);
+                var spy = spyOn(shell, 'rm');
+
+                ios['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
+                expect(spy).toHaveBeenCalledWith('-rf', path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'targetDir', 'TargetDirTest.m'));
+            });
+            it('should call into xcodeproj\'s removeFramework appropriately when element framework=true set', function(){
+                var source = copyArray(valid_source).filter(function(s) { return s.attrib['framework'] == "true"});
+                shell.cp('-rf', ios_config_xml_project, temp);
+                var spy = spyOn(proj_files.xcode, 'removeFramework');
+
+                ios['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
+                expect(spy).toHaveBeenCalledWith(path.join('SampleApp', 'Plugins', dummy_id, 'SourceWithFramework.m'));
+            });
+        });
+
+        describe('of <header-file> elements', function() {
+            beforeEach(function() {
+                shell.cp('-rf', ios_config_xml_project, temp);
+            });
+            it('should call into xcodeproj\'s removeHeaderFile appropriately when element has no target-dir', function(){
+                var headers = copyArray(valid_headers).filter(function(s) { return s.attrib['target-dir'] == undefined});
+                var spy = spyOn(proj_files.xcode, 'removeHeaderFile');
+
+                ios['header-file'].uninstall(headers[0], temp, dummy_id, proj_files);
+                expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'DummyPluginCommand.h'));
+            });
+            it('should call into xcodeproj\'s removeHeaderFile appropriately when element a target-dir', function(){
+                var headers = copyArray(valid_headers).filter(function(s) { return s.attrib['target-dir'] != undefined});
+
+                var spy = spyOn(proj_files.xcode, 'removeHeaderFile');
+
+                ios['header-file'].uninstall(headers[0], temp, dummy_id, proj_files);
+                expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'targetDir', 'TargetDirTest.h'));
+            });
+            it('should rm the file from the right target location', function(){
+                var headers = copyArray(valid_headers).filter(function(s) { return s.attrib['target-dir'] != undefined});
+                var spy = spyOn(shell, 'rm');
+
+                ios['header-file'].uninstall(headers[0], temp, dummy_id, proj_files);
+                expect(spy).toHaveBeenCalledWith('-rf', path.join(temp, 'SampleApp', 'Plugins', dummy_id, 'targetDir', 'TargetDirTest.h'));
+            });
+        });
+
+        describe('of <resource-file> elements', function() {
+            beforeEach(function() {
+                shell.cp('-rf', ios_config_xml_project, temp);
+            });
+            it('should call into xcodeproj\'s removeResourceFile', function(){
+                var resources = copyArray(valid_resources);
+                var spy = spyOn(proj_files.xcode, 'removeResourceFile');
+
+                ios['resource-file'].uninstall(resources[0], temp, "pluginid", proj_files);
+                expect(spy).toHaveBeenCalledWith(path.join('Resources', 'DummyPlugin.bundle'));
+            });
+            it('should rm the file from the right target location', function(){
+                var resources = copyArray(valid_resources);
+                var spy = spyOn(shell, 'rm');
+
+                ios['resource-file'].uninstall(resources[0], temp, "pluginid", proj_files);
+                expect(spy).toHaveBeenCalledWith('-rf', path.join(temp, 'SampleApp', 'Resources', 'DummyPlugin.bundle'));
+            });
+        });
+        describe('of <framework custom="true"> elements', function() {
+            beforeEach(function() {
+                shell.cp('-rf', ios_config_xml_project, temp);
+            });
+            it('should call into xcodeproj\'s removeFramework', function(){
+                var frameworks = copyArray(valid_custom_frameworks);
+                var spy = spyOn(proj_files.xcode, 'removeFramework');
+
+                ios['framework'].uninstall(frameworks[0], temp, dummy_id, proj_files);
+                expect(spy).toHaveBeenCalledWith(path.join(temp, 'SampleApp/Plugins/com.phonegap.plugins.dummyplugin/Custom.framework'), {customFramework:true});
+            });
+            it('should rm the file from the right target location', function(){
+                var frameworks = copyArray(valid_custom_frameworks);
+                var spy = spyOn(shell, 'rm');
+
+                ios['framework'].uninstall(frameworks[0], temp, dummy_id, proj_files);
+                expect(spy).toHaveBeenCalledWith('-rf', path.join(temp, 'SampleApp/Plugins/com.phonegap.plugins.dummyplugin/Custom.framework'));
+            });
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/platforms/tizen.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platforms/tizen.spec.js b/cordova-lib/spec-plugman/platforms/tizen.spec.js
new file mode 100644
index 0000000..372e4d3
--- /dev/null
+++ b/cordova-lib/spec-plugman/platforms/tizen.spec.js
@@ -0,0 +1,54 @@
+/*
+ *
+ *
+ * Licensed 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 tizen = require('../../src/platforms/tizen'),
+	common = require('../../src/platforms/common'),
+	temp = require('temp'),
+	os = require('osenv'),
+	fs = require('fs'),
+	et = require('elementtree'),
+	path = require('path'),
+	tizen_project = path.join(__dirname, '..', 'projects', 'tizen'),
+	destination = temp.path(),
+	shell = require('shelljs'),
+	dummyPluginPath = path.join(__dirname, '..', 'plugins', 'DummyPlugin'),
+	dummyPlugin = et.XML(fs.readFileSync(
+		path.join(dummyPluginPath, 'plugin.xml'), {encoding: "utf-8"})),
+	dummySources = dummyPlugin
+		.find('./platform[@name="tizen"]')
+		.findall('./source-file');
+
+describe('Tizen project handler', function() {
+	describe('www_dir method', function() {
+		it('should append www to the directory passed in', function() {
+			expect(tizen.www_dir(path.sep)).toEqual(path.join(path.sep, 'www'));
+		});
+	});
+	describe('Manipulating project files', function() {
+		beforeEach(function() {
+			shell.cp('-rf', path.join(tizen_project, '*'), destination);
+		});
+		afterEach(function() {
+			shell.rm('-rf', destination);
+		});
+		describe('package_name method', function() {
+			it('should return the id of the config.xml root element', function() {
+				expect(tizen.package_name(destination)).toEqual("TizenTestPackage");
+			});
+		});
+	});
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/platforms/windows8.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platforms/windows8.spec.js b/cordova-lib/spec-plugman/platforms/windows8.spec.js
new file mode 100644
index 0000000..99a5cb7
--- /dev/null
+++ b/cordova-lib/spec-plugman/platforms/windows8.spec.js
@@ -0,0 +1,135 @@
+var windows8 = require('../../src/platforms/windows8'),
+    common  = require('../../src/platforms/common'),
+    install = require('../../src/install'),
+    path    = require('path'),
+    fs      = require('fs'),
+    shell   = require('shelljs'),
+    et      = require('elementtree'),
+    os      = require('osenv'),
+    temp    = path.join(os.tmpdir(), 'plugman'),
+    plugins_dir = path.join(temp, 'cordova', 'plugins'),
+    xml_helpers = require('../../src/util/xml-helpers'),
+    plugins_module = require('../../src/util/plugins'),
+    dummyplugin = path.join(__dirname, '..', 'plugins', 'DummyPlugin'),
+    faultyplugin = path.join(__dirname, '..', 'plugins', 'FaultyPlugin'),
+    windows8_project = path.join(__dirname, '..', 'projects', 'windows8');
+
+var xml_path     = path.join(dummyplugin, 'plugin.xml')
+  , xml_text     = fs.readFileSync(xml_path, 'utf-8')
+  , plugin_et    = new et.ElementTree(et.XML(xml_text));
+
+var platformTag = plugin_et.find('./platform[@name="windows8"]');
+var dummy_id = plugin_et._root.attrib['id'];
+
+var valid_source = platformTag.findall('./source-file');
+var assets = plugin_et.findall('./asset');
+
+var configChanges = platformTag.findall('./config-file');
+
+xml_path  = path.join(faultyplugin, 'plugin.xml')
+xml_text  = fs.readFileSync(xml_path, 'utf-8');
+
+plugin_et = new et.ElementTree(et.XML(xml_text));
+
+platformTag = plugin_et.find('./platform[@name="windows8"]');
+
+var invalid_source = platformTag.findall('./source-file');
+
+var faulty_id = plugin_et._root.attrib['id'];
+
+shell.mkdir('-p', temp);
+shell.cp('-rf', path.join(windows8_project, '*'), temp);
+var proj_files = windows8.parseProjectFile(temp);
+shell.rm('-rf', temp);
+
+function copyArray(arr) {
+    return Array.prototype.slice.call(arr, 0);
+}
+
+describe('windows8 project handler', function() {
+
+    beforeEach(function() {
+        shell.mkdir('-p', temp);
+        shell.mkdir('-p', plugins_dir);
+    });
+    afterEach(function() {
+        shell.rm('-rf', temp);
+    });
+
+    describe('www_dir method', function() {
+        it('should return cordova-windows8 project www location using www_dir', function() {
+            expect(windows8.www_dir(path.sep)).toEqual(path.sep + 'www');
+        });
+    });
+    describe('package_name method', function() {
+        it('should return a windows8 project\'s proper package name', function() {
+            expect(windows8.package_name(windows8_project)).toEqual("CordovaApp");
+        });
+    });
+
+    describe('parseProjectFile method', function() {
+        it('should throw if project is not an windows8 project', function() {
+            expect(function() {
+                windows8.parseProjectFile(temp);
+            }).toThrow(windows8.InvalidProjectPathError);
+        });
+    });
+
+    describe('installation', function() {
+        beforeEach(function() {
+            shell.mkdir('-p', temp);
+        });
+        afterEach(function() {
+            shell.rm('-rf', temp);
+        });
+        describe('of <source-file> elements', function() {
+            beforeEach(function() {
+                shell.cp('-rf', path.join(windows8_project, '*'), temp);
+            });
+            it('should copy stuff from one location to another by calling common.copyFile', function() {
+                var source = copyArray(valid_source);
+                var s = spyOn(common, 'copyFile');
+                windows8['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
+                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/windows8/dummer.js', temp, path.join('www', 'plugins', 'com.phonegap.plugins.dummyplugin', 'dummer.js'));
+            });
+            it('should throw if source-file src cannot be found', function() {
+                var source = copyArray(invalid_source);
+                expect(function() {
+                    windows8['source-file'].install(source[1], faultyplugin, temp, faulty_id, proj_files);
+                }).toThrow('"' + path.resolve(faultyplugin, 'src/windows8/NotHere.js') + '" not found!');
+            });
+            it('should throw if source-file target already exists', function() {
+                var source = copyArray(valid_source);
+                var target = path.join(temp, 'www', 'plugins', dummy_id, 'dummer.js');
+                shell.mkdir('-p', path.dirname(target));
+                fs.writeFileSync(target, 'some bs', 'utf-8');
+                expect(function() {
+                    windows8['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
+                }).toThrow('"' + target + '" already exists!');
+            });
+        });
+    });
+
+    describe('uninstallation', function() {
+        beforeEach(function() {
+            shell.mkdir('-p', temp);
+            shell.mkdir('-p', plugins_dir);
+            shell.cp('-rf', path.join(windows8_project, '*'), temp);
+        });
+        afterEach(function() {
+            shell.rm('-rf', temp);
+        });
+        describe('of <source-file> elements', function() {
+            it('should remove stuff by calling common.removeFile', function(done) {
+                var s = spyOn(common, 'removeFile');
+                install('windows8', temp, dummyplugin, plugins_dir, {})
+                .then(function() {
+                    var source = copyArray(valid_source);
+                    windows8['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
+                    expect(s).toHaveBeenCalledWith(temp, path.join('www', 'plugins',  'com.phonegap.plugins.dummyplugin', 'dummer.js'));
+                    done();
+                });
+            });
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/platforms/wp7.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platforms/wp7.spec.js b/cordova-lib/spec-plugman/platforms/wp7.spec.js
new file mode 100644
index 0000000..262e851
--- /dev/null
+++ b/cordova-lib/spec-plugman/platforms/wp7.spec.js
@@ -0,0 +1,129 @@
+var wp7 = require('../../src/platforms/wp7'),
+    common  = require('../../src/platforms/common'),
+    install = require('../../src/install'),
+    path    = require('path'),
+    fs      = require('fs'),
+    shell   = require('shelljs'),
+    et      = require('elementtree'),
+    os      = require('osenv'),
+    temp    = path.join(os.tmpdir(), 'plugman'),
+    plugins_dir = path.join(temp, 'cordova', 'plugins'),
+    xml_helpers = require('../../src/util/xml-helpers'),
+    plugins_module = require('../../src/util/plugins'),
+    dummyplugin = path.join(__dirname, '..', 'plugins', 'DummyPlugin'),
+    faultyplugin = path.join(__dirname, '..', 'plugins', 'FaultyPlugin'),
+    wp7_project = path.join(__dirname, '..', 'projects', 'wp7');
+
+var xml_path     = path.join(dummyplugin, 'plugin.xml')
+  , xml_text     = fs.readFileSync(xml_path, 'utf-8')
+  , plugin_et    = new et.ElementTree(et.XML(xml_text));
+
+var platformTag = plugin_et.find('./platform[@name="wp7"]');
+var dummy_id = plugin_et._root.attrib['id'];
+var valid_source = platformTag.findall('./source-file'),
+    assets = plugin_et.findall('./asset'),
+    configChanges = platformTag.findall('./config-file');
+xml_path  = path.join(faultyplugin, 'plugin.xml')
+xml_text  = fs.readFileSync(xml_path, 'utf-8')
+plugin_et = new et.ElementTree(et.XML(xml_text));
+
+platformTag = plugin_et.find('./platform[@name="wp7"]');
+var invalid_source = platformTag.findall('./source-file');
+var faulty_id = plugin_et._root.attrib['id'];
+
+shell.mkdir('-p', temp);
+shell.cp('-rf', path.join(wp7_project, '*'), temp);
+var proj_files = wp7.parseProjectFile(temp);
+shell.rm('-rf', temp);
+
+function copyArray(arr) {
+    return Array.prototype.slice.call(arr, 0);
+}
+
+describe('wp7 project handler', function() {
+
+    beforeEach(function() {
+        shell.mkdir('-p', temp);
+        shell.mkdir('-p', plugins_dir);
+    });
+    afterEach(function() {
+        shell.rm('-rf', temp);
+    });
+
+    describe('www_dir method', function() {
+        it('should return cordova-wp7 project www location using www_dir', function() {
+            expect(wp7.www_dir(path.sep)).toEqual(path.sep + 'www');
+        });
+    });
+    describe('package_name method', function() {
+        it('should return a wp7 project\'s proper package name', function() {
+            expect(wp7.package_name(wp7_project)).toEqual("{5FC10D78-8779-4EDB-9B61-1D04F0A755D4}");
+        });
+    });
+
+    describe('parseProjectFile method', function() {
+        it('should throw if project is not an wp7 project', function() {
+            expect(function() {
+                wp7.parseProjectFile(temp);
+            }).toThrow('does not appear to be a Windows Phone project (no .csproj file)');
+        });
+    });
+
+    describe('installation', function() {
+        beforeEach(function() {
+            shell.mkdir('-p', temp);
+        });
+        afterEach(function() {
+            shell.rm('-rf', temp);
+        });
+        describe('of <source-file> elements', function() {
+            beforeEach(function() {
+                shell.cp('-rf', path.join(wp7_project, '*'), temp);
+            });
+            it('should copy stuff from one location to another by calling common.copyFile', function() {
+                var source = copyArray(valid_source);
+                var s = spyOn(common, 'copyFile');
+                wp7['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
+                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/wp7/DummyPlugin.cs', temp, path.join('Plugins', 'com.phonegap.plugins.dummyplugin', 'DummyPlugin.cs'));
+            });
+            it('should throw if source-file src cannot be found', function() {
+                var source = copyArray(invalid_source);
+                expect(function() {
+                    wp7['source-file'].install(source[1], faultyplugin, temp, faulty_id, proj_files);
+                }).toThrow('"' + path.resolve(faultyplugin, 'src/wp7/NotHere.cs') + '" not found!');
+            });
+            it('should throw if source-file target already exists', function() {
+                var source = copyArray(valid_source);
+                var target = path.join(temp, 'Plugins', dummy_id, 'DummyPlugin.cs');
+                shell.mkdir('-p', path.dirname(target));
+                fs.writeFileSync(target, 'some bs', 'utf-8');
+                expect(function() {
+                    wp7['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
+                }).toThrow('"' + target + '" already exists!');
+            });
+        });
+    });
+
+    describe('uninstallation', function() {
+        beforeEach(function() {
+            shell.mkdir('-p', temp);
+            shell.mkdir('-p', plugins_dir);
+            shell.cp('-rf', path.join(wp7_project, '*'), temp);
+        });
+        afterEach(function() {
+            shell.rm('-rf', temp);
+        });
+        describe('of <source-file> elements', function() {
+            it('should remove stuff by calling common.removeFile', function(done) {
+                var s = spyOn(common, 'removeFile');
+                install('wp7', temp, dummyplugin, plugins_dir, {})
+                .then(function() {
+                    var source = copyArray(valid_source);
+                    wp7['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
+                    expect(s).toHaveBeenCalledWith(temp, path.join('Plugins', 'com.phonegap.plugins.dummyplugin', 'DummyPlugin.cs'));
+                    done();
+                });
+            });
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/platforms/wp8.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platforms/wp8.spec.js b/cordova-lib/spec-plugman/platforms/wp8.spec.js
new file mode 100644
index 0000000..ba9cdb4
--- /dev/null
+++ b/cordova-lib/spec-plugman/platforms/wp8.spec.js
@@ -0,0 +1,150 @@
+var wp8 = require('../../src/platforms/wp8'),
+    common  = require('../../src/platforms/common'),
+    install = require('../../src/install'),
+    path    = require('path'),
+    fs      = require('fs'),
+    shell   = require('shelljs'),
+    et      = require('elementtree'),
+    os      = require('osenv'),
+    temp    = path.join(os.tmpdir(), 'plugman'),
+    plugins_dir = path.join(temp, 'cordova', 'plugins'),
+    xml_helpers = require('../../src/util/xml-helpers'),
+    plugins_module = require('../../src/util/plugins'),
+    dummyplugin = path.join(__dirname, '..', 'plugins', 'DummyPlugin'),
+    faultyplugin = path.join(__dirname, '..', 'plugins', 'FaultyPlugin'),
+    wp8_project = path.join(__dirname, '..', 'projects', 'wp8');
+
+var xml_path     = path.join(dummyplugin, 'plugin.xml')
+  , xml_text     = fs.readFileSync(xml_path, 'utf-8')
+  , plugin_et    = new et.ElementTree(et.XML(xml_text));
+
+var platformTag = plugin_et.find('./platform[@name="wp8"]');
+var dummy_id = plugin_et._root.attrib['id'];
+var valid_source = platformTag.findall('./source-file'),
+    assets = plugin_et.findall('./asset'),
+    configChanges = platformTag.findall('./config-file');
+xml_path  = path.join(faultyplugin, 'plugin.xml')
+xml_text  = fs.readFileSync(xml_path, 'utf-8')
+plugin_et = new et.ElementTree(et.XML(xml_text));
+
+platformTag = plugin_et.find('./platform[@name="wp8"]');
+var invalid_source = platformTag.findall('./source-file');
+var faulty_id = plugin_et._root.attrib['id'];
+
+shell.mkdir('-p', temp);
+shell.cp('-rf', path.join(wp8_project, '*'), temp);
+var proj_files = wp8.parseProjectFile(temp);
+shell.rm('-rf', temp);
+
+function copyArray(arr) {
+    return Array.prototype.slice.call(arr, 0);
+}
+
+describe('wp8 project handler', function() {
+
+    beforeEach(function() {
+        shell.mkdir('-p', temp);
+        shell.mkdir('-p', plugins_dir);
+    });
+    afterEach(function() {
+        shell.rm('-rf', temp);
+    });
+
+    describe('www_dir method', function() {
+        it('should return cordova-wp8 project www location using www_dir', function() {
+            expect(wp8.www_dir(path.sep)).toEqual(path.sep + 'www');
+        });
+    });
+    describe('package_name method', function() {
+        it('should return a wp8 project\'s proper package name', function() {
+            expect(wp8.package_name(wp8_project)).toEqual("{F3A8197B-6B16-456D-B5F4-DD4F04AC0BEC}");
+        });
+    });
+
+    describe('parseProjectFile method', function() {
+        it('should throw if project is not an wp8 project', function() {
+            expect(function() {
+                wp8.parseProjectFile(temp);
+            }).toThrow('does not appear to be a Windows Phone project (no .csproj file)');
+        });
+    });
+
+    describe('installation', function() {
+        var done;
+        function installPromise(f) {
+            done = false;
+            f.then(function() { done = true; }, function(err) { done = err; });
+        }
+        beforeEach(function() {
+            shell.mkdir('-p', temp);
+        });
+        afterEach(function() {
+            shell.rm('-rf', temp);
+        });
+        describe('of <source-file> elements', function() {
+            beforeEach(function() {
+                shell.cp('-rf', path.join(wp8_project, '*'), temp);
+            });
+            it('should copy stuff from one location to another by calling common.copyFile', function() {
+                var source = copyArray(valid_source);
+                var s = spyOn(common, 'copyFile');
+                wp8['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
+                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/wp8/DummyPlugin.cs', temp, path.join('Plugins', 'com.phonegap.plugins.dummyplugin', 'DummyPlugin.cs'));
+            });
+            it('should throw if source-file src cannot be found', function() {
+                var source = copyArray(invalid_source);
+                expect(function() {
+                    wp8['source-file'].install(source[1], faultyplugin, temp, faulty_id, proj_files);
+                }).toThrow('"' + path.resolve(faultyplugin, 'src/wp8/NotHere.cs') + '" not found!');
+            });
+            it('should throw if source-file target already exists', function() {
+                var source = copyArray(valid_source);
+                var target = path.join(temp, 'Plugins', dummy_id, 'DummyPlugin.cs');
+                shell.mkdir('-p', path.dirname(target));
+                fs.writeFileSync(target, 'some bs', 'utf-8');
+                expect(function() {
+                    wp8['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
+                }).toThrow('"' + target + '" already exists!');
+            });
+        });
+        describe('of <config-changes> elements', function() {
+            beforeEach(function() {
+                shell.cp('-rf', path.join(wp8_project, '*'), temp);
+            });
+            it('should process and pass the after parameter to graftXML', function () {
+                var graftXML = spyOn(xml_helpers, 'graftXML').andCallThrough();
+
+                runs(function () { installPromise(install('wp8', temp, dummyplugin, plugins_dir, {})); });
+                waitsFor(function () { return done; }, 'install promise never resolved', 500);
+                runs(function () {
+                    expect(graftXML).toHaveBeenCalledWith(jasmine.any(Object), jasmine.any(Array), "/Deployment/App", "Tokens");
+                    expect(graftXML).toHaveBeenCalledWith(jasmine.any(Object), jasmine.any(Array), "/Deployment/App/Extensions", "Extension");
+                    expect(graftXML).toHaveBeenCalledWith(jasmine.any(Object), jasmine.any(Array), "/Deployment/App/Extensions", "FileTypeAssociation;Extension");
+                });
+            });
+        });
+    });
+
+    describe('uninstallation', function() {
+        beforeEach(function() {
+            shell.mkdir('-p', temp);
+            shell.mkdir('-p', plugins_dir);
+            shell.cp('-rf', path.join(wp8_project, '*'), temp);
+        });
+        afterEach(function() {
+            shell.rm('-rf', temp);
+        });
+        describe('of <source-file> elements', function() {
+            it('should remove stuff by calling common.removeFile', function(done) {
+                var s = spyOn(common, 'removeFile');
+                install('wp8', temp, dummyplugin, plugins_dir, {})
+                .then(function() {
+                    var source = copyArray(valid_source);
+                    wp8['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
+                    expect(s).toHaveBeenCalledWith(temp, path.join('Plugins', 'com.phonegap.plugins.dummyplugin', 'DummyPlugin.cs'));
+                    done();
+                });
+            });
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/.gitkeep b/cordova-lib/spec-plugman/plugins/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/AndroidJS/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/AndroidJS/plugin.xml b/cordova-lib/spec-plugman/plugins/AndroidJS/plugin.xml
new file mode 100644
index 0000000..1a68749
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/AndroidJS/plugin.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="com.phonegap.androidonly"
+    version="3.0.0">
+
+    <name>JavaScript in yo droidz</name>
+
+    <!-- android -->
+    <platform name="android">
+        <js-module src="www/android.js" name="Android">
+            <clobbers target="android" />
+        </js-module>
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/AndroidJS/www/android.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/AndroidJS/www/android.js b/cordova-lib/spec-plugman/plugins/AndroidJS/www/android.js
new file mode 100644
index 0000000..d268b7d
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/AndroidJS/www/android.js
@@ -0,0 +1 @@
+{};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/ChildBrowser/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/plugin.xml b/cordova-lib/spec-plugman/plugins/ChildBrowser/plugin.xml
new file mode 100644
index 0000000..2dfd692
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/ChildBrowser/plugin.xml
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed 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.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="com.phonegap.plugins.childbrowser"
+    version="0.6.0">
+
+    <name>Child Browser</name>
+
+    <asset src="www/childbrowser" target="childbrowser" />
+    <asset src="www/childbrowser_file.html" target="childbrowser_file.html" />
+
+    <js-module src="www/childbrowser.js" name="ChildBrowser">
+        <clobbers target="childbrowser" />
+    </js-module>
+
+    <config-file target="config.xml" parent="/*">
+        <access origin="build.phonegap.com" />
+        <access origin="s3.amazonaws.com" />
+    </config-file>
+    
+    <info>No matter what platform you are installing to, this notice is very important.</info>
+
+    <!-- android -->
+    <platform name="android">
+        <config-file target="AndroidManifest.xml" parent="/manifest/application">
+            <activity android:name="com.phonegap.plugins.childBrowser.ChildBrowser"
+                      android:label="@string/app_name">
+                <intent-filter>
+                </intent-filter>
+            </activity>
+        </config-file>
+
+        <!-- CDV < 2.0 -->
+        <config-file target="res/xml/plugins.xml" parent="/plugins">
+            <plugin name="ChildBrowser"
+                value="com.phonegap.plugins.childBrowser.ChildBrowser"/>
+        </config-file>
+
+        <!-- CDV 2.0+ (for now) -->
+        <config-file target="res/xml/config.xml" parent="/cordova/plugins">
+            <plugin name="ChildBrowser"
+                value="com.phonegap.plugins.childBrowser.ChildBrowser"/>
+        </config-file>
+
+        <source-file src="src/android/ChildBrowser.java"
+                target-dir="src/com/phonegap/plugins/childBrowser" />
+        <info>Please make sure you read this because it is very important to complete the installation of your plugin.</info>
+    </platform>
+
+    <!-- ios -->
+    <platform name="ios">
+        <plugins-plist key="com.phonegap.plugins.childbrowser"
+            string="ChildBrowserCommand" />
+
+        <config-file target="config.xml" parent="/widget/plugins">
+            <plugin name="ChildBrowser"
+                value="ChildBrowserCommand" />
+        </config-file>
+
+        <resource-file src="src/ios/ChildBrowser.bundle" />
+        <resource-file src="src/ios/ChildBrowserViewController.xib" />
+
+        <config-file target="*-Info.plist" parent="AppId">
+            <string>$APP_ID</string>
+        </config-file>
+        
+        <config-file target="*-Info.plist" parent="CFBundleURLTypes">
+            <array>
+              <dict>
+                <key>PackageName</key>
+                <string>$PACKAGE_NAME</string>
+              </dict>
+            </array>
+        </config-file>
+
+        <header-file src="src/ios/ChildBrowserCommand.h" />
+        <header-file src="src/ios/ChildBrowserViewController.h" />
+        <header-file src="src/ios/TargetDirTest.h" target-dir="targetDir"/>
+
+        <source-file src="src/ios/ChildBrowserCommand.m" />
+        <source-file src="src/ios/ChildBrowserViewController.m" />
+        <source-file src="src/ios/preserveDirs/PreserveDirsTest.m" preserve-dirs="true" />
+        <header-file src="src/ios/TargetDirTest.m" target-dir="targetDir"/>
+
+        <!-- framework for testing (not actual dependency of ChildBrowser -->
+        <framework src="libsqlite3.dylib" />
+        <framework src="social.framework" weak="true" />
+        <framework src="music.framework" weak="rabbit" />
+        <framework src="Custom.framework" custom="true" />
+    </platform>
+    <!-- wp7 -->
+    <platform name="wp7">
+        <resource-file src="src\wp7\Images\appbar.back.rest.png" />
+        <config-file target="config.xml" parent="/widget/plugins">
+            <plugin name="ChildBrowser"
+                value="ChildBrowser"/>
+        </config-file>
+
+        <source-file src="src\wp7\ChildBrowserCommand.cs"
+                     target-dir="Plugins\" />
+
+        <!-- modify the project file to include the added files -->
+        <config-file target=".csproj" parent=".">  
+        </config-file> 
+
+    </platform>
+
+    <!-- wp8 -->
+    <platform name="wp8">
+        <resource-file src="src\wp7\Images\appbar.back.rest.png" />
+        <config-file target="config.xml" parent="/widget/plugins">
+            <plugin name="ChildBrowser"
+                value="ChildBrowser"/>
+        </config-file>
+
+        <source-file src="src\wp7\ChildBrowserCommand.cs"
+                     target-dir="Plugins\" />
+
+        <!-- modify the project file to include the added files -->
+        <config-file target=".csproj" parent=".">  
+        </config-file> 
+
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/ChildBrowser/src/android/ChildBrowser.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/android/ChildBrowser.java b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/android/ChildBrowser.java
new file mode 100644
index 0000000..5263b0c
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/android/ChildBrowser.java
@@ -0,0 +1,19 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed 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.
+ *
+*/
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_left.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_left.png b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_left.png
new file mode 100644
index 0000000..530e12b
Binary files /dev/null and b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_left.png differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_left@2x.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_left@2x.png b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_left@2x.png
new file mode 100644
index 0000000..530e12b
Binary files /dev/null and b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_left@2x.png differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_right.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_right.png b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_right.png
new file mode 100644
index 0000000..8b3d855
Binary files /dev/null and b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_right.png differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_right@2x.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_right@2x.png b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_right@2x.png
new file mode 100644
index 0000000..8b3d855
Binary files /dev/null and b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/arrow_right@2x.png differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/but_refresh.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/but_refresh.png b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/but_refresh.png
new file mode 100644
index 0000000..309b6bd
Binary files /dev/null and b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/but_refresh.png differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/but_refresh@2x.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/but_refresh@2x.png b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/but_refresh@2x.png
new file mode 100644
index 0000000..309b6bd
Binary files /dev/null and b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/but_refresh@2x.png differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/compass.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/compass.png b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/compass.png
new file mode 100644
index 0000000..46a8901
Binary files /dev/null and b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/compass.png differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/compass@2x.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/compass@2x.png b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/compass@2x.png
new file mode 100644
index 0000000..46a8901
Binary files /dev/null and b/cordova-lib/spec-plugman/plugins/ChildBrowser/src/ios/ChildBrowser.bundle/compass@2x.png differ


[47/70] Remove all cordova-lib files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/util/config-changes.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/config-changes.js b/cordova-lib/src/plugman/util/config-changes.js
deleted file mode 100644
index 67adfb6..0000000
--- a/cordova-lib/src/plugman/util/config-changes.js
+++ /dev/null
@@ -1,812 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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 module deals with shared configuration / dependency "stuff". That is:
- * - XML configuration files such as config.xml, AndroidManifest.xml or WMAppManifest.xml.
- * - plist files in iOS
- * - pbxproj files in iOS
- * Essentially, any type of shared resources that we need to handle with awareness
- * of how potentially multiple plugins depend on a single shared resource, should be
- * handled in this module.
- *
- * The implementation uses an object as a hash table, with "leaves" of the table tracking
- * reference counts.
- */
-
-/* jshint node:true, sub:true, unused:true, indent:4  */
-
-var fs   = require('fs'),
-    path = require('path'),
-    glob = require('glob'),
-    plist = require('plist-with-patches'),
-    bplist = require('bplist-parser'),
-    xcode = require('xcode'),
-    et   = require('elementtree'),
-    _ = require('underscore'),
-    xml_helpers = require('./../util/xml-helpers'),
-    platforms = require('./../platforms'),
-    events = require('./../events'),
-    plist_helpers = require('./../util/plist-helpers');
-
-
-// These frameworks are required by cordova-ios by default. We should never add/remove them.
-var keep_these_frameworks = [
-    'MobileCoreServices.framework',
-    'CoreGraphics.framework',
-    'CoreLocation.framework',
-    'AssetsLibrary.framework'
-];
-
-
-exports.PlatformMunger = PlatformMunger;
-
-/******************************************************************************
-Adapters to keep the current refactoring effort to within this file
-******************************************************************************/
-exports.add_plugin_changes = function(platform, project_dir, plugins_dir, plugin_id, plugin_vars, is_top_level, should_increment, cache) {
-    var munger = new PlatformMunger(platform, project_dir, plugins_dir);
-    munger.add_plugin_changes(plugin_id, plugin_vars, is_top_level, should_increment, cache);
-    munger.save_all();
-};
-
-exports.remove_plugin_changes = function(platform, project_dir, plugins_dir, plugin_name, plugin_id, is_top_level, should_decrement) {
-    // TODO: should_decrement parameter is never used, remove it here and wherever called
-    var munger = new PlatformMunger(platform, project_dir, plugins_dir);
-    munger.remove_plugin_changes(plugin_name, plugin_id, is_top_level);
-    munger.save_all();
-};
-
-exports.process = function(plugins_dir, project_dir, platform) {
-    var munger = new PlatformMunger(platform, project_dir, plugins_dir);
-    munger.process();
-    munger.save_all();
-};
-
-exports.get_munge_change = function(munge, keys) {
-    return deep_find.apply(null, arguments);
-}
-
-/******************************************************************************/
-
-
-exports.add_installed_plugin_to_prepare_queue = add_installed_plugin_to_prepare_queue;
-function add_installed_plugin_to_prepare_queue(plugins_dir, plugin, platform, vars, is_top_level) {
-    checkPlatform(platform);
-    var config = exports.get_platform_json(plugins_dir, platform);
-    config.prepare_queue.installed.push({'plugin':plugin, 'vars':vars, 'topLevel':is_top_level});
-    exports.save_platform_json(config, plugins_dir, platform);
-}
-
-exports.add_uninstalled_plugin_to_prepare_queue = add_uninstalled_plugin_to_prepare_queue;
-function add_uninstalled_plugin_to_prepare_queue(plugins_dir, plugin, platform, is_top_level) {
-    checkPlatform(platform);
-
-    var plugin_xml = xml_helpers.parseElementtreeSync(path.join(plugins_dir, plugin, 'plugin.xml'));
-    var config = exports.get_platform_json(plugins_dir, platform);
-    config.prepare_queue.uninstalled.push({'plugin':plugin, 'id':plugin_xml.getroot().attrib['id'], 'topLevel':is_top_level});
-    exports.save_platform_json(config, plugins_dir, platform);
-}
-
-
-/******************************************************************************
-* PlatformMunger class
-*
-* Can deal with config file of a single project.
-* Parsed config files are cached in a ConfigKeeper object.
-******************************************************************************/
-function PlatformMunger(platform, project_dir, plugins_dir) {
-    checkPlatform(platform);
-    this.platform = platform;
-    this.project_dir = project_dir;
-    this.plugins_dir = plugins_dir;
-    this.platform_handler = platforms[platform];
-    this.config_keeper = new ConfigKeeper();
-}
-
-// Write out all unsaved files.
-PlatformMunger.prototype.save_all = PlatformMunger_save_all;
-function PlatformMunger_save_all() {
-    this.config_keeper.save_all();
-}
-
-// Apply a munge object to a single config file.
-// The remove parameter tells whether to add the change or remove it.
-PlatformMunger.prototype.apply_file_munge = PlatformMunger_apply_file_munge;
-function PlatformMunger_apply_file_munge(file, munge, remove) {
-    var self = this;
-    var xml_child;
-
-    if ( file === 'framework' && self.platform === 'ios' ) {
-        // ios pbxproj file
-        var pbxproj = self.config_keeper.get(self.project_dir, self.platform, 'framework');
-        for (var src in munge.parents) {
-            for (xml_child in munge.parents[src]) {
-                var xml = munge.parents[src][xml_child].xml;
-                // Only add the framework if it's not a cordova-ios core framework
-                if (keep_these_frameworks.indexOf(src) == -1) {
-                    // xml_child in this case is whether the framework should use weak or not
-                    if (remove) {
-                        pbxproj.data.removeFramework(src);
-                    } else {
-                        pbxproj.data.addFramework(src, {weak: (xml === 'true')});
-                    }
-                    pbxproj.is_changed = true;
-                }
-            }
-        }
-    } else {
-        // all other types of files
-        for (var selector in munge.parents) {
-            for (xml_child in munge.parents[selector]) {
-                // this xml child is new, graft it (only if config file exists)
-                var config_file = self.config_keeper.get(self.project_dir, self.platform, file);
-                if (config_file.exists) {
-                    if (remove) config_file.prune_child(selector, munge.parents[selector][xml_child]);
-                    else config_file.graft_child(selector, munge.parents[selector][xml_child]);
-                }
-            }
-        }
-    }
-}
-
-
-PlatformMunger.prototype.remove_plugin_changes = remove_plugin_changes;
-function remove_plugin_changes(plugin_name, plugin_id, is_top_level) {
-    var self = this;
-    var platform_config = exports.get_platform_json(self.plugins_dir, self.platform);
-    var plugin_dir = path.join(self.plugins_dir, plugin_name);
-    var plugin_vars = (is_top_level ? platform_config.installed_plugins[plugin_id] : platform_config.dependent_plugins[plugin_id]);
-
-    // get config munge, aka how did this plugin change various config files
-    var config_munge = self.generate_plugin_config_munge(plugin_dir, plugin_vars);
-    // global munge looks at all plugins' changes to config files
-    var global_munge = platform_config.config_munge;
-    var munge = decrement_munge(global_munge, config_munge);
-
-    for (var file in munge.files) {
-        if (file == 'plugins-plist' && self.platform == 'ios') {
-            // TODO: remove this check and <plugins-plist> sections in spec/plugins/../plugin.xml files.
-            events.emit(
-                'warn',
-                'WARNING: Plugin "' + plugin_id + '" uses <plugins-plist> element(s), ' +
-                'which are no longer supported. Support has been removed as of Cordova 3.4.'
-            );
-            continue;
-        }
-        self.apply_file_munge(file, munge.files[file], /* remove = */ true);
-    }
-
-    // Remove from installed_plugins
-    if (is_top_level) {
-        delete platform_config.installed_plugins[plugin_id];
-    } else {
-        delete platform_config.dependent_plugins[plugin_id];
-    }
-
-    // save
-    exports.save_platform_json(platform_config, self.plugins_dir, self.platform);
-}
-
-
-PlatformMunger.prototype.add_plugin_changes = add_plugin_changes;
-function add_plugin_changes(plugin_id, plugin_vars, is_top_level, should_increment) {
-    var self = this;
-    var platform_config = exports.get_platform_json(self.plugins_dir, self.platform);
-    var plugin_dir = path.join(self.plugins_dir, plugin_id);
-
-    var plugin_config = self.config_keeper.get(plugin_dir, '', 'plugin.xml');
-    plugin_id = plugin_config.data.getroot().attrib.id;
-
-    // get config munge, aka how should this plugin change various config files
-    var config_munge = self.generate_plugin_config_munge(plugin_dir, plugin_vars);
-    // global munge looks at all plugins' changes to config files
-
-    // TODO: The should_increment param is only used by cordova-cli and is going away soon.
-    // If should_increment is set to false, avoid modifying the global_munge (use clone)
-    // and apply the entire config_munge because it's already a proper subset of the global_munge.
-    var munge, global_munge;
-    if (should_increment) {
-        global_munge = platform_config.config_munge;
-        munge = increment_munge(global_munge, config_munge);
-    } else {
-        global_munge = clone_munge(platform_config.config_munge);
-        munge = config_munge;
-    }
-
-    for (var file in munge.files) {
-        // TODO: remove this warning some time after 3.4 is out.
-        if (file == 'plugins-plist' && self.platform == 'ios') {
-            events.emit(
-                'warn',
-                'WARNING: Plugin "' + plugin_id + '" uses <plugins-plist> element(s), ' +
-                'which are no longer supported. Support has been removed as of Cordova 3.4.'
-            );
-            continue;
-        }
-        self.apply_file_munge(file, munge.files[file]);
-    }
-
-    // Move to installed_plugins if it is a top-level plugin
-    if (is_top_level) {
-        platform_config.installed_plugins[plugin_id] = plugin_vars || {};
-    } else {
-        platform_config.dependent_plugins[plugin_id] = plugin_vars || {};
-    }
-
-    // save
-    exports.save_platform_json(platform_config, self.plugins_dir, self.platform);
-}
-
-
-// Load the global munge from platform json and apply all of it.
-// Used by cordova prepare to re-generate some config file from platform
-// defaults and the global munge.
-PlatformMunger.prototype.reapply_global_munge = reapply_global_munge ;
-function reapply_global_munge () {
-    var self = this;
-
-    var platform_config = exports.get_platform_json(self.plugins_dir, self.platform);
-    var global_munge = platform_config.config_munge;
-    for (var file in global_munge.files) {
-        // TODO: remove this warning some time after 3.4 is out.
-        if (file == 'plugins-plist' && self.platform == 'ios') {
-            events.emit(
-                'warn',
-                'WARNING: One of your plugins uses <plugins-plist> element(s), ' +
-                'which are no longer supported. Support has been removed as of Cordova 3.4.'
-            );
-            continue;
-        }
-
-        self.apply_file_munge(file, global_munge.files[file]);
-    }
-}
-
-
-// generate_plugin_config_munge
-// Generate the munge object from plugin.xml + vars
-PlatformMunger.prototype.generate_plugin_config_munge = generate_plugin_config_munge;
-function generate_plugin_config_munge(plugin_dir, vars) {
-    var self = this;
-
-    vars = vars || {};
-    // Add PACKAGE_NAME variable into vars
-    if (!vars['PACKAGE_NAME']) {
-        vars['PACKAGE_NAME'] = self.platform_handler.package_name(self.project_dir);
-    }
-
-    var munge = { files: {} };
-    var plugin_config = self.config_keeper.get(plugin_dir, '', 'plugin.xml');
-    var plugin_xml = plugin_config.data;
-
-    var platformTag = plugin_xml.find('platform[@name="' + self.platform + '"]');
-    var changes = [];
-    // add platform-agnostic config changes
-    changes = changes.concat(plugin_xml.findall('config-file'));
-    if (platformTag) {
-        // add platform-specific config changes if they exist
-        changes = changes.concat(platformTag.findall('config-file'));
-
-        // note down pbxproj framework munges in special section of munge obj
-        // CB-5238 this is only for systems frameworks
-        var frameworks = platformTag.findall('framework');
-        frameworks.forEach(function(f) {
-            var custom = f.attrib['custom'];
-            if(!custom) {
-                var file = f.attrib['src'];
-                var weak = ('true' == f.attrib['weak']).toString();
-
-                deep_add(munge, 'framework', file, { xml: weak, count: 1 });
-            }
-        });
-    }
-
-    changes.forEach(function(change) {
-        var target = change.attrib['target'];
-        var parent = change.attrib['parent'];
-        var after = change.attrib['after'];
-        var xmls = change.getchildren();
-		xmls.forEach(function(xml) {
-            // 1. stringify each xml
-            var stringified = (new et.ElementTree(xml)).write({xml_declaration:false});
-            // interp vars
-            if (vars) {
-                Object.keys(vars).forEach(function(key) {
-                    var regExp = new RegExp("\\$" + key, "g");
-                    stringified = stringified.replace(regExp, vars[key]);
-                });
-            }
-            // 2. add into munge
-            deep_add(munge, target, parent, { xml: stringified, count: 1, after: after });
-        });
-    });
-    return munge;
-}
-
-// Go over the prepare queue an apply the config munges for each plugin
-// that has been (un)installed.
-PlatformMunger.prototype.process = PlatformMunger_process;
-function PlatformMunger_process() {
-    var self = this;
-
-    var platform_config = exports.get_platform_json(self.plugins_dir, self.platform);
-
-    // Uninstallation first
-    platform_config.prepare_queue.uninstalled.forEach(function(u) {
-        self.remove_plugin_changes(u.plugin, u.id, u.topLevel);
-    });
-
-    // Now handle installation
-    platform_config.prepare_queue.installed.forEach(function(u) {
-        self.add_plugin_changes(u.plugin, u.vars, u.topLevel, true);
-    });
-
-    platform_config = exports.get_platform_json(self.plugins_dir, self.platform);
-
-    // Empty out installed/ uninstalled queues.
-    platform_config.prepare_queue.uninstalled = [];
-    platform_config.prepare_queue.installed = [];
-    // save platform json
-    exports.save_platform_json(platform_config, self.plugins_dir, self.platform);
-}
-/**** END of PlatformMunger ****/
-
-
-/******************************************************************************
-* ConfigKeeper class
-*
-* Used to load and store config files to avoid re-parsing and writing them out
-* multiple times.
-*
-* The config files are referred to by a fake path constructed as
-* project_dir/platform/file
-* where file is the name used for the file in config munges.
-******************************************************************************/
-function ConfigKeeper() {
-    this._cached = {};
-}
-
-ConfigKeeper.prototype.get = ConfigKeeper_get;
-function ConfigKeeper_get(project_dir, platform, file) {
-    var self = this;
-
-    //This fixes a bug with older plugins - when specifying config xml instead of res/xml/config.xml
-    //https://issues.apache.org/jira/browse/CB-6414
-    if(file == 'config.xml' && platform == 'android'){
-        file = 'res/xml/config.xml';
-    }
-    var fake_path = path.join(project_dir, platform, file);
-
-    if (self._cached[fake_path]) {
-        return self._cached[fake_path];
-    }
-    // File was not cached, need to load.
-    var config_file = new ConfigFile(project_dir, platform, file);
-    self._cached[fake_path] = config_file;
-    return config_file;
-}
-
-
-ConfigKeeper.prototype.save_all = ConfigKeeper_save_all;
-function ConfigKeeper_save_all() {
-    var self = this;
-    Object.keys(self._cached).forEach(function (fake_path) {
-        var config_file = self._cached[fake_path];
-        if (config_file.is_changed) config_file.save();
-    });
-}
-/**** END of ConfigKeeper ****/
-
-// TODO: move save/get_platform_json to be part of ConfigKeeper or ConfigFile
-// For now they are used in many places in plugman and cordova-cli and can
-// save the file bypassing the ConfigKeeper's cache.
-exports.get_platform_json = get_platform_json;
-function get_platform_json(plugins_dir, platform) {
-    checkPlatform(platform);
-
-    var filepath = path.join(plugins_dir, platform + '.json');
-    if (fs.existsSync(filepath)) {
-        return fix_munge(JSON.parse(fs.readFileSync(filepath, 'utf-8')));
-    } else {
-        var config = {
-            prepare_queue:{installed:[], uninstalled:[]},
-            config_munge:{},
-            installed_plugins:{},
-            dependent_plugins:{}
-        };
-        return config;
-    }
-}
-
-exports.save_platform_json = save_platform_json;
-function save_platform_json(config, plugins_dir, platform) {
-    checkPlatform(platform);
-    var filepath = path.join(plugins_dir, platform + '.json');
-    fs.writeFileSync(filepath, JSON.stringify(config, null, 4), 'utf-8');
-}
-
-
-// convert a munge from the old format ([file][parent][xml] = count) to the current one
-function fix_munge(platform_config) {
-    var munge = platform_config.config_munge;
-    if (!munge.files) {
-        var new_munge = { files: {} };
-        for (var file in munge) {
-            for (var selector in munge[file]) {
-                for (var xml_child in munge[file][selector]) {
-                    var val = parseInt(munge[file][selector][xml_child]);
-                    for (var i = 0; i < val; i++) {
-                        deep_add(new_munge, [file, selector, { xml: xml_child, count: val }]);
-                    }
-                }
-            }
-        }
-        platform_config.config_munge = new_munge;
-    }
-
-    return platform_config;
-}
-
-/**** END of ConfigKeeper ****/
-
-
-/******************************************************************************
-* ConfigFile class
-*
-* Can load and keep various types of config files. Provides some functionality
-* specific to some file types such as grafting XML children. In most cases it
-* should be instantiated by ConfigKeeper.
-*
-* For plugin.xml files use as:
-* plugin_config = self.config_keeper.get(plugin_dir, '', 'plugin.xml');
-*
-* TODO: Consider moving it out to a separate file and maybe partially with
-* overrides in platform handlers.
-******************************************************************************/
-function ConfigFile(project_dir, platform, file_tag) {
-    this.project_dir = project_dir;
-    this.platform = platform;
-    this.file_tag = file_tag;
-    this.is_changed = false;
-
-    this.load();
-}
-
-// ConfigFile.load()
-ConfigFile.prototype.load = ConfigFile_load;
-function ConfigFile_load() {
-    var self = this;
-
-    // config file may be in a place not exactly specified in the target
-    var filepath = self.filepath = resolveConfigFilePath(self.project_dir, self.platform, self.file_tag);
-
-    if ( !filepath || !fs.existsSync(filepath) ) {
-        self.exists = false;
-        return;
-    }
-    self.exists = true;
-    var ext = path.extname(filepath);
-    // Windows8 uses an appxmanifest, and wp8 will likely use
-    // the same in a future release
-    if (ext == '.xml' || ext == '.appxmanifest') {
-        self.type = 'xml';
-        self.data = xml_helpers.parseElementtreeSync(filepath);
-    } else if (ext == '.pbxproj') {
-        self.type = 'pbxproj';
-        self.data = xcode.project(filepath);
-        self.data.parseSync();
-    } else {
-        // plist file
-        self.type = 'plist';
-        // TODO: isBinaryPlist() reads the file and then parse re-reads it again.
-        //       We always write out text plist, not binary.
-        //       Do we still need to support binary plist?
-        //       If yes, use plist.parseStringSync() and read the file once.
-        self.plist_module = (isBinaryPlist(filepath) ? bplist : plist);
-        self.data = self.plist_module.parseFileSync(filepath);
-    }
-}
-
-// ConfigFile.save()
-ConfigFile.prototype.save = ConfigFile_save;
-function ConfigFile_save() {
-    var self = this;
-    if (self.type === 'xml') {
-        fs.writeFileSync(self.filepath, self.data.write({indent: 4}), 'utf-8');
-    } else if (self.type === 'pbxproj') {
-        fs.writeFileSync(self.filepath, self.data.writeSync());
-    } else {
-        // plist
-        var regExp = new RegExp("<string>[ \t\r\n]+?</string>", "g");
-        fs.writeFileSync(self.filepath, plist.build(self.data).replace(regExp, "<string></string>"));
-    }
-    self.is_changed = false;
-}
-
-// ConfigFile.graft_child()
-ConfigFile.prototype.graft_child = ConfigFile_graft_child;
-function ConfigFile_graft_child(selector, xml_child) {
-    var self = this;
-    var filepath = self.filepath;
-    var result;
-    if (self.type === 'xml') {
-        var xml_to_graft = [et.XML(xml_child.xml)];
-        result = xml_helpers.graftXML(self.data, xml_to_graft, selector, xml_child.after);
-        if ( !result) {
-            throw new Error('grafting xml at selector "' + selector + '" from "' + filepath + '" during config install went bad :(');
-        }
-    } else {
-        // plist file
-        result = plist_helpers.graftPLIST(self.data, xml_child.xml, selector);
-        if ( !result ) {
-            throw new Error('grafting to plist "' + filepath + '" during config install went bad :(');
-        }
-    }
-    self.is_changed = true;
-}
-
-// ConfigFile.prune_child()
-ConfigFile.prototype.prune_child = ConfigFile_prune_child;
-function ConfigFile_prune_child(selector, xml_child) {
-    var self = this;
-    var filepath = self.filepath;
-    var result;
-    if (self.type === 'xml') {
-        var xml_to_graft = [et.XML(xml_child.xml)];
-        result = xml_helpers.pruneXML(self.data, xml_to_graft, selector);
-    } else {
-        // plist file
-        result = plist_helpers.prunePLIST(self.data, xml_child.xml, selector);
-    }
-    if ( !result) {
-        var err_msg = 'Pruning at selector "' + selector + '" from "' + filepath + '" went bad.';
-        throw new Error(err_msg);
-    }
-    self.is_changed = true;
-}
-/**** END of ConfigFile ****/
-
-
-/******************************************************************************
-* Utility functions
-******************************************************************************/
-
-// Check if we know such platform
-function checkPlatform(platform) {
-    if (!(platform in platforms)) throw new Error('platform "' + platform + '" not recognized.');
-}
-
-// determine if a plist file is binary
-function isBinaryPlist(filename) {
-    // I wish there was a synchronous way to read only the first 6 bytes of a
-    // file. This is wasteful :/
-    var buf = '' + fs.readFileSync(filename, 'utf8');
-    // binary plists start with a magic header, "bplist"
-    return buf.substring(0, 6) === 'bplist';
-}
-
-// Find out the real name of an iOS project
-// TODO: glob is slow, need a better way or caching, or avoid using more than once.
-function getIOSProjectname(project_dir) {
-    var matches = glob.sync(path.join(project_dir, '*.xcodeproj'));
-    var iospath;
-    if (matches.length === 1) {
-        iospath = path.basename(matches[0],'.xcodeproj');
-    } else {
-        var msg;
-        if (matches.length === 0) {
-            msg = 'Does not appear to be an xcode project, no xcode project file in ' + project_dir;
-        }
-        else {
-            msg = 'There are multiple *.xcodeproj dirs in ' + project_dir;
-        }
-        throw new Error(msg);
-    }
-    return iospath;
-}
-
-// Some config-file target attributes are not qualified with a full leading directory, or contain wildcards.
-// Resolve to a real path in this function.
-// TODO: getIOSProjectname is slow because of glob, try to avoid calling it several times per project.
-function resolveConfigFilePath(project_dir, platform, file) {
-    var filepath = path.join(project_dir, file);
-    var matches;
-
-    // .pbxproj file
-    if (file === 'framework') {
-        var proj_name = getIOSProjectname(project_dir);
-        filepath = path.join(project_dir, proj_name + '.xcodeproj', 'project.pbxproj');
-        return filepath;
-    }
-
-    if (file.indexOf('*') > -1) {
-        // handle wildcards in targets using glob.
-        matches = glob.sync(path.join(project_dir, '**', file));
-        if (matches.length) filepath = matches[0];
-        return filepath;
-    }
-
-    // special-case config.xml target that is just "config.xml". This should be resolved to the real location of the file.
-    // TODO: move the logic that contains the locations of config.xml from cordova CLI into plugman.
-    if (file == 'config.xml') {
-        if (platform == 'ubuntu') {
-            filepath = path.join(project_dir, 'config.xml');
-        } else if (platform == 'ios') {
-            var iospath = getIOSProjectname(project_dir);
-            filepath = path.join(project_dir,iospath, 'config.xml');
-        } else if (platform == 'android') {
-            filepath = path.join(project_dir, 'res', 'xml', 'config.xml');
-        } else {
-            matches = glob.sync(path.join(project_dir, '**', 'config.xml'));
-            if (matches.length) filepath = matches[0];
-        }
-        return filepath;
-    }
-
-    // None of the special cases matched, returning project_dir/file.
-    return filepath;
-}
-
-
-/******************************************************************************
-* Munge object manipulations functions
-******************************************************************************/
-
-// add the count of [key1][key2]...[keyN] to obj
-// return true if it didn't exist before
-function deep_add(obj, keys /* or key1, key2 .... */ ) {
-    if ( !Array.isArray(keys) ) {
-        keys = Array.prototype.slice.call(arguments, 1);
-    }
-
-    return process_munge(obj, true/*createParents*/, function (parentArray, k) {
-        var found = _.find(parentArray, function(element) {
-            return element.xml == k.xml;
-        });
-        if (found) {
-            found.after = found.after || k.after;
-            found.count += k.count;
-        } else {
-            parentArray.push(k);
-        }
-        return !found;
-    }, keys);
-}
-
-// decrement the count of [key1][key2]...[keyN] from obj and remove if it reaches 0
-// return true if it was removed or not found
-function deep_remove(obj, keys /* or key1, key2 .... */ ) {
-    if ( !Array.isArray(keys) ) {
-        keys = Array.prototype.slice.call(arguments, 1);
-    }
-
-    var result = process_munge(obj, false/*createParents*/, function (parentArray, k) {
-        var index = -1;
-        var found = _.find(parentArray, function (element) {
-            index++;
-            return element.xml == k.xml;
-        });
-        if (found) {
-            found.count -= k.count;
-            if (found.count > 0) {
-                return false;
-            }
-            else {
-                parentArray.splice(index, 1);
-            }
-        }
-        return undefined;
-    }, keys);
-
-    return typeof result === "undefined" ? true : result;
-}
-
-// search for [key1][key2]...[keyN]
-// return the object or undefined if not found
-function deep_find(obj, keys /* or key1, key2 .... */ ) {
-    if ( !Array.isArray(keys) ) {
-        keys = Array.prototype.slice.call(arguments, 1);
-    }
-
-    return process_munge(obj, false/*createParents?*/, function (parentArray, k) {
-        return _.find(parentArray, function (element) {
-            return element.xml == (k.xml || k);
-        });
-    }, keys);
-}
-
-// Execute func passing it the parent array and the xmlChild key.
-// When createParents is true, add the file and parent items  they are missing
-// When createParents is false, stop and return undefined if the file and/or parent items are missing
-
-function process_munge(obj, createParents, func, keys /* or key1, key2 .... */ ) {
-    if ( !Array.isArray(keys) ) {
-        keys = Array.prototype.slice.call(arguments, 1);
-    }
-    var k = keys[0];
-    if (keys.length == 1) {
-        return func(obj, k);
-    } else if (keys.length == 2) {
-        if (!obj.parents[k] && !createParents) {
-            return undefined;
-        }
-        obj.parents[k] = obj.parents[k] || [];
-        return process_munge(obj.parents[k], createParents, func, keys.slice(1));
-    } else if (keys.length == 3){
-        if (!obj.files[k] && !createParents) {
-            return undefined;
-        }
-        obj.files[k] = obj.files[k] || { parents: {} };
-        return process_munge(obj.files[k], createParents, func, keys.slice(1));
-    } else {
-        throw new Error("Invalid key format. Must contain at most 3 elements (file, parent, xmlChild).");
-    }
-}
-
-// All values from munge are added to base as
-// base[file][selector][child] += base[file][selector][child]
-// Returns a munge object containing values that exist in munge
-// but not in base.
-function increment_munge(base, munge) {
-    var diff = { files: {} };
-
-    for (var file in munge.files) {
-        for (var selector in munge.files[file].parents) {
-            for (var xml_child in munge.files[file].parents[selector]) {
-                var val = munge.files[file].parents[selector][xml_child];
-                // if node not in base, add it to diff and base
-                // else increment it's value in base without adding to diff
-                var newlyAdded = deep_add(base, [file, selector, val]);
-                if (newlyAdded) {
-                    deep_add(diff, file, selector, val);
-                }
-            }
-        }
-    }
-    return diff;
-}
-
-// Update the base munge object as
-// base[file][selector][child] -= base[file][selector][child]
-// nodes that reached zero value are removed from base and added to the returned munge
-// object.
-function decrement_munge(base, munge) {
-    var zeroed = { files: {} };
-
-    for (var file in munge.files) {
-        for (var selector in munge.files[file].parents) {
-            for (var xml_child in munge.files[file].parents[selector]) {
-                var val = munge.files[file].parents[selector][xml_child];
-                // if node not in base, add it to diff and base
-                // else increment it's value in base without adding to diff
-                var removed = deep_remove(base, [file, selector, val]);
-                if (removed) {
-                    deep_add(zeroed, file, selector, val);
-                }
-            }
-        }
-    }
-    return zeroed;
-}
-
-// For better readability where used
-function clone_munge(munge) {
-    return increment_munge({}, munge);
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/util/csproj.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/csproj.js b/cordova-lib/src/plugman/util/csproj.js
deleted file mode 100644
index 1024878..0000000
--- a/cordova-lib/src/plugman/util/csproj.js
+++ /dev/null
@@ -1,124 +0,0 @@
-var xml_helpers = require('./xml-helpers'),
-    et = require('elementtree'),
-    fs = require('fs'),
-    path = require('path');
-
-function csproj(location) {
-    this.location = location;
-    this.xml = xml_helpers.parseElementtreeSync(location);
-    return this;
-}
-
-csproj.prototype = {
-    write:function() {
-        fs.writeFileSync(this.location, this.xml.write({indent:4}), 'utf-8');
-    },
-
-    addReference:function(relPath) {
-        var item = new et.Element('ItemGroup');
-        var extName = path.extname(relPath);
-
-        var elem = new et.Element('Reference');
-        // add dll file name
-        elem.attrib.Include = path.basename(relPath, extName);
-        // add hint path with full path
-        var hint_path = new et.Element('HintPath');
-        hint_path.text = relPath;
-        elem.append(hint_path);
-
-        if(extName == ".winmd") {
-            var mdFileTag = new et.Element("IsWinMDFile");
-                mdFileTag.text = "true";
-            elem.append(mdFileTag);
-        }
-
-        item.append(elem);
-
-        this.xml.getroot().append(item);
-    },
-
-    removeReference:function(relPath) {
-        var item = new et.Element('ItemGroup');
-        var extName = path.extname(relPath);
-        var includeText = path.basename(relPath,extName);
-        // <ItemGroup>
-        //   <Reference Include="WindowsRuntimeComponent1">
-        var item_groups = this.xml.findall('ItemGroup/Reference[@Include="' + includeText + '"]/..');
-
-        if(item_groups.length > 0 ) {
-            this.xml.getroot().remove(0, item_groups[0]);
-        }
-    },
-
-    addSourceFile:function(relative_path) {
-        relative_path = relative_path.split('/').join('\\');
-        // make ItemGroup to hold file.
-        var item = new et.Element('ItemGroup');
-
-        var extName = path.extname(relative_path);
-        // check if it's a .xaml page
-        if(extName == ".xaml") {
-            var page = new et.Element('Page');
-            var sub_type = new et.Element('SubType');
-
-            sub_type.text = "Designer";
-            page.append(sub_type);
-            page.attrib.Include = relative_path;
-
-            var gen = new et.Element('Generator');
-            gen.text = "MSBuild:Compile";
-            page.append(gen);
-
-            var item_groups = this.xml.findall('ItemGroup');
-            if(item_groups.length == 0) {
-                item.append(page);
-            } else {
-                item_groups[0].append(page);
-            }
-        }
-        else if (extName == ".cs") {
-            var compile = new et.Element('Compile');
-            compile.attrib.Include = relative_path;
-            // check if it's a .xaml.cs page that would depend on a .xaml of the same name
-            if (relative_path.indexOf('.xaml.cs', relative_path.length - 8) > -1) {
-                var dep = new et.Element('DependentUpon');
-                var parts = relative_path.split('\\');
-                var xaml_file = parts[parts.length - 1].substr(0, parts[parts.length - 1].length - 3); // Benn, really !?
-                dep.text = xaml_file;
-                compile.append(dep);
-            }
-            item.append(compile);
-        }
-        else { // otherwise add it normally
-            var compile = new et.Element('Content');
-            compile.attrib.Include = relative_path;
-            item.append(compile);
-        }
-        this.xml.getroot().append(item);
-    },
-
-    removeSourceFile:function(relative_path) {
-        relative_path = relative_path.split('/').join('\\');
-        var item_groups = this.xml.findall('ItemGroup');
-        for (var i = 0, l = item_groups.length; i < l; i++) {
-            var group = item_groups[i];
-            var files = group.findall('Compile').concat(group.findall('Page')).concat(group.findall('Content'));
-            for (var j = 0, k = files.length; j < k; j++) {
-                var file = files[j];
-                if (file.attrib.Include == relative_path) {
-                    // remove file reference
-                    group.remove(0, file);
-                    // remove ItemGroup if empty
-                    var new_group = group.findall('Compile').concat(group.findall('Page')).concat(group.findall('Content'));
-                    if(new_group.length < 1) {
-                        this.xml.getroot().remove(0, group);
-                    }
-                    return true;
-                }
-            }
-        }
-        return false;
-    }
-};
-
-module.exports = csproj;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/util/default-engines.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/default-engines.js b/cordova-lib/src/plugman/util/default-engines.js
deleted file mode 100644
index 5e4f151..0000000
--- a/cordova-lib/src/plugman/util/default-engines.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var path = require('path');
-
-module.exports = function(project_dir){
-    return {
-        'cordova':
-            { 'platform':'*', 'scriptSrc': path.join(project_dir,'cordova','version') },
-        'cordova-plugman':
-            { 'platform':'*', 'currentVersion': require('../../package.json').version },
-        'cordova-android':
-            { 'platform':'android', 'scriptSrc': path.join(project_dir,'cordova','version') },
-        'cordova-ios':
-            { 'platform':'ios', 'scriptSrc': path.join(project_dir,'cordova','version') },
-        'cordova-blackberry10':
-            { 'platform':'blackberry10', 'scriptSrc': path.join(project_dir,'cordova','version') },
-        'cordova-wp7':
-            { 'platform':'wp7', 'scriptSrc': path.join(project_dir,'cordova','version') },
-        'cordova-wp8':
-            { 'platform':'wp8', 'scriptSrc': path.join(project_dir,'cordova','version') },
-        'cordova-windows8':
-            { 'platform':'windows8', 'scriptSrc': path.join(project_dir,'cordova','version') },
-        'apple-xcode' :
-            { 'platform':'ios', 'scriptSrc':  path.join(project_dir,'cordova','apple_xcode_version') },
-        'apple-ios' :
-            { 'platform':'ios', 'scriptSrc': path.join(project_dir,'cordova','apple_ios_version') },
-        'apple-osx' :
-            { 'platform':'ios', 'scriptSrc': path.join(project_dir,'cordova','apple_osx_version') },
-        'blackberry-ndk' :
-            { 'platform':'blackberry10', 'scriptSrc': path.join(project_dir,'cordova','bb10-ndk-version') },
-        'android-sdk' :
-            { 'platform':'android', 'scriptSrc': path.join(project_dir,'cordova','android_sdk_version') },
-        'windows-os' :
-            { 'platform':'wp7|wp8|windows8', 'scriptSrc': path.join(project_dir,'cordova','win_os_version') },
-        'windows-sdk' :
-            { 'platform':'wp7|wp8|windows8', 'scriptSrc': path.join(project_dir,'cordova','win_sdk_version') }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/util/dependencies.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/dependencies.js b/cordova-lib/src/plugman/util/dependencies.js
deleted file mode 100644
index a297372..0000000
--- a/cordova-lib/src/plugman/util/dependencies.js
+++ /dev/null
@@ -1,96 +0,0 @@
-var dep_graph = require('dep-graph'),
-    path = require('path'),
-    fs = require('fs'),
-    plugman = require('../../plugman'),
-    config_changes = require('./config-changes'),
-    underscore = require('underscore'),
-    xml_helpers = require('./xml-helpers'),
-    package;
-
-module.exports = package = {
-
-    resolvePath: function(plugin_id, plugins_dir)
-    {
-        return path.join(plugins_dir, plugin_id);
-    },
-
-    resolveConfig: function(plugin_id, plugins_dir)
-    {
-        return path.join(plugins_dir, plugin_id, 'plugin.xml');
-    },
-
-    generate_dependency_info:function(plugins_dir, platform) {
-        var json = config_changes.get_platform_json(plugins_dir, platform);
-
-        // TODO: store whole dependency tree in plugins/[platform].json
-        // in case plugins are forcefully removed...
-        var tlps = [];
-        var graph = new dep_graph();
-        Object.keys(json.installed_plugins).forEach(function(plugin_id) {
-            tlps.push(plugin_id);
-
-            var xml = xml_helpers.parseElementtreeSync( package.resolveConfig(plugin_id, plugins_dir) );
-            var deps = xml.findall('dependency');
-
-            deps && deps.forEach(function(dep) {
-                graph.add(plugin_id, dep.attrib.id);
-            });
-        });
-        Object.keys(json.dependent_plugins).forEach(function(plugin_id) {
-            var xml = xml_helpers.parseElementtreeSync( package.resolveConfig(plugin_id, plugins_dir) );
-            var deps = xml.findall('dependency');
-            deps && deps.forEach(function(dep) {
-                graph.add(plugin_id, dep.attrib.id);
-            });
-        });
-
-        return {
-            graph:graph,
-            top_level_plugins:tlps
-        };
-    },
-
-    // Returns a list of top-level plugins which are (transitively) dependent on the given plugin.
-    dependents: function(plugin_id, plugins_dir, platform) {
-        if(typeof plugins_dir == 'object')
-            var depsInfo = plugins_dir;
-        else
-            var depsInfo = package.generate_dependency_info(plugins_dir, platform);
-
-        var graph = depsInfo.graph;
-        var tlps = depsInfo.top_level_plugins;
-        var dependents = tlps.filter(function(tlp) {
-            return tlp != plugin_id && graph.getChain(tlp).indexOf(plugin_id) >= 0;
-        });
-
-        return dependents;
-    },
-
-    // Returns a list of plugins which the given plugin depends on, for which it is the only dependent.
-    // In other words, if the given plugin were deleted, these dangling dependencies should be deleted too.
-    danglers: function(plugin_id, plugins_dir, platform) {
-        if(typeof plugins_dir == 'object')
-            var depsInfo = plugins_dir;
-        else
-            var depsInfo = package.generate_dependency_info(plugins_dir, platform);
-
-        var graph = depsInfo.graph;
-        var dependencies = graph.getChain(plugin_id);
-
-        var tlps = depsInfo.top_level_plugins;
-        var diff_arr = [];
-        tlps.forEach(function(tlp) {
-            if (tlp != plugin_id) {
-                diff_arr.push(graph.getChain(tlp));
-            }
-        });
-
-        // if this plugin has dependencies, do a set difference to determine which dependencies are not required by other existing plugins
-        diff_arr.unshift(dependencies);
-        var danglers = underscore.difference.apply(null, diff_arr);
-
-        // Ensure no top-level plugins are tagged as danglers.
-        danglers = danglers && danglers.filter(function(x) { return tlps.indexOf(x) < 0; });
-        return danglers;
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/util/metadata.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/metadata.js b/cordova-lib/src/plugman/util/metadata.js
deleted file mode 100644
index cfbb643..0000000
--- a/cordova-lib/src/plugman/util/metadata.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var fs = require('fs'),
-    path = require('path');
-
-var filename = '.fetch.json';
-
-exports.get_fetch_metadata = function(plugin_dir) {
-    var filepath = path.join(plugin_dir, filename);
-    if (fs.existsSync(filepath)) {
-        return JSON.parse(fs.readFileSync(filepath, 'utf-8'));
-    } else {
-        return {};
-    }
-};
-
-exports.save_fetch_metadata = function(plugin_dir, data) {
-    var filepath = path.join(plugin_dir, '.fetch.json');
-    fs.writeFileSync(filepath, JSON.stringify(data), 'utf-8');
-};
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/util/plist-helpers.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/plist-helpers.js b/cordova-lib/src/plugman/util/plist-helpers.js
deleted file mode 100644
index e1dfbd9..0000000
--- a/cordova-lib/src/plugman/util/plist-helpers.js
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- *
- * Copyright 2013 Brett Rudd
- *
- * Licensed 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.
- *
-*/
-
-// contains PLIST utility functions
-
-var et = require('elementtree'),
-    plist = require('plist-with-patches');
-
-// adds node to doc at selector
-module.exports = {
-    graftPLIST:function (doc, xml, selector) {
-        var obj = plist.parseStringSync("<plist>"+xml+"</plist>");
-
-        var node = doc[selector];
-        if (node && Array.isArray(node) && Array.isArray(obj))
-            doc[selector] = node.concat(obj);
-        else
-            doc[selector] = obj;
-
-        return true;
-    },
-    // removes node from doc at selector
-    prunePLIST:function(doc, xml, selector) {
-        var obj = plist.parseStringSync("<plist>"+xml+"</plist>");
-
-        pruneOBJECT(doc, selector, obj);
-
-        return true;
-    }
-}
-
-function pruneOBJECT(doc, selector, fragment) {
-    if (Array.isArray(fragment) && Array.isArray(doc[selector])) {
-        var empty = true;
-        for (i in fragment) {
-            for (j in doc[selector]) {
-                empty = pruneOBJECT(doc[selector], j, fragment[i]) && empty;
-            }
-        }
-        if (empty)
-        {
-            delete doc[selector];
-            return true;
-        }
-    }
-    else if (nodeEqual(doc[selector], fragment)) {
-        delete doc[selector];
-        return true;
-    }
-
-    return false;
-}
-
-function nodeEqual(node1, node2) {
-    if (typeof node1 != typeof node2)
-        return false;
-    else if (typeof node1 == 'string') {
-        node2 = escapeRE(node2).replace(new RegExp("\\$[a-zA-Z0-9-_]+","gm"),"(.*?)");
-        return new RegExp('^' + node2 + '$').test(node1);
-    }
-    else {
-        for (var key in node2) {
-            if (!nodeEqual(node1[key], node2[key])) return false;
-        }
-        return true;
-    }
-}
-
-// escape string for use in regex
-function escapeRE(str) {
-     return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\$&");
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/util/plugins.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/plugins.js b/cordova-lib/src/plugman/util/plugins.js
deleted file mode 100644
index 5a5d14a..0000000
--- a/cordova-lib/src/plugman/util/plugins.js
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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 http = require('http'),
-    os = require('os'),
-    path = require('path'),
-    fs = require('fs'),
-    util = require('util'),
-    shell = require('shelljs'),
-    child_process = require('child_process'),
-    Q = require('q'),
-    xml_helpers = require('./xml-helpers'),
-    events = require('../events'),
-    tmp_dir;
-
-module.exports = {
-    searchAndReplace:require('./search-and-replace'),
-
-    clonePluginGit:function(plugin_git_url, plugins_dir, options) {
-        return module.exports.clonePluginGitRepo(plugin_git_url, plugins_dir, options.subdir, options.git_ref).then(
-            function(dst){
-                // Keep location where we checked out git repo
-                options.plugin_src_dir = tmp_dir;
-                return dst;
-            }
-        );
-    },
-
-    // Fetches plugin information from remote server.
-    // Returns a promise.
-    clonePluginGitRepo:function(plugin_git_url, plugins_dir, subdir, git_ref) {
-
-        if(!shell.which('git')) {
-            return Q.reject(new Error('"git" command line tool is not installed: make sure it is accessible on your PATH.'));
-        }
-        tmp_dir = path.join(os.tmpdir(), 'plugman', 'git', String((new Date).valueOf()));
-
-        shell.rm('-rf', tmp_dir);
-
-        var cmd = util.format('git clone "%s" "%s"', plugin_git_url, tmp_dir);
-        events.emit('verbose', 'Fetching plugin via git-clone command: ' + cmd);
-        var d = Q.defer();
-
-        child_process.exec(cmd, function(err, stdout, stderr) {
-            if (err) {
-                d.reject(err);
-            } else {
-                d.resolve();
-            }
-        });
-        return d.promise.then(function() {
-            events.emit('verbose', 'Plugin "' + plugin_git_url + '" fetched.');
-            // Check out the specified revision, if provided.
-            if (git_ref) {
-                var cmd = util.format('git checkout "%s"', git_ref);
-                var d2 = Q.defer();
-                child_process.exec(cmd, { cwd: tmp_dir }, function(err, stdout, stderr) {
-                    if (err) d2.reject(err);
-                    else d2.resolve();
-                });
-                return d2.promise.then(function() {
-                    events.emit('log', 'Plugin "' + plugin_git_url + '" checked out to git ref "' + git_ref + '".');
-                });
-            }
-        }).then(function() {
-            // Read the plugin.xml file and extract the plugin's ID.
-            tmp_dir = path.join(tmp_dir, subdir);
-            // TODO: what if plugin.xml does not exist?
-            var xml_file = path.join(tmp_dir, 'plugin.xml');
-            var xml = xml_helpers.parseElementtreeSync(xml_file);
-            var plugin_id = xml.getroot().attrib.id;
-
-            // TODO: what if a plugin depended on different subdirectories of the same plugin? this would fail.
-            // should probably copy over entire plugin git repo contents into plugins_dir and handle subdir separately during install.
-            var plugin_dir = path.join(plugins_dir, plugin_id);
-            events.emit('verbose', 'Copying fetched plugin over "' + plugin_dir + '"...');
-            shell.cp('-R', path.join(tmp_dir, '*'), plugin_dir);
-
-            events.emit('verbose', 'Plugin "' + plugin_id + '" fetched.');
-            return plugin_dir;
-        });
-    }
-};
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/util/search-and-replace.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/search-and-replace.js b/cordova-lib/src/plugman/util/search-and-replace.js
deleted file mode 100644
index 39bd9c3..0000000
--- a/cordova-lib/src/plugman/util/search-and-replace.js
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env node
-/*
- *
- * Copyright 2013 Brett Rudd
- *
- * Licensed 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 glob = require('glob'),
-    fs = require('fs');
-
-module.exports = function searchAndReplace(srcGlob, variables) {
-    var files = glob.sync(srcGlob);
-    for (var i in files) {
-        var file = files[i];
-        if (fs.lstatSync(file).isFile()) {
-            var contents = fs.readFileSync(file, "utf-8");
-            for (var key in variables) {
-                var regExp = new RegExp("\\$" + key, "g");
-                contents = contents.replace(regExp, variables[key]);
-            }
-            fs.writeFileSync(file, contents);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/util/w8jsproj.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/w8jsproj.js b/cordova-lib/src/plugman/util/w8jsproj.js
deleted file mode 100644
index 903a214..0000000
--- a/cordova-lib/src/plugman/util/w8jsproj.js
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
-  Helper for dealing with Windows Store JS app .jsproj files
-*/
-
-
-var xml_helpers = require('./xml-helpers'),
-    et = require('elementtree'),
-    fs = require('fs'),
-    shell = require('shelljs'),
-    events = require('../events'),
-    path = require('path');
-
-var WindowsStoreProjectTypeGUID = "{BC8A1FFA-BEE3-4634-8014-F334798102B3}";  // any of the below, subtype
-var WinCSharpProjectTypeGUID = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}";    // .csproj
-var WinVBnetProjectTypeGUID = "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}";     // who the ef cares?
-var WinCplusplusProjectTypeGUID = "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}"; // .vcxproj
-
-
-function jsproj(location) {
-    events.emit('verbose','creating jsproj from project at : ' + location);
-    this.location = location;
-    this.xml = xml_helpers.parseElementtreeSync(location);
-    return this;
-}
-
-jsproj.prototype = {
-    location:null,
-    xml:null,
-    plugins_dir:"Plugins",
-    write:function() {
-        fs.writeFileSync(this.location, this.xml.write({indent:4}), 'utf-8');
-    },
-    // add/remove the item group for SDKReference
-    // example :
-    // <ItemGroup><SDKReference Include="Microsoft.VCLibs, version=12.0" /></ItemGroup>
-    addSDKRef:function(incText) {
-        var item_group = new et.Element('ItemGroup');
-        var elem = new et.Element('SDKReference');
-        elem.attrib.Include = incText;
-
-        item_group.append(elem);
-        this.xml.getroot().append(item_group);
-    },
-
-    removeSDKRef:function(incText) {
-        var item_group = this.xml.find('ItemGroup/SDKReference[@Include="' + incText + '"]/..');
-        if(item_group) { // TODO: error handling
-            this.xml.getroot().remove(0, item_group);
-        }
-    },
-
-    addReference:function(relPath,src) {
-
-        events.emit('verbose','addReference::' + relPath);
-
-        var item = new et.Element('ItemGroup');
-        var extName = path.extname(relPath);
-
-        var elem = new et.Element('Reference');
-        // add file name
-        elem.attrib.Include = path.basename(relPath, extName);
-
-        // add hint path with full path
-        var hint_path = new et.Element('HintPath');
-            hint_path.text = relPath;
-
-        elem.append(hint_path);
-
-        if(extName == ".winmd") {
-            var mdFileTag = new et.Element("IsWinMDFile");
-                mdFileTag.text = "true";
-            elem.append(mdFileTag);
-        }
-
-        item.append(elem);
-        this.xml.getroot().append(item);
-    },
-
-    removeReference:function(relPath) {
-        events.emit('verbose','removeReference::' + relPath);
-
-        var extName = path.extname(relPath);
-        var includeText = path.basename(relPath,extName);
-        // <ItemGroup>
-        //   <Reference Include="WindowsRuntimeComponent1">
-        var item_group = this.xml.find('ItemGroup/Reference[@Include="' + includeText + '"]/..');
-
-        if(item_group) { // TODO: erro handling
-            this.xml.getroot().remove(0, item_group);
-        }
-    },
-
-    addSourceFile:function(relative_path) {
-
-        relative_path = relative_path.split('/').join('\\');
-        // make ItemGroup to hold file.
-        var item = new et.Element('ItemGroup');
-
-        var content = new et.Element('Content');
-            content.attrib.Include = relative_path;
-        item.append(content);
-
-        this.xml.getroot().append(item);
-    },
-
-    removeSourceFile:function(relative_path) {
-
-        // path.normalize(relative_path);// ??
-        relative_path = relative_path.split('/').join('\\');
-        // var oneStep = this.xml.findall('ItemGroup/Content[@Include="' + relative_path + '""]/..');
-
-        var item_groups = this.xml.findall('ItemGroup');
-        for (var i = 0, l = item_groups.length; i < l; i++) {
-            var group = item_groups[i];
-            var files = group.findall('Content');
-            for (var j = 0, k = files.length; j < k; j++) {
-                var file = files[j];
-                if (file.attrib.Include == relative_path) {
-                    // remove file reference
-                    group.remove(0, file);
-                    // remove ItemGroup if empty
-                    var new_group = group.findall('Content');
-                    if(new_group.length < 1) {
-                        this.xml.getroot().remove(0, group);
-                    }
-                    return true;
-                }
-            }
-        }
-        return false;
-    },
-    // relative path must include the project file, so we can determine .csproj, .jsproj, .vcxproj...
-    addProjectReference:function(relative_path) {
-        events.emit('verbose','adding project reference to ' + relative_path);
-
-        relative_path = relative_path.split('/').join('\\');
-        // read the solution path from the base directory
-        var solutionPath = shell.ls(path.join(path.dirname(this.location),"*.sln"))[0];// TODO:error handling
-        // note we may not have a solution, in which case just add a project reference, I guess ..
-        // get the project extension to figure out project type
-        var projectExt = path.extname(relative_path);
-
-        var pluginProjectXML = xml_helpers.parseElementtreeSync(relative_path);
-        // find the guid + name of the referenced project
-        var projectGuid = pluginProjectXML.find("PropertyGroup/ProjectGuid").text;
-        var projName = pluginProjectXML.find("PropertyGroup/ProjectName").text;
-
-        var preInsertText = "ProjectSection(ProjectDependencies) = postProject\n\r" +
-                             projectGuid + "=" + projectGuid + "\n\r" +
-                            "EndProjectSection\n\r";
-
-        // read in the solution file
-        var solText = fs.readFileSync(solutionPath,{encoding:"utf8"});
-        var splitText = solText.split("EndProject");
-        if(splitText.length != 2) {
-            throw new Error("too many projects in solution.");
-        }
-
-        var projectTypeGuid = null;
-        if(projectExt == ".vcxproj") {
-            projectTypeGuid = WinCplusplusProjectTypeGUID;
-        }
-        else if(projectExt == ".csproj") {
-            projectTypeGuid = WinCSharpProjectTypeGUID;
-        }
-
-        if(!projectTypeGuid) {
-            throw new Error("unrecognized project type");
-        }
-
-        var postInsertText = 'Project("' + projectTypeGuid + '") = "' +
-                         projName + '", "' + relative_path + '",' +
-                        '"' + projectGuid + '"\n\r EndProject\n\r';
-
-        solText = splitText[0] + preInsertText + "EndProject\n\r" + postInsertText + splitText[1];
-        fs.writeFileSync(solutionPath,solText,{encoding:"utf8"});
-
-
-        // Add the ItemGroup/ProjectReference to the cordova project :
-        // <ItemGroup><ProjectReference Include="blahblah.csproj"/></ItemGroup>
-        var item = new et.Element('ItemGroup');
-
-        var projRef = new et.Element('ProjectReference');
-            projRef.attrib.Include = relative_path;
-            item.append(projRef);
-        this.xml.getroot().append(item);
-
-    },
-    removeProjectReference:function(relative_path) {
-        events.emit('verbose','removing project reference to ' + relative_path);
-
-        // find the guid + name of the referenced project
-        var pluginProjectXML = xml_helpers.parseElementtreeSync(relative_path);
-        var projectGuid = pluginProjectXML.find("PropertyGroup/ProjectGuid").text;
-        var projName = pluginProjectXML.find("PropertyGroup/ProjectName").text;
-
-        // get the project extension to figure out project type
-        var projectExt = path.extname(relative_path);
-        // get the project type
-        var projectTypeGuid = null;
-        if(projectExt == ".vcxproj") {
-            projectTypeGuid = WinCplusplusProjectTypeGUID;
-        }
-        else if(projectExt == ".csproj") {
-            projectTypeGuid = WinCSharpProjectTypeGUID;
-        }
-
-        if(!projectTypeGuid) {
-            throw new Error("unrecognized project type");
-        }
-
-        var preInsertText = "ProjectSection(ProjectDependencies) = postProject\n\r" +
-                             projectGuid + "=" + projectGuid + "\n\r" +
-                            "EndProjectSection\n\r";
-
-        var postInsertText = 'Project("' + projectTypeGuid + '") = "' +
-                              projName + '", "' + relative_path + '",' +
-                              '"' + projectGuid + '"\n\r EndProject\n\r';
-
-        // find and read in the solution file
-        var solutionPath = shell.ls(path.join(path.dirname(this.location),"*.sln"))[0];  // TODO:error handling
-        var solText = fs.readFileSync(solutionPath,{encoding:"utf8"});
-        var splitText = solText.split(preInsertText);
-
-        solText = splitText.join("").split(postInsertText);
-        solText = solText.join("");
-
-        fs.writeFileSync(solutionPath,solText,{encoding:"utf8"});
-
-        // select first ItemsGroups with a ChildNode ProjectReference
-        // ideally select all, and look for @attrib 'Include'= projectFullPath
-        var projectRefNodesPar = this.xml.find("ItemGroup/ProjectReference[@Include='" + relative_path + "']/..");
-        if(projectRefNodesPar) {
-            this.xml.getroot().remove(0, projectRefNodesPar);
-        }
-    }
-};
-
-module.exports = jsproj;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/src/plugman/util/xml-helpers.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/xml-helpers.js b/cordova-lib/src/plugman/util/xml-helpers.js
deleted file mode 100644
index 601ed4d..0000000
--- a/cordova-lib/src/plugman/util/xml-helpers.js
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed 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.
- *
-*/
-
-/**
- * contains XML utility functions, some of which are specific to elementtree
- */
-
-var fs = require('fs')
-  , path = require('path')
-  , _ = require('underscore')
-  , et = require('elementtree');
-
-module.exports = {
-    moveProjFile: function(origFile, projPath, callback) {
-        var src = path.resolve(projPath, origFile)
-          , dest = src.replace('.orig', '');
-
-        fs.createReadStream(src)
-            .pipe(fs.createWriteStream(dest))
-            .on('close', callback);
-    },
-
-    // compare two et.XML nodes, see if they match
-    // compares tagName, text, attributes and children (recursively)
-    equalNodes: function(one, two) {
-        if (one.tag != two.tag) {
-            return false;
-        } else if (one.text.trim() != two.text.trim()) {
-            return false;
-        } else if (one._children.length != two._children.length) {
-            return false;
-        }
-
-        var oneAttribKeys = Object.keys(one.attrib),
-            twoAttribKeys = Object.keys(two.attrib),
-            i = 0, attribName;
-
-        if (oneAttribKeys.length != twoAttribKeys.length) {
-            return false;
-        }
-
-        for (i; i < oneAttribKeys.length; i++) {
-            attribName = oneAttribKeys[i];
-
-            if (one.attrib[attribName] != two.attrib[attribName]) {
-                return false;
-            }
-        }
-
-        for (i; i < one._children.length; i++) {
-            if (!module.exports.equalNodes(one._children[i], two._children[i])) {
-                return false;
-            }
-        }
-
-        return true;
-    },
-
-    // adds node to doc at selector, creating parent if it doesn't exist
-    graftXML: function(doc, nodes, selector, after) {
-        var parent = resolveParent(doc, selector);
-        if (!parent) {
-            //Try to create the parent recursively if necessary
-            try {
-                var parentToCreate = et.XML("<" + path.basename(selector) + ">"),
-                    parentSelector = path.dirname(selector);
-
-                this.graftXML(doc, [parentToCreate], parentSelector);
-            } catch (e) {
-                return false;
-            }
-            parent = resolveParent(doc, selector);
-            if (!parent) return false;
-        }
-
-        nodes.forEach(function (node) {
-            // check if child is unique first
-            if (uniqueChild(node, parent)) {
-                var children = parent.getchildren();
-                var insertIdx = after ? findInsertIdx(children, after) : children.length;
-
-                //TODO: replace with parent.insert after the bug in ElementTree is fixed
-                parent.getchildren().splice(insertIdx, 0, node);
-            }
-        });
-
-        return true;
-    },
-
-    // removes node from doc at selector
-    pruneXML: function(doc, nodes, selector) {
-        var parent = resolveParent(doc, selector);
-        if (!parent) return false;
-
-        nodes.forEach(function (node) {
-            var matchingKid = null;
-            if ((matchingKid = findChild(node, parent)) != null) {
-                // stupid elementtree takes an index argument it doesn't use
-                // and does not conform to the python lib
-                parent.remove(0, matchingKid);
-            }
-        });
-
-        return true;
-    },
-
-    parseElementtreeSync: function (filename) {
-        var contents = fs.readFileSync(filename, 'utf-8').replace("\ufeff", "");;
-        return new et.ElementTree(et.XML(contents));
-    }
-};
-
-function findChild(node, parent) {
-    var matchingKids = parent.findall(node.tag)
-      , i, j;
-
-    for (i = 0, j = matchingKids.length ; i < j ; i++) {
-        if (module.exports.equalNodes(node, matchingKids[i])) {
-            return matchingKids[i];
-        }
-    }
-    return null;
-}
-
-function uniqueChild(node, parent) {
-    var matchingKids = parent.findall(node.tag)
-      , i = 0;
-
-    if (matchingKids.length == 0) {
-        return true;
-    } else  {
-        for (i; i < matchingKids.length; i++) {
-            if (module.exports.equalNodes(node, matchingKids[i])) {
-                return false;
-            }
-        }
-        return true;
-    }
-}
-
-var ROOT = /^\/([^\/]*)/,
-    ABSOLUTE = /^\/([^\/]*)\/(.*)/;
-function resolveParent(doc, selector) {
-    var parent, tagName, subSelector;
-
-    // handle absolute selector (which elementtree doesn't like)
-    if (ROOT.test(selector)) {
-        tagName = selector.match(ROOT)[1];
-        // test for wildcard "any-tag" root selector
-        if (tagName == '*' || tagName === doc._root.tag) {
-            parent = doc._root;
-
-            // could be an absolute path, but not selecting the root
-            if (ABSOLUTE.test(selector)) {
-                subSelector = selector.match(ABSOLUTE)[2];
-                parent = parent.find(subSelector)
-            }
-        } else {
-            return false;
-        }
-    } else {
-        parent = doc.find(selector)
-    }
-    return parent;
-}
-
-// Find the index at which to insert an entry. After is a ;-separated priority list
-// of tags after which the insertion should be made. E.g. If we need to
-// insert an element C, and the rule is that the order of children has to be
-// As, Bs, Cs. After will be equal to "C;B;A".
-
-function findInsertIdx(children, after) {
-    var childrenTags = children.map(function(child) { return child.tag; });
-    var afters = after.split(";");
-    var afterIndexes = afters.map(function(current) { return childrenTags.lastIndexOf(current); });
-    var foundIndex = _.find(afterIndexes, function(index) { return index != -1; });
-
-    //add to the beginning if no matching nodes are found
-    return typeof foundIndex === 'undefined' ? 0 : foundIndex+1;
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/templates/base.js
----------------------------------------------------------------------
diff --git a/cordova-lib/templates/base.js b/cordova-lib/templates/base.js
deleted file mode 100644
index 20af664..0000000
--- a/cordova-lib/templates/base.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var exec = require('cordova/exec');
-
-exports.coolMethod = function(arg0, success, error) {
-    exec(success, error, "%pluginName%", "coolMethod", [arg0]);
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/templates/platforms/android/android.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/templates/platforms/android/android.xml b/cordova-lib/templates/platforms/android/android.xml
deleted file mode 100644
index c3dc1b7..0000000
--- a/cordova-lib/templates/platforms/android/android.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<platform name="android">
-    <config-file target="res/xml/config.xml" parent="/*">
-        <feature name="%pluginName%">
-            <param name="android-package" value="%pluginID%.%pluginName%"/>
-        </feature>
-    </config-file>
-    <config-file target="AndroidManifest.xml" parent="/*">
-        <!--add permissions -->
-    </config-file>
-
-    <source-file src="src/android/%pluginName%.java" target-dir="src/%packageName%/%pluginName%" />
-</platform>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/templates/platforms/android/base.java
----------------------------------------------------------------------
diff --git a/cordova-lib/templates/platforms/android/base.java b/cordova-lib/templates/platforms/android/base.java
deleted file mode 100644
index 3136c1c..0000000
--- a/cordova-lib/templates/platforms/android/base.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package %pluginID%;
-
-import org.apache.cordova.CordovaPlugin;
-import org.apache.cordova.CallbackContext;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-/**
- * This class echoes a string called from JavaScript.
- */
-public class CDV%pluginName% extends CordovaPlugin {
-
-    @Override
-    public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
-        if (action.equals("coolMethod")) {
-            String message = args.getString(0);
-            this.coolMethod(message, callbackContext);
-            return true;
-        }
-        return false;
-    }
-
-    private void coolMethod(String message, CallbackContext callbackContext) {
-        if (message != null && message.length() > 0) {
-            callbackContext.success(message);
-        } else {
-            callbackContext.error("Expected one non-empty string argument.");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/templates/platforms/ios/base.m
----------------------------------------------------------------------
diff --git a/cordova-lib/templates/platforms/ios/base.m b/cordova-lib/templates/platforms/ios/base.m
deleted file mode 100644
index cb25117..0000000
--- a/cordova-lib/templates/platforms/ios/base.m
+++ /dev/null
@@ -1,28 +0,0 @@
-/********* CDV%pluginName%.m Cordova Plugin Implementation *******/
-
-#import <Cordova/CDV.h>
-
-@interface CDV%pluginName% : CDVPlugin {
-  // Member variables go here.
-}
-
-- (void)coolMethod:(CDVInvokedUrlCommand*)command;
-@end
-
-@implementation CDV%pluginName%
-
-- (void)coolMethod:(CDVInvokedUrlCommand*)command
-{
-    CDVPluginResult* pluginResult = nil;
-    NSString* echo = [command.arguments objectAtIndex:0];
-
-    if (echo != nil && [echo length] > 0) {
-        pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:echo];
-    } else {
-        pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR];
-    }
-
-    [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/templates/platforms/ios/ios.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/templates/platforms/ios/ios.xml b/cordova-lib/templates/platforms/ios/ios.xml
deleted file mode 100644
index 6600567..0000000
--- a/cordova-lib/templates/platforms/ios/ios.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<platform name="ios">
-    <config-file target="config.xml" parent="/*">
-        <feature name="%pluginName%">
-            <param name="ios-package" value="%pluginName%" />
-        </feature>
-    </config-file>
-
-    <source-file src="src/ios/CDV%pluginName%.m" />
-</platform>


[52/70] Remove all cordova-lib files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/ios-plist/SampleApp.xcodeproj/project.orig.pbxproj
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/ios-plist/SampleApp.xcodeproj/project.orig.pbxproj b/cordova-lib/spec-plugman/projects/ios-plist/SampleApp.xcodeproj/project.orig.pbxproj
deleted file mode 100644
index a4d87f9..0000000
--- a/cordova-lib/spec-plugman/projects/ios-plist/SampleApp.xcodeproj/project.orig.pbxproj
+++ /dev/null
@@ -1,498 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A463F14DB0A1B007FEAC7 /* Foundation.framework */; };
-		571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464114DB0A1B007FEAC7 /* UIKit.framework */; };
-		571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */; };
-		571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464514DB0A1B007FEAC7 /* AddressBook.framework */; };
-		571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */; };
-		571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */; };
-		571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */; };
-		571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */; };
-		571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */; };
-		571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465114DB0A1B007FEAC7 /* QuartzCore.framework */; };
-		571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */; };
-		571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */; };
-		571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465714DB0A1B007FEAC7 /* CoreMedia.framework */; };
-		571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */; };
-		571A466014DB0A1B007FEAC7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A465F14DB0A1B007FEAC7 /* main.m */; };
-		571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A466214DB0A1B007FEAC7 /* PhoneGap.framework */; };
-		571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466614DB0A1B007FEAC7 /* Localizable.strings */; };
-		571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466A14DB0A1B007FEAC7 /* Localizable.strings */; };
-		571A466F14DB0A1B007FEAC7 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A466E14DB0A1B007FEAC7 /* icon.png */; };
-		571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467014DB0A1B007FEAC7 /* icon@2x.png */; };
-		571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467214DB0A1B007FEAC7 /* icon-72.png */; };
-		571A467614DB0A1B007FEAC7 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467514DB0A1B007FEAC7 /* Default.png */; };
-		571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467714DB0A1B007FEAC7 /* Default@2x.png */; };
-		571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 571A467914DB0A1B007FEAC7 /* Capture.bundle */; };
-		571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */ = {isa = PBXBuildFile; fileRef = 571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */; };
-		571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A467F14DB0A1B007FEAC7 /* AppDelegate.m */; };
-		571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A468214DB0A1B007FEAC7 /* MainViewController.m */; };
-		571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 571A468414DB0A1B007FEAC7 /* MainViewController.xib */; };
-		577FC36614DB0B620082BA7B /* www in Resources */ = {isa = PBXBuildFile; fileRef = 577FC36514DB0B620082BA7B /* www */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
-		571A463B14DB0A1B007FEAC7 /* ChildApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChildApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		571A463F14DB0A1B007FEAC7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-		571A464114DB0A1B007FEAC7 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
-		571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
-		571A464514DB0A1B007FEAC7 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
-		571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
-		571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
-		571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
-		571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
-		571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
-		571A465114DB0A1B007FEAC7 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
-		571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
-		571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
-		571A465714DB0A1B007FEAC7 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
-		571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ChildApp-Info.plist"; sourceTree = "<group>"; };
-		571A465D14DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		571A465F14DB0A1B007FEAC7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
-		571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ChildApp-Prefix.pch"; sourceTree = "<group>"; };
-		571A466214DB0A1B007FEAC7 /* PhoneGap.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PhoneGap.framework; path = /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework; sourceTree = "<absolute>"; };
-		571A466714DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/Localizable.strings; sourceTree = "<group>"; };
-		571A466B14DB0A1B007FEAC7 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Resources/es.lproj/Localizable.strings; sourceTree = "<group>"; };
-		571A466E14DB0A1B007FEAC7 /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon.png; path = Resources/icons/icon.png; sourceTree = "<group>"; };
-		571A467014DB0A1B007FEAC7 /* icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon@2x.png"; path = "Resources/icons/icon@2x.png"; sourceTree = "<group>"; };
-		571A467214DB0A1B007FEAC7 /* icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon-72.png"; path = "Resources/icons/icon-72.png"; sourceTree = "<group>"; };
-		571A467514DB0A1B007FEAC7 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/splash/Default.png; sourceTree = "<group>"; };
-		571A467714DB0A1B007FEAC7 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "Resources/splash/Default@2x.png"; sourceTree = "<group>"; };
-		571A467914DB0A1B007FEAC7 /* Capture.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Capture.bundle; path = Resources/Capture.bundle; sourceTree = "<group>"; };
-		571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = PhoneGap.plist; sourceTree = "<group>"; };
-		571A467E14DB0A1B007FEAC7 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Classes/AppDelegate.h; sourceTree = "<group>"; };
-		571A467F14DB0A1B007FEAC7 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Classes/AppDelegate.m; sourceTree = "<group>"; };
-		571A468114DB0A1B007FEAC7 /* MainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainViewController.h; path = Classes/MainViewController.h; sourceTree = "<group>"; };
-		571A468214DB0A1B007FEAC7 /* MainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = Classes/MainViewController.m; sourceTree = "<group>"; };
-		571A468414DB0A1B007FEAC7 /* MainViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainViewController.xib; path = Classes/MainViewController.xib; sourceTree = "<group>"; };
-		571A468714DB0A1B007FEAC7 /* README */ = {isa = PBXFileReference; lastKnownFileType = text; name = README; path = Plugins/README; sourceTree = "<group>"; };
-		577FC36514DB0B620082BA7B /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		571A463514DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */,
-				571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */,
-				571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */,
-				571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */,
-				571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */,
-				571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */,
-				571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */,
-				571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */,
-				571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */,
-				571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */,
-				571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */,
-				571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */,
-				571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */,
-				571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		571A463814DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		571A462D14DB0A1A007FEAC7 = {
-			isa = PBXGroup;
-			children = (
-				577FC36514DB0B620082BA7B /* www */,
-				571A465914DB0A1B007FEAC7 /* ChildApp */,
-				571A463E14DB0A1B007FEAC7 /* Frameworks */,
-				571A463C14DB0A1B007FEAC7 /* Products */,
-			);
-			sourceTree = "<group>";
-		};
-		571A463C14DB0A1B007FEAC7 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				571A463B14DB0A1B007FEAC7 /* ChildApp.app */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		571A463E14DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				571A463F14DB0A1B007FEAC7 /* Foundation.framework */,
-				571A464114DB0A1B007FEAC7 /* UIKit.framework */,
-				571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */,
-				571A464514DB0A1B007FEAC7 /* AddressBook.framework */,
-				571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */,
-				571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */,
-				571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */,
-				571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */,
-				571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */,
-				571A465114DB0A1B007FEAC7 /* QuartzCore.framework */,
-				571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */,
-				571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */,
-				571A465714DB0A1B007FEAC7 /* CoreMedia.framework */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
-		571A465914DB0A1B007FEAC7 /* ChildApp */ = {
-			isa = PBXGroup;
-			children = (
-				571A466214DB0A1B007FEAC7 /* PhoneGap.framework */,
-				571A466414DB0A1B007FEAC7 /* Resources */,
-				571A467D14DB0A1B007FEAC7 /* Classes */,
-				571A468614DB0A1B007FEAC7 /* Plugins */,
-				571A465A14DB0A1B007FEAC7 /* Supporting Files */,
-			);
-			path = ChildApp;
-			sourceTree = "<group>";
-		};
-		571A465A14DB0A1B007FEAC7 /* Supporting Files */ = {
-			isa = PBXGroup;
-			children = (
-				571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */,
-				571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */,
-				571A465F14DB0A1B007FEAC7 /* main.m */,
-				571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */,
-				571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */,
-				571A468414DB0A1B007FEAC7 /* MainViewController.xib */,
-			);
-			name = "Supporting Files";
-			sourceTree = "<group>";
-		};
-		571A466414DB0A1B007FEAC7 /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				571A467914DB0A1B007FEAC7 /* Capture.bundle */,
-				571A466514DB0A1B007FEAC7 /* en.lproj */,
-				571A466914DB0A1B007FEAC7 /* es.lproj */,
-				571A466D14DB0A1B007FEAC7 /* icons */,
-				571A467414DB0A1B007FEAC7 /* splash */,
-			);
-			name = Resources;
-			sourceTree = "<group>";
-		};
-		571A466514DB0A1B007FEAC7 /* en.lproj */ = {
-			isa = PBXGroup;
-			children = (
-				571A466614DB0A1B007FEAC7 /* Localizable.strings */,
-			);
-			name = en.lproj;
-			sourceTree = "<group>";
-		};
-		571A466914DB0A1B007FEAC7 /* es.lproj */ = {
-			isa = PBXGroup;
-			children = (
-				571A466A14DB0A1B007FEAC7 /* Localizable.strings */,
-			);
-			name = es.lproj;
-			sourceTree = "<group>";
-		};
-		571A466D14DB0A1B007FEAC7 /* icons */ = {
-			isa = PBXGroup;
-			children = (
-				571A466E14DB0A1B007FEAC7 /* icon.png */,
-				571A467014DB0A1B007FEAC7 /* icon@2x.png */,
-				571A467214DB0A1B007FEAC7 /* icon-72.png */,
-			);
-			name = icons;
-			sourceTree = "<group>";
-		};
-		571A467414DB0A1B007FEAC7 /* splash */ = {
-			isa = PBXGroup;
-			children = (
-				571A467514DB0A1B007FEAC7 /* Default.png */,
-				571A467714DB0A1B007FEAC7 /* Default@2x.png */,
-			);
-			name = splash;
-			sourceTree = "<group>";
-		};
-		571A467D14DB0A1B007FEAC7 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-				571A467E14DB0A1B007FEAC7 /* AppDelegate.h */,
-				571A467F14DB0A1B007FEAC7 /* AppDelegate.m */,
-				571A468114DB0A1B007FEAC7 /* MainViewController.h */,
-				571A468214DB0A1B007FEAC7 /* MainViewController.m */,
-			);
-			name = Classes;
-			sourceTree = "<group>";
-		};
-		571A468614DB0A1B007FEAC7 /* Plugins */ = {
-			isa = PBXGroup;
-			children = (
-				571A468714DB0A1B007FEAC7 /* README */,
-			);
-			name = Plugins;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		571A463A14DB0A1B007FEAC7 /* ChildApp */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */;
-			buildPhases = (
-				571A463414DB0A1B007FEAC7 /* Sources */,
-				571A463514DB0A1B007FEAC7 /* Frameworks */,
-				571A463614DB0A1B007FEAC7 /* Resources */,
-				571A463714DB0A1B007FEAC7 /* Sources */,
-				571A463814DB0A1B007FEAC7 /* Frameworks */,
-				571A463914DB0A1B007FEAC7 /* ShellScript */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = ChildApp;
-			productName = ChildApp;
-			productReference = 571A463B14DB0A1B007FEAC7 /* ChildApp.app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		571A462F14DB0A1A007FEAC7 /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastUpgradeCheck = 0420;
-			};
-			buildConfigurationList = 571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 0;
-			knownRegions = (
-				en,
-				es,
-			);
-			mainGroup = 571A462D14DB0A1A007FEAC7;
-			productRefGroup = 571A463C14DB0A1B007FEAC7 /* Products */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				571A463A14DB0A1B007FEAC7 /* ChildApp */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		571A463614DB0A1B007FEAC7 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */,
-				571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */,
-				571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */,
-				571A466F14DB0A1B007FEAC7 /* icon.png in Resources */,
-				571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */,
-				571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */,
-				571A467614DB0A1B007FEAC7 /* Default.png in Resources */,
-				571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */,
-				571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */,
-				571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */,
-				571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */,
-				577FC36614DB0B620082BA7B /* www in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
-		571A463914DB0A1B007FEAC7 /* ShellScript */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/bash;
-			shellScript = "\n\t\t\t\t\t\t\t\tif [ ! -d \"$PROJECT_DIR/www\" ] ; then\n\t\t\t\t\t\t\t\t\tcp -R /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework/www \"$PROJECT_DIR\"\n\t\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\t\t# detect www folder reference in project, if missing, print warning\n\t\t\t\t\t\t\t\tgrep \"{isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = \\\"<group>\\\"; };\" \"$PROJECT_DIR/$PROJECT_NAME.xcodeproj/project.pbxproj\"\n\t\t\t\t\t\t\t\trc=$? \n\t\t\t\t\t\t\t\tif [ $rc != 0 ] ; then\n\t\t\t\t\t\t\t\techo -e \"warning: Missing - Add $PROJECT_DIR/www as a folder reference in your project. Just drag and drop the folder into your project, into the Project Navigator of Xcode 4. Make sure you select the second radio-button: 'Create folder references for any added folders' (which will create a blue folder)\" 1>&2\n\t\t\t\t\t\t\t\tfi\t\t\t\t\t\t\t";
-		};
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		571A463414DB0A1B007FEAC7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A466014DB0A1B007FEAC7 /* main.m in Sources */,
-				571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */,
-				571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		571A463714DB0A1B007FEAC7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A465D14DB0A1B007FEAC7 /* en */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "<group>";
-		};
-		571A466614DB0A1B007FEAC7 /* Localizable.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A466714DB0A1B007FEAC7 /* en */,
-			);
-			name = Localizable.strings;
-			sourceTree = "<group>";
-		};
-		571A466A14DB0A1B007FEAC7 /* Localizable.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A466B14DB0A1B007FEAC7 /* es */,
-			);
-			name = Localizable.strings;
-			sourceTree = "<group>";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		571A468814DB0A1B007FEAC7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
-				CLANG_ENABLE_OBJC_ARC = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = NO;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				GCC_VERSION = com.apple.compilers.llvmgcc42;
-				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
-				SDKROOT = iphoneos;
-			};
-			name = Debug;
-		};
-		571A468914DB0A1B007FEAC7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
-				CLANG_ENABLE_OBJC_ARC = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_VERSION = com.apple.compilers.llvmgcc42;
-				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
-				SDKROOT = iphoneos;
-				VALIDATE_PRODUCT = YES;
-			};
-			name = Release;
-		};
-		571A468B14DB0A1B007FEAC7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = YES;
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
-				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
-				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak_library",
-					/usr/lib/libSystem.B.dylib,
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				TARGETED_DEVICE_FAMILY = "1,2";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Debug;
-		};
-		571A468C14DB0A1B007FEAC7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = YES;
-				COPY_PHASE_STRIP = YES;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
-				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
-				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak_library",
-					/usr/lib/libSystem.B.dylib,
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				TARGETED_DEVICE_FAMILY = "1,2";
-				VALIDATE_PRODUCT = YES;
-				WRAPPER_EXTENSION = app;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				571A468814DB0A1B007FEAC7 /* Debug */,
-				571A468914DB0A1B007FEAC7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				571A468B14DB0A1B007FEAC7 /* Debug */,
-				571A468C14DB0A1B007FEAC7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 571A462F14DB0A1A007FEAC7 /* Project object */;
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/ios-plist/SampleApp.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/ios-plist/SampleApp.xcodeproj/project.pbxproj b/cordova-lib/spec-plugman/projects/ios-plist/SampleApp.xcodeproj/project.pbxproj
deleted file mode 100644
index a4d87f9..0000000
--- a/cordova-lib/spec-plugman/projects/ios-plist/SampleApp.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,498 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A463F14DB0A1B007FEAC7 /* Foundation.framework */; };
-		571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464114DB0A1B007FEAC7 /* UIKit.framework */; };
-		571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */; };
-		571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464514DB0A1B007FEAC7 /* AddressBook.framework */; };
-		571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */; };
-		571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */; };
-		571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */; };
-		571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */; };
-		571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */; };
-		571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465114DB0A1B007FEAC7 /* QuartzCore.framework */; };
-		571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */; };
-		571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */; };
-		571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465714DB0A1B007FEAC7 /* CoreMedia.framework */; };
-		571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */; };
-		571A466014DB0A1B007FEAC7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A465F14DB0A1B007FEAC7 /* main.m */; };
-		571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A466214DB0A1B007FEAC7 /* PhoneGap.framework */; };
-		571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466614DB0A1B007FEAC7 /* Localizable.strings */; };
-		571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466A14DB0A1B007FEAC7 /* Localizable.strings */; };
-		571A466F14DB0A1B007FEAC7 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A466E14DB0A1B007FEAC7 /* icon.png */; };
-		571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467014DB0A1B007FEAC7 /* icon@2x.png */; };
-		571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467214DB0A1B007FEAC7 /* icon-72.png */; };
-		571A467614DB0A1B007FEAC7 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467514DB0A1B007FEAC7 /* Default.png */; };
-		571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467714DB0A1B007FEAC7 /* Default@2x.png */; };
-		571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 571A467914DB0A1B007FEAC7 /* Capture.bundle */; };
-		571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */ = {isa = PBXBuildFile; fileRef = 571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */; };
-		571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A467F14DB0A1B007FEAC7 /* AppDelegate.m */; };
-		571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A468214DB0A1B007FEAC7 /* MainViewController.m */; };
-		571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 571A468414DB0A1B007FEAC7 /* MainViewController.xib */; };
-		577FC36614DB0B620082BA7B /* www in Resources */ = {isa = PBXBuildFile; fileRef = 577FC36514DB0B620082BA7B /* www */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
-		571A463B14DB0A1B007FEAC7 /* ChildApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChildApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		571A463F14DB0A1B007FEAC7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-		571A464114DB0A1B007FEAC7 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
-		571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
-		571A464514DB0A1B007FEAC7 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
-		571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
-		571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
-		571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
-		571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
-		571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
-		571A465114DB0A1B007FEAC7 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
-		571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
-		571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
-		571A465714DB0A1B007FEAC7 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
-		571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ChildApp-Info.plist"; sourceTree = "<group>"; };
-		571A465D14DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		571A465F14DB0A1B007FEAC7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
-		571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ChildApp-Prefix.pch"; sourceTree = "<group>"; };
-		571A466214DB0A1B007FEAC7 /* PhoneGap.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PhoneGap.framework; path = /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework; sourceTree = "<absolute>"; };
-		571A466714DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/Localizable.strings; sourceTree = "<group>"; };
-		571A466B14DB0A1B007FEAC7 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Resources/es.lproj/Localizable.strings; sourceTree = "<group>"; };
-		571A466E14DB0A1B007FEAC7 /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon.png; path = Resources/icons/icon.png; sourceTree = "<group>"; };
-		571A467014DB0A1B007FEAC7 /* icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon@2x.png"; path = "Resources/icons/icon@2x.png"; sourceTree = "<group>"; };
-		571A467214DB0A1B007FEAC7 /* icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon-72.png"; path = "Resources/icons/icon-72.png"; sourceTree = "<group>"; };
-		571A467514DB0A1B007FEAC7 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/splash/Default.png; sourceTree = "<group>"; };
-		571A467714DB0A1B007FEAC7 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "Resources/splash/Default@2x.png"; sourceTree = "<group>"; };
-		571A467914DB0A1B007FEAC7 /* Capture.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Capture.bundle; path = Resources/Capture.bundle; sourceTree = "<group>"; };
-		571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = PhoneGap.plist; sourceTree = "<group>"; };
-		571A467E14DB0A1B007FEAC7 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Classes/AppDelegate.h; sourceTree = "<group>"; };
-		571A467F14DB0A1B007FEAC7 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Classes/AppDelegate.m; sourceTree = "<group>"; };
-		571A468114DB0A1B007FEAC7 /* MainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainViewController.h; path = Classes/MainViewController.h; sourceTree = "<group>"; };
-		571A468214DB0A1B007FEAC7 /* MainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = Classes/MainViewController.m; sourceTree = "<group>"; };
-		571A468414DB0A1B007FEAC7 /* MainViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainViewController.xib; path = Classes/MainViewController.xib; sourceTree = "<group>"; };
-		571A468714DB0A1B007FEAC7 /* README */ = {isa = PBXFileReference; lastKnownFileType = text; name = README; path = Plugins/README; sourceTree = "<group>"; };
-		577FC36514DB0B620082BA7B /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		571A463514DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */,
-				571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */,
-				571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */,
-				571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */,
-				571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */,
-				571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */,
-				571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */,
-				571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */,
-				571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */,
-				571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */,
-				571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */,
-				571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */,
-				571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */,
-				571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		571A463814DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		571A462D14DB0A1A007FEAC7 = {
-			isa = PBXGroup;
-			children = (
-				577FC36514DB0B620082BA7B /* www */,
-				571A465914DB0A1B007FEAC7 /* ChildApp */,
-				571A463E14DB0A1B007FEAC7 /* Frameworks */,
-				571A463C14DB0A1B007FEAC7 /* Products */,
-			);
-			sourceTree = "<group>";
-		};
-		571A463C14DB0A1B007FEAC7 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				571A463B14DB0A1B007FEAC7 /* ChildApp.app */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		571A463E14DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				571A463F14DB0A1B007FEAC7 /* Foundation.framework */,
-				571A464114DB0A1B007FEAC7 /* UIKit.framework */,
-				571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */,
-				571A464514DB0A1B007FEAC7 /* AddressBook.framework */,
-				571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */,
-				571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */,
-				571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */,
-				571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */,
-				571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */,
-				571A465114DB0A1B007FEAC7 /* QuartzCore.framework */,
-				571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */,
-				571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */,
-				571A465714DB0A1B007FEAC7 /* CoreMedia.framework */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
-		571A465914DB0A1B007FEAC7 /* ChildApp */ = {
-			isa = PBXGroup;
-			children = (
-				571A466214DB0A1B007FEAC7 /* PhoneGap.framework */,
-				571A466414DB0A1B007FEAC7 /* Resources */,
-				571A467D14DB0A1B007FEAC7 /* Classes */,
-				571A468614DB0A1B007FEAC7 /* Plugins */,
-				571A465A14DB0A1B007FEAC7 /* Supporting Files */,
-			);
-			path = ChildApp;
-			sourceTree = "<group>";
-		};
-		571A465A14DB0A1B007FEAC7 /* Supporting Files */ = {
-			isa = PBXGroup;
-			children = (
-				571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */,
-				571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */,
-				571A465F14DB0A1B007FEAC7 /* main.m */,
-				571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */,
-				571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */,
-				571A468414DB0A1B007FEAC7 /* MainViewController.xib */,
-			);
-			name = "Supporting Files";
-			sourceTree = "<group>";
-		};
-		571A466414DB0A1B007FEAC7 /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				571A467914DB0A1B007FEAC7 /* Capture.bundle */,
-				571A466514DB0A1B007FEAC7 /* en.lproj */,
-				571A466914DB0A1B007FEAC7 /* es.lproj */,
-				571A466D14DB0A1B007FEAC7 /* icons */,
-				571A467414DB0A1B007FEAC7 /* splash */,
-			);
-			name = Resources;
-			sourceTree = "<group>";
-		};
-		571A466514DB0A1B007FEAC7 /* en.lproj */ = {
-			isa = PBXGroup;
-			children = (
-				571A466614DB0A1B007FEAC7 /* Localizable.strings */,
-			);
-			name = en.lproj;
-			sourceTree = "<group>";
-		};
-		571A466914DB0A1B007FEAC7 /* es.lproj */ = {
-			isa = PBXGroup;
-			children = (
-				571A466A14DB0A1B007FEAC7 /* Localizable.strings */,
-			);
-			name = es.lproj;
-			sourceTree = "<group>";
-		};
-		571A466D14DB0A1B007FEAC7 /* icons */ = {
-			isa = PBXGroup;
-			children = (
-				571A466E14DB0A1B007FEAC7 /* icon.png */,
-				571A467014DB0A1B007FEAC7 /* icon@2x.png */,
-				571A467214DB0A1B007FEAC7 /* icon-72.png */,
-			);
-			name = icons;
-			sourceTree = "<group>";
-		};
-		571A467414DB0A1B007FEAC7 /* splash */ = {
-			isa = PBXGroup;
-			children = (
-				571A467514DB0A1B007FEAC7 /* Default.png */,
-				571A467714DB0A1B007FEAC7 /* Default@2x.png */,
-			);
-			name = splash;
-			sourceTree = "<group>";
-		};
-		571A467D14DB0A1B007FEAC7 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-				571A467E14DB0A1B007FEAC7 /* AppDelegate.h */,
-				571A467F14DB0A1B007FEAC7 /* AppDelegate.m */,
-				571A468114DB0A1B007FEAC7 /* MainViewController.h */,
-				571A468214DB0A1B007FEAC7 /* MainViewController.m */,
-			);
-			name = Classes;
-			sourceTree = "<group>";
-		};
-		571A468614DB0A1B007FEAC7 /* Plugins */ = {
-			isa = PBXGroup;
-			children = (
-				571A468714DB0A1B007FEAC7 /* README */,
-			);
-			name = Plugins;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		571A463A14DB0A1B007FEAC7 /* ChildApp */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */;
-			buildPhases = (
-				571A463414DB0A1B007FEAC7 /* Sources */,
-				571A463514DB0A1B007FEAC7 /* Frameworks */,
-				571A463614DB0A1B007FEAC7 /* Resources */,
-				571A463714DB0A1B007FEAC7 /* Sources */,
-				571A463814DB0A1B007FEAC7 /* Frameworks */,
-				571A463914DB0A1B007FEAC7 /* ShellScript */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = ChildApp;
-			productName = ChildApp;
-			productReference = 571A463B14DB0A1B007FEAC7 /* ChildApp.app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		571A462F14DB0A1A007FEAC7 /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastUpgradeCheck = 0420;
-			};
-			buildConfigurationList = 571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 0;
-			knownRegions = (
-				en,
-				es,
-			);
-			mainGroup = 571A462D14DB0A1A007FEAC7;
-			productRefGroup = 571A463C14DB0A1B007FEAC7 /* Products */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				571A463A14DB0A1B007FEAC7 /* ChildApp */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		571A463614DB0A1B007FEAC7 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */,
-				571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */,
-				571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */,
-				571A466F14DB0A1B007FEAC7 /* icon.png in Resources */,
-				571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */,
-				571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */,
-				571A467614DB0A1B007FEAC7 /* Default.png in Resources */,
-				571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */,
-				571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */,
-				571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */,
-				571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */,
-				577FC36614DB0B620082BA7B /* www in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
-		571A463914DB0A1B007FEAC7 /* ShellScript */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/bash;
-			shellScript = "\n\t\t\t\t\t\t\t\tif [ ! -d \"$PROJECT_DIR/www\" ] ; then\n\t\t\t\t\t\t\t\t\tcp -R /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework/www \"$PROJECT_DIR\"\n\t\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\t\t# detect www folder reference in project, if missing, print warning\n\t\t\t\t\t\t\t\tgrep \"{isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = \\\"<group>\\\"; };\" \"$PROJECT_DIR/$PROJECT_NAME.xcodeproj/project.pbxproj\"\n\t\t\t\t\t\t\t\trc=$? \n\t\t\t\t\t\t\t\tif [ $rc != 0 ] ; then\n\t\t\t\t\t\t\t\techo -e \"warning: Missing - Add $PROJECT_DIR/www as a folder reference in your project. Just drag and drop the folder into your project, into the Project Navigator of Xcode 4. Make sure you select the second radio-button: 'Create folder references for any added folders' (which will create a blue folder)\" 1>&2\n\t\t\t\t\t\t\t\tfi\t\t\t\t\t\t\t";
-		};
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		571A463414DB0A1B007FEAC7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A466014DB0A1B007FEAC7 /* main.m in Sources */,
-				571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */,
-				571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		571A463714DB0A1B007FEAC7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A465D14DB0A1B007FEAC7 /* en */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "<group>";
-		};
-		571A466614DB0A1B007FEAC7 /* Localizable.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A466714DB0A1B007FEAC7 /* en */,
-			);
-			name = Localizable.strings;
-			sourceTree = "<group>";
-		};
-		571A466A14DB0A1B007FEAC7 /* Localizable.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A466B14DB0A1B007FEAC7 /* es */,
-			);
-			name = Localizable.strings;
-			sourceTree = "<group>";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		571A468814DB0A1B007FEAC7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
-				CLANG_ENABLE_OBJC_ARC = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = NO;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				GCC_VERSION = com.apple.compilers.llvmgcc42;
-				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
-				SDKROOT = iphoneos;
-			};
-			name = Debug;
-		};
-		571A468914DB0A1B007FEAC7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
-				CLANG_ENABLE_OBJC_ARC = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_VERSION = com.apple.compilers.llvmgcc42;
-				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
-				SDKROOT = iphoneos;
-				VALIDATE_PRODUCT = YES;
-			};
-			name = Release;
-		};
-		571A468B14DB0A1B007FEAC7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = YES;
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
-				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
-				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak_library",
-					/usr/lib/libSystem.B.dylib,
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				TARGETED_DEVICE_FAMILY = "1,2";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Debug;
-		};
-		571A468C14DB0A1B007FEAC7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = YES;
-				COPY_PHASE_STRIP = YES;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
-				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
-				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak_library",
-					/usr/lib/libSystem.B.dylib,
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				TARGETED_DEVICE_FAMILY = "1,2";
-				VALIDATE_PRODUCT = YES;
-				WRAPPER_EXTENSION = app;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				571A468814DB0A1B007FEAC7 /* Debug */,
-				571A468914DB0A1B007FEAC7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				571A468B14DB0A1B007FEAC7 /* Debug */,
-				571A468C14DB0A1B007FEAC7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 571A462F14DB0A1A007FEAC7 /* Project object */;
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/ios-plist/SampleApp/PhoneGap.plist
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/ios-plist/SampleApp/PhoneGap.plist b/cordova-lib/spec-plugman/projects/ios-plist/SampleApp/PhoneGap.plist
deleted file mode 100644
index 5ffe25e..0000000
--- a/cordova-lib/spec-plugman/projects/ios-plist/SampleApp/PhoneGap.plist
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>TopActivityIndicator</key>
-	<string>gray</string>
-	<key>EnableLocation</key>
-	<false/>
-	<key>EnableViewportScale</key>
-	<false/>
-	<key>AutoHideSplashScreen</key>
-	<true/>
-	<key>ShowSplashScreenSpinner</key>
-	<true/>
-	<key>MediaPlaybackRequiresUserAction</key>
-	<false/>
-	<key>AllowInlineMediaPlayback</key>
-	<false/>
-	<key>OpenAllWhitelistURLsInWebView</key>
-	<false/>
-	<key>ExternalHosts</key>
-	<array/>
-	<key>Plugins</key>
-	<dict>
-		<key>com.phonegap.accelerometer</key>
-		<string>PGAccelerometer</string>
-		<key>com.phonegap.camera</key>
-		<string>PGCamera</string>
-		<key>com.phonegap.connection</key>
-		<string>PGConnection</string>
-		<key>com.phonegap.contacts</key>
-		<string>PGContacts</string>
-		<key>com.phonegap.debugconsole</key>
-		<string>PGDebugConsole</string>
-		<key>com.phonegap.file</key>
-		<string>PGFile</string>
-		<key>com.phonegap.filetransfer</key>
-		<string>PGFileTransfer</string>
-		<key>com.phonegap.geolocation</key>
-		<string>PGLocation</string>
-		<key>com.phonegap.notification</key>
-		<string>PGNotification</string>
-		<key>com.phonegap.media</key>
-		<string>PGSound</string>
-		<key>com.phonegap.mediacapture</key>
-		<string>PGCapture</string>
-		<key>com.phonegap.splashscreen</key>
-		<string>PGSplashScreen</string>
-		<key>com.phonegap.battery</key>
-		<string>PGBattery</string>
-	</dict>
-</dict>
-</plist>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/ios-plist/SampleApp/SampleApp-Info.plist
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/ios-plist/SampleApp/SampleApp-Info.plist b/cordova-lib/spec-plugman/projects/ios-plist/SampleApp/SampleApp-Info.plist
deleted file mode 100644
index 08b9ee3..0000000
--- a/cordova-lib/spec-plugman/projects/ios-plist/SampleApp/SampleApp-Info.plist
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<!--
-#
-# 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.
-#
--->
-<plist version="1.0">
-<dict>
-	<key>CFBundleIcons</key>
-	<dict>
-		<key>CFBundlePrimaryIcon</key>
-		<dict>
-			<key>CFBundleIconFiles</key>
-			<array>
-                <string>icon.png</string>
-                <string>icon@2x.png</string>
-                <string>icon-72.png</string>
-                <string>icon-72@2x.png</string>
-			</array>
-			<key>UIPrerenderedIcon</key>
-			<false/>
-		</dict>
-	</dict>
-	<key>UISupportedInterfaceOrientations~ipad</key>
-	<array>
-		<string>UIInterfaceOrientationPortrait</string>
-		<string>UIInterfaceOrientationLandscapeLeft</string>
-		<string>UIInterfaceOrientationPortraitUpsideDown</string>
-		<string>UIInterfaceOrientationLandscapeRight</string>
-	</array>
-	<key>UISupportedInterfaceOrientations</key>
-	<array>
-		<string>UIInterfaceOrientationPortrait</string>
-	</array>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleDisplayName</key>
-	<string>${PRODUCT_NAME}</string>
-	<key>CFBundleExecutable</key>
-	<string>${EXECUTABLE_NAME}</string>
-	<key>CFBundleIconFile</key>
-	<string>icon.png</string>
-	<key>CFBundleIdentifier</key>
-	<string>com.example.friendstring</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>${PRODUCT_NAME}</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1.0</string>
-	<key>LSRequiresIPhoneOS</key>
-	<true/>
-	<key>NSMainNibFile</key>
-	<string></string>
-	<key>NSMainNibFile~ipad</key>
-	<string></string>
-	<key>AppId</key>
-	<string>$APP_ID</string>
-</dict>
-</plist>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/ios-plist/www/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/ios-plist/www/.gitkeep b/cordova-lib/spec-plugman/projects/ios-plist/www/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/multiple-children/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/multiple-children/AndroidManifest.xml b/cordova-lib/spec-plugman/projects/multiple-children/AndroidManifest.xml
deleted file mode 100644
index 0c52803..0000000
--- a/cordova-lib/spec-plugman/projects/multiple-children/AndroidManifest.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
-      package="com.alunny.childapp" android:versionName="1.1" android:versionCode="5">
-    <supports-screens
-    	android:largeScreens="true"
-    	android:normalScreens="true"
-    	android:smallScreens="true"
-    	android:xlargeScreens="true"
-    	android:resizeable="true"
-    	android:anyDensity="true"
-    	/>
-
-    <uses-permission android:name="android.permission.CAMERA" />
-    <uses-permission android:name="android.permission.VIBRATE" />
-    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
-    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
-    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
-    <uses-permission android:name="android.permission.INTERNET" />
-    <uses-permission android:name="android.permission.RECEIVE_SMS" />
-    <uses-permission android:name="android.permission.RECORD_AUDIO" />
-    <uses-permission android:name="android.permission.RECORD_VIDEO"/>
-    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
-    <uses-permission android:name="android.permission.READ_CONTACTS" />
-    <uses-permission android:name="android.permission.WRITE_CONTACTS" />   
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />   
-    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
-    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
-    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
-
-    <uses-feature android:name="android.hardware.camera" />
-    <uses-feature android:name="android.hardware.camera.autofocus" />
-
-    <application android:icon="@drawable/icon" android:label="@string/app_name"
-    	android:debuggable="true">
-		<activity android:name="ChildApp" android:label="@string/app_name" 
-				  android:configChanges="orientation|keyboardHidden">
-			<intent-filter>
-				<action android:name="android.intent.action.MAIN" />
-				<category android:name="android.intent.category.LAUNCHER" />
-			</intent-filter>
-        </activity>
-        <activity android:name="com.phonegap.DroidGap" android:label="@string/app_name" 
-            	  android:configChanges="orientation|keyboardHidden">
-        	<intent-filter>
-        	</intent-filter>
-        </activity>
-    </application>
-
-	<uses-sdk android:minSdkVersion="5" />
-</manifest> 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/multiple-children/res/xml/plugins.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/multiple-children/res/xml/plugins.xml b/cordova-lib/spec-plugman/projects/multiple-children/res/xml/plugins.xml
deleted file mode 100644
index 9cee85e..0000000
--- a/cordova-lib/spec-plugman/projects/multiple-children/res/xml/plugins.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugins>
-    <plugin name="App" value="com.phonegap.App"/>
-    <plugin name="Geolocation" value="com.phonegap.GeoBroker"/>
-    <plugin name="Device" value="com.phonegap.Device"/>
-    <plugin name="Accelerometer" value="com.phonegap.AccelListener"/>
-    <plugin name="Compass" value="com.phonegap.CompassListener"/>
-    <plugin name="Media" value="com.phonegap.AudioHandler"/>
-    <plugin name="Camera" value="com.phonegap.CameraLauncher"/>
-    <plugin name="Contacts" value="com.phonegap.ContactManager"/>
-    <plugin name="Crypto" value="com.phonegap.CryptoHandler"/>
-    <plugin name="File" value="com.phonegap.FileUtils"/>
-    <plugin name="Network Status" value="com.phonegap.NetworkManager"/>
-    <plugin name="Notification" value="com.phonegap.Notification"/>
-    <plugin name="Storage" value="com.phonegap.Storage"/>
-    <plugin name="Temperature" value="com.phonegap.TempListener"/>
-    <plugin name="FileTransfer" value="com.phonegap.FileTransfer"/>
-    <plugin name="Capture" value="com.phonegap.Capture"/>
-</plugins>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/tizen/www/config.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/tizen/www/config.xml b/cordova-lib/spec-plugman/projects/tizen/www/config.xml
deleted file mode 100644
index 788f6d4..0000000
--- a/cordova-lib/spec-plugman/projects/tizen/www/config.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<widget id="TizenTestPackage"></widget>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/windows8/CordovaApp_TemporaryKey.pfx
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/windows8/CordovaApp_TemporaryKey.pfx b/cordova-lib/spec-plugman/projects/windows8/CordovaApp_TemporaryKey.pfx
deleted file mode 100644
index 4df1e37..0000000
Binary files a/cordova-lib/spec-plugman/projects/windows8/CordovaApp_TemporaryKey.pfx and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/windows8/TestApp.jsproj
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/windows8/TestApp.jsproj b/cordova-lib/spec-plugman/projects/windows8/TestApp.jsproj
deleted file mode 100644
index d508c3f..0000000
--- a/cordova-lib/spec-plugman/projects/windows8/TestApp.jsproj
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|AnyCPU">
-      <Configuration>Debug</Configuration>
-      <Platform>AnyCPU</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Debug|ARM">
-      <Configuration>Debug</Configuration>
-      <Platform>ARM</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Debug|x64">
-      <Configuration>Debug</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Debug|x86">
-      <Configuration>Debug</Configuration>
-      <Platform>x86</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|AnyCPU">
-      <Configuration>Release</Configuration>
-      <Platform>AnyCPU</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|ARM">
-      <Configuration>Release</Configuration>
-      <Platform>ARM</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|x64">
-      <Configuration>Release</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|x86">
-      <Configuration>Release</Configuration>
-      <Platform>x86</Platform>
-    </ProjectConfiguration>
-  </ItemGroup>
-  <PropertyGroup Label="Globals">
-    <ProjectGuid>efffab2f-bfc5-4eda-b545-45ef4995f55a</ProjectGuid>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '11.0'">
-    <VisualStudioVersion>11.0</VisualStudioVersion>
-  </PropertyGroup>
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).Default.props" />
-  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).props" />
-  <PropertyGroup>
-    <TargetPlatformIdentifier>Windows</TargetPlatformIdentifier>
-    <TargetPlatformVersion>8.0</TargetPlatformVersion>
-    <DefaultLanguage>en-US</DefaultLanguage>
-    <PackageCertificateKeyFile>CordovaApp_TemporaryKey.pfx</PackageCertificateKeyFile>
-  </PropertyGroup>
-  <ItemGroup>
-    <AppxManifest Include="package.appxmanifest">
-      <SubType>Designer</SubType>
-    </AppxManifest>
-    <Content Include="www\cordova-2.6.0.js" />
-    <Content Include="www\css\index.css" />
-    <Content Include="www\img\logo.png" />
-    <Content Include="www\img\smalllogo.png" />
-    <Content Include="www\img\splashscreen.png" />
-    <Content Include="www\img\storelogo.png" />
-    <Content Include="www\index.html" />
-    <Content Include="www\js\index.js" />
-    <None Include="CordovaApp_TemporaryKey.pfx" />
-  </ItemGroup>
-  <ItemGroup>
-    <SDKReference Include="Microsoft.WinJS.1.0, Version=1.0" />
-  </ItemGroup>
-  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).targets" />
-  <!-- To modify your build process, add your task inside one of the targets below then uncomment
-       that target and the DisableFastUpToDateCheck PropertyGroup. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  <PropertyGroup>
-    <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
-  </PropertyGroup>
-  -->
-</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/windows8/TestApp.sln
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/windows8/TestApp.sln b/cordova-lib/spec-plugman/projects/windows8/TestApp.sln
deleted file mode 100644
index 6c1ea33..0000000
--- a/cordova-lib/spec-plugman/projects/windows8/TestApp.sln
+++ /dev/null
@@ -1,46 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
-Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "TestApp", "TestApp.jsproj", "{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}"
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Any CPU = Debug|Any CPU
-		Debug|ARM = Debug|ARM
-		Debug|x64 = Debug|x64
-		Debug|x86 = Debug|x86
-		Release|Any CPU = Release|Any CPU
-		Release|ARM = Release|ARM
-		Release|x64 = Release|x64
-		Release|x86 = Release|x86
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|ARM.ActiveCfg = Debug|ARM
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|ARM.Build.0 = Debug|ARM
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|ARM.Deploy.0 = Debug|ARM
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x64.ActiveCfg = Debug|x64
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x64.Build.0 = Debug|x64
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x64.Deploy.0 = Debug|x64
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x86.ActiveCfg = Debug|x86
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x86.Build.0 = Debug|x86
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x86.Deploy.0 = Debug|x86
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|Any CPU.Build.0 = Release|Any CPU
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|Any CPU.Deploy.0 = Release|Any CPU
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|ARM.ActiveCfg = Release|ARM
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|ARM.Build.0 = Release|ARM
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|ARM.Deploy.0 = Release|ARM
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x64.ActiveCfg = Release|x64
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x64.Build.0 = Release|x64
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x64.Deploy.0 = Release|x64
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x86.ActiveCfg = Release|x86
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x86.Build.0 = Release|x86
-		{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x86.Deploy.0 = Release|x86
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/windows8/package.appxmanifest
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/windows8/package.appxmanifest b/cordova-lib/spec-plugman/projects/windows8/package.appxmanifest
deleted file mode 100644
index 62c8f28..0000000
--- a/cordova-lib/spec-plugman/projects/windows8/package.appxmanifest
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
-  <Identity Name="efffab2f-bfc5-4eda-b545-45ef4995f55a" Version="1.0.0.0" Publisher="CN=Jesse" />
-  <Properties>
-    <DisplayName>CordovaApp</DisplayName>
-    <PublisherDisplayName>Jesse</PublisherDisplayName>
-    <Logo>images\storelogo.png</Logo>
-  </Properties>
-  <Prerequisites>
-    <OSMinVersion>6.2.1</OSMinVersion>
-    <OSMaxVersionTested>6.2.1</OSMaxVersionTested>
-  </Prerequisites>
-  <Resources>
-    <Resource Language="x-generate" />
-  </Resources>
-  <Applications>
-    <Application Id="App" StartPage="www/index.html">
-      <VisualElements DisplayName="CordovaApp" Logo="www\img\logo.png" SmallLogo="www\img\smalllogo.png" Description="CordovaApp" ForegroundText="light" BackgroundColor="#464646">
-        <DefaultTile ShowName="allLogos" />
-        <SplashScreen Image="www\img\splashscreen.png" />
-      </VisualElements>
-    </Application>
-  </Applications>
-  <Capabilities>
-    <Capability Name="internetClient" />
-  </Capabilities>
-</Package>
\ No newline at end of file


[23/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/adduser.spec.js
----------------------------------------------------------------------
diff --git a/spec/adduser.spec.js b/spec/adduser.spec.js
deleted file mode 100644
index 48b1281..0000000
--- a/spec/adduser.spec.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var adduser = require('../src/adduser'),
-    Q = require('q'),
-    registry = require('../src/registry/registry');
-
-describe('adduser', function() {
-    it('should add a user', function() {
-        var sAddUser = spyOn(registry, 'adduser').andReturn(Q());
-        adduser();
-        expect(sAddUser).toHaveBeenCalled();
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/common.js
----------------------------------------------------------------------
diff --git a/spec/common.js b/spec/common.js
deleted file mode 100644
index b71efbf..0000000
--- a/spec/common.js
+++ /dev/null
@@ -1,62 +0,0 @@
-
-var plugman = require('../plugman'),
-    nopt = require('nopt');
-
-var known_opts = {
-    'verbose' : Boolean,
-    'debug' : Number
-}, shortHands = { 'd' : ['--debug'] };
-
-var opt = nopt(known_opts, shortHands);
-var mapNames = {
-    'verbose' : 7,
-    'info'    : 6,
-    'notice'  : 5,
-    'warn'    : 4,
-    'error'   : 3
-}
-
-if(opt.verbose)
-    opt.debug = 7;
-
-if(opt.debug) {
-    for(var i in mapNames) {
-        if(mapNames[i] <= opt.debug)
-            plugman.on(i, console.log);
-    }
-
-    if(opt.debug >= 6)
-        plugman.on('log', console.log);
-}
-
-module.exports = common = {
-    spy: {
-        getInstall: function(emitSpy){
-            return common.spy.startsWith(emitSpy, 'Install start');
-        },
-
-        getDeleted: function(emitSpy){
-            return common.spy.startsWith(emitSpy, 'Deleted');
-        },
-
-        startsWith: function(emitSpy, string)
-        {
-            var match = [], i;
-            for(i in emitSpy.argsForCall) {
-                if(emitSpy.argsForCall[i][1].substr(0, string.length) === string)
-                    match.push(emitSpy.argsForCall[i][1]);
-            }
-            return match;
-        },
-
-        contains: function(emitSpy, string)
-        {
-            var match = [], i;
-            for(i in emitSpy.argsForCall) {
-                if(emitSpy.argsForCall[i][1].indexOf(string) >= 0)
-                    match.push(emitSpy.argsForCall[i][1]);
-            }
-            return match;
-        }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/config.spec.js
----------------------------------------------------------------------
diff --git a/spec/config.spec.js b/spec/config.spec.js
deleted file mode 100644
index 65addbf..0000000
--- a/spec/config.spec.js
+++ /dev/null
@@ -1,12 +0,0 @@
-var config = require('../src/config'),
-    Q = require('q'),
-    registry = require('../src/registry/registry');
-
-describe('config', function() {
-    it('should run config', function() {
-        var sConfig = spyOn(registry, 'config').andReturn(Q());
-        var params = ['set', 'registry', 'http://registry.cordova.io'];
-        config(params);
-        expect(sConfig).toHaveBeenCalledWith(params);
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/create.spec.js
----------------------------------------------------------------------
diff --git a/spec/create.spec.js b/spec/create.spec.js
deleted file mode 100644
index afc034a..0000000
--- a/spec/create.spec.js
+++ /dev/null
@@ -1,62 +0,0 @@
-var create = require('../src/create'),
-    Q = require('q'),
-    fs = require('fs'),
-    shell = require('shelljs'),
-    plugman = require('../plugman');
-
-describe( 'create', function() {
-    it( 'should call create', function() {
-        var sCreate = spyOn( plugman, 'create' ).andReturn(Q());
-        plugman.create();
-        expect(sCreate).toHaveBeenCalled();
-    });
-});
-
-describe( 'create plugin', function() {
-    var done = false,
-        existsSync,
-        mkdir,
-        writeFileSync;
-    function createPromise( f ) {
-        f.then( function() { done = true; }, function(err) { done = err; } );
-    }
-    beforeEach( function() {
-        existsSync = spyOn( fs, 'existsSync' ).andReturn( false );
-        mkdir = spyOn( shell, 'mkdir' ).andReturn( true );
-        writeFileSync = spyOn( fs, 'writeFileSync' );
-        done = false;
-    });
-
-    it( 'should be successful', function() {
-        runs(function() {
-            createPromise( create( 'name', 'org.plugin.id', '0.0.0', '.', [] ) );
-        });
-        waitsFor(function() { return done; }, 'create promise never resolved', 500);
-        runs(function() {
-            expect( done ).toBe( true );
-            expect( writeFileSync.calls.length ).toEqual( 2 );
-        });
-    });
-});
-
-describe( 'create plugin in existing plugin', function() {
-    var done = false,
-        existsSync;
-    function createPromise( f ) {
-        f.then( function() { done = true; }, function(err) { done = err; } );
-    }
-    beforeEach( function() {
-        existsSync = spyOn( fs, 'existsSync' ).andReturn( true );
-        done = false;
-    });
-
-    it( 'should fail due to an existing plugin.xml', function() {
-        runs(function() {
-            createPromise( create() );
-        });
-        waitsFor(function() { return done; }, 'create promise never resolved', 500);
-        runs(function() {
-            expect(''+ done ).toContain( 'Error: plugin.xml already exists. Are you already in a plugin?'  );
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/fetch.spec.js
----------------------------------------------------------------------
diff --git a/spec/fetch.spec.js b/spec/fetch.spec.js
deleted file mode 100644
index 2a0b660..0000000
--- a/spec/fetch.spec.js
+++ /dev/null
@@ -1,211 +0,0 @@
-var fetch   = require('../src/fetch'),
-    fs      = require('fs'),
-    os      = require('osenv'),
-    path    = require('path'),
-    shell   = require('shelljs'),
-    xml_helpers = require('../src/util/xml-helpers'),
-    metadata = require('../src/util/metadata'),
-    temp    = path.join(os.tmpdir(), 'plugman'),
-    test_plugin = path.join(__dirname, 'plugins', 'ChildBrowser'),
-    test_plugin_with_space = path.join(__dirname, 'folder with space', 'plugins', 'ChildBrowser'),
-    plugins = require('../src/util/plugins'),
-    Q = require('q'),
-    registry = require('../src/registry/registry');
-
-describe('fetch', function() {
-    function wrapper(p, done, post) {
-        p.then(post, function(err) {
-            expect(err).toBeUndefined();
-        }).fin(done);
-    }
-
-    describe('local plugins', function() {
-        var xml, rm, sym, mkdir, cp, save_metadata;
-        beforeEach(function() {
-            xml = spyOn(xml_helpers, 'parseElementtreeSync').andReturn({
-                getroot:function() { return {attrib:{id:'id'}};}
-            });
-            rm = spyOn(shell, 'rm');
-            sym = spyOn(fs, 'symlinkSync');
-            mkdir = spyOn(shell, 'mkdir');
-            cp = spyOn(shell, 'cp');
-            save_metadata = spyOn(metadata, 'save_fetch_metadata');
-        });
-
-        it('should copy locally-available plugin to plugins directory', function(done) {
-            wrapper(fetch(test_plugin, temp), done, function() {
-                expect(cp).toHaveBeenCalledWith('-R', path.join(test_plugin, '*'), path.join(temp, 'id'));
-            });
-        });
-        it('should copy locally-available plugin to plugins directory when spaces in path', function(done) {
-            //XXX: added this because plugman tries to fetch from registry when plugin folder does not exist
-            spyOn(fs,'existsSync').andReturn(true);
-            wrapper(fetch(test_plugin_with_space, temp), done, function() {
-                expect(cp).toHaveBeenCalledWith('-R', path.join(test_plugin_with_space, '*'), path.join(temp, 'id'));
-            });
-        });
-        it('should create a symlink if used with `link` param', function(done) {
-            wrapper(fetch(test_plugin, temp, { link: true }), done, function() {
-                expect(sym).toHaveBeenCalledWith(test_plugin, path.join(temp, 'id'), 'dir');
-            });
-        });
-        it('should fail when the expected ID doesn\'t match', function(done) {
-            fetch(test_plugin, temp, { expected_id: 'wrongID' })
-            .then(function() {
-                expect('this call').toBe('fail');
-            }, function(err) {
-                expect(''+err).toContain('Expected fetched plugin to have ID "wrongID" but got "id".');
-            }).fin(done);
-        });
-        it('should succeed when the expected ID is correct', function(done) {
-            wrapper(fetch(test_plugin, temp, { expected_id: 'id' }), done, function() {
-                expect(1).toBe(1);
-            });
-        });
-    });
-    describe('git plugins', function() {
-        var clone, save_metadata, done, xml;
-
-        function fetchPromise(f) {
-            f.then(function() { done = true; }, function(err) { done = err; });
-        }
-
-        beforeEach(function() {
-            clone = spyOn(plugins, 'clonePluginGitRepo').andReturn(Q('somedir'));
-            save_metadata = spyOn(metadata, 'save_fetch_metadata');
-            done = false;
-            xml = spyOn(xml_helpers, 'parseElementtreeSync').andReturn({
-                getroot:function() { return {attrib:{id:'id'}};}
-            });
-        });
-        it('should call clonePluginGitRepo for https:// and git:// based urls', function() {
-            var url = "https://github.com/bobeast/GAPlugin.git";
-            runs(function() {
-                fetchPromise(fetch(url, temp));
-            });
-            waitsFor(function() { return done; }, 'fetch promise never resolved', 250);
-            runs(function() {
-                expect(done).toBe(true);
-                expect(clone).toHaveBeenCalledWith(url, temp, '.', undefined);
-                expect(save_metadata).toHaveBeenCalledWith('somedir', jasmine.any(Object));
-            });
-        });
-        it('should call clonePluginGitRepo with subdir if applicable', function() {
-            var url = "https://github.com/bobeast/GAPlugin.git";
-            var dir = 'fakeSubDir';
-            runs(function() {
-                fetchPromise(fetch(url, temp, { subdir: dir }));
-            });
-            waitsFor(function() { return done; }, 'fetch promise never resolved', 250);
-            runs(function() {
-                expect(clone).toHaveBeenCalledWith(url, temp, dir, undefined);
-                expect(save_metadata).toHaveBeenCalledWith('somedir', jasmine.any(Object));
-            });
-        });
-        it('should call clonePluginGitRepo with subdir and git ref if applicable', function() {
-            var url = "https://github.com/bobeast/GAPlugin.git";
-            var dir = 'fakeSubDir';
-            var ref = 'fakeGitRef';
-            runs(function() {
-                fetchPromise(fetch(url, temp, { subdir: dir, git_ref: ref }));
-            });
-            waitsFor(function() { return done; }, 'fetch promise never resolved', 250);
-            runs(function() {
-                expect(clone).toHaveBeenCalledWith(url, temp, dir, ref);
-                expect(save_metadata).toHaveBeenCalledWith('somedir', jasmine.any(Object));
-            });
-        });
-        it('should extract the git ref from the URL hash, if provided', function() {
-            var url = "https://github.com/bobeast/GAPlugin.git#fakeGitRef";
-            var baseURL = "https://github.com/bobeast/GAPlugin.git";
-            runs(function() {
-                fetchPromise(fetch(url, temp, {}));
-            });
-            waitsFor(function() { return done; }, 'fetch promise never resolved', 250);
-            runs(function() {
-                expect(clone).toHaveBeenCalledWith(baseURL, temp, '.', 'fakeGitRef');
-                expect(save_metadata).toHaveBeenCalledWith('somedir', jasmine.any(Object));
-            });
-        });
-        it('should extract the subdir from the URL hash, if provided', function() {
-            var url = "https://github.com/bobeast/GAPlugin.git#:fakeSubDir";
-            var baseURL = "https://github.com/bobeast/GAPlugin.git";
-            runs(function() {
-                fetchPromise(fetch(url, temp, {}));
-            });
-            waitsFor(function() { return done; }, 'fetch promise never resolved', 250);
-            runs(function() {
-                expect(clone).toHaveBeenCalledWith(baseURL, temp, 'fakeSubDir', undefined);
-                expect(save_metadata).toHaveBeenCalledWith('somedir', jasmine.any(Object));
-            });
-        });
-        it('should extract the git ref and subdir from the URL hash, if provided', function() {
-            var url = "https://github.com/bobeast/GAPlugin.git#fakeGitRef:/fake/Sub/Dir/";
-            var baseURL = "https://github.com/bobeast/GAPlugin.git";
-            runs(function() {
-                fetchPromise(fetch(url, temp, {}));
-            });
-            waitsFor(function() { return done; }, 'fetch promise never resolved', 250);
-            runs(function() {
-                expect(clone).toHaveBeenCalledWith(baseURL, temp, 'fake/Sub/Dir', 'fakeGitRef');
-                expect(save_metadata).toHaveBeenCalledWith('somedir', jasmine.any(Object));
-            });
-        });
-        it('should throw if used with url and `link` param', function() {
-            runs(function() {
-                fetch("https://github.com/bobeast/GAPlugin.git", temp, {link:true}).then(null, function(err) { done = err; });
-            });
-            waitsFor(function() { return done; }, 'fetch promise never resolved', 250);
-            runs(function() {
-                expect(''+done).toContain('--link is not supported for git URLs');
-            });
-        });
-        it('should fail when the expected ID doesn\'t match', function(done) {
-            fetch('https://github.com/bobeast/GAPlugin.git', temp, { expected_id: 'wrongID' })
-            .then(function() {
-                expect('this call').toBe('fail');
-            }, function(err) {
-                expect(''+err).toContain('Expected fetched plugin to have ID "wrongID" but got "id".');
-            }).fin(done);
-        });
-        it('should succeed when the expected ID is correct', function(done) {
-            wrapper(fetch('https://github.com/bobeast/GAPlugin.git', temp, { expected_id: 'id' }), done, function() {
-                expect(1).toBe(1);
-            });
-        });
-    });
-    describe('registry plugins', function() {
-        var pluginId = 'dummyplugin', sFetch;
-        var xml, rm, sym, mkdir, cp, save_metadata;
-        beforeEach(function() {
-            xml = spyOn(xml_helpers, 'parseElementtreeSync').andReturn({
-                getroot:function() { return {attrib:{id:'id'}};}
-            });
-            rm = spyOn(shell, 'rm');
-            sym = spyOn(fs, 'symlinkSync');
-            mkdir = spyOn(shell, 'mkdir');
-            cp = spyOn(shell, 'cp');
-            save_metadata = spyOn(metadata, 'save_fetch_metadata');
-            sFetch = spyOn(registry, 'fetch').andReturn(Q('somedir'));
-        });
-
-        it('should get a plugin from registry and set the right client when argument is not a folder nor URL', function(done) {
-            wrapper(fetch(pluginId, temp, {client: 'plugman'}), done, function() {
-                expect(sFetch).toHaveBeenCalledWith([pluginId], 'plugman');
-            });
-        });
-        it('should fail when the expected ID doesn\'t match', function(done) {
-            fetch(pluginId, temp, { expected_id: 'wrongID' })
-            .then(function() {
-                expect('this call').toBe('fail');
-            }, function(err) {
-                expect(''+err).toContain('Expected fetched plugin to have ID "wrongID" but got "id".');
-            }).fin(done);
-        });
-        it('should succeed when the expected ID is correct', function(done) {
-            wrapper(fetch(pluginId, temp, { expected_id: 'id' }), done, function() {
-                expect(1).toBe(1);
-            });
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/info.spec.js
----------------------------------------------------------------------
diff --git a/spec/info.spec.js b/spec/info.spec.js
deleted file mode 100644
index 96256c7..0000000
--- a/spec/info.spec.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var search = require('../src/info'),
-    Q = require('q'),
-    registry = require('../src/registry/registry');
-
-describe('info', function() {
-    it('should show plugin info', function() {
-        var sSearch = spyOn(registry, 'info').andReturn(Q({
-            name: 'fakePlugin',
-            version: '1.0.0',
-            engines: [{ name: 'plugman', version: '>=0.11' }]
-        }));
-        search(new Array('myplugin'));
-        expect(sSearch).toHaveBeenCalledWith(['myplugin']);
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/install.spec.js
----------------------------------------------------------------------
diff --git a/spec/install.spec.js b/spec/install.spec.js
deleted file mode 100644
index 20a3d37..0000000
--- a/spec/install.spec.js
+++ /dev/null
@@ -1,472 +0,0 @@
-var install = require('../src/install'),
-    actions = require('../src/util/action-stack'),
-    config_changes = require('../src/util/config-changes'),
-    xml_helpers = require('../src/util/xml-helpers'),
-    events  = require('../src/events'),
-    plugman = require('../plugman'),
-    platforms = require('../src/platforms/common'),
-    common  = require('./common'),
-    fs      = require('fs'),
-    os      = require('os'),
-    path    = require('path'),
-    shell   = require('shelljs'),
-    child_process = require('child_process'),
-    semver  = require('semver'),
-    Q = require('q'),
-    spec    = __dirname,
-    done    = false,
-    srcProject = path.join(spec, 'projects', 'android_install'),
-    project = path.join(os.tmpdir(), 'plugman-test', 'android_install'),
-
-    plugins_dir = path.join(spec, 'plugins'),
-    plugins_install_dir = path.join(project, 'cordova', 'plugins'),
-    plugins = {
-        'DummyPlugin' : path.join(plugins_dir, 'DummyPlugin'),
-        'EnginePlugin' : path.join(plugins_dir, 'EnginePlugin'),
-        'EnginePluginAndroid' : path.join(plugins_dir, 'EnginePluginAndroid'),
-        'ChildBrowser' : path.join(plugins_dir, 'ChildBrowser'),
-        'VariablePlugin' : path.join(plugins_dir, 'VariablePlugin'),
-        'A' : path.join(plugins_dir, 'dependencies', 'A'),
-        'B' : path.join(plugins_dir, 'dependencies', 'B'),
-        'C' : path.join(plugins_dir, 'dependencies', 'C'),
-        'F' : path.join(plugins_dir, 'dependencies', 'F'),
-        'G' : path.join(plugins_dir, 'dependencies', 'G')
-    },
-    promise,
-    results = {},
-    dummy_id = 'com.phonegap.plugins.dummyplugin';
-
-function installPromise(f) {
-  f.then(function(res) { done = true; }, function(err) { done = err; });
-}
-
-var existsSync = fs.existsSync;
-
-// Mocked functions for tests
-var fake = {
-    'existsSync' : {
-        'noPlugins' : function(path){
-            // fake installed plugin directories as 'not found'
-            if( path.slice(-5) !== '.json' && path.indexOf(plugins_install_dir) >= 0) {
-                return false;
-            }
-
-            return existsSync(path);
-        }
-    },
-    'fetch' : {
-        'dependencies' : function(id, dir) {
-            if(id == plugins['A'])
-                return Q(id); // full path to plugin
-
-            return Q( path.join(plugins_dir, 'dependencies', id) );
-        }
-    }
-}
-
-describe('start', function() {
-    var prepare, config_queue_add, proc, actions_push, ca, emit;
-
-    beforeEach(function() {
-        prepare = spyOn(plugman, 'prepare');
-        config_queue_add = spyOn(config_changes, 'add_installed_plugin_to_prepare_queue');
-        proc = spyOn(actions.prototype, 'process').andReturn( Q(true) );
-        actions_push = spyOn(actions.prototype, 'push');
-        ca = spyOn(actions.prototype, 'createAction');
-    });
-    it('start', function() {
-        shell.rm('-rf', project);
-        shell.cp('-R', path.join(srcProject, '*'), project);
-
-        done = false;
-        promise = Q()
-         .then(
-            function(){ return install('android', project, plugins['DummyPlugin']) }
-        ).then(
-            function(){
-                results['actions_callCount'] = actions_push.callCount;
-                results['actions_create'] = ca.argsForCall[0];
-                results['config_add'] = config_queue_add.argsForCall[0];
-
-                return Q();
-            }
-        ).then(
-            function(){ return install('android', project, plugins['EnginePlugin']) }
-        ).then(
-            function(){
-                emit = spyOn(events, 'emit');
-                return install('android', project, plugins['ChildBrowser'])
-            }
-        ).then(
-            function(){
-                return install('android', project, plugins['VariablePlugin'], plugins_install_dir, { cli_variables:{API_KEY:'batman'} })
-            }
-        ).then(
-            function(){
-                done = true;
-                results['prepareCount'] = prepare.callCount;
-                results['emit_results'] = [];
-
-                for(var i in emit.calls) {
-                    if(emit.calls[i].args[0] === 'results')
-                        results['emit_results'].push(emit.calls[i].args[1]);
-                }
-
-                events.emit("verbose", "***** DONE START *****");
-            }
-        );
-        waitsFor(function() { return done; }, 'promise never resolved', 500);
-    });
-});
-
-describe('install', function() {
-    var chmod, exec, proc, add_to_queue, prepare, actions_push, c_a, mkdir, cp, rm, fetchSpy, emit;
-
-    beforeEach(function() {
-        prepare = spyOn(plugman, 'prepare').andReturn( Q(true) );
-
-        exec = spyOn(child_process, 'exec').andCallFake(function(cmd, cb) {
-            cb(false, '', '');
-        });
-        spyOn(fs, 'mkdirSync').andReturn(true);
-        spyOn(shell, 'mkdir').andReturn(true);
-        spyOn(platforms, 'copyFile').andReturn(true);
-
-        fetchSpy = spyOn(plugman.raw, 'fetch').andReturn( Q( plugins['EnginePlugin'] ) );
-        chmod = spyOn(fs, 'chmodSync').andReturn(true);
-        fsWrite = spyOn(fs, 'writeFileSync').andReturn(true);
-        cp = spyOn(shell, 'cp').andReturn(true);
-        rm = spyOn(shell, 'rm').andReturn(true);
-        add_to_queue = spyOn(config_changes, 'add_installed_plugin_to_prepare_queue');
-        done = false;
-    });
-
-    describe('success', function() {
-        it('should call prepare after a successful install', function() {
-           expect(results['prepareCount']).toBe(4);
-        });
-
-        it('should emit a results event with platform-agnostic <info>', function() {
-            // ChildBrowser
-            expect(results['emit_results'][0]).toBe('No matter what platform you are installing to, this notice is very important.');
-        });
-        it('should emit a results event with platform-specific <info>', function() {
-            // ChildBrowser
-            expect(results['emit_results'][1]).toBe('Please make sure you read this because it is very important to complete the installation of your plugin.');
-        });
-        it('should interpolate variables into <info> tags', function() {
-            // VariableBrowser
-            expect(results['emit_results'][2]).toBe('Remember that your api key is batman!');
-        });
-
-        it('should call fetch if provided plugin cannot be resolved locally', function() {
-            fetchSpy.andReturn( Q( plugins['DummyPlugin'] ) );
-            spyOn(fs, 'existsSync').andCallFake( fake['existsSync']['noPlugins'] );
-
-            runs(function() {
-                installPromise(install('android', project, 'CLEANYOURSHORTS' ));
-            });
-            waitsFor(function() { return done; }, 'install promise never resolved', 200);
-            runs(function() {
-                expect(done).toBe(true);
-                expect(fetchSpy).toHaveBeenCalled();
-            });
-        });
-
-        it('should call the config-changes module\'s add_installed_plugin_to_prepare_queue method after processing an install', function() {
-           expect(results['config_add']).toEqual([plugins_install_dir, dummy_id, 'android', {}, true]);
-        });
-        it('should queue up actions as appropriate for that plugin and call process on the action stack',
-           function() {
-                expect(results['actions_callCount']).toEqual(3);
-                expect(results['actions_create']).toEqual([jasmine.any(Function), [jasmine.any(Object), path.join(plugins_install_dir, dummy_id), project, dummy_id], jasmine.any(Function), [jasmine.any(Object), project, dummy_id]]);
-        });
-
-        it('should check version if plugin has engine tag', function(){
-            var satisfies = spyOn(semver, 'satisfies').andReturn(true);
-            exec.andCallFake(function(cmd, cb) {
-                cb(null, '2.5.0\n');
-            });
-
-            runs(function() {
-                installPromise( install('android', project, plugins['EnginePlugin']) );
-            });
-            waitsFor(function() { return done; }, 'install promise never resolved', 200);
-            runs(function() {
-                expect(satisfies).toHaveBeenCalledWith('2.5.0','>=2.3.0');
-            });
-        });
-        it('should check version and munge it a little if it has "rc" in it so it plays nice with semver (introduce a dash in it)', function() {
-            var satisfies = spyOn(semver, 'satisfies').andReturn(true);
-            exec.andCallFake(function(cmd, cb) {
-                cb(null, '3.0.0rc1\n');
-            });
-
-            runs(function() {
-                installPromise( install('android', project, plugins['EnginePlugin']) );
-            });
-            waitsFor(function() { return done; }, 'install promise never resolved', 200);
-            runs(function() {
-                expect(satisfies).toHaveBeenCalledWith('3.0.0-rc1','>=2.3.0');
-            });
-        });
-        it('should check specific platform version over cordova version if specified', function() {
-            var spy = spyOn(semver, 'satisfies').andReturn(true);
-            exec.andCallFake(function(cmd, cb) {
-                cb(null, '3.1.0\n');
-            });
-            fetchSpy.andReturn( Q( plugins['EnginePluginAndroid'] ) );
-
-            runs(function() {
-                installPromise( install('android', project, plugins['EnginePluginAndroid']) );
-            });
-            waitsFor(function() { return done; }, 'install promise never resolved', 200);
-            runs(function() {
-                expect(spy).toHaveBeenCalledWith('3.1.0','>=3.1.0');
-            });
-        });
-        it('should check platform sdk version if specified', function() {
-            var spy = spyOn(semver, 'satisfies').andReturn(true);
-            fetchSpy.andReturn( Q( plugins['EnginePluginAndroid'] ) );
-            exec.andCallFake(function(cmd, cb) {
-                cb(null, '18\n');
-            });
-
-            runs(function() {
-                installPromise( install('android', project, 'EnginePluginAndroid') );
-            });
-            waitsFor(function() { return done; }, 'install promise never resolved', 200);
-            runs(function() {
-                // <engine name="cordova" VERSION=">=3.0.0"/>
-                // <engine name="cordova-android" VERSION=">=3.1.0"/>
-                // <engine name="android-sdk" VERSION=">=18"/>
-
-                expect(spy.calls.length).toBe(3);
-                expect(spy.calls[0].args).toEqual([ '18.0.0', '>=3.0.0' ]);
-                expect(spy.calls[1].args).toEqual([ '18.0.0', '>=3.1.0' ]);
-                expect(spy.calls[2].args).toEqual([ '18.0.0','>=18' ]);
-            });
-        });
-        it('should check engine versions', function() {
-            var spy = spyOn(semver, 'satisfies').andReturn(true);
-            fetchSpy.andReturn( Q( plugins['EnginePlugin'] ) );
-
-            runs(function() {
-                installPromise( install('android', project, plugins['EnginePlugin']) );
-            });
-            waitsFor(function() { return done; }, 'install promise never resolved', 200);
-            runs(function() {
-                // <engine name="cordova" version=">=2.3.0"/>
-                // <engine name="cordova-plugman" version=">=0.10.0" />
-                // <engine name="mega-fun-plugin" version=">=1.0.0" scriptSrc="megaFunVersion" platform="*" />
-                // <engine name="mega-boring-plugin" version=">=3.0.0" scriptSrc="megaBoringVersion" platform="ios|android" />
-
-                var plugmanVersion = require('../package.json').version;
-
-                expect(spy.calls.length).toBe(4);
-                expect(spy.calls[0].args).toEqual([ '', '>=2.3.0' ]);
-                expect(spy.calls[1].args).toEqual([ plugmanVersion, '>=0.10.0' ]);
-                expect(spy.calls[2].args).toEqual([ '', '>=1.0.0' ]);
-                expect(spy.calls[3].args).toEqual([ '', '>=3.0.0' ]);
-            });
-        });
-        it('should not check custom engine version that is not supported for platform', function() {
-            var spy = spyOn(semver, 'satisfies').andReturn(true);
-            runs(function() {
-                installPromise( install('blackberry10', project, plugins['EnginePlugin']) );
-            });
-            waitsFor(function() { return done; }, 'install promise never resolved', 200);
-            runs(function() {
-                expect(spy).not.toHaveBeenCalledWith('','>=3.0.0');
-            });
-        });
-
-        describe('with dependencies', function() {
-            var emit;
-            beforeEach(function() {
-                spyOn(fs, 'existsSync').andCallFake( fake['existsSync']['noPlugins'] );
-                fetchSpy.andCallFake( fake['fetch']['dependencies'] );
-                emit = spyOn(events, 'emit');
-                exec.andCallFake(function(cmd, cb) {
-                    cb(null, '9.0.0\n');
-                });
-            });
-
-            it('should install any dependent plugins if missing', function() {
-                runs(function() {
-                    installPromise( install('android', project, plugins['A']) );
-                });
-                waitsFor(function() { return done; }, 'install promise never resolved', 200);
-                runs(function() {
-                    // Look for 'Installing plugin ...' in events
-                    var install = common.spy.getInstall(emit);
-
-                    expect(install).toEqual([
-                        'Install start for "C" on android.',
-                        'Install start for "D" on android.',
-                        'Install start for "A" on android.'
-                    ]);
-                });
-            });
-
-            it('should install any dependent plugins from registry when url is not defined', function() {
-                // Plugin A depends on C & D
-                runs(function() {
-                    installPromise( install('android', project, plugins['A']) );
-                });
-                waitsFor(function() { return done; }, 'promise never resolved', 200);
-                runs(function() {
-                    // TODO: this is same test as above? Need test other dependency with url=?
-                    var install = common.spy.getInstall(emit);
-
-                    expect(install).toEqual([
-                        'Install start for "C" on android.',
-                        'Install start for "D" on android.',
-                        'Install start for "A" on android.'
-                    ]);;
-                });
-            });
-
-            it('should process all dependent plugins with alternate routes to the same plugin', function() {
-                // Plugin F depends on A, C, D and E
-                runs(function () {
-                    installPromise(install('android', project, plugins['F']));
-                });
-                waitsFor(function () { return done; }, 'install promise never resolved', 200);
-                runs(function () {
-                    var install = common.spy.getInstall(emit);
-
-                    expect(install).toEqual([
-                        'Install start for "C" on android.',
-                        'Install start for "D" on android.',
-                        'Install start for "A" on android.',
-                        'Install start for "D" on android.',
-                        'Install start for "F" on android.'
-                    ]);
-                });
-            });
-
-            it('should throw if there is a cyclic dependency', function() {
-                runs(function () {
-                    installPromise( install('android', project, plugins['G']) );
-                });
-                waitsFor(function () { return done; }, 'install promise never resolved', 200);
-                runs(function () {
-                    var install = common.spy.getInstall(emit);
-
-                    expect(done.message).toEqual('Cyclic dependency from G to H');
-                });
-            });
-
-            it('install subdir relative to top level plugin if no fetch meta', function() {
-                runs(function () {
-                    installPromise(install('android', project, plugins['B']));
-                });
-                waitsFor(function () { return done; }, 'install promise never resolved', 200);
-                runs(function () {
-                    var install = common.spy.getInstall(emit);
-
-                    expect(install).toEqual([
-                        'Install start for "D" on android.',
-                        'Install start for "E" on android.',
-                        'Install start for "B" on android.'
-                    ]);
-                });
-            });
-
-            it('install uses meta data (if available) of top level plugin source', function() {
-                // Fake metadata so plugin 'B' appears from 'meta/B'
-                var meta = require('../src/util/metadata');
-                spyOn(meta, 'get_fetch_metadata').andCallFake(function(){
-                    return {
-                        source: {type: 'dir', url: path.join(plugins['B'], '..', 'meta')}
-                    };
-                });
-
-                runs(function () {
-                    installPromise(install('android', project, plugins['B']));
-                });
-                waitsFor(function () { return done; }, 'install promise never resolved', 200);
-                runs(function () {
-                    var install = common.spy.getInstall(emit);
-
-                    expect(install).toEqual([
-                        'Install start for "D" on android.',
-                        'Install start for "E" on android.',
-                        'Install start for "B" on android.'
-                    ]);
-
-                    var copy = common.spy.startsWith(emit, "Copying from");
-                    expect(copy.length).toBe(3);
-                    expect(copy[0].indexOf(path.normalize('meta/D')) > 0).toBe(true);
-                    expect(copy[1].indexOf(path.normalize('meta/subdir/E')) > 0).toBe(true);
-                });
-            });
-        });
-
-    });
-
-    xdescribe('failure', function() {
-        it('should throw if platform is unrecognized', function() {
-            runs(function() {
-                installPromise( install('atari', project, 'SomePlugin') );
-            });
-            waitsFor(function() { return done; }, 'install promise never resolved', 200);
-            runs(function() {
-                expect(''+done).toContain('atari not supported.');
-            });
-        });
-        it('should throw if variables are missing', function() {
-            runs(function() {
-                installPromise( install('android', project, plugins['VariablePlugin']) );
-            });
-            waitsFor(function(){ return done; }, 'install promise never resolved', 200);
-            runs(function() {
-                expect(''+done).toContain('Variable(s) missing: API_KEY');
-            });
-        });
-        it('should throw if git is not found on the path and a remote url is requested', function() {
-            spyOn(fs, 'existsSync').andCallFake( fake['existsSync']['noPlugins'] );
-            var which_spy = spyOn(shell, 'which').andReturn(null);
-            runs(function() {
-                installPromise( install('android', project, 'https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git') );
-            });
-            waitsFor(function(){ return done; }, 'install promise never resolved', 200);
-            runs(function() {
-                expect(''+done).toContain('"git" command line tool is not installed: make sure it is accessible on your PATH.');
-            });
-        });
-        it('should throw if plugin version is less than the minimum requirement', function(){
-            var spy = spyOn(semver, 'satisfies').andReturn(false);
-            exec.andCallFake(function(cmd, cb) {
-                cb(null, '0.0.1\n');
-            });
-            runs(function() {
-                installPromise( install('android', project, plugins['EnginePlugin']) );
-            });
-            waitsFor(function(){ return done; }, 'install promise never resolved', 200);
-            runs(function() {
-                expect(''+done).toContain('Plugin doesn\'t support this project\'s cordova version. cordova: 0.0.1, failed version requirement: >=2.3.0');
-            });
-        });
-    });
-
-});
-
-
-describe('end', function() {
-
-    it('end', function() {
-        done = false;
-
-        promise.fin(function(err){
-            if(err)
-                events.emit('error', err);
-
-            shell.rm('-rf', project);
-            done = true;
-        });
-
-        waitsFor(function() { return done; }, 'promise never resolved', 500);
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/owner.spec.js
----------------------------------------------------------------------
diff --git a/spec/owner.spec.js b/spec/owner.spec.js
deleted file mode 100644
index 1c6bd2c..0000000
--- a/spec/owner.spec.js
+++ /dev/null
@@ -1,12 +0,0 @@
-var owner = require('../src/owner'),
-    Q = require('q'),
-    registry = require('../src/registry/registry');
-
-describe('owner', function() {
-    it('should run owner', function() {
-        var sOwner = spyOn(registry, 'owner').andReturn(Q());
-        var params = ['add', 'anis', 'com.phonegap.plugins.dummyplugin'];
-        owner(params);
-        expect(sOwner).toHaveBeenCalledWith(params);
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/platform.spec.js
----------------------------------------------------------------------
diff --git a/spec/platform.spec.js b/spec/platform.spec.js
deleted file mode 100644
index 4f8099c..0000000
--- a/spec/platform.spec.js
+++ /dev/null
@@ -1,26 +0,0 @@
-var platforms = require('../src/platforms')
-var pluginTags = ["source-file", "header-file", "lib-file", "resource-file", "framework"];
-
-function getTest(platformId, pluginTag) {
-    return function() {
-        it('should exist', function() {
-            expect(platforms[platformId][pluginTag] ).toBeDefined();
-        });
-        it('with an install method', function() {
-            expect(platforms[platformId][pluginTag].install ).toBeDefined();
-        });
-        it('with an uninstall method', function() {
-            expect(platforms[platformId][pluginTag].uninstall ).toBeDefined();
-        });
-    }
-}
-
-for(var platformId in platforms) {
-    for(var index = 0, len = pluginTags.length; index < len; index++) {
-        var funk = getTest(platformId,pluginTags[index]);
-        describe(platformId + " should have a " + pluginTags[index] + " object", funk);
-    }
-
-}
-
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/platforms/amazon-fireos.spec.js
----------------------------------------------------------------------
diff --git a/spec/platforms/amazon-fireos.spec.js b/spec/platforms/amazon-fireos.spec.js
deleted file mode 100644
index 49a8b0d..0000000
--- a/spec/platforms/amazon-fireos.spec.js
+++ /dev/null
@@ -1,139 +0,0 @@
-var amazon_fireos = require('../../src/platforms/amazon-fireos'),
-    common  = require('../../src/platforms/common'),
-    install = require('../../src/install'),
-    path    = require('path'),
-    fs      = require('fs'),
-    shell   = require('shelljs'),
-    et      = require('elementtree'),
-    os      = require('osenv'),
-    temp    = path.join(os.tmpdir(), 'plugman'),
-    plugins_dir = path.join(temp, 'cordova', 'plugins'),
-    xml_helpers = require('../../src/util/xml-helpers'),
-    plugins_module = require('../../src/util/plugins'),
-    dummyplugin = path.join(__dirname, '..', 'plugins', 'DummyPlugin'),
-    faultyplugin = path.join(__dirname, '..', 'plugins', 'FaultyPlugin'),
-    variableplugin = path.join(__dirname, '..', 'plugins', 'VariablePlugin'),
-    amazon_fireos_one_project = path.join(__dirname, '..', 'projects', 'android_one', '*'),
-    amazon_fireos_two_project = path.join(__dirname, '..', 'projects', 'android_two', '*');
-
-var xml_path     = path.join(dummyplugin, 'plugin.xml')
-  , xml_text     = fs.readFileSync(xml_path, 'utf-8')
-  , plugin_et    = new et.ElementTree(et.XML(xml_text));
-
-var platformTag = plugin_et.find('./platform[@name="amazon-fireos"]');
-var dummy_id = plugin_et._root.attrib['id'];
-
-var valid_source = platformTag.findall('./source-file'),
-    valid_libs = platformTag.findall('./lib-file'),
-    assets = plugin_et.findall('./asset'),
-    configChanges = platformTag.findall('./config-file');
-
-xml_path  = path.join(faultyplugin, 'plugin.xml')
-xml_text  = fs.readFileSync(xml_path, 'utf-8')
-plugin_et = new et.ElementTree(et.XML(xml_text));
-
-platformTag = plugin_et.find('./platform[@name="amazon-fireos"]');
-var invalid_source = platformTag.findall('./source-file');
-var faulty_id = plugin_et._root.attrib['id'];
-xml_path  = path.join(variableplugin, 'plugin.xml')
-xml_text  = fs.readFileSync(xml_path, 'utf-8')
-plugin_et = new et.ElementTree(et.XML(xml_text));
-platformTag = plugin_et.find('./platform[@name="amazon-fireos"]');
-
-var variable_id = plugin_et._root.attrib['id'];
-var variable_configs = platformTag.findall('./config-file');
-
-function copyArray(arr) {
-    return Array.prototype.slice.call(arr, 0);
-}
-/*
-describe('amazon-fireos project handler', function() {
-    describe('www_dir method', function() {
-        it('should return cordova-amazon-fireos project www location using www_dir', function() {
-            expect(amazon_fireos.www_dir(path.sep)).toEqual(path.sep + path.join('assets', 'www'));
-        });
-    });
-    describe('package_name method', function() {
-        it('should return an amazon-fireos project\'s proper package name', function() {
-            expect(amazon_fireos.package_name(path.join(amazon_fireos_one_project, '..'))).toEqual('com.alunny.childapp');
-        });
-    });
-
-    describe('installation', function() {
-        beforeEach(function() {
-            shell.mkdir('-p', temp);
-        });
-        afterEach(function() {
-            shell.rm('-rf', temp);
-        });
-        describe('of <lib-file> elements', function() {
-            it("should copy jar files to project/libs", function () {
-                var s = spyOn(common, 'copyFile');
-
-                amazon_fireos['lib-file'].install(valid_libs[0], dummyplugin, temp);
-                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/amazon-fireos/TestLib.jar', temp, path.join('libs', 'TestLib.jar'));
-            });
-        });
-        describe('of <source-file> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', amazon_fireos_one_project, temp);
-            });
-
-            it('should copy stuff from one location to another by calling common.copyFile', function() {
-                var source = copyArray(valid_source);
-                var s = spyOn(common, 'copyFile');
-                amazon_fireos['source-file'].install(source[0], dummyplugin, temp);
-                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/amazon-fireos/DummyPlugin.java', temp, path.join('src', 'com', 'phonegap', 'plugins', 'dummyplugin', 'DummyPlugin.java'));
-            });
-            it('should throw if source file cannot be found', function() {
-                var source = copyArray(invalid_source);
-                expect(function() {
-                    amazon_fireos['source-file'].install(source[0], faultyplugin, temp);
-                }).toThrow('"' + path.resolve(faultyplugin, 'src/amazon-fireos/NotHere.java') + '" not found!');
-            });
-            it('should throw if target file already exists', function() {
-                // write out a file
-                var target = path.resolve(temp, 'src/com/phonegap/plugins/dummyplugin');
-                shell.mkdir('-p', target);
-                target = path.join(target, 'DummyPlugin.java');
-                fs.writeFileSync(target, 'some bs', 'utf-8');
-
-                var source = copyArray(valid_source);
-                expect(function() {
-                    amazon_fireos['source-file'].install(source[0], dummyplugin, temp);
-                }).toThrow('"' + target + '" already exists!');
-            });
-        });
-    });
-
-    describe('uninstallation', function() {
-        beforeEach(function() {
-            shell.mkdir('-p', temp);
-            shell.mkdir('-p', plugins_dir);
-            shell.cp('-rf', amazon_fireos_two_project, temp);
-        });
-        afterEach(function() {
-            shell.rm('-rf', temp);
-        });
-        describe('of <lib-file> elements', function(done) {
-            it('should remove jar files', function () {
-                var s = spyOn(common, 'removeFile');
-                amazon_fireos['lib-file'].install(valid_libs[0], dummyplugin, temp);
-                amazon_fireos['lib-file'].uninstall(valid_libs[0], temp, dummy_id);
-                expect(s).toHaveBeenCalledWith(temp, path.join('libs', 'TestLib.jar'));
-            });
-        });
-        describe('of <source-file> elements', function() {
-            it('should remove stuff by calling common.deleteJava', function(done) {
-                var s = spyOn(common, 'deleteJava');
-                install('amazon-fireos', temp, dummyplugin, plugins_dir, {})
-                .then(function() {
-                    var source = copyArray(valid_source);
-                    amazon_fireos['source-file'].uninstall(source[0], temp);
-                    expect(s).toHaveBeenCalledWith(temp, path.join('src', 'com', 'phonegap', 'plugins', 'dummyplugin', 'DummyPlugin.java'));
-                    done();
-                });
-            });
-        });
-    });
-}); */

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/platforms/android.spec.js
----------------------------------------------------------------------
diff --git a/spec/platforms/android.spec.js b/spec/platforms/android.spec.js
deleted file mode 100644
index 57f45fe..0000000
--- a/spec/platforms/android.spec.js
+++ /dev/null
@@ -1,156 +0,0 @@
-var android = require('../../src/platforms/android'),
-    common  = require('../../src/platforms/common'),
-    install = require('../../src/install'),
-    path    = require('path'),
-    fs      = require('fs'),
-    shell   = require('shelljs'),
-    et      = require('elementtree'),
-    os      = require('osenv'),
-    temp    = path.join(os.tmpdir(), 'plugman'),
-    plugins_dir = path.join(temp, 'cordova', 'plugins'),
-    xml_helpers = require('../../src/util/xml-helpers'),
-    plugins_module = require('../../src/util/plugins'),
-    dummyplugin = path.join(__dirname, '..', 'plugins', 'DummyPlugin'),
-    faultyplugin = path.join(__dirname, '..', 'plugins', 'FaultyPlugin'),
-    variableplugin = path.join(__dirname, '..', 'plugins', 'VariablePlugin'),
-    android_one_project = path.join(__dirname, '..', 'projects', 'android_one', '*'),
-    android_two_project = path.join(__dirname, '..', 'projects', 'android_two', '*');
-
-var xml_path     = path.join(dummyplugin, 'plugin.xml')
-  , xml_text     = fs.readFileSync(xml_path, 'utf-8')
-  , plugin_et    = new et.ElementTree(et.XML(xml_text));
-
-var platformTag = plugin_et.find('./platform[@name="android"]');
-var dummy_id = plugin_et._root.attrib['id'];
-var valid_source = platformTag.findall('./source-file'),
-    valid_libs = platformTag.findall('./lib-file'),
-    valid_resources = platformTag.findall('./resource-file'),
-    assets = plugin_et.findall('./asset'),
-    configChanges = platformTag.findall('./config-file');
-
-xml_path  = path.join(faultyplugin, 'plugin.xml')
-xml_text  = fs.readFileSync(xml_path, 'utf-8')
-plugin_et = new et.ElementTree(et.XML(xml_text));
-
-platformTag = plugin_et.find('./platform[@name="android"]');
-var invalid_source = platformTag.findall('./source-file');
-var faulty_id = plugin_et._root.attrib['id'];
-
-xml_path  = path.join(variableplugin, 'plugin.xml')
-xml_text  = fs.readFileSync(xml_path, 'utf-8')
-plugin_et = new et.ElementTree(et.XML(xml_text));
-platformTag = plugin_et.find('./platform[@name="android"]');
-
-var variable_id = plugin_et._root.attrib['id'];
-var variable_configs = platformTag.findall('./config-file');
-
-function copyArray(arr) {
-    return Array.prototype.slice.call(arr, 0);
-}
-
-describe('android project handler', function() {
-    describe('www_dir method', function() {
-        it('should return cordova-android project www location using www_dir', function() {
-            expect(android.www_dir(path.sep)).toEqual(path.sep + path.join('assets', 'www'));
-        });
-    });
-    describe('package_name method', function() {
-        it('should return an android project\'s proper package name', function() {
-            expect(android.package_name(path.join(android_one_project, '..'))).toEqual('com.alunny.childapp');
-        });
-    });
-
-    describe('installation', function() {
-        beforeEach(function() {
-            shell.mkdir('-p', temp);
-        });
-        afterEach(function() {
-            shell.rm('-rf', temp);
-        });
-        describe('of <lib-file> elements', function() {
-            it("should copy jar files to project/libs", function () {
-                var s = spyOn(common, 'copyFile');
-
-                android['lib-file'].install(valid_libs[0], dummyplugin, temp);
-                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/android/TestLib.jar', temp, path.join('libs', 'TestLib.jar'));
-            });
-        });
-        describe('of <resource-file> elements', function() {
-            it("should copy files", function () {
-                var s = spyOn(common, 'copyFile');
-
-                android['resource-file'].install(valid_resources[0], dummyplugin, temp);
-                expect(s).toHaveBeenCalledWith(dummyplugin, 'android-resource.xml', temp, path.join('res', 'xml', 'dummy.xml'));
-            });
-        });
-        describe('of <source-file> elements', function() {
-            beforeEach(function() {
-                shell.cp('-rf', android_one_project, temp);
-            });
-
-            it('should copy stuff from one location to another by calling common.copyFile', function() {
-                var source = copyArray(valid_source);
-                var s = spyOn(common, 'copyFile');
-                android['source-file'].install(source[0], dummyplugin, temp);
-                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/android/DummyPlugin.java', temp, path.join('src', 'com', 'phonegap', 'plugins', 'dummyplugin', 'DummyPlugin.java'));
-            });
-            it('should throw if source file cannot be found', function() {
-                var source = copyArray(invalid_source);
-                expect(function() {
-                    android['source-file'].install(source[0], faultyplugin, temp);
-                }).toThrow('"' + path.resolve(faultyplugin, 'src/android/NotHere.java') + '" not found!');
-            });
-            it('should throw if target file already exists', function() {
-                // write out a file
-                var target = path.resolve(temp, 'src/com/phonegap/plugins/dummyplugin');
-                shell.mkdir('-p', target);
-                target = path.join(target, 'DummyPlugin.java');
-                fs.writeFileSync(target, 'some bs', 'utf-8');
-
-                var source = copyArray(valid_source);
-                expect(function() {
-                    android['source-file'].install(source[0], dummyplugin, temp);
-                }).toThrow('"' + target + '" already exists!');
-            });
-        });
-    });
-
-    describe('uninstallation', function() {
-        beforeEach(function() {
-            shell.mkdir('-p', temp);
-            shell.mkdir('-p', plugins_dir);
-            shell.cp('-rf', android_two_project, temp);
-        });
-        afterEach(function() {
-            shell.rm('-rf', temp);
-        });
-        describe('of <lib-file> elements', function(done) {
-            it('should remove jar files', function () {
-                var s = spyOn(common, 'removeFile');
-                android['lib-file'].install(valid_libs[0], dummyplugin, temp);
-                android['lib-file'].uninstall(valid_libs[0], temp, dummy_id);
-                expect(s).toHaveBeenCalledWith(temp, path.join('libs', 'TestLib.jar'));
-            });
-        });
-        describe('of <resource-file> elements', function(done) {
-            it('should remove files', function () {
-                var s = spyOn(common, 'removeFile');
-                android['resource-file'].install(valid_resources[0], dummyplugin, temp);
-                android['resource-file'].uninstall(valid_resources[0], temp, dummy_id);
-                expect(s).toHaveBeenCalledWith(temp, path.join('res', 'xml', 'dummy.xml'));
-            });
-        });
-        describe('of <source-file> elements', function() {
-            it('should remove stuff by calling common.deleteJava', function(done) {
-                var s = spyOn(common, 'deleteJava');
-                install('android', temp, dummyplugin, plugins_dir, {})
-                .then(function() {
-                    var source = copyArray(valid_source);
-                    android['source-file'].uninstall(source[0], temp);
-                    expect(s).toHaveBeenCalledWith(temp, path.join('src', 'com', 'phonegap', 'plugins', 'dummyplugin', 'DummyPlugin.java'));
-                    done();
-                });
-            });
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/platforms/blackberry10.spec.js
----------------------------------------------------------------------
diff --git a/spec/platforms/blackberry10.spec.js b/spec/platforms/blackberry10.spec.js
deleted file mode 100644
index bfdf926..0000000
--- a/spec/platforms/blackberry10.spec.js
+++ /dev/null
@@ -1,148 +0,0 @@
-var blackberry10 = require('../../src/platforms/blackberry10'),
-    common = require('../../src/platforms/common'),
-    install = require('../../src/install'),
-    path = require('path'),
-    fs = require('fs'),
-    shell = require('shelljs'),
-    et = require('elementtree'),
-    os = require('osenv'),
-    temp = path.join(os.tmpdir(), 'plugman'),
-    plugins_dir = path.join(temp, 'cordova', 'plugins'),
-    xml_helpers = require('../../src/util/xml-helpers'),
-    plugins_module = require('../../src/util/plugins'),
-    blackberry10_project = path.join(__dirname, '..', 'projects', 'blackberry10', '*'),
-    plugins = {
-        dummy: parsePlugin(path.join(__dirname, '..', 'plugins', 'DummyPlugin')),
-        faulty: parsePlugin(path.join(__dirname, '..', 'plugins', 'FaultyPlugin')),
-        echo: parsePlugin(path.join(__dirname, '..', 'plugins', 'cordova.echo'))
-    };
-
-function copyArray(arr) {
-    return Array.prototype.slice.call(arr, 0);
-}
-
-function parsePlugin (pluginPath) {
-    var pluginXML = fs.readFileSync(path.join(pluginPath, "plugin.xml"), "utf-8"),
-        pluginEt = new et.ElementTree(et.XML(pluginXML)),
-        platformTag = pluginEt.find('./platform[@name="blackberry10"]');
-
-    return {
-        path: pluginPath,
-        id: pluginEt._root.attrib.id,
-        assets: pluginEt.findall('./asset'),
-        srcFiles: platformTag.findall('./source-file'),
-        configChanges: platformTag.findall('./config-file'),
-        libFiles: platformTag.findall('./lib-file')
-    };
-}
-
-
-describe('blackberry10 project handler', function() {
-    describe('www_dir method', function() {
-        it('should return cordova-blackberry10 project www location using www_dir', function() {
-            expect(blackberry10.www_dir(path.sep)).toEqual(path.sep + 'www');
-        });
-    });
-
-    describe('package_name method', function() {
-        it('should return a blackberry10 project\'s proper package name', function() {
-            expect(blackberry10.package_name(path.join(blackberry10_project, '..'))).toEqual('cordovaExample');
-        });
-    });
-
-    describe('installation', function() {
-        beforeEach(function() {
-            shell.mkdir('-p', temp);
-            shell.cp('-rf', blackberry10_project, temp);
-        });
-        afterEach(function() {
-            shell.rm('-rf', temp);
-        });
-        describe('of <lib-file> elements', function() {
-            it("should copy so files to native/target/plugins", function () {
-                var plugin = plugins.echo,
-                    libs = copyArray(plugin.libFiles),
-                    s = spyOn(common, 'copyFile');
-
-                blackberry10['lib-file'].install(libs[0], plugin.path, temp);
-                expect(s).toHaveBeenCalledWith(plugin.path, 'src/blackberry10/native/device/echoJnext.so', temp, path.join('native', 'device', 'plugins', 'jnext', 'echoJnext.so'));
-            });
-        });
-        describe('of <source-file> elements', function() {
-            it('should copy stuff from one location to another by calling common.copyFile', function() {
-                var plugin = plugins.echo,
-                    source = copyArray(plugin.srcFiles);
-                    s = spyOn(common, 'copyFile');
-
-                blackberry10['source-file'].install(source[0], plugin.path, temp, plugin.id);
-                expect(s).toHaveBeenCalledWith(plugin.path, 'src/blackberry10/index.js', temp, path.join('native', 'device', 'chrome', 'plugin', 'cordova.echo', 'index.js'));
-                expect(s).toHaveBeenCalledWith(plugin.path, 'src/blackberry10/index.js', temp, path.join('native', 'simulator', 'chrome', 'plugin', 'cordova.echo', 'index.js'));
-            });
-            it('defaults to plugin id when dest is not present', function() {
-                var source = copyArray(plugins.dummy.srcFiles);
-                var s = spyOn(common, 'copyFile');
-                blackberry10['source-file'].install(source[0], plugins.dummy.path, temp, plugins.dummy.id);
-                expect(s).toHaveBeenCalledWith(plugins.dummy.path, 'src/blackberry10/index.js', temp, path.join('native', 'device', 'chrome', 'plugin', plugins.dummy.id, 'index.js'));
-                expect(s).toHaveBeenCalledWith(plugins.dummy.path, 'src/blackberry10/index.js', temp, path.join('native', 'simulator', 'chrome', 'plugin', plugins.dummy.id, 'index.js'));
-            });
-            it('should throw if source file cannot be found', function() {
-                var source = copyArray(plugins.faulty.srcFiles);
-                expect(function() {
-                    blackberry10['source-file'].install(source[0], plugins.faulty.path, temp, plugins.faulty.id);
-                }).toThrow('"' + path.resolve(plugins.faulty.path, 'src/blackberry10/index.js') + '" not found!');
-            });
-            it('should throw if target file already exists', function() {
-                // write out a file
-                var target = path.resolve(temp, 'native/device/chrome/plugin/com.phonegap.plugins.dummyplugin');
-                shell.mkdir('-p', target);
-                target = path.join(target, 'index.js');
-                fs.writeFileSync(target, 'some bs', 'utf-8');
-
-                var source = copyArray(plugins.dummy.srcFiles);
-                expect(function() {
-                    blackberry10['source-file'].install(source[0], plugins.dummy.path, temp, plugins.dummy.id);
-                }).toThrow('"' + target + '" already exists!');
-            });
-        });
-    });
-
-    describe('uninstallation', function() {
-        beforeEach(function() {
-            shell.mkdir('-p', temp);
-            shell.cp('-rf', blackberry10_project, temp);
-        });
-        afterEach(function() {
-            shell.rm('-rf', temp);
-        });
-        describe('of <source-file> elements', function() {
-            it('should remove stuff by calling common.removeFile', function() {
-                var s = spyOn(common, 'removeFile'),
-                    plugin = plugins.echo;
-                var source = copyArray(plugin.srcFiles);
-                blackberry10['source-file'].install(source[0], plugin.path, temp, plugin.id);
-                blackberry10['source-file'].uninstall(source[0], temp, plugin.id);
-                expect(s).toHaveBeenCalledWith(temp, path.join('native', 'device', 'chrome', 'plugin', 'cordova.echo', 'index.js'));
-                expect(s).toHaveBeenCalledWith(temp, path.join('native', 'simulator', 'chrome', 'plugin', 'cordova.echo', 'index.js'));
-            });
-            it('should remove stuff by calling common.removeFile', function() {
-                var s = spyOn(common, 'removeFile'),
-                    plugin = plugins.dummy;
-                var source = copyArray(plugin.srcFiles);
-                blackberry10['source-file'].install(source[0], plugin.path, temp, plugin.id);
-                blackberry10['source-file'].uninstall(source[0], temp, plugin.id);
-                expect(s).toHaveBeenCalledWith(temp, path.join('native', 'device', 'chrome', 'plugin', plugin.id, 'index.js'));
-                expect(s).toHaveBeenCalledWith(temp, path.join('native', 'simulator', 'chrome', 'plugin', plugin.id, 'index.js'));
-            });
-        });
-        describe('of <lib-file> elements', function(done) {
-            it("should remove so files from www/plugins", function () {
-                var s = spyOn(common, 'removeFile'),
-                    plugin = plugins.echo;
-                var source = copyArray(plugin.libFiles);
-                blackberry10['lib-file'].install(source[0], plugin.path, temp, plugin.id);
-                blackberry10['lib-file'].uninstall(source[0], temp, plugin.id);
-                expect(s).toHaveBeenCalledWith(temp, path.join('native','device','plugins','jnext','echoJnext.so'));
-            });
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/platforms/common.spec.js
----------------------------------------------------------------------
diff --git a/spec/platforms/common.spec.js b/spec/platforms/common.spec.js
deleted file mode 100644
index dcf5f2a..0000000
--- a/spec/platforms/common.spec.js
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- *
- *
- * Licensed 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 common = require('../../src/platforms/common')
-  , path = require('path')
-  , fs = require('fs')
-  , osenv = require('osenv')
-  , shell = require('shelljs')
-  , test_dir = path.join(osenv.tmpdir(), 'test_plugman')
-  , project_dir = path.join(test_dir, 'project')
-  , src = path.join(project_dir, 'src')
-  , dest = path.join(project_dir, 'dest')
-  , java_dir = path.join(src, 'one', 'two', 'three')
-  , java_file = path.join(java_dir, 'test.java');
-
-describe('common platform handler', function() {
-    describe('resolveSrcPath', function() {
-        it('should not throw if path exists', function(){
-            shell.mkdir('-p', test_dir);
-            var target = path.join(test_dir, 'somefile');
-            fs.writeFileSync(target, '80085', 'utf-8');
-            expect(function(){common.resolveSrcPath(test_dir, 'somefile')}).not.toThrow();
-            shell.rm('-rf', test_dir);
-        });
-    });
-
-    describe('resolveTargetPath', function() {
-        it('should throw if path exists', function(){
-            shell.mkdir('-p', test_dir);
-            expect(function(){common.resolveTargetPath(test_dir)}).toThrow();
-            shell.rm('-rf', test_dir);
-        });
-
-        it('should not throw if path cannot be resolved', function(){
-            expect(function(){common.resolveTargetPath(test_dir, 'somefile')}).not.toThrow();
-        });
-    });
-
-    describe('copyFile', function() {
-        it('should throw if source path cannot be resolved', function(){
-            expect(function(){common.copyFile(test_dir, src, project_dir, dest)}).toThrow();
-        });
-
-        it('should throw if target path exists', function(){
-            shell.mkdir('-p', dest);
-            expect(function(){common.copyFile(test_dir, src, project_dir, dest)}).toThrow();
-            shell.rm('-rf', dest);
-        });
-
-        it('should call mkdir -p on target path', function(){
-            shell.mkdir('-p', java_dir);
-            fs.writeFileSync(java_file, 'contents', 'utf-8');
-
-            var s = spyOn(shell, 'mkdir').andCallThrough();
-            var resolvedDest = common.resolveTargetPath(project_dir, dest);
-
-            common.copyFile(test_dir, java_file, project_dir, dest);
-
-            expect(s).toHaveBeenCalled();
-            expect(s).toHaveBeenCalledWith('-p', path.dirname(resolvedDest));
-            shell.rm('-rf', project_dir);
-        });
-
-        it('should call cp source/dest paths', function(){
-            shell.mkdir('-p', java_dir);
-            fs.writeFileSync(java_file, 'contents', 'utf-8');
-
-            var s = spyOn(shell, 'cp').andCallThrough();
-            var resolvedDest = common.resolveTargetPath(project_dir, dest);
-
-            common.copyFile(test_dir, java_file, project_dir, dest);
-
-            expect(s).toHaveBeenCalled();
-            expect(s).toHaveBeenCalledWith('-f', java_file, resolvedDest);
-
-            shell.rm('-rf', project_dir);
-        });
-
-    });
-
-    describe('deleteJava', function() {
-        it('should call fs.unlinkSync on the provided paths', function(){
-            shell.mkdir('-p', java_dir);
-            fs.writeFileSync(java_file, 'contents', 'utf-8');
-
-            var s = spyOn(fs, 'unlinkSync').andCallThrough();
-            common.deleteJava(project_dir, java_file);
-            expect(s).toHaveBeenCalled();
-            expect(s).toHaveBeenCalledWith(path.resolve(project_dir, java_file));
-
-            shell.rm('-rf', java_dir);
-        });
-
-        it('should delete empty directories after removing source code in a java src path hierarchy', function(){
-            shell.mkdir('-p', java_dir);
-            fs.writeFileSync(java_file, 'contents', 'utf-8');
-
-            common.deleteJava(project_dir, java_file);
-            expect(fs.existsSync(java_file)).not.toBe(true);
-            expect(fs.existsSync(java_dir)).not.toBe(true);
-            expect(fs.existsSync(path.join(src,'one'))).not.toBe(true);
-
-            shell.rm('-rf', java_dir);
-        });
-
-        it('should never delete the top-level src directory, even if all plugins added were removed', function(){
-            shell.mkdir('-p', java_dir);
-            fs.writeFileSync(java_file, 'contents', 'utf-8');
-
-            common.deleteJava(project_dir, java_file);
-            expect(fs.existsSync(src)).toBe(true);
-
-            shell.rm('-rf', java_dir);
-        });
-    });
-});


[51/70] Remove all cordova-lib files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/eefdf68e/cordova-lib/spec-plugman/projects/windows8/www/cordova-2.6.0.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/windows8/www/cordova-2.6.0.js b/cordova-lib/spec-plugman/projects/windows8/www/cordova-2.6.0.js
deleted file mode 100644
index 2fedaa6..0000000
--- a/cordova-lib/spec-plugman/projects/windows8/www/cordova-2.6.0.js
+++ /dev/null
@@ -1,8075 +0,0 @@
-// Platform: windows8
-
-// commit 125dca530923a44a8f44f68f5e1970cbdd4e7faf
-
-// File generated at :: Wed Apr 03 2013 13:20:16 GMT-0700 (Pacific Daylight Time)
-
-/*
- 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.
-*/
-
-;(function() {
-
-// file: lib\scripts\require.js
-
-var require,
-    define;
-
-(function () {
-    var modules = {};
-    // Stack of moduleIds currently being built.
-    var requireStack = [];
-    // Map of module ID -> index into requireStack of modules currently being built.
-    var inProgressModules = {};
-
-    function build(module) {
-        var factory = module.factory;
-        module.exports = {};
-        delete module.factory;
-        factory(require, module.exports, module);
-        return module.exports;
-    }
-
-    require = function (id) {
-        if (!modules[id]) {
-            throw "module " + id + " not found";
-        } else if (id in inProgressModules) {
-            var cycle = requireStack.slice(inProgressModules[id]).join('->') + '->' + id;
-            throw "Cycle in require graph: " + cycle;
-        }
-        if (modules[id].factory) {
-            try {
-                inProgressModules[id] = requireStack.length;
-                requireStack.push(id);
-                return build(modules[id]);
-            } finally {
-                delete inProgressModules[id];
-                requireStack.pop();
-            }
-        }
-        return modules[id].exports;
-    };
-
-    define = function (id, factory) {
-        if (modules[id]) {
-            throw "module " + id + " already defined";
-        }
-
-        modules[id] = {
-            id: id,
-            factory: factory
-        };
-    };
-
-    define.remove = function (id) {
-        delete modules[id];
-    };
-
-    define.moduleMap = modules;
-})();
-
-//Export for use in node
-if (typeof module === "object" && typeof require === "function") {
-    module.exports.require = require;
-    module.exports.define = define;
-}
-
-// file: lib/cordova.js
-define("cordova", function(require, exports, module) {
-
-
-var channel = require('cordova/channel');
-
-/**
- * Listen for DOMContentLoaded and notify our channel subscribers.
- */
-document.addEventListener('DOMContentLoaded', function() {
-    channel.onDOMContentLoaded.fire();
-}, false);
-if (document.readyState == 'complete' || document.readyState == 'interactive') {
-    channel.onDOMContentLoaded.fire();
-}
-
-/**
- * Intercept calls to addEventListener + removeEventListener and handle deviceready,
- * resume, and pause events.
- */
-var m_document_addEventListener = document.addEventListener;
-var m_document_removeEventListener = document.removeEventListener;
-var m_window_addEventListener = window.addEventListener;
-var m_window_removeEventListener = window.removeEventListener;
-
-/**
- * Houses custom event handlers to intercept on document + window event listeners.
- */
-var documentEventHandlers = {},
-    windowEventHandlers = {};
-
-document.addEventListener = function(evt, handler, capture) {
-    var e = evt.toLowerCase();
-    if (typeof documentEventHandlers[e] != 'undefined') {
-        documentEventHandlers[e].subscribe(handler);
-    } else {
-        m_document_addEventListener.call(document, evt, handler, capture);
-    }
-};
-
-window.addEventListener = function(evt, handler, capture) {
-    var e = evt.toLowerCase();
-    if (typeof windowEventHandlers[e] != 'undefined') {
-        windowEventHandlers[e].subscribe(handler);
-    } else {
-        m_window_addEventListener.call(window, evt, handler, capture);
-    }
-};
-
-document.removeEventListener = function(evt, handler, capture) {
-    var e = evt.toLowerCase();
-    // If unsubscribing from an event that is handled by a plugin
-    if (typeof documentEventHandlers[e] != "undefined") {
-        documentEventHandlers[e].unsubscribe(handler);
-    } else {
-        m_document_removeEventListener.call(document, evt, handler, capture);
-    }
-};
-
-window.removeEventListener = function(evt, handler, capture) {
-    var e = evt.toLowerCase();
-    // If unsubscribing from an event that is handled by a plugin
-    if (typeof windowEventHandlers[e] != "undefined") {
-        windowEventHandlers[e].unsubscribe(handler);
-    } else {
-        m_window_removeEventListener.call(window, evt, handler, capture);
-    }
-};
-
-function createEvent(type, data) {
-    var event = document.createEvent('Events');
-    event.initEvent(type, false, false);
-    if (data) {
-        for (var i in data) {
-            if (data.hasOwnProperty(i)) {
-                event[i] = data[i];
-            }
-        }
-    }
-    return event;
-}
-
-if(typeof window.console === "undefined") {
-    window.console = {
-        log:function(){}
-    };
-}
-
-var cordova = {
-    define:define,
-    require:require,
-    /**
-     * Methods to add/remove your own addEventListener hijacking on document + window.
-     */
-    addWindowEventHandler:function(event) {
-        return (windowEventHandlers[event] = channel.create(event));
-    },
-    addStickyDocumentEventHandler:function(event) {
-        return (documentEventHandlers[event] = channel.createSticky(event));
-    },
-    addDocumentEventHandler:function(event) {
-        return (documentEventHandlers[event] = channel.create(event));
-    },
-    removeWindowEventHandler:function(event) {
-        delete windowEventHandlers[event];
-    },
-    removeDocumentEventHandler:function(event) {
-        delete documentEventHandlers[event];
-    },
-    /**
-     * Retrieve original event handlers that were replaced by Cordova
-     *
-     * @return object
-     */
-    getOriginalHandlers: function() {
-        return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener},
-        'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}};
-    },
-    /**
-     * Method to fire event from native code
-     * bNoDetach is required for events which cause an exception which needs to be caught in native code
-     */
-    fireDocumentEvent: function(type, data, bNoDetach) {
-        var evt = createEvent(type, data);
-        if (typeof documentEventHandlers[type] != 'undefined') {
-            if( bNoDetach ) {
-              documentEventHandlers[type].fire(evt);
-            }
-            else {
-              setTimeout(function() {
-                  documentEventHandlers[type].fire(evt);
-              }, 0);
-            }
-        } else {
-            document.dispatchEvent(evt);
-        }
-    },
-    fireWindowEvent: function(type, data) {
-        var evt = createEvent(type,data);
-        if (typeof windowEventHandlers[type] != 'undefined') {
-            setTimeout(function() {
-                windowEventHandlers[type].fire(evt);
-            }, 0);
-        } else {
-            window.dispatchEvent(evt);
-        }
-    },
-
-    /**
-     * Plugin callback mechanism.
-     */
-    // Randomize the starting callbackId to avoid collisions after refreshing or navigating.
-    // This way, it's very unlikely that any new callback would get the same callbackId as an old callback.
-    callbackId: Math.floor(Math.random() * 2000000000),
-    callbacks:  {},
-    callbackStatus: {
-        NO_RESULT: 0,
-        OK: 1,
-        CLASS_NOT_FOUND_EXCEPTION: 2,
-        ILLEGAL_ACCESS_EXCEPTION: 3,
-        INSTANTIATION_EXCEPTION: 4,
-        MALFORMED_URL_EXCEPTION: 5,
-        IO_EXCEPTION: 6,
-        INVALID_ACTION: 7,
-        JSON_EXCEPTION: 8,
-        ERROR: 9
-    },
-
-    /**
-     * Called by native code when returning successful result from an action.
-     */
-    callbackSuccess: function(callbackId, args) {
-        try {
-            cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback);
-        } catch (e) {
-            console.log("Error in error callback: " + callbackId + " = "+e);
-        }
-    },
-
-    /**
-     * Called by native code when returning error result from an action.
-     */
-    callbackError: function(callbackId, args) {
-        // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative.
-        // Derive success from status.
-        try {
-            cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback);
-        } catch (e) {
-            console.log("Error in error callback: " + callbackId + " = "+e);
-        }
-    },
-
-    /**
-     * Called by native code when returning the result from an action.
-     */
-    callbackFromNative: function(callbackId, success, status, args, keepCallback) {
-        var callback = cordova.callbacks[callbackId];
-        if (callback) {
-            if (success && status == cordova.callbackStatus.OK) {
-                callback.success && callback.success.apply(null, args);
-            } else if (!success) {
-                callback.fail && callback.fail.apply(null, args);
-            }
-
-            // Clear callback if not expecting any more results
-            if (!keepCallback) {
-                delete cordova.callbacks[callbackId];
-            }
-        }
-    },
-    addConstructor: function(func) {
-        channel.onCordovaReady.subscribe(function() {
-            try {
-                func();
-            } catch(e) {
-                console.log("Failed to run constructor: " + e);
-            }
-        });
-    }
-};
-
-// Register pause, resume and deviceready channels as events on document.
-channel.onPause = cordova.addDocumentEventHandler('pause');
-channel.onResume = cordova.addDocumentEventHandler('resume');
-channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');
-
-module.exports = cordova;
-
-});
-
-// file: lib\common\argscheck.js
-define("cordova/argscheck", function(require, exports, module) {
-
-var exec = require('cordova/exec');
-var utils = require('cordova/utils');
-
-var moduleExports = module.exports;
-
-var typeMap = {
-    'A': 'Array',
-    'D': 'Date',
-    'N': 'Number',
-    'S': 'String',
-    'F': 'Function',
-    'O': 'Object'
-};
-
-function extractParamName(callee, argIndex) {
-  return (/.*?\((.*?)\)/).exec(callee)[1].split(', ')[argIndex];
-}
-
-function checkArgs(spec, functionName, args, opt_callee) {
-    if (!moduleExports.enableChecks) {
-        return;
-    }
-    var errMsg = null;
-    var typeName;
-    for (var i = 0; i < spec.length; ++i) {
-        var c = spec.charAt(i),
-            cUpper = c.toUpperCase(),
-            arg = args[i];
-        // Asterix means allow anything.
-        if (c == '*') {
-            continue;
-        }
-        typeName = utils.typeName(arg);
-        if ((arg === null || arg === undefined) && c == cUpper) {
-            continue;
-        }
-        if (typeName != typeMap[cUpper]) {
-            errMsg = 'Expected ' + typeMap[cUpper];
-            break;
-        }
-    }
-    if (errMsg) {
-        errMsg += ', but got ' + typeName + '.';
-        errMsg = 'Wrong type for parameter "' + extractParamName(opt_callee || args.callee, i) + '" of ' + functionName + ': ' + errMsg;
-        // Don't log when running jake test.
-        if (typeof jasmine == 'undefined') {
-            console.error(errMsg);
-        }
-        throw TypeError(errMsg);
-    }
-}
-
-function getValue(value, defaultValue) {
-    return value === undefined ? defaultValue : value;
-}
-
-moduleExports.checkArgs = checkArgs;
-moduleExports.getValue = getValue;
-moduleExports.enableChecks = true;
-
-
-});
-
-// file: lib\common\builder.js
-define("cordova/builder", function(require, exports, module) {
-
-var utils = require('cordova/utils');
-
-function each(objects, func, context) {
-    for (var prop in objects) {
-        if (objects.hasOwnProperty(prop)) {
-            func.apply(context, [objects[prop], prop]);
-        }
-    }
-}
-
-function clobber(obj, key, value) {
-    exports.replaceHookForTesting(obj, key);
-    obj[key] = value;
-    // Getters can only be overridden by getters.
-    if (obj[key] !== value) {
-        utils.defineGetter(obj, key, function() {
-            return value;
-        });
-    }
-}
-
-function assignOrWrapInDeprecateGetter(obj, key, value, message) {
-    if (message) {
-        utils.defineGetter(obj, key, function() {
-            console.log(message);
-            delete obj[key];
-            clobber(obj, key, value);
-            return value;
-        });
-    } else {
-        clobber(obj, key, value);
-    }
-}
-
-function include(parent, objects, clobber, merge) {
-    each(objects, function (obj, key) {
-        try {
-          var result = obj.path ? require(obj.path) : {};
-
-          if (clobber) {
-              // Clobber if it doesn't exist.
-              if (typeof parent[key] === 'undefined') {
-                  assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
-              } else if (typeof obj.path !== 'undefined') {
-                  // If merging, merge properties onto parent, otherwise, clobber.
-                  if (merge) {
-                      recursiveMerge(parent[key], result);
-                  } else {
-                      assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
-                  }
-              }
-              result = parent[key];
-          } else {
-            // Overwrite if not currently defined.
-            if (typeof parent[key] == 'undefined') {
-              assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
-            } else {
-              // Set result to what already exists, so we can build children into it if they exist.
-              result = parent[key];
-            }
-          }
-
-          if (obj.children) {
-            include(result, obj.children, clobber, merge);
-          }
-        } catch(e) {
-          utils.alert('Exception building cordova JS globals: ' + e + ' for key "' + key + '"');
-        }
-    });
-}
-
-/**
- * Merge properties from one object onto another recursively.  Properties from
- * the src object will overwrite existing target property.
- *
- * @param target Object to merge properties into.
- * @param src Object to merge properties from.
- */
-function recursiveMerge(target, src) {
-    for (var prop in src) {
-        if (src.hasOwnProperty(prop)) {
-            if (target.prototype && target.prototype.constructor === target) {
-                // If the target object is a constructor override off prototype.
-                clobber(target.prototype, prop, src[prop]);
-            } else {
-                if (typeof src[prop] === 'object' && typeof target[prop] === 'object') {
-                    recursiveMerge(target[prop], src[prop]);
-                } else {
-                    clobber(target, prop, src[prop]);
-                }
-            }
-        }
-    }
-}
-
-exports.buildIntoButDoNotClobber = function(objects, target) {
-    include(target, objects, false, false);
-};
-exports.buildIntoAndClobber = function(objects, target) {
-    include(target, objects, true, false);
-};
-exports.buildIntoAndMerge = function(objects, target) {
-    include(target, objects, true, true);
-};
-exports.recursiveMerge = recursiveMerge;
-exports.assignOrWrapInDeprecateGetter = assignOrWrapInDeprecateGetter;
-exports.replaceHookForTesting = function() {};
-
-});
-
-// file: lib\common\channel.js
-define("cordova/channel", function(require, exports, module) {
-
-var utils = require('cordova/utils'),
-    nextGuid = 1;
-
-/**
- * Custom pub-sub "channel" that can have functions subscribed to it
- * This object is used to define and control firing of events for
- * cordova initialization, as well as for custom events thereafter.
- *
- * The order of events during page load and Cordova startup is as follows:
- *
- * onDOMContentLoaded*         Internal event that is received when the web page is loaded and parsed.
- * onNativeReady*              Internal event that indicates the Cordova native side is ready.
- * onCordovaReady*             Internal event fired when all Cordova JavaScript objects have been created.
- * onCordovaInfoReady*         Internal event fired when device properties are available.
- * onCordovaConnectionReady*   Internal event fired when the connection property has been set.
- * onDeviceReady*              User event fired to indicate that Cordova is ready
- * onResume                    User event fired to indicate a start/resume lifecycle event
- * onPause                     User event fired to indicate a pause lifecycle event
- * onDestroy*                  Internal event fired when app is being destroyed (User should use window.onunload event, not this one).
- *
- * The events marked with an * are sticky. Once they have fired, they will stay in the fired state.
- * All listeners that subscribe after the event is fired will be executed right away.
- *
- * The only Cordova events that user code should register for are:
- *      deviceready           Cordova native code is initialized and Cordova APIs can be called from JavaScript
- *      pause                 App has moved to background
- *      resume                App has returned to foreground
- *
- * Listeners can be registered as:
- *      document.addEventListener("deviceready", myDeviceReadyListener, false);
- *      document.addEventListener("resume", myResumeListener, false);
- *      document.addEventListener("pause", myPauseListener, false);
- *
- * The DOM lifecycle events should be used for saving and restoring state
- *      window.onload
- *      window.onunload
- *
- */
-
-/**
- * Channel
- * @constructor
- * @param type  String the channel name
- */
-var Channel = function(type, sticky) {
-    this.type = type;
-    // Map of guid -> function.
-    this.handlers = {};
-    // 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired.
-    this.state = sticky ? 1 : 0;
-    // Used in sticky mode to remember args passed to fire().
-    this.fireArgs = null;
-    // Used by onHasSubscribersChange to know if there are any listeners.
-    this.numHandlers = 0;
-    // Function that is called when the first listener is subscribed, or when
-    // the last listener is unsubscribed.
-    this.onHasSubscribersChange = null;
-},
-    channel = {
-        /**
-         * Calls the provided function only after all of the channels specified
-         * have been fired. All channels must be sticky channels.
-         */
-        join: function(h, c) {
-            var len = c.length,
-                i = len,
-                f = function() {
-                    if (!(--i)) h();
-                };
-            for (var j=0; j<len; j++) {
-                if (c[j].state === 0) {
-                    throw Error('Can only use join with sticky channels.');
-                }
-                c[j].subscribe(f);
-            }
-            if (!len) h();
-        },
-        create: function(type) {
-            return channel[type] = new Channel(type, false);
-        },
-        createSticky: function(type) {
-            return channel[type] = new Channel(type, true);
-        },
-
-        /**
-         * cordova Channels that must fire before "deviceready" is fired.
-         */
-        deviceReadyChannelsArray: [],
-        deviceReadyChannelsMap: {},
-
-        /**
-         * Indicate that a feature needs to be initialized before it is ready to be used.
-         * This holds up Cordova's "deviceready" event until the feature has been initialized
-         * and Cordova.initComplete(feature) is called.
-         *
-         * @param feature {String}     The unique feature name
-         */
-        waitForInitialization: function(feature) {
-            if (feature) {
-                var c = channel[feature] || this.createSticky(feature);
-                this.deviceReadyChannelsMap[feature] = c;
-                this.deviceReadyChannelsArray.push(c);
-            }
-        },
-
-        /**
-         * Indicate that initialization code has completed and the feature is ready to be used.
-         *
-         * @param feature {String}     The unique feature name
-         */
-        initializationComplete: function(feature) {
-            var c = this.deviceReadyChannelsMap[feature];
-            if (c) {
-                c.fire();
-            }
-        }
-    };
-
-function forceFunction(f) {
-    if (typeof f != 'function') throw "Function required as first argument!";
-}
-
-/**
- * Subscribes the given function to the channel. Any time that
- * Channel.fire is called so too will the function.
- * Optionally specify an execution context for the function
- * and a guid that can be used to stop subscribing to the channel.
- * Returns the guid.
- */
-Channel.prototype.subscribe = function(f, c) {
-    // need a function to call
-    forceFunction(f);
-    if (this.state == 2) {
-        f.apply(c || this, this.fireArgs);
-        return;
-    }
-
-    var func = f,
-        guid = f.observer_guid;
-    if (typeof c == "object") { func = utils.close(c, f); }
-
-    if (!guid) {
-        // first time any channel has seen this subscriber
-        guid = '' + nextGuid++;
-    }
-    func.observer_guid = guid;
-    f.observer_guid = guid;
-
-    // Don't add the same handler more than once.
-    if (!this.handlers[guid]) {
-        this.handlers[guid] = func;
-        this.numHandlers++;
-        if (this.numHandlers == 1) {
-            this.onHasSubscribersChange && this.onHasSubscribersChange();
-        }
-    }
-};
-
-/**
- * Unsubscribes the function with the given guid from the channel.
- */
-Channel.prototype.unsubscribe = function(f) {
-    // need a function to unsubscribe
-    forceFunction(f);
-
-    var guid = f.observer_guid,
-        handler = this.handlers[guid];
-    if (handler) {
-        delete this.handlers[guid];
-        this.numHandlers--;
-        if (this.numHandlers === 0) {
-            this.onHasSubscribersChange && this.onHasSubscribersChange();
-        }
-    }
-};
-
-/**
- * Calls all functions subscribed to this channel.
- */
-Channel.prototype.fire = function(e) {
-    var fail = false,
-        fireArgs = Array.prototype.slice.call(arguments);
-    // Apply stickiness.
-    if (this.state == 1) {
-        this.state = 2;
-        this.fireArgs = fireArgs;
-    }
-    if (this.numHandlers) {
-        // Copy the values first so that it is safe to modify it from within
-        // callbacks.
-        var toCall = [];
-        for (var item in this.handlers) {
-            toCall.push(this.handlers[item]);
-        }
-        for (var i = 0; i < toCall.length; ++i) {
-            toCall[i].apply(this, fireArgs);
-        }
-        if (this.state == 2 && this.numHandlers) {
-            this.numHandlers = 0;
-            this.handlers = {};
-            this.onHasSubscribersChange && this.onHasSubscribersChange();
-        }
-    }
-};
-
-
-// defining them here so they are ready super fast!
-// DOM event that is received when the web page is loaded and parsed.
-channel.createSticky('onDOMContentLoaded');
-
-// Event to indicate the Cordova native side is ready.
-channel.createSticky('onNativeReady');
-
-// Event to indicate that all Cordova JavaScript objects have been created
-// and it's time to run plugin constructors.
-channel.createSticky('onCordovaReady');
-
-// Event to indicate that device properties are available
-channel.createSticky('onCordovaInfoReady');
-
-// Event to indicate that the connection property has been set.
-channel.createSticky('onCordovaConnectionReady');
-
-// Event to indicate that all automatically loaded JS plugins are loaded and ready.
-channel.createSticky('onPluginsReady');
-
-// Event to indicate that Cordova is ready
-channel.createSticky('onDeviceReady');
-
-// Event to indicate a resume lifecycle event
-channel.create('onResume');
-
-// Event to indicate a pause lifecycle event
-channel.create('onPause');
-
-// Event to indicate a destroy lifecycle event
-channel.createSticky('onDestroy');
-
-// Channels that must fire before "deviceready" is fired.
-channel.waitForInitialization('onCordovaReady');
-channel.waitForInitialization('onCordovaConnectionReady');
-
-module.exports = channel;
-
-});
-
-// file: lib\common\commandProxy.js
-define("cordova/commandProxy", function(require, exports, module) {
-
-
-// internal map of proxy function
-var CommandProxyMap = {};
-
-module.exports = {
-
-    // example: cordova.commandProxy.add("Accelerometer",{getCurrentAcceleration: function(successCallback, errorCallback, options) {...},...);
-    add:function(id,proxyObj) {
-        console.log("adding proxy for " + id);
-        CommandProxyMap[id] = proxyObj;
-        return proxyObj;
-    },
-
-    // cordova.commandProxy.remove("Accelerometer");
-    remove:function(id) {
-        var proxy = CommandProxyMap[id];
-        delete CommandProxyMap[id];
-        CommandProxyMap[id] = null;
-        return proxy;
-    },
-
-    get:function(service,action) {
-        return ( CommandProxyMap[service] ? CommandProxyMap[service][action] : null );
-    }
-};
-});
-
-// file: lib\windows8\exec.js
-define("cordova/exec", function(require, exports, module) {
-
-var cordova = require('cordova');
-var commandProxy = require('cordova/commandProxy');
-
-/**
- * Execute a cordova command.  It is up to the native side whether this action
- * is synchronous or asynchronous.  The native side can return:
- *      Synchronous: PluginResult object as a JSON string
- *      Asynchronous: Empty string ""
- * If async, the native side will cordova.callbackSuccess or cordova.callbackError,
- * depending upon the result of the action.
- *
- * @param {Function} success    The success callback
- * @param {Function} fail       The fail callback
- * @param {String} service      The name of the service to use
- * @param {String} action       Action to be run in cordova
- * @param {String[]} [args]     Zero or more arguments to pass to the method
- */
-module.exports = function(success, fail, service, action, args) {
-
-    var proxy = commandProxy.get(service,action);
-    if(proxy) {
-        var callbackId = service + cordova.callbackId++;
-        // console.log("EXEC:" + service + " : " + action);
-        if (typeof success == "function" || typeof fail == "function") {
-            cordova.callbacks[callbackId] = {success:success, fail:fail};
-        }
-        try {
-            proxy(success, fail, args);
-        }
-        catch(e) {
-            console.log("Exception calling native with command :: " + service + " :: " + action  + " ::exception=" + e);
-        }
-    }
-    else {
-        fail && fail("Missing Command Error");
-    }
-};
-
-});
-
-// file: lib\common\modulemapper.js
-define("cordova/modulemapper", function(require, exports, module) {
-
-var builder = require('cordova/builder'),
-    moduleMap = define.moduleMap,
-    symbolList,
-    deprecationMap;
-
-exports.reset = function() {
-    symbolList = [];
-    deprecationMap = {};
-};
-
-function addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) {
-    if (!(moduleName in moduleMap)) {
-        throw new Error('Module ' + moduleName + ' does not exist.');
-    }
-    symbolList.push(strategy, moduleName, symbolPath);
-    if (opt_deprecationMessage) {
-        deprecationMap[symbolPath] = opt_deprecationMessage;
-    }
-}
-
-// Note: Android 2.3 does have Function.bind().
-exports.clobbers = function(moduleName, symbolPath, opt_deprecationMessage) {
-    addEntry('c', moduleName, symbolPath, opt_deprecationMessage);
-};
-
-exports.merges = function(moduleName, symbolPath, opt_deprecationMessage) {
-    addEntry('m', moduleName, symbolPath, opt_deprecationMessage);
-};
-
-exports.defaults = function(moduleName, symbolPath, opt_deprecationMessage) {
-    addEntry('d', moduleName, symbolPath, opt_deprecationMessage);
-};
-
-function prepareNamespace(symbolPath, context) {
-    if (!symbolPath) {
-        return context;
-    }
-    var parts = symbolPath.split('.');
-    var cur = context;
-    for (var i = 0, part; part = parts[i]; ++i) {
-        cur = cur[part] = cur[part] || {};
-    }
-    return cur;
-}
-
-exports.mapModules = function(context) {
-    var origSymbols = {};
-    context.CDV_origSymbols = origSymbols;
-    for (var i = 0, len = symbolList.length; i < len; i += 3) {
-        var strategy = symbolList[i];
-        var moduleName = symbolList[i + 1];
-        var symbolPath = symbolList[i + 2];
-        var lastDot = symbolPath.lastIndexOf('.');
-        var namespace = symbolPath.substr(0, lastDot);
-        var lastName = symbolPath.substr(lastDot + 1);
-
-        var module = require(moduleName);
-        var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null;
-        var parentObj = prepareNamespace(namespace, context);
-        var target = parentObj[lastName];
-
-        if (strategy == 'm' && target) {
-            builder.recursiveMerge(target, module);
-        } else if ((strategy == 'd' && !target) || (strategy != 'd')) {
-            if (!(symbolPath in origSymbols)) {
-                origSymbols[symbolPath] = target;
-            }
-            builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg);
-        }
-    }
-};
-
-exports.getOriginalSymbol = function(context, symbolPath) {
-    var origSymbols = context.CDV_origSymbols;
-    if (origSymbols && (symbolPath in origSymbols)) {
-        return origSymbols[symbolPath];
-    }
-    var parts = symbolPath.split('.');
-    var obj = context;
-    for (var i = 0; i < parts.length; ++i) {
-        obj = obj && obj[parts[i]];
-    }
-    return obj;
-};
-
-exports.loadMatchingModules = function(matchingRegExp) {
-    for (var k in moduleMap) {
-        if (matchingRegExp.exec(k)) {
-            require(k);
-        }
-    }
-};
-
-exports.reset();
-
-
-});
-
-// file: lib\windows8\platform.js
-define("cordova/platform", function(require, exports, module) {
-
-var cordova = require('cordova'),
-    exec = require('cordova/exec'),
-    channel = cordova.require("cordova/channel");
-
-/*
- * Define native implementations ( there is no native layer, so need to make sure the proxies are there )
-*/
-
-require('cordova/plugin/windows8/DeviceProxy');
-require('cordova/plugin/windows8/NetworkStatusProxy');
-require('cordova/plugin/windows8/AccelerometerProxy');
-require('cordova/plugin/windows8/CameraProxy');
-require('cordova/plugin/windows8/CaptureProxy');
-require('cordova/plugin/windows8/CompassProxy');
-require('cordova/plugin/windows8/ContactsProxy');
-require('cordova/plugin/windows8/FileProxy');
-
-require('cordova/plugin/windows8/FileTransferProxy');
-require('cordova/plugin/windows8/MediaProxy');
-require('cordova/plugin/windows8/NotificationProxy');
-
-
-
-module.exports = {
-    id: "windows8",
-    initialize:function() {
-        var modulemapper = require('cordova/modulemapper');
-
-        modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
-        modulemapper.mapModules(window);
-
-        window.alert = window.alert || require("cordova/plugin/notification").alert;
-        window.confirm = window.confirm || require("cordova/plugin/notification").confirm;
-
-        var onWinJSReady = function () {
-            var app = WinJS.Application;
-            var checkpointHandler = function checkpointHandler() {
-                cordova.fireDocumentEvent('pause');
-            };
-
-            var resumingHandler = function resumingHandler() {
-                cordova.fireDocumentEvent('resume');
-            };
-
-            app.addEventListener("checkpoint", checkpointHandler);
-            Windows.UI.WebUI.WebUIApplication.addEventListener("resuming", resumingHandler, false);
-            app.start();
-
-        };
-
-        if (!window.WinJS) {
-            // <script src="//Microsoft.WinJS.1.0/js/base.js"></script>
-            var scriptElem = document.createElement("script");
-            scriptElem.src = "//Microsoft.WinJS.1.0/js/base.js";
-            scriptElem.addEventListener("load", onWinJSReady);
-            document.head.appendChild(scriptElem);
-
-            console.log("added WinJS ... ");
-        }
-        else {
-            onWinJSReady();
-        }
-    },
-    clobbers: {
-        cordova: {
-            path: 'cordova',
-            children: {
-                commandProxy: {
-                    path: 'cordova/commandProxy'
-                }
-            }
-        },
-        navigator: {
-            children: {
-                console: {
-                    path: "cordova/plugin/windows8/console"
-                }
-            }
-        }
-    }
-};
-
-});
-
-// file: lib\common\plugin\Acceleration.js
-define("cordova/plugin/Acceleration", function(require, exports, module) {
-
-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;
-
-});
-
-// file: lib\common\plugin\Camera.js
-define("cordova/plugin/Camera", function(require, exports, module) {
-
-var argscheck = require('cordova/argscheck'),
-    exec = require('cordova/exec'),
-    Camera = require('cordova/plugin/CameraConstants'),
-    CameraPopoverHandle = require('cordova/plugin/CameraPopoverHandle');
-
-var cameraExport = {};
-
-// Tack on the Camera Constants to the base camera plugin.
-for (var key in Camera) {
-    cameraExport[key] = Camera[key];
-}
-
-/**
- * Gets a picture from source defined by "options.sourceType", and returns the
- * image as defined by the "options.destinationType" option.
-
- * The defaults are sourceType=CAMERA and destinationType=FILE_URI.
- *
- * @param {Function} successCallback
- * @param {Function} errorCallback
- * @param {Object} options
- */
-cameraExport.getPicture = function(successCallback, errorCallback, options) {
-    argscheck.checkArgs('fFO', 'Camera.getPicture', arguments);
-    options = options || {};
-    var getValue = argscheck.getValue;
-
-    var quality = getValue(options.quality, 50);
-    var destinationType = getValue(options.destinationType, Camera.DestinationType.FILE_URI);
-    var sourceType = getValue(options.sourceType, Camera.PictureSourceType.CAMERA);
-    var targetWidth = getValue(options.targetWidth, -1);
-    var targetHeight = getValue(options.targetHeight, -1);
-    var encodingType = getValue(options.encodingType, Camera.EncodingType.JPEG);
-    var mediaType = getValue(options.mediaType, Camera.MediaType.PICTURE);
-    var allowEdit = !!options.allowEdit;
-    var correctOrientation = !!options.correctOrientation;
-    var saveToPhotoAlbum = !!options.saveToPhotoAlbum;
-    var popoverOptions = getValue(options.popoverOptions, null);
-    var cameraDirection = getValue(options.cameraDirection, Camera.Direction.BACK);
-
-    var args = [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType,
-                mediaType, allowEdit, correctOrientation, saveToPhotoAlbum, popoverOptions, cameraDirection];
-
-    exec(successCallback, errorCallback, "Camera", "takePicture", args);
-    return new CameraPopoverHandle();
-};
-
-cameraExport.cleanup = function(successCallback, errorCallback) {
-    exec(successCallback, errorCallback, "Camera", "cleanup", []);
-};
-
-module.exports = cameraExport;
-
-});
-
-// file: lib\common\plugin\CameraConstants.js
-define("cordova/plugin/CameraConstants", function(require, exports, module) {
-
-module.exports = {
-  DestinationType:{
-    DATA_URL: 0,         // Return base64 encoded string
-    FILE_URI: 1,         // Return file uri (content://media/external/images/media/2 for Android)
-    NATIVE_URI: 2        // Return native uri (eg. asset-library://... for iOS)
-  },
-  EncodingType:{
-    JPEG: 0,             // Return JPEG encoded image
-    PNG: 1               // Return PNG encoded image
-  },
-  MediaType:{
-    PICTURE: 0,          // allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType
-    VIDEO: 1,            // allow selection of video only, ONLY RETURNS URL
-    ALLMEDIA : 2         // allow selection from all media types
-  },
-  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)
-  },
-  PopoverArrowDirection:{
-      ARROW_UP : 1,        // matches iOS UIPopoverArrowDirection constants to specify arrow location on popover
-      ARROW_DOWN : 2,
-      ARROW_LEFT : 4,
-      ARROW_RIGHT : 8,
-      ARROW_ANY : 15
-  },
-  Direction:{
-      BACK: 0,
-      FRONT: 1
-  }
-};
-
-});
-
-// file: lib\common\plugin\CameraPopoverHandle.js
-define("cordova/plugin/CameraPopoverHandle", function(require, exports, module) {
-
-var exec = require('cordova/exec');
-
-/**
- * A handle to an image picker popover.
- */
-var CameraPopoverHandle = function() {
-    this.setPosition = function(popoverOptions) {
-        console.log('CameraPopoverHandle.setPosition is only supported on iOS.');
-    };
-};
-
-module.exports = CameraPopoverHandle;
-
-});
-
-// file: lib\common\plugin\CameraPopoverOptions.js
-define("cordova/plugin/CameraPopoverOptions", function(require, exports, module) {
-
-var Camera = require('cordova/plugin/CameraConstants');
-
-/**
- * Encapsulates options for iOS Popover image picker
- */
-var CameraPopoverOptions = function(x,y,width,height,arrowDir){
-    // information of rectangle that popover should be anchored to
-    this.x = x || 0;
-    this.y = y || 32;
-    this.width = width || 320;
-    this.height = height || 480;
-    // The direction of the popover arrow
-    this.arrowDir = arrowDir || Camera.PopoverArrowDirection.ARROW_ANY;
-};
-
-module.exports = CameraPopoverOptions;
-
-});
-
-// file: lib\common\plugin\CaptureAudioOptions.js
-define("cordova/plugin/CaptureAudioOptions", function(require, exports, module) {
-
-/**
- * Encapsulates all audio capture operation configuration options.
- */
-var CaptureAudioOptions = function(){
-    // Upper limit of sound clips user can record. Value must be equal or greater than 1.
-    this.limit = 1;
-    // Maximum duration of a single sound clip in seconds.
-    this.duration = 0;
-    // The selected audio mode. Must match with one of the elements in supportedAudioModes array.
-    this.mode = null;
-};
-
-module.exports = CaptureAudioOptions;
-
-});
-
-// file: lib\common\plugin\CaptureError.js
-define("cordova/plugin/CaptureError", function(require, exports, module) {
-
-/**
- * The CaptureError interface encapsulates all errors in the Capture API.
- */
-var CaptureError = function(c) {
-   this.code = c || null;
-};
-
-// Camera or microphone failed to capture image or sound.
-CaptureError.CAPTURE_INTERNAL_ERR = 0;
-// Camera application or audio capture application is currently serving other capture request.
-CaptureError.CAPTURE_APPLICATION_BUSY = 1;
-// Invalid use of the API (e.g. limit parameter has value less than one).
-CaptureError.CAPTURE_INVALID_ARGUMENT = 2;
-// User exited camera application or audio capture application before capturing anything.
-CaptureError.CAPTURE_NO_MEDIA_FILES = 3;
-// The requested capture operation is not supported.
-CaptureError.CAPTURE_NOT_SUPPORTED = 20;
-
-module.exports = CaptureError;
-
-});
-
-// file: lib\common\plugin\CaptureImageOptions.js
-define("cordova/plugin/CaptureImageOptions", function(require, exports, module) {
-
-/**
- * Encapsulates all image capture operation configuration options.
- */
-var CaptureImageOptions = function(){
-    // Upper limit of images user can take. Value must be equal or greater than 1.
-    this.limit = 1;
-    // The selected image mode. Must match with one of the elements in supportedImageModes array.
-    this.mode = null;
-};
-
-module.exports = CaptureImageOptions;
-
-});
-
-// file: lib\common\plugin\CaptureVideoOptions.js
-define("cordova/plugin/CaptureVideoOptions", function(require, exports, module) {
-
-/**
- * Encapsulates all video capture operation configuration options.
- */
-var CaptureVideoOptions = function(){
-    // Upper limit of videos user can record. Value must be equal or greater than 1.
-    this.limit = 1;
-    // Maximum duration of a single video clip in seconds.
-    this.duration = 0;
-    // The selected video mode. Must match with one of the elements in supportedVideoModes array.
-    this.mode = null;
-};
-
-module.exports = CaptureVideoOptions;
-
-});
-
-// file: lib\common\plugin\CompassError.js
-define("cordova/plugin/CompassError", function(require, exports, module) {
-
-/**
- *  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;
-
-});
-
-// file: lib\common\plugin\CompassHeading.js
-define("cordova/plugin/CompassHeading", function(require, exports, module) {
-
-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;
-
-});
-
-// file: lib\common\plugin\ConfigurationData.js
-define("cordova/plugin/ConfigurationData", function(require, exports, module) {
-
-/**
- * Encapsulates a set of parameters that the capture device supports.
- */
-function ConfigurationData() {
-    // The ASCII-encoded string in lower case representing the media type.
-    this.type = null;
-    // The height attribute represents height of the image or video in pixels.
-    // In the case of a sound clip this attribute has value 0.
-    this.height = 0;
-    // The width attribute represents width of the image or video in pixels.
-    // In the case of a sound clip this attribute has value 0
-    this.width = 0;
-}
-
-module.exports = ConfigurationData;
-
-});
-
-// file: lib\common\plugin\Connection.js
-define("cordova/plugin/Connection", function(require, exports, module) {
-
-/**
- * Network status
- */
-module.exports = {
-        UNKNOWN: "unknown",
-        ETHERNET: "ethernet",
-        WIFI: "wifi",
-        CELL_2G: "2g",
-        CELL_3G: "3g",
-        CELL_4G: "4g",
-        CELL:"cellular",
-        NONE: "none"
-};
-
-});
-
-// file: lib\common\plugin\Contact.js
-define("cordova/plugin/Contact", function(require, exports, module) {
-
-var argscheck = require('cordova/argscheck'),
-    exec = require('cordova/exec'),
-    ContactError = require('cordova/plugin/ContactError'),
-    utils = require('cordova/utils');
-
-/**
-* Converts primitives into Complex Object
-* Currently only used for Date fields
-*/
-function convertIn(contact) {
-    var value = contact.birthday;
-    try {
-      contact.birthday = new Date(parseFloat(value));
-    } catch (exception){
-      console.log("Cordova Contact convertIn error: exception creating date.");
-    }
-    return contact;
-}
-
-/**
-* Converts Complex objects into primitives
-* Only conversion at present is for Dates.
-**/
-
-function convertOut(contact) {
-    var value = contact.birthday;
-    if (value !== null) {
-        // try to make it a Date object if it is not already
-        if (!utils.isDate(value)){
-            try {
-                value = new Date(value);
-            } catch(exception){
-                value = null;
-            }
-        }
-        if (utils.isDate(value)){
-            value = value.valueOf(); // convert to milliseconds
-        }
-        contact.birthday = value;
-    }
-    return contact;
-}
-
-/**
-* Contains information about a single contact.
-* @constructor
-* @param {DOMString} id unique identifier
-* @param {DOMString} displayName
-* @param {ContactName} name
-* @param {DOMString} nickname
-* @param {Array.<ContactField>} phoneNumbers array of phone numbers
-* @param {Array.<ContactField>} emails array of email addresses
-* @param {Array.<ContactAddress>} addresses array of addresses
-* @param {Array.<ContactField>} ims instant messaging user ids
-* @param {Array.<ContactOrganization>} organizations
-* @param {DOMString} birthday contact's birthday
-* @param {DOMString} note user notes about contact
-* @param {Array.<ContactField>} photos
-* @param {Array.<ContactField>} categories
-* @param {Array.<ContactField>} urls contact's web sites
-*/
-var Contact = function (id, displayName, name, nickname, phoneNumbers, emails, addresses,
-    ims, organizations, birthday, note, photos, categories, urls) {
-    this.id = id || null;
-    this.rawId = null;
-    this.displayName = displayName || null;
-    this.name = name || null; // ContactName
-    this.nickname = nickname || null;
-    this.phoneNumbers = phoneNumbers || null; // ContactField[]
-    this.emails = emails || null; // ContactField[]
-    this.addresses = addresses || null; // ContactAddress[]
-    this.ims = ims || null; // ContactField[]
-    this.organizations = organizations || null; // ContactOrganization[]
-    this.birthday = birthday || null;
-    this.note = note || null;
-    this.photos = photos || null; // ContactField[]
-    this.categories = categories || null; // ContactField[]
-    this.urls = urls || null; // ContactField[]
-};
-
-/**
-* Removes contact from device storage.
-* @param successCB success callback
-* @param errorCB error callback
-*/
-Contact.prototype.remove = function(successCB, errorCB) {
-    argscheck.checkArgs('FF', 'Contact.remove', arguments);
-    var fail = errorCB && function(code) {
-        errorCB(new ContactError(code));
-    };
-    if (this.id === null) {
-        fail(ContactError.UNKNOWN_ERROR);
-    }
-    else {
-        exec(successCB, fail, "Contacts", "remove", [this.id]);
-    }
-};
-
-/**
-* Creates a deep copy of this Contact.
-* With the contact ID set to null.
-* @return copy of this Contact
-*/
-Contact.prototype.clone = function() {
-    var clonedContact = utils.clone(this);
-    clonedContact.id = null;
-    clonedContact.rawId = null;
-
-    function nullIds(arr) {
-        if (arr) {
-            for (var i = 0; i < arr.length; ++i) {
-                arr[i].id = null;
-            }
-        }
-    }
-
-    // Loop through and clear out any id's in phones, emails, etc.
-    nullIds(clonedContact.phoneNumbers);
-    nullIds(clonedContact.emails);
-    nullIds(clonedContact.addresses);
-    nullIds(clonedContact.ims);
-    nullIds(clonedContact.organizations);
-    nullIds(clonedContact.categories);
-    nullIds(clonedContact.photos);
-    nullIds(clonedContact.urls);
-    return clonedContact;
-};
-
-/**
-* Persists contact to device storage.
-* @param successCB success callback
-* @param errorCB error callback
-*/
-Contact.prototype.save = function(successCB, errorCB) {
-    argscheck.checkArgs('FFO', 'Contact.save', arguments);
-    var fail = errorCB && function(code) {
-        errorCB(new ContactError(code));
-    };
-    var success = function(result) {
-        if (result) {
-            if (successCB) {
-                var fullContact = require('cordova/plugin/contacts').create(result);
-                successCB(convertIn(fullContact));
-            }
-        }
-        else {
-            // no Entry object returned
-            fail(ContactError.UNKNOWN_ERROR);
-        }
-    };
-    var dupContact = convertOut(utils.clone(this));
-    exec(success, fail, "Contacts", "save", [dupContact]);
-};
-
-
-module.exports = Contact;
-
-});
-
-// file: lib\common\plugin\ContactAddress.js
-define("cordova/plugin/ContactAddress", function(require, exports, module) {
-
-/**
-* Contact address.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code
-* @param formatted // NOTE: not a W3C standard
-* @param streetAddress
-* @param locality
-* @param region
-* @param postalCode
-* @param country
-*/
-
-var ContactAddress = function(pref, type, formatted, streetAddress, locality, region, postalCode, country) {
-    this.id = null;
-    this.pref = (typeof pref != 'undefined' ? pref : false);
-    this.type = type || null;
-    this.formatted = formatted || null;
-    this.streetAddress = streetAddress || null;
-    this.locality = locality || null;
-    this.region = region || null;
-    this.postalCode = postalCode || null;
-    this.country = country || null;
-};
-
-module.exports = ContactAddress;
-
-});
-
-// file: lib\common\plugin\ContactError.js
-define("cordova/plugin/ContactError", function(require, exports, module) {
-
-/**
- *  ContactError.
- *  An error code assigned by an implementation when an error has occurred
- * @constructor
- */
-var ContactError = function(err) {
-    this.code = (typeof err != 'undefined' ? err : null);
-};
-
-/**
- * Error codes
- */
-ContactError.UNKNOWN_ERROR = 0;
-ContactError.INVALID_ARGUMENT_ERROR = 1;
-ContactError.TIMEOUT_ERROR = 2;
-ContactError.PENDING_OPERATION_ERROR = 3;
-ContactError.IO_ERROR = 4;
-ContactError.NOT_SUPPORTED_ERROR = 5;
-ContactError.PERMISSION_DENIED_ERROR = 20;
-
-module.exports = ContactError;
-
-});
-
-// file: lib\common\plugin\ContactField.js
-define("cordova/plugin/ContactField", function(require, exports, module) {
-
-/**
-* Generic contact field.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
-* @param type
-* @param value
-* @param pref
-*/
-var ContactField = function(type, value, pref) {
-    this.id = null;
-    this.type = (type && type.toString()) || null;
-    this.value = (value && value.toString()) || null;
-    this.pref = (typeof pref != 'undefined' ? pref : false);
-};
-
-module.exports = ContactField;
-
-});
-
-// file: lib\common\plugin\ContactFindOptions.js
-define("cordova/plugin/ContactFindOptions", function(require, exports, module) {
-
-/**
- * ContactFindOptions.
- * @constructor
- * @param filter used to match contacts against
- * @param multiple boolean used to determine if more than one contact should be returned
- */
-
-var ContactFindOptions = function(filter, multiple) {
-    this.filter = filter || '';
-    this.multiple = (typeof multiple != 'undefined' ? multiple : false);
-};
-
-module.exports = ContactFindOptions;
-
-});
-
-// file: lib\common\plugin\ContactName.js
-define("cordova/plugin/ContactName", function(require, exports, module) {
-
-/**
-* Contact name.
-* @constructor
-* @param formatted // NOTE: not part of W3C standard
-* @param familyName
-* @param givenName
-* @param middle
-* @param prefix
-* @param suffix
-*/
-var ContactName = function(formatted, familyName, givenName, middle, prefix, suffix) {
-    this.formatted = formatted || null;
-    this.familyName = familyName || null;
-    this.givenName = givenName || null;
-    this.middleName = middle || null;
-    this.honorificPrefix = prefix || null;
-    this.honorificSuffix = suffix || null;
-};
-
-module.exports = ContactName;
-
-});
-
-// file: lib\common\plugin\ContactOrganization.js
-define("cordova/plugin/ContactOrganization", function(require, exports, module) {
-
-/**
-* Contact organization.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
-* @param name
-* @param dept
-* @param title
-* @param startDate
-* @param endDate
-* @param location
-* @param desc
-*/
-
-var ContactOrganization = function(pref, type, name, dept, title) {
-    this.id = null;
-    this.pref = (typeof pref != 'undefined' ? pref : false);
-    this.type = type || null;
-    this.name = name || null;
-    this.department = dept || null;
-    this.title = title || null;
-};
-
-module.exports = ContactOrganization;
-
-});
-
-// file: lib\common\plugin\Coordinates.js
-define("cordova/plugin/Coordinates", function(require, exports, module) {
-
-/**
- * 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;
-
-});
-
-// file: lib\common\plugin\DirectoryEntry.js
-define("cordova/plugin/DirectoryEntry", function(require, exports, module) {
-
-var argscheck = require('cordova/argscheck'),
-    utils = require('cordova/utils'),
-    exec = require('cordova/exec'),
-    Entry = require('cordova/plugin/Entry'),
-    FileError = require('cordova/plugin/FileError'),
-    DirectoryReader = require('cordova/plugin/DirectoryReader');
-
-/**
- * An interface representing a directory on the file system.
- *
- * {boolean} isFile always false (readonly)
- * {boolean} isDirectory always true (readonly)
- * {DOMString} name of the directory, excluding the path leading to it (readonly)
- * {DOMString} fullPath the absolute full path to the directory (readonly)
- * TODO: implement this!!! {FileSystem} filesystem on which the directory resides (readonly)
- */
-var DirectoryEntry = function(name, fullPath) {
-     DirectoryEntry.__super__.constructor.call(this, false, true, name, fullPath);
-};
-
-utils.extend(DirectoryEntry, Entry);
-
-/**
- * Creates a new DirectoryReader to read entries from this directory
- */
-DirectoryEntry.prototype.createReader = function() {
-    return new DirectoryReader(this.fullPath);
-};
-
-/**
- * Creates or looks up a directory
- *
- * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a directory
- * @param {Flags} options to create or exclusively create the directory
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.getDirectory = function(path, options, successCallback, errorCallback) {
-    argscheck.checkArgs('sOFF', 'DirectoryEntry.getDirectory', arguments);
-    var win = successCallback && function(result) {
-        var entry = new DirectoryEntry(result.name, result.fullPath);
-        successCallback(entry);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "getDirectory", [this.fullPath, path, options]);
-};
-
-/**
- * Deletes a directory and all of it's contents
- *
- * @param {Function} successCallback is called with no parameters
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.removeRecursively = function(successCallback, errorCallback) {
-    argscheck.checkArgs('FF', 'DirectoryEntry.removeRecursively', arguments);
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(successCallback, fail, "File", "removeRecursively", [this.fullPath]);
-};
-
-/**
- * Creates or looks up a file
- *
- * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a file
- * @param {Flags} options to create or exclusively create the file
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.getFile = function(path, options, successCallback, errorCallback) {
-    argscheck.checkArgs('sOFF', 'DirectoryEntry.getFile', arguments);
-    var win = successCallback && function(result) {
-        var FileEntry = require('cordova/plugin/FileEntry');
-        var entry = new FileEntry(result.name, result.fullPath);
-        successCallback(entry);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "getFile", [this.fullPath, path, options]);
-};
-
-module.exports = DirectoryEntry;
-
-});
-
-// file: lib\common\plugin\DirectoryReader.js
-define("cordova/plugin/DirectoryReader", function(require, exports, module) {
-
-var exec = require('cordova/exec'),
-    FileError = require('cordova/plugin/FileError') ;
-
-/**
- * An interface that lists the files and directories in a directory.
- */
-function DirectoryReader(path) {
-    this.path = path || null;
-}
-
-/**
- * Returns a list of entries from a directory.
- *
- * @param {Function} successCallback is called with a list of entries
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryReader.prototype.readEntries = function(successCallback, errorCallback) {
-    var win = typeof successCallback !== 'function' ? null : function(result) {
-        var retVal = [];
-        for (var i=0; i<result.length; i++) {
-            var entry = null;
-            if (result[i].isDirectory) {
-                entry = new (require('cordova/plugin/DirectoryEntry'))();
-            }
-            else if (result[i].isFile) {
-                entry = new (require('cordova/plugin/FileEntry'))();
-            }
-            entry.isDirectory = result[i].isDirectory;
-            entry.isFile = result[i].isFile;
-            entry.name = result[i].name;
-            entry.fullPath = result[i].fullPath;
-            retVal.push(entry);
-        }
-        successCallback(retVal);
-    };
-    var fail = typeof errorCallback !== 'function' ? null : function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "readEntries", [this.path]);
-};
-
-module.exports = DirectoryReader;
-
-});
-
-// file: lib\common\plugin\Entry.js
-define("cordova/plugin/Entry", function(require, exports, module) {
-
-var argscheck = require('cordova/argscheck'),
-    exec = require('cordova/exec'),
-    FileError = require('cordova/plugin/FileError'),
-    Metadata = require('cordova/plugin/Metadata');
-
-/**
- * Represents a file or directory on the local file system.
- *
- * @param isFile
- *            {boolean} true if Entry is a file (readonly)
- * @param isDirectory
- *            {boolean} true if Entry is a directory (readonly)
- * @param name
- *            {DOMString} name of the file or directory, excluding the path
- *            leading to it (readonly)
- * @param fullPath
- *            {DOMString} the absolute full path to the file or directory
- *            (readonly)
- */
-function Entry(isFile, isDirectory, name, fullPath, fileSystem) {
-    this.isFile = !!isFile;
-    this.isDirectory = !!isDirectory;
-    this.name = name || '';
-    this.fullPath = fullPath || '';
-    this.filesystem = fileSystem || null;
-}
-
-/**
- * Look up the metadata of the entry.
- *
- * @param successCallback
- *            {Function} is called with a Metadata object
- * @param errorCallback
- *            {Function} is called with a FileError
- */
-Entry.prototype.getMetadata = function(successCallback, errorCallback) {
-    argscheck.checkArgs('FF', 'Entry.getMetadata', arguments);
-    var success = successCallback && function(lastModified) {
-        var metadata = new Metadata(lastModified);
-        successCallback(metadata);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-
-    exec(success, fail, "File", "getMetadata", [this.fullPath]);
-};
-
-/**
- * Set the metadata of the entry.
- *
- * @param successCallback
- *            {Function} is called with a Metadata object
- * @param errorCallback
- *            {Function} is called with a FileError
- * @param metadataObject
- *            {Object} keys and values to set
- */
-Entry.prototype.setMetadata = function(successCallback, errorCallback, metadataObject) {
-    argscheck.checkArgs('FFO', 'Entry.setMetadata', arguments);
-    exec(successCallback, errorCallback, "File", "setMetadata", [this.fullPath, metadataObject]);
-};
-
-/**
- * Move a file or directory to a new location.
- *
- * @param parent
- *            {DirectoryEntry} the directory to which to move this entry
- * @param newName
- *            {DOMString} new name of the entry, defaults to the current name
- * @param successCallback
- *            {Function} called with the new DirectoryEntry object
- * @param errorCallback
- *            {Function} called with a FileError
- */
-Entry.prototype.moveTo = function(parent, newName, successCallback, errorCallback) {
-    argscheck.checkArgs('oSFF', 'Entry.moveTo', arguments);
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    // source path
-    var srcPath = this.fullPath,
-        // entry name
-        name = newName || this.name,
-        success = function(entry) {
-            if (entry) {
-                if (successCallback) {
-                    // create appropriate Entry object
-                    var result = (entry.isDirectory) ? new (require('cordova/plugin/DirectoryEntry'))(entry.name, entry.fullPath) : new (require('cordova/plugin/FileEntry'))(entry.name, entry.fullPath);
-                    successCallback(result);
-                }
-            }
-            else {
-                // no Entry object returned
-                fail && fail(FileError.NOT_FOUND_ERR);
-            }
-        };
-
-    // copy
-    exec(success, fail, "File", "moveTo", [srcPath, parent.fullPath, name]);
-};
-
-/**
- * Copy a directory to a different location.
- *
- * @param parent
- *            {DirectoryEntry} the directory to which to copy the entry
- * @param newName
- *            {DOMString} new name of the entry, defaults to the current name
- * @param successCallback
- *            {Function} called with the new Entry object
- * @param errorCallback
- *            {Function} called with a FileError
- */
-Entry.prototype.copyTo = function(parent, newName, successCallback, errorCallback) {
-    argscheck.checkArgs('oSFF', 'Entry.copyTo', arguments);
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-
-        // source path
-    var srcPath = this.fullPath,
-        // entry name
-        name = newName || this.name,
-        // success callback
-        success = function(entry) {
-            if (entry) {
-                if (successCallback) {
-                    // create appropriate Entry object
-                    var result = (entry.isDirectory) ? new (require('cordova/plugin/DirectoryEntry'))(entry.name, entry.fullPath) : new (require('cordova/plugin/FileEntry'))(entry.name, entry.fullPath);
-                    successCallback(result);
-                }
-            }
-            else {
-                // no Entry object returned
-                fail && fail(FileError.NOT_FOUND_ERR);
-            }
-        };
-
-    // copy
-    exec(success, fail, "File", "copyTo", [srcPath, parent.fullPath, name]);
-};
-
-/**
- * Return a URL that can be used to identify this entry.
- */
-Entry.prototype.toURL = function() {
-    // fullPath attribute contains the full URL
-    return this.fullPath;
-};
-
-/**
- * Returns a URI that can be used to identify this entry.
- *
- * @param {DOMString} mimeType for a FileEntry, the mime type to be used to interpret the file, when loaded through this URI.
- * @return uri
- */
-Entry.prototype.toURI = function(mimeType) {
-    console.log("DEPRECATED: Update your code to use 'toURL'");
-    // fullPath attribute contains the full URI
-    return this.toURL();
-};
-
-/**
- * Remove a file or directory. It is an error to attempt to delete a
- * directory that is not empty. It is an error to attempt to delete a
- * root directory of a file system.
- *
- * @param successCallback {Function} called with no parameters
- * @param errorCallback {Function} called with a FileError
- */
-Entry.prototype.remove = function(successCallback, errorCallback) {
-    argscheck.checkArgs('FF', 'Entry.remove', arguments);
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(successCallback, fail, "File", "remove", [this.fullPath]);
-};
-
-/**
- * Look up the parent DirectoryEntry of this entry.
- *
- * @param successCallback {Function} called with the parent DirectoryEntry object
- * @param errorCallback {Function} called with a FileError
- */
-Entry.prototype.getParent = function(successCallback, errorCallback) {
-    argscheck.checkArgs('FF', 'Entry.getParent', arguments);
-    var win = successCallback && function(result) {
-        var DirectoryEntry = require('cordova/plugin/DirectoryEntry');
-        var entry = new DirectoryEntry(result.name, result.fullPath);
-        successCallback(entry);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "getParent", [this.fullPath]);
-};
-
-module.exports = Entry;
-
-});
-
-// file: lib\common\plugin\File.js
-define("cordova/plugin/File", function(require, exports, module) {
-
-/**
- * Constructor.
- * name {DOMString} name of the file, without path information
- * fullPath {DOMString} the full path of the file, including the name
- * type {DOMString} mime type
- * lastModifiedDate {Date} last modified date
- * size {Number} size of the file in bytes
- */
-
-var File = function(name, fullPath, type, lastModifiedDate, size){
-    this.name = name || '';
-    this.fullPath = fullPath || null;
-    this.type = type || null;
-    this.lastModifiedDate = lastModifiedDate || null;
-    this.size = size || 0;
-
-    // These store the absolute start and end for slicing the file.
-    this.start = 0;
-    this.end = this.size;
-};
-
-/**
- * Returns a "slice" of the file. Since Cordova Files don't contain the actual
- * content, this really returns a File with adjusted start and end.
- * Slices of slices are supported.
- * start {Number} The index at which to start the slice (inclusive).
- * end {Number} The index at which to end the slice (exclusive).
- */
-File.prototype.slice = function(start, end) {
-    var size = this.end - this.start;
-    var newStart = 0;
-    var newEnd = size;
-    if (arguments.length) {
-        if (start < 0) {
-            newStart = Math.max(size + start, 0);
-        } else {
-            newStart = Math.min(size, start);
-        }
-    }
-
-    if (arguments.length >= 2) {
-        if (end < 0) {
-            newEnd = Math.max(size + end, 0);
-        } else {
-            newEnd = Math.min(end, size);
-        }
-    }
-
-    var newFile = new File(this.name, this.fullPath, this.type, this.lastModifiedData, this.size);
-    newFile.start = this.start + newStart;
-    newFile.end = this.start + newEnd;
-    return newFile;
-};
-
-
-module.exports = File;
-
-});
-
-// file: lib\common\plugin\FileEntry.js
-define("cordova/plugin/FileEntry", function(require, exports, module) {
-
-var utils = require('cordova/utils'),
-    exec = require('cordova/exec'),
-    Entry = require('cordova/plugin/Entry'),
-    FileWriter = require('cordova/plugin/FileWriter'),
-    File = require('cordova/plugin/File'),
-    FileError = require('cordova/plugin/FileError');
-
-/**
- * An interface representing a file on the file system.
- *
- * {boolean} isFile always true (readonly)
- * {boolean} isDirectory always false (readonly)
- * {DOMString} name of the file, excluding the path leading to it (readonly)
- * {DOMString} fullPath the absolute full path to the file (readonly)
- * {FileSystem} filesystem on which the file resides (readonly)
- */
-var FileEntry = function(name, fullPath) {
-     FileEntry.__super__.constructor.apply(this, [true, false, name, fullPath]);
-};
-
-utils.extend(FileEntry, Entry);
-
-/**
- * Creates a new FileWriter associated with the file that this FileEntry represents.
- *
- * @param {Function} successCallback is called with the new FileWriter
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.createWriter = function(successCallback, errorCallback) {
-    this.file(function(filePointer) {
-        var writer = new FileWriter(filePointer);
-
-        if (writer.fileName === null || writer.fileName === "") {
-            errorCallback && errorCallback(new FileError(FileError.INVALID_STATE_ERR));
-        } else {
-            successCallback && successCallback(writer);
-        }
-    }, errorCallback);
-};
-
-/**
- * Returns a File that represents the current state of the file that this FileEntry represents.
- *
- * @param {Function} successCallback is called with the new File object
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.file = function(successCallback, errorCallback) {
-    var win = successCallback && function(f) {
-        var file = new File(f.name, f.fullPath, f.type, f.lastModifiedDate, f.size);
-        successCallback(file);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "getFileMetadata", [this.fullPath]);
-};
-
-
-module.exports = FileEntry;
-
-});
-
-// file: lib\common\plugin\FileError.js
-define("cordova/plugin/FileError", function(require, exports, module) {
-
-/**
- * FileError
- */
-function FileError(error) {
-  this.code = error || null;
-}
-
-// File error codes
-// Found in DOMException
-FileError.NOT_FOUND_ERR = 1;
-FileError.SECURITY_ERR = 2;
-FileError.ABORT_ERR = 3;
-
-// Added by File API specification
-FileError.NOT_READABLE_ERR = 4;
-FileError.ENCODING_ERR = 5;
-FileError.NO_MODIFICATION_ALLOWED_ERR = 6;
-FileError.INVALID_STATE_ERR = 7;
-FileError.SYNTAX_ERR = 8;
-FileError.INVALID_MODIFICATION_ERR = 9;
-FileError.QUOTA_EXCEEDED_ERR = 10;
-FileError.TYPE_MISMATCH_ERR = 11;
-FileError.PATH_EXISTS_ERR = 12;
-
-module.exports = FileError;
-
-});
-
-// file: lib\common\plugin\FileReader.js
-define("cordova/plugin/FileReader", function(require, exports, module) {
-
-var exec = require('cordova/exec'),
-    modulemapper = require('cordova/modulemapper'),
-    utils = require('cordova/utils'),
-    File = require('cordova/plugin/File'),
-    FileError = require('cordova/plugin/FileError'),
-    ProgressEvent = require('cordova/plugin/ProgressEvent'),
-    origFileReader = modulemapper.getOriginalSymbol(this, 'FileReader');
-
-/**
- * This class reads the mobile device file system.
- *
- * For Android:
- *      The root directory is the root of the file system.
- *      To read from the SD card, the file name is "sdcard/my_file.txt"
- * @constructor
- */
-var FileReader = function() {
-    this._readyState = 0;
-    this._error = null;
-    this._result = null;
-    this._fileName = '';
-    this._realReader = origFileReader ? new origFileReader() : {};
-};
-
-// States
-FileReader.EMPTY = 0;
-FileReader.LOADING = 1;
-FileReader.DONE = 2;
-
-utils.defineGetter(FileReader.prototype, 'readyState', function() {
-    return this._fileName ? this._readyState : this._realReader.readyState;
-});
-
-utils.defineGetter(FileReader.prototype, 'error', function() {
-    return this._fileName ? this._error: this._realReader.error;
-});
-
-utils.defineGetter(FileReader.prototype, 'result', function() {
-    return this._fileName ? this._result: this._realReader.result;
-});
-
-function defineEvent(eventName) {
-    utils.defineGetterSetter(FileReader.prototype, eventName, function() {
-        return this._realReader[eventName] || null;
-    }, function(value) {
-        this._realReader[eventName] = value;
-    });
-}
-defineEvent('onloadstart');    // When the read starts.
-defineEvent('onprogress');     // While reading (and decoding) file or fileBlob data, and reporting partial file data (progress.loaded/progress.total)
-defineEvent('onload');         // When the read has successfully completed.
-defineEvent('onerror');        // When the read has failed (see errors).
-defineEvent('onloadend');      // When the request has completed (either in success or failure).
-defineEvent('onabort');        // When the read has been aborted. For instance, by invoking the abort() method.
-
-function initRead(reader, file) {
-    // Already loading something
-    if (reader.readyState == FileReader.LOADING) {
-      throw new FileError(FileError.INVALID_STATE_ERR);
-    }
-
-    reader._result = null;
-    reader._error = null;
-    reader._readyState = FileReader.LOADING;
-
-    if (typeof file == 'string') {
-        // Deprecated in Cordova 2.4.
-        console.warning('Using a string argument with FileReader.readAs functions is deprecated.');
-        reader._fileName = file;
-    } else if (typeof file.fullPath == 'string') {
-        reader._fileName = file.fullPath;
-    } else {
-        reader._fileName = '';
-        return true;
-    }
-
-    reader.onloadstart && reader.onloadstart(new ProgressEvent("loadstart", {target:reader}));
-}
-
-/**
- * Abort reading file.
- */
-FileReader.prototype.abort = function() {
-    if (origFileReader && !this._fileName) {
-        return this._realReader.abort();
-    }
-    this._result = null;
-
-    if (this._readyState == FileReader.DONE || this._readyState == FileReader.EMPTY) {
-      return;
-    }
-
-    this._readyState = FileReader.DONE;
-
-    // If abort callback
-    if (typeof this.onabort === 'function') {
-        this.onabort(new ProgressEvent('abort', {target:this}));
-    }
-    // If load end callback
-    if (typeof this.onloadend === 'function') {
-        this.onloadend(new ProgressEvent('loadend', {target:this}));
-    }
-};
-
-/**
- * Read text file.
- *
- * @param file          {File} File object containing file properties
- * @param encoding      [Optional] (see http://www.iana.org/assignments/character-sets)
- */
-FileReader.prototype.readAsText = function(file, encoding) {
-    if (initRead(this, file)) {
-        return this._realReader.readAsText(file, encoding);
-    }
-
-    // Default encoding is UTF-8
-    var enc = encoding ? encoding : "UTF-8";
-    var me = this;
-    var execArgs = [this._fileName, enc, file.start, file.end];
-
-    // Read file
-    exec(
-        // Success callback
-        function(r) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // Save result
-            me._result = r;
-
-            // If onload callback
-            if (typeof me.onload === "function") {
-                me.onload(new ProgressEvent("load", {target:me}));
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        },
-        // Error callback
-        function(e) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            // null result
-            me._result = null;
-
-            // Save error
-            me._error = new FileError(e);
-
-            // If onerror callback
-            if (typeof me.onerror === "function") {
-                me.onerror(new ProgressEvent("error", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        }, "File", "readAsText", execArgs);
-};
-
-
-/**
- * Read file and return data as a base64 encoded data url.
- * A data url is of the form:
- *      data:[<mediatype>][;base64],<data>
- *
- * @param file          {File} File object containing file properties
- */
-FileReader.prototype.readAsDataURL = function(file) {
-    if (initRead(this, file)) {
-        return this._realReader.readAsDataURL(file);
-    }
-
-    var me = this;
-    var execArgs = [this._fileName, file.start, file.end];
-
-    // Read file
-    exec(
-        // Success callback
-        function(r) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            // Save result
-            me._result = r;
-
-            // If onload callback
-            if (typeof me.onload === "function") {
-                me.onload(new ProgressEvent("load", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        },
-        // Error callback
-        function(e) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            me._result = null;
-
-            // Save error
-            me._error = new FileError(e);
-
-            // If onerror callback
-            if (typeof me.onerror === "function") {
-                me.onerror(new ProgressEvent("error", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        }, "File", "readAsDataURL", execArgs);
-};
-
-/**
- * Read file and return data as a binary data.
- *
- * @param file          {File} File object containing file properties
- */
-FileReader.prototype.readAsBinaryString = function(file) {
-    if (initRead(this, file)) {
-        return this._realReader.readAsBinaryString(file);
-    }
-
-    var me = this;
-    var execArgs = [this._fileName, file.start, file.end];
-
-    // Read file
-    exec(
-        // Success callback
-        function(r) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            me._result = r;
-
-            // If onload callback
-            if (typeof me.onload === "function") {
-                me.onload(new ProgressEvent("load", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        },
-        // Error callback
-        function(e) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            me._result = null;
-
-            // Save error
-            me._error = new FileError(e);
-
-            // If onerror callback
-            if (typeof me.onerror === "function") {
-                me.onerror(new ProgressEvent("error", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        }, "File", "readAsBinaryString", execArgs);
-};
-
-/**
- * Read file and return data as a binary data.
- *
- * @param file          {File} File object containing file properties
- */
-FileReader.prototype.readAsArrayBuffer = function(file) {
-    if (initRead(this, file)) {
-        return this._realReader.readAsArrayBuffer(file);
-    }
-
-    var me = this;
-    var execArgs = [this._fileName, file.start, file.end];
-
-    // Read file
-    exec(
-        // Success callback
-        function(r) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            me._result = r;
-
-            // If onload callback
-            if (typeof me.onload === "function") {
-                me.onload(new ProgressEvent("load", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        },
-        // Error callback
-        function(e) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            me._result = null;
-
-            // Save error
-            me._error = new FileError(e);
-
-            // If onerror callback
-            if (typeof me.onerror === "function") {
-                me.onerror(new ProgressEvent("error", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        }, "File", "readAsArrayBuffer", execArgs);
-};
-
-module.exports = FileReader;
-
-});
-
-// file: lib\common\plugin\FileSystem.js
-define("cordova/plugin/FileSystem", function(require, exports, module) {
-
-var DirectoryEntry = require('cordova/plugin/DirectoryEntry');
-
-/**
- * An interface representing a file system
- *
- * @constructor
- * {DOMString} name the unique name of the file system (readonly)
- * {DirectoryEntry} root directory of the file system (readonly)
- */
-var FileSystem = function(name, root) {
-    this.name = name || null;
-    if (root) {
-        this.root = new DirectoryEntry(root.name, root.fullPath);
-    }
-};
-
-module.exports = FileSystem;
-
-});
-
-// file: lib\common\plugin\FileTransfer.js
-define("cordova/plugin/FileTransfer", function(require, exports, module) {
-
-var argscheck = require('cordova/argscheck'),
-    exec = require('cordova/exec'),
-    FileTransferError = require('cordova/plugin/FileTransferError'),
-    ProgressEvent = require('cordova/plugin/ProgressEvent');
-
-function newProgressEvent(result) {
-    var pe = new ProgressEvent();
-    pe.lengthComputable = result.lengthComputable;
-    pe.loaded = result.loaded;
-    pe.total = result.total;
-    return pe;
-}
-
-function getBasicAuthHeader(urlString) {
-    var header =  null;
-
-    if (window.btoa) {
-        // parse the url using the Location object
-        var url = document.createElement('a');
-        url.href = urlString;
-
-        var credentials = null;
-        var protocol = url.protocol + "//";
-        var origin = protocol + url.host;
-
-        // check whether there are the username:password credentials in the url
-        if (url.href.indexOf(origin) != 0) { // credentials found
-            var atIndex = url.href.indexOf("@");
-            credentials = url.href.substring(protocol.length, atIndex);
-        }
-
-        if (credentials) {
-            var authHeader = "Authorization";
-            var authHeaderValue = "Basic " + window.btoa(credentials);
-
-            header = {
-                name : authHeader,
-                value : authHeaderValue
-            };
-        }
-    }
-
-    return header;
-}
-
-var idCounter = 0;
-
-/**
- * FileTransfer uploads a file to a remote server.
- * @constructor
- */
-var FileTransfer = function() {
-    this._id = ++idCounter;
-    this.onprogress = null; // optional callback
-};
-
-/**
-* Given an absolute file path, uploads a file on the device to a remote server
-* using a multipart HTTP request.
-* @param filePath {String}           Full path of the file on the device
-* @param server {String}             URL of the server to receive the file
-* @param successCallback (Function}  Callback to be invoked when upload has completed
-* @param errorCallback {Function}    Callback to be invoked upon error
-* @param options {FileUploadOptions} Optional parameters such as file name and mimetype
-* @param trustAllHosts {Boolean} Optional trust all hosts (e.g. for self-signed certs), defaults to false
-*/
-FileTransfer.prototype.upload = function(filePath, server, successCallback, errorCallback, options, trustAllHosts) {
-    argscheck.checkArgs('ssFFO*', 'FileTransfer.upload', arguments);
-    // check for options
-    var fileKey = null;
-    var fileName = null;
-    var mimeType = null;
-    var params = null;
-    var chunkedMode = true;
-    var headers = null;
-
-    var basicAuthHeader = getBasicAuthHeader(server);
-    if (basicAuthHeader) {
-        if (!options) {
-            options = new FileUploadOptions();
-        }
-        if (!options.headers) {
-            options.headers = {};
-        }
-        options.headers[basicAuthHeader.name] = basicAuthHeader.value;
-    }
-
-    if (options) {
-        fileKey = options.fileKey;
-        fileName = options.fileName;
-        mimeType = options.mimeType;
-        headers = options.headers;
-        if (options.chunkedMode !== null || typeof options.chunkedMode != "undefined") {
-            chunkedMode = options.chunkedMode;
-        }
-        if (options.params) {
-            params = options.params;
-        }
-        else {
-            params = {};
-        }
-    }
-
-    var fail = errorCallback && function(e) {
-        var error = new FileTransferError(e.code, e.source, e.target, e.http_status, e.body);
-        errorCallback(error);
-    };
-
-    var self = this;
-    var win = function(result) {
-        if (typeof result.lengthComputable != "undefined") {
-            if (self.onprogress) {
-                self.onprogress(newProgressEvent(result));
-            }
-        } else {
-            successCallback && successCallback(result);
-        }
-    };
-    exec(win, fail, 'FileTransfer', 'upload', [filePath, server, fileKey, fileName, mimeType, params, trustAllHosts, chunkedMode, headers, this._id]);
-};
-
-/**
- * Downloads a file form a given URL and saves it to the specified directory.
- * @param source {String}          URL of the server to receive the file
- * @param target {String}         Full path of the file on the device
- * @param successCallback (Function}  Callback to be invoked when upload has completed
- * @param errorCallback {Function}    Callback to be invoked upon error
- * @param trustAllHosts {Boolean} Optional trust all hosts (e.g. for self-signed certs), defaults to false
- * @param options {FileDownloadOptions} Optional parameters such as headers
- */
-FileTransfer.prototype.download = function(source, target, successCallback, errorCallback, trustAllHosts, options) {
-    argscheck.checkArgs('ssFF*', 'FileTransfer.download', arguments);
-    var self = this;
-
-    var basicAuthHeader = getBasicAuthHeader(source);
-    if (basicAuthHeader) {
-        if (!options) {
-            options = {};
-        }
-        if (!options.headers) {
-            options.headers = {};
-        }
-        options.headers[basicAuthHead

<TRUNCATED>

[12/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/src/blackberry10/native/public/json_writer.cpp
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/src/blackberry10/native/public/json_writer.cpp b/spec/plugins/cordova.echo/src/blackberry10/native/public/json_writer.cpp
deleted file mode 100644
index a522ef6..0000000
--- a/spec/plugins/cordova.echo/src/blackberry10/native/public/json_writer.cpp
+++ /dev/null
@@ -1,829 +0,0 @@
-#include <json/writer.h>
-#include <utility>
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
-#include <iostream>
-#include <sstream>
-#include <iomanip>
-
-#if _MSC_VER >= 1400 // VC++ 8.0
-#pragma warning( disable : 4996 )   // disable warning about strdup being deprecated.
-#endif
-
-namespace Json {
-
-static bool isControlCharacter(char ch)
-{
-   return ch > 0 && ch <= 0x1F;
-}
-
-static bool containsControlCharacter( const char* str )
-{
-   while ( *str ) 
-   {
-      if ( isControlCharacter( *(str++) ) )
-         return true;
-   }
-   return false;
-}
-static void uintToString( unsigned int value, 
-                          char *&current )
-{
-   *--current = 0;
-   do
-   {
-      *--current = (value % 10) + '0';
-      value /= 10;
-   }
-   while ( value != 0 );
-}
-
-std::string valueToString( Int value )
-{
-   char buffer[32];
-   char *current = buffer + sizeof(buffer);
-   bool isNegative = value < 0;
-   if ( isNegative )
-      value = -value;
-   uintToString( UInt(value), current );
-   if ( isNegative )
-      *--current = '-';
-   assert( current >= buffer );
-   return current;
-}
-
-
-std::string valueToString( UInt value )
-{
-   char buffer[32];
-   char *current = buffer + sizeof(buffer);
-   uintToString( value, current );
-   assert( current >= buffer );
-   return current;
-}
-
-std::string valueToString( double value )
-{
-   char buffer[32];
-#if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__) // Use secure version with visual studio 2005 to avoid warning. 
-   sprintf_s(buffer, sizeof(buffer), "%#.16g", value); 
-#else	
-   sprintf(buffer, "%#.16g", value); 
-#endif
-   char* ch = buffer + strlen(buffer) - 1;
-   if (*ch != '0') return buffer; // nothing to truncate, so save time
-   while(ch > buffer && *ch == '0'){
-     --ch;
-   }
-   char* last_nonzero = ch;
-   while(ch >= buffer){
-     switch(*ch){
-     case '0':
-     case '1':
-     case '2':
-     case '3':
-     case '4':
-     case '5':
-     case '6':
-     case '7':
-     case '8':
-     case '9':
-       --ch;
-       continue;
-     case '.':
-       // Truncate zeroes to save bytes in output, but keep one.
-       *(last_nonzero+2) = '\0';
-       return buffer;
-     default:
-       return buffer;
-     }
-   }
-   return buffer;
-}
-
-
-std::string valueToString( bool value )
-{
-   return value ? "true" : "false";
-}
-
-std::string valueToQuotedString( const char *value )
-{
-   // Not sure how to handle unicode...
-   if (strpbrk(value, "\"\\\b\f\n\r\t") == NULL && !containsControlCharacter( value ))
-      return std::string("\"") + value + "\"";
-   // We have to walk value and escape any special characters.
-   // Appending to std::string is not efficient, but this should be rare.
-   // (Note: forward slashes are *not* rare, but I am not escaping them.)
-   unsigned maxsize = strlen(value)*2 + 3; // allescaped+quotes+NULL
-   std::string result;
-   result.reserve(maxsize); // to avoid lots of mallocs
-   result += "\"";
-   for (const char* c=value; *c != 0; ++c)
-   {
-      switch(*c)
-      {
-         case '\"':
-            result += "\\\"";
-            break;
-         case '\\':
-            result += "\\\\";
-            break;
-         case '\b':
-            result += "\\b";
-            break;
-         case '\f':
-            result += "\\f";
-            break;
-         case '\n':
-            result += "\\n";
-            break;
-         case '\r':
-            result += "\\r";
-            break;
-         case '\t':
-            result += "\\t";
-            break;
-         //case '/':
-            // Even though \/ is considered a legal escape in JSON, a bare
-            // slash is also legal, so I see no reason to escape it.
-            // (I hope I am not misunderstanding something.
-            // blep notes: actually escaping \/ may be useful in javascript to avoid </ 
-            // sequence.
-            // Should add a flag to allow this compatibility mode and prevent this 
-            // sequence from occurring.
-         default:
-            if ( isControlCharacter( *c ) )
-            {
-               std::ostringstream oss;
-               oss << "\\u" << std::hex << std::uppercase << std::setfill('0') << std::setw(4) << static_cast<int>(*c);
-               result += oss.str();
-            }
-            else
-            {
-               result += *c;
-            }
-            break;
-      }
-   }
-   result += "\"";
-   return result;
-}
-
-// Class Writer
-// //////////////////////////////////////////////////////////////////
-Writer::~Writer()
-{
-}
-
-
-// Class FastWriter
-// //////////////////////////////////////////////////////////////////
-
-FastWriter::FastWriter()
-   : yamlCompatibilityEnabled_( false )
-{
-}
-
-
-void 
-FastWriter::enableYAMLCompatibility()
-{
-   yamlCompatibilityEnabled_ = true;
-}
-
-
-std::string 
-FastWriter::write( const Value &root )
-{
-   document_ = "";
-   writeValue( root );
-   document_ += "\n";
-   return document_;
-}
-
-
-void 
-FastWriter::writeValue( const Value &value )
-{
-   switch ( value.type() )
-   {
-   case nullValue:
-      document_ += "null";
-      break;
-   case intValue:
-      document_ += valueToString( value.asInt() );
-      break;
-   case uintValue:
-      document_ += valueToString( value.asUInt() );
-      break;
-   case realValue:
-      document_ += valueToString( value.asDouble() );
-      break;
-   case stringValue:
-      document_ += valueToQuotedString( value.asCString() );
-      break;
-   case booleanValue:
-      document_ += valueToString( value.asBool() );
-      break;
-   case arrayValue:
-      {
-         document_ += "[";
-         int size = value.size();
-         for ( int index =0; index < size; ++index )
-         {
-            if ( index > 0 )
-               document_ += ",";
-            writeValue( value[index] );
-         }
-         document_ += "]";
-      }
-      break;
-   case objectValue:
-      {
-         Value::Members members( value.getMemberNames() );
-         document_ += "{";
-         for ( Value::Members::iterator it = members.begin(); 
-               it != members.end(); 
-               ++it )
-         {
-            const std::string &name = *it;
-            if ( it != members.begin() )
-               document_ += ",";
-            document_ += valueToQuotedString( name.c_str() );
-            document_ += yamlCompatibilityEnabled_ ? ": " 
-                                                  : ":";
-            writeValue( value[name] );
-         }
-         document_ += "}";
-      }
-      break;
-   }
-}
-
-
-// Class StyledWriter
-// //////////////////////////////////////////////////////////////////
-
-StyledWriter::StyledWriter()
-   : rightMargin_( 74 )
-   , indentSize_( 3 )
-{
-}
-
-
-std::string 
-StyledWriter::write( const Value &root )
-{
-   document_ = "";
-   addChildValues_ = false;
-   indentString_ = "";
-   writeCommentBeforeValue( root );
-   writeValue( root );
-   writeCommentAfterValueOnSameLine( root );
-   document_ += "\n";
-   return document_;
-}
-
-
-void 
-StyledWriter::writeValue( const Value &value )
-{
-   switch ( value.type() )
-   {
-   case nullValue:
-      pushValue( "null" );
-      break;
-   case intValue:
-      pushValue( valueToString( value.asInt() ) );
-      break;
-   case uintValue:
-      pushValue( valueToString( value.asUInt() ) );
-      break;
-   case realValue:
-      pushValue( valueToString( value.asDouble() ) );
-      break;
-   case stringValue:
-      pushValue( valueToQuotedString( value.asCString() ) );
-      break;
-   case booleanValue:
-      pushValue( valueToString( value.asBool() ) );
-      break;
-   case arrayValue:
-      writeArrayValue( value);
-      break;
-   case objectValue:
-      {
-         Value::Members members( value.getMemberNames() );
-         if ( members.empty() )
-            pushValue( "{}" );
-         else
-         {
-            writeWithIndent( "{" );
-            indent();
-            Value::Members::iterator it = members.begin();
-            while ( true )
-            {
-               const std::string &name = *it;
-               const Value &childValue = value[name];
-               writeCommentBeforeValue( childValue );
-               writeWithIndent( valueToQuotedString( name.c_str() ) );
-               document_ += " : ";
-               writeValue( childValue );
-               if ( ++it == members.end() )
-               {
-                  writeCommentAfterValueOnSameLine( childValue );
-                  break;
-               }
-               document_ += ",";
-               writeCommentAfterValueOnSameLine( childValue );
-            }
-            unindent();
-            writeWithIndent( "}" );
-         }
-      }
-      break;
-   }
-}
-
-
-void 
-StyledWriter::writeArrayValue( const Value &value )
-{
-   unsigned size = value.size();
-   if ( size == 0 )
-      pushValue( "[]" );
-   else
-   {
-      bool isArrayMultiLine = isMultineArray( value );
-      if ( isArrayMultiLine )
-      {
-         writeWithIndent( "[" );
-         indent();
-         bool hasChildValue = !childValues_.empty();
-         unsigned index =0;
-         while ( true )
-         {
-            const Value &childValue = value[index];
-            writeCommentBeforeValue( childValue );
-            if ( hasChildValue )
-               writeWithIndent( childValues_[index] );
-            else
-            {
-               writeIndent();
-               writeValue( childValue );
-            }
-            if ( ++index == size )
-            {
-               writeCommentAfterValueOnSameLine( childValue );
-               break;
-            }
-            document_ += ",";
-            writeCommentAfterValueOnSameLine( childValue );
-         }
-         unindent();
-         writeWithIndent( "]" );
-      }
-      else // output on a single line
-      {
-         assert( childValues_.size() == size );
-         document_ += "[ ";
-         for ( unsigned index =0; index < size; ++index )
-         {
-            if ( index > 0 )
-               document_ += ", ";
-            document_ += childValues_[index];
-         }
-         document_ += " ]";
-      }
-   }
-}
-
-
-bool 
-StyledWriter::isMultineArray( const Value &value )
-{
-   int size = value.size();
-   bool isMultiLine = size*3 >= rightMargin_ ;
-   childValues_.clear();
-   for ( int index =0; index < size  &&  !isMultiLine; ++index )
-   {
-      const Value &childValue = value[index];
-      isMultiLine = isMultiLine  ||
-                     ( (childValue.isArray()  ||  childValue.isObject())  &&  
-                        childValue.size() > 0 );
-   }
-   if ( !isMultiLine ) // check if line length > max line length
-   {
-      childValues_.reserve( size );
-      addChildValues_ = true;
-      int lineLength = 4 + (size-1)*2; // '[ ' + ', '*n + ' ]'
-      for ( int index =0; index < size  &&  !isMultiLine; ++index )
-      {
-         writeValue( value[index] );
-         lineLength += int( childValues_[index].length() );
-         isMultiLine = isMultiLine  &&  hasCommentForValue( value[index] );
-      }
-      addChildValues_ = false;
-      isMultiLine = isMultiLine  ||  lineLength >= rightMargin_;
-   }
-   return isMultiLine;
-}
-
-
-void 
-StyledWriter::pushValue( const std::string &value )
-{
-   if ( addChildValues_ )
-      childValues_.push_back( value );
-   else
-      document_ += value;
-}
-
-
-void 
-StyledWriter::writeIndent()
-{
-   if ( !document_.empty() )
-   {
-      char last = document_[document_.length()-1];
-      if ( last == ' ' )     // already indented
-         return;
-      if ( last != '\n' )    // Comments may add new-line
-         document_ += '\n';
-   }
-   document_ += indentString_;
-}
-
-
-void 
-StyledWriter::writeWithIndent( const std::string &value )
-{
-   writeIndent();
-   document_ += value;
-}
-
-
-void 
-StyledWriter::indent()
-{
-   indentString_ += std::string( indentSize_, ' ' );
-}
-
-
-void 
-StyledWriter::unindent()
-{
-   assert( int(indentString_.size()) >= indentSize_ );
-   indentString_.resize( indentString_.size() - indentSize_ );
-}
-
-
-void 
-StyledWriter::writeCommentBeforeValue( const Value &root )
-{
-   if ( !root.hasComment( commentBefore ) )
-      return;
-   document_ += normalizeEOL( root.getComment( commentBefore ) );
-   document_ += "\n";
-}
-
-
-void 
-StyledWriter::writeCommentAfterValueOnSameLine( const Value &root )
-{
-   if ( root.hasComment( commentAfterOnSameLine ) )
-      document_ += " " + normalizeEOL( root.getComment( commentAfterOnSameLine ) );
-
-   if ( root.hasComment( commentAfter ) )
-   {
-      document_ += "\n";
-      document_ += normalizeEOL( root.getComment( commentAfter ) );
-      document_ += "\n";
-   }
-}
-
-
-bool 
-StyledWriter::hasCommentForValue( const Value &value )
-{
-   return value.hasComment( commentBefore )
-          ||  value.hasComment( commentAfterOnSameLine )
-          ||  value.hasComment( commentAfter );
-}
-
-
-std::string 
-StyledWriter::normalizeEOL( const std::string &text )
-{
-   std::string normalized;
-   normalized.reserve( text.length() );
-   const char *begin = text.c_str();
-   const char *end = begin + text.length();
-   const char *current = begin;
-   while ( current != end )
-   {
-      char c = *current++;
-      if ( c == '\r' ) // mac or dos EOL
-      {
-         if ( *current == '\n' ) // convert dos EOL
-            ++current;
-         normalized += '\n';
-      }
-      else // handle unix EOL & other char
-         normalized += c;
-   }
-   return normalized;
-}
-
-
-// Class StyledStreamWriter
-// //////////////////////////////////////////////////////////////////
-
-StyledStreamWriter::StyledStreamWriter( std::string indentation )
-   : document_(NULL)
-   , rightMargin_( 74 )
-   , indentation_( indentation )
-{
-}
-
-
-void
-StyledStreamWriter::write( std::ostream &out, const Value &root )
-{
-   document_ = &out;
-   addChildValues_ = false;
-   indentString_ = "";
-   writeCommentBeforeValue( root );
-   writeValue( root );
-   writeCommentAfterValueOnSameLine( root );
-   *document_ << "\n";
-   document_ = NULL; // Forget the stream, for safety.
-}
-
-
-void 
-StyledStreamWriter::writeValue( const Value &value )
-{
-   switch ( value.type() )
-   {
-   case nullValue:
-      pushValue( "null" );
-      break;
-   case intValue:
-      pushValue( valueToString( value.asInt() ) );
-      break;
-   case uintValue:
-      pushValue( valueToString( value.asUInt() ) );
-      break;
-   case realValue:
-      pushValue( valueToString( value.asDouble() ) );
-      break;
-   case stringValue:
-      pushValue( valueToQuotedString( value.asCString() ) );
-      break;
-   case booleanValue:
-      pushValue( valueToString( value.asBool() ) );
-      break;
-   case arrayValue:
-      writeArrayValue( value);
-      break;
-   case objectValue:
-      {
-         Value::Members members( value.getMemberNames() );
-         if ( members.empty() )
-            pushValue( "{}" );
-         else
-         {
-            writeWithIndent( "{" );
-            indent();
-            Value::Members::iterator it = members.begin();
-            while ( true )
-            {
-               const std::string &name = *it;
-               const Value &childValue = value[name];
-               writeCommentBeforeValue( childValue );
-               writeWithIndent( valueToQuotedString( name.c_str() ) );
-               *document_ << " : ";
-               writeValue( childValue );
-               if ( ++it == members.end() )
-               {
-                  writeCommentAfterValueOnSameLine( childValue );
-                  break;
-               }
-               *document_ << ",";
-               writeCommentAfterValueOnSameLine( childValue );
-            }
-            unindent();
-            writeWithIndent( "}" );
-         }
-      }
-      break;
-   }
-}
-
-
-void 
-StyledStreamWriter::writeArrayValue( const Value &value )
-{
-   unsigned size = value.size();
-   if ( size == 0 )
-      pushValue( "[]" );
-   else
-   {
-      bool isArrayMultiLine = isMultineArray( value );
-      if ( isArrayMultiLine )
-      {
-         writeWithIndent( "[" );
-         indent();
-         bool hasChildValue = !childValues_.empty();
-         unsigned index =0;
-         while ( true )
-         {
-            const Value &childValue = value[index];
-            writeCommentBeforeValue( childValue );
-            if ( hasChildValue )
-               writeWithIndent( childValues_[index] );
-            else
-            {
-	       writeIndent();
-               writeValue( childValue );
-            }
-            if ( ++index == size )
-            {
-               writeCommentAfterValueOnSameLine( childValue );
-               break;
-            }
-            *document_ << ",";
-            writeCommentAfterValueOnSameLine( childValue );
-         }
-         unindent();
-         writeWithIndent( "]" );
-      }
-      else // output on a single line
-      {
-         assert( childValues_.size() == size );
-         *document_ << "[ ";
-         for ( unsigned index =0; index < size; ++index )
-         {
-            if ( index > 0 )
-               *document_ << ", ";
-            *document_ << childValues_[index];
-         }
-         *document_ << " ]";
-      }
-   }
-}
-
-
-bool 
-StyledStreamWriter::isMultineArray( const Value &value )
-{
-   int size = value.size();
-   bool isMultiLine = size*3 >= rightMargin_ ;
-   childValues_.clear();
-   for ( int index =0; index < size  &&  !isMultiLine; ++index )
-   {
-      const Value &childValue = value[index];
-      isMultiLine = isMultiLine  ||
-                     ( (childValue.isArray()  ||  childValue.isObject())  &&  
-                        childValue.size() > 0 );
-   }
-   if ( !isMultiLine ) // check if line length > max line length
-   {
-      childValues_.reserve( size );
-      addChildValues_ = true;
-      int lineLength = 4 + (size-1)*2; // '[ ' + ', '*n + ' ]'
-      for ( int index =0; index < size  &&  !isMultiLine; ++index )
-      {
-         writeValue( value[index] );
-         lineLength += int( childValues_[index].length() );
-         isMultiLine = isMultiLine  &&  hasCommentForValue( value[index] );
-      }
-      addChildValues_ = false;
-      isMultiLine = isMultiLine  ||  lineLength >= rightMargin_;
-   }
-   return isMultiLine;
-}
-
-
-void 
-StyledStreamWriter::pushValue( const std::string &value )
-{
-   if ( addChildValues_ )
-      childValues_.push_back( value );
-   else
-      *document_ << value;
-}
-
-
-void 
-StyledStreamWriter::writeIndent()
-{
-  /*
-    Some comments in this method would have been nice. ;-)
-
-   if ( !document_.empty() )
-   {
-      char last = document_[document_.length()-1];
-      if ( last == ' ' )     // already indented
-         return;
-      if ( last != '\n' )    // Comments may add new-line
-         *document_ << '\n';
-   }
-  */
-   *document_ << '\n' << indentString_;
-}
-
-
-void 
-StyledStreamWriter::writeWithIndent( const std::string &value )
-{
-   writeIndent();
-   *document_ << value;
-}
-
-
-void 
-StyledStreamWriter::indent()
-{
-   indentString_ += indentation_;
-}
-
-
-void 
-StyledStreamWriter::unindent()
-{
-   assert( indentString_.size() >= indentation_.size() );
-   indentString_.resize( indentString_.size() - indentation_.size() );
-}
-
-
-void 
-StyledStreamWriter::writeCommentBeforeValue( const Value &root )
-{
-   if ( !root.hasComment( commentBefore ) )
-      return;
-   *document_ << normalizeEOL( root.getComment( commentBefore ) );
-   *document_ << "\n";
-}
-
-
-void 
-StyledStreamWriter::writeCommentAfterValueOnSameLine( const Value &root )
-{
-   if ( root.hasComment( commentAfterOnSameLine ) )
-      *document_ << " " + normalizeEOL( root.getComment( commentAfterOnSameLine ) );
-
-   if ( root.hasComment( commentAfter ) )
-   {
-      *document_ << "\n";
-      *document_ << normalizeEOL( root.getComment( commentAfter ) );
-      *document_ << "\n";
-   }
-}
-
-
-bool 
-StyledStreamWriter::hasCommentForValue( const Value &value )
-{
-   return value.hasComment( commentBefore )
-          ||  value.hasComment( commentAfterOnSameLine )
-          ||  value.hasComment( commentAfter );
-}
-
-
-std::string 
-StyledStreamWriter::normalizeEOL( const std::string &text )
-{
-   std::string normalized;
-   normalized.reserve( text.length() );
-   const char *begin = text.c_str();
-   const char *end = begin + text.length();
-   const char *current = begin;
-   while ( current != end )
-   {
-      char c = *current++;
-      if ( c == '\r' ) // mac or dos EOL
-      {
-         if ( *current == '\n' ) // convert dos EOL
-            ++current;
-         normalized += '\n';
-      }
-      else // handle unix EOL & other char
-         normalized += c;
-   }
-   return normalized;
-}
-
-
-std::ostream& operator<<( std::ostream &sout, const Value &root )
-{
-   Json::StyledStreamWriter writer;
-   writer.write(sout, root);
-   return sout;
-}
-
-
-} // namespace Json

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/src/blackberry10/native/public/plugin.cpp
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/src/blackberry10/native/public/plugin.cpp b/spec/plugins/cordova.echo/src/blackberry10/native/public/plugin.cpp
deleted file mode 100644
index 387fcea..0000000
--- a/spec/plugins/cordova.echo/src/blackberry10/native/public/plugin.cpp
+++ /dev/null
@@ -1,320 +0,0 @@
-#include "plugin.h"
-#include "tokenizer.h"
-
-#ifdef _WINDOWS
-#include <windows.h>
-BOOL APIENTRY DllMain( HANDLE hModule,
-                       DWORD ul_reason_for_call,
-                       LPVOID lpReserved )
-{
-    return TRUE;
-}
-#else
-#include <errno.h>
-#include <string.h>
-
-extern int errno;
-#endif
-
-SendPluginEv SendPluginEvent;
-
-string g_GetSysErrMsg( void )
-{
-    string strError = "Unknown";
-    // Problem loading
-#ifdef _WINDOWS
-    int nErrorCode = GetLastError();
-    LPTSTR s;
-    if ( ::FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
-    NULL, nErrorCode, 0, ( LPTSTR ) &s, 0, NULL ) )
-    {
-        strError = s;
-    }
-    else
-    {
-        char szBuf[ 20 ];
-        _snprintf_s( szBuf, _countof(szBuf), 19, "%d", nErrorCode );
-        strError = szBuf;
-    }
-#else
-    char szError[80];
-    if ( strerror_r( errno, szError, sizeof(szError)  ) )
-    {
-        strError = "no description found";
-    }
-    else
-    {
-        strError = szError;
-    }
-#endif
-    return strError;
-}
-
-void g_sleep( unsigned int mseconds )
-{
-#ifdef _WINDOWS
-    Sleep( mseconds );
-#else
-    usleep( mseconds * 1000 );
-#endif
-}
-
-string& g_trim( string& str )
-{
-    // Whitespace characters
-    char whspc[] = " \t\r\n\v\f";
-
-    // Whack off first part
-    size_t pos = str.find_first_not_of( whspc );
-
-    if ( pos != string::npos )
-        str.replace( 0, pos, "" );
-
-    // Whack off trailing stuff
-    pos = str.find_last_not_of( whspc );
-
-    if ( pos != string::npos )
-        str.replace( pos + 1, str.length() - pos, "" );
-
-    return str;
-}
-
-void g_tokenize( const string& str, const string& delimiters, vector<string>& tokens )
-{
-    tokenize( str, tokens, delimiters );
-}
-
-char* SetEventFunc( SendPluginEv funcPtr )
-{
-    static char * szObjList = onGetObjList();
-    SendPluginEvent = funcPtr;
-    return szObjList;
-}
-
-
-const int nMAXSIZE = 512;
-char* g_pszRetVal = NULL;
-
-//-----------------------------------------------------------
-// Map from an object Id to an object instance
-//-----------------------------------------------------------
-typedef std::map<string, JSExt*> StringToJExt_T;
-
-//-----------------------------------------------------------
-// Map from a browser context to an id mapping
-//-----------------------------------------------------------
-typedef std::map<void*, StringToJExt_T*> VoidToMap_T;
-
-VoidToMap_T g_context2Map;
-
-class GlobalSharedModule
-{
-
-public:
-    GlobalSharedModule( void )
-    {
-        g_pszRetVal = new char[ nMAXSIZE ];
-    }
-
-    ~GlobalSharedModule()
-    {
-        delete [] g_pszRetVal;
-
-        VoidToMap_T::iterator posMaps;
-
-        for ( posMaps = g_context2Map.begin(); posMaps != g_context2Map.end(); ++posMaps )
-        {
-            StringToJExt_T& id2Obj = *posMaps->second;
-            StringToJExt_T::iterator posMap;
-
-            for ( posMap = id2Obj.begin(); posMap != id2Obj.end(); ++posMap )
-            {
-                JSExt* pJSExt = posMap->second;
-
-                if ( pJSExt->CanDelete() )
-                {
-                    delete pJSExt;
-                }
-            }
-
-            id2Obj.erase( id2Obj.begin(), id2Obj.end() );
-        }
-
-        g_context2Map.erase( g_context2Map.begin(), g_context2Map.end() );
-    }
-};
-
-GlobalSharedModule g_sharedModule;
-
-char* g_str2global( const string& strRetVal )
-{
-    int nLen = strRetVal.size();
-
-    if ( nLen >= nMAXSIZE )
-    {
-        delete [] g_pszRetVal;
-        g_pszRetVal = new char[ nLen + 1 ];
-    }
-
-    else
-    {
-        // To minimize the number of memory reallocations, the assumption
-        // is that in most times this will be the case
-        delete [] g_pszRetVal;
-        g_pszRetVal = new char[ nMAXSIZE ];
-    }
-
-    strcpy( g_pszRetVal, strRetVal.c_str() );
-    return g_pszRetVal;
-}
-
-bool g_unregisterObject( const string& strObjId, void* pContext )
-{
-    // Called by the plugin extension implementation
-    // if the extension handles the deletion of its object
-
-    StringToJExt_T * pID2Obj = NULL;
-
-    VoidToMap_T::iterator iter = g_context2Map.find( pContext );
-
-    if ( iter != g_context2Map.end() )
-    {
-        pID2Obj = iter->second;
-    }
-    else
-    {
-        return false;
-    }
-
-    StringToJExt_T& mapID2Obj = *pID2Obj;
-
-    StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
-
-    if ( r == mapID2Obj.end() )
-    {
-        return false;
-    }
-
-    mapID2Obj.erase( strObjId );
-    return true;
-}
-
-char* InvokeFunction( const char* szCommand, void* pContext )
-{
-    StringToJExt_T * pID2Obj = NULL;
-
-    VoidToMap_T::iterator iter = g_context2Map.find( pContext );
-
-    if ( iter != g_context2Map.end() )
-    {
-        pID2Obj = iter->second;
-    }
-    else
-    {
-        pID2Obj = new StringToJExt_T;
-        g_context2Map[ pContext ] = pID2Obj;
-    }
-
-    StringToJExt_T& mapID2Obj = *pID2Obj;
-
-    string strFullCommand = szCommand;
-    vector<string> arParams;
-    g_tokenize( strFullCommand, " ", arParams );
-    string strCommand = arParams[ 0 ];
-    string strRetVal = szERROR;
-
-    if ( strCommand == szCREATE )
-    {
-        string strClassName = arParams[ 1 ];
-        string strObjId = arParams[ 2 ];
-
-        StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
-
-        if ( r != mapID2Obj.end() )
-        {
-            strRetVal += strObjId;
-            strRetVal += " :Object already exists.";
-            return g_str2global( strRetVal );
-        }
-
-        JSExt* pJSExt = onCreateObject( strClassName, strObjId );
-
-        if ( pJSExt == NULL )
-        {
-            strRetVal += strObjId;
-            strRetVal += " :Unknown object type ";
-            strRetVal += strClassName;
-            return g_str2global( strRetVal );
-        }
-
-        pJSExt->m_pContext = pContext;
-        mapID2Obj[ strObjId ] = pJSExt;
-
-        strRetVal = szOK;
-        strRetVal += strObjId;
-        return g_str2global( strRetVal );
-    }
-    else
-    if ( strCommand == szINVOKE )
-    {
-        string strObjId = arParams[ 1 ];
-        string strMethod = arParams[ 2 ];
-
-        StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
-
-        if ( r == mapID2Obj.end() )
-        {
-            strRetVal += strObjId;
-            strRetVal += " :No object found for id.";
-            return g_str2global( strRetVal );
-        }
-
-        JSExt* pJSExt = r->second;
-
-        size_t nLoc = strFullCommand.find( strObjId );
-
-        if ( nLoc == string::npos )
-        {
-            strRetVal += strObjId;
-            strRetVal += " :Internal InvokeMethod error.";
-            return g_str2global( strRetVal );
-        }
-
-        if ( strMethod == szDISPOSE )
-        {
-            StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
-
-            if ( r == mapID2Obj.end() )
-            {
-                strRetVal = szERROR;
-                strRetVal += strObjId;
-                return g_str2global( strRetVal );
-            }
-
-            JSExt * pJSExt = mapID2Obj[ strObjId ];
-
-            if ( pJSExt->CanDelete() )
-            {
-                delete pJSExt;
-            }
-
-            mapID2Obj.erase( strObjId );
-            strRetVal = szOK;
-            strRetVal += strObjId;
-            return g_str2global( strRetVal );
-        }
-
-        size_t nSuffixLoc = nLoc + strObjId.size();
-        string strInvoke = strFullCommand.substr( nSuffixLoc );
-        strInvoke = g_trim( strInvoke );
-        strRetVal = pJSExt->InvokeMethod( strInvoke );
-        return g_str2global( strRetVal );
-    }
-
-    strRetVal += " :Unknown command ";
-    strRetVal += strCommand;
-    return g_str2global( strRetVal );
-}
-
-//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/src/blackberry10/native/public/plugin.h
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/src/blackberry10/native/public/plugin.h b/spec/plugins/cordova.echo/src/blackberry10/native/public/plugin.h
deleted file mode 100644
index 4ef7116..0000000
--- a/spec/plugins/cordova.echo/src/blackberry10/native/public/plugin.h
+++ /dev/null
@@ -1,70 +0,0 @@
-#ifndef _PLUGIN_H
-#define _PLUGIN_H
-
-#include <map>
-#include <string>
-#include <vector>
-#include <unistd.h>
-//#include "tokenizer.h"
-
-using namespace std;
-
-//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-//%% Functions exported by this DLL
-//%% Should always be only SetEventFunc and InvokeFunction
-//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-// g++ requires extern "C" otherwise the names of SetEventFunc and InvokeFunction
-// are mangled C++ style. MS Visual Studio doesn't seem to care though.
-extern "C"
-{
-    typedef void (*SendPluginEv)( const char* szEvent, void* pContext );
-    char* SetEventFunc(SendPluginEv funcPtr);
-    char* InvokeFunction( const char* szCommand, void* pContext );
-}
-
-// JNEXT Framework function of the form:
-// typedef void (*SendPluginEv)( const char* szEvent );
-// used to notify JavaScript of an asynchronous event
-extern SendPluginEv SendPluginEvent;
-
-/////////////////////////////////////////////////////////////////////////
-// Constants and methods common to all JNEXT extensions types
-/////////////////////////////////////////////////////////////////////////
-#define szERROR         "Error "
-#define szOK            "Ok "
-
-#define szDISPOSE       "Dispose"
-#define szINVOKE        "InvokeMethod"
-#define szCREATE        "CreateObj"
-
-/////////////////////////////////////////////////////////////////////////
-// Utility functions
-/////////////////////////////////////////////////////////////////////////
-string& g_trim( string& str );
-void g_tokenize(const string& str,const string& delimiters, vector<string>& tokens);
-char* g_str2static( const string& strRetVal );
-void g_sleep( unsigned int mseconds );
-bool g_unregisterObject( const string& strObjId, void* pContext );
-
-
-/////////////////////////////////////////////////////////////////////////
-// Abstract extension object
-/////////////////////////////////////////////////////////////////////////
-class JSExt
-{
-public:
-    virtual ~JSExt() {};
-    virtual string InvokeMethod( const string& strCommand ) = 0;
-    virtual bool CanDelete( void ) = 0;
-    virtual void TryDelete( void ) {}
-public:
-    void* m_pContext;
-};
-
-/////////////////////////////////////////////////////////////////////////
-// Callback functions to be implemented by the plugin implementation
-/////////////////////////////////////////////////////////////////////////
-extern char* onGetObjList( void );
-extern JSExt* onCreateObject( const string& strClassName, const string& strObjId );
-
-#endif

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/src/blackberry10/native/public/tokenizer.cpp
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/src/blackberry10/native/public/tokenizer.cpp b/spec/plugins/cordova.echo/src/blackberry10/native/public/tokenizer.cpp
deleted file mode 100644
index 4a39573..0000000
--- a/spec/plugins/cordova.echo/src/blackberry10/native/public/tokenizer.cpp
+++ /dev/null
@@ -1,222 +0,0 @@
-/************************************************************************
-The zlib/libpng License
-
-Copyright (c) 2006 Joerg Wiedenmann
-
-This software is provided 'as-is', without any express or implied warranty.
-In no event will the authors be held liable for any damages arising from
-the use of this software.
-
-Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it
-freely, subject to the following restrictions:
-
-1. The origin of this software must not be misrepresented;
-you must not claim that you wrote the original software.
-If you use this software in a product, an acknowledgment
-in the product documentation would be appreciated but is
-not required.
-
-2. Altered source versions must be plainly marked as such,
-and must not be misrepresented as being the original software.
-
-3. This notice may not be removed or altered from any source distribution.
-
-***********************************************************************/
-
-/********************************************************************
-	created:	2006-01-28
-	filename: 	tokenizer.cpp
-	author:		J�rg Wiedenmann
-	
-	purpose:	A tokenizer function which provides a very
-				customizable way of breaking up strings.
-
-	history:	2006-01-28, Original version
-				2006-03-04, Fixed a small parsing bug, thanks Elias.
-*********************************************************************/
-
-#include "tokenizer.h"
-
-using namespace std;
-
-void tokenize ( const string& str, vector<string>& result,
-			   const string& delimiters, const string& delimiters_preserve,
-			   const string& quote, const string& esc )
-{
-	// clear the vector
-	if ( false == result.empty() )
-	{
-		result.clear();
-	}
-
-	string::size_type pos = 0; // the current position (char) in the string
-	char ch = 0; // buffer for the current character
-	char delimiter = 0;	// the buffer for the delimiter char which
-							// will be added to the tokens if the delimiter
-							// is preserved
-	char current_quote = 0; // the char of the current open quote
-	bool quoted = false; // indicator if there is an open quote
-	string token;  // string buffer for the token
-	bool token_complete = false; // indicates if the current token is
-								 // read to be added to the result vector
-	string::size_type len = str.length();  // length of the input-string
-
-	// for every char in the input-string
-	while ( len > pos )
-	{
-		// get the character of the string and reset the delimiter buffer
-		ch = str.at(pos);
-		delimiter = 0;
-
-		// assume ch isn't a delimiter
-		bool add_char = true;
-
-		// check ...
-
-		// ... if the delimiter is an escaped character
-		bool escaped = false; // indicates if the next char is protected
-		if ( false == esc.empty() ) // check if esc-chars are  provided
-		{
-			if ( string::npos != esc.find_first_of(ch) )
-			{
-				// get the escaped char
-				++pos;
-				if ( pos < len ) // if there are more chars left
-				{
-					// get the next one
-					ch = str.at(pos);
-
-					// add the escaped character to the token
-					add_char = true;
-				}
-				else // cannot get any more characters
-				{
-					// don't add the esc-char
-					add_char = false;
-				}
-
-				// ignore the remaining delimiter checks
-				escaped = true;
-			}
-		}
-
-		// ... if the delimiter is a quote
-		if ( false == quote.empty() && false == escaped )
-		{
-			// if quote chars are provided and the char isn't protected
-			if ( string::npos != quote.find_first_of(ch) )
-			{
-				// if not quoted, set state to open quote and set
-				// the quote character
-				if ( false == quoted )
-				{
-					quoted = true;
-					current_quote = ch;
-
-					// don't add the quote-char to the token
-					add_char = false;
-				}
-				else // if quote is open already
-				{
-					// check if it is the matching character to close it
-					if ( current_quote == ch )
-					{
-						// close quote and reset the quote character
-						quoted = false;
-						current_quote = 0;
-
-						// don't add the quote-char to the token
-						add_char = false;
-					}
-				} // else
-			}
-		}
-
-		// ... if the delimiter isn't preserved
-		if ( false == delimiters.empty() && false == escaped &&
-			 false == quoted )
-		{
-			// if a delimiter is provided and the char isn't protected by
-			// quote or escape char
-			if ( string::npos != delimiters.find_first_of(ch) )
-			{
-				// if ch is a delimiter and the token string isn't empty
-				// the token is complete
-				if ( false == token.empty() ) // BUGFIX: 2006-03-04
-				{
-					token_complete = true;
-				}
-
-				// don't add the delimiter to the token
-				add_char = false;
-			}
-		}
-
-		// ... if the delimiter is preserved - add it as a token
-		bool add_delimiter = false;
-		if ( false == delimiters_preserve.empty() && false == escaped &&
-			 false == quoted )
-		{
-			// if a delimiter which will be preserved is provided and the
-			// char isn't protected by quote or escape char
-			if ( string::npos != delimiters_preserve.find_first_of(ch) )
-			{
-				// if ch is a delimiter and the token string isn't empty
-				// the token is complete
-				if ( false == token.empty() ) // BUGFIX: 2006-03-04
-				{
-					token_complete = true;
-				}
-
-				// don't add the delimiter to the token
-				add_char = false;
-
-				// add the delimiter
-				delimiter = ch;
-				add_delimiter = true;
-			}
-		}
-
-
-		// add the character to the token
-		if ( true == add_char )
-		{
-			// add the current char
-			token.push_back( ch );
-		}
-
-		// add the token if it is complete
-		if ( true == token_complete && false == token.empty() )
-		{
-			// add the token string
-			result.push_back( token );
-
-			// clear the contents
-			token.clear();
-
-			// build the next token
-			token_complete = false;
-		}
-
-		// add the delimiter
-		if ( true == add_delimiter )
-		{
-			// the next token is the delimiter
-			string delim_token;
-			delim_token.push_back( delimiter );
-			result.push_back( delim_token );
-
-			// REMOVED: 2006-03-04, Bugfix
-		}
-
-		// repeat for the next character
-		++pos;
-	} // while
-
-	// add the final token
-	if ( false == token.empty() )
-	{
-		result.push_back( token );
-	}
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/src/blackberry10/native/public/tokenizer.h
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/src/blackberry10/native/public/tokenizer.h b/spec/plugins/cordova.echo/src/blackberry10/native/public/tokenizer.h
deleted file mode 100644
index 75f567c..0000000
--- a/spec/plugins/cordova.echo/src/blackberry10/native/public/tokenizer.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/************************************************************************
-The zlib/libpng License
-
-Copyright (c) 2006 Joerg Wiedenmann
-
-This software is provided 'as-is', without any express or implied warranty.
-In no event will the authors be held liable for any damages arising from
-the use of this software.
-
-Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it
-freely, subject to the following restrictions:
-
-1. The origin of this software must not be misrepresented;
-	you must not claim that you wrote the original software.
-	If you use this software in a product, an acknowledgment
-	in the product documentation would be appreciated but is
-	not required.
-
-2. Altered source versions must be plainly marked as such,
-	and must not be misrepresented as being the original software.
-
-3. This notice may not be removed or altered from any source distribution.
-
-***********************************************************************/
-
-/********************************************************************
-	created:	2006-01-28
-	filename: 	tokenizer.cpp
-	author:		J�rg Wiedenmann
-
-	purpose:	A tokenizer function which provides a very
-				customizable way of breaking up strings.
-*********************************************************************/
-
-#include <vector>
-#include <string>
-using namespace std;
-
-// Function to break up a string into tokens
-//
-// Parameters:
-//-----------
-// str = the input string that will be tokenized
-// result = the tokens for str
-// delimiters = the delimiter characters
-// delimiters preserve = same as above, but the delimiter characters
-//		will be put into the result as a token
-// quote = characters to protect the enclosed characters
-// esc = characters to protect a single character
-//
-
-void tokenize ( const string& str, vector<string>& result,
-			const string& delimiters, const string& delimiters_preserve = "",
-			const string& quote = "\"", const string& esc = "\\" );

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/src/blackberry10/native/simulator/echoJnext.so
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/src/blackberry10/native/simulator/echoJnext.so b/spec/plugins/cordova.echo/src/blackberry10/native/simulator/echoJnext.so
deleted file mode 100644
index 2b3c5f5..0000000
Binary files a/spec/plugins/cordova.echo/src/blackberry10/native/simulator/echoJnext.so and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/src/blackberry10/native/src/echo.cpp
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/src/blackberry10/native/src/echo.cpp b/spec/plugins/cordova.echo/src/blackberry10/native/src/echo.cpp
deleted file mode 100644
index 0d5cc2f..0000000
--- a/spec/plugins/cordova.echo/src/blackberry10/native/src/echo.cpp
+++ /dev/null
@@ -1,121 +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.
- *
-*/
-
-
-#include <../public/json/reader.h>
-#include <string>
-#include <sstream>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "echo.hpp"
-
-using namespace std;
-
-/**
- * Default constructor.
- */
-Echo::Echo(const std::string& id) : m_id(id) {
-}
-
-/**
- * Memory destructor.
- */
-Echo::~Echo() {
-}
-
-/**
- * This method returns the list of objects implemented by this native
- * extension.
- */
-char* onGetObjList() {
-    static char name[] = "Echo";
-    return name;
-}
-
-/**
- * This method is used by JNext to instantiate the Memory object when
- * an object is created on the JavaScript server side.
- */
-JSExt* onCreateObject(const string& className, const string& id) {
-    if (className == "Echo") {
-        return new Echo(id);
-    }
-
-    return NULL;
-}
-
-/**
- * Method used by JNext to determine if the object can be deleted.
- */
-bool Echo::CanDelete() {
-    return true;
-}
-
-/**
- * It will be called from JNext JavaScript side with passed string.
- * This method implements the interface for the JavaScript to native binding
- * for invoking native code. This method is triggered when JNext.invoke is
- * called on the JavaScript side with this native objects id.
- */
-string Echo::InvokeMethod(const string& command) {
-    int index = command.find_first_of(" ");
-    std::string method = command.substr(0, index);
-    
-    // read in arguments
-    Json::Value obj;
-    if (static_cast<int>(command.length()) > index && index != -1) {
-        std::string jsonObject = command.substr(index + 1, command.length());
-        Json::Reader reader;
-
-        bool parse = reader.parse(jsonObject, obj);
-        if (!parse) {
-            fprintf(stderr, "%s", "error parsing\n");
-            return "Cannot parse JSON object";
-        }
-    }    
-    
-    // Determine which function should be executed
-    if (method == "doEcho") {
-        std::string message = obj["message"].asString();
-        if(message.length() > 0) {
-            return doEcho(message);
-        }else{
-             return doEcho("Nothing to echo.");
-        }
-    }else{
-        return doEcho("Unsupported Method");
-    }
-}
-
-/**
- * Method that sends off Event message
- */
-string Echo::doEcho(const std::string& message) {
-    std::string eventString = m_id;
-    eventString.append(" ");
-    eventString.append("cordova.echo.callback");
-    eventString.append(" ");
-    eventString.append(message);
-    SendPluginEvent(eventString.c_str(), m_pContext);
-    return eventString;
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/src/blackberry10/native/src/echo.hpp
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/src/blackberry10/native/src/echo.hpp b/spec/plugins/cordova.echo/src/blackberry10/native/src/echo.hpp
deleted file mode 100644
index 408be69..0000000
--- a/spec/plugins/cordova.echo/src/blackberry10/native/src/echo.hpp
+++ /dev/null
@@ -1,45 +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.
- *
-*/
-
-#ifndef ECHO_HPP_
-#define ECHO_HPP_
-
-#include <string>
-#include <pthread.h>
-#include "../public/plugin.h"
-
-class Echo: public JSExt {
-
-public:
-    explicit Echo(const std::string& id);
-    virtual ~Echo();
-
-// Interfaces of JSExt
-    virtual bool CanDelete();
-    virtual std::string InvokeMethod(const std::string& command);
-
-private:
-    std::string doEcho(const std::string& message);
-
-    std::string m_id;
-};
-
-#endif /* ECHO_HPP_ */

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/cordova.echo/www/client.js
----------------------------------------------------------------------
diff --git a/spec/plugins/cordova.echo/www/client.js b/spec/plugins/cordova.echo/www/client.js
deleted file mode 100644
index 4e7a1b3..0000000
--- a/spec/plugins/cordova.echo/www/client.js
+++ /dev/null
@@ -1,53 +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 _self = {},
-    _ID = require("./manifest.json").namespace,
-    win = null,
-    fail = null;
-
-function handleCallback(result) {
-    if (result) {
-        if(win){
-            win(result);
-        }
-    } else {
-        if(fail){
-            fail(result);
-        }
-    }
-    win = null;
-    fail = null;
-}
-
-_self.doEcho = function (args, theWin, theFail) {
-    var data = { "message" : args.message || "" };
-    
-    win = theWin;
-    fail = theFail;
-    
-    window.webworks.event.add(_ID, "echoCallback", handleCallback);
-    
-    return window.webworks.execSync(_ID, "doEcho", data);
-};
-
-
-module.exports = _self;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/A/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/A/plugin.xml b/spec/plugins/dependencies/A/plugin.xml
deleted file mode 100644
index ec83e8c..0000000
--- a/spec/plugins/dependencies/A/plugin.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="A"
-    version="0.6.0">
-
-    <name>Plugin A</name>
-
-    <dependency id="C" url="C" />
-    <dependency id="D" url="D" />
-
-    <asset src="www/plugin-a.js" target="plugin-a.js" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-    </config-file>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="plugins">
-            <plugin name="A"
-                value="com.phonegap.A.A"/>
-        </config-file>
-
-        <source-file src="src/android/A.java"
-                target-dir="src/com/phonegap/A" />
-    </platform>
-
-        
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="plugins">
-            <plugin name="A"
-                value="APluginCommand"/>
-        </config-file>
-
-        <header-file src="src/ios/APluginCommand.h" />
-        <source-file src="src/ios/APluginCommand.m"/>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/A/src/android/A.java
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/A/src/android/A.java b/spec/plugins/dependencies/A/src/android/A.java
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/A/src/ios/APluginCommand.h
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/A/src/ios/APluginCommand.h b/spec/plugins/dependencies/A/src/ios/APluginCommand.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/A/src/ios/APluginCommand.m
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/A/src/ios/APluginCommand.m b/spec/plugins/dependencies/A/src/ios/APluginCommand.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/A/www/plugin-a.js
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/A/www/plugin-a.js b/spec/plugins/dependencies/A/www/plugin-a.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/B/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/B/plugin.xml b/spec/plugins/dependencies/B/plugin.xml
deleted file mode 100644
index ee32e2d..0000000
--- a/spec/plugins/dependencies/B/plugin.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="B"
-    version="0.6.0">
-
-    <name>Plugin B</name>
-
-    <dependency id="D" url="." subdir="D"/>
-    <dependency id="E" url="." subdir="subdir/E"/>
-
-    <asset src="www/plugin-b.js" target="plugin-b.js" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-    </config-file>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="plugins">
-            <plugin name="B"
-                value="com.phonegap.B.B"/>
-        </config-file>
-
-        <source-file src="src/android/B.java"
-                target-dir="src/com/phonegap/B" />
-    </platform>
-
-
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="plugins">
-            <plugin name="B"
-                value="BPluginCommand"/>
-        </config-file>
-
-        <header-file src="src/ios/BPluginCommand.h" />
-        <source-file src="src/ios/BPluginCommand.m"/>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/B/src/android/B.java
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/B/src/android/B.java b/spec/plugins/dependencies/B/src/android/B.java
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/B/src/ios/BPluginCommand.h
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/B/src/ios/BPluginCommand.h b/spec/plugins/dependencies/B/src/ios/BPluginCommand.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/B/src/ios/BPluginCommand.m
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/B/src/ios/BPluginCommand.m b/spec/plugins/dependencies/B/src/ios/BPluginCommand.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/B/www/plugin-b.js
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/B/www/plugin-b.js b/spec/plugins/dependencies/B/www/plugin-b.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/C/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/C/plugin.xml b/spec/plugins/dependencies/C/plugin.xml
deleted file mode 100644
index 88c2d2c..0000000
--- a/spec/plugins/dependencies/C/plugin.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="C"
-    version="0.6.0">
-
-    <name>Plugin C</name>
-
-    <asset src="www/plugin-c.js" target="plugin-c.js" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-    </config-file>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="plugins">
-            <plugin name="C"
-                value="com.phonegap.C.C"/>
-        </config-file>
-
-        <source-file src="src/android/C.java"
-                target-dir="src/com/phonegap/C" />
-    </platform>
-
-        
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="plugins">
-            <plugin name="C"
-                value="CPluginCommand"/>
-        </config-file>
-
-        <header-file src="src/ios/CPluginCommand.h" />
-        <source-file src="src/ios/CPluginCommand.m"/>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/C/src/android/C.java
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/C/src/android/C.java b/spec/plugins/dependencies/C/src/android/C.java
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/C/src/ios/CPluginCommand.h
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/C/src/ios/CPluginCommand.h b/spec/plugins/dependencies/C/src/ios/CPluginCommand.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/C/src/ios/CPluginCommand.m
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/C/src/ios/CPluginCommand.m b/spec/plugins/dependencies/C/src/ios/CPluginCommand.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/C/www/plugin-c.js
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/C/www/plugin-c.js b/spec/plugins/dependencies/C/www/plugin-c.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/D/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/D/plugin.xml b/spec/plugins/dependencies/D/plugin.xml
deleted file mode 100644
index f07b063..0000000
--- a/spec/plugins/dependencies/D/plugin.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="D"
-    version="0.6.0">
-
-    <name>Plugin D</name>
-
-    <asset src="www/plugin-d.js" target="plugin-d.js" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-    </config-file>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="plugins">
-            <plugin name="D"
-                value="com.phonegap.D.D"/>
-        </config-file>
-
-        <source-file src="src/android/D.java"
-                target-dir="src/com/phonegap/D" />
-    </platform>
-
-        
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="plugins">
-            <plugin name="D"
-                value="DPluginCommand"/>
-        </config-file>
-
-        <header-file src="src/ios/DPluginCommand.h" />
-        <source-file src="src/ios/DPluginCommand.m"/>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/D/src/android/D.java
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/D/src/android/D.java b/spec/plugins/dependencies/D/src/android/D.java
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/D/src/ios/DPluginCommand.h
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/D/src/ios/DPluginCommand.h b/spec/plugins/dependencies/D/src/ios/DPluginCommand.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/D/src/ios/DPluginCommand.m
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/D/src/ios/DPluginCommand.m b/spec/plugins/dependencies/D/src/ios/DPluginCommand.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/D/www/plugin-d.js
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/D/www/plugin-d.js b/spec/plugins/dependencies/D/www/plugin-d.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/E/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/E/plugin.xml b/spec/plugins/dependencies/E/plugin.xml
deleted file mode 100644
index bb28fa1..0000000
--- a/spec/plugins/dependencies/E/plugin.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="E"
-    version="0.6.0">
-
-    <name>Plugin E</name>
-
-    <asset src="www/plugin-e.js" target="plugin-e.js" />
-
-    <dependency id="D" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-    </config-file>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="plugins">
-            <plugin name="E"
-                value="com.phonegap.E.E"/>
-        </config-file>
-
-        <source-file src="src/android/E.java"
-                target-dir="src/com/phonegap/E" />
-    </platform>
-
-        
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="plugins">
-            <plugin name="E"
-                value="EPluginCommand"/>
-        </config-file>
-
-        <header-file src="src/ios/EPluginCommand.h" />
-        <source-file src="src/ios/EPluginCommand.m"/>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/E/src/android/E.java
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/E/src/android/E.java b/spec/plugins/dependencies/E/src/android/E.java
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/E/src/ios/EPluginCommand.h
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/E/src/ios/EPluginCommand.h b/spec/plugins/dependencies/E/src/ios/EPluginCommand.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/E/src/ios/EPluginCommand.m
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/E/src/ios/EPluginCommand.m b/spec/plugins/dependencies/E/src/ios/EPluginCommand.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/E/www/plugin-d.js
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/E/www/plugin-d.js b/spec/plugins/dependencies/E/www/plugin-d.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/F/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/F/plugin.xml b/spec/plugins/dependencies/F/plugin.xml
deleted file mode 100644
index 86869ba..0000000
--- a/spec/plugins/dependencies/F/plugin.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="F"
-    version="0.6.0">
-
-    <name>Plugin F</name>
-
-    <asset src="www/plugin-f.js" target="plugin-f.js" />
-
-    <dependency id="A" />
-    <dependency id="D" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-    </config-file>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="plugins">
-            <plugin name="F"
-                value="com.phonegap.F.F"/>
-        </config-file>
-
-        <source-file src="src/android/F.java"
-                target-dir="src/com/phonegap/F" />
-    </platform>
-
-
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="plugins">
-            <plugin name="F"
-                value="FPluginCommand"/>
-        </config-file>
-
-        <header-file src="src/ios/FPluginCommand.h" />
-        <source-file src="src/ios/FPluginCommand.m"/>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/F/src/android/F.java
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/F/src/android/F.java b/spec/plugins/dependencies/F/src/android/F.java
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/F/src/ios/FPluginCommand.h
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/F/src/ios/FPluginCommand.h b/spec/plugins/dependencies/F/src/ios/FPluginCommand.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/F/src/ios/FPluginCommand.m
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/F/src/ios/FPluginCommand.m b/spec/plugins/dependencies/F/src/ios/FPluginCommand.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/F/www/plugin-f.js
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/F/www/plugin-f.js b/spec/plugins/dependencies/F/www/plugin-f.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/G/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/G/plugin.xml b/spec/plugins/dependencies/G/plugin.xml
deleted file mode 100644
index 0e365da..0000000
--- a/spec/plugins/dependencies/G/plugin.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="G"
-    version="0.6.0">
-
-    <name>Plugin G</name>
-
-    <asset src="www/plugin-g.js" target="plugin-g.js" />
-
-    <dependency id="H" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-    </config-file>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="plugins">
-            <plugin name="G"
-                value="com.phonegap.G.G"/>
-        </config-file>
-
-        <source-file src="src/android/G.java"
-                target-dir="src/com/phonegap/G" />
-    </platform>
-
-
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="plugins">
-            <plugin name="G"
-                value="GPluginCommand"/>
-        </config-file>
-
-        <header-file src="src/ios/GPluginCommand.h" />
-        <source-file src="src/ios/GPluginCommand.m"/>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/G/src/android/G.java
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/G/src/android/G.java b/spec/plugins/dependencies/G/src/android/G.java
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/G/src/ios/EPluginCommand.m
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/G/src/ios/EPluginCommand.m b/spec/plugins/dependencies/G/src/ios/EPluginCommand.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/G/src/ios/GPluginCommand.h
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/G/src/ios/GPluginCommand.h b/spec/plugins/dependencies/G/src/ios/GPluginCommand.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/G/www/plugin-g.js
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/G/www/plugin-g.js b/spec/plugins/dependencies/G/www/plugin-g.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/H/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/H/plugin.xml b/spec/plugins/dependencies/H/plugin.xml
deleted file mode 100644
index e72a19a..0000000
--- a/spec/plugins/dependencies/H/plugin.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="H"
-    version="0.6.0">
-
-    <name>Plugin H</name>
-
-    <asset src="www/plugin-h.js" target="plugin-h.js" />
-
-    <dependency id="G" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-    </config-file>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="plugins">
-            <plugin name="H"
-                value="com.phonegap.H.H"/>
-        </config-file>
-
-        <source-file src="src/android/H.java"
-                target-dir="src/com/phonegap/H" />
-    </platform>
-
-
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="plugins">
-            <plugin name="H"
-                value="HPluginCommand"/>
-        </config-file>
-
-        <header-file src="src/ios/HPluginCommand.h" />
-        <source-file src="src/ios/HPluginCommand.m"/>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/H/src/android/H.java
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/H/src/android/H.java b/spec/plugins/dependencies/H/src/android/H.java
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/H/src/ios/HPluginCommand.h
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/H/src/ios/HPluginCommand.h b/spec/plugins/dependencies/H/src/ios/HPluginCommand.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/H/src/ios/HPluginCommand.m
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/H/src/ios/HPluginCommand.m b/spec/plugins/dependencies/H/src/ios/HPluginCommand.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/H/www/plugin-h.js
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/H/www/plugin-h.js b/spec/plugins/dependencies/H/www/plugin-h.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/README.md
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/README.md b/spec/plugins/dependencies/README.md
deleted file mode 100644
index 0955be5..0000000
--- a/spec/plugins/dependencies/README.md
+++ /dev/null
@@ -1,10 +0,0 @@
-Here's a general overview of how the plugins in this directory are dependent on each other:
-
-          F
-         / \
-        A   \      B
-       / \   \    / \
-      C   '---D--'   E
-
-
-   G <-> H

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/meta/D/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/meta/D/plugin.xml b/spec/plugins/dependencies/meta/D/plugin.xml
deleted file mode 100644
index 941bd57..0000000
--- a/spec/plugins/dependencies/meta/D/plugin.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="D"
-    version="0.6.0">
-
-    <name>Plugin D</name>
-
-    <asset src="www/plugin-d.js" target="plugin-d.js" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-    </config-file>
-
-    <engines>
-        <engine name="cordova" version=">=1.0.0"/>
-    </engines>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="plugins">
-            <plugin name="D"
-                value="com.phonegap.D.D"/>
-        </config-file>
-
-        <source-file src="src/android/D.java"
-                target-dir="src/com/phonegap/D" />
-    </platform>
-
-        
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="plugins">
-            <plugin name="D"
-                value="DPluginCommand"/>
-        </config-file>
-
-        <header-file src="src/ios/DPluginCommand.h" />
-        <source-file src="src/ios/DPluginCommand.m"/>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/meta/D/src/android/D.java
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/meta/D/src/android/D.java b/spec/plugins/dependencies/meta/D/src/android/D.java
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/meta/D/src/ios/DPluginCommand.h
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/meta/D/src/ios/DPluginCommand.h b/spec/plugins/dependencies/meta/D/src/ios/DPluginCommand.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/meta/D/src/ios/DPluginCommand.m
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/meta/D/src/ios/DPluginCommand.m b/spec/plugins/dependencies/meta/D/src/ios/DPluginCommand.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/meta/D/www/plugin-d.js
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/meta/D/www/plugin-d.js b/spec/plugins/dependencies/meta/D/www/plugin-d.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/meta/subdir/E/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/meta/subdir/E/plugin.xml b/spec/plugins/dependencies/meta/subdir/E/plugin.xml
deleted file mode 100644
index 57d96d9..0000000
--- a/spec/plugins/dependencies/meta/subdir/E/plugin.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="E"
-    version="0.6.0">
-
-    <name>Plugin E</name>
-
-    <asset src="www/plugin-e.js" target="plugin-e.js" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-    </config-file>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="plugins">
-            <plugin name="E"
-                value="com.phonegap.E.E"/>
-        </config-file>
-
-        <source-file src="src/android/E.java"
-                target-dir="src/com/phonegap/E" />
-    </platform>
-
-        
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="plugins">
-            <plugin name="E"
-                value="EPluginCommand"/>
-        </config-file>
-
-        <header-file src="src/ios/EPluginCommand.h" />
-        <source-file src="src/ios/EPluginCommand.m"/>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/meta/subdir/E/src/android/E.java
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/meta/subdir/E/src/android/E.java b/spec/plugins/dependencies/meta/subdir/E/src/android/E.java
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/meta/subdir/E/src/ios/EPluginCommand.h
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/meta/subdir/E/src/ios/EPluginCommand.h b/spec/plugins/dependencies/meta/subdir/E/src/ios/EPluginCommand.h
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/meta/subdir/E/src/ios/EPluginCommand.m
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/meta/subdir/E/src/ios/EPluginCommand.m b/spec/plugins/dependencies/meta/subdir/E/src/ios/EPluginCommand.m
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/meta/subdir/E/www/plugin-e.js
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/meta/subdir/E/www/plugin-e.js b/spec/plugins/dependencies/meta/subdir/E/www/plugin-e.js
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/subdir/E/plugin.xml
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/subdir/E/plugin.xml b/spec/plugins/dependencies/subdir/E/plugin.xml
deleted file mode 100644
index 57d96d9..0000000
--- a/spec/plugins/dependencies/subdir/E/plugin.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed 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.
-
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="E"
-    version="0.6.0">
-
-    <name>Plugin E</name>
-
-    <asset src="www/plugin-e.js" target="plugin-e.js" />
-
-    <config-file target="config.xml" parent="/*">
-        <access origin="build.phonegap.com" />
-    </config-file>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="plugins">
-            <plugin name="E"
-                value="com.phonegap.E.E"/>
-        </config-file>
-
-        <source-file src="src/android/E.java"
-                target-dir="src/com/phonegap/E" />
-    </platform>
-
-        
-    <!-- ios -->
-    <platform name="ios">
-        <!-- CDV 2.5+ -->
-        <config-file target="config.xml" parent="plugins">
-            <plugin name="E"
-                value="EPluginCommand"/>
-        </config-file>
-
-        <header-file src="src/ios/EPluginCommand.h" />
-        <source-file src="src/ios/EPluginCommand.m"/>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/spec/plugins/dependencies/subdir/E/src/android/E.java
----------------------------------------------------------------------
diff --git a/spec/plugins/dependencies/subdir/E/src/android/E.java b/spec/plugins/dependencies/subdir/E/src/android/E.java
deleted file mode 100644
index e69de29..0000000


[27/70] Split out cordova-lib: move cordova-plugman files

Posted by ka...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/windows8/www/css/index.css
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/windows8/www/css/index.css b/cordova-lib/spec-plugman/projects/windows8/www/css/index.css
new file mode 100644
index 0000000..51daa79
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/windows8/www/css/index.css
@@ -0,0 +1,115 @@
+/*
+ * 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.
+ */
+* {
+    -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
+}
+
+body {
+    -webkit-touch-callout: none;                /* prevent callout to copy image, etc when tap to hold */
+    -webkit-text-size-adjust: none;             /* prevent webkit from resizing text to fit */
+    -webkit-user-select: none;                  /* prevent copy paste, to allow, change 'none' to 'text' */
+    background-color:#E4E4E4;
+    background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
+    background-image:-webkit-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
+    background-image:-ms-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
+    background-image:-webkit-gradient(
+        linear,
+        left top,
+        left bottom,
+        color-stop(0, #A7A7A7),
+        color-stop(0.51, #E4E4E4)
+    );
+    background-attachment:fixed;
+    font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif;
+    font-size:12px;
+    height:100%;
+    margin:0px;
+    padding:0px;
+    text-transform:uppercase;
+    width:100%;
+}
+
+/* Portrait layout (default) */
+.app {
+    background:url(../img/logo.png) no-repeat center top; /* 170px x 200px */
+    position:absolute;             /* position in the center of the screen */
+    left:50%;
+    top:50%;
+    height:50px;                   /* text area height */
+    width:225px;                   /* text area width */
+    text-align:center;
+    padding:180px 0px 0px 0px;     /* image height is 200px (bottom 20px are overlapped with text) */
+    margin:-115px 0px 0px -112px;  /* offset vertical: half of image height and text area height */
+                                   /* offset horizontal: half of text area width */
+}
+
+/* Landscape layout (with min-width) */
+@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) {
+    .app {
+        background-position:left center;
+        padding:75px 0px 75px 170px;  /* padding-top + padding-bottom + text area = image height */
+        margin:-90px 0px 0px -198px;  /* offset vertical: half of image height */
+                                      /* offset horizontal: half of image width and text area width */
+    }
+}
+
+h1 {
+    font-size:24px;
+    font-weight:normal;
+    margin:0px;
+    overflow:visible;
+    padding:0px;
+    text-align:center;
+}
+
+.event {
+    border-radius:4px;
+    -webkit-border-radius:4px;
+    color:#FFFFFF;
+    font-size:12px;
+    margin:0px 30px;
+    padding:2px 0px;
+}
+
+.event.listening {
+    background-color:#333333;
+    display:block;
+}
+
+.event.received {
+    background-color:#4B946A;
+    display:none;
+}
+
+@keyframes fade {
+    from { opacity: 1.0; }
+    50% { opacity: 0.4; }
+    to { opacity: 1.0; }
+}
+ 
+@-webkit-keyframes fade {
+    from { opacity: 1.0; }
+    50% { opacity: 0.4; }
+    to { opacity: 1.0; }
+}
+ 
+.blink {
+    animation:fade 3000ms infinite;
+    -webkit-animation:fade 3000ms infinite;
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/windows8/www/img/logo.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/windows8/www/img/logo.png b/cordova-lib/spec-plugman/projects/windows8/www/img/logo.png
new file mode 100644
index 0000000..86a48a8
Binary files /dev/null and b/cordova-lib/spec-plugman/projects/windows8/www/img/logo.png differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/windows8/www/img/smalllogo.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/windows8/www/img/smalllogo.png b/cordova-lib/spec-plugman/projects/windows8/www/img/smalllogo.png
new file mode 100644
index 0000000..0e648ef
Binary files /dev/null and b/cordova-lib/spec-plugman/projects/windows8/www/img/smalllogo.png differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/windows8/www/img/splashscreen.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/windows8/www/img/splashscreen.png b/cordova-lib/spec-plugman/projects/windows8/www/img/splashscreen.png
new file mode 100644
index 0000000..d1e6c98
Binary files /dev/null and b/cordova-lib/spec-plugman/projects/windows8/www/img/splashscreen.png differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/windows8/www/img/storelogo.png
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/windows8/www/img/storelogo.png b/cordova-lib/spec-plugman/projects/windows8/www/img/storelogo.png
new file mode 100644
index 0000000..dd00478
Binary files /dev/null and b/cordova-lib/spec-plugman/projects/windows8/www/img/storelogo.png differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/windows8/www/index.html
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/windows8/www/index.html b/cordova-lib/spec-plugman/projects/windows8/www/index.html
new file mode 100644
index 0000000..ca8ab84
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/windows8/www/index.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+    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.
+-->
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+        <meta name="format-detection" content="telephone=no" />
+        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
+        <link rel="stylesheet" type="text/css" href="css/index.css" />
+        <title>Hello World</title>
+    </head>
+    <body>
+        <div class="app">
+            <h1>Apache Cordova</h1>
+            <div id="deviceready" class="blink">
+                <p class="event listening">Connecting to Device</p>
+                <p class="event received">Device is Ready</p>
+            </div>
+        </div>
+        <script type="text/javascript" src="cordova-2.6.0.js"></script>
+        <script type="text/javascript" src="js/index.js"></script>
+        <script type="text/javascript">
+            app.initialize();
+        </script>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/windows8/www/js/index.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/windows8/www/js/index.js b/cordova-lib/spec-plugman/projects/windows8/www/js/index.js
new file mode 100644
index 0000000..87b5660
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/windows8/www/js/index.js
@@ -0,0 +1,49 @@
+/*
+ * 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 app = {
+    // Application Constructor
+    initialize: function() {
+        this.bindEvents();
+    },
+    // Bind Event Listeners
+    //
+    // Bind any events that are required on startup. Common events are:
+    // 'load', 'deviceready', 'offline', and 'online'.
+    bindEvents: function() {
+        document.addEventListener('deviceready', this.onDeviceReady, false);
+    },
+    // deviceready Event Handler
+    //
+    // The scope of 'this' is the event. In order to call the 'receivedEvent'
+    // function, we must explicitly call 'app.receivedEvent(...);'
+    onDeviceReady: function() {
+        app.receivedEvent('deviceready');
+    },
+    // Update DOM on a Received Event
+    receivedEvent: function(id) {
+        var parentElement = document.getElementById(id);
+        var listeningElement = parentElement.querySelector('.listening');
+        var receivedElement = parentElement.querySelector('.received');
+
+        listeningElement.setAttribute('style', 'display:none;');
+        receivedElement.setAttribute('style', 'display:block;');
+
+        console.log('Received Event: ' + id);
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/wp7/CordovaAppProj.csproj
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/wp7/CordovaAppProj.csproj b/cordova-lib/spec-plugman/projects/wp7/CordovaAppProj.csproj
new file mode 100644
index 0000000..4b122a2
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/wp7/CordovaAppProj.csproj
@@ -0,0 +1,76 @@
+<?xml version='1.0' encoding='utf-8'?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+    <PropertyGroup>
+        <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+        <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+        <ProductVersion>10.0.20506</ProductVersion>
+        <SchemaVersion>2.0</SchemaVersion>
+        <ProjectGuid>{3677C1B7-D68B-4CF9-BF8A-E869D437A6DF}</ProjectGuid>
+        <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+        <OutputType>Library</OutputType>
+        <AppDesignerFolder>Properties</AppDesignerFolder>
+        <RootNamespace>$safeprojectname$</RootNamespace>
+        <AssemblyName>$safeprojectname$</AssemblyName>
+        <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+        <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+        <TargetFrameworkProfile>WindowsPhone71</TargetFrameworkProfile>
+        <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+        <SilverlightApplication>true</SilverlightApplication>
+        <SupportedCultures>
+        </SupportedCultures>
+        <XapOutputs>true</XapOutputs>
+        <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+        <XapFilename>$safeprojectname$.xap</XapFilename>
+        <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+        <SilverlightAppEntry>$safeprojectname$.App</SilverlightAppEntry>
+        <ValidateXaml>true</ValidateXaml>
+        <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+    </PropertyGroup>
+    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+        <DebugSymbols>true</DebugSymbols>
+        <DebugType>full</DebugType>
+        <Optimize>false</Optimize>
+        <OutputPath>Bin\Debug</OutputPath>
+        <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
+        <NoStdLib>true</NoStdLib>
+        <NoConfig>true</NoConfig>
+        <ErrorReport>prompt</ErrorReport>
+        <WarningLevel>4</WarningLevel>
+    </PropertyGroup>
+    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+        <DebugType>pdbonly</DebugType>
+        <Optimize>true</Optimize>
+        <OutputPath>Bin\Release</OutputPath>
+        <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
+        <NoStdLib>true</NoStdLib>
+        <NoConfig>true</NoConfig>
+        <ErrorReport>prompt</ErrorReport>
+        <WarningLevel>4</WarningLevel>
+    </PropertyGroup>
+    <ItemGroup>
+        <Reference Include="Microsoft.Devices.Sensors" />
+        <Reference Include="Microsoft.Phone" />
+        <Reference Include="Microsoft.Phone.Interop" />
+        <Reference Include="Microsoft.Xna.Framework" />
+        <Reference Include="System.Device" />
+        <Reference Include="System.Runtime.Serialization" />
+        <Reference Include="System.Servicemodel.Web" />
+        <Reference Include="System.Windows" />
+        <Reference Include="system" />
+        <Reference Include="System.Core" />
+        <Reference Include="System.Net" />
+        <Reference Include="System.Xml" />
+        <Reference Include="System.Xml.Linq" />
+    </ItemGroup>
+    <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" />
+    <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.CSharp.targets" />
+    <ProjectExtensions />
+    <PropertyGroup>
+        <PreBuildEvent>CScript "$(ProjectDir)/BuildManifestProcessor.js" "$(ProjectPath)"</PreBuildEvent>
+    </PropertyGroup>
+    <PropertyGroup>
+        <PostBuildEvent>
+        </PostBuildEvent>
+    </PropertyGroup>
+    <ItemGroup />
+</Project>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/wp7/Properties/WMAppManifest.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/wp7/Properties/WMAppManifest.xml b/cordova-lib/spec-plugman/projects/wp7/Properties/WMAppManifest.xml
new file mode 100644
index 0000000..b218fcb
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/wp7/Properties/WMAppManifest.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2009/deployment" AppPlatformVersion="7.1">
+  <App xmlns="" ProductID="{5FC10D78-8779-4EDB-9B61-1D04F0A755D4}" Title="An App" 
+       RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal"  
+       Author="An App author" 
+       BitsPerPixel="32" 
+       Description="Apache Cordova for Windows Phone 7"
+       Publisher="An App">
+    
+    <IconPath IsRelative="true" IsResource="false">ApplicationIcon.png</IconPath>
+    <Capabilities>
+      <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />   
+    </Capabilities>
+    
+    <Tasks>
+      <DefaultTask Name="_default" NavigationPage="MainPage.xaml" />
+    </Tasks>
+    <Tokens>
+      <PrimaryToken TokenID="An AppToken" TaskName="_default">
+        <TemplateType5>
+          <BackgroundImageURI IsRelative="true" IsResource="false">Background.png</BackgroundImageURI>
+          <Count>0</Count>
+          <Title>An App</Title>
+        </TemplateType5>
+      </PrimaryToken>
+    </Tokens>
+  </App>
+</Deployment>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/wp8/CordovaAppProj.csproj
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/wp8/CordovaAppProj.csproj b/cordova-lib/spec-plugman/projects/wp8/CordovaAppProj.csproj
new file mode 100644
index 0000000..bc229e5
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/wp8/CordovaAppProj.csproj
@@ -0,0 +1,136 @@
+<?xml version='1.0' encoding='utf-8'?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+    <PropertyGroup>
+        <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+        <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+        <ProductVersion>10.0.20506</ProductVersion>
+        <SchemaVersion>2.0</SchemaVersion>
+        <ProjectGuid>{3677C1B7-D68B-4CF9-BF8A-E869D437A6DF}</ProjectGuid>
+        <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+        <OutputType>Library</OutputType>
+        <AppDesignerFolder>Properties</AppDesignerFolder>
+        <RootNamespace>my.test.project</RootNamespace>
+        <AssemblyName>my.test.project</AssemblyName>
+        <TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
+        <SilverlightVersion>
+        </SilverlightVersion>
+        <TargetFrameworkProfile>
+        </TargetFrameworkProfile>
+        <TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>
+        <SilverlightApplication>true</SilverlightApplication>
+        <SupportedCultures>en-US</SupportedCultures>
+        <XapOutputs>true</XapOutputs>
+        <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+        <XapFilename>CordovaAppProj_$(Configuration)_$(Platform).xap</XapFilename>
+        <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+        <SilverlightAppEntry>my.test.project.App</SilverlightAppEntry>
+        <ValidateXaml>true</ValidateXaml>
+        <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+        <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
+        <BackgroundAgentType />
+    </PropertyGroup>
+    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+        <DebugSymbols>true</DebugSymbols>
+        <DebugType>full</DebugType>
+        <Optimize>false</Optimize>
+        <OutputPath>Bin\Debug</OutputPath>
+        <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;WP8</DefineConstants>
+        <NoStdLib>true</NoStdLib>
+        <NoConfig>true</NoConfig>
+        <ErrorReport>prompt</ErrorReport>
+        <WarningLevel>4</WarningLevel>
+        <Prefer32Bit>false</Prefer32Bit>
+    </PropertyGroup>
+    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+        <DebugType>pdbonly</DebugType>
+        <Optimize>true</Optimize>
+        <OutputPath>Bin\Release</OutputPath>
+        <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE;WP8</DefineConstants>
+        <NoStdLib>true</NoStdLib>
+        <NoConfig>true</NoConfig>
+        <ErrorReport>prompt</ErrorReport>
+        <WarningLevel>4</WarningLevel>
+        <Prefer32Bit>false</Prefer32Bit>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+        <DebugSymbols>true</DebugSymbols>
+        <OutputPath>Bin\x86\Debug</OutputPath>
+        <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
+        <NoStdLib>true</NoStdLib>
+        <DebugType>full</DebugType>
+        <PlatformTarget>
+        </PlatformTarget>
+        <ErrorReport>prompt</ErrorReport>
+        <CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
+        <Optimize>false</Optimize>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+        <OutputPath>Bin\x86\Release</OutputPath>
+        <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
+        <Optimize>true</Optimize>
+        <NoStdLib>true</NoStdLib>
+        <DebugType>pdbonly</DebugType>
+        <PlatformTarget>
+        </PlatformTarget>
+        <ErrorReport>prompt</ErrorReport>
+        <CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
+        <Prefer32Bit>false</Prefer32Bit>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
+        <DebugSymbols>true</DebugSymbols>
+        <OutputPath>Bin\ARM\Debug</OutputPath>
+        <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
+        <NoStdLib>true</NoStdLib>
+        <DebugType>full</DebugType>
+        <PlatformTarget>
+        </PlatformTarget>
+        <ErrorReport>prompt</ErrorReport>
+        <CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
+        <Prefer32Bit>false</Prefer32Bit>
+        <Optimize>false</Optimize>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
+        <OutputPath>Bin\ARM\Release</OutputPath>
+        <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
+        <Optimize>true</Optimize>
+        <NoStdLib>true</NoStdLib>
+        <DebugType>pdbonly</DebugType>
+        <PlatformTarget>
+        </PlatformTarget>
+        <ErrorReport>prompt</ErrorReport>
+        <CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
+        <Prefer32Bit>false</Prefer32Bit>
+    </PropertyGroup>
+    <ItemGroup>
+        <Compile Include="App.xaml.cs">
+            <DependentUpon>App.xaml</DependentUpon>
+        </Compile>
+        <Compile Include="MainPage.xaml.cs">
+            <DependentUpon>MainPage.xaml</DependentUpon>
+        </Compile>
+        <Compile Include="Properties\AssemblyInfo.cs" />
+        <Page Include="src\UI\PageTest.xaml">
+            <SubType>Designer</SubType>
+            <Generator>MSBuild:Compile</Generator>
+        </Page>
+    </ItemGroup>
+    <ItemGroup>
+        <Compile Include="Plugins\org.apache.cordova.core.InAppBrowser\InAppBrowser.cs" />
+    </ItemGroup>
+        <ItemGroup>
+        <Compile Include="src\UI\PageTest.xaml.cs">
+            <DependentUpon>PageTest.xaml</DependentUpon>
+        </Compile>
+    </ItemGroup>
+    <ItemGroup>
+        <Reference Include="LibraryTest">
+            <HintPath>lib\LibraryTest.dll</HintPath>
+        </Reference>
+    </ItemGroup>
+    <ItemGroup>
+        <Compile Include="src\FileTest.cs" />
+    </ItemGroup>
+    <ItemGroup>
+        <Content Include="src\Content.img" />
+    </ItemGroup>
+</Project>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/wp8/Properties/WMAppManifest.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/wp8/Properties/WMAppManifest.xml b/cordova-lib/spec-plugman/projects/wp8/Properties/WMAppManifest.xml
new file mode 100644
index 0000000..5b37a95
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/wp8/Properties/WMAppManifest.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2012/deployment" AppPlatformVersion="8.0">
+  <DefaultLanguage xmlns="" code="en-US" />
+  <Languages xmlns="">
+    <Language code="en-US" />
+  </Languages>
+  <App xmlns="" ProductID="{F3A8197B-6B16-456D-B5F4-DD4F04AC0BEC}" Title="An App" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal" Author="An App author" BitsPerPixel="32" Description="Apache Cordova for Windows Phone" Publisher="An App" PublisherID="{db093ed5-53b1-45f7-af72-751e8f36ab80}">
+    <IconPath IsRelative="true" IsResource="false">ApplicationIcon.png</IconPath>
+    <Capabilities>
+      <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
+    </Capabilities>
+    <Tasks>
+      <DefaultTask Name="_default" NavigationPage="MainPage.xaml" />
+    </Tasks>
+    <Tokens>
+      <PrimaryToken TokenID="An AppToken" TaskName="_default">
+        <TemplateFlip>
+          <SmallImageURI IsResource="false" IsRelative="true">Background.png</SmallImageURI>
+          <Count>0</Count>
+          <BackgroundImageURI IsResource="false" IsRelative="true">Background.png</BackgroundImageURI>
+          <Title>An App</Title>
+          <BackContent></BackContent>
+          <BackBackgroundImageURI></BackBackgroundImageURI>
+          <BackTitle></BackTitle>
+          <LargeBackgroundImageURI></LargeBackgroundImageURI>
+          <LargeBackContent></LargeBackContent>
+          <LargeBackBackgroundImageURI></LargeBackBackgroundImageURI>
+          <DeviceLockImageURI></DeviceLockImageURI>
+          <HasLarge>false</HasLarge>
+        </TemplateFlip>
+      </PrimaryToken>
+    </Tokens>
+    <ScreenResolutions>
+      <ScreenResolution Name="ID_RESOLUTION_WVGA" />
+      <ScreenResolution Name="ID_RESOLUTION_WXGA" />
+      <ScreenResolution Name="ID_RESOLUTION_HD720P" />
+    </ScreenResolutions>
+  </App>
+</Deployment>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/projects/www-only/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/www-only/.gitkeep b/cordova-lib/spec-plugman/projects/www-only/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/publish.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/publish.spec.js b/cordova-lib/spec-plugman/publish.spec.js
new file mode 100644
index 0000000..3498bd6
--- /dev/null
+++ b/cordova-lib/spec-plugman/publish.spec.js
@@ -0,0 +1,11 @@
+var publish = require('../src/publish'),
+    Q = require('q'),
+    registry = require('../src/registry/registry');
+
+describe('publish', function() {
+    it('should publish a plugin', function() {
+        var sPublish = spyOn(registry, 'publish').andReturn(Q(['/path/to/my/plugin']));
+        publish(new Array('/path/to/myplugin'));
+        expect(sPublish).toHaveBeenCalledWith(['/path/to/myplugin']);
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/registry/registry.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/registry/registry.spec.js b/cordova-lib/spec-plugman/registry/registry.spec.js
new file mode 100644
index 0000000..7615ee6
--- /dev/null
+++ b/cordova-lib/spec-plugman/registry/registry.spec.js
@@ -0,0 +1,134 @@
+var registry = require('../../src/registry/registry'),
+    manifest = require('../../src/registry/manifest'),
+    fs = require('fs'),
+    path = require('path'),
+    Q = require('q'),
+    shell   = require('shelljs'),
+    os = require('os'),
+    npm = require('npm');
+
+describe('registry', function() {
+    var done;
+    beforeEach(function() {
+        done = false;
+    });
+    function registryPromise(shouldSucceed, f) {
+        waitsFor(function() { return done; }, 'promise never resolved', 500);
+        return f.then(function() {
+          done = true;
+          expect(shouldSucceed).toBe(true);
+        }, function(err) {
+          done = err;
+          expect(shouldSucceed).toBe(false);
+        });
+    }
+
+    describe('manifest', function() {
+        var pluginDir, packageJson, tmp_plugin, tmp_plugin_xml, tmp_package_json;
+        beforeEach(function() {
+            pluginDir = __dirname + '/../plugins/EnginePlugin';
+            tmp_plugin = path.join(os.tmpdir(), 'plugin');
+            tmp_plugin_xml = path.join(tmp_plugin, 'plugin.xml');
+            tmp_package_json = path.join(tmp_plugin, 'package.json');
+            shell.cp('-R', pluginDir+"/*", tmp_plugin);
+        });
+        afterEach(function() {
+            shell.rm('-rf', tmp_plugin);
+        });
+        it('should generate a package.json from a plugin.xml', function() {
+            registryPromise(true, manifest.generatePackageJsonFromPluginXml(tmp_plugin).then(function() {
+                expect(fs.existsSync(tmp_package_json));
+                var packageJson = JSON.parse(fs.readFileSync(tmp_package_json));
+                expect(packageJson.name).toEqual('com.cordova.engine');
+                expect(packageJson.version).toEqual('1.0.0');
+                expect(packageJson.engines).toEqual(
+                    [ { name : 'cordova', version : '>=2.3.0' }, { name : 'cordova-plugman', version : '>=0.10.0' }, { name : 'mega-fun-plugin', version : '>=1.0.0' }, { name : 'mega-boring-plugin', version : '>=3.0.0' } ]);
+            }));
+        });
+        it('should raise an error if name does not follow com.domain.* format', function() {
+            var xmlData = fs.readFileSync(tmp_plugin_xml).toString().replace('id="com.cordova.engine"', 'id="engine"');
+            fs.writeFileSync(tmp_plugin_xml, xmlData);
+            registryPromise(false, manifest.generatePackageJsonFromPluginXml(tmp_plugin));
+        });
+        it('should generate a package.json if name uses org.apache.cordova.* for a whitelisted plugin', function() {
+            var xmlData = fs.readFileSync(tmp_plugin_xml).toString().replace('id="com.cordova.engine"', 'id="org.apache.cordova.camera"');
+            fs.writeFileSync(tmp_plugin_xml, xmlData);
+            registryPromise(true, manifest.generatePackageJsonFromPluginXml(tmp_plugin).then(function() {
+                expect(!fs.existsSync(tmp_package_json));
+            }));
+        });
+        it('should raise an error if name uses org.apache.cordova.* for a non-whitelisted plugin', function() {
+            var xmlData = fs.readFileSync(tmp_plugin_xml).toString().replace('id="com.cordova.engine"', 'id="org.apache.cordova.myinvalidplugin"');
+            fs.writeFileSync(tmp_plugin_xml, xmlData);
+            registryPromise(false, manifest.generatePackageJsonFromPluginXml(tmp_plugin));
+        });
+    });
+    describe('actions', function() {
+        var fakeLoad, fakeNPMCommands;
+
+        beforeEach(function() {
+            done = false;
+            var fakeSettings = {
+                cache: '/some/cache/dir',
+                logstream: 'somelogstream@2313213',
+                userconfig: '/some/config/dir'
+            };
+
+            var fakeNPM = function() {
+                if (arguments.length > 0) {
+                    var cb = arguments[arguments.length-1];
+                    if (cb && typeof cb === 'function') cb(null, true);
+                }
+            };
+
+            registry.settings = fakeSettings;
+            fakeLoad = spyOn(npm, 'load').andCallFake(function(settings, cb) { cb(null, true); });
+
+            fakeNPMCommands = {};
+            ['config', 'adduser', 'cache', 'publish', 'unpublish', 'search'].forEach(function(cmd) {
+                fakeNPMCommands[cmd] = jasmine.createSpy(cmd).andCallFake(fakeNPM);
+            });
+
+            npm.commands = fakeNPMCommands;
+        });
+        it('should run config', function() {
+            var params = ['set', 'registry', 'http://registry.cordova.io'];
+            registryPromise(true, registry.config(params).then(function() {
+                expect(fakeLoad).toHaveBeenCalledWith(registry.settings, jasmine.any(Function));
+                expect(fakeNPMCommands.config).toHaveBeenCalledWith(params, jasmine.any(Function));
+            }));
+        });
+        it('should run adduser', function() {
+            registryPromise(true, registry.adduser(null).then(function() {
+                expect(fakeLoad).toHaveBeenCalledWith(registry.settings, jasmine.any(Function));
+                expect(fakeNPMCommands.adduser).toHaveBeenCalledWith(null, jasmine.any(Function));
+            }));
+        });
+        it('should run publish', function() {
+            var params = [__dirname + '/../plugins/DummyPlugin'];
+            var spyGenerate = spyOn(manifest, 'generatePackageJsonFromPluginXml').andReturn(Q());
+            var spyUnlink = spyOn(fs, 'unlink');
+            registryPromise(true, registry.publish(params).then(function() {
+                expect(fakeLoad).toHaveBeenCalledWith(registry.settings, jasmine.any(Function));
+                expect(spyGenerate).toHaveBeenCalledWith(params[0]);
+                expect(fakeNPMCommands.publish).toHaveBeenCalledWith(params, jasmine.any(Function));
+                expect(spyUnlink).toHaveBeenCalledWith(path.resolve(params[0], 'package.json'));
+            }));
+        });
+        it('should run unpublish', function() {
+            var params = ['dummyplugin@0.6.0'];
+            registryPromise(true, registry.unpublish(params).then(function() {
+                expect(fakeLoad).toHaveBeenCalledWith(registry.settings, jasmine.any(Function));
+                expect(fakeNPMCommands.unpublish).toHaveBeenCalledWith(params, jasmine.any(Function));
+                expect(fakeNPMCommands.cache).toHaveBeenCalledWith(['clean'], jasmine.any(Function));
+            }));
+        });
+        it('should run search', function() {
+            var params = ['dummyplugin', 'plugin'];
+            registryPromise(true, registry.search(params).then(function() {
+                expect(fakeLoad).toHaveBeenCalledWith(registry.settings, jasmine.any(Function));
+                expect(fakeNPMCommands.search).toHaveBeenCalledWith(params, true, jasmine.any(Function));
+            }));
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/search.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/search.spec.js b/cordova-lib/spec-plugman/search.spec.js
new file mode 100644
index 0000000..4955d2d
--- /dev/null
+++ b/cordova-lib/spec-plugman/search.spec.js
@@ -0,0 +1,11 @@
+var search = require('../src/search'),
+    Q = require('q'),
+    registry = require('../src/registry/registry');
+
+describe('search', function() {
+    it('should search a plugin', function() {
+        var sSearch = spyOn(registry, 'search').andReturn(Q());
+        search(new Array('myplugin', 'keyword'));
+        expect(sSearch).toHaveBeenCalledWith(['myplugin', 'keyword']);
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/uninstall.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/uninstall.spec.js b/cordova-lib/spec-plugman/uninstall.spec.js
new file mode 100644
index 0000000..a8c2b97
--- /dev/null
+++ b/cordova-lib/spec-plugman/uninstall.spec.js
@@ -0,0 +1,289 @@
+var uninstall = require('../src/uninstall'),
+    install = require('../src/install'),
+    actions = require('../src/util/action-stack'),
+    config_changes = require('../src/util/config-changes'),
+    events  = require('../src/events'),
+    plugman = require('../plugman'),
+    common  = require('./common'),
+    fs      = require('fs'),
+    path    = require('path'),
+    shell   = require('shelljs'),
+    Q       = require('q'),
+    spec    = __dirname,
+    done    = false,
+    srcProject = path.join(spec, 'projects', 'android_uninstall'),
+    project = path.join(spec, 'projects', 'android_uninstall.test'),
+    project2 = path.join(spec, 'projects', 'android_uninstall.test2'),
+
+    plugins_dir = path.join(spec, 'plugins'),
+    plugins_install_dir = path.join(project, 'cordova', 'plugins'),
+    plugins_install_dir2 = path.join(project2, 'cordova', 'plugins'),
+
+    plugins = {
+        'DummyPlugin' : path.join(plugins_dir, 'DummyPlugin'),
+        'A' : path.join(plugins_dir, 'dependencies', 'A'),
+        'C' : path.join(plugins_dir, 'dependencies', 'C')
+    },
+    promise,
+    dummy_id = 'com.phonegap.plugins.dummyplugin';
+
+function uninstallPromise(f) {
+    return f.then(function() { done = true; }, function(err) { done = err; });
+}
+
+describe('start', function() {
+
+    it('start', function() {
+        shell.rm('-rf', project);
+        shell.rm('-rf', project2);
+        shell.cp('-R', path.join(srcProject, '*'), project);
+        shell.cp('-R', path.join(srcProject, '*'), project2);
+
+        done = false;
+        promise = Q()
+        .then(
+            function(){ return install('android', project, plugins['DummyPlugin']) }
+        ).then(
+            function(){ return install('android', project, plugins['A']) }
+        ).then(
+            function(){ return install('android', project2, plugins['C']) }
+        ).then(
+            function(){ return install('android', project2, plugins['A']) }
+        ).then(
+            function(){ done = true; }
+        );
+        waitsFor(function() { return done; }, 'promise never resolved', 500);
+    });
+});
+
+describe('uninstallPlatform', function() {
+    var proc, prepare, actions_push, add_to_queue, c_a, rm;
+    var fsWrite;
+
+    var plat_common = require('../src/platforms/common');
+
+    beforeEach(function() {
+        proc = spyOn(actions.prototype, 'process').andReturn(Q());
+        actions_push = spyOn(actions.prototype, 'push');
+        c_a = spyOn(actions.prototype, 'createAction');
+        prepare = spyOn(plugman, 'prepare');
+        fsWrite = spyOn(fs, 'writeFileSync').andReturn(true);
+        rm = spyOn(shell, 'rm').andReturn(true);
+        spyOn(shell, 'cp').andReturn(true);
+        add_to_queue = spyOn(config_changes, 'add_uninstalled_plugin_to_prepare_queue');
+        done = false;
+    });
+    describe('success', function() {
+        it('should call prepare after a successful uninstall', function() {
+            runs(function() {
+                uninstallPromise(uninstall.uninstallPlatform('android', project, dummy_id));
+            });
+            waitsFor(function() { return done; }, 'promise never resolved', 200);
+            runs(function() {
+                expect(prepare).toHaveBeenCalled();
+            });
+        });
+        it('should call the config-changes module\'s add_uninstalled_plugin_to_prepare_queue method after processing an install', function() {
+            runs(function() {
+                uninstallPromise(uninstall.uninstallPlatform('android', project, dummy_id));
+            });
+            waitsFor(function() { return done; }, 'promise never resolved', 200);
+            runs(function() {
+                expect(add_to_queue).toHaveBeenCalledWith(plugins_install_dir, dummy_id, 'android', true);
+            });
+        });
+        it('should queue up actions as appropriate for that plugin and call process on the action stack', function() {
+            runs(function() {
+                uninstallPromise(uninstall.uninstallPlatform('android', project, dummy_id));
+            });
+            waitsFor(function() { return done; }, 'promise never resolved', 200);
+            runs(function() {
+                expect(actions_push.calls.length).toEqual(5);
+                expect(proc).toHaveBeenCalled();
+            });
+        });
+
+        describe('with dependencies', function() {
+            var emit;
+            beforeEach(function() {
+                emit = spyOn(events, 'emit');
+            });
+            it('should uninstall "dangling" dependencies', function() {
+                runs(function() {
+                    uninstallPromise(uninstall.uninstallPlatform('android', project, 'A'));
+                });
+                waitsFor(function() { return done; }, 'promise never resolved', 200);
+                runs(function() {
+                    expect(emit).toHaveBeenCalledWith('log', 'Uninstalling 2 dependent plugins.');
+                });
+            });
+        });
+    });
+
+    describe('failure', function() {
+        it('should throw if platform is unrecognized', function() {
+            runs(function() {
+                uninstallPromise( uninstall.uninstallPlatform('atari', project, 'SomePlugin') );
+            });
+            waitsFor(function() { return done; }, 'promise never resolved', 200);
+            runs(function() {
+                expect(''+done).toContain('atari not supported.');
+            });
+        });
+        it('should throw if plugin is missing', function() {
+            runs(function() {
+                uninstallPromise( uninstall.uninstallPlatform('android', project, 'SomePluginThatDoesntExist') );
+            });
+            waitsFor(function() { return done; }, 'promise never resolved', 200);
+            runs(function() {
+                expect(''+done).toContain('Plugin "SomePluginThatDoesntExist" not found. Already uninstalled?');
+            });
+        });
+    });
+});
+
+describe('uninstallPlugin', function() {
+    var rm, fsWrite, rmstack = [], emit;
+
+    beforeEach(function() {
+        fsWrite = spyOn(fs, 'writeFileSync').andReturn(true);
+        rm = spyOn(shell, 'rm').andCallFake(function(f,p) { rmstack.push(p); return true});
+        rmstack = [];
+        emit = spyOn(events, 'emit');
+        done = false;
+    });
+    describe('with dependencies', function() {
+
+        it('should delete all dependent plugins', function() {
+            runs(function() {
+                uninstallPromise( uninstall.uninstallPlugin('A', plugins_install_dir) );
+            });
+            waitsFor(function() { return done; }, 'promise never resolved', 200);
+            runs(function() {
+                var del = common.spy.getDeleted(emit);
+
+                expect(del).toEqual([
+                    'Deleted "C"',
+                    'Deleted "D"',
+                    'Deleted "A"'
+                ]);
+            });
+        });
+
+        it("should fail if plugin is a required dependency", function() {
+            runs(function() {
+                uninstallPromise( uninstall.uninstallPlugin('C', plugins_install_dir) );
+            });
+            waitsFor(function() { return done; }, 'promise never resolved', 200);
+            runs(function() {
+                expect(done.message).toBe('"C" is required by (A) and cannot be removed (hint: use -f or --force)');
+            });
+        });
+
+        it("allow forcefully removing a plugin", function() {
+            runs(function() {
+                uninstallPromise( uninstall.uninstallPlugin('C', plugins_install_dir, {force: true}) );
+            });
+            waitsFor(function() { return done; }, 'promise never resolved', 200);
+            runs(function() {
+                expect(done).toBe(true);
+                var del = common.spy.getDeleted(emit);
+                expect(del).toEqual(['Deleted "C"']);
+            });
+        });
+
+        it("never remove top level plugins if they are a dependency", function() {
+            runs(function() {
+                uninstallPromise( uninstall.uninstallPlugin('A', plugins_install_dir2) );
+            });
+            waitsFor(function() { return done; }, 'promise never resolved', 200);
+            runs(function() {
+                var del = common.spy.getDeleted(emit);
+
+                expect(del).toEqual([
+                    'Deleted "D"',
+                    'Deleted "A"'
+                ]);
+            });
+        });
+    });
+});
+
+describe('uninstall', function() {
+    var fsWrite, rm, add_to_queue;
+
+    beforeEach(function() {
+        fsWrite = spyOn(fs, 'writeFileSync').andReturn(true);
+        rm = spyOn(shell, 'rm').andReturn(true);
+        add_to_queue = spyOn(config_changes, 'add_uninstalled_plugin_to_prepare_queue');
+        done = false;
+    });
+    describe('success', function() {
+        it('should call the config-changes module\'s add_uninstalled_plugin_to_prepare_queue method after processing an install', function() {
+            runs(function() {
+                uninstallPromise( uninstall('android', project, plugins['DummyPlugin']) );
+            });
+            waitsFor(function() { return done; }, 'promise never resolved', 200);
+            runs(function() {
+                expect(add_to_queue).toHaveBeenCalledWith(plugins_install_dir, dummy_id, 'android', true);
+            });
+        });
+    });
+
+    describe('failure', function() {
+        it('should throw if platform is unrecognized', function() {
+            runs(function() {
+                uninstallPromise(uninstall('atari', project, 'SomePlugin'));
+            });
+            waitsFor(function() { return done; }, 'promise never resolved', 200);
+            runs(function() {
+                expect(''+done).toContain('atari not supported.');
+            });
+        });
+        it('should throw if plugin is missing', function() {
+            runs(function() {
+                uninstallPromise(uninstall('android', project, 'SomePluginThatDoesntExist'));
+            });
+            waitsFor(function() { return done; }, 'promise never resolved', 200);
+            runs(function() {
+                expect(''+done).toContain('Plugin "SomePluginThatDoesntExist" not found. Already uninstalled?');
+            });
+        });
+    });
+});
+
+describe('end', function() {
+
+    it('end', function() {
+        done = false;
+
+        promise.then(
+            function(){
+                return uninstall('android', project, plugins['DummyPlugin'])
+            }
+        ).then(
+            function(){
+                // Fails... A depends on
+                return uninstall('android', project, plugins['C'])
+            }
+        ).fail(
+            function(err) {
+                expect(err.message).toBe("The plugin 'C' is required by (A), skipping uninstallation.");
+            }
+        ).then(
+            function(){
+                // dependencies on C,D ... should this only work with --recursive? prompt user..?
+                return uninstall('android', project, plugins['A'])
+            }
+        ).fin(function(err){
+            if(err)
+                plugman.emit('error', err);
+
+            shell.rm('-rf', project);
+            shell.rm('-rf', project2);
+            done = true;
+        });
+
+        waitsFor(function() { return done; }, 'promise never resolved', 500);
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/unpublish.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/unpublish.spec.js b/cordova-lib/spec-plugman/unpublish.spec.js
new file mode 100644
index 0000000..944f640
--- /dev/null
+++ b/cordova-lib/spec-plugman/unpublish.spec.js
@@ -0,0 +1,11 @@
+var unpublish = require('../src/unpublish'),
+    Q = require('q'),
+    registry = require('../src/registry/registry');
+
+describe('unpublish', function() {
+    it('should unpublish a plugin', function() {
+        var sUnpublish = spyOn(registry, 'unpublish').andReturn(Q());
+        unpublish(new Array('myplugin@0.0.1'));
+        expect(sUnpublish).toHaveBeenCalledWith(['myplugin@0.0.1']);
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/util/action-stack.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/util/action-stack.spec.js b/cordova-lib/spec-plugman/util/action-stack.spec.js
new file mode 100644
index 0000000..3aa732f
--- /dev/null
+++ b/cordova-lib/spec-plugman/util/action-stack.spec.js
@@ -0,0 +1,58 @@
+var action_stack = require('../../src/util/action-stack'),
+    ios = require('../../src/platforms/ios');
+
+describe('action-stack', function() {
+    var stack;
+    beforeEach(function() {
+        stack = new action_stack();
+    });
+    describe('processing of actions', function() {
+        it('should process actions one at a time until all are done', function() {
+            var first_spy = jasmine.createSpy();
+            var first_args = [1];
+            var second_spy = jasmine.createSpy();
+            var second_args = [2];
+            var third_spy = jasmine.createSpy();
+            var third_args = [3];
+            stack.push(stack.createAction(first_spy, first_args, function(){}, []));
+            stack.push(stack.createAction(second_spy, second_args, function(){}, []));
+            stack.push(stack.createAction(third_spy, third_args, function(){}, []));
+            stack.process('android', 'blah');
+            expect(first_spy).toHaveBeenCalledWith(first_args[0]);
+            expect(second_spy).toHaveBeenCalledWith(second_args[0]);
+            expect(third_spy).toHaveBeenCalledWith(third_args[0]);
+        });
+        it('should revert processed actions if an exception occurs', function() {
+            spyOn(console, 'log');
+            var first_spy = jasmine.createSpy();
+            var first_args = [1];
+            var first_reverter = jasmine.createSpy();
+            var first_reverter_args = [true];
+            var process_err = new Error('process_err');
+            var second_spy = jasmine.createSpy().andCallFake(function() {
+                throw process_err;
+            });
+            var second_args = [2];
+            var third_spy = jasmine.createSpy();
+            var third_args = [3];
+            stack.push(stack.createAction(first_spy, first_args, first_reverter, first_reverter_args));
+            stack.push(stack.createAction(second_spy, second_args, function(){}, []));
+            stack.push(stack.createAction(third_spy, third_args, function(){}, []));
+            // process should throw
+            var error;
+            runs(function() {
+                stack.process('android', 'blah').fail(function(err) { error = err; });
+            });
+            waitsFor(function(){ return error; }, 'process promise never resolved', 500);
+            runs(function() {
+                expect(error).toEqual(process_err);
+                // first two actions should have been called, but not the third
+                expect(first_spy).toHaveBeenCalledWith(first_args[0]);
+                expect(second_spy).toHaveBeenCalledWith(second_args[0]);
+                expect(third_spy).not.toHaveBeenCalledWith(third_args[0]);
+                // first reverter should have been called after second action exploded
+                expect(first_reverter).toHaveBeenCalledWith(first_reverter_args[0]);
+            });
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/util/config-changes.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/util/config-changes.spec.js b/cordova-lib/spec-plugman/util/config-changes.spec.js
new file mode 100644
index 0000000..9d93d72
--- /dev/null
+++ b/cordova-lib/spec-plugman/util/config-changes.spec.js
@@ -0,0 +1,449 @@
+/* jshint node:true, sub:true, indent:4  */
+/* global jasmine, describe, beforeEach, afterEach, it, spyOn, expect */
+
+var configChanges = require('../../src/util/config-changes'),
+    xml_helpers = require('../../src/util/xml-helpers'),
+    ios_parser = require('../../src/platforms/ios'),
+    fs      = require('fs'),
+    os      = require('osenv'),
+    plugman = require('../../plugman'),
+    events  = require('../../src/events'),
+    et      = require('elementtree'),
+    path    = require('path'),
+    plist = require('plist-with-patches'),
+    shell   = require('shelljs'),
+    xcode = require('xcode'),
+    temp    = path.join(os.tmpdir(), 'plugman'),
+    dummyplugin = path.join(__dirname, '..', 'plugins', 'DummyPlugin'),
+    cbplugin = path.join(__dirname, '..', 'plugins', 'ChildBrowser'),
+    childrenplugin = path.join(__dirname, '..', 'plugins', 'multiple-children'),
+    shareddepsplugin = path.join(__dirname, '..', 'plugins', 'shared-deps-multi-child'),
+    configplugin = path.join(__dirname, '..', 'plugins', 'ConfigTestPlugin'),
+    varplugin = path.join(__dirname, '..', 'plugins', 'VariablePlugin'),
+    android_two_project = path.join(__dirname, '..', 'projects', 'android_two', '*'),
+    android_two_no_perms_project = path.join(__dirname, '..', 'projects', 'android_two_no_perms', '*'),
+    ios_plist_project = path.join(__dirname, '..', 'projects', 'ios-plist', '*'),
+    ios_config_xml = path.join(__dirname, '..', 'projects', 'ios-config-xml', '*'),
+    plugins_dir = path.join(temp, 'cordova', 'plugins');
+
+// TODO: dont do fs so much
+
+var dummy_xml = new et.ElementTree(et.XML(fs.readFileSync(path.join(dummyplugin, 'plugin.xml'), 'utf-8')));
+
+function innerXML(xmltext) {
+    return xmltext.replace(/^<[\w\s\-=\/"\.]+>/, '').replace(/<\/[\w\s\-=\/"\.]+>$/,'');
+}
+
+describe('config-changes module', function() {
+    beforeEach(function() {
+        shell.mkdir('-p', temp);
+        shell.mkdir('-p', plugins_dir);
+    });
+    afterEach(function() {
+        shell.rm('-rf', temp);
+        ios_parser.purgeProjectFileCache(temp);
+    });
+
+    describe('queue methods', function() {
+        describe('add_installed_plugin_to_prepare_queue', function() {
+            it('should call get_platform_json method', function() {
+                var spy = spyOn(configChanges, 'get_platform_json').andReturn({
+                    prepare_queue:{
+                        installed:[],
+                        uninstalled:[]
+                    }
+                });
+                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'PooPlugin', 'android', {});
+                expect(spy).toHaveBeenCalledWith(plugins_dir, 'android');
+            });
+            it('should append specified plugin to platform.json', function() {
+                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'PooPlugin', 'android', {});
+                var json = configChanges.get_platform_json(plugins_dir, 'android');
+                expect(json.prepare_queue.installed[0].plugin).toEqual('PooPlugin');
+                expect(json.prepare_queue.installed[0].vars).toEqual({});
+            });
+            it('should append specified plugin with any variables to platform.json', function() {
+                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'PooPlugin', 'android', {'dude':'man'});
+                var json = configChanges.get_platform_json(plugins_dir, 'android');
+                expect(json.prepare_queue.installed[0].plugin).toEqual('PooPlugin');
+                expect(json.prepare_queue.installed[0].vars).toEqual({'dude':'man'});
+            });
+            it('should call save_platform_json with updated config', function() {
+                var spy = spyOn(configChanges, 'save_platform_json');
+                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'PooPlugin', 'android', {});
+                var config = spy.mostRecentCall.args[0];
+                expect(config.prepare_queue.installed[0].plugin).toEqual('PooPlugin');
+            });
+        });
+
+        describe('add_uninstalled_plugin_to_prepare_queue', function() {
+            beforeEach(function() {
+                shell.cp('-rf', dummyplugin, plugins_dir);
+            });
+
+            it('should call get_platform_json method', function() {
+                var spy = spyOn(configChanges, 'get_platform_json').andReturn({
+                    prepare_queue:{
+                        installed:[],
+                        uninstalled:[]
+                    }
+                });
+                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'DummyPlugin', 'android');
+                expect(spy).toHaveBeenCalledWith(plugins_dir, 'android');
+            });
+            it('should append specified plugin to platform.json', function() {
+                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'DummyPlugin', 'android');
+                var json = configChanges.get_platform_json(plugins_dir, 'android');
+                expect(json.prepare_queue.uninstalled[0].plugin).toEqual('DummyPlugin');
+                expect(json.prepare_queue.uninstalled[0].id).toEqual('com.phonegap.plugins.dummyplugin');
+            });
+            it('should call save_platform_json with updated config', function() {
+                var spy = spyOn(configChanges, 'save_platform_json');
+                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'DummyPlugin', 'android', {});
+                var config = spy.mostRecentCall.args[0];
+                expect(config.prepare_queue.uninstalled[0].plugin).toEqual('DummyPlugin');
+                expect(config.prepare_queue.uninstalled[0].id).toEqual('com.phonegap.plugins.dummyplugin');
+            });
+        });
+    });
+
+    describe('get_platform_json method', function() {
+        it('should return an empty config json object if file doesn\'t exist', function() {
+            var filepath = path.join(plugins_dir, 'android.json');
+            var cfg = configChanges.get_platform_json(plugins_dir, 'android');
+            expect(cfg).toBeDefined();
+            expect(cfg.prepare_queue).toBeDefined();
+            expect(cfg.config_munge).toBeDefined();
+            expect(cfg.installed_plugins).toBeDefined();
+        });
+        it('should return the json file if it exists', function() {
+            var filepath = path.join(plugins_dir, 'android.json');
+            var json = {
+                prepare_queue: {installed: [], uninstalled: []},
+                config_munge: {files: {"some_file": {parents: {"some_parent": [{"xml": "some_change", "count": 1}]}}}},
+                installed_plugins: {}};
+            fs.writeFileSync(filepath, JSON.stringify(json), 'utf-8');
+            var cfg = configChanges.get_platform_json(plugins_dir, 'android');
+            expect(JSON.stringify(json)).toEqual(JSON.stringify(cfg));
+        });
+    });
+
+    describe('save_platform_json method', function() {
+        it('should write out specified json', function() {
+            var filepath = path.join(plugins_dir, 'android.json');
+            var cfg = {poop:true};
+            configChanges.save_platform_json(cfg, plugins_dir, 'android');
+            expect(fs.existsSync(filepath)).toBe(true);
+            expect(JSON.parse(fs.readFileSync(filepath, 'utf-8'))).toEqual(cfg);
+        });
+    });
+
+    describe('generate_plugin_config_munge method', function() {
+        describe('for android projects', function() {
+            beforeEach(function() {
+                shell.cp('-rf', android_two_project, temp);
+            });
+            it('should return a flat config hierarchy for simple, one-off config changes', function() {
+                var xml;
+                var munger = new configChanges.PlatformMunger('android', temp, 'unused');
+                var munge = munger.generate_plugin_config_munge(dummyplugin, {});
+                expect(munge.files['AndroidManifest.xml']).toBeDefined();
+                expect(munge.files['AndroidManifest.xml'].parents['/manifest/application']).toBeDefined();
+                xml = (new et.ElementTree(dummy_xml.find('./platform[@name="android"]/config-file[@target="AndroidManifest.xml"]'))).write({xml_declaration:false});
+                xml = innerXML(xml);
+                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest/application', xml).count).toEqual(1);
+                expect(munge.files['res/xml/plugins.xml']).toBeDefined();
+                expect(munge.files['res/xml/plugins.xml'].parents['/plugins']).toBeDefined();
+                xml = (new et.ElementTree(dummy_xml.find('./platform[@name="android"]/config-file[@target="res/xml/plugins.xml"]'))).write({xml_declaration:false});
+                xml = innerXML(xml);
+                expect(configChanges.get_munge_change(munge, 'res/xml/plugins.xml', '/plugins', xml).count).toEqual(1);
+                expect(munge.files['res/xml/config.xml']).toBeDefined();
+                expect(munge.files['res/xml/config.xml'].parents['/cordova/plugins']).toBeDefined();
+                xml = (new et.ElementTree(dummy_xml.find('./platform[@name="android"]/config-file[@target="res/xml/config.xml"]'))).write({xml_declaration:false});
+                xml = innerXML(xml);
+                expect(configChanges.get_munge_change(munge, 'res/xml/config.xml', '/cordova/plugins', xml).count).toEqual(1);
+            });
+            it('should split out multiple children of config-file elements into individual leaves', function() {
+                var munger = new configChanges.PlatformMunger('android', temp, 'unused');
+                var munge = munger.generate_plugin_config_munge(childrenplugin, {});
+                expect(munge.files['AndroidManifest.xml']).toBeDefined();
+                expect(munge.files['AndroidManifest.xml'].parents['/manifest']).toBeDefined();
+                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />')).toBeDefined();
+                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />')).toBeDefined();
+                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="android.permission.READ_PHONE_STATE" />')).toBeDefined();
+                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="android.permission.INTERNET" />')).toBeDefined();
+                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="android.permission.GET_ACCOUNTS" />')).toBeDefined();
+                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="android.permission.WAKE_LOCK" />')).toBeDefined();
+                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<permission android:name="com.alunny.childapp.permission.C2D_MESSAGE" android:protectionLevel="signature" />')).toBeDefined();
+                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="com.alunny.childapp.permission.C2D_MESSAGE" />')).toBeDefined();
+                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />')).toBeDefined();
+            });
+            it('should not use xml comments as config munge leaves', function() {
+                var munger = new configChanges.PlatformMunger('android', temp, 'unused');
+                var munge = munger.generate_plugin_config_munge(childrenplugin, {});
+                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<!--library-->')).not.toBeDefined();
+                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<!-- GCM connects to Google Services. -->')).not.toBeDefined();
+            });
+            it('should increment config hierarchy leaves if different config-file elements target the same file + selector + xml', function() {
+                var munger = new configChanges.PlatformMunger('android', temp, 'unused');
+                var munge = munger.generate_plugin_config_munge(configplugin, {});
+                expect(configChanges.get_munge_change(munge, 'res/xml/config.xml', '/widget', '<poop />').count).toEqual(2);
+            });
+            it('should take into account interpolation variables', function() {
+                var munger = new configChanges.PlatformMunger('android', temp, 'unused');
+                var munge = munger.generate_plugin_config_munge(childrenplugin, {PACKAGE_NAME:'ca.filmaj.plugins'});
+                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="ca.filmaj.plugins.permission.C2D_MESSAGE" />')).toBeDefined();
+            });
+            it('should create munges for platform-agnostic config.xml changes', function() {
+                var munger = new configChanges.PlatformMunger('android', temp, 'unused');
+                var munge = munger.generate_plugin_config_munge(dummyplugin, {});
+                expect(configChanges.get_munge_change(munge, 'config.xml', '/*', '<access origin="build.phonegap.com" />')).toBeDefined();
+                expect(configChanges.get_munge_change(munge, 'config.xml', '/*', '<access origin="s3.amazonaws.com" />')).toBeDefined();
+            });
+            it('should automatically add on app java identifier as PACKAGE_NAME variable for android config munges', function() {
+                shell.cp('-rf', android_two_project, temp);
+                var munger = new configChanges.PlatformMunger('android', temp, 'unused');
+                var munge = munger.generate_plugin_config_munge(varplugin, {});
+                var expected_xml = '<package>com.alunny.childapp</package>';
+                expect(configChanges.get_munge_change(munge, 'AndroidManifest.xml', '/manifest', expected_xml)).toBeDefined();
+            });
+        });
+
+        describe('for ios projects', function() {
+            beforeEach(function() {
+                shell.cp('-rf', ios_config_xml, temp);
+            });
+            it('should automatically add on ios bundle identifier as PACKAGE_NAME variable for ios config munges', function() {
+                var munger = new configChanges.PlatformMunger('ios', temp, 'unused');
+                var munge = munger.generate_plugin_config_munge(varplugin, {});
+                var expected_xml = '<cfbundleid>com.example.friendstring</cfbundleid>';
+                expect(configChanges.get_munge_change(munge, 'config.xml', '/widget', expected_xml)).toBeDefined();
+            });
+            it('should special case framework elements for ios', function() {
+                var munger = new configChanges.PlatformMunger('ios', temp, 'unused');
+                var munge = munger.generate_plugin_config_munge(cbplugin, {});
+                expect(munge.files['framework']).toBeDefined();
+                expect(configChanges.get_munge_change(munge, 'framework', 'libsqlite3.dylib', 'false')).toBeDefined();
+                expect(configChanges.get_munge_change(munge, 'framework', 'social.framework', 'true')).toBeDefined();
+                expect(configChanges.get_munge_change(munge, 'framework', 'music.framework', 'false')).toBeDefined();
+                expect(munge.files['framework'].parents['Custom.framework']).not.toBeDefined();
+            });
+        });
+    });
+
+    describe('processing of plugins (via process method)', function() {
+        beforeEach(function() {
+            shell.cp('-rf', dummyplugin, plugins_dir);
+        });
+        it('should generate config munges for queued plugins', function() {
+            shell.cp('-rf', android_two_project, temp);
+            var cfg = configChanges.get_platform_json(plugins_dir, 'android');
+            cfg.prepare_queue.installed = [{'plugin':'DummyPlugin', 'vars':{}}];
+            configChanges.save_platform_json(cfg, plugins_dir, 'android');
+            var munger = new configChanges.PlatformMunger('android', temp, plugins_dir);
+            var spy = spyOn(munger, 'generate_plugin_config_munge').andReturn({});
+            munger.process();
+            expect(spy).toHaveBeenCalledWith(path.join(plugins_dir, 'DummyPlugin'), {});
+        });
+        it('should get a reference to existing config munge by calling get_platform_json', function() {
+            shell.cp('-rf', android_two_project, temp);
+            var spy = spyOn(configChanges, 'get_platform_json').andReturn({
+                prepare_queue:{
+                    installed:[],
+                    uninstalled:[]
+                },
+                config_munge:{}
+            });
+            configChanges.process(plugins_dir, temp, 'android');
+            expect(spy).toHaveBeenCalledWith(plugins_dir, 'android');
+        });
+        describe(': installation', function() {
+            describe('of xml config files', function() {
+                beforeEach(function() {
+                    shell.cp('-rf', android_two_project, temp);
+                });
+                it('should call graftXML for every new config munge it introduces (every leaf in config munge that does not exist)', function() {
+                    var cfg = configChanges.get_platform_json(plugins_dir, 'android');
+                    cfg.prepare_queue.installed = [{'plugin':'DummyPlugin', 'vars':{}}];
+                    configChanges.save_platform_json(cfg, plugins_dir, 'android');
+
+                    var spy = spyOn(xml_helpers, 'graftXML').andReturn(true);
+
+                    var manifest_doc = new et.ElementTree(et.XML(fs.readFileSync(path.join(temp, 'AndroidManifest.xml'), 'utf-8')));
+                    var munge = dummy_xml.find('./platform[@name="android"]/config-file[@target="AndroidManifest.xml"]');
+                    configChanges.process(plugins_dir, temp, 'android');
+                    expect(spy.calls.length).toEqual(4);
+                    expect(spy.argsForCall[0][2]).toEqual('/*');
+                    expect(spy.argsForCall[1][2]).toEqual('/*');
+                    expect(spy.argsForCall[2][2]).toEqual('/manifest/application');
+                    expect(spy.argsForCall[3][2]).toEqual('/cordova/plugins');
+                });
+                it('should not call graftXML for a config munge that already exists from another plugin', function() {
+                    shell.cp('-rf', configplugin, plugins_dir);
+                    configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'ConfigTestPlugin', 'android', {});
+
+                    var spy = spyOn(xml_helpers, 'graftXML').andReturn(true);
+                    configChanges.process(plugins_dir, temp, 'android');
+                    expect(spy.calls.length).toEqual(1);
+                });
+                it('should not call graftXML for a config munge targeting a config file that does not exist', function() {
+                    configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'DummyPlugin', 'android', {});
+
+                    var spy = spyOn(fs, 'readFileSync').andCallThrough();
+
+                    configChanges.process(plugins_dir, temp, 'android');
+                    expect(spy).not.toHaveBeenCalledWith(path.join(temp, 'res', 'xml', 'plugins.xml'), 'utf-8');
+                });
+            });
+            describe('of plist config files', function() {
+                var xcode_add, xcode_rm;
+                it('should write empty string nodes with no whitespace', function() {
+                    shell.cp('-rf', ios_config_xml, temp);
+                    shell.cp('-rf', varplugin, plugins_dir);
+                    configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'ios', {});
+                    configChanges.process(plugins_dir, temp, 'ios');
+                    expect(fs.readFileSync(path.join(temp, 'SampleApp', 'SampleApp-Info.plist'), 'utf-8')).toMatch(/<key>APluginNode<\/key>\n    <string><\/string>/m);
+                });
+            });
+            describe('of pbxproject framework files', function() {
+                var xcode_add, xcode_rm;
+                beforeEach(function() {
+                    shell.cp('-rf', ios_config_xml, temp);
+                    shell.cp('-rf', cbplugin, plugins_dir);
+                    xcode_add = spyOn(xcode.project.prototype, 'addFramework').andCallThrough();
+                });
+                it('should call into xcode.addFramework if plugin has <framework> file defined and is ios',function() {
+                    configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'ChildBrowser', 'ios', {});
+                    configChanges.process(plugins_dir, temp, 'ios');
+                    expect(xcode_add).toHaveBeenCalledWith('libsqlite3.dylib', {weak:false});
+                    expect(xcode_add).toHaveBeenCalledWith('social.framework', {weak:true});
+                    expect(xcode_add).toHaveBeenCalledWith('music.framework', {weak:false});
+                    expect(xcode_add).not.toHaveBeenCalledWith('Custom.framework');
+                });
+            });
+            it('should resolve wildcard config-file targets to the project, if applicable', function() {
+                shell.cp('-rf', ios_config_xml, temp);
+                shell.cp('-rf', cbplugin, plugins_dir);
+                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'ChildBrowser', 'ios', {});
+                var spy = spyOn(fs, 'readFileSync').andCallThrough();
+
+                configChanges.process(plugins_dir, temp, 'ios');
+                expect(spy).toHaveBeenCalledWith(path.join(temp, 'SampleApp', 'SampleApp-Info.plist').replace(/\\/g, '/'), 'utf8');
+            });
+            it('should move successfully installed plugins from queue to installed plugins section, and include/retain vars if applicable', function() {
+                shell.cp('-rf', android_two_project, temp);
+                shell.cp('-rf', varplugin, plugins_dir);
+                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'android', {"API_KEY":"hi"}, true);
+
+                configChanges.process(plugins_dir, temp, 'android');
+
+                var cfg = configChanges.get_platform_json(plugins_dir, 'android');
+                expect(cfg.prepare_queue.installed.length).toEqual(0);
+                expect(cfg.installed_plugins['com.adobe.vars']).toBeDefined();
+                expect(cfg.installed_plugins['com.adobe.vars']['API_KEY']).toEqual('hi');
+            });
+            it('should save changes to global config munge after completing an install', function() {
+                shell.cp('-rf', android_two_project, temp);
+                shell.cp('-rf', varplugin, plugins_dir);
+                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'android', {"API_KEY":"hi"});
+
+                var spy = spyOn(configChanges, 'save_platform_json');
+                configChanges.process(plugins_dir, temp, 'android');
+                expect(spy).toHaveBeenCalled();
+            });
+        });
+
+        describe(': uninstallation', function() {
+            it('should call pruneXML for every config munge it completely removes from the app (every leaf that is decremented to 0)', function() {
+                shell.cp('-rf', android_two_project, temp);
+                // Run through an "install"
+                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'DummyPlugin', 'android', {});
+                configChanges.process(plugins_dir, temp, 'android');
+
+                // Now set up an uninstall and make sure prunexml is called properly
+                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'DummyPlugin', 'android');
+                var spy = spyOn(xml_helpers, 'pruneXML').andReturn(true);
+                configChanges.process(plugins_dir, temp, 'android');
+                expect(spy.calls.length).toEqual(4);
+                expect(spy.argsForCall[0][2]).toEqual('/*');
+                expect(spy.argsForCall[1][2]).toEqual('/*');
+                expect(spy.argsForCall[2][2]).toEqual('/manifest/application');
+                expect(spy.argsForCall[3][2]).toEqual('/cordova/plugins');
+            });
+            it('should generate a config munge that interpolates variables into config changes, if applicable', function() {
+                shell.cp('-rf', android_two_project, temp);
+                shell.cp('-rf', varplugin, plugins_dir);
+                // Run through an "install"
+                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'android', {"API_KEY":"canucks"});
+                var munger = new configChanges.PlatformMunger('android', temp, plugins_dir);
+                munger.process();
+
+                // Now set up an uninstall and make sure prunexml is called properly
+                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'android');
+                var spy = spyOn(munger, 'generate_plugin_config_munge').andReturn({});
+                munger.process();
+                var munge_params = spy.mostRecentCall.args;
+                expect(munge_params[0]).toEqual(path.join(plugins_dir, 'VariablePlugin'));
+                expect(munge_params[1]['API_KEY']).toEqual('canucks');
+            });
+            it('should not call pruneXML for a config munge that another plugin depends on', function() {
+                shell.cp('-rf', android_two_no_perms_project, temp);
+                shell.cp('-rf', childrenplugin, plugins_dir);
+                shell.cp('-rf', shareddepsplugin, plugins_dir);
+
+                // Run through and "install" two plugins (they share a permission for INTERNET)
+                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'multiple-children', 'android', {});
+                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'shared-deps-multi-child', 'android', {});
+                configChanges.process(plugins_dir, temp, 'android');
+
+                // Now set up an uninstall for multi-child plugin
+                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'multiple-children', 'android');
+                configChanges.process(plugins_dir, temp, 'android');
+                var am_xml = new et.ElementTree(et.XML(fs.readFileSync(path.join(temp, 'AndroidManifest.xml'), 'utf-8')));
+                var permission = am_xml.find('./uses-permission');
+                expect(permission).toBeDefined();
+                expect(permission.attrib['android:name']).toEqual('android.permission.INTERNET');
+            });
+            it('should not call pruneXML for a config munge targeting a config file that does not exist', function() {
+                shell.cp('-rf', android_two_project, temp);
+                // install a plugin
+                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'DummyPlugin', 'android', {});
+                configChanges.process(plugins_dir, temp, 'android');
+                // set up an uninstall for the same plugin
+                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'DummyPlugin', 'android', {});
+
+                var spy = spyOn(fs, 'readFileSync').andCallThrough();
+                configChanges.process(plugins_dir, temp, 'android');
+
+                expect(spy).not.toHaveBeenCalledWith(path.join(temp, 'res', 'xml', 'plugins.xml'), 'utf-8');
+            });
+            it('should remove uninstalled plugins from installed plugins list', function() {
+                shell.cp('-rf', android_two_project, temp);
+                shell.cp('-rf', varplugin, plugins_dir);
+                // install the var plugin
+                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'android', {"API_KEY":"eat my shorts"});
+                configChanges.process(plugins_dir, temp, 'android');
+                // queue up an uninstall for the same plugin
+                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'android');
+                configChanges.process(plugins_dir, temp, 'android');
+
+                var cfg = configChanges.get_platform_json(plugins_dir, 'android');
+                expect(cfg.prepare_queue.uninstalled.length).toEqual(0);
+                expect(cfg.installed_plugins['com.adobe.vars']).not.toBeDefined();
+            });
+            it('should save changes to global config munge after completing an uninstall', function() {
+                shell.cp('-rf', android_two_project, temp);
+                shell.cp('-rf', varplugin, plugins_dir);
+                // install a plugin
+                configChanges.add_installed_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'android', {"API_KEY":"eat my shorts"});
+                configChanges.process(plugins_dir, temp, 'android');
+                // set up an uninstall for the plugin
+                configChanges.add_uninstalled_plugin_to_prepare_queue(plugins_dir, 'VariablePlugin', 'android');
+
+                var spy = spyOn(configChanges, 'save_platform_json');
+                configChanges.process(plugins_dir, temp, 'android');
+                expect(spy).toHaveBeenCalled();
+            });
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/util/csproj.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/util/csproj.spec.js b/cordova-lib/spec-plugman/util/csproj.spec.js
new file mode 100644
index 0000000..c506c38
--- /dev/null
+++ b/cordova-lib/spec-plugman/util/csproj.spec.js
@@ -0,0 +1,97 @@
+var csproj  = require('../../src/util/csproj'),
+    path    = require('path'),
+    os      = require('osenv'),
+    et      = require('elementtree'),
+    fs      = require('fs'),
+    xml_helpers = require('../../src/util/xml-helpers');
+
+var wp7_project     = path.join(__dirname, '..', 'projects', 'wp7'),
+    wp8_project     = path.join(__dirname, '..', 'projects', 'wp8'),
+    temp            = path.join(os.tmpdir(), 'plugman'),
+    example1_csproj  = path.join(wp7_project, 'CordovaAppProj.csproj'),
+    example2_csproj  = path.join(wp8_project, 'CordovaAppProj.csproj'),
+    wpcsproj        = path.join(__dirname, '..', 'plugins', 'WPcsproj');
+
+describe('csproj', function() {
+    it('should throw if passed in an invalid xml file path ref', function() {
+        expect(function() {
+            new csproj('blahblah');
+        }).toThrow();
+    });
+    it('should successfully parse a valid csproj file into an xml document', function() {
+        var doc;
+        expect(function() {
+            doc = new csproj(example1_csproj);
+        }).not.toThrow();
+        expect(doc.xml.getroot()).toBeDefined();
+    });
+
+    describe('write method', function() {
+
+    });
+
+    describe('source file', function() {
+
+        var test_csproj;
+        var page_test   = path.join('src', 'UI', 'PageTest.xaml');
+        var page_test_cs = path.join('src', 'UI', 'PageTest.xaml.cs');
+        var lib_test    = path.join('lib', 'LibraryTest.dll');
+        var file_test   = path.join('src', 'FileTest.cs');
+        var content_test   = path.join('src', 'Content.img');
+
+        describe('add method', function() {
+            var test_csproj = new csproj(example1_csproj);
+            it('should properly add .xaml files', function() {
+                test_csproj.addSourceFile(page_test);
+                expect(test_csproj.xml.getroot().find('.//Page[@Include="src\\UI\\PageTest.xaml"]')).toBeTruthy();
+                expect(test_csproj.xml.getroot().find('.//Page[@Include="src\\UI\\PageTest.xaml"]/Generator').text).toEqual('MSBuild:Compile');
+                expect(test_csproj.xml.getroot().find('.//Page[@Include="src\\UI\\PageTest.xaml"]/SubType').text).toEqual('Designer');
+            });
+            it('should properly add .xaml.cs files', function() {
+                test_csproj.addSourceFile(page_test_cs);
+                expect(test_csproj.xml.getroot().find('.//Compile[@Include="src\\UI\\PageTest.xaml.cs"]')).toBeTruthy();
+                expect(test_csproj.xml.getroot().find('.//Compile[@Include="src\\UI\\PageTest.xaml.cs"]/DependentUpon').text).toEqual('PageTest.xaml');
+            });
+            it('should properly add .cs files', function() {
+                test_csproj.addSourceFile(file_test);
+                expect(test_csproj.xml.getroot().find('.//Compile[@Include="src\\FileTest.cs"]')).toBeTruthy();
+            });
+            it('should properly add content files', function() {
+                test_csproj.addSourceFile(content_test);
+                expect(test_csproj.xml.getroot().find('.//Content[@Include="src\\Content.img"]')).toBeTruthy();
+            });
+        });
+
+        describe('remove method', function() {
+            var test_csproj = new csproj(example2_csproj);
+            it('should properly remove .xaml pages', function() {
+                test_csproj.removeSourceFile(page_test);
+                expect(test_csproj.xml.getroot().find('.//Page[@Include="src\\UI\\PageTest.xaml"]')).toBeFalsy();
+            });
+            it('should properly remove .xaml.cs files', function() {
+                test_csproj.removeSourceFile(page_test_cs);
+                expect(test_csproj.xml.getroot().find('.//Compile[@Include="src\\UI\\PageTest.xaml.cs"]')).toBeFalsy();
+            });
+            it('should properly remove .cs files', function() {
+                test_csproj.removeSourceFile(file_test);
+                expect(test_csproj.xml.getroot().find('.//Compile[@Include="src\\FileTest.cs"]')).toBeFalsy();
+            });
+            it('should properly remove content files', function() {
+                test_csproj.removeSourceFile(content_test);
+                expect(test_csproj.xml.getroot().find('.//Content[@Include="src\\Content.img"]')).toBeFalsy();
+            });
+            it('should remove all empty ItemGroup\'s', function() {
+                test_csproj.removeSourceFile(page_test);
+                test_csproj.removeSourceFile(page_test_cs);
+                test_csproj.removeSourceFile(lib_test);
+                test_csproj.removeSourceFile(file_test);
+                var item_groups = test_csproj.xml.findall('ItemGroup');
+                for (var i = 0, l = item_groups.length; i < l; i++) {
+                    var group = item_groups[i];
+                    expect(group._children.length).toBeGreaterThan(0);
+                }
+            })
+
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0318d8cd/cordova-lib/spec-plugman/util/dependencies.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/util/dependencies.spec.js b/cordova-lib/spec-plugman/util/dependencies.spec.js
new file mode 100644
index 0000000..bbc7111
--- /dev/null
+++ b/cordova-lib/spec-plugman/util/dependencies.spec.js
@@ -0,0 +1,41 @@
+var dependencies = require('../../src/util/dependencies'),
+    xml_helpers = require('../../src/util/xml-helpers'),
+    path = require('path'),
+    config = require('../../src/util/config-changes');
+
+describe('dependency module', function() {
+    describe('generate_dependency_info method', function() {
+        it('should return a list of top-level plugins based on what is inside a platform.json file', function() {
+            var tlps = {
+                "hello":"",
+                "isitme":"",
+                "yourelookingfor":""
+            };
+            spyOn(xml_helpers, 'parseElementtreeSync').andReturn({findall:function(){}});
+            var spy = spyOn(config, 'get_platform_json').andReturn({
+                installed_plugins:tlps,
+                dependent_plugins:[]
+            });
+            var obj = dependencies.generate_dependency_info('some dir');
+            expect(obj.top_level_plugins).toEqual(Object.keys(tlps));
+        });
+        it('should return a dependency graph for the plugins', function() {
+            var tlps = {
+                "A":"",
+                "B":""
+            };
+            var deps = {
+                "C":"",
+                "D":"",
+                "E":""
+            };
+            var spy = spyOn(config, 'get_platform_json').andReturn({
+                installed_plugins:tlps,
+                dependent_plugins:[]
+            });
+            var obj = dependencies.generate_dependency_info(path.join(__dirname, '..', 'plugins', 'dependencies'), 'android');
+            expect(obj.graph.getChain('A')).toEqual(['C','D']);
+            expect(obj.graph.getChain('B')).toEqual(['D', 'E']);
+        });
+    });
+});