cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lorinb...@apache.org
Subject [5/6] [CB-3367] Updates the framework to work with a smarter plugman and have a dumber packager - Re-writes cordova/plugin scripts to match the CLI interface - Includes the use of a global plugin repository for lookup - Adds a native/<arch> folder for co
Date Mon, 20 May 2013 17:44:17 GMT
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/Contacts/src/blackberry10/contactUtils.js
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/Contacts/src/blackberry10/contactUtils.js b/blackberry10/bin/templates/project/plugins/Contacts/src/blackberry10/contactUtils.js
deleted file mode 100644
index cd022c4..0000000
--- a/blackberry10/bin/templates/project/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-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/Contacts/src/blackberry10/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/Contacts/src/blackberry10/index.js b/blackberry10/bin/templates/project/plugins/Contacts/src/blackberry10/index.js
deleted file mode 100644
index 09a4bd2..0000000
--- a/blackberry10/bin/templates/project/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-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/Device/plugin.xml
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/Device/plugin.xml b/blackberry10/bin/templates/project/plugins/Device/plugin.xml
deleted file mode 100644
index 39055c0..0000000
--- a/blackberry10/bin/templates/project/plugins/Device/plugin.xml
+++ /dev/null
@@ -1,29 +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"
-    version="0.0.1">
-
-    <name>Device</name>
-
-    <platform name="blackberry10">
-        <config-file target="www/config.xml" parent="/widget">
-            <feature name="Device" value="Device"/>
-        </config-file>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/Device/src/blackberry10/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/Device/src/blackberry10/index.js b/blackberry10/bin/templates/project/plugins/Device/src/blackberry10/index.js
deleted file mode 100644
index 89a40e4..0000000
--- a/blackberry10/bin/templates/project/plugins/Device/src/blackberry10/index.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2010-2011 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 getModelName () {
-    var modelName = window.qnx.webplatform.device.modelName;
-    //Pre 10.2 (meaning Z10 or Q10)
-    if (typeof modelName === "undefined") {
-        if (window.screen.height === 720 && window.screen.width === 720) {
-            modelName = "Q10";
-        } else if ((window.screen.height === 1280 && window.screen.width === 768) ||
-                   (window.screen.height === 768 && window.screen.width === 1280)) {
-            modelName = "Z10";
-        } else {
-            modelName = window.qnx.webplatform.deviceName;
-        }
-    }
-
-    return modelName;
-}
-
-function getUUID () {
-    var uuid = "";
-    try {
-        //Must surround by try catch because this will throw if the app is missing permissions
-        uuid = window.qnx.webplatform.device.devicePin;
-    } catch (e) {
-        //DO Nothing
-    }
-    return uuid;
-}
-
-module.exports = {
-    getDeviceInfo: function (success, fail, args, env) {
-        var result = new PluginResult(args, env),
-            modelName = getModelName(),
-            uuid = getUUID(),
-            info = {
-                platform: "blackberry10",
-                version: window.qnx.webplatform.device.scmBundle,
-                model: modelName,
-                name: modelName, // deprecated: please use device.model
-                uuid: uuid,
-                cordova: "dev"
-            };
-        result.ok(info);
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/Logger/plugin.xml
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/Logger/plugin.xml b/blackberry10/bin/templates/project/plugins/Logger/plugin.xml
deleted file mode 100644
index 77f5455..0000000
--- a/blackberry10/bin/templates/project/plugins/Logger/plugin.xml
+++ /dev/null
@@ -1,29 +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"
-    version="0.0.1">
-
-    <name>Logger</name>
-
-    <platform name="blackberry10">
-        <config-file target="www/config.xml" parent="/widget">
-            <feature name="Logger" value="Logger"/>
-        </config-file>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/Logger/src/blackberry10/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/Logger/src/blackberry10/index.js b/blackberry10/bin/templates/project/plugins/Logger/src/blackberry10/index.js
deleted file mode 100644
index 497f477..0000000
--- a/blackberry10/bin/templates/project/plugins/Logger/src/blackberry10/index.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2010-2011 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.
- */
-
-module.exports = {
-    logLevel: function (success, fail, args, env) {
-        var result = new PluginResult(args, env),
-            level = JSON.parse(decodeURIComponent(args[0])),
-            message = JSON.parse(decodeURIComponent(args[1]));
-        console.log(level + ": " + message);
-        result.noResult(false);
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/NetworkStatus/plugin.xml
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/NetworkStatus/plugin.xml b/blackberry10/bin/templates/project/plugins/NetworkStatus/plugin.xml
deleted file mode 100644
index 4108569..0000000
--- a/blackberry10/bin/templates/project/plugins/NetworkStatus/plugin.xml
+++ /dev/null
@@ -1,29 +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"
-    version="0.0.1">
-
-    <name>NetworkStatus</name>
-
-    <platform name="blackberry10">
-        <config-file target="www/config.xml" parent="/widget">
-            <feature name="NetworkStatus" value="NetworkStatus"/>
-        </config-file>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/NetworkStatus/src/blackberry10/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/NetworkStatus/src/blackberry10/index.js b/blackberry10/bin/templates/project/plugins/NetworkStatus/src/blackberry10/index.js
deleted file mode 100644
index 5a991fe..0000000
--- a/blackberry10/bin/templates/project/plugins/NetworkStatus/src/blackberry10/index.js
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2010-2011 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.
- */
-
-//map from BB10 to cordova connection types:
-//https://github.com/apache/cordova-js/blob/master/lib/common/plugin/Connection.js
-function mapConnectionType(con) {
-    switch (con.type) {
-    case 'wired':
-        return 'ethernet';
-    case 'wifi':
-        return 'wifi';
-    case 'none':
-        return 'none';
-    case 'cellular':
-        switch (con.technology) {
-        case 'edge':
-        case 'gsm':
-            return '2g';
-        case 'evdo':
-            return '3g';
-        case 'umts':
-            return '3g';
-        case 'lte':
-            return '4g';
-        }
-        return "cellular";
-    }
-    return 'unknown';
-}
-
-function currentConnectionType() {
-    try {
-        //possible for webplatform to throw pps exception
-        return mapConnectionType(window.qnx.webplatform.device.activeConnection || { type : 'none' });
-    }
-    catch (e) {
-        return 'unknown';
-    }
-}
-
-module.exports = {
-    getConnectionInfo: function (success, fail, args, env) {
-        var result = new PluginResult(args, env);
-        result.ok(currentConnectionType());
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/Notification/plugin.xml
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/Notification/plugin.xml b/blackberry10/bin/templates/project/plugins/Notification/plugin.xml
deleted file mode 100644
index 447a676..0000000
--- a/blackberry10/bin/templates/project/plugins/Notification/plugin.xml
+++ /dev/null
@@ -1,29 +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"
-    version="0.0.1">
-
-    <name>Notification</name>
-
-    <platform name="blackberry10">
-        <config-file target="www/config.xml" parent="/widget">
-            <feature name="Notification" value="Notification"/>
-        </config-file>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/Notification/src/blackberry10/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/Notification/src/blackberry10/index.js b/blackberry10/bin/templates/project/plugins/Notification/src/blackberry10/index.js
deleted file mode 100644
index fad04f7..0000000
--- a/blackberry10/bin/templates/project/plugins/Notification/src/blackberry10/index.js
+++ /dev/null
@@ -1,91 +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.
-*/
-
-function showDialog(args, dialogType, result) {
-    //Unpack and map the args
-    var msg = JSON.parse(decodeURIComponent(args[0])),
-    title = JSON.parse(decodeURIComponent(args[1])),
-    btnLabel = JSON.parse(decodeURIComponent(args[2]));
-
-    if (!Array.isArray(btnLabel)) {
-        //Converts to array for (string) and (string,string, ...) cases
-        btnLabel = btnLabel.split(",");
-    }
-
-    if (msg && typeof msg === "string") {
-        msg = msg.replace(/^"|"$/g, "").replace(/\\"/g, '"').replace(/\\\\/g, '\\');
-    } else {
-        result.error("message is undefined");
-        return;
-    }
-
-    var messageObj = {
-        title : title,
-        htmlmessage :  msg,
-        dialogType : dialogType,
-        optionalButtons : btnLabel
-    };
-
-    //TODO replace with getOverlayWebview() when available in webplatform
-    qnx.webplatform.getWebViews()[2].dialog.show(messageObj, function (data) {
-        if (typeof data === "number") {
-            //Confirm dialog call back needs to be called with one-based indexing [1,2,3 etc]
-            result.callbackOk(++data, false);
-        } else {
-            //Prompt dialog callback expects object
-            result.callbackOk({
-                buttonIndex: data.ok ? 1 : 0,
-                input1: (data.oktext) ? decodeURIComponent(data.oktext) : ""
-            }, false);
-        }
-    });
-
-    result.noResult(true);
-}
-
-module.exports = {
-    alert: function (success, fail, args, env) {
-        var result = new PluginResult(args, env);
-
-        if (Object.keys(args).length < 3) {
-            result.error("Notification action - alert arguments not found.");
-        } else {
-            showDialog(args, "CustomAsk", result);
-        }
-    },
-    confirm: function (success, fail, args, env) {
-        var result = new PluginResult(args, env);
-
-        if (Object.keys(args).length < 3) {
-            result.error("Notification action - confirm arguments not found.");
-        } else {
-            showDialog(args, "CustomAsk", result);
-        }
-    },
-    prompt: function (success, fail, args, env) {
-        var result = new PluginResult(args, env);
-
-        if (Object.keys(args).length < 3) {
-            result.error("Notification action - prompt arguments not found.");
-        } else {
-            showDialog(args, "JavaScriptPrompt", result);
-        }
-    },
-    beep: function (success, fail, args, env) {
-        var result = new PluginResult(args, env);
-        result.error("Beep not supported");
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/SplashScreen/plugin.xml
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/SplashScreen/plugin.xml b/blackberry10/bin/templates/project/plugins/SplashScreen/plugin.xml
deleted file mode 100644
index 48c5824..0000000
--- a/blackberry10/bin/templates/project/plugins/SplashScreen/plugin.xml
+++ /dev/null
@@ -1,29 +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"
-    version="0.0.1">
-
-    <name>SplashScreen</name>
-
-    <platform name="blackberry10">
-        <config-file target="www/config.xml" parent="/widget">
-            <feature name="SplashScreen" value="SplashScreen"/>
-        </config-file>
-    </platform>
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/SplashScreen/src/blackberry10/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/SplashScreen/src/blackberry10/index.js b/blackberry10/bin/templates/project/plugins/SplashScreen/src/blackberry10/index.js
deleted file mode 100644
index bd7e48c..0000000
--- a/blackberry10/bin/templates/project/plugins/SplashScreen/src/blackberry10/index.js
+++ /dev/null
@@ -1,28 +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.
- */
-
-module.exports = {
-    show: function (success, fail, args, env) {
-        var result = new PluginResult(args, env);
-        result.error("Not supported on platform", false);
-    },
-
-    hide: function (success, fail, args, env) {
-        var result = new PluginResult(args, env);
-        window.qnx.webplatform.getApplication().windowVisible = true;
-        result.ok(undefined, false);
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/com.blackberry.jpps/plugin.xml
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/com.blackberry.jpps/plugin.xml b/blackberry10/bin/templates/project/plugins/com.blackberry.jpps/plugin.xml
deleted file mode 100644
index 9a3be81..0000000
--- a/blackberry10/bin/templates/project/plugins/com.blackberry.jpps/plugin.xml
+++ /dev/null
@@ -1,22 +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.
--->
-<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
-    id="com.blackberry.jpps"
-    version="1.0.0">
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/com.blackberry.jpps/src/blackberry10/native/device/libjpps.so
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/com.blackberry.jpps/src/blackberry10/native/device/libjpps.so b/blackberry10/bin/templates/project/plugins/com.blackberry.jpps/src/blackberry10/native/device/libjpps.so
deleted file mode 100644
index f0eb90d..0000000
Binary files a/blackberry10/bin/templates/project/plugins/com.blackberry.jpps/src/blackberry10/native/device/libjpps.so and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/com.blackberry.jpps/src/blackberry10/native/simulator/libjpps.so
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/com.blackberry.jpps/src/blackberry10/native/simulator/libjpps.so b/blackberry10/bin/templates/project/plugins/com.blackberry.jpps/src/blackberry10/native/simulator/libjpps.so
deleted file mode 100644
index f2c12ff..0000000
Binary files a/blackberry10/bin/templates/project/plugins/com.blackberry.jpps/src/blackberry10/native/simulator/libjpps.so and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/com.blackberry.utils/plugin.xml
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/com.blackberry.utils/plugin.xml b/blackberry10/bin/templates/project/plugins/com.blackberry.utils/plugin.xml
deleted file mode 100644
index f855ee8..0000000
--- a/blackberry10/bin/templates/project/plugins/com.blackberry.utils/plugin.xml
+++ /dev/null
@@ -1,22 +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.
--->
-<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
-    id="com.blackberry.utils"
-    version="1.0.0">
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/com.blackberry.utils/src/blackberry10/native/device/libutils.so
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/com.blackberry.utils/src/blackberry10/native/device/libutils.so b/blackberry10/bin/templates/project/plugins/com.blackberry.utils/src/blackberry10/native/device/libutils.so
deleted file mode 100644
index 126d02c..0000000
Binary files a/blackberry10/bin/templates/project/plugins/com.blackberry.utils/src/blackberry10/native/device/libutils.so and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/com.blackberry.utils/src/blackberry10/native/simulator/libutils.so
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/com.blackberry.utils/src/blackberry10/native/simulator/libutils.so b/blackberry10/bin/templates/project/plugins/com.blackberry.utils/src/blackberry10/native/simulator/libutils.so
deleted file mode 100644
index 392ad33..0000000
Binary files a/blackberry10/bin/templates/project/plugins/com.blackberry.utils/src/blackberry10/native/simulator/libutils.so and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/plugin.xml
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/plugin.xml b/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/plugin.xml
deleted file mode 100644
index b35a83e..0000000
--- a/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/plugin.xml
+++ /dev/null
@@ -1,23 +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.
--->
-<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
-    id="org.apache.cordova.blackberry10.pimlib"
-    version="1.0.0">
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/Makefile
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/Makefile b/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/Makefile
deleted file mode 100644
index 0cc5eae..0000000
--- a/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-LIST=CPU
-ifndef QRECURSE
-QRECURSE=recurse.mk
-ifdef QCONFIG
-QRDIR=$(dir $(QCONFIG))
-endif
-endif
-include $(QRDIR)$(QRECURSE)

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/arm/Makefile
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/arm/Makefile b/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/arm/Makefile
deleted file mode 100644
index 0e22650..0000000
--- a/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/arm/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-LIST=VARIANT
-ifndef QRECURSE
-QRECURSE=recurse.mk
-ifdef QCONFIG
-QRDIR=$(dir $(QCONFIG))
-endif
-endif
-include $(QRDIR)$(QRECURSE)

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/arm/so.le-v7/Makefile
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/arm/so.le-v7/Makefile b/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/arm/so.le-v7/Makefile
deleted file mode 100644
index 2c76089..0000000
--- a/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/arm/so.le-v7/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-include ../../common.mk

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/arm/so.le-v7/libpimcontacts.so
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/arm/so.le-v7/libpimcontacts.so b/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/arm/so.le-v7/libpimcontacts.so
deleted file mode 100755
index f90047f..0000000
Binary files a/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/arm/so.le-v7/libpimcontacts.so and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/common.mk
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/common.mk b/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/common.mk
deleted file mode 100644
index 7bc06fb..0000000
--- a/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/common.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-ifndef QCONFIG
-QCONFIG=qconfig.mk
-endif
-include $(QCONFIG)
-
-NAME=pimcontacts
-PLUGIN=yes
-UTILS=yes
-
-include ../../../../../../meta.mk
-
-SRCS+=pim_contacts_qt.cpp \
-      pim_contacts_js.cpp \
-      contact_account.cpp
-
-include $(MKFILES_ROOT)/qtargets.mk
-
-LIBS+=bbpim bbcascadespickers QtCore img

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/contact_account.cpp
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/contact_account.cpp b/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/contact_account.cpp
deleted file mode 100644
index 3476e70..0000000
--- a/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/contact_account.cpp
+++ /dev/null
@@ -1,74 +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.
- */
-
-#include <webworks_utils.hpp>
-#include "contact_account.hpp"
-
-ContactAccount& ContactAccount::GetAccountInstance()
-{
-    static ContactAccount ca;
-    return ca;
-}
-
-ContactAccount::ContactAccount()
-{
-    fetchContactAccounts();
-}
-
-ContactAccount::~ContactAccount()
-{}
-
-QList<bb::pim::account::Account> ContactAccount::GetContactAccounts(bool fresh)
-{
-    if (fresh) {
-        fetchContactAccounts();
-    }
-    return _accounts;
-}
-
-bb::pim::account::Account ContactAccount::GetAccount(bb::pim::account::AccountKey id, bool fresh)
-{
-    if (fresh) {
-        fetchContactAccounts();
-    }
-    return _accountMap.value(id);
-}
-
-Json::Value ContactAccount::Account2Json(const bb::pim::account::Account& account)
-{
-    Json::Value jsonAccount;
-    jsonAccount["id"] = webworks::Utils::intToStr(account.id());
-    jsonAccount["name"] = account.displayName().isEmpty() ? account.provider().name().toStdString() : account.displayName().toStdString();
-    jsonAccount["enterprise"] = account.isEnterprise() == 1 ? true : false;
-
-    return jsonAccount;
-}
-
-void ContactAccount::fetchContactAccounts()
-{
-    QList<bb::pim::account::Account> accounts = _accountService.accounts(bb::pim::account::Service::Contacts);
-
-    _accounts.clear();
-    _accountMap.clear();
-    for (QList<bb::pim::account::Account>::const_iterator it = accounts.begin(); it != accounts.end(); ++it) {
-        if ((it->id() != ID_UNIFIED_ACCOUNT) && (it->id() != ID_ENHANCED_ACCOUNT)) {
-            _accounts.append(*it);
-            _accountMap.insert(it->id(), (bb::pim::account::Account)(*it));
-        }
-    }
-}
-
-

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/contact_account.hpp
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/contact_account.hpp b/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/contact_account.hpp
deleted file mode 100644
index 3910de8..0000000
--- a/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/contact_account.hpp
+++ /dev/null
@@ -1,54 +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.
- */
-
-#ifndef _CONTACT_ACCOUNT_HPP_
-#define _CONTACT_ACCOUNT_HPP_
-
-#include <bb/pim/account/Account>
-#include <bb/pim/account/AccountService>
-#include <bb/pim/account/Provider>
-
-#include <json/value.h>
-#include <QList>
-#include <QDebug>
-
-class ContactAccount
-{
-public:
-    static ContactAccount& GetAccountInstance();
-
-    // get all available accounts which provide contact service
-    QList<bb::pim::account::Account> GetContactAccounts(bool fresh = false);
-    // get the contact account with the specific id
-    bb::pim::account::Account GetAccount(bb::pim::account::AccountKey id, bool fresh = false);
-    // serialize account to json object
-    static Json::Value Account2Json(const bb::pim::account::Account& account);
-
-private:
-    ContactAccount();
-    ~ContactAccount();
-    explicit ContactAccount(ContactAccount const&);
-    void operator=(ContactAccount const&);
-    // Refresh the accounts list and map
-    void fetchContactAccounts();
-    QMap<bb::pim::account::AccountKey, bb::pim::account::Account> _accountMap;
-    QList<bb::pim::account::Account> _accounts;
-    bb::pim::account::AccountService _accountService;
-    static const int ID_UNIFIED_ACCOUNT = 4;
-    static const int ID_ENHANCED_ACCOUNT = 6;
-};
-
-#endif // end of _CONTACT_ACCOUNT_HPP_

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/device/libpimcontacts.so
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/device/libpimcontacts.so b/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/device/libpimcontacts.so
deleted file mode 100644
index f90047f..0000000
Binary files a/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/device/libpimcontacts.so and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/pim_contacts_js.cpp
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/pim_contacts_js.cpp b/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/pim_contacts_js.cpp
deleted file mode 100644
index 4788bd1..0000000
--- a/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/pim_contacts_js.cpp
+++ /dev/null
@@ -1,174 +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.
- */
-
-#include <json/reader.h>
-#include <json/writer.h>
-#include <string>
-#include "pim_contacts_js.hpp"
-#include "pim_contacts_qt.hpp"
-
-PimContacts::PimContacts(const std::string& id) : m_id(id)
-{
-}
-
-char* onGetObjList()
-{
-    // Return list of classes in the object
-    static char name[] = "PimContacts";
-    return name;
-}
-
-JSExt* onCreateObject(const std::string& className, const std::string& id)
-{
-    // Make sure we are creating the right class
-    if (className != "PimContacts") {
-        return 0;
-    }
-
-    return new PimContacts(id);
-}
-
-std::string PimContacts::InvokeMethod(const std::string& command)
-{
-    unsigned int index = command.find_first_of(" ");
-
-    string strCommand;
-    string jsonObject;
-    Json::Value *obj;
-
-    if (index != std::string::npos) {
-        strCommand = command.substr(0, index);
-        jsonObject = command.substr(index + 1, command.length());
-
-        // Parse the JSON
-        obj = new Json::Value;
-        bool parse = Json::Reader().parse(jsonObject, *obj);
-
-        if (!parse) {
-            return "Cannot parse JSON object";
-        }
-    } else {
-        strCommand = command;
-        obj = NULL;
-    }
-
-    if (strCommand == "find") {
-        startThread(FindThread, obj);
-    } else if (strCommand == "save") {
-        startThread(SaveThread, obj);
-    } else if (strCommand == "remove") {
-        startThread(RemoveThread, obj);
-    } else if (strCommand == "getContact") {
-        std::string result = Json::FastWriter().write(webworks::PimContactsQt().GetContact(*obj));
-        delete obj;
-        return result;
-    } else if (strCommand == "invokePicker") {
-        Json::Value result = webworks::PimContactsQt::InvokePicker(*obj);
-        delete obj;
-
-        std::string event = Json::FastWriter().write(result);
-        NotifyEvent("invokeContactPicker.invokeEventId", event);
-    } else if (strCommand == "getContactAccounts") {
-        return Json::FastWriter().write(webworks::PimContactsQt::GetContactAccounts());
-    }
-
-    return "";
-}
-
-bool PimContacts::CanDelete()
-{
-    return true;
-}
-
-// Notifies JavaScript of an event
-void PimContacts::NotifyEvent(const std::string& eventId, const std::string& event)
-{
-    std::string eventString = m_id + " result ";
-    eventString.append(eventId);
-    eventString.append(" ");
-    eventString.append(event);
-    SendPluginEvent(eventString.c_str(), m_pContext);
-}
-
-bool PimContacts::startThread(ThreadFunc threadFunction, Json::Value *jsonObj) {
-    webworks::PimContactsThreadInfo *thread_info = new webworks::PimContactsThreadInfo;
-    thread_info->parent = this;
-    thread_info->jsonObj = jsonObj;
-    thread_info->eventId = jsonObj->removeMember("_eventId").asString();
-
-    pthread_attr_t thread_attr;
-    pthread_attr_init(&thread_attr);
-    pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED);
-
-    pthread_t thread;
-    pthread_create(&thread, &thread_attr, threadFunction, static_cast<void *>(thread_info));
-    pthread_attr_destroy(&thread_attr);
-
-    if (!thread) {
-        return false;
-    }
-
-    return true;
-}
-
-
-// Static functions:
-
-void* PimContacts::FindThread(void *args)
-{
-    webworks::PimContactsThreadInfo *thread_info = static_cast<webworks::PimContactsThreadInfo *>(args);
-
-    webworks::PimContactsQt pim_qt;
-    Json::Value result = pim_qt.Find(*(thread_info->jsonObj));
-    delete thread_info->jsonObj;
-
-    std::string event = Json::FastWriter().write(result);
-    thread_info->parent->NotifyEvent(thread_info->eventId, event);
-    delete thread_info;
-
-    return NULL;
-}
-
-void* PimContacts::SaveThread(void *args)
-{
-    webworks::PimContactsThreadInfo *thread_info = static_cast<webworks::PimContactsThreadInfo *>(args);
-
-    webworks::PimContactsQt pim_qt;
-    Json::Value result = pim_qt.Save(*(thread_info->jsonObj));
-    delete thread_info->jsonObj;
-
-    std::string event = Json::FastWriter().write(result);
-    thread_info->parent->NotifyEvent(thread_info->eventId, event);
-    delete thread_info;
-
-    return NULL;
-}
-
-void* PimContacts::RemoveThread(void *args)
-{
-    webworks::PimContactsThreadInfo *thread_info = static_cast<webworks::PimContactsThreadInfo *>(args);
-
-    webworks::PimContactsQt pim_qt;
-    Json::Value result = pim_qt.DeleteContact(*(thread_info->jsonObj));
-    delete thread_info->jsonObj;
-
-    std::string event = Json::FastWriter().write(result);
-    thread_info->parent->NotifyEvent(thread_info->eventId, event);
-    delete thread_info;
-
-    return NULL;
-}
-

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/fa5a5900/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/pim_contacts_js.hpp
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/pim_contacts_js.hpp b/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/pim_contacts_js.hpp
deleted file mode 100644
index df8bbd7..0000000
--- a/blackberry10/bin/templates/project/plugins/org.apache.cordova.blackberry10.pimlib/src/blackberry10/native/pim_contacts_js.hpp
+++ /dev/null
@@ -1,45 +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.
- */
-
-#ifndef PIM_CONTACTS_JS_H_
-#define PIM_CONTACTS_JS_H_
-
-#include <json/value.h>
-#include <pthread.h>
-#include <string>
-#include "../common/plugin.h"
-
-typedef void* ThreadFunc(void *args);
-
-class PimContacts : public JSExt
-{
-public:
-    explicit PimContacts(const std::string& id);
-    virtual ~PimContacts() {}
-    virtual std::string InvokeMethod(const std::string& command);
-    virtual bool CanDelete();
-    void NotifyEvent(const std::string& eventId, const std::string& event);
-
-    static void* FindThread(void *args);
-    static void* SaveThread(void *args);
-    static void* RemoveThread(void *args);
-private:
-    bool startThread(ThreadFunc threadFunction, Json::Value *jsonObj);
-
-    std::string m_id;
-};
-
-#endif // PIM_CONTACTS_JS_H_


Mime
View raw message