[Dialog] Code structure changed to match cordova architecture.
authorPawel Andruszkiewicz <p.andruszkie@samsung.com>
Thu, 7 Apr 2016 11:47:38 +0000 (13:47 +0200)
committerPawel Andruszkiewicz <p.andruszkie@samsung.com>
Thu, 7 Apr 2016 11:50:36 +0000 (13:50 +0200)
Change-Id: Ia862a78e1508b61d7a9cbb117a6bebc3004e0da7
Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
src/cordova-api.gyp
src/dialog/cordova_dialog.gyp [deleted file]
src/dialog/cordova_dialog_extension.cc [deleted file]
src/dialog/cordova_dialog_extension.h [deleted file]
src/lib/cordova_plugins.js
src/lib/plugins/cordova-plugin-dialogs/tizen/Notification.js [moved from src/dialog/cordova_dialog_api.js with 98% similarity]

index 9741543..21eb766 100644 (file)
@@ -9,7 +9,6 @@
       'type': 'none',
       'dependencies': [
         'cordova/cordova.gyp:*',
-        'dialog/cordova_dialog.gyp:*',
         'events/cordova_events.gyp:*',
         'file/cordova_file.gyp:*',
         'globalization/cordova_globalization.gyp:*',
diff --git a/src/dialog/cordova_dialog.gyp b/src/dialog/cordova_dialog.gyp
deleted file mode 100644 (file)
index 8f13ec3..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-{
-  'includes':[
-    '/usr/include/webapi-plugins/src/common/common.gypi',
-  ],
-  'targets': [
-    {
-      'target_name': 'tizen_cordova_dialog',
-      'type': 'loadable_module',
-      'sources': [
-        'cordova_dialog_api.js',
-        'cordova_dialog_extension.cc',
-        'cordova_dialog_extension.h',
-      ],
-      'include_dirs': [
-        '../',
-        '<(SHARED_INTERMEDIATE_DIR)',
-      ],
-      'variables': {
-        'packages': [
-          'webapi-plugins',
-        ],
-      },
-    },
-  ],
-}
diff --git a/src/dialog/cordova_dialog_extension.cc b/src/dialog/cordova_dialog_extension.cc
deleted file mode 100755 (executable)
index a375d3a..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 "dialog/cordova_dialog_extension.h"
-
-// This will be generated from cordova_dialog_api.js
-extern const char kSource_cordova_dialog_api[];
-
-common::Extension* CreateExtension() {
-  return new extension::cordova::dialog::CordovaDialogExtension();
-}
-
-namespace extension {
-namespace cordova {
-namespace dialog {
-
-CordovaDialogExtension::CordovaDialogExtension() {
-  SetExtensionName("tizen.cordova.dialog");
-  SetJavaScriptAPI(kSource_cordova_dialog_api);
-}
-
-CordovaDialogExtension::~CordovaDialogExtension() {}
-
-}  // dialog
-}  // cordova
-}  // extension
diff --git a/src/dialog/cordova_dialog_extension.h b/src/dialog/cordova_dialog_extension.h
deleted file mode 100755 (executable)
index 613653b..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 DIALOG_CORDOVA_DIALOG_EXTENSION_H_
-#define DIALOG_CORDOVA_DIALOG_EXTENSION_H_
-
-#include <common/extension.h>
-
-namespace extension {
-namespace cordova {
-namespace dialog {
-
-class CordovaDialogExtension : public common::Extension {
- public:
-  CordovaDialogExtension();
-  virtual ~CordovaDialogExtension();
-};
-
-}  // dialog
-}  // cordova
-}  // extension
-
-#endif // DIALOG_CORDOVA_DIALOG_EXTENSION_H_
index 7c2cb1d..c2ef0cf 100644 (file)
@@ -53,6 +53,11 @@ module.exports = [
         ]
     },
     {
+      "file": "plugins/cordova-plugin-dialogs/tizen/Notification.js",
+      "id": "cordova-plugin-dialogs.tizen.Notification",
+      "runs": true
+    },
+    {
       "file": "plugins/cordova-plugin-events/www/register.js",
       "id": "cordova-plugin-events.register",
       "runs": true
similarity index 98%
rename from src/dialog/cordova_dialog_api.js
rename to src/lib/plugins/cordova-plugin-dialogs/tizen/Notification.js
index 67fc46f..044e5df 100755 (executable)
@@ -355,8 +355,4 @@ console.log('Loaded cordova.dialog API');
 
 // TODO: remove when added to public cordova repository -> begin
 });
-
-exports = function(require) {
-  require('cordova-tizen').addPlugin('cordova-plugin-dialogs.notification', plugin_name, 'runs');
-};
 // TODO: remove -> end