[Media] Code structure changed to match cordova architecture.
authorPawel Andruszkiewicz <p.andruszkie@samsung.com>
Thu, 7 Apr 2016 12:27:51 +0000 (14:27 +0200)
committerPawel Andruszkiewicz <p.andruszkie@samsung.com>
Thu, 7 Apr 2016 12:27:51 +0000 (14:27 +0200)
Change-Id: Id08058932daaa612b887badf48aa498e942bec4b
Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
src/cordova-api.gyp
src/lib/cordova_plugins.js
src/lib/plugins/cordova-plugin-media/tizen/Media.js [moved from src/media/cordova_media_api.js with 99% similarity]
src/media/cordova_media.gyp [deleted file]
src/media/cordova_media_extension.cc [deleted file]
src/media/cordova_media_extension.h [deleted file]

index 8b1b5f2..af8643b 100644 (file)
@@ -12,7 +12,6 @@
         'file/cordova_file.gyp:*',
         'globalization/cordova_globalization.gyp:*',
         'networkinformation/cordova_networkinformation.gyp:*',
-        'media/cordova_media.gyp:*',
       ],
     },
   ], # end targets
index a19039e..9d4303a 100644 (file)
@@ -266,6 +266,11 @@ module.exports = [
         "clobbers": [
             "window.Media"
         ]
+    },
+    {
+      "file": "plugins/cordova-plugin-media/tizen/Media.js",
+      "id": "cordova-plugin-media.tizen.Media",
+      "runs": true
     }
 ];
 module.exports.metadata =
similarity index 99%
rename from src/media/cordova_media_api.js
rename to src/lib/plugins/cordova-plugin-media/tizen/Media.js
index d7aa46b..0f29b19 100755 (executable)
@@ -419,8 +419,4 @@ console.log('Loaded cordova.media API');
 
 // TODO: remove when added to public cordova repository -> begin
 });
-
-exports = function(require) {
-  require('cordova-tizen').addPlugin('cordova-plugin-media.Media', plugin_name, 'runs');
-};
 // TODO: remove -> end
diff --git a/src/media/cordova_media.gyp b/src/media/cordova_media.gyp
deleted file mode 100644 (file)
index 4a43c14..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-{
-  'includes':[
-    '/usr/include/webapi-plugins/src/common/common.gypi',
-  ],
-  'targets': [
-    {
-      'target_name': 'tizen_cordova_media',
-      'type': 'loadable_module',
-      'sources': [
-        'cordova_media_api.js',
-        'cordova_media_extension.cc',
-        'cordova_media_extension.h',
-      ],
-      'include_dirs': [
-        '../',
-        '<(SHARED_INTERMEDIATE_DIR)',
-      ],
-      'variables': {
-        'packages': [
-          'webapi-plugins',
-        ],
-      },
-    },
-  ],
-}
diff --git a/src/media/cordova_media_extension.cc b/src/media/cordova_media_extension.cc
deleted file mode 100755 (executable)
index 6565afc..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 "media/cordova_media_extension.h"
-
-// This will be generated from cordova_media_api.js
-extern const char kSource_cordova_media_api[];
-
-common::Extension* CreateExtension() {
-  return new extension::cordova::media::CordovaMediaExtension();
-}
-
-namespace extension {
-namespace cordova {
-namespace media {
-
-CordovaMediaExtension::CordovaMediaExtension() {
-  SetExtensionName("tizen.cordova.media");
-  SetJavaScriptAPI(kSource_cordova_media_api);
-}
-
-CordovaMediaExtension::~CordovaMediaExtension() {}
-
-}  // media
-}  // cordova
-}  // extension
diff --git a/src/media/cordova_media_extension.h b/src/media/cordova_media_extension.h
deleted file mode 100755 (executable)
index 3db047c..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 CORDOVA_MEDIA_MEDIA_EXTENSION_H_
-#define CORDOVA_MEDIA_MEDIA_EXTENSION_H_
-
-#include "common/extension.h"
-
-namespace extension {
-namespace cordova {
-namespace media {
-
-class CordovaMediaExtension : public common::Extension {
- public:
-  CordovaMediaExtension();
-  virtual ~CordovaMediaExtension();
-};
-
-}  //media
-}  //cordova
-}  //extension
-
-#endif // CORDOVA_MEDIA_MEDIA_EXTENSION_H_