cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [3/6] [CB-4419] Remove non-CLI platforms from cordova-js.
Date Mon, 29 Jul 2013 19:38:16 GMT
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/ad723456/lib/tizen/plugin/globalization/symbols.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/globalization/symbols.js b/lib/tizen/plugin/globalization/symbols.js
deleted file mode 100644
index 24e6ac5..0000000
--- a/lib/tizen/plugin/globalization/symbols.js
+++ /dev/null
@@ -1,24 +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 modulemapper = require('cordova/modulemapper');
-
-modulemapper.merges('cordova/plugin/tizen/Globalization', 'navigator.globalization');

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/ad723456/lib/tizen/plugin/media/symbols.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/media/symbols.js b/lib/tizen/plugin/media/symbols.js
deleted file mode 100644
index 2e12a08..0000000
--- a/lib/tizen/plugin/media/symbols.js
+++ /dev/null
@@ -1,26 +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 modulemapper = require('cordova/modulemapper');
-
-modulemapper.defaults('cordova/plugin/Media', 'Media');
-modulemapper.defaults('cordova/plugin/MediaError', 'MediaError');
-modulemapper.merges('cordova/plugin/tizen/MediaError', 'MediaError');

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/ad723456/lib/tizen/plugin/notification/symbols.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/notification/symbols.js b/lib/tizen/plugin/notification/symbols.js
deleted file mode 100644
index 92fafbf..0000000
--- a/lib/tizen/plugin/notification/symbols.js
+++ /dev/null
@@ -1,25 +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 modulemapper = require('cordova/modulemapper');
-
-modulemapper.defaults('cordova/plugin/notification', 'navigator.notification');
-modulemapper.merges('cordova/plugin/tizen/Notification', 'navigator.notification');

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/ad723456/lib/tizen/plugin/splashscreen/symbol.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/splashscreen/symbol.js b/lib/tizen/plugin/splashscreen/symbol.js
deleted file mode 100644
index 54eac85..0000000
--- a/lib/tizen/plugin/splashscreen/symbol.js
+++ /dev/null
@@ -1,24 +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 modulemapper = require('cordova/modulemapper');
-
-modulemapper.merges('cordova/plugin/tizen/SplashScreen', 'splashscreen'); /// is that correct???  PPL

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/ad723456/lib/tizen/plugin/tizen/Accelerometer.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/Accelerometer.js b/lib/tizen/plugin/tizen/Accelerometer.js
deleted file mode 100644
index 18be54c..0000000
--- a/lib/tizen/plugin/tizen/Accelerometer.js
+++ /dev/null
@@ -1,52 +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 accelerometerCallback = null;
-
-//console.log("TIZEN ACCELEROMETER START");
-
-module.exports = {
-
-    start: function (successCallback, errorCallback) {
-
-        if (accelerometerCallback) {
-            window.removeEventListener("devicemotion", accelerometerCallback, true);
-        }
-
-        accelerometerCallback = function (motion) {
-            successCallback({
-                x: motion.accelerationIncludingGravity.x,
-                y: motion.accelerationIncludingGravity.y,
-                z: motion.accelerationIncludingGravity.z,
-                timestamp: new Date().getTime()
-            });
-        };
-        window.addEventListener("devicemotion", accelerometerCallback, true);
-    },
-
-    stop: function (successCallback, errorCallback) {
-        window.removeEventListener("devicemotion", accelerometerCallback, true);
-        accelerometerCallback = null;
-    }
-};
-
-//console.log("TIZEN ACCELEROMETER END");
-

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/ad723456/lib/tizen/plugin/tizen/Battery.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/Battery.js b/lib/tizen/plugin/tizen/Battery.js
deleted file mode 100644
index f380a6d..0000000
--- a/lib/tizen/plugin/tizen/Battery.js
+++ /dev/null
@@ -1,48 +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.
- *
-*/
-
-/*global tizen:false */
-var batteryListenerId = null;
-
-//console.log("TIZEN BATTERY START");
-
-module.exports = {
-    start: function(successCallback, errorCallback) {
-        var batterySuccessCallback = function(power) {
-            if (successCallback) {
-                successCallback({level: Math.round(power.level * 100), isPlugged: power.isCharging});
-            }
-        };
-
-        if (batteryListenerId === null) {
-            batteryListenerId = tizen.systeminfo.addPropertyValueChangeListener("BATTERY", batterySuccessCallback);
-        }
-
-        tizen.systeminfo.getPropertyValue("BATTERY", batterySuccessCallback, errorCallback);
-    },
-
-    stop: function(successCallback, errorCallback) {
-        tizen.systeminfo.removePropertyValueChangeListener(batteryListenerId);
-        batteryListenerId = null;
-    }
-};
-
-//console.log("TIZEN BATTERY END");

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/ad723456/lib/tizen/plugin/tizen/BufferLoader.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/BufferLoader.js b/lib/tizen/plugin/tizen/BufferLoader.js
deleted file mode 100644
index f4f7909..0000000
--- a/lib/tizen/plugin/tizen/BufferLoader.js
+++ /dev/null
@@ -1,107 +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.
- *
-*/
-
-/*
- * Buffer Loader Object
- * This class provides a sound buffer for one or more sounds
- * held in a local file located by an url
- *
- * uses W3C  Web Audio API
- *
- * @constructor
- *
- * @param {AudioContext} audio context object
- * @param {Array} urlList, array of url for sound to load
- * @param {function} callback , called after buffer was loaded
- *
- */
-
-function BufferLoader(context, urlList, callback) {
-    this.context = context;
-    this.urlList = urlList;
-    this.onload = callback;
-    this.bufferList = [];
-    this.loadCount = 0;
-}
-
-/*
- * This method loads a sound into a buffer
- * @param {Array} urlList, array of url for sound to load
- * @param {Number} index, buffer index in the array where to load the url sound
- *
- */
-
-BufferLoader.prototype.loadBuffer = function(url, index) {
-    // Load buffer asynchronously
-    var request = null,
-        loader = null;
-
-    request = new XMLHttpRequest();
-
-    if (request === null) {
-        console.log ("BufferLoader.prototype.loadBuffer, cannot allocate XML http request");
-        return;
-    }
-
-    request.open("GET", url, true);
-    request.responseType = "arraybuffer";
-
-    loader = this;
-
-    request.onload = function() {
-        // Asynchronously decode the audio file data in request.response
-        loader.context.decodeAudioData(
-            request.response,
-            function(buffer) {
-                if (!buffer) {
-                    console.log ("BufferLoader.prototype.loadBuffer,error decoding file data: " + url);
-                    return;
-                }
-
-                loader.bufferList[index] = buffer;
-
-                if (++loader.loadCount == loader.urlList.length) {
-                    loader.onload(loader.bufferList);
-                }
-            }
-        );
-    };
-
-    request.onerror = function() {
-        console.log ("BufferLoader.prototype.loadBuffer, XHR error");
-    };
-
-    request.send();
-};
-
-/*
- * This method loads all sounds identified by their url
- * and that where given to the object constructor
- *
- */
-
-BufferLoader.prototype.load = function() {
-    for (var i = 0; i < this.urlList.length; ++i) {
-        this.loadBuffer(this.urlList[i], i);
-    }
-};
-
-module.exports = BufferLoader;

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/ad723456/lib/tizen/plugin/tizen/Camera.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/Camera.js b/lib/tizen/plugin/tizen/Camera.js
deleted file mode 100644
index 76918f0..0000000
--- a/lib/tizen/plugin/tizen/Camera.js
+++ /dev/null
@@ -1,108 +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.
- *
-*/
-
-/*global tizen:false */
-var Camera = require('cordova/plugin/CameraConstants');
-
-
-//console.log("TIZEN CAMERA START");
-
-function cameraMakeReplyCallback(successCallback, errorCallback) {
-    return {
-        onsuccess: function(reply) {
-            if (reply.length > 0) {
-                successCallback(reply[0].value);
-            }
-            else {
-                errorCallback('Picture selection aborted');
-            }
-        },
-        onfail: function() {
-            console.log('The service launch failed');
-        }
-    };
-}
-
-module.exports = {
-    takePicture: function(successCallback, errorCallback, args) {
-        var destinationType = args[1],
-            sourceType = args[2],
-            encodingType = args[5],
-            mediaType = args[6];
-
-        // Not supported
-        /*
-        quality = args[0]
-        targetWidth = args[3]
-        targetHeight = args[4]
-        allowEdit = args[7]
-        correctOrientation = args[8]
-        saveToPhotoAlbum = args[9]
-        */
-
-        if (destinationType !== Camera.DestinationType.FILE_URI) {
-            errorCallback('DestinationType not supported');
-            return;
-        }
-
-        if (mediaType !== Camera.MediaType.PICTURE) {
-            errorCallback('MediaType not supported');
-            return;
-        }
-
-        var mimeType;
-        if (encodingType === Camera.EncodingType.JPEG) {
-            mimeType = 'image/jpeg';
-        }
-        else if (encodingType === Camera.EncodingType.PNG) {
-            mimeType = 'image/png';
-        }
-        else {
-            mimeType = 'image/*';
-        }
-
-        var serviceId;
-        if (sourceType === Camera.PictureSourceType.CAMERA) {
-            serviceId = 'http://tizen.org/appcontrol/operation/create_content';
-        }
-        else {
-            serviceId = 'http://tizen.org/appcontrol/operation/pick';
-        }
-
-        var serviceControl = new tizen.ApplicationControl(
-                            serviceId,
-                            null,
-                            mimeType,
-                            null);
-
-        tizen.application.launchAppControl(
-                serviceControl,
-                null,
-                null,
-                function(error) {
-                    errorCallback(error.message);
-                },
-                cameraMakeReplyCallback(successCallback, errorCallback)
-        );
-    }
-};
-
-//console.log("TIZEN CAMERA END");

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/ad723456/lib/tizen/plugin/tizen/Compass.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/Compass.js b/lib/tizen/plugin/tizen/Compass.js
deleted file mode 100644
index 4f7c634..0000000
--- a/lib/tizen/plugin/tizen/Compass.js
+++ /dev/null
@@ -1,54 +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 CompassError = require('cordova/plugin/CompassError'),
-    CompassHeading = require('cordova/plugin/CompassHeading');
-
-var compassCallback = null,
-    compassReady = false;
-
-//console.log("TIZEN COMPASS START");
-
-module.exports = {
-    getHeading: function(successCallback, errorCallback) {
-
-        if (window.DeviceOrientationEvent !== undefined) {
-
-            compassCallback = function (orientation) {
-                var heading = 360 - orientation.alpha;
-
-                if (compassReady) {
-                    successCallback( new CompassHeading (heading, heading, 0, 0));
-                    window.removeEventListener("deviceorientation", compassCallback, true);
-                }
-                compassReady = true;
-            };
-            compassReady = false; // workaround invalid first event value returned by WRT
-            window.addEventListener("deviceorientation", compassCallback, true);
-        }
-        else {
-            errorCallback(CompassError.COMPASS_NOT_SUPPORTED);
-        }
-    }
-};
-
-//console.log("TIZEN COMPASS END");
-

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/ad723456/lib/tizen/plugin/tizen/Contact.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/Contact.js b/lib/tizen/plugin/tizen/Contact.js
deleted file mode 100644
index 439893d..0000000
--- a/lib/tizen/plugin/tizen/Contact.js
+++ /dev/null
@@ -1,548 +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.
- *
-*/
-
-/*global tizen:false */
-//var ContactError = require('cordova/plugin/ContactError'),
-//    ContactUtils = require('cordova/plugin/tizen/ContactUtils');
-
-// ------------------
-// Utility functions
-// ------------------
-
-
-//console.log("TIZEN CONTACT START");
-
-
-var ContactError = require('cordova/plugin/ContactError'),
-    ContactUtils = require('cordova/plugin/tizen/ContactUtils'),
-    utils = require('cordova/utils'),
-    exec = require('cordova/exec');
-
-
-
-/**
- * Retrieves a Tizen Contact object from the device by its unique id.
- *
- * @param uid
- *            Unique id of the contact on the device
- * @return {tizen.Contact} Tizen Contact object or null if contact with
- *         specified id is not found
- */
-var findByUniqueId = function(id) {
-
-    if (!id) {
-        return null;
-    }
-
-    var tizenContact = null;
-
-    tizen.contact.getDefaultAddressBook().find(
-        function _successCallback(contacts){
-            tizenContact = contacts[0];
-        },
-        function _errorCallback(error){
-            console.log("tizen find error " + error);
-        },
-        new tizen.AttributeFilter('id', 'CONTAINS', id),
-        new tizen.SortMode('id', 'ASC'));
-
-    return tizenContact || null;
-};
-
-
-var traceTizenContact = function (tizenContact) {
-    console.log("cordova/plugin/tizen/Contact/  tizenContact.id " + tizenContact.id);
-    console.log("cordova/plugin/tizen/Contact/  tizenContact.personId " + tizenContact.personId);     //Tizen 2.0
-    console.log("cordova/plugin/tizen/Contact/  tizenContact.addressBookId " + tizenContact.addressBookId);  //Tizen 2.0
-
-    console.log("cordova/plugin/tizen/Contact/  tizenContact.lastUpdated " + tizenContact.lastUpdated);
-    console.log("cordova/plugin/tizen/Contact/  tizenContact.isFavorite " + tizenContact.isFavorite);  //Tizen 2.0
-
-    console.log("cordova/plugin/tizen/Contact/  tizenContact.name " + tizenContact.name);
-
-    //console.log("cordova/plugin/tizen/Contact/  tizenContact.account " + tizenContact.account);  //Tizen 2.0
-
-    console.log("cordova/plugin/tizen/Contact/  tizenContact.addresses " + tizenContact.addresses);
-    console.log("cordova/plugin/tizen/Contact/  tizenContact.photoURI " + tizenContact.photoURI);
-    console.log("cordova/plugin/tizen/Contact/  tizenContact.phoneNumbers " + tizenContact.phoneNumbers);
-    console.log("cordova/plugin/tizen/Contact/  tizenContact.emails " + tizenContact.emails);
-    console.log("cordova/plugin/tizen/Contact/  tizenContact.birthday " + tizenContact.birthday);
-    console.log("cordova/plugin/tizen/Contact/  tizenContact.anniversaries " + tizenContact.anniversaries);
-
-    console.log("cordova/plugin/tizen/Contact/  tizenContact.organizations " + tizenContact.organizations);
-    console.log("cordova/plugin/tizen/Contact/  tizenContact.notes " + tizenContact.notes);
-    console.log("cordova/plugin/tizen/Contact/  tizenContact.urls " + tizenContact.urls);
-    console.log("cordova/plugin/tizen/Contact/  tizenContact.ringtonesURI " + tizenContact.ringtonesURI);
-    console.log("cordova/plugin/tizen/Contact/  tizenContact.groupIds " + tizenContact.groupIds);    //Tizen 2.0
-
-    //console.log("cordova/plugin/tizen/Contact/  tizenContact.categories " + tizenContact.categories);  //Tizen 2.0
-};
-
-
-/**
- * Creates a Tizen contact object from the W3C Contact object and persists
- * it to device storage.
- *
- * @param {Contact}
- *            contact The contact to save
- * @return a new contact object with all properties set
- */
-var saveToDevice = function(contact) {
-
-    if (!contact) {
-        return;
-    }
-
-    var tizenContact = null;
-    var update = false;
-    var i = 0;
-
-    // if the underlying Tizen Contact object already exists, retrieve it for
-    // update
-    if (contact.id) {
-        // we must attempt to retrieve the BlackBerry contact from the device
-        // because this may be an update operation
-        tizenContact = findByUniqueId(contact.id);
-    }
-
-    // contact not found on device, create a new one
-    if (!tizenContact) {
-        tizenContact = new tizen.Contact();
-    }
-    // update the existing contact
-    else {
-        update = true;
-    }
-
-    // NOTE: The user may be working with a partial Contact object, because only
-    // user-specified Contact fields are returned from a find operation (blame
-    // the W3C spec). If this is an update to an existing Contact, we don't
-    // want to clear an attribute from the contact database simply because the
-    // Contact object that the user passed in contains a null value for that
-    // attribute. So we only copy the non-null Contact attributes to the
-    // Tizen Contact object before saving.
-    //
-    // This means that a user must explicitly set a Contact attribute to a
-    // non-null value in order to update it in the contact database.
-    //
-    traceTizenContact (tizenContact);
-
-    // display name
-    if (contact.displayName !== null) {
-        if (tizenContact.name === null) {
-            tizenContact.name = new tizen.ContactName();
-        }
-        if (tizenContact.name !== null) {
-            tizenContact.name.displayName = contact.displayName;
-        }
-    }
-
-    // name
-    if (contact.name !== null) {
-        if (contact.name.givenName) {
-            if (tizenContact.name === null) {
-                tizenContact.name = new tizen.ContactName();
-            }
-            if (tizenContact.name !== null) {
-                tizenContact.name.firstName = contact.name.givenName;
-            }
-        }
-
-        if  (contact.name.middleName) {
-            if (tizenContact.name === null) {
-                tizenContact.name = new tizen.ContactName();
-            }
-            if (tizenContact.name !== null) {
-                tizenContact.name.middleName = contact.name.middleName;
-            }
-        }
-
-        if (contact.name.familyName) {
-            if (tizenContact.name === null) {
-                tizenContact.name = new tizen.ContactName();
-            }
-            if (tizenContact.name !== null) {
-                tizenContact.name.lastName = contact.name.familyName;
-            }
-        }
-
-        if (contact.name.honorificPrefix) {
-            if (tizenContact.name === null) {
-                tizenContact.name = new tizen.ContactName();
-            }
-            if (tizenContact.name !== null) {
-                tizenContact.name.prefix = contact.name.honorificPrefix;
-            }
-        }
-
-        //Tizen 2.0
-        if (contact.name.honorificSuffix) {
-            if (tizenContact.name === null) {
-                tizenContact.name = new tizen.ContactName();
-            }
-            if (tizenContact.name !== null) {
-                tizenContact.name.suffix = contact.name.honorificSuffix;
-            }
-        }
-    }
-
-    // nickname
-    if (contact.nickname !== null) {
-        if (tizenContact.name === null) {
-            tizenContact.name = new tizen.ContactName();
-        }
-        if (tizenContact.name !== null) {
-            if (!utils.isArray(tizenContact.name.nicknames))
-            {
-                tizenContact.name.nicknames = [];
-            }
-            tizenContact.name.nicknames[0] = contact.nickname;
-        }
-    }
-    else {
-        tizenContact.name.nicknames = [];
-    }
-
-    // notes - Tizen 2.0 (was note)
-    if (contact.note !== null) {
-        if (tizenContact.notes === null) {
-            tizenContact.notes = [];
-        }
-        if (tizenContact.notes !== null) {
-            tizenContact.notes[0] = contact.note;
-        }
-    }
-
-    // photos
-    if (contact.photos && utils.isArray(contact.photos) && contact.photos.length > 0) {
-        tizenContact.photoURI = contact.photos[0];
-    }
-
-    if (utils.isDate(contact.birthday)) {
-        if (!utils.isDate(tizenContact.birthday)) {
-            tizenContact.birthday = new Date();
-        }
-        if (utils.isDate(tizenContact.birthday)) {
-            tizenContact.birthday.setDate(contact.birthday.getDate());
-        }
-    }
-
-    // Tizen supports many email addresses
-    if (utils.isArray(contact.emails)) {
-
-        // if this is an update, re initialize email addresses
-        if (update) {
-            // doit on effacer sur un update??????
-        }
-
-        // copy the first three email addresses found
-        var emails = [];
-        for (i = 0; i < contact.emails.length; i += 1) {
-            var emailTypes = [];
-
-            emailTypes.push (contact.emails[i].type);
-
-            emails.push(
-                new tizen.ContactEmailAddress(
-                    contact.emails[i].value,
-                    emailTypes,
-                    contact.emails[i].pref));    //Tizen 2.0
-
-        }
-        tizenContact.emails = emails.length > 0 ? emails : [];
-    }
-    else {
-        tizenContact.emails = [];
-    }
-
-    // Tizen supports many phone numbers
-    // copy into appropriate fields based on type
-    if (utils.isArray(contact.phoneNumbers)) {
-        // if this is an update, re-initialize phone numbers
-        if (update) {
-        }
-
-        var phoneNumbers = [];
-
-        for (i = 0; i < contact.phoneNumbers.length; i += 1) {
-
-            if (!contact.phoneNumbers[i]) {
-                continue;
-            }
-
-            var phoneTypes = [];
-            phoneTypes.push (contact.phoneNumbers[i].type);
-
-
-            phoneNumbers.push(
-                new tizen.ContactPhoneNumber(
-                    contact.phoneNumbers[i].value,
-                    phoneTypes,
-                    contact.phoneNumbers[i].pref)    //Tizen 2.0
-            );
-        }
-
-        tizenContact.phoneNumbers = phoneNumbers.length > 0 ? phoneNumbers : [];
-    }
-    else {
-        tizenContact.phoneNumbers = [];
-    }
-
-    if (utils.isArray(contact.addresses)) {
-        // if this is an update, re-initialize addresses
-        if (update) {
-        }
-
-        var addresses = [],
-            address = null;
-
-        for ( i = 0; i < contact.addresses.length; i += 1) {
-            address = contact.addresses[i];
-
-            if (!address) {
-                continue;
-            }
-
-            var addressTypes = [];
-            addressTypes.push (address.type);
-
-            addresses.push(
-                new tizen.ContactAddress({
-                    country:                   address.country,
-                    region :                   address.region,
-                    city:                      address.locality,
-                    streetAddress:             address.streetAddress,
-                    additionalInformation:     "",
-                    postalCode:                address.postalCode,
-                    isDefault:                 address.pref, //Tizen 2.0
-                    types :                    addressTypes
-                })
-            );
-
-        }
-        tizenContact.addresses = addresses.length > 0 ? addresses : [];
-
-    }
-    else{
-        tizenContact.addresses = [];
-    }
-
-    // copy first url found to cordova 'urls' field
-    if (utils.isArray(contact.urls)) {
-        // if this is an update, re-initialize web page
-        if (update) {
-        }
-
-        var url = null,
-            urls = [];
-
-        for ( i = 0; i< contact.urls.length; i+= 1) {
-            url = contact.urls[i];
-
-            if (!url || !url.value) {
-                continue;
-            }
-
-            urls.push( new tizen.ContactWebSite(url.value, url.type));
-        }
-        tizenContact.urls = urls.length > 0 ? urls : [];
-    }
-    else{
-        tizenContact.urls = [];
-    }
-
-    if (utils.isArray(contact.organizations) && contact.organizations.length > 0 ) {
-         // if this is an update, re-initialize addresses
-        if (update) {
-        }
-
-        var organizations = [],
-            organization = null;
-
-        for ( i = 0; i < contact.organizations.length; i += 1) {
-            organization = contact.organizations[i];
-
-            if (!organization) {
-                continue;
-            }
-
-            organizations.push(
-                new tizen.ContactOrganization({
-                    name:          organization.name,
-                    department:    organization.department,
-                    title:         organization.title,
-                    role:          "",
-                    logoURI:       ""
-                }));
-
-        }
-        tizenContact.organizations = organizations.length > 0 ? organizations : [];
-
-    }
-    else{
-        tizenContact.organizations = [];
-    }
-
-    // categories
-    if (utils.isArray(contact.categories)) {
-        tizenContact.categories = [];
-
-        var category = null;
-
-        for (i = 0; i < contact.categories.length; i += 1) {
-            category = contact.categories[i];
-
-            if (typeof category === "string") {
-                tizenContact.categories.push(category);
-            }
-        }
-    }
-    else {
-        tizenContact.categories = [];
-    }
-
-    // save to device
-    // in tizen contact mean update or add
-    // later we might use addBatch and updateBatch
-    if (update){
-        tizen.contact.getDefaultAddressBook().update(tizenContact);
-    }
-    else {
-        tizen.contact.getDefaultAddressBook().add(tizenContact);
-    }
-
-    // Use the fully populated Tizen contact object to create a
-    // corresponding W3C contact object.
-    return ContactUtils.createContact(tizenContact, [ "*" ]);
-};
-
-
-/**
- * Creates a Tizen ContactAddress object from a W3C ContactAddress.
- *
- * @return {tizen.ContactAddress} a Tizen ContactAddress object
- */
-var createTizenAddress = function(address) {
-
-    var type = null,
-        pref = null,
-        typesAr = [];
-
-    if (address === null) {
-        return null;
-    }
-
-    var tizenAddress = new tizen.ContactAddress();
-
-    if (tizenAddress === null) {
-        return null;
-    }
-
-    typesAr.push(address.type);
-
-    tizenAddress.country = address.country || "";
-    tizenAddress.region = address.region || "";
-    tizenAddress.city = address.locality || "";
-    tizenAddress.streetAddress = address.streetAddress || "";
-    tizenAddress.postalCode = address.postalCode || "";
-    tizenAddress.isDefault = address.pref || false;   //Tizen SDK 2.0
-    tizenAddress.types = typesAr || "";
-
-    return tizenAddress;
-};
-
-module.exports = {
-    /**
-     * Persists contact to device storage.
-     */
-
-    save : function(successCB, failCB) {
-
-        try {
-            // save the contact and store it's unique id
-            var fullContact = saveToDevice(this);
-
-            this.id = fullContact.id;
-
-            // This contact object may only have a subset of properties
-            // if the save was an update of an existing contact. This is
-            // because the existing contact was likely retrieved using a
-            // subset of properties, so only those properties were set in the
-            // object. For this reason, invoke success with the contact object
-            // returned by saveToDevice since it is fully populated.
-
-            if (typeof successCB === 'function') {
-                successCB(fullContact);
-            }
-        }
-        catch (error) {
-            console.log('Error saving contact: ' +  error);
-
-            if (typeof failCB === 'function') {
-                failCB (new ContactError(ContactError.UNKNOWN_ERROR));
-            }
-        }
-    },
-
-    /**
-     * Removes contact from device storage.
-     *
-     * @param successCB
-     *            successCB callback
-     * @param failCB
-     *            error callback
-     */
-    remove : function (successCB, failCB) {
-
-        try {
-            // retrieve contact from device by id
-            var tizenContact = null;
-
-            if (this.id) {
-                tizenContact = findByUniqueId(this.id);
-            }
-
-            // if contact was found, remove it
-            if (tizenContact) {
-                //var addressBook =  tizen.contact.getDefaultAddressBook();
-                var addressBook =  tizen.contact.getAddressBook(tizenContact.addressBookId);   //Tizen SDk 2.0
-
-                addressBook.remove(tizenContact.id);
-
-                if (typeof success === 'function') {
-                    successCB(this);
-                }
-            }
-            // attempting to remove a contact that hasn't been saved
-            else if (typeof failCB === 'function') {
-                failCB(new ContactError(ContactError.UNKNOWN_ERROR));
-            }
-        }
-        catch (error) {
-            console.log('Error removing contact ' + this.id + ": " + error);
-            if (typeof failCB === 'function') {
-                failCB(new ContactError(ContactError.UNKNOWN_ERROR));
-            }
-        }
-    }
-};
-
-//console.log("TIZEN CONTACT END");

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/ad723456/lib/tizen/plugin/tizen/ContactUtils.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/ContactUtils.js b/lib/tizen/plugin/tizen/ContactUtils.js
deleted file mode 100644
index 042dc80..0000000
--- a/lib/tizen/plugin/tizen/ContactUtils.js
+++ /dev/null
@@ -1,361 +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.
- *
-*/
-
-/*global tizen:false */
-var Contact = require('cordova/plugin/Contact'),
-    ContactAddress = require('cordova/plugin/ContactAddress'),
-    ContactName = require('cordova/plugin/ContactName'),
-    ContactField = require('cordova/plugin/ContactField'),
-    ContactOrganization = require('cordova/plugin/ContactOrganization'),
-    utils = require('cordova/utils');
-
-
-
-/**
- * Mappings for each Contact field that may be used in a find operation. Maps
- * W3C Contact fields to one or more fields in a Tizen contact object.
- *
- * Example: user searches with a filter on the Contact 'name' field:
- *
- * <code>Contacts.find(['name'], onSuccess, onFail, {filter:'Bob'});</code>
- *
- * The 'name' field does not exist in a Tizen contact. Instead, a filter
- * expression will be built to search the Tizen contacts using the
- * Tizen 'title', 'firstName' and 'lastName' fields.
- */
-var fieldMappings = {
-    "id" : ["id"],
-    "displayName" : ["name.displayName"],
-    "nickname": ["name.nicknames"],
-    "name" : [ "name.prefix", "name.firstName", "name.lastName" ],
-    "phoneNumbers" : ["phoneNumbers.number","phoneNumbers.types"],
-    "emails" : ["emails.types", "emails.email"],
-    "addresses" : ["addresses.country","addresses.region","addresses.city","addresses.streetAddress","addresses.postalCode","addresses.country","addresses.types"],
-    "organizations" : ["organizations.name","organizations.department","organizations.office", "organizations.title"],
-    "birthday" : ["birthday"],
-    "note" : ["notes"],
-    "photos" : ["photoURI"],
-    "urls" : ["urls.url", "urls.type"]
-};
-
-/*
- * Build an array of all of the valid W3C Contact fields. This is used to
- * substitute all the fields when ["*"] is specified.
- */
-var allFields = [];
-
-(function() {
-    for ( var key in fieldMappings) {
-        allFields.push(key);
-    }
-})();
-
-/**
- * Create a W3C ContactAddress object from a Tizen Address object
- *
- * @param {String}
- *            type the type of address (e.g. work, home)
- * @param {tizen.ContactAddress}
- *            tizenAddress a Tizen Address object
- * @return {ContactAddress} a contact address object or null if the specified
- *         address is null
- */
-var createContactAddress = function(type, tizenAddress) {
-    if (!tizenAddress) {
-        return null;
-    }
-
-    var isDefault = tizenAddress.isDefault;            //Tizen 2.0
-    var streetAddress = tizenAddress.streetAddress;
-    var locality = tizenAddress.city || "";
-    var region = tizenAddress.region || "";
-    var postalCode = tizenAddress.postalCode || "";
-    var country = tizenAddress.country || "";
-
-    //TODO improve formatted
-    var formatted = streetAddress + ", " + locality + ", " + region + ", " + postalCode + ", " + country;
-
-    var contact = new ContactAddress(isDefault, type, formatted, streetAddress, locality, region, postalCode, country);
-
-    return contact;
-};
-
-module.exports = {
-    /**
-     * Builds Tizen filter expressions for contact search using the
-     * contact fields and search filter provided.
-     *
-     * @param {String[]}
-     *            fields Array of Contact fields to search
-     * @param {String}
-     *            filter Filter, or search string
-     * @param {Boolean}
-     *                 multiple, one contacts or more wanted as result
-     * @return filter expression or null if fields is empty or filter is null or
-     *         empty
-     */
-
-    buildFilterExpression: function(fields, filter) {
-        // ensure filter exists
-        if (!filter || filter === "") {
-            return null;
-        }
-
-        if ((fields.length === 1) && (fields[0] === "*")) {
-            // Cordova enhancement to allow fields value of ["*"] to indicate
-            // all supported fields.
-            fields = allFields;
-        }
-
-        // build a filter expression using all Contact fields provided
-        var compositeFilter = null,
-            attributeFilter = null,
-            filterExpression = null,
-            matchFlag = "CONTAINS",
-            matchValue = filter,
-            attributesArray = [];
-
-        if (fields && utils.isArray(fields)) {
-
-            for ( var field in fields) {
-
-                if (!fields[field]) {
-                    continue;
-                }
-
-                // retrieve Tizen contact fields that map Cordova fields specified
-                // (tizenFields is a string or an array of strings)
-                var tizenFields = fieldMappings[fields[field]];
-
-                if (!tizenFields) {
-                    // does something maps
-                    continue;
-                }
-
-                // construct the filter expression using the Tizen fields
-                for ( var index in tizenFields) {
-                    attributeFilter = new tizen.AttributeFilter(tizenFields[index], matchFlag, matchValue);
-                    if (attributeFilter !== null) {
-                        attributesArray.push(attributeFilter);
-                    }
-                }
-            }
-        }
-
-        // fulfill Tizen find attribute as a single or a composite attribute
-        if (attributesArray.length == 1 ) {
-            filterExpression = attributeFilter[0];
-        } else if (attributesArray.length > 1) {
-            // combine the filters as a Union
-            filterExpression = new tizen.CompositeFilter("UNION", attributesArray);
-        } else {
-            filterExpression = null;
-        }
-
-        return filterExpression;
-    },
-
-
-    /**
-     * Creates a Contact object from a Tizen Contact object, copying only
-     * the fields specified.
-     *
-     * This is intended as a privately used function but it is made globally
-     * available so that a Contact.save can convert a BlackBerry contact object
-     * into its W3C equivalent.
-     *
-     * @param {tizen.Contact}
-     *            tizenContact Tizen Contact object
-     * @param {String[]}
-     *            fields array of contact fields that should be copied
-     * @return {Contact} a contact object containing the specified fields or
-     *         null if the specified contact is null
-     */
-    createContact: function(tizenContact, fields) {
-
-        if (!tizenContact) {
-            return null;
-        }
-
-        // construct a new contact object
-        // always copy the contact id and displayName fields
-        var contact = new Contact(tizenContact.id, tizenContact.name.displayName);
-
-
-        // nothing to do
-        if (!fields || !(utils.isArray(fields)) || fields.length === 0) {
-            return contact;
-        }
-        else if (fields.length === 1 && fields[0] === "*") {
-            // Cordova enhancement to allow fields value of ["*"] to indicate
-            // all supported fields.
-            fields = allFields;
-        }
-
-        // add the fields specified
-        for ( var key in fields) {
-
-            var field = fields[key],
-                index = 0;
-
-            if (!field) {
-                continue;
-            }
-
-            // name
-            if (field.indexOf('name') === 0) {
-                var formattedName = (tizenContact.name.prefix || "");
-
-                if (tizenContact.name.firstName) {
-                    formattedName += ' ';
-                    formattedName += (tizenContact.name.firstName || "");
-                }
-
-                if (tizenContact.name.middleName) {
-                    formattedName += ' ';
-                    formattedName += (tizenContact.name.middleName || "");
-                }
-
-                if (tizenContact.name.lastName) {
-                    formattedName += ' ';
-                    formattedName += (tizenContact.name.lastName || "");
-                }
-
-                //Tizen 2.0
-                if (tizenContact.name.suffix) {
-                    formattedName += ' ';
-                    formattedName += (tizenContact.name.suffix || "");
-                }
-
-                contact.name = new ContactName(
-                        formattedName,
-                        tizenContact.name.lastName,
-                        tizenContact.name.firstName,
-                        tizenContact.name.middleName,
-                        tizenContact.name.prefix,
-                        tizenContact.name.suffix);
-            }
-            // phoneNumbers - Tizen 2.0
-            else if (field.indexOf('phoneNumbers') === 0) {
-                var phoneNumbers = [];
-
-                for (index = 0 ; index < tizenContact.phoneNumbers.length ; ++index) {
-                    phoneNumbers.push(
-                        new ContactField(
-                            'PHONE',
-                            tizenContact.phoneNumbers[index].number,
-                            tizenContact.phoneNumbers[index].isDefault));
-                }
-                contact.phoneNumbers = phoneNumbers.length > 0 ? phoneNumbers : null;
-            }
-
-            // emails - Tizen 2.0
-            else if (field.indexOf('emails') === 0) {
-                var emails = [];
-
-                for (index = 0 ; index < tizenContact.emails.length ; ++index) {
-                    emails.push(
-                        new ContactField(
-                            'EMAILS',
-                            tizenContact.emails[index].email,
-                            tizenContact.emails[index].isDefault));
-                }
-                contact.emails = emails.length > 0 ? emails : null;
-            }
-
-            // addresses Tizen 2.0
-            else if (field.indexOf('addresses') === 0) {
-                var addresses = [];
-
-                for (index = 0 ; index < tizenContact.addresses.length ; ++index) {
-                    addresses.push(
-                         new ContactAddress(
-                            tizenContact.addresses[index].isDefault,
-                            tizenContact.addresses[index].types[0] ? tizenContact.addresses[index].types[0] : "HOME",
-                            null,
-                            tizenContact.addresses[index].streetAddress,
-                            tizenContact.addresses[index].city,
-                            tizenContact.addresses[index].region,
-                            tizenContact.addresses[index].postalCode,
-                            tizenContact.addresses[index].country ));
-                }
-                contact.addresses = addresses.length > 0 ? addresses : null;
-            }
-
-            // birthday
-            else if (field.indexOf('birthday') === 0) {
-                if (utils.isDate(tizenContact.birthday)) {
-                    contact.birthday = tizenContact.birthday;
-                }
-            }
-
-            // note only one in Tizen Contact -Tizen 2.0
-            else if (field.indexOf('note') === 0) {
-                if (tizenContact.notes) {
-                    contact.note = tizenContact.notes[0];
-                }
-            }
-            // organizations Tizen 2.0
-            else if (field.indexOf('organizations') === 0) {
-                var organizations = [];
-
-                for (index = 0 ; index < tizenContact.organizations.length ; ++index) {
-                    organizations.push(
-                            new ContactOrganization(
-                                    (index === 0),
-                                    'WORK',
-                                    tizenContact.organizations.name,
-                                    tizenContact.organizations.department,
-                                    tizenContact.organizations.jobTitle));
-                }
-                contact.organizations = organizations.length > 0 ? organizations : null;
-            }
-
-            // urls
-            else if (field.indexOf('urls') === 0) {
-                var urls = [];
-
-                if (tizenContact.urls) {
-                    for (index = 0 ; index <tizenContact.urls.length ; ++index) {
-                        urls.push(
-                                new ContactField(
-                                        tizenContact.urls[index].type,
-                                        tizenContact.urls[index].url,
-                                        (index === 0)));
-                    }
-                }
-                contact.urls = urls.length > 0 ? urls : null;
-            }
-
-            // photos
-            else if (field.indexOf('photos') === 0) {
-                var photos = [];
-
-                if (tizenContact.photoURI) {
-                    photos.push(new ContactField('URI', tizenContact.photoURI, true));
-                }
-                contact.photos = photos.length > 0 ? photos : null;
-            }
-        }
-
-        return contact;
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/ad723456/lib/tizen/plugin/tizen/Device.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/Device.js b/lib/tizen/plugin/tizen/Device.js
deleted file mode 100644
index fb8a694..0000000
--- a/lib/tizen/plugin/tizen/Device.js
+++ /dev/null
@@ -1,61 +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.
- *
-*/
-
-/*global tizen:false */
-var channel = require('cordova/channel');
-
-//console.log("TIZEN DEVICE START");
-
-
-// Tell cordova channel to wait on the CordovaInfoReady event - PPL is this useful?
-//channel.waitForInitialization('onCordovaInfoReady');
-
-function Device() {
-    this.version = "2.1.0"; // waiting a working solution of the security error see below
-    this.uuid = null;
-    this.model = null;
-    this.cordova = CORDOVA_JS_BUILD_LABEL;
-    this.platform = "Tizen";
-   
-    this.getDeviceInfo();
-}
-
-Device.prototype.getDeviceInfo = function() {
-
-    var deviceCapabilities =  tizen.systeminfo.getCapabilities();
-
-    if (deviceCapabilities) {
-        this.version = deviceCapabilities.platformVersion; // requires http://tizen.org/privilege/system  (and not "systeminfo")  privileges to be added in config.xml
-        this.uuid = deviceCapabilities.duid;
-        this.model = deviceCapabilities.platformName;
-        
-        channel.onCordovaInfoReady.fire();
-    }
-    else {
-        console.log("error initializing cordova: ");
-    }
-};
-
-module.exports = new Device();
-
-//console.log("TIZEN DEVICE END");
-
-

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/ad723456/lib/tizen/plugin/tizen/File.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/File.js b/lib/tizen/plugin/tizen/File.js
deleted file mode 100644
index e99eef3..0000000
--- a/lib/tizen/plugin/tizen/File.js
+++ /dev/null
@@ -1,610 +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.
- *
-*/
-
-
-//console.log("TIZEN FILE START");
-
-/*global WebKitBlobBuilder:false */
-var FileError = require('cordova/plugin/FileError'),
-    DirectoryEntry = require('cordova/plugin/DirectoryEntry'),
-    FileEntry = require('cordova/plugin/FileEntry'),
-    File = require('cordova/plugin/File'),
-    FileSystem = require('cordova/plugin/FileSystem');
-
-var nativeRequestFileSystem = window.webkitRequestFileSystem,
-    nativeResolveLocalFileSystemURI = window.webkitResolveLocalFileSystemURL,
-    NativeFileReader = window.FileReader;
-
-function getFileSystemName(nativeFs) {
-    return (nativeFs.name.indexOf("Persistent") != -1) ? "persistent" : "temporary";
-}
-
-function makeEntry(entry) {
-    if (entry.isDirectory) {
-        return new DirectoryEntry(entry.name, decodeURI(entry.toURL()));
-    }
-    else {
-        return new FileEntry(entry.name, decodeURI(entry.toURL()));
-    }
-}
-
-module.exports = {
-    /* common/equestFileSystem.js, args = [type, size] */
-    requestFileSystem: function(successCallback, errorCallback, args) {
-        var type = args[0],
-            size = args[1];
-
-        nativeRequestFileSystem(
-            type,
-            size,
-            function(nativeFs) {
-                successCallback(new FileSystem(getFileSystemName(nativeFs), makeEntry(nativeFs.root)));
-            },
-            function(error) {
-                errorCallback(error.code);
-            }
-        );
-    },
-
-    /* common/resolveLocalFileSystemURI.js, args= [uri] */
-    resolveLocalFileSystemURI: function(successCallback, errorCallback, args) {
-        var uri = args[0];
-
-        nativeResolveLocalFileSystemURI(
-            uri,
-            function(entry) {
-                successCallback(makeEntry(entry));
-            },
-            function(error) {
-                errorCallback(error.code);
-            }
-        );
-    },
-
-    /* common/DirectoryReader.js, args = [this.path] */
-    readEntries: function(successCallback, errorCallback, args) {
-        var uri = args[0];
-
-        nativeResolveLocalFileSystemURI(
-            uri,
-            function(dirEntry) {
-                var reader = dirEntry.createReader();
-
-                reader.readEntries(
-                    function(entries) {
-                        var retVal = [];
-                        for (var i = 0; i < entries.length; i++) {
-                            retVal.push(makeEntry(entries[i]));
-                        }
-                        successCallback(retVal);
-                    },
-                    function(error) {
-                        errorCallback(error.code);
-                    }
-                );
-            },
-            function(error) {
-                errorCallback(error.code);
-            }
-        );
-    },
-
-    /* common/Entry.js , args = [this.fullPath] */
-    getMetadata: function(successCallback, errorCallback, args) {
-        var uri = args[0];
-
-        nativeResolveLocalFileSystemURI(
-            uri,
-            function(entry) {
-                entry.getMetadata(
-                    function(metaData) {
-                        successCallback(metaData.modificationTime);
-                    },
-                    function(error) {
-                        errorCallback(error.code);
-                    }
-                );
-            },
-            function(error) {
-                errorCallback(error.code);
-            }
-        );
-    },
-
-    /* args = [this.fullPath, metadataObject] */
-    /* PPL to be implemented */
-    setMetadata: function(successCallback, errorCallback, args) {
-        var uri = args[0],
-            metadata = args[1];
-
-        if (errorCallback) {
-            errorCallback(FileError.NOT_FOUND_ERR);
-        }
-    },
-
-
-    /* args = [srcPath, parent.fullPath, name] */
-    moveTo: function(successCallback, errorCallback, args) {
-        var srcUri = args[0],
-            parentUri = args[1],
-            name = args[2];
-
-        nativeResolveLocalFileSystemURI(
-            srcUri,
-            function(source) {
-                nativeResolveLocalFileSystemURI(
-                    parentUri,
-                    function(parent) {
-                        source.moveTo(
-                            parent,
-                            name,
-                            function(entry) {
-                                successCallback(makeEntry(entry));
-                            },
-                            function(error) {
-                                errorCallback(error.code);
-                            }
-                        );
-                    },
-                    function(error) {
-                        errorCallback(error.code);
-                    }
-                );
-            },
-            function(error) {
-                errorCallback(error.code);
-            }
-        );
-    },
-
-    /* args = [srcPath, parent.fullPath, name] */
-    copyTo: function(successCallback, errorCallback, args) {
-        var srcUri = args[0],
-            parentUri = args[1],
-            name = args[2];
-
-        nativeResolveLocalFileSystemURI(
-            srcUri,
-            function(source) {
-                nativeResolveLocalFileSystemURI(
-                    parentUri,
-                    function(parent) {
-                        source.copyTo(
-                            parent,
-                            name,
-                            function(entry) {
-                                successCallback(makeEntry(entry));
-                            },
-                            function(error) {
-                                errorCallback(error.code);
-                            }
-                        );
-                    },
-                    function(error) {
-                        errorCallback(error.code);
-                    }
-                );
-            },
-            function(error) {
-                errorCallback(error.code);
-            }
-        );
-    },
-
-
-    /* args = [this.fullPath] */
-    remove: function(successCallback, errorCallback, args) {
-        var uri = args[0];
-
-        nativeResolveLocalFileSystemURI(
-            uri,
-            function(entry) {
-                if (entry.fullPath === "/") {
-                    errorCallback(FileError.NO_MODIFICATION_ALLOWED_ERR);
-                }
-                else {
-                    entry.remove(
-                        successCallback,
-                        function(error) {
-                            errorCallback(error.code);
-                        }
-                    );
-                }
-            },
-            function(error) {
-                errorCallback(error.code);
-            }
-        );
-    },
-
-    /* args = [this.fullPath] */
-    getParent: function(successCallback, errorCallback, args) {
-        var uri = args[0];
-
-        nativeResolveLocalFileSystemURI(
-            uri,
-            function(entry) {
-                entry.getParent(
-                    function(entry) {
-                        successCallback(makeEntry(entry));
-                    },
-                    function(error) {
-                        errorCallback(error.code);
-                    }
-                );
-            },
-            function(error) {
-                errorCallback(error.code);
-            }
-        );
-    },
-
-    /* common/FileEntry.js, args = [this.fullPath] */
-    getFileMetadata: function(successCallback, errorCallback, args) {
-        var uri = args[0];
-
-        nativeResolveLocalFileSystemURI(
-            uri,
-            function(entry) {
-                entry.file(
-                    function(file) {
-                        var retVal = new File(file.name, decodeURI(entry.toURL()), file.type, file.lastModifiedDate, file.size);
-                        successCallback(retVal);
-                    },
-                    function(error) {
-                        errorCallback(error.code);
-                    }
-                );
-            },
-            function(error) {
-                errorCallback(error.code);
-            }
-        );
-    },
-
-    /* common/DirectoryEntry.js , args = [this.fullPath, path, options] */
-    getDirectory: function(successCallback, errorCallback, args) {
-        var uri = args[0],
-            path = args[1],
-            options = args[2];
-
-        nativeResolveLocalFileSystemURI(
-            uri,
-            function(entry) {
-                entry.getDirectory(
-                    path,
-                    options,
-                    function(entry) {
-                        successCallback(makeEntry(entry));
-                    },
-                    function(error) {
-                        if (error.code === FileError.INVALID_MODIFICATION_ERR) {
-                            if (options.create) {
-                                errorCallback(FileError.PATH_EXISTS_ERR);
-                            }
-                            else {
-                                errorCallback(FileError.ENCODING_ERR);
-                            }
-                        }
-                        else {
-                            errorCallback(error.code);
-                        }
-                    }
-                );
-            },
-            function(error) {
-                errorCallback(error.code);
-            }
-        );
-    },
-
-    /* args = [this.fullPath] */
-    removeRecursively: function(successCallback, errorCallback, args) {
-        var uri = args[0];
-
-        nativeResolveLocalFileSystemURI(
-            uri,
-            function(entry) {
-                if (entry.fullPath === "/") {
-                    errorCallback(FileError.NO_MODIFICATION_ALLOWED_ERR);
-                }
-                else {
-                    entry.removeRecursively(
-                        successCallback,
-                        function(error) {
-                            errorCallback(error.code);
-                        }
-                    );
-                }
-            },
-            function(error) {
-                errorCallback(error.code);
-            }
-        );
-    },
-
-    /* args = [this.fullPath, path, options] */
-    getFile: function(successCallback, errorCallback, args) {
-        var uri = args[0],
-            path = args[1],
-            options = args[2];
-
-        nativeResolveLocalFileSystemURI(
-            uri,
-            function(entry) {
-                entry.getFile(
-                    path,
-                    options,
-                    function(entry) {
-                        successCallback(makeEntry(entry));
-                    },
-                    function(error) {
-                        if (error.code === FileError.INVALID_MODIFICATION_ERR) {
-                            if (options.create) {
-                                errorCallback(FileError.PATH_EXISTS_ERR);
-                            }
-                            else {
-                                errorCallback(FileError.ENCODING_ERR);
-                            }
-                        }
-                        else {
-                            errorCallback(error.code);
-                        }
-                    }
-                );
-            },
-            function(error) {
-                errorCallback(error.code);
-            }
-        );
-    },
-
-    /* common/FileReader.js, args = execArgs = [filepath, encoding, file.start, file.end] */
-    readAsText: function(successCallback, errorCallback, args) {
-        var uri = args[0],
-            encoding = args[1];
-
-        nativeResolveLocalFileSystemURI(
-            uri,
-            function(entry) {
-                var onLoadEnd = function(evt) {
-                        if (!evt.target.error) {
-                            successCallback(evt.target.result);
-                        }
-                    },
-                    onError = function(evt) {
-                        errorCallback(evt.target.error.code);
-                    };
-
-                var reader = new NativeFileReader();
-
-                reader.onloadend = onLoadEnd;
-                reader.onerror = onError;
-
-                entry.file(
-                    function(file) {
-                        reader.readAsText(file, encoding);
-                    },
-                    function(error) {
-                        errorCallback(error.code);
-                    }
-                );
-            },
-            function(error) {
-                errorCallback(error.code);
-            }
-        );
-    },
-
-    /* args = execArgs = [this._fileName, file.start, file.end] */
-    readAsDataURL: function(successCallback, errorCallback, args) {
-        var uri = args[0];
-
-        nativeResolveLocalFileSystemURI(
-            uri,
-            function(entry) {
-                var onLoadEnd = function(evt) {
-                        if (!evt.target.error) {
-                            successCallback(evt.target.result);
-                        }
-                    },
-                    onError = function(evt) {
-                        errorCallback(evt.target.error.code);
-                    };
-
-                var reader = new NativeFileReader();
-
-                reader.onloadend = onLoadEnd;
-                reader.onerror = onError;
-                entry.file(
-                    function(file) {
-                        reader.readAsDataURL(file);
-                    },
-                    function(error) {
-                        errorCallback(error.code);
-                    }
-                );
-            },
-            function(error) {
-                errorCallback(error.code);
-            }
-        );
-    },
-
-    /* args = execArgs =  [this._fileName, file.start, file.end] */
-    /* PPL, to Be implemented , for now it is pasted from readAsText...*/
-    readAsBinaryString: function(successCallback, errorCallback, args) {
-        var uri = args[0];
-
-        nativeResolveLocalFileSystemURI(
-            uri,
-            function(entry) {
-                var onLoadEnd = function(evt) {
-                        if (!evt.target.error) {
-                            successCallback(evt.target.result);
-                        }
-                    },
-                    onError = function(evt) {
-                        errorCallback(evt.target.error.code);
-                    };
-
-                var reader = new NativeFileReader();
-
-                reader.onloadend = onLoadEnd;
-                reader.onerror = onError;
-
-                entry.file(
-                    function(file) {
-                        reader.readAsDataURL(file);
-                    },
-                    function(error) {
-                        errorCallback(error.code);
-                    }
-                );
-            },
-            function(error) {
-                errorCallback(error.code);
-            }
-        );
-    },
-
-
-    /* args = execArgs =  [this._fileName, file.start, file.end] */
-    /* PPL, to Be implemented , for now it is pasted from readAsText...*/
-    readAsArrayBuffer: function(successCallback, errorCallback, args) {
-        var uri = args[0];
-
-        nativeResolveLocalFileSystemURI(
-            uri,
-            function(entry) {
-                var onLoadEnd = function(evt) {
-                        if (!evt.target.error) {
-                            successCallback(evt.target.result);
-                        }
-                    },
-                    onError = function(evt) {
-                        errorCallback(evt.target.error.code);
-                    };
-
-                var reader = new NativeFileReader();
-
-                reader.onloadend = onLoadEnd;
-                reader.onerror = onError;
-
-                entry.file(
-                    function(file) {
-                        reader.readAsDataURL(file);
-                    },
-                    function(error) {
-                        errorCallback(error.code);
-                    }
-                );
-            },
-            function(error) {
-                errorCallback(error.code);
-            }
-        );
-    },
-
-    /* common/FileWriter.js, args = [this.fileName, text, this.position] */
-    write: function(successCallback, errorCallback, args) {
-        var uri = args[0],
-            text = args[1],
-            position = args[2];
-
-        nativeResolveLocalFileSystemURI(
-            uri,
-            function(entry) {
-                var onWriteEnd = function(evt) {
-                        if(!evt.target.error) {
-                            successCallback(evt.target.position - position);
-                        }
-                        else {
-                            errorCallback(evt.target.error.code);
-                        }
-                    },
-                    onError = function(evt) {
-                        errorCallback(evt.target.error.code);
-                    };
-
-                entry.createWriter(
-                    function(writer) {
-                        var blob = new WebKitBlobBuilder();
-                        blob.append(text);
-
-                        writer.onwriteend = onWriteEnd;
-                        writer.onerror = onError;
-
-                        writer.seek(position);
-                        writer.write(blob.getBlob('text/plain'));
-                    },
-                    function(error) {
-                        errorCallback(error.code);
-                    }
-                );
-            },
-            function(error) {
-                errorCallback(error.code);
-            }
-        );
-    },
-
-    /* args = [this.fileName, size] */
-    truncate: function(successCallback, errorCallback, args) {
-        var uri = args[0],
-            size = args[1];
-
-        nativeResolveLocalFileSystemURI(
-            uri,
-            function(entry) {
-                var onWriteEnd = function(evt) {
-                        if(!evt.target.error) {
-                            successCallback(evt.target.length);
-                        }
-                        else {
-                            errorCallback(evt.target.error.code);
-                        }
-                    },
-                    onError = function(evt) {
-                        errorCallback(evt.target.error.code);
-                    };
-
-                entry.createWriter(
-                    function(writer) {
-                        writer.onwriteend = onWriteEnd;
-                        writer.onerror = onError;
-                        writer.truncate(size);
-                    },
-                    function(error) {
-                        errorCallback(error.code);
-                    }
-                );
-            },
-            function(error) {
-                errorCallback(error.code);
-            }
-        );
-    }
-};
-
-
-//console.log("TIZEN FILE END");
-

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/ad723456/lib/tizen/plugin/tizen/FileTransfer.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/FileTransfer.js b/lib/tizen/plugin/tizen/FileTransfer.js
deleted file mode 100644
index 8a59254..0000000
--- a/lib/tizen/plugin/tizen/FileTransfer.js
+++ /dev/null
@@ -1,203 +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.
- *
-*/
-
-/*global WebKitBlobBuilder:false */
-
-
-//console.log("TIZEN FILE TRANSFER START");
-
-var FileEntry = require('cordova/plugin/FileEntry'),
-    FileTransferError = require('cordova/plugin/FileTransferError'),
-    FileUploadResult = require('cordova/plugin/FileUploadResult');
-
-var nativeResolveLocalFileSystemURI = window.webkitResolveLocalFileSystemURL;
-
-function getParentPath(filePath) {
-    var pos = filePath.lastIndexOf('/');
-    return filePath.substring(0, pos + 1);
-}
-
-function getFileName(filePath) {
-    var pos = filePath.lastIndexOf('/');
-    return filePath.substring(pos + 1);
-}
-
-module.exports = {
-    /* common/FileTransfer.js, args = [filePath, server, fileKey, fileName, mimeType, params, trustAllHosts, chunkedMode, headers, this._id, httpMethod] */
-    upload: function(successCallback, errorCallback, args) {
-        var filePath = args[0],
-            server = args[1],
-            fileKey = args[2],
-            fileName = args[3],
-            mimeType = args[4],
-            params = args[5],
-            /*trustAllHosts = args[6],*/
-            chunkedMode = args[7];
-
-        nativeResolveLocalFileSystemURI(
-            filePath,
-            function(entry) {
-                entry.file(
-                    function(file) {
-                        function uploadFile(blobFile) {
-                            var fd = new FormData();
-
-                            fd.append(fileKey, blobFile, fileName);
-
-                            for (var prop in params) {
-                                if(params.hasOwnProperty(prop)) {
-                                    fd.append(prop, params[prop]);
-                                }
-                            }
-                            var xhr = new XMLHttpRequest();
-
-                            xhr.open("POST", server);
-
-                            xhr.onload = function(evt) {
-                                if (xhr.status == 200) {
-                                    var result = new FileUploadResult();
-                                    result.bytesSent = file.size;
-                                    result.responseCode = xhr.status;
-                                    result.response = xhr.response;
-                                    successCallback(result);
-                                }
-                                else if (xhr.status == 404) {
-                                    errorCallback(new FileTransferError(FileTransferError.INVALID_URL_ERR));
-                                }
-                                else {
-                                    errorCallback(new FileTransferError(FileTransferError.CONNECTION_ERR));
-                                }
-                            };
-
-                            xhr.ontimeout = function(evt) {
-                                errorCallback(new FileTransferError(FileTransferError.CONNECTION_ERR));
-                            };
-
-                            xhr.send(fd);
-                        }
-
-                        var bytesPerChunk;
-
-                        if (chunkedMode === true) {
-                            bytesPerChunk = 1024 * 1024; // 1MB chunk sizes.
-                        }
-                        else {
-                            bytesPerChunk = file.size;
-                        }
-                        var start = 0;
-                        var end = bytesPerChunk;
-                        while (start < file.size) {
-                            var chunk = file.webkitSlice(start, end, mimeType);
-                            uploadFile(chunk);
-                            start = end;
-                            end = start + bytesPerChunk;
-                        }
-                    },
-                    function(error) {
-                        errorCallback(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR));
-                    }
-                );
-            },
-            function(error) {
-                errorCallback(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR));
-            }
-        );
-    },
-
-    /* args = [source, target, trustAllHosts, this._id, headers] */
-    download: function(successCallback, errorCallback, args) {
-        var url = args[0],
-            filePath = args[1];
-
-        var xhr = new XMLHttpRequest();
-
-        function writeFile(fileEntry) {
-            fileEntry.createWriter(
-                function(writer) {
-                    writer.onwriteend = function(evt) {
-                        if (!evt.target.error) {
-                            successCallback(new FileEntry(fileEntry.name, fileEntry.toURL()));
-                        } else {
-                            errorCallback(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR));
-                        }
-                    };
-
-                    writer.onerror = function(evt) {
-                        errorCallback(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR));
-                    };
-
-                    var builder = new WebKitBlobBuilder();
-                    builder.append(xhr.response);
-
-                    var blob = builder.getBlob();
-                    writer.write(blob);
-                },
-                function(error) {
-                    errorCallback(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR));
-                }
-            );
-        }
-
-        xhr.onreadystatechange = function () {
-            if (xhr.readyState == xhr.DONE) {
-                if (xhr.status == 200 && xhr.response) {
-                    nativeResolveLocalFileSystemURI(
-                        getParentPath(filePath),
-                        function(dir) {
-                            dir.getFile(
-                                getFileName(filePath),
-                                {create: true},
-                                writeFile,
-                                function(error) {
-                                    errorCallback(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR));
-                                }
-                            );
-                        },
-                        function(error) {
-                            errorCallback(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR));
-                        }
-                    );
-                }
-                else if (xhr.status == 404) {
-                    errorCallback(new FileTransferError(FileTransferError.INVALID_URL_ERR));
-                }
-                else {
-                    errorCallback(new FileTransferError(FileTransferError.CONNECTION_ERR));
-                }
-            }
-        };
-
-        xhr.open("GET", url, true);
-        xhr.responseType = "arraybuffer";
-        xhr.send();
-    },
-
-
-    /* args = [this._id]); */
-    abort: function(successCallback, errorCallback, args) {
-        errorCallback(FileTransferError.ABORT_ERR);
-    }
-
-};
-
-
-//console.log("TIZEN FILE TRANSFER END");
-


Mime
View raw message