summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--legacy/eeze/AUTHORS1
-rw-r--r--legacy/eeze/COPYING20
-rw-r--r--legacy/eeze/ChangeLog0
-rw-r--r--legacy/eeze/INSTALL302
-rw-r--r--legacy/eeze/Makefile.am22
-rw-r--r--legacy/eeze/NEWS0
-rw-r--r--legacy/eeze/README3
-rw-r--r--legacy/eeze/TODO9
-rwxr-xr-xlegacy/eeze/autogen.sh16
-rw-r--r--legacy/eeze/configure.ac105
-rw-r--r--legacy/eeze/doc/Doxyfile141
-rw-r--r--legacy/eeze/doc/Makefile.am32
-rw-r--r--legacy/eeze/doc/e.css273
-rw-r--r--legacy/eeze/doc/eeze.dox.in23
-rw-r--r--legacy/eeze/doc/foot.html18
-rw-r--r--legacy/eeze/doc/head.html68
-rw-r--r--legacy/eeze/doc/img/edoxy.css486
-rw-r--r--legacy/eeze/doc/img/eeze.pngbin0 -> 98436 bytes
-rw-r--r--legacy/eeze/doc/img/foot_bg.pngbin0 -> 173 bytes
-rw-r--r--legacy/eeze/doc/img/head_bg.pngbin0 -> 214 bytes
-rw-r--r--legacy/eeze/doc/img/header_menu_background.pngbin0 -> 192 bytes
-rw-r--r--legacy/eeze/doc/img/header_menu_background_last.pngbin0 -> 637 bytes
-rw-r--r--legacy/eeze/doc/img/header_menu_current_background.pngbin0 -> 1200 bytes
-rw-r--r--legacy/eeze/doc/img/header_menu_unselected_background.pngbin0 -> 1596 bytes
-rw-r--r--legacy/eeze/doc/img/logo.pngbin0 -> 3825 bytes
-rw-r--r--legacy/eeze/eudev.pc.in11
-rw-r--r--legacy/eeze/m4/efl_doxygen.m499
-rw-r--r--legacy/eeze/src/Makefile.am2
-rw-r--r--legacy/eeze/src/bin/Makefile.am21
-rw-r--r--legacy/eeze/src/bin/eeze_udev_test.c162
-rw-r--r--legacy/eeze/src/lib/Makefile.am2
-rw-r--r--legacy/eeze/src/lib/udev/E_Udev.h137
-rw-r--r--legacy/eeze/src/lib/udev/Makefile.am21
-rw-r--r--legacy/eeze/src/lib/udev/e_udev.c513
-rw-r--r--legacy/eeze/src/lib/udev/e_udev_main.c46
-rw-r--r--legacy/eeze/src/lib/udev/e_udev_private.h26
-rw-r--r--legacy/eeze/src/lib/udev/e_udev_watch.c228
37 files changed, 2787 insertions, 0 deletions
diff --git a/legacy/eeze/AUTHORS b/legacy/eeze/AUTHORS
new file mode 100644
index 0000000000..0d3b42d8ab
--- /dev/null
+++ b/legacy/eeze/AUTHORS
@@ -0,0 +1 @@
Mike Blumenkrantz (zmike/discomfitor) mike@zentific.com
diff --git a/legacy/eeze/COPYING b/legacy/eeze/COPYING
new file mode 100644
index 0000000000..3d6eb4ef45
--- /dev/null
+++ b/legacy/eeze/COPYING
@@ -0,0 +1,20 @@
1Copyright (C) 2010 Mike Blumenkrantz and various contributors (see AUTHORS)
2
3Permission is hereby granted, free of charge, to any person obtaining a copy
4of this software and associated documentation files (the "Software"), to
5deal in the Software without restriction, including without limitation the
6rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7sell copies of the Software, and to permit persons to whom the Software is
8furnished to do so, subject to the following conditions:
9
10The above copyright notice and this permission notice shall be included in
11all copies of the Software, its documentation and marketing & publicity
12materials, and acknowledgment shall be given in the documentation, materials
13and software packages that this Software was used.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/legacy/eeze/ChangeLog b/legacy/eeze/ChangeLog
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/legacy/eeze/ChangeLog
diff --git a/legacy/eeze/INSTALL b/legacy/eeze/INSTALL
new file mode 100644
index 0000000000..2550dab752
--- /dev/null
+++ b/legacy/eeze/INSTALL
@@ -0,0 +1,302 @@
1Installation Instructions
2*************************
3
4Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
52006, 2007, 2008, 2009 Free Software Foundation, Inc.
6
7 This file is free documentation; the Free Software Foundation gives
8unlimited permission to copy, distribute and modify it.
9
10Basic Installation
11==================
12
13 Briefly, the shell commands `./configure; make; make install' should
14configure, build, and install this package. The following
15more-detailed instructions are generic; see the `README' file for
16instructions specific to this package.
17
18 The `configure' shell script attempts to guess correct values for
19various system-dependent variables used during compilation. It uses
20those values to create a `Makefile' in each directory of the package.
21It may also create one or more `.h' files containing system-dependent
22definitions. Finally, it creates a shell script `config.status' that
23you can run in the future to recreate the current configuration, and a
24file `config.log' containing compiler output (useful mainly for
25debugging `configure').
26
27 It can also use an optional file (typically called `config.cache'
28and enabled with `--cache-file=config.cache' or simply `-C') that saves
29the results of its tests to speed up reconfiguring. Caching is
30disabled by default to prevent problems with accidental use of stale
31cache files.
32
33 If you need to do unusual things to compile the package, please try
34to figure out how `configure' could check whether to do them, and mail
35diffs or instructions to the address given in the `README' so they can
36be considered for the next release. If you are using the cache, and at
37some point `config.cache' contains results you don't want to keep, you
38may remove or edit it.
39
40 The file `configure.ac' (or `configure.in') is used to create
41`configure' by a program called `autoconf'. You need `configure.ac' if
42you want to change it or regenerate `configure' using a newer version
43of `autoconf'.
44
45The simplest way to compile this package is:
46
47 1. `cd' to the directory containing the package's source code and type
48 `./configure' to configure the package for your system.
49
50 Running `configure' might take a while. While running, it prints
51 some messages telling which features it is checking for.
52
53 2. Type `make' to compile the package.
54
55 3. Optionally, type `make check' to run any self-tests that come with
56 the package.
57
58 4. Type `make install' to install the programs and any data files and
59 documentation.
60
61 5. You can remove the program binaries and object files from the
62 source code directory by typing `make clean'. To also remove the
63 files that `configure' created (so you can compile the package for
64 a different kind of computer), type `make distclean'. There is
65 also a `make maintainer-clean' target, but that is intended mainly
66 for the package's developers. If you use it, you may have to get
67 all sorts of other programs in order to regenerate files that came
68 with the distribution.
69
70 6. Often, you can also type `make uninstall' to remove the installed
71 files again.
72
73Compilers and Options
74=====================
75
76 Some systems require unusual options for compilation or linking that
77the `configure' script does not know about. Run `./configure --help'
78for details on some of the pertinent environment variables.
79
80 You can give `configure' initial values for configuration parameters
81by setting variables in the command line or in the environment. Here
82is an example:
83
84 ./configure CC=c99 CFLAGS=-g LIBS=-lposix
85
86 *Note Defining Variables::, for more details.
87
88Compiling For Multiple Architectures
89====================================
90
91 You can compile the package for more than one kind of computer at the
92same time, by placing the object files for each architecture in their
93own directory. To do this, you can use GNU `make'. `cd' to the
94directory where you want the object files and executables to go and run
95the `configure' script. `configure' automatically checks for the
96source code in the directory that `configure' is in and in `..'.
97
98 With a non-GNU `make', it is safer to compile the package for one
99architecture at a time in the source code directory. After you have
100installed the package for one architecture, use `make distclean' before
101reconfiguring for another architecture.
102
103 On MacOS X 10.5 and later systems, you can create libraries and
104executables that work on multiple system types--known as "fat" or
105"universal" binaries--by specifying multiple `-arch' options to the
106compiler but only a single `-arch' option to the preprocessor. Like
107this:
108
109 ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
110 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
111 CPP="gcc -E" CXXCPP="g++ -E"
112
113 This is not guaranteed to produce working output in all cases, you
114may have to build one architecture at a time and combine the results
115using the `lipo' tool if you have problems.
116
117Installation Names
118==================
119
120 By default, `make install' installs the package's commands under
121`/usr/local/bin', include files under `/usr/local/include', etc. You
122can specify an installation prefix other than `/usr/local' by giving
123`configure' the option `--prefix=PREFIX'.
124
125 You can specify separate installation prefixes for
126architecture-specific files and architecture-independent files. If you
127pass the option `--exec-prefix=PREFIX' to `configure', the package uses
128PREFIX as the prefix for installing programs and libraries.
129Documentation and other data files still use the regular prefix.
130
131 In addition, if you use an unusual directory layout you can give
132options like `--bindir=DIR' to specify different values for particular
133kinds of files. Run `configure --help' for a list of the directories
134you can set and what kinds of files go in them.
135
136 If the package supports it, you can cause programs to be installed
137with an extra prefix or suffix on their names by giving `configure' the
138option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
139
140Optional Features
141=================
142
143 Some packages pay attention to `--enable-FEATURE' options to
144`configure', where FEATURE indicates an optional part of the package.
145They may also pay attention to `--with-PACKAGE' options, where PACKAGE
146is something like `gnu-as' or `x' (for the X Window System). The
147`README' should mention any `--enable-' and `--with-' options that the
148package recognizes.
149
150 For packages that use the X Window System, `configure' can usually
151find the X include and library files automatically, but if it doesn't,
152you can use the `configure' options `--x-includes=DIR' and
153`--x-libraries=DIR' to specify their locations.
154
155Particular systems
156==================
157
158 On HP-UX, the default C compiler is not ANSI C compatible. If GNU
159CC is not installed, it is recommended to use the following options in
160order to use an ANSI C compiler:
161
162 ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
163
164and if that doesn't work, install pre-built binaries of GCC for HP-UX.
165
166 On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
167parse its `<wchar.h>' header file. The option `-nodtk' can be used as
168a workaround. If GNU CC is not installed, it is therefore recommended
169to try
170
171 ./configure CC="cc"
172
173and if that doesn't work, try
174
175 ./configure CC="cc -nodtk"
176
177 On Solaris, don't put `/usr/ucb' early in your `PATH'. This
178directory contains several dysfunctional programs; working variants of
179these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
180in your `PATH', put it _after_ `/usr/bin'.
181
182 On Haiku, software installed for all users goes in `/boot/common',
183not `/usr/local'. It is recommended to use the following options:
184
185 ./configure --prefix=/boot/common
186
187Specifying the System Type
188==========================
189
190 There may be some features `configure' cannot figure out
191automatically, but needs to determine by the type of machine the package
192will run on. Usually, assuming the package is built to be run on the
193_same_ architectures, `configure' can figure that out, but if it prints
194a message saying it cannot guess the machine type, give it the
195`--build=TYPE' option. TYPE can either be a short name for the system
196type, such as `sun4', or a canonical name which has the form:
197
198 CPU-COMPANY-SYSTEM
199
200where SYSTEM can have one of these forms:
201
202 OS
203 KERNEL-OS
204
205 See the file `config.sub' for the possible values of each field. If
206`config.sub' isn't included in this package, then this package doesn't
207need to know the machine type.
208
209 If you are _building_ compiler tools for cross-compiling, you should
210use the option `--target=TYPE' to select the type of system they will
211produce code for.
212
213 If you want to _use_ a cross compiler, that generates code for a
214platform different from the build platform, you should specify the
215"host" platform (i.e., that on which the generated programs will
216eventually be run) with `--host=TYPE'.
217
218Sharing Defaults
219================
220
221 If you want to set default values for `configure' scripts to share,
222you can create a site shell script called `config.site' that gives
223default values for variables like `CC', `cache_file', and `prefix'.
224`configure' looks for `PREFIX/share/config.site' if it exists, then
225`PREFIX/etc/config.site' if it exists. Or, you can set the
226`CONFIG_SITE' environment variable to the location of the site script.
227A warning: not all `configure' scripts look for a site script.
228
229Defining Variables
230==================
231
232 Variables not defined in a site shell script can be set in the
233environment passed to `configure'. However, some packages may run
234configure again during the build, and the customized values of these
235variables may be lost. In order to avoid this problem, you should set
236them in the `configure' command line, using `VAR=value'. For example:
237
238 ./configure CC=/usr/local2/bin/gcc
239
240causes the specified `gcc' to be used as the C compiler (unless it is
241overridden in the site shell script).
242
243Unfortunately, this technique does not work for `CONFIG_SHELL' due to
244an Autoconf bug. Until the bug is fixed you can use this workaround:
245
246 CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
247
248`configure' Invocation
249======================
250
251 `configure' recognizes the following options to control how it
252operates.
253
254`--help'
255`-h'
256 Print a summary of all of the options to `configure', and exit.
257
258`--help=short'
259`--help=recursive'
260 Print a summary of the options unique to this package's
261 `configure', and exit. The `short' variant lists options used
262 only in the top level, while the `recursive' variant lists options
263 also present in any nested packages.
264
265`--version'
266`-V'
267 Print the version of Autoconf used to generate the `configure'
268 script, and exit.
269
270`--cache-file=FILE'
271 Enable the cache: use and save the results of the tests in FILE,
272 traditionally `config.cache'. FILE defaults to `/dev/null' to
273 disable caching.
274
275`--config-cache'
276`-C'
277 Alias for `--cache-file=config.cache'.
278
279`--quiet'
280`--silent'
281`-q'
282 Do not print messages saying which checks are being made. To
283 suppress all normal output, redirect it to `/dev/null' (any error
284 messages will still be shown).
285
286`--srcdir=DIR'
287 Look for the package's source code in directory DIR. Usually
288 `configure' can determine that directory automatically.
289
290`--prefix=DIR'
291 Use DIR as the installation prefix. *Note Installation Names::
292 for more details, including other options available for fine-tuning
293 the installation locations.
294
295`--no-create'
296`-n'
297 Run the configure checks, but stop before creating any output
298 files.
299
300`configure' also accepts some other, not widely useful, options. Run
301`configure --help' for more details.
302
diff --git a/legacy/eeze/Makefile.am b/legacy/eeze/Makefile.am
new file mode 100644
index 0000000000..c360aad5dd
--- /dev/null
+++ b/legacy/eeze/Makefile.am
@@ -0,0 +1,22 @@
1ACLOCAL_AMFLAGS = -I m4
2
3SUBDIRS = src doc
4
5MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \
6 config.log config.sub configure depcomp \
7 install-sh ltmain.sh missing compile eeze*doc*tar* \
8 m4/l*
9
10
11pkgconfigdir = $(libdir)/pkgconfig
12
13if BUILD_EUDEV
14EUDEV_PC = eudev.pc
15endif
16pkgconfig_DATA = $(EUDEV_PC)
17
18.PHONY: doc
19
20doc: all
21 @echo "entering doc/"
22 $(MAKE) -C doc doc
diff --git a/legacy/eeze/NEWS b/legacy/eeze/NEWS
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/legacy/eeze/NEWS
diff --git a/legacy/eeze/README b/legacy/eeze/README
new file mode 100644
index 0000000000..d081aebe34
--- /dev/null
+++ b/legacy/eeze/README
@@ -0,0 +1,3 @@
1eeze v?.??
2
3eeze is a collection of misc apis wrapped in efl for ease of integration with other efl projects. Dependencies may vary, use at your own risk, i before e except after c.
diff --git a/legacy/eeze/TODO b/legacy/eeze/TODO
new file mode 100644
index 0000000000..0f72a3a46c
--- /dev/null
+++ b/legacy/eeze/TODO
@@ -0,0 +1,9 @@
1udev: switch enum to bitmasks with categories probably
2 documentation for all types
3 more functions or something?
4
5TO BE ADDED
6mpd: implement efl mpd bindings
7xen: common xen control/info functions
8libvirt: same as above
9???
diff --git a/legacy/eeze/autogen.sh b/legacy/eeze/autogen.sh
new file mode 100755
index 0000000000..1314a9896d
--- /dev/null
+++ b/legacy/eeze/autogen.sh
@@ -0,0 +1,16 @@
1#!/bin/sh
2
3rm -rf autom4te.cache
4rm -f aclocal.m4 ltmain.sh
5
6touch README
7
8echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS -I m4 || exit 1
9echo "Running autoheader..." ; autoheader || exit 1
10echo "Running autoconf..." ; autoconf || exit 1
11echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1
12echo "Running automake..." ; automake --add-missing --copy || exit 1
13
14if [ -z "$NOCONFIGURE" ]; then
15 ./configure "$@"
16fi
diff --git a/legacy/eeze/configure.ac b/legacy/eeze/configure.ac
new file mode 100644
index 0000000000..3e8e77aa6f
--- /dev/null
+++ b/legacy/eeze/configure.ac
@@ -0,0 +1,105 @@
1# get rid of that stupid cache mechanism
2rm -f config.cache
3
4AC_INIT([eeze], [0.0.1], [enlightenment-devel@lists.sourceforge.net])
5release="ver-pre-svn-05"
6AC_PREREQ([2.52])
7AC_CONFIG_SRCDIR([configure.ac])
8AC_CONFIG_MACRO_DIR([m4])
9AC_CANONICAL_BUILD
10AC_CANONICAL_HOST
11
12AM_INIT_AUTOMAKE([1.6 dist-bzip2])
13AM_CONFIG_HEADER([config.h])
14m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
15
16AC_PROG_CC
17AC_HEADER_STDC
18AM_PROG_CC_C_O
19
20define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
21AC_PROG_LIBTOOL
22
23VMAJ=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $1);}'`
24VMIN=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $2);}'`
25VMIC=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $3);}'`
26SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
27version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
28eudev_release_info="-release $release"
29AC_SUBST(version_info)
30AC_SUBST(eudev_release_info)
31
32dnl Check enabled modules to build
33AC_ARG_ENABLE([eudev],[AC_HELP_STRING([--disable-eudev], [Disable eudev build])])
34AS_IF(
35 [test "x$enableval" != "xno"],
36 [enable_eudev="yes"],
37 [enable_eudev=no],
38)
39
40# pkg-config
41PKG_PROG_PKG_CONFIG
42
43# Check whether pkg-config supports Requires.private
44AS_IF(
45 [$PKG_CONFIG --atleast-pkgconfig-version 0.22],
46 [pkgconfig_requires_private="Requires.private"],
47 [pkgconfig_requires_private="Requires"]
48)
49AC_SUBST(pkgconfig_requires_private)
50
51PKG_CHECK_MODULES([ECORE], [ecore])
52
53AS_IF(
54 [test "x${enable_eudev}" = "xyes"],
55 [PKG_CHECK_MODULES(UDEV, libudev, [], [enable_eudev="no"])]
56)
57
58AM_CONDITIONAL([BUILD_EUDEV], [test "x${enable_eudev}" = "xyes"])
59
60EFL_EDBUS_BUILD=""
61lt_enable_auto_import=""
62AS_CASE(
63 ["$host_os"],
64 [mingw* | cegcc*],
65 AC_MSG_ERROR([THIS WILL NOT RUN ON WINDOWS!])
66)
67
68EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
69
70AC_OUTPUT([
71Makefile
72doc/eeze.dox
73doc/Makefile
74src/Makefile
75src/lib/Makefile
76src/lib/udev/Makefile
77src/bin/Makefile
78eudev.pc
79])
80
81
82#####################################################################
83## Info
84
85echo
86echo
87echo
88echo "------------------------------------------------------------------------"
89echo "$PACKAGE $VERSION"
90echo "------------------------------------------------------------------------"
91echo
92echo "Configuration Options Summary:"
93echo
94echo " Modules:"
95echo
96echo " EUdev..............: $enable_eudev"
97echo
98echo "Compilation............: make (or gmake)"
99echo " CPPFLAGS.............: $CPPFLAGS"
100echo " CFLAGS...............: $CFLAGS"
101echo " LDFLAGS..............: $LDFLAGS"
102echo
103echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
104echo " prefix...............: $prefix"
105echo
diff --git a/legacy/eeze/doc/Doxyfile b/legacy/eeze/doc/Doxyfile
new file mode 100644
index 0000000000..8aa5782d64
--- /dev/null
+++ b/legacy/eeze/doc/Doxyfile
@@ -0,0 +1,141 @@
1ALIASES =
2ALLEXTERNALS = NO
3ALPHABETICAL_INDEX = YES
4ALWAYS_DETAILED_SEC = NO
5BINARY_TOC = NO
6BRIEF_MEMBER_DESC = YES
7CASE_SENSE_NAMES = YES
8CHM_FILE =
9CLASS_DIAGRAMS = NO
10CLASS_GRAPH = NO
11COLLABORATION_GRAPH = NO
12COLS_IN_ALPHA_INDEX = 2
13COMPACT_LATEX = NO
14COMPACT_RTF = NO
15DETAILS_AT_TOP = NO
16DISABLE_INDEX = YES
17DISTRIBUTE_GROUP_DOC = NO
18DOT_CLEANUP = YES
19DOTFILE_DIRS =
20DOT_IMAGE_FORMAT = png
21DOT_PATH =
22ENABLED_SECTIONS =
23ENABLE_PREPROCESSING = YES
24ENUM_VALUES_PER_LINE = 1
25EXAMPLE_PATH =
26EXAMPLE_PATTERNS =
27EXAMPLE_RECURSIVE = NO
28EXCLUDE =
29EXCLUDE_PATTERNS =
30EXCLUDE_SYMLINKS = NO
31EXPAND_AS_DEFINED =
32EXPAND_ONLY_PREDEF = NO
33EXTERNAL_GROUPS = YES
34EXTRACT_ALL = NO
35EXTRACT_LOCAL_CLASSES = NO
36EXTRACT_PRIVATE = NO
37EXTRACT_STATIC = NO
38EXTRA_PACKAGES =
39FILE_PATTERNS =
40FILTER_SOURCE_FILES = NO
41FULL_PATH_NAMES = NO
42GENERATE_AUTOGEN_DEF = NO
43GENERATE_BUGLIST = YES
44GENERATE_CHI = NO
45GENERATE_DEPRECATEDLIST= YES
46GENERATE_HTMLHELP = NO
47GENERATE_HTML = YES
48GENERATE_LATEX = YES
49GENERATE_LEGEND = YES
50GENERATE_MAN = YES
51GENERATE_RTF = NO
52GENERATE_TAGFILE =
53GENERATE_TESTLIST = YES
54GENERATE_TODOLIST = YES
55GENERATE_TREEVIEW = NO
56GENERATE_XML = NO
57GRAPHICAL_HIERARCHY = NO
58HAVE_DOT = NO
59HHC_LOCATION =
60HIDE_FRIEND_COMPOUNDS = YES
61HIDE_SCOPE_NAMES = NO
62HIDE_UNDOC_CLASSES = YES
63HIDE_UNDOC_MEMBERS = YES
64HIDE_UNDOC_RELATIONS = YES
65HTML_ALIGN_MEMBERS = YES
66HTML_FILE_EXTENSION = .html
67HTML_FOOTER = foot.html
68HTML_HEADER = head.html
69HTML_OUTPUT = html
70HTML_STYLESHEET = e.css
71IGNORE_PREFIX =
72IMAGE_PATH = img
73INCLUDED_BY_GRAPH = NO
74INCLUDE_FILE_PATTERNS =
75INCLUDE_GRAPH = NO
76INCLUDE_PATH =
77INHERIT_DOCS = YES
78INLINE_INFO = YES
79INLINE_INHERITED_MEMB = NO
80INLINE_SOURCES = NO
81INPUT = eeze.dox ../src/lib
82INPUT_FILTER =
83INTERNAL_DOCS = NO
84JAVADOC_AUTOBRIEF = YES
85LATEX_BATCHMODE = NO
86LATEX_CMD_NAME = latex
87LATEX_HEADER =
88LATEX_OUTPUT = latex
89MACRO_EXPANSION = NO
90MAKEINDEX_CMD_NAME = makeindex
91MAN_EXTENSION = .3
92MAN_LINKS = YES
93MAN_OUTPUT = man
94MAX_DOT_GRAPH_HEIGHT = 512
95MAX_DOT_GRAPH_WIDTH = 512
96MAX_INITIALIZER_LINES = 30
97MULTILINE_CPP_IS_BRIEF = NO
98OPTIMIZE_OUTPUT_FOR_C = YES
99OPTIMIZE_OUTPUT_JAVA = NO
100OUTPUT_DIRECTORY = .
101OUTPUT_LANGUAGE = English
102PAPER_TYPE = a4wide
103PDF_HYPERLINKS = YES
104PERL_PATH = /usr/bin/perl
105PREDEFINED =
106PROJECT_NAME = Eeze
107PROJECT_NUMBER =
108QUIET = NO
109RECURSIVE = YES
110REFERENCES_LINK_SOURCE = YES
111REFERENCED_BY_RELATION = YES
112REFERENCES_RELATION = YES
113REPEAT_BRIEF = YES
114RTF_EXTENSIONS_FILE =
115RTF_HYPERLINKS = NO
116RTF_OUTPUT = rtf
117RTF_STYLESHEET_FILE =
118SEARCHENGINE = NO
119SEARCH_INCLUDES = YES
120SHORT_NAMES = NO
121SHOW_INCLUDE_FILES = NO
122SHOW_USED_FILES = NO
123SKIP_FUNCTION_MACROS = YES
124SORT_MEMBER_DOCS = YES
125SOURCE_BROWSER = NO
126STRIP_CODE_COMMENTS = YES
127STRIP_FROM_PATH = src/
128SUBGROUPING = YES
129TAB_SIZE = 2
130TAGFILES =
131TEMPLATE_RELATIONS = NO
132TOC_EXPAND = NO
133TREEVIEW_WIDTH = 250
134USE_PDFLATEX = NO
135VERBATIM_HEADERS = NO
136WARN_FORMAT = "$file:$line: $text"
137WARN_IF_UNDOCUMENTED = YES
138WARNINGS = YES
139WARN_LOGFILE =
140XML_DTD =
141XML_SCHEMA =
diff --git a/legacy/eeze/doc/Makefile.am b/legacy/eeze/doc/Makefile.am
new file mode 100644
index 0000000000..5827e7aa81
--- /dev/null
+++ b/legacy/eeze/doc/Makefile.am
@@ -0,0 +1,32 @@
1MAINTAINERCLEANFILES = Makefile.in eeze.dox
2
3.PHONY: doc
4
5PACKAGE_DOCNAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-doc
6
7if EFL_BUILD_DOC
8
9doc-clean:
10 rm -rf html/ latex/ man/ xml/ $(PACKAGE_DOCNAME).tar*
11
12doc: all doc-clean
13 $(efl_doxygen)
14 cp img/* html/
15 rm -rf $(PACKAGE_DOCNAME).tar*
16 mkdir -p $(PACKAGE_DOCNAME)/doc
17 cp -R html/ latex/ man/ $(PACKAGE_DOCNAME)/doc
18 tar cf $(PACKAGE_DOCNAME).tar $(PACKAGE_DOCNAME)/
19 bzip2 -9 $(PACKAGE_DOCNAME).tar
20 rm -rf $(PACKAGE_DOCNAME)/
21 mv $(PACKAGE_DOCNAME).tar.bz2 $(top_srcdir)
22
23clean-local: doc-clean
24
25else
26
27doc:
28 @echo "Documentation not built. Run ./configure --help"
29
30endif
31
32EXTRA_DIST = Doxyfile $(wildcard img/*.*) e.css head.html foot.html eeze.dox.in
diff --git a/legacy/eeze/doc/e.css b/legacy/eeze/doc/e.css
new file mode 100644
index 0000000000..2dd6b44798
--- /dev/null
+++ b/legacy/eeze/doc/e.css
@@ -0,0 +1,273 @@
1/*
2 Author:
3 Andres Blanc <andresblanc@gmail.com>
4 DaveMDS Andreoli <dave@gurumeditation.it>
5
6 Supported Browsers:
7 ie7, opera9, konqueror4 and firefox3
8
9 Please use a different file for ie6, ie5, etc. hacks.
10*/
11
12
13/* Necessary to place the footer at the bottom of the page */
14html, body {
15 height: 100%;
16 margin: 0px;
17 padding: 0px;
18}
19
20#container {
21 min-height: 100%;
22 height: auto !important;
23 height: 100%;
24 margin: 0 auto -53px;
25}
26
27#footer, #push {
28 height: 53px;
29}
30
31
32* html #container {
33 height: 100%;
34}
35
36/* Prevent floating elements overflowing containers */
37.clear {
38 clear: both;
39 width: 0px;
40 height: 0px;
41}
42
43/* Flexible & centered layout from 750 to 960 pixels */
44.layout {
45 max-width: 960px;
46 min-width: 760px;
47 margin-left: auto;
48 margin-right: auto;
49}
50
51body {
52 /*font-family: Lucida Grande, Helvetica, sans-serif;*/
53 font-family: "Bitstream Vera","Vera","Trebuchet MS",Trebuchet,Tahoma,sans-serif
54}
55
56/* Prevent design overflowing the viewport in small resolutions */
57#container {
58 padding-right: 17px;
59 padding-left: 17px;
60 background-image: url(head_bg.png);
61 background-repeat: repeat-x;
62}
63
64/****************************/
65/* Top main menu */
66/****************************/
67#header_logo {
68 background-image : url(logo.png);
69 width : 61px;
70}
71
72#header_logo a {
73 position : absolute;
74 border : 0px;
75 background-color : transparent;
76 top : 0px;
77 width : 60px;
78 height : 60px;
79}
80
81#header_menu {
82 background-image : url(header_menu_background.png);
83 font : normal 10pt verdana,'Bitstream Vera Sans',helvetica,arial,sans-serif;
84 text-align : right;
85}
86
87#header_last {
88 background-image : url(header_menu_background_last.png);
89 width : 15px;
90}
91
92td.nav_passive {
93 background : url(header_menu_unselected_background.png) 0 0 no-repeat;
94 height : 63px;
95 font-family : "Bitstream Vera","Vera","Trebuchet MS",Trebuchet,Tahoma,sans-serif;
96 font-size : 11px;
97 padding : 20px 10px 20px 10px;
98 vertical-align : middle;
99}
100
101td.nav_active {
102 background : url(header_menu_current_background.png) 0 0 no-repeat;
103 height : 63px;
104 color : #646464;
105 font-family : "Bitstream Vera","Vera","Trebuchet MS",Trebuchet,Tahoma,sans-serif;
106 font-size : 11px;
107 font-weight : bold;
108 padding : 20px 10px 20px 10px;
109 vertical-align : middle;
110}
111
112#header_menu a {
113 display : block;
114 text-decoration : none;
115 cursor : pointer;
116 color : #cdcdcd;
117}
118
119
120
121#header {
122 width: 100%;
123 height: 102px;
124}
125
126#header h1 {
127 width: 63px;
128 height: 63px;
129 position: absolute;
130 margin: 0px;
131}
132
133#header h1 span {
134 display: none;
135}
136
137#header h2 {
138 display: none;
139}
140
141/* .menu-container is used to set properties common to .menu and .submenu */
142#header .menu-container {
143}
144
145#header .menu-container ul {
146 list-style-type: none;
147 list-style-position: inside;
148 margin: 0;
149}
150
151#header .menu-container li {
152 display: block;
153 float: right;
154}
155
156#header .menu {
157 height: 63px;
158 display: block;
159 background-image: url(menu_bg.png);
160 background-repeat: repeat-x;
161}
162
163#header .menu ul {
164 height: 100%;
165 display: block;
166 background-image: url(menu_bg_last.png);
167 background-repeat: no-repeat;
168 background-position: top right;
169 padding-right: 17px;
170}
171
172#header .menu li {
173 height: 100%;
174 text-align: center;
175 background-image: url(menu_bg_unsel.png);
176 background-repeat: no-repeat;
177}
178
179#header .menu a {
180 height: 100%;
181 display: block;
182 color: #cdcdcd;
183 text-decoration: none;
184 font-size: 10pt;
185 line-height: 59px;
186 text-align: center;
187 padding: 0px 15px 0px 15px;
188}
189
190#header .menu li:hover {
191 background-image: url(menu_bg_hover.png);
192 background-repeat: no-repeat;
193}
194
195#header .menu li:hover a {
196 color: #FFFFFF;
197}
198
199#header .menu li.current {
200 background-image: url(menu_bg_current.png);
201 background-repeat: no-repeat;
202}
203
204#header .menu li.current a {
205 color: #646464;
206}
207
208
209/* Hide all the submenus but the current */
210#header .submenu ul {
211 display: none;
212}
213
214#header .submenu .current {
215 display: block;
216}
217
218#header .submenu {
219 font: bold 10px verdana,'Bitstream Vera Sans',helvetica,arial,sans-serif;
220 margin-top: 10px;
221}
222
223#header .submenu a {
224 color: #888888;
225 text-decoration: none;
226 font-size: 0.9em;
227 line-height: 15px;
228 padding:0px 5px 0px 5px;
229}
230
231#header .submenu a:hover {
232 color: #444444;
233}
234
235#header .submenu li {
236 border-left: 1px solid #DDDDDD;
237}
238
239#header .submenu li:last-child {
240 border-left: 0;
241}
242
243#header .doxytitle {
244 position: absolute;
245 font-size: 1.8em;
246 font-weight: bold;
247 color: #444444;
248 line-height: 35px;
249}
250
251#header small {
252 font-size: 0.4em;
253}
254
255#footer {
256 background-image: url(foot_bg.png);
257 width: 100%;
258}
259
260#footer table {
261 width: 100%;
262 text-align: center;
263 white-space: nowrap;
264 padding: 5px 30px 5px 30px;
265 font-size: 0.8em;
266 font-family: "Bitstream Vera","Vera","Trebuchet MS",Trebuchet,Tahoma,sans-serif;
267 color: #888888;
268}
269
270#footer td.copyright {
271 width: 100%;
272}
273
diff --git a/legacy/eeze/doc/eeze.dox.in b/legacy/eeze/doc/eeze.dox.in
new file mode 100644
index 0000000000..d09a56f8dd
--- /dev/null
+++ b/legacy/eeze/doc/eeze.dox.in
@@ -0,0 +1,23 @@
1/**
2@file eeze.dox
3@brief Eeze Misc Libraries
4*/
5
6/**
7@mainpage Eeze
8@image html eeze.png
9@version @PACKAGE_VERSION@
10@author Mike Blumenkrantz (zmike/discomfitor) <mike@zentific.com>
11@date 2010
12
13@section intro What is Eeze?
14
15Eeze is a collection of various APIs which may or may not be useful
16to developers working with EFL. The aim is to eliminate the need to
17learn any api outside of EFL while simultaneously providing an
18extremely easy way to manipulate external libraries.
19
20@verbatim
21Pants
22@endverbatim
23*/
diff --git a/legacy/eeze/doc/foot.html b/legacy/eeze/doc/foot.html
new file mode 100644
index 0000000000..d43cf8fcc0
--- /dev/null
+++ b/legacy/eeze/doc/foot.html
@@ -0,0 +1,18 @@
1
2 <div id="push"></div>
3 </div> <!-- #content -->
4 </div> <!-- .layout -->
5
6 </div> <!-- #container -->
7
8
9 <div id="footer">
10 <table><tr>
11 <td class="copyright">Copyright &copy;$year Enlightenment</td>
12 <td class="generated">Docs generated $datetime</td>
13 </tr></table>
14 </div>
15
16
17</body>
18</html>
diff --git a/legacy/eeze/doc/head.html b/legacy/eeze/doc/head.html
new file mode 100644
index 0000000000..2d9ea9224e
--- /dev/null
+++ b/legacy/eeze/doc/head.html
@@ -0,0 +1,68 @@
1<html>
2<head>
3 <title>$title</title>
4 <meta http-equiv="content-type" content="text/html;charset=UTF-8">
5 <meta name="author" content="Andres Blanc" >
6
7 <link rel="icon" href="img/favicon.png" type="image/x-icon">
8 <link rel="shortcut icon" href="img/favicon.png" type="image/x-icon">
9 <link rel="icon" href="img/favicon.png" type="image/ico">
10 <link rel="shortcut icon" href="img/favicon.png" type="image/ico">
11
12 <link rel="stylesheet" type="text/css" href="e.css">
13 <link rel="stylesheet" type="text/css" href="edoxy.css">
14</head>
15
16<body>
17
18<div id="container">
19
20<div id="header">
21<div class="layout">
22
23 <h1><span>Enlightenment</span></h1>
24 <h2><span>Beauty at your fingertips</span></h2>
25
26 <table cellspacing="0" cellpadding="0" width="100%"><tr>
27 <td id="header_logo">
28 <a href="http://www.enlightenment.org"></a>
29 </td>
30 <td id="header_menu">
31 <table cellspacing="0" cellpadding="0" align="right"><tr>
32 <td class="nav_passive"><a class="nav_passive" href="http://www.enlightenment.org/p.php?p=home">Home</a></td>
33 <td class="nav_passive"><a class="nav_passive" href="http://www.enlightenment.org/p.php?p=news">News</a></td>
34 <td class="nav_passive"><a class="nav_passive" href="http://www.enlightenment.org/p.php?p=about">About</a></td>
35 <td class="nav_passive"><a class="nav_passive" href="http://www.enlightenment.org/p.php?p=download">Download</a></td>
36 <td class="nav_passive"><a class="nav_passive" href="http://www.enlightenment.org/p.php?p=support">Support</a></td>
37 <td class="nav_passive"><a class="nav_passive" href="http://www.enlightenment.org/p.php?p=contribute">Contribute</a></td>
38 <td class="nav_passive"><a class="nav_passive" href="http://www.enlightenment.org/p.php?p=contact">Contact</a></td>
39 <td class="nav_passive"><a class="nav_passive" href="http://trac.enlightenment.org/e">Tracker</a></td>
40 <td class="nav_passive"><a class="nav_passive" href="http://www.enlightenment.org/p.php?p=docs">Docs</a></td>
41 </tr></table>
42 </td>
43 <td id="header_last"></td>
44 </tr></table>
45
46 <div class="doxytitle">
47 $projectname Documentation <small>at $date</small>
48 </div>
49
50 <div class="menu-container">
51 <div class="submenu">
52 <ul class="current">
53 <li><a href="files.html">Files</a></li>
54 <li><a href="globals.html">Globals</a></li>
55 <li><a href="Eeze_8h.html">API Reference</a></li>
56 <li><a href="modules.html">Modules</a></li>
57 <li class="current"><a href="index.html">Main Page</a></li>
58 </ul>
59 </div>
60 </div>
61
62
63 <div class="clear"></div>
64</div>
65</div>
66
67<div id="content">
68<div class="layout">
diff --git a/legacy/eeze/doc/img/edoxy.css b/legacy/eeze/doc/img/edoxy.css
new file mode 100644
index 0000000000..311ca23d46
--- /dev/null
+++ b/legacy/eeze/doc/img/edoxy.css
@@ -0,0 +1,486 @@
1/*
2 * This file contain a custom doxygen style to match e.org graphics
3 */
4
5
6
7/* BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
8 font-family: Geneva, Arial, Helvetica, sans-serif;
9}*/
10BODY, TD {
11 font-size: 12px;
12}
13H1 {
14 text-align: center;
15 font-size: 160%;
16}
17H2 {
18 font-size: 120%;
19}
20H3 {
21 font-size: 100%;
22}
23CAPTION {
24 font-weight: bold
25}
26DIV.qindex {
27 width: 100%;
28 background-color: #e8eef2;
29 border: 1px solid #84b0c7;
30 text-align: center;
31 margin: 2px;
32 padding: 2px;
33 line-height: 140%;
34}
35DIV.navpath {
36 width: 100%;
37 background-color: #e8eef2;
38 border: 1px solid #84b0c7;
39 text-align: center;
40 margin: 2px;
41 padding: 2px;
42 line-height: 140%;
43}
44DIV.navtab {
45 background-color: #e8eef2;
46 border: 1px solid #84b0c7;
47 text-align: center;
48 margin: 2px;
49 margin-right: 15px;
50 padding: 2px;
51}
52TD.navtab {
53 font-size: 70%;
54}
55A.qindex {
56 text-decoration: none;
57 font-weight: bold;
58 color: #1A419D;
59}
60A.qindex:visited {
61 text-decoration: none;
62 font-weight: bold;
63 color: #1A419D
64}
65A.qindex:hover {
66 text-decoration: none;
67 background-color: #ddddff;
68}
69A.qindexHL {
70 text-decoration: none;
71 font-weight: bold;
72 background-color: #6666cc;
73 color: #ffffff;
74 border: 1px double #9295C2;
75}
76A.qindexHL:hover {
77 text-decoration: none;
78 background-color: #6666cc;
79 color: #ffffff;
80}
81A.qindexHL:visited {
82 text-decoration: none;
83 background-color: #6666cc;
84 color: #ffffff
85}
86A.el {
87 text-decoration: none;
88 font-weight: bold
89}
90A.elRef {
91 font-weight: bold
92}
93A.code:link {
94 text-decoration: none;
95 font-weight: normal;
96 color: #0000FF
97}
98A.code:visited {
99 text-decoration: none;
100 font-weight: normal;
101 color: #0000FF
102}
103A.codeRef:link {
104 font-weight: normal;
105 color: #0000FF
106}
107A.codeRef:visited {
108 font-weight: normal;
109 color: #0000FF
110}
111A:hover, A:visited:hover {
112 text-decoration: none;
113 /* background-color: #f2f2ff; */
114 color: #000055;
115}
116A.anchor {
117 color: #000;
118}
119DL.el {
120 margin-left: -1cm
121}
122.fragment {
123 font-family: monospace, fixed;
124 font-size: 95%;
125}
126PRE.fragment {
127 border: 1px solid #CCCCCC;
128 background-color: #f5f5f5;
129 margin-top: 4px;
130 margin-bottom: 4px;
131 margin-left: 2px;
132 margin-right: 8px;
133 padding-left: 6px;
134 padding-right: 6px;
135 padding-top: 4px;
136 padding-bottom: 4px;
137}
138DIV.ah {
139 background-color: black;
140 font-weight: bold;
141 color: #ffffff;
142 margin-bottom: 3px;
143 margin-top: 3px
144}
145
146DIV.groupHeader {
147 margin-left: 16px;
148 margin-top: 12px;
149 margin-bottom: 6px;
150 font-weight: bold;
151}
152DIV.groupText {
153 margin-left: 16px;
154 font-style: italic;
155 font-size: 90%
156}
157/*BODY {
158 background: white;
159 color: black;
160 margin-right: 20px;
161 margin-left: 20px;
162}*/
163TD.indexkey {
164 background-color: #e8eef2;
165 font-weight: bold;
166 padding-right : 10px;
167 padding-top : 2px;
168 padding-left : 10px;
169 padding-bottom : 2px;
170 margin-left : 0px;
171 margin-right : 0px;
172 margin-top : 2px;
173 margin-bottom : 2px;
174 border: 1px solid #CCCCCC;
175}
176TD.indexvalue {
177 background-color: #e8eef2;
178 font-style: italic;
179 padding-right : 10px;
180 padding-top : 2px;
181 padding-left : 10px;
182 padding-bottom : 2px;
183 margin-left : 0px;
184 margin-right : 0px;
185 margin-top : 2px;
186 margin-bottom : 2px;
187 border: 1px solid #CCCCCC;
188}
189TR.memlist {
190 background-color: #f0f0f0;
191}
192P.formulaDsp {
193 text-align: center;
194}
195IMG.formulaDsp {
196}
197IMG.formulaInl {
198 vertical-align: middle;
199}
200SPAN.keyword { color: #008000 }
201SPAN.keywordtype { color: #604020 }
202SPAN.keywordflow { color: #e08000 }
203SPAN.comment { color: #800000 }
204SPAN.preprocessor { color: #806020 }
205SPAN.stringliteral { color: #002080 }
206SPAN.charliteral { color: #008080 }
207SPAN.vhdldigit { color: #ff00ff }
208SPAN.vhdlchar { color: #000000 }
209SPAN.vhdlkeyword { color: #700070 }
210SPAN.vhdllogic { color: #ff0000 }
211
212.mdescLeft {
213 padding: 0px 8px 4px 8px;
214 font-size: 80%;
215 font-style: italic;
216 background-color: #FAFAFA;
217 border-top: 1px none #E0E0E0;
218 border-right: 1px none #E0E0E0;
219 border-bottom: 1px none #E0E0E0;
220 border-left: 1px none #E0E0E0;
221 margin: 0px;
222}
223.mdescRight {
224 padding: 0px 8px 4px 8px;
225 font-size: 80%;
226 font-style: italic;
227 background-color: #FAFAFA;
228 border-top: 1px none #E0E0E0;
229 border-right: 1px none #E0E0E0;
230 border-bottom: 1px none #E0E0E0;
231 border-left: 1px none #E0E0E0;
232 margin: 0px;
233}
234.memItemLeft {
235 padding: 1px 0px 0px 8px;
236 margin: 4px;
237 border-top-width: 1px;
238 border-right-width: 1px;
239 border-bottom-width: 1px;
240 border-left-width: 1px;
241 border-top-color: #E0E0E0;
242 border-right-color: #E0E0E0;
243 border-bottom-color: #E0E0E0;
244 border-left-color: #E0E0E0;
245 border-top-style: solid;
246 border-right-style: none;
247 border-bottom-style: none;
248 border-left-style: none;
249 background-color: #FAFAFA;
250 font-size: 80%;
251}
252.memItemRight {
253 padding: 1px 8px 0px 8px;
254 margin: 4px;
255 border-top-width: 1px;
256 border-right-width: 1px;
257 border-bottom-width: 1px;
258 border-left-width: 1px;
259 border-top-color: #E0E0E0;
260 border-right-color: #E0E0E0;
261 border-bottom-color: #E0E0E0;
262 border-left-color: #E0E0E0;
263 border-top-style: solid;
264 border-right-style: none;
265 border-bottom-style: none;
266 border-left-style: none;
267 background-color: #FAFAFA;
268 font-size: 80%;
269}
270.memTemplItemLeft {
271 padding: 1px 0px 0px 8px;
272 margin: 4px;
273 border-top-width: 1px;
274 border-right-width: 1px;
275 border-bottom-width: 1px;
276 border-left-width: 1px;
277 border-top-color: #E0E0E0;
278 border-right-color: #E0E0E0;
279 border-bottom-color: #E0E0E0;
280 border-left-color: #E0E0E0;
281 border-top-style: none;
282 border-right-style: none;
283 border-bottom-style: none;
284 border-left-style: none;
285 background-color: #FAFAFA;
286 font-size: 80%;
287}
288.memTemplItemRight {
289 padding: 1px 8px 0px 8px;
290 margin: 4px;
291 border-top-width: 1px;
292 border-right-width: 1px;
293 border-bottom-width: 1px;
294 border-left-width: 1px;
295 border-top-color: #E0E0E0;
296 border-right-color: #E0E0E0;
297 border-bottom-color: #E0E0E0;
298 border-left-color: #E0E0E0;
299 border-top-style: none;
300 border-right-style: none;
301 border-bottom-style: none;
302 border-left-style: none;
303 background-color: #FAFAFA;
304 font-size: 80%;
305}
306.memTemplParams {
307 padding: 1px 0px 0px 8px;
308 margin: 4px;
309 border-top-width: 1px;
310 border-right-width: 1px;
311 border-bottom-width: 1px;
312 border-left-width: 1px;
313 border-top-color: #E0E0E0;
314 border-right-color: #E0E0E0;
315 border-bottom-color: #E0E0E0;
316 border-left-color: #E0E0E0;
317 border-top-style: solid;
318 border-right-style: none;
319 border-bottom-style: none;
320 border-left-style: none;
321 color: #606060;
322 background-color: #FAFAFA;
323 font-size: 80%;
324}
325.search {
326 color: #003399;
327 font-weight: bold;
328}
329FORM.search {
330 margin-bottom: 0px;
331 margin-top: 0px;
332}
333INPUT.search {
334 font-size: 75%;
335 color: #000080;
336 font-weight: normal;
337 background-color: #e8eef2;
338}
339TD.tiny {
340 font-size: 75%;
341}
342a {
343 color: #1A41A8;
344}
345a:visited {
346 color: #2A3798;
347}
348.dirtab {
349 padding: 4px;
350 border-collapse: collapse;
351 border: 1px solid #84b0c7;
352}
353TH.dirtab {
354 background: #e8eef2;
355 font-weight: bold;
356}
357HR {
358 height: 1px;
359 border: none;
360 border-top: 1px solid black;
361}
362
363/* Style for detailed member documentation */
364.memtemplate {
365 font-size: 80%;
366 color: #606060;
367 font-weight: normal;
368 margin-left: 3px;
369}
370.memnav {
371 background-color: #eeeeee;
372 border: 1px solid #dddddd;
373 text-align: center;
374 margin: 2px;
375 margin-right: 15px;
376 padding: 2px;
377}
378.memitem {
379 padding: 4px;
380 background-color: #eeeeee;
381 border-width: 1px;
382 border-style: solid;
383 border-color: #dddddd;
384 -moz-border-radius: 4px 4px 4px 4px;
385}
386.memname {
387 white-space: nowrap;
388 font-weight: bold;
389 color: #ffffff;
390}
391.memdoc{
392 padding-left: 10px;
393}
394.memproto {
395 background-color: #111111;
396 width: 100%;
397 border-width: 1px;
398 border-style: solid;
399 border-color: #000000;
400 font-weight: bold;
401 -moz-border-radius: 4px 4px 4px 4px;
402}
403.paramkey {
404 text-align: right;
405 color: #ffffff;
406}
407.paramtype {
408 white-space: nowrap;
409 color: #aaaaaa;
410}
411.paramname {
412 color: #ff0000;
413 font-style: italic;
414 white-space: nowrap;
415}
416/* End Styling for detailed member documentation */
417
418/* for the tree view */
419.ftvtree {
420 font-family: sans-serif;
421 margin:0.5em;
422}
423/* these are for tree view when used as main index */
424.directory {
425 font-size: 9pt;
426 font-weight: bold;
427}
428.directory h3 {
429 margin: 0px;
430 margin-top: 1em;
431 font-size: 11pt;
432}
433
434/* The following two styles can be used to replace the root node title */
435/* with an image of your choice. Simply uncomment the next two styles, */
436/* specify the name of your image and be sure to set 'height' to the */
437/* proper pixel height of your image. */
438
439/* .directory h3.swap { */
440/* height: 61px; */
441/* background-repeat: no-repeat; */
442/* background-image: url("yourimage.gif"); */
443/* } */
444/* .directory h3.swap span { */
445/* display: none; */
446/* } */
447
448.directory > h3 {
449 margin-top: 0;
450}
451.directory p {
452 margin: 0px;
453 white-space: nowrap;
454}
455.directory div {
456 display: none;
457 margin: 0px;
458}
459.directory img {
460 vertical-align: -30%;
461}
462/* these are for tree view when not used as main index */
463.directory-alt {
464 font-size: 100%;
465 font-weight: bold;
466}
467.directory-alt h3 {
468 margin: 0px;
469 margin-top: 1em;
470 font-size: 11pt;
471}
472.directory-alt > h3 {
473 margin-top: 0;
474}
475.directory-alt p {
476 margin: 0px;
477 white-space: nowrap;
478}
479.directory-alt div {
480 display: none;
481 margin: 0px;
482}
483.directory-alt img {
484 vertical-align: -30%;
485}
486
diff --git a/legacy/eeze/doc/img/eeze.png b/legacy/eeze/doc/img/eeze.png
new file mode 100644
index 0000000000..08d6012433
--- /dev/null
+++ b/legacy/eeze/doc/img/eeze.png
Binary files differ
diff --git a/legacy/eeze/doc/img/foot_bg.png b/legacy/eeze/doc/img/foot_bg.png
new file mode 100644
index 0000000000..b24f3a48b4
--- /dev/null
+++ b/legacy/eeze/doc/img/foot_bg.png
Binary files differ
diff --git a/legacy/eeze/doc/img/head_bg.png b/legacy/eeze/doc/img/head_bg.png
new file mode 100644
index 0000000000..081dc131e4
--- /dev/null
+++ b/legacy/eeze/doc/img/head_bg.png
Binary files differ
diff --git a/legacy/eeze/doc/img/header_menu_background.png b/legacy/eeze/doc/img/header_menu_background.png
new file mode 100644
index 0000000000..e978743651
--- /dev/null
+++ b/legacy/eeze/doc/img/header_menu_background.png
Binary files differ
diff --git a/legacy/eeze/doc/img/header_menu_background_last.png b/legacy/eeze/doc/img/header_menu_background_last.png
new file mode 100644
index 0000000000..88c116c8c8
--- /dev/null
+++ b/legacy/eeze/doc/img/header_menu_background_last.png
Binary files differ
diff --git a/legacy/eeze/doc/img/header_menu_current_background.png b/legacy/eeze/doc/img/header_menu_current_background.png
new file mode 100644
index 0000000000..de97c9268e
--- /dev/null
+++ b/legacy/eeze/doc/img/header_menu_current_background.png
Binary files differ
diff --git a/legacy/eeze/doc/img/header_menu_unselected_background.png b/legacy/eeze/doc/img/header_menu_unselected_background.png
new file mode 100644
index 0000000000..50e5fd8d3d
--- /dev/null
+++ b/legacy/eeze/doc/img/header_menu_unselected_background.png
Binary files differ
diff --git a/legacy/eeze/doc/img/logo.png b/legacy/eeze/doc/img/logo.png
new file mode 100644
index 0000000000..b3884a5cbc
--- /dev/null
+++ b/legacy/eeze/doc/img/logo.png
Binary files differ
diff --git a/legacy/eeze/eudev.pc.in b/legacy/eeze/eudev.pc.in
new file mode 100644
index 0000000000..a06f9fa0c5
--- /dev/null
+++ b/legacy/eeze/eudev.pc.in
@@ -0,0 +1,11 @@
1prefix=@prefix@
2exec_prefix=@exec_prefix@
3libdir=@libdir@
4includedir=@includedir@
5
6Name: eudev
7Description: udev convenience library for efl
8@pkgconfig_requires_private@: ecore libudev
9Version: @VERSION@
10Libs: -L${libdir} -leudev
11Cflags: -I${includedir}
diff --git a/legacy/eeze/m4/efl_doxygen.m4 b/legacy/eeze/m4/efl_doxygen.m4
new file mode 100644
index 0000000000..dd6bc3e895
--- /dev/null
+++ b/legacy/eeze/m4/efl_doxygen.m4
@@ -0,0 +1,99 @@
1dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if doxygen is available or not.
5
6dnl EFL_CHECK_DOXYGEN([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7dnl Test for the doxygen program
8dnl Defines efl_doxygen
9dnl Defines the automake conditionnal EFL_BUILD_DOC
10dnl
11AC_DEFUN([EFL_CHECK_DOXYGEN],
12[
13
14dnl
15dnl Disable the build of the documentation
16dnl
17AC_ARG_ENABLE([doc],
18 [AC_HELP_STRING(
19 [--disable-doc],
20 [Disable documentation build @<:@default=enabled@:>@])],
21 [
22 if test "x${enableval}" = "xyes" ; then
23 efl_enable_doc="yes"
24 else
25 efl_enable_doc="no"
26 fi
27 ],
28 [efl_enable_doc="yes"])
29
30AC_MSG_CHECKING([whether to build documentation])
31AC_MSG_RESULT([${efl_enable_doc}])
32
33if test "x${efl_enable_doc}" = "xyes" ; then
34
35dnl
36dnl Specify the file name, without path
37dnl
38
39 efl_doxygen="doxygen"
40
41 AC_ARG_WITH([doxygen],
42 [AC_HELP_STRING(
43 [--with-doxygen=FILE],
44 [doxygen program to use @<:@default=doxygen@:>@])],
45dnl
46dnl Check the given doxygen program.
47dnl
48 [efl_doxygen=${withval}
49 AC_CHECK_PROG([efl_have_doxygen],
50 [${efl_doxygen}],
51 [yes],
52 [no])
53 if test "x${efl_have_doxygen}" = "xno" ; then
54 echo "WARNING:"
55 echo "The doxygen program you specified:"
56 echo "${efl_doxygen}"
57 echo "was not found. Please check the path and make sure "
58 echo "the program exists and is executable."
59 AC_MSG_WARN([no doxygen detected. Documentation will not be built])
60 fi
61 ],
62 [AC_CHECK_PROG([efl_have_doxygen],
63 [${efl_doxygen}],
64 [yes],
65 [no])
66 if test "x${efl_have_doxygen}" = "xno" ; then
67 echo "WARNING:"
68 echo "The doxygen program was not found in your execute path."
69 echo "You may have doxygen installed somewhere not covered by your path."
70 echo ""
71 echo "If this is the case make sure you have the packages installed, AND"
72 echo "that the doxygen program is in your execute path (see your"
73 echo "shell manual page on setting the \$PATH environment variable), OR"
74 echo "alternatively, specify the program to use with --with-doxygen."
75 AC_MSG_WARN([no doxygen detected. Documentation will not be built])
76 fi
77 ])
78fi
79
80dnl
81dnl Substitution
82dnl
83AC_SUBST([efl_doxygen])
84
85if ! test "x${efl_have_doxygen}" = "xyes" ; then
86 efl_enable_doc="no"
87fi
88
89AM_CONDITIONAL(EFL_BUILD_DOC, test "x${efl_enable_doc}" = "xyes")
90
91if test "x${efl_enable_doc}" = "xyes" ; then
92 m4_default([$1], [:])
93else
94 m4_default([$2], [:])
95fi
96
97])
98
99dnl End of doxygen.m4
diff --git a/legacy/eeze/src/Makefile.am b/legacy/eeze/src/Makefile.am
new file mode 100644
index 0000000000..97baf85931
--- /dev/null
+++ b/legacy/eeze/src/Makefile.am
@@ -0,0 +1,2 @@
1MAINTAINERCLEANFILES = Makefile.in
2SUBDIRS = lib bin
diff --git a/legacy/eeze/src/bin/Makefile.am b/legacy/eeze/src/bin/Makefile.am
new file mode 100644
index 0000000000..b328ad00b1
--- /dev/null
+++ b/legacy/eeze/src/bin/Makefile.am
@@ -0,0 +1,21 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3EEZE_CPPFLAGS = \
4-I$(top_srcdir)/src/lib/udev \
5@ECORE_CFLAGS@
6
7LIBS = \
8@ECORE_LIBS@
9
10if BUILD_EUDEV
11EUDEV_PROG = eeze_udev_test
12endif
13
14bin_PROGRAMS = \
15$(EUDEV_PROG)
16
17if BUILD_EUDEV
18eeze_udev_test_SOURCES = eeze_udev_test.c
19eeze_udev_test_CPPFLAGS = $(EEZE_CPPFLAGS)
20eeze_udev_test_LDADD = $(top_builddir)/src/lib/udev/libeudev.la
21endif
diff --git a/legacy/eeze/src/bin/eeze_udev_test.c b/legacy/eeze/src/bin/eeze_udev_test.c
new file mode 100644
index 0000000000..41e17a5720
--- /dev/null
+++ b/legacy/eeze/src/bin/eeze_udev_test.c
@@ -0,0 +1,162 @@
1#include <E_Udev.h>
2#include <Ecore.h>
3#include <stdio.h>
4
5typedef struct kbdmouse
6{
7 Eina_List *kbds;
8 Eina_List *mice;
9 Eina_Hash *hash;
10} kbdmouse;
11
12static void
13/* event will always be a syspath starting with /sys */
14catch_events(const char *event, void *data, Eudev_Watch *watch)
15{
16 kbdmouse *akbdmouse = data;
17 Eina_List *l;
18 const char *name, *dev, *type;
19 int new = 0;
20
21 /* the event that comes through will be prefixed by "/sys"
22 * but the saved name will not, so we check for the saved name
23 * inside the event name
24 */
25 EINA_LIST_FOREACH(akbdmouse->kbds, l, name)
26 if (strstr(event, name)) goto end;
27 EINA_LIST_FOREACH(akbdmouse->mice, l, name)
28 if (strstr(event, name)) goto end;
29
30 /* check to see if the device was just plugged in */
31 if (e_udev_syspath_is_kbd(event) || e_udev_syspath_is_mouse(event))
32 {
33 new = 1;
34 goto end;
35 }
36 /* if we reach here, the event is neither a keyboard nor a mouse that we saw
37 * previously, so we print a moderately amusing message and bail
38 */
39 printf("Sneaky sneaky! But %s is not a keyboard or a mouse!!\n", event);
40 return;
41
42end:
43 /* we stored the devpaths for all the syspaths previously so that
44 * we can retrieve them now even though the device has been removed and
45 * is inaccessible to udev
46 */
47 if (new)
48 {
49 dev = e_udev_syspath_get_devpath(event);
50 type = "plugged in";
51 }
52 else
53 {
54 dev = eina_hash_find(akbdmouse->hash, name);
55 type = "unplugged";
56 }
57 printf("You %s %s!\n", type, dev);
58 printf("All tests completed, exiting successfully!\n");
59 /* now we free the lists */
60 eina_list_free(akbdmouse->kbds);
61 eina_list_free(akbdmouse->mice);
62 /* and the hash */
63 eina_hash_free(akbdmouse->hash);
64 /* and the random storage struct */
65 free(akbdmouse);
66 /* and quit the main loop */
67 ecore_main_loop_quit();
68 /* and delete the watch */
69 e_udev_watch_del(watch);
70 /* and shut down eudev */
71 e_udev_shutdown();
72}
73
74static void
75hash_free(void *data)
76{
77 eina_stringshare_del(data);
78}
79
80int main()
81{
82 Eina_List *type, *l;
83 const char *name, *check;
84 kbdmouse *akbdmouse;
85 Eina_Hash *hash;
86
87 ecore_init();
88 e_udev_init();
89
90 hash = eina_hash_stringshared_new(hash_free);
91 akbdmouse = malloc(sizeof(kbdmouse));
92 akbdmouse->hash = hash;
93
94 printf("For my first trick, I will find all of your keyboards and return their syspaths.\n");
95 /* find all keyboards using type EUDEV_TYPE_KEYBOARD */
96 type = e_udev_find_by_type(EUDEV_TYPE_KEYBOARD, NULL);
97 EINA_LIST_FOREACH(type, l, name)
98 { /* add the devpath to the hash for use in the cb later */
99 eina_hash_direct_add(hash, name, e_udev_syspath_get_devpath(name));
100 printf("Found keyboard: %s\n", name);
101 }
102 /* we save this list for later, because once a device is unplugged it can
103 * no longer be detected by udev, and any related properties are unusable unless
104 * they have been previously stored
105 */
106 akbdmouse->kbds = type;
107
108 printf("\nNext, I will find all of your mice and print the corresponding manufacturer.\n");
109 /* find all mice using type EUDEV_TYPE_MOUSE */
110 type = e_udev_find_by_type(EUDEV_TYPE_MOUSE, NULL);
111 EINA_LIST_FOREACH(type, l, name)
112 { /* add the devpath to the hash for use in the cb later */
113 eina_hash_direct_add(hash, name, e_udev_syspath_get_devpath(name)); /* get a property using the device's syspath */
114 printf("Found mouse %s with vendor: %s\n", name, e_udev_syspath_get_property(name, "ID_VENDOR"));
115 }
116 /* we save this list for later, because once a device is unplugged it can
117 * no longer be detected by udev, and any related properties are unusable unless
118 * they have been previously stored
119 */
120 akbdmouse->mice = type;
121
122 printf("\nNow let's try something a little more difficult. Mountable filesystems!\n");
123 /* find all mountable drives using type EUDEV_TYPE_DRIVE_MOUNTABLE */
124 type = e_udev_find_by_type(EUDEV_TYPE_DRIVE_MOUNTABLE, NULL);
125 EINA_LIST_FOREACH(type, l, name)
126 {
127 printf("Found device: %s\n", name); /* get a property using the device's syspath */
128 printf("\tYou probably know it better as %s\n", e_udev_syspath_get_property(name, "DEVNAME"));
129 printf("\tIt's formatted as %s", e_udev_syspath_get_property(name, "ID_FS_TYPE"));
130 check = e_udev_syspath_get_property(name, "FSTAB_DIR");
131 if (check)
132 printf(", and gets mounted at %s", check);
133 printf("!\n");
134 }
135 eina_list_free(type);
136
137 printf("\nInternal drives, anyone? With serial numbers?\n");
138 /* find all internal drives using type EUDEV_TYPE_DRIVE_INTERNAL */
139 type = e_udev_find_by_type(EUDEV_TYPE_DRIVE_INTERNAL, NULL);
140 EINA_LIST_FOREACH(type, l, name) /* get a property using the device's syspath */
141 printf("%s: %s\n", name, e_udev_syspath_get_property(name, "ID_SERIAL"));
142 eina_list_free(type);
143
144 printf("\nGot any removables? I'm gonna find em!\n");
145 /* find all removable media using type EUDEV_TYPE_DRIVE_REMOVABLE */
146 type = e_udev_find_by_type(EUDEV_TYPE_DRIVE_REMOVABLE, NULL);
147 EINA_LIST_FOREACH(type, l, name) /* get a property using the device's syspath */
148 printf("\tOoh, a %s attached on your %s bus!\n", e_udev_syspath_get_property(name, "ID_MODEL"),
149 e_udev_syspath_get_property(name, "ID_BUS"));
150 eina_list_free(type);
151
152
153 /* set a udev watch, grab all events because no EUDEV_TYPE filter is specified,
154 * set the events to be sent to callback function catch_events(), and attach
155 * kbdmouse to the watch as associated data
156 */
157 e_udev_watch_add(EUDEV_TYPE_NONE, catch_events, akbdmouse);
158 printf("\nAnd now for something more complicated. Plug or unplug your keyboard or mouse for me.\n");
159
160 /* main loop must be started to use ecore fd polling */
161 ecore_main_loop_begin();
162}
diff --git a/legacy/eeze/src/lib/Makefile.am b/legacy/eeze/src/lib/Makefile.am
new file mode 100644
index 0000000000..240797d51d
--- /dev/null
+++ b/legacy/eeze/src/lib/Makefile.am
@@ -0,0 +1,2 @@
1MAINTAINERCLEANFILES = Makefile.in
2SUBDIRS=udev
diff --git a/legacy/eeze/src/lib/udev/E_Udev.h b/legacy/eeze/src/lib/udev/E_Udev.h
new file mode 100644
index 0000000000..0c3ea23efd
--- /dev/null
+++ b/legacy/eeze/src/lib/udev/E_Udev.h
@@ -0,0 +1,137 @@
1#ifndef E_UDEV_H
2#define E_UDEV_H
3
4#include <Ecore.h>
5#include <libudev.h>
6
7#ifdef EAPI
8#undef EAPI
9#endif
10#ifdef _MSC_VER
11#error "This will not run on windows!"
12#else
13# ifdef __GNUC__
14# if __GNUC__ >= 4
15# define EAPI __attribute__ ((visibility("default")))
16# else
17# define EAPI
18# endif
19# else
20# define EAPI
21# endif
22#endif
23
24/**
25 * @defgroup Subsystem_Types Subsystem_Types
26 *
27 * ac97
28 * acpi
29 * bdi
30 * block
31 * bsg
32 * dmi
33 * graphics
34 * hid
35 * hwmon
36 * i2c
37 * input
38 * mem
39 * misc
40 * net
41 * pci
42 * pci_bus
43 * pci_express
44 * platform
45 * pnp
46 * rtc
47 * scsi
48 * scsi_device
49 * scsi_disk
50 * scsi_generic
51 * scsi_host
52 * serio
53 * sound
54 * thermal
55 * tty
56 * usb
57 * usb_device
58 * vc
59 * vtconsole
60 *
61 * @ingroup udev
62 */
63
64/**
65 * @defgroup Device_Types Device_Types
66 *
67 * atapi
68 * audio
69 * block
70 * cd
71 * char
72 * disk
73 * floppy
74 * generic
75 * hid
76 * hub
77 * media
78 * optical
79 * printer
80 * rbc
81 * scsi
82 * storage
83 * tape
84 * video
85 *
86 * @ingroup udev
87 */
88
89/*FIXME: these probably need to be bitmasks with categories*/
90typedef enum
91{
92 EUDEV_TYPE_NONE,
93 EUDEV_TYPE_KEYBOARD,
94 EUDEV_TYPE_MOUSE,
95 EUDEV_TYPE_TOUCHPAD,
96 EUDEV_TYPE_DRIVE_MOUNTABLE,
97 EUDEV_TYPE_DRIVE_INTERNAL,
98 EUDEV_TYPE_DRIVE_REMOVABLE,
99 EUDEV_TYPE_DRIVE_CDROM,
100 EUDEV_TYPE_POWER_AC,
101 EUDEV_TYPE_POWER_BAT
102/* EUDEV_TYPE_ANDROID */
103} Eudev_Type;
104
105struct Eudev_Watch;
106typedef struct Eudev_Watch Eudev_Watch;
107
108#ifdef __cplusplus
109extern "C" {
110#endif
111
112 EAPI int e_udev_init(void);
113 EAPI int e_udev_shutdown(void);
114
115 EAPI Eina_List *e_udev_find_by_type(const Eudev_Type type, const char *name);
116 EAPI Eina_List *e_udev_find_by_filter(const char *subsystem, const char *type, const char *name);
117
118 EAPI const char *e_udev_syspath_rootdev_get(const char *syspath);
119 EAPI const char *e_udev_syspath_get_devpath(const char *syspath);
120 EAPI const char *e_udev_syspath_get_subsystem(const char *syspath);
121 EAPI const char *e_udev_syspath_get_property(const char *syspath, const char *property);
122
123 EAPI const char *e_udev_devpath_get_syspath(const char *devpath);
124 EAPI const char *e_udev_devpath_get_subsystem(const char *devpath);
125
126 EAPI Eina_Bool e_udev_syspath_is_mouse(const char *syspath);
127 EAPI Eina_Bool e_udev_syspath_is_kbd(const char *syspath);
128 EAPI Eina_Bool e_udev_syspath_is_touchpad(const char *syspath);
129
130 EAPI Eudev_Watch *e_udev_watch_add(Eudev_Type type, void(*func)(const char *, void *, Eudev_Watch *), void *user_data);
131 EAPI void *e_udev_watch_del(Eudev_Watch *watch);
132
133#ifdef __cplusplus
134}
135#endif
136
137#endif
diff --git a/legacy/eeze/src/lib/udev/Makefile.am b/legacy/eeze/src/lib/udev/Makefile.am
new file mode 100644
index 0000000000..dccca18099
--- /dev/null
+++ b/legacy/eeze/src/lib/udev/Makefile.am
@@ -0,0 +1,21 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3AM_CPPFLAGS = @ECORE_CFLAGS@
4
5if BUILD_EUDEV
6
7lib_LTLIBRARIES = libeudev.la
8include_HEADERS = E_Udev.h
9
10noinst_HEADERS = e_udev_private.h
11
12libeudev_la_SOURCES = \
13E_Udev.h \
14e_udev.c \
15e_udev_watch.c \
16e_udev_main.c
17
18libeudev_la_LIBADD = @ECORE_LIBS@ @UDEV_LIBS@
19libeudev_la_LDFLAGS = -no-undefined -version-info @version_info@ @eudev_release_info@
20
21endif
diff --git a/legacy/eeze/src/lib/udev/e_udev.c b/legacy/eeze/src/lib/udev/e_udev.c
new file mode 100644
index 0000000000..ef536f33d2
--- /dev/null
+++ b/legacy/eeze/src/lib/udev/e_udev.c
@@ -0,0 +1,513 @@
1#include <E_Udev.h>
2#include "e_udev_private.h"
3
4/**
5 * @defgroup udev udev
6 *
7 * These are functions which interact directly with udev.
8 */
9
10/**
11 * Find the root device of a device from its syspath.
12 *
13 * @param syspath The syspath of a device, with or without "/sys/"
14 * @return The syspath of the parent device
15 *
16 * Return a syspath (/sys/$syspath) for the parent device.
17 *
18 * @ingroup udev
19 */
20EAPI const char *
21e_udev_syspath_rootdev_get(const char *syspath)
22{
23 struct udev *udev;
24 struct udev_device *device, *parent;
25 const char *ret;
26
27 if (!syspath) return NULL;
28
29 udev = udev_new();
30 if (!udev) return NULL;
31
32 device = udev_device_new_from_syspath(udev, syspath);
33 parent = udev_device_get_parent(device);
34 ret = eina_stringshare_add(udev_device_get_property_value(parent, "DEVPATH"));
35
36 udev_device_unref(device);
37 udev_unref(udev);
38
39 return ret;
40}
41
42/**
43 * Find devices using a EUDEV_TYPE_* and/or a name.
44 *
45 * @param type A Eudev_Type or 0
46 * @param name A filter for the device name or NULL
47 * @return A Eina_List* of matched devices or NULL on failure
48 *
49 * Return a list of syspaths (/sys/$syspath) for matching udev devices.
50 *
51 * @ingroup udev
52 */
53EAPI Eina_List *
54e_udev_find_by_type(const Eudev_Type etype, const char *name)
55{
56 struct udev *udev;
57 struct udev_enumerate *en;
58 struct udev_list_entry *devs, *cur;
59 struct udev_device *device, *parent;
60 const char *sysname, *devname;
61 Eina_List *ret = NULL;
62
63 if (!etype && !name) return NULL;
64
65 udev = udev_new();
66 if (!udev) return NULL;
67 en = udev_enumerate_new(udev);
68 if (!en) return NULL;
69
70 switch (etype)
71 {
72 case EUDEV_TYPE_NONE:
73 break;
74 case EUDEV_TYPE_KEYBOARD:
75 udev_enumerate_add_match_subsystem(en, "input");
76 udev_enumerate_add_match_property(en, "ID_INPUT_KEYBOARD", "1");
77 break;
78 case EUDEV_TYPE_MOUSE:
79 udev_enumerate_add_match_subsystem(en, "input");
80 udev_enumerate_add_match_property(en, "ID_INPUT_MOUSE", "1");
81 break;
82 case EUDEV_TYPE_TOUCHPAD:
83 udev_enumerate_add_match_subsystem(en, "input");
84 udev_enumerate_add_match_property(en, "ID_INPUT_TOUCHPAD", "1");
85 break;
86 case EUDEV_TYPE_DRIVE_MOUNTABLE:
87 udev_enumerate_add_match_subsystem(en, "block");
88 udev_enumerate_add_match_property(en, "ID_FS_USAGE", "filesystem");
89 udev_enumerate_add_nomatch_sysattr(en, "capability", "52");
90 break;
91 case EUDEV_TYPE_DRIVE_INTERNAL:
92 udev_enumerate_add_match_subsystem(en, "block");
93 udev_enumerate_add_match_property(en, "ID_TYPE", "disk");
94 udev_enumerate_add_match_property(en, "ID_BUS", "ata");
95 udev_enumerate_add_match_sysattr(en, "removable", "0");
96 break;
97 case EUDEV_TYPE_DRIVE_REMOVABLE:
98 udev_enumerate_add_match_subsystem(en, "block");
99 udev_enumerate_add_match_property(en, "ID_TYPE", "disk");
100 udev_enumerate_add_match_sysattr(en, "removable", "1");
101 break;
102 case EUDEV_TYPE_DRIVE_CDROM:
103 udev_enumerate_add_match_subsystem(en, "block");
104 udev_enumerate_add_match_property(en, "ID_CDROM", "1");
105 break;
106 case EUDEV_TYPE_POWER_AC:
107 udev_enumerate_add_match_subsystem(en, "power_supply");
108 udev_enumerate_add_match_property(en, "POWER_SUPPLY_TYPE", "Mains");
109 break;
110 case EUDEV_TYPE_POWER_BAT:
111 udev_enumerate_add_match_subsystem(en, "power_supply");
112 udev_enumerate_add_match_property(en, "POWER_SUPPLY_TYPE", "Battery");
113 break;
114/*
115 case EUDEV_TYPE_ANDROID:
116 udev_enumerate_add_match_subsystem(en, "block");
117 udev_enumerate_add_match_property(en, "ID_MODEL", "Android_*");
118 break;
119*/
120 default:
121 break;
122 }
123 udev_enumerate_scan_devices(en);
124 devs = udev_enumerate_get_list_entry(en);
125
126 udev_list_entry_foreach(cur, devs)
127 {
128 devname = udev_list_entry_get_name(cur);
129 device = udev_device_new_from_syspath(udev, devname);
130
131 if (name)
132 if (!strstr(sysname,name))
133 goto out;
134
135 ret = eina_list_append(ret, eina_stringshare_add(udev_device_get_property_value(device, "DEVPATH")));
136
137out:
138 udev_device_unref(device);
139 }
140 udev_enumerate_unref(en);
141 udev_unref(udev);
142
143 return ret;
144}
145
146/**
147 * A more advanced find, allows finds using udev properties.
148 *
149 * @param subsystem The udev subsystem to filter by, or NULL
150 * @param type "ID_INPUT_KEY", "ID_INPUT_MOUSE", "ID_INPUT_TOUCHPAD", NULL, etc
151 * @param name A filter for the device name, or NULL
152 * @return A Eina_List* of matched devices or NULL on failure
153 *
154 * Return a list of syspaths (/sys/$syspath) for matching udev devices.
155 * Requires at least one filter.
156 *
157 * @ingroup udev
158 */
159EAPI Eina_List *
160e_udev_find_by_filter(const char *subsystem, const char *type, const char *name)
161{
162 struct udev *udev;
163 struct udev_enumerate *en;
164 struct udev_list_entry *devs, *cur;
165 struct udev_device *device, *parent;
166 const char *sysname, *id_type, *devname;
167 Eina_List *ret = NULL;
168
169 if (!subsystem && !type && !name) return NULL;
170
171 udev = udev_new();
172 if (!udev) return NULL;
173 en = udev_enumerate_new(udev);
174 if (!en) return NULL;
175
176 if (subsystem)
177 udev_enumerate_add_match_subsystem(en, subsystem);
178
179 udev_enumerate_add_match_property(en, type, "1");
180 udev_enumerate_scan_devices(en);
181 devs = udev_enumerate_get_list_entry(en);
182
183 udev_list_entry_foreach(cur, devs)
184 {
185 devname = udev_list_entry_get_name(cur);
186 device = udev_device_new_from_syspath(udev, devname);
187
188 if (name)
189 if (!strstr(sysname,name))
190 goto out;
191
192 ret = eina_list_append(ret, eina_stringshare_add(udev_device_get_property_value(device, "DEVPATH")));
193
194out:
195 udev_device_unref(device);
196 }
197 udev_enumerate_unref(en);
198 udev_unref(udev);
199
200 return ret;
201}
202
203
204/**
205 * Get the /dev/ path from the /sys/ path.
206 *
207 * @param syspath The /sys/ path with or without the /sys/
208 * @return A const char* with the /dev/ path or NULL on failure
209 *
210 * Takes /sys/$PATH and turns it into the corresponding "/dev/x/y".
211 *
212 * @ingroup udev
213 */
214EAPI const char *
215e_udev_syspath_get_devpath(const char *syspath)
216{
217 struct udev *udev;
218 struct udev_device *device;
219 const char *name;
220 Eina_Strbuf *sbuf;
221
222 if (!syspath) return NULL;
223 udev = udev_new();
224 if (!udev) return NULL;
225
226 sbuf = eina_strbuf_new();
227 if (!strstr(syspath, "/sys/"))
228 eina_strbuf_append(sbuf, "/sys/");
229 eina_strbuf_append(sbuf, syspath);
230
231 device = udev_device_new_from_syspath(udev, eina_strbuf_string_get(sbuf));
232 name = eina_stringshare_add(udev_device_get_property_value(device, "DEVNAME"));
233
234 udev_device_unref(device);
235 udev_unref(udev);
236 eina_strbuf_free(sbuf);
237
238 return name;
239}
240
241/**
242 * Get the subsystem of a device from the /sys/ path.
243 *
244 * @param syspath The /sys/ path with or without the /sys/
245 * @return A const char* with the subsystem of the device or NULL on failure
246 *
247 * Takes /sys/$PATH and returns the corresponding device subsystem,
248 * such as "input" for keyboards/mice.
249 *
250 * @ingroup udev
251 */
252EAPI const char *
253e_udev_syspath_get_subsystem(const char *syspath)
254{
255 struct udev *udev;
256 struct udev_device *device;
257 const char *subsystem;
258 Eina_Strbuf *sbuf;
259
260 if (!syspath) return NULL;
261 udev = udev_new();
262 if (!udev) return NULL;
263
264 sbuf = eina_strbuf_new();
265 if (!strstr(syspath, "/sys/"))
266 eina_strbuf_append(sbuf, "/sys/");
267 eina_strbuf_append(sbuf, syspath);
268
269 device = udev_device_new_from_syspath(udev, eina_strbuf_string_get(sbuf));
270 subsystem = eina_stringshare_add(udev_device_get_property_value(device, "SUBSYSTEM"));
271
272 udev_device_unref(device);
273 udev_unref(udev);
274 eina_strbuf_free(sbuf);
275
276 return subsystem;
277}
278
279/**
280 * Get the property value of a device from the /sys/ path.
281 *
282 * @param syspath The /sys/ path with or without the /sys/
283 * @param property The property to get; full list of these is a FIXME
284 * @return A const char* with the subsystem of the device or NULL on failure
285 *
286 * Takes /sys/$PATH and returns the corresponding device subsystem,
287 * such as "input" for keyboards/mice.
288 *
289 * @ingroup udev
290 */
291EAPI const char *
292e_udev_syspath_get_property(const char *syspath, const char *property)
293{
294 struct udev *udev;
295 struct udev_device *device;
296 const char *value;
297 Eina_Strbuf *sbuf;
298
299 if (!syspath) return NULL;
300 udev = udev_new();
301 if (!udev) return NULL;
302
303 sbuf = eina_strbuf_new();
304 if (!strstr(syspath, "/sys/"))
305 eina_strbuf_append(sbuf, "/sys/");
306 eina_strbuf_append(sbuf, syspath);
307
308 device = udev_device_new_from_syspath(udev, eina_strbuf_string_get(sbuf));
309 value = eina_stringshare_add(udev_device_get_property_value(device, property));
310
311 udev_device_unref(device);
312 udev_unref(udev);
313 eina_strbuf_free(sbuf);
314
315 return value;
316}
317
318/**
319 * Get the syspath of a device from the /dev/ path.
320 *
321 * @param devpath The /dev/ path of the device
322 * @return A const char* which corresponds to the /sys/ path of the device or NULL on failure
323 *
324 * Takes "/dev/path" and returns the corresponding /sys/ path (without the "/sys/")
325 *
326 * @ingroup udev
327 */
328EAPI const char *
329e_udev_devpath_get_syspath(const char *devpath)
330{
331 struct udev *udev;
332 struct udev_enumerate *en;
333 struct udev_list_entry *devs, *cur;
334 struct udev_device *device, *parent;
335 const char *name, *ret;
336
337 if (!devpath) return NULL;
338 udev = udev_new();
339 if (!udev) return NULL;
340 en = udev_enumerate_new(udev);
341 if (!en) return NULL;
342
343 udev_enumerate_add_match_property(en, "DEVNAME", devpath);
344 udev_enumerate_scan_devices(en);
345 devs = udev_enumerate_get_list_entry(en);
346
347 udev_list_entry_foreach(cur, devs)
348 {
349 name = udev_list_entry_get_name(cur);
350 device = udev_device_new_from_syspath(udev, name);
351 ret = eina_stringshare_add(udev_device_get_sysname(device));
352
353 udev_device_unref(device);
354 break; /*just in case there's more than one somehow*/
355 }
356 udev_enumerate_unref(en);
357 udev_unref(udev);
358
359 return ret;
360}
361
362/**
363 * Get the subsystem of a device from the /dev/ path.
364 *
365 * @param devpath The /dev/ path of the device
366 * @return A const char* with the subsystem of the device or NULL on failure
367 *
368 * Takes "/dev/path" and returns the subsystem of the device.
369 *
370 * @ingroup udev
371 */
372EAPI const char *
373e_udev_devpath_get_subsystem(const char *devpath)
374{
375 struct udev *udev;
376 struct udev_enumerate *en;
377 struct udev_list_entry *devs, *cur;
378 struct udev_device *device;
379 const char *name, *ret;
380
381 if (!devpath) return NULL;
382 udev = udev_new();
383 if (!udev) return NULL;
384 en = udev_enumerate_new(udev);
385 if (!en) return NULL;
386
387 udev_enumerate_add_match_property(en, "DEVNAME", devpath);
388 udev_enumerate_scan_devices(en);
389 devs = udev_enumerate_get_list_entry(en);
390
391 udev_list_entry_foreach(cur, devs)
392 {
393 name = udev_list_entry_get_name(cur);
394 device = udev_device_new_from_syspath(udev, name);
395 ret = eina_stringshare_add(udev_device_get_subsystem(device));
396
397 udev_device_unref(device);
398 break; /*just in case there's more than one somehow*/
399 }
400 udev_enumerate_unref(en);
401 udev_unref(udev);
402
403 return ret;
404}
405
406/**
407 * Checks whether the device is a mouse.
408 *
409 * @param syspath The /sys/ path of the device
410 * @return If true, the device is a mouse
411 *
412 * @ingroup udev
413 */
414EAPI Eina_Bool
415e_udev_syspath_is_mouse(const char *syspath)
416{
417 struct udev *udev;
418 struct udev_device *device;
419 Eina_Bool mouse = 0;
420 Eina_Strbuf *sbuf;
421 const char *test = NULL;
422
423 if (!syspath) return 0;
424 udev = udev_new();
425 if (!udev) return 0;
426
427 sbuf = eina_strbuf_new();
428 if (!strstr(syspath, "/sys/"))
429 eina_strbuf_append(sbuf, "/sys/");
430 eina_strbuf_append(sbuf, syspath);
431
432 device = udev_device_new_from_syspath(udev, eina_strbuf_string_get(sbuf));
433 test = udev_device_get_property_value(device, "ID_INPUT_MOUSE");
434 if (test) mouse = atoi(test);
435
436 udev_device_unref(device);
437 udev_unref(udev);
438
439 return mouse;
440}
441
442/**
443 * Checks whether the device is a keyboard.
444 *
445 * @param syspath The /sys/ path of the device
446 * @return If true, the device is a keyboard
447 *
448 * @ingroup udev
449 */
450EAPI Eina_Bool
451e_udev_syspath_is_kbd(const char *syspath)
452{
453 struct udev *udev;
454 struct udev_device *device;
455 Eina_Bool kbd = 0;
456 Eina_Strbuf *sbuf;
457 const char *test = NULL;
458
459 if (!syspath) return 0;
460 udev = udev_new();
461 if (!udev) return 0;
462
463 sbuf = eina_strbuf_new();
464 if (!strstr(syspath, "/sys/"))
465 eina_strbuf_append(sbuf, "/sys/");
466 eina_strbuf_append(sbuf, syspath);
467
468 device = udev_device_new_from_syspath(udev, eina_strbuf_string_get(sbuf));
469 test = udev_device_get_property_value(device, "ID_INPUT_KEYBOARD");
470 if (test) kbd = atoi(test);
471
472 udev_device_unref(device);
473 udev_unref(udev);
474
475 return kbd;
476}
477
478/**
479 * Checks whether the device is a touchpad.
480 *
481 * @param syspath The /sys/ path of the device
482 * @return If true, the device is a touchpad
483 *
484 * @ingroup udev
485 */
486EAPI Eina_Bool
487e_udev_syspath_is_touchpad(const char *syspath)
488{
489 struct udev *udev;
490 struct udev_device *device;
491 Eina_Bool touchpad = 0;
492 Eina_Strbuf *sbuf;
493 const char *test = NULL;
494
495 if (!syspath) return 0;
496 udev = udev_new();
497 if (!udev) return 0;
498
499 sbuf = eina_strbuf_new();
500 if (!strstr(syspath, "/sys/"))
501 eina_strbuf_append(sbuf, "/sys/");
502 eina_strbuf_append(sbuf, syspath);
503
504 device = udev_device_new_from_syspath(udev, eina_strbuf_string_get(sbuf));
505 test = udev_device_get_property_value(device, "ID_INPUT_TOUCHPAD");
506 if (test) touchpad = atoi(test);
507
508 udev_device_unref(device);
509 udev_unref(udev);
510
511 return touchpad;
512}
513
diff --git a/legacy/eeze/src/lib/udev/e_udev_main.c b/legacy/eeze/src/lib/udev/e_udev_main.c
new file mode 100644
index 0000000000..e2bb21901b
--- /dev/null
+++ b/legacy/eeze/src/lib/udev/e_udev_main.c
@@ -0,0 +1,46 @@
1#include <E_Udev.h>
2#include "e_udev_private.h"
3
4int _e_eeze_udev_log_dom = -1;
5int _e_eeze_udev_init_count = 0;
6
7EAPI int
8e_udev_init(void)
9{
10 if (++_e_eeze_udev_init_count != 1)
11 return _e_eeze_udev_init_count;
12
13 if (!eina_init())
14 return --_e_eeze_udev_init_count;
15
16 _e_eeze_udev_log_dom = eina_log_domain_register
17 ("e_udev", E_EEZE_COLOR_DEFAULT);
18 if (_e_eeze_udev_log_dom < 0)
19 {
20 EINA_LOG_ERR("Could not register 'e_udev' log domain.");
21 goto shutdown_eina;
22 }
23
24 return _e_eeze_udev_init_count;
25
26 unregister_log_domain:
27 eina_log_domain_unregister(_e_eeze_udev_log_dom);
28 _e_eeze_udev_log_dom = -1;
29 shutdown_eina:
30 eina_shutdown();
31
32 return _e_eeze_udev_init_count;
33}
34
35EAPI int
36e_udev_shutdown(void)
37{
38 if (--_e_eeze_udev_init_count != 0)
39 return _e_eeze_udev_init_count;
40
41 eina_log_domain_unregister(_e_eeze_udev_log_dom);
42 _e_eeze_udev_log_dom = -1;
43 eina_shutdown();
44
45 return _e_eeze_udev_init_count;
46}
diff --git a/legacy/eeze/src/lib/udev/e_udev_private.h b/legacy/eeze/src/lib/udev/e_udev_private.h
new file mode 100644
index 0000000000..f6c853000f
--- /dev/null
+++ b/legacy/eeze/src/lib/udev/e_udev_private.h
@@ -0,0 +1,26 @@
1#ifndef E_UDEV_PRIVATE_H
2#define E_UDEV_PRIVATE_H
3
4#ifndef E_EEZE_COLOR_DEFAULT
5#define E_EEZE_COLOR_DEFAULT EINA_COLOR_CYAN
6#endif
7extern int _e_eeze_udev_log_dom;
8#ifdef ERR
9#undef ERR
10#endif
11#ifdef INF
12#undef INF
13#endif
14#ifdef WARN
15#undef WARN
16#endif
17#ifdef DBG
18#undef DBG
19#endif
20
21#define DBG(...) EINA_LOG_DOM_DBG(_e_eeze_udev_log_dom, __VA_ARGS__)
22#define INFO(...) EINA_LOG_DOM_INFO(_e_eeze_udev_log_dom, __VA_ARGS__)
23#define WARN(...) EINA_LOG_DOM_WARN(_e_eeze_udev_log_dom, __VA_ARGS__)
24#define ERR(...) EINA_LOG_DOM_ERR(_e_eeze_udev_log_dom, __VA_ARGS__)
25
26#endif
diff --git a/legacy/eeze/src/lib/udev/e_udev_watch.c b/legacy/eeze/src/lib/udev/e_udev_watch.c
new file mode 100644
index 0000000000..c0069b4781
--- /dev/null
+++ b/legacy/eeze/src/lib/udev/e_udev_watch.c
@@ -0,0 +1,228 @@
1#include <E_Udev.h>
2#include "e_udev_private.h"
3
4/* opaque */
5struct Eudev_Watch
6{
7 struct udev_monitor *mon;
8 Ecore_Fd_Handler *handler;
9 Eudev_Type type;
10};
11
12/* private */
13struct _store_data
14{
15 void(*func)(const char *, void *, Eudev_Watch *);
16 void *data;
17 struct udev_monitor *mon;
18 Eudev_Type type;
19 Eudev_Watch *watch;
20};
21
22/* private function to further filter watch results based on Eudev_Type
23 * specified
24 */
25static int
26_get_syspath_from_watch(void *data, Ecore_Fd_Handler *fd_handler)
27{
28 struct _store_data *store = data;
29 struct udev_device *device;
30 const char *ret, *test;
31 void(*func)(const char *, void *, Eudev_Watch *) = store->func;
32 void *sdata = store->data;
33 Eudev_Watch *watch = store->watch;
34 int cap = 0;
35
36 if (!ecore_main_fd_handler_active_get(fd_handler, ECORE_FD_READ))
37 return 0;
38 device = udev_monitor_receive_device(store->mon);
39 if (!device) return 0;
40
41 switch (store->type)
42 {
43 case EUDEV_TYPE_KEYBOARD:
44 if (!udev_device_get_property_value(device, "ID_INPUT_KEYBOARD"))
45 goto error;
46 break;
47 case EUDEV_TYPE_MOUSE:
48 if (!udev_device_get_property_value(device, "ID_INPUT_MOUSE"))
49 goto error;
50 break;
51 case EUDEV_TYPE_TOUCHPAD:
52 if (!udev_device_get_property_value(device, "ID_INPUT_TOUCHPAD"))
53 goto error;
54 break;
55 case EUDEV_TYPE_DRIVE_MOUNTABLE:
56 test = udev_device_get_sysattr_value(device, "capability");
57 if (test) cap = atoi(test);
58 if (!(test = (udev_device_get_property_value(device, "ID_FS_USAGE"))) ||
59 strcmp("filesystem", test) || cap == 52)
60 goto error;
61 break;
62 case EUDEV_TYPE_DRIVE_INTERNAL:
63 if (!(test = udev_device_get_property_value(device, "ID_BUS")) || strcmp("ata", test) ||
64 !(test = udev_device_get_sysattr_value(device, "removable")) || atoi(test))
65 goto error;
66 break;
67 case EUDEV_TYPE_DRIVE_REMOVABLE:
68 if ((!(test = udev_device_get_sysattr_value(device, "removable")) || !atoi(test)) &&
69 (!(test = udev_device_get_sysattr_value(device, "capability")) || atoi(test) != 10))
70 goto error;
71 break;
72 case EUDEV_TYPE_DRIVE_CDROM:
73 if (!udev_device_get_property_value(device, "ID_CDROM"))
74 goto error;
75 break;
76 case EUDEV_TYPE_POWER_AC:
77 if (!(test = (udev_device_get_property_value(device, "POWER_SUPPLY_TYPE"))) ||
78 strcmp("Mains", test))
79 break;
80 case EUDEV_TYPE_POWER_BAT:
81 if (!(test = (udev_device_get_property_value(device, "POWER_SUPPLY_TYPE"))) ||
82 strcmp("Battery", test))
83 break;
84/*
85 case EUDEV_TYPE_ANDROID:
86 udev_monitor_filter_add_match_subsystem_devtype(mon, "input", "usb_interface");
87 break;
88*/
89 default:
90 break;
91 }
92
93 ret = eina_stringshare_add(udev_device_get_syspath(device));
94 if (!ret) return 0;
95
96 udev_device_unref(device);
97
98 (*func)(ret, sdata, watch);
99
100 return 1;
101
102error:
103 udev_device_unref(device);
104 return 0;
105}
106/**
107 * Add a watch in a subsystem for a device type
108 *
109 * @param subsystem The subsystem type. See @ref Subsystem_Types
110 * @param device_type The device type. See @ref Device_Types
111 * @param func The function to call when the watch receives data
112 * @param user_data Data to pass to the callback function
113 *
114 * @return A watch struct for the watch type specified, or NULL on failure
115 *
116 * @ingroup udev
117 */
118EAPI Eudev_Watch *
119e_udev_watch_add(Eudev_Type type, void(*func)(const char *, void *, Eudev_Watch *), void *user_data)
120{
121 struct udev *udev;
122 struct udev_monitor *mon;
123 int fd;
124 Ecore_Fd_Handler *handler;
125 Eudev_Watch *watch;
126 struct _store_data *store;
127 const char *subsystem, *device_type;
128
129 if (!(store = malloc(sizeof(struct _store_data)))) return NULL;
130 if (!(watch = malloc(sizeof(Eudev_Watch))))
131 goto error;
132
133 if (!(udev = udev_new()))
134 goto error;
135 if (!(mon = udev_monitor_new_from_netlink(udev, "udev")))
136 goto error;
137 switch (type)
138 {
139 case EUDEV_TYPE_KEYBOARD:
140 udev_monitor_filter_add_match_subsystem_devtype(mon, "input", "usb_interface");
141 break;
142 case EUDEV_TYPE_MOUSE:
143 udev_monitor_filter_add_match_subsystem_devtype(mon, "input", "usb_interface");
144 break;
145 case EUDEV_TYPE_TOUCHPAD:
146 udev_monitor_filter_add_match_subsystem_devtype(mon, "input", "usb_interface");
147 break;
148 case EUDEV_TYPE_DRIVE_MOUNTABLE:
149 udev_monitor_filter_add_match_subsystem_devtype(mon, "block", "disk");
150 break;
151 case EUDEV_TYPE_DRIVE_INTERNAL:
152 udev_monitor_filter_add_match_subsystem_devtype(mon, "block", "disk");
153 break;
154 case EUDEV_TYPE_DRIVE_REMOVABLE:
155 udev_monitor_filter_add_match_subsystem_devtype(mon, "block", "disk");
156 break;
157 case EUDEV_TYPE_DRIVE_CDROM:
158 udev_monitor_filter_add_match_subsystem_devtype(mon, "block", "disk");
159 break;
160 case EUDEV_TYPE_POWER_AC:
161 udev_monitor_filter_add_match_subsystem_devtype(mon, "power_supply", "*");
162 break;
163 case EUDEV_TYPE_POWER_BAT:
164 udev_monitor_filter_add_match_subsystem_devtype(mon, "power_supply", "*");
165 break;
166/*
167 case EUDEV_TYPE_ANDROID:
168 udev_monitor_filter_add_match_subsystem_devtype(mon, "input", "usb_interface");
169 break;
170*/
171 default:
172 break;
173 }
174 if (udev_monitor_enable_receiving(mon))
175 goto error;
176
177 fd = udev_monitor_get_fd(mon);
178 store->func = func;
179 store->data = user_data;
180 store->mon = mon;
181 store->type = type;
182 store->watch = watch;
183 if (!(handler = ecore_main_fd_handler_add(fd, ECORE_FD_READ, _get_syspath_from_watch, store, NULL, NULL)))
184 goto error;
185 watch->mon = mon;
186 watch->handler = handler;
187
188 return watch;
189
190error:
191 free(store);
192 free(watch);
193 udev_monitor_unref(mon);
194 udev_unref(udev);
195 return NULL;
196}
197
198/**
199 * Deletes a watch.
200 *
201 * @param watch An Eudev_Watch object
202 * @return The data originally associated with the watch, or NULL
203 *
204 * Deletes a watch, closing file descriptors and freeing related udev memory.
205 *
206 * @ingroup udev
207 */
208EAPI void *
209e_udev_watch_del(Eudev_Watch *watch)
210{
211 struct udev *udev;
212 struct udev_monitor *mon = watch->mon;
213 Ecore_Fd_Handler *handler = watch->handler;
214 struct _store_data *sdata;
215 void *ret;
216
217 if (!watch || !mon || !handler) return NULL;
218
219 udev = udev_monitor_get_udev(mon);
220 udev_monitor_unref(mon);
221 udev_unref(udev);
222 sdata = ecore_main_fd_handler_del(handler);
223 ret = sdata->data;
224 free(sdata);
225 free(watch);
226
227 return ret;
228}