summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2015-11-03 19:22:56 -0200
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2015-11-03 19:22:56 -0200
commit9f641d1b69c05656f5e8ca78be274a98cdf44407 (patch)
treebddd4bc96ab3fb8d68309baa1f8f0a97b5658efe
parentff27c7b1cefbe43c90299871464ca1fd3ae157c2 (diff)
ecordova: Moved media too to tizen
-rw-r--r--src/Makefile_Ecordova.am38
-rw-r--r--src/lib/ecordova/Ecordova_Eo.h2
-rw-r--r--src/lib/ecordova/ecordova_inappbrowser.eo89
-rw-r--r--src/lib/ecordova/ecordova_main.c4
-rw-r--r--src/modules/ecordova/tizen/ecordova_inappbrowser.c78
-rw-r--r--src/modules/ecordova/tizen/ecordova_inappbrowser_private.h16
-rw-r--r--src/modules/ecordova/tizen/ecordova_media.c (renamed from src/lib/ecordova/ecordova_media.c)2
-rw-r--r--src/modules/ecordova/tizen/ecordova_media_private.h (renamed from src/lib/ecordova/ecordova_media_private.h)0
-rw-r--r--src/modules/ecordova/tizen/ecordova_mediafile.c (renamed from src/lib/ecordova/ecordova_mediafile.c)2
-rw-r--r--src/modules/ecordova/tizen/ecordova_mediafile_private.h (renamed from src/lib/ecordova/ecordova_mediafile_private.h)0
-rw-r--r--src/modules/ecordova/tizen/ecordova_networkinformation.c2
11 files changed, 9 insertions, 224 deletions
diff --git a/src/Makefile_Ecordova.am b/src/Makefile_Ecordova.am
index 5004fa0861..1f82cd4d19 100644
--- a/src/Makefile_Ecordova.am
+++ b/src/Makefile_Ecordova.am
@@ -17,7 +17,6 @@ lib/ecordova/ecordova_deviceorientation.eo \
17lib/ecordova/ecordova_dialogs.eo \ 17lib/ecordova/ecordova_dialogs.eo \
18lib/ecordova/ecordova_geolocation.eo \ 18lib/ecordova/ecordova_geolocation.eo \
19lib/ecordova/ecordova_globalization.eo \ 19lib/ecordova/ecordova_globalization.eo \
20lib/ecordova/ecordova_inappbrowser.eo \
21lib/ecordova/ecordova_media.eo \ 20lib/ecordova/ecordova_media.eo \
22lib/ecordova/ecordova_networkinformation.eo \ 21lib/ecordova/ecordova_networkinformation.eo \
23lib/ecordova/ecordova_splashscreen.eo \ 22lib/ecordova/ecordova_splashscreen.eo \
@@ -64,39 +63,6 @@ nodist_installed_ecordovamainheaders_DATA = \
64 63
65lib_ecordova_libecordova_la_SOURCES = \ 64lib_ecordova_libecordova_la_SOURCES = \
66lib/ecordova/ecordova_main.c 65lib/ecordova/ecordova_main.c
67#lib/ecordova/ecordova_private.h \
68lib/ecordova/ecordova_systeminfo.c \
69lib/ecordova/ecordova_batterystatus.c \
70lib/ecordova/ecordova_console.c \
71lib/ecordova/ecordova_contacts.c \
72lib/ecordova/ecordova_contact.c \
73lib/ecordova/ecordova_contactaddress.c \
74lib/ecordova/ecordova_contactfield.c \
75lib/ecordova/ecordova_contactname.c \
76lib/ecordova/ecordova_contactorganization.c \
77lib/ecordova/ecordova_contacts_record_utils.c \
78lib/ecordova/ecordova_device.c \
79lib/ecordova/ecordova_devicemotion.c \
80lib/ecordova/ecordova_deviceorientation.c \
81lib/ecordova/ecordova_dialogs.c \
82lib/ecordova/ecordova_geolocation.c \
83lib/ecordova/ecordova_globalization.c \
84lib/ecordova/ecordova_inappbrowser.c \
85lib/ecordova/ecordova_media.c \
86lib/ecordova/ecordova_networkinformation.c \
87lib/ecordova/ecordova_splashscreen.c \
88lib/ecordova/ecordova_vibration.c \
89lib/ecordova/ecordova_file.c \
90lib/ecordova/ecordova_filewriter.c \
91lib/ecordova/ecordova_filereader.c \
92lib/ecordova/ecordova_filesystem.c \
93lib/ecordova/ecordova_entry.c \
94lib/ecordova/ecordova_directoryentry.c \
95lib/ecordova/ecordova_directoryreader.c \
96lib/ecordova/ecordova_fileentry.c \
97lib/ecordova/ecordova_mediafile.c \
98lib/ecordova/ecordova_filetransfer.c \
99lib/ecordova/ecordova_capture.c
100 66
101lib_ecordova_libecordova_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl @ECORDOVA_CFLAGS@ @EFL_CFLAGS@ \ 67lib_ecordova_libecordova_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl @ECORDOVA_CFLAGS@ @EFL_CFLAGS@ \
102-DPACKAGE_BIN_DIR=\"$(bindir)\" \ 68-DPACKAGE_BIN_DIR=\"$(bindir)\" \
@@ -156,7 +122,9 @@ modules/ecordova/tizen/ecordova_fileentry.c \
156modules/ecordova/tizen/ecordova_file.c \ 122modules/ecordova/tizen/ecordova_file.c \
157modules/ecordova/tizen/ecordova_filereader.c \ 123modules/ecordova/tizen/ecordova_filereader.c \
158modules/ecordova/tizen/ecordova_filetransfer.c \ 124modules/ecordova/tizen/ecordova_filetransfer.c \
159modules/ecordova/tizen/ecordova_filewriter.c 125modules/ecordova/tizen/ecordova_filewriter.c \
126modules/ecordova/tizen/ecordova_media.c \
127modules/ecordova/tizen/ecordova_mediafile.c
160modules_ecordova_tizen_module_la_CPPFLAGS = \ 128modules_ecordova_tizen_module_la_CPPFLAGS = \
161-I$(top_builddir)/src/lib/efl \ 129-I$(top_builddir)/src/lib/efl \
162@ECORDOVA_CFLAGS@ -DEFL_ECORDOVA_BUILD 130@ECORDOVA_CFLAGS@ -DEFL_ECORDOVA_BUILD
diff --git a/src/lib/ecordova/Ecordova_Eo.h b/src/lib/ecordova/Ecordova_Eo.h
index d1da074fd3..3cbd474f72 100644
--- a/src/lib/ecordova/Ecordova_Eo.h
+++ b/src/lib/ecordova/Ecordova_Eo.h
@@ -16,7 +16,6 @@ typedef Eo Ecordova_DirectoryReader;
16#include <ecordova_dialogs.eo.h> 16#include <ecordova_dialogs.eo.h>
17#include <ecordova_geolocation.eo.h> 17#include <ecordova_geolocation.eo.h>
18#include <ecordova_globalization.eo.h> 18#include <ecordova_globalization.eo.h>
19#include <ecordova_inappbrowser.eo.h>
20#include <ecordova_media.eo.h> 19#include <ecordova_media.eo.h>
21#include <ecordova_networkinformation.eo.h> 20#include <ecordova_networkinformation.eo.h>
22#include <ecordova_splashscreen.eo.h> 21#include <ecordova_splashscreen.eo.h>
@@ -31,4 +30,3 @@ typedef Eo Ecordova_DirectoryReader;
31#include <ecordova_fileentry.eo.h> 30#include <ecordova_fileentry.eo.h>
32#include <ecordova_mediafile.eo.h> 31#include <ecordova_mediafile.eo.h>
33#include <ecordova_filetransfer.eo.h> 32#include <ecordova_filetransfer.eo.h>
34#include <ecordova_capture.eo.h>
diff --git a/src/lib/ecordova/ecordova_inappbrowser.eo b/src/lib/ecordova/ecordova_inappbrowser.eo
deleted file mode 100644
index d2e16da78f..0000000000
--- a/src/lib/ecordova/ecordova_inappbrowser.eo
+++ /dev/null
@@ -1,89 +0,0 @@
1struct Ecordova_InAppBrowser_InjectDetails {
2 file: const(char)*; [[URL of the script/stylesheet to inject.]]
3 code: const(char)*; [[Text of the script/stylesheet to inject.]]
4}
5
6struct Ecordova_InAppBrowser_EventProperties {
7 type: const(char)*; [[the eventname, either loadstart, loadstop, loaderror, or exit.]]
8 url: const(char)*; [[the URL that was loaded.]]
9 code: const(char)*; [[the error code, only in the case of loaderror.]]
10 message: const(char)*; [[the error message, only in the case of loaderror.]]
11}
12
13class Ecordova.InAppBrowser (Eo.Base) {
14 [[Ecordova InAppBrowser Plugin
15 Plugin ID: org.apache.cordova.inappbrowser
16 http://plugins.cordova.io/#/package/org.apache.cordova.inappbrowser
17 ]]
18 legacy_prefix: null;
19 methods {
20 constructor {
21 [[Custom Ecordova_InAppBrowser constructor.
22 @.constructor
23
24 @since 2.3
25 ]]
26 }
27 open @class {
28 params {
29 url: const(char)*;
30 [[The URL to load. Call encodeURI() on this if the URL
31 contains Unicode characters.]]
32
33 target: const(char)*;
34 [[The target in which to load the URL, an optional parameter
35 that defaults to _self.]]
36
37 options: const(hash<char*,char*>)*;
38 [[Options for the InAppBrowser. Optional, defaulting
39 to: location=yes.]]
40
41 }
42 return: Ecordova.InAppBrowser*;
43 }
44 close {
45 [[Closes the InAppBrowser window.]]
46 }
47 show {
48 [[Displays an InAppBrowser window that was opened hidden. Calling
49 this has no effect if the InAppBrowser was already visible.]]
50 }
51 script_execute {
52 [[Injects JavaScript code into the InAppBrowser window]]
53 params {
54 injectDetails: const(Ecordova_InAppBrowser_InjectDetails)*;
55 [[details of the script to run, specifying either a file or
56 code key.]]
57 }
58 }
59 css_insert {
60 [[Injects CSS into the InAppBrowser window.]]
61 params {
62 injectDetails: const(Ecordova_InAppBrowser_InjectDetails)*;
63 [[details of the script to run, specifying either a file or
64 code key.]]
65 }
66 }
67 }
68 implements {
69 Eo.Base.constructor;
70 Eo.Base.destructor;
71 }
72 constructors {
73 .constructor;
74 }
75 events {
76 load,start: const(Ecordova_InAppBrowser_EventProperties)*;
77 load,stop: const(Ecordova_InAppBrowser_EventProperties)*;
78 load,error: const(Ecordova_InAppBrowser_EventProperties)*;
79 exit: const(Ecordova_InAppBrowser_EventProperties)*;
80
81 script,executed;
82 [[If the injected script is of type code, the callback executes with a
83 single parameter, which is the return value of the script, wrapped
84 in an Array. For multi-line scripts, this is the return value of the
85 last statement, or the last expression evaluated.]]
86
87 css,injected; [[executes after the CSS is injected.]]
88 }
89}
diff --git a/src/lib/ecordova/ecordova_main.c b/src/lib/ecordova/ecordova_main.c
index cab4dea656..29200f9605 100644
--- a/src/lib/ecordova/ecordova_main.c
+++ b/src/lib/ecordova/ecordova_main.c
@@ -268,7 +268,6 @@ ECORDOVA_CLASS_GET(filereader)
268ECORDOVA_CLASS_GET(filetransfer) 268ECORDOVA_CLASS_GET(filetransfer)
269ECORDOVA_CLASS_GET(geolocation) 269ECORDOVA_CLASS_GET(geolocation)
270ECORDOVA_CLASS_GET(globalization) 270ECORDOVA_CLASS_GET(globalization)
271ECORDOVA_CLASS_GET(inappbrowser)
272ECORDOVA_CLASS_GET(media) 271ECORDOVA_CLASS_GET(media)
273ECORDOVA_CLASS_GET(mediafile) 272ECORDOVA_CLASS_GET(mediafile)
274ECORDOVA_CLASS_GET(networkinformation) 273ECORDOVA_CLASS_GET(networkinformation)
@@ -296,7 +295,6 @@ ECORDOVA_define_data(FileReader)
296ECORDOVA_define_data(FileTransfer) 295ECORDOVA_define_data(FileTransfer)
297ECORDOVA_define_data(Geolocation) 296ECORDOVA_define_data(Geolocation)
298ECORDOVA_define_data(Globalization) 297ECORDOVA_define_data(Globalization)
299ECORDOVA_define_data(InAppBrowser)
300ECORDOVA_define_data(Media) 298ECORDOVA_define_data(Media)
301ECORDOVA_define_data(MediaFile) 299ECORDOVA_define_data(MediaFile)
302ECORDOVA_define_data(NetworkInformation) 300ECORDOVA_define_data(NetworkInformation)
@@ -349,8 +347,6 @@ ECORDOVA_define_data(Vibration)
349#include "ecordova_geolocation.eo.c" 347#include "ecordova_geolocation.eo.c"
350#include "ecordova_globalization.eo.h" 348#include "ecordova_globalization.eo.h"
351#include "ecordova_globalization.eo.c" 349#include "ecordova_globalization.eo.c"
352#include "ecordova_inappbrowser.eo.h"
353#include "ecordova_inappbrowser.eo.c"
354#include "ecordova_media.eo.h" 350#include "ecordova_media.eo.h"
355#include "ecordova_media.eo.c" 351#include "ecordova_media.eo.c"
356#include "ecordova_mediafile.eo.h" 352#include "ecordova_mediafile.eo.h"
diff --git a/src/modules/ecordova/tizen/ecordova_inappbrowser.c b/src/modules/ecordova/tizen/ecordova_inappbrowser.c
deleted file mode 100644
index 4d6cc1686e..0000000000
--- a/src/modules/ecordova/tizen/ecordova_inappbrowser.c
+++ /dev/null
@@ -1,78 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include "ecordova_inappbrowser_private.h"
6
7#define MY_CLASS ECORDOVA_INAPPBROWSER_CLASS
8#define MY_CLASS_NAME "Ecordova_InAppBrowser"
9
10static Eo_Base *
11_ecordova_inappbrowser_eo_base_constructor(Eo *obj,
12 Ecordova_InAppBrowser_Data *pd)
13{
14 DBG("(%p)", obj);
15
16 pd->obj = obj;
17
18 return eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
19}
20
21static void
22_ecordova_inappbrowser_constructor(Eo *obj EINA_UNUSED,
23 Ecordova_InAppBrowser_Data *pd EINA_UNUSED)
24{
25 DBG("(%p)", obj);
26}
27
28static void
29_ecordova_inappbrowser_eo_base_destructor(Eo *obj,
30 Ecordova_InAppBrowser_Data *pd EINA_UNUSED)
31{
32 DBG("(%p)", obj);
33
34 eo_do_super(obj, MY_CLASS, eo_destructor());
35}
36
37static Ecordova_InAppBrowser*
38_ecordova_inappbrowser_open(Eo *obj EINA_UNUSED,
39 void *pd EINA_UNUSED,
40 const char *url EINA_UNUSED,
41 const char *target EINA_UNUSED,
42 const Eina_Hash *options EINA_UNUSED)
43{
44 ERR("Not implemented.");
45 return NULL;
46}
47
48static void
49_ecordova_inappbrowser_close(Eo *obj EINA_UNUSED,
50 Ecordova_InAppBrowser_Data *pd EINA_UNUSED)
51{
52 ERR("Not implemented.");
53}
54
55static void
56_ecordova_inappbrowser_show(Eo *obj EINA_UNUSED,
57 Ecordova_InAppBrowser_Data *pd EINA_UNUSED)
58{
59 ERR("Not implemented.");
60}
61
62static void
63_ecordova_inappbrowser_script_execute(Eo *obj EINA_UNUSED,
64 Ecordova_InAppBrowser_Data *pd EINA_UNUSED,
65 const Ecordova_InAppBrowser_InjectDetails *injectDetails EINA_UNUSED)
66{
67 ERR("Not implemented.");
68}
69
70static void
71_ecordova_inappbrowser_css_insert(Eo *obj EINA_UNUSED,
72 Ecordova_InAppBrowser_Data *pd EINA_UNUSED,
73 const Ecordova_InAppBrowser_InjectDetails *injectDetails EINA_UNUSED)
74{
75 ERR("Not implemented.");
76}
77
78#include "ecordova_inappbrowser.eo.c"
diff --git a/src/modules/ecordova/tizen/ecordova_inappbrowser_private.h b/src/modules/ecordova/tizen/ecordova_inappbrowser_private.h
deleted file mode 100644
index 4526e8773b..0000000000
--- a/src/modules/ecordova/tizen/ecordova_inappbrowser_private.h
+++ /dev/null
@@ -1,16 +0,0 @@
1#ifndef _ECORDOVA_INAPPBROWSER_PRIVATE_H
2#define _ECORDOVA_INAPPBROWSER_PRIVATE_H
3
4#include "ecordova_private.h"
5
6typedef struct _Ecordova_InAppBrowser_Data Ecordova_InAppBrowser_Data;
7
8/**
9 * Ecordova.InAppBrowser private data
10 */
11struct _Ecordova_InAppBrowser_Data
12{
13 Eo *obj;
14};
15
16#endif
diff --git a/src/lib/ecordova/ecordova_media.c b/src/modules/ecordova/tizen/ecordova_media.c
index 926a2cad49..4fef7d10ae 100644
--- a/src/lib/ecordova/ecordova_media.c
+++ b/src/modules/ecordova/tizen/ecordova_media.c
@@ -2,6 +2,7 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#if defined(TIZEN_MEDIA_METADATA_EXTRACTOR) && defined(TIZEN_MEDIA_PLAYER) && defined(TIZEN_MEDIA_RECORDER)
5#include "ecordova_media_private.h" 6#include "ecordova_media_private.h"
6 7
7#define MY_CLASS ECORDOVA_MEDIA_CLASS 8#define MY_CLASS ECORDOVA_MEDIA_CLASS
@@ -529,3 +530,4 @@ _start_record(Ecordova_Media_Data *pd)
529} 530}
530 531
531#include "ecordova_media.eo.c" 532#include "ecordova_media.eo.c"
533#endif
diff --git a/src/lib/ecordova/ecordova_media_private.h b/src/modules/ecordova/tizen/ecordova_media_private.h
index 84d7dbe9ec..84d7dbe9ec 100644
--- a/src/lib/ecordova/ecordova_media_private.h
+++ b/src/modules/ecordova/tizen/ecordova_media_private.h
diff --git a/src/lib/ecordova/ecordova_mediafile.c b/src/modules/ecordova/tizen/ecordova_mediafile.c
index b227835cde..dd3084541b 100644
--- a/src/lib/ecordova/ecordova_mediafile.c
+++ b/src/modules/ecordova/tizen/ecordova_mediafile.c
@@ -2,6 +2,7 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#if defined(TIZEN_MEDIA_METADATA_EXTRACTOR) && defined(TIZEN_MEDIA_PLAYER) && defined(TIZEN_MEDIA_RECORDER)
5#include "ecordova_mediafile_private.h" 6#include "ecordova_mediafile_private.h"
6#include <stdbool.h> 7#include <stdbool.h>
7#include <limits.h> 8#include <limits.h>
@@ -185,3 +186,4 @@ _int_metadata_get(metadata_extractor_h extractor,
185} 186}
186 187
187#include "ecordova_mediafile.eo.c" 188#include "ecordova_mediafile.eo.c"
189#endif
diff --git a/src/lib/ecordova/ecordova_mediafile_private.h b/src/modules/ecordova/tizen/ecordova_mediafile_private.h
index 1e7e8621d2..1e7e8621d2 100644
--- a/src/lib/ecordova/ecordova_mediafile_private.h
+++ b/src/modules/ecordova/tizen/ecordova_mediafile_private.h
diff --git a/src/modules/ecordova/tizen/ecordova_networkinformation.c b/src/modules/ecordova/tizen/ecordova_networkinformation.c
index e89dc7018a..c8740d2a10 100644
--- a/src/modules/ecordova/tizen/ecordova_networkinformation.c
+++ b/src/modules/ecordova/tizen/ecordova_networkinformation.c
@@ -2,6 +2,7 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#ifdef HAVE_TIZEN_NETWORK_CONNECTION
5#include "ecordova_networkinformation_private.h" 6#include "ecordova_networkinformation_private.h"
6 7
7#define MY_CLASS ECORDOVA_NETWORKINFORMATION_CLASS 8#define MY_CLASS ECORDOVA_NETWORKINFORMATION_CLASS
@@ -96,3 +97,4 @@ _type_changed_cb(connection_type_e type, void *user_data)
96} 97}
97 98
98#include "ecordova_networkinformation.eo.c" 99#include "ecordova_networkinformation.eo.c"
100#endif