[FileTransfer] Code structure changed to match cordova architecture.
authorPawel Andruszkiewicz <p.andruszkie@samsung.com>
Thu, 7 Apr 2016 12:19:18 +0000 (14:19 +0200)
committerPawel Andruszkiewicz <p.andruszkie@samsung.com>
Thu, 7 Apr 2016 12:19:18 +0000 (14:19 +0200)
Change-Id: I22a8e934fd8800ec9dbcdc4b0dba1b469881428e
Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
src/cordova-api.gyp
src/filetransfer/cordova_filetransfer.gyp [deleted file]
src/filetransfer/cordova_filetransfer_extension.cc [deleted file]
src/filetransfer/cordova_filetransfer_extension.h [deleted file]
src/lib/cordova_plugins.js
src/lib/plugins/cordova-plugin-file-transfer/tizen/FileTransfer.js [moved from src/filetransfer/cordova_filetransfer_api.js with 98% similarity]

index 970edd7..8b1b5f2 100644 (file)
@@ -12,7 +12,6 @@
         'file/cordova_file.gyp:*',
         'globalization/cordova_globalization.gyp:*',
         'networkinformation/cordova_networkinformation.gyp:*',
-        'filetransfer/cordova_filetransfer.gyp:*',
         'media/cordova_media.gyp:*',
       ],
     },
diff --git a/src/filetransfer/cordova_filetransfer.gyp b/src/filetransfer/cordova_filetransfer.gyp
deleted file mode 100644 (file)
index 661d2be..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-{
-  'includes':[
-    '/usr/include/webapi-plugins/src/common/common.gypi',
-  ],
-  'targets': [
-    {
-      'target_name': 'tizen_cordova_filetransfer',
-      'type': 'loadable_module',
-      'sources': [
-        'cordova_filetransfer_api.js',
-        'cordova_filetransfer_extension.cc',
-        'cordova_filetransfer_extension.h',
-      ],
-      'include_dirs': [
-        '../',
-        '<(SHARED_INTERMEDIATE_DIR)',
-      ],
-      'variables': {
-        'packages': [
-          'webapi-plugins',
-        ],
-      },
-    },
-  ],
-}
diff --git a/src/filetransfer/cordova_filetransfer_extension.cc b/src/filetransfer/cordova_filetransfer_extension.cc
deleted file mode 100755 (executable)
index 945f598..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT 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 "filetransfer/cordova_filetransfer_extension.h"
-
-// This will be generated from cordova_filetransfer_api.js
-extern const char kSource_cordova_filetransfer_api[];
-
-common::Extension* CreateExtension() {
-  return new extension::cordova::filetransfer::CordovaFiletransferExtension();
-}
-
-namespace extension {
-namespace cordova {
-namespace filetransfer {
-
-CordovaFiletransferExtension::CordovaFiletransferExtension() {
-  SetExtensionName("tizen.cordova.filetransfer");
-  SetJavaScriptAPI(kSource_cordova_filetransfer_api);
-}
-
-CordovaFiletransferExtension::~CordovaFiletransferExtension() {}
-
-}  // filetransfer
-}  // cordova
-}  // extension
diff --git a/src/filetransfer/cordova_filetransfer_extension.h b/src/filetransfer/cordova_filetransfer_extension.h
deleted file mode 100755 (executable)
index 720590b..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT 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 FILETRANSFER_CORDOVA_FILETRANSFER_EXTENSION_H_
-#define FILETRANSFER_CORDOVA_FILETRANSFER_EXTENSION_H_
-
-#include <common/extension.h>
-
-namespace extension {
-namespace cordova {
-namespace filetransfer {
-
-class CordovaFiletransferExtension : public common::Extension {
- public:
-  CordovaFiletransferExtension();
-  virtual ~CordovaFiletransferExtension();
-};
-
-}  // filetransfer
-}  // cordova
-}  // extension
-
-#endif // FILETRANSFER_CORDOVA_FILETRANSFER_EXTENSION_H_
index 699af6e..a19039e 100644 (file)
@@ -220,6 +220,11 @@ module.exports = [
         ]
     },
     {
+      "file": "plugins/cordova-plugin-file-transfer/tizen/FileTransfer.js",
+      "id": "cordova-plugin-file-transfer.tizen.FileTransfer",
+      "runs": true
+    },
+    {
         "file": "plugins/cordova-plugin-network-information/www/network.js",
         "id": "cordova-plugin-network-information.network",
         "clobbers": [
@@ -289,8 +289,4 @@ console.log('Loaded cordova.file-transfer API');
 
 // TODO: remove when added to public cordova repository -> begin
 });
-
-exports = function(require) {
-  require('cordova-tizen').addPlugin('cordova-plugin-file-transfer.FileTransfer', plugin_name, 'runs');
-};
 // TODO: remove -> end